pyoculus 0.1.1
Loading...
Searching...
No Matches
pyoculus.solvers.flux_surface_gr.FluxSurfaceGR Class Reference

Class that used to set up the flux surface finder. More...

Inheritance diagram for pyoculus.solvers.flux_surface_gr.FluxSurfaceGR:
pyoculus.solvers.base_solver.BaseSolver

Public Member Functions

 __init__ (self, problem, params=dict(), integrator=None, integrator_params=dict())
 Set up the class of the flux surface point finder using Greene's method.
 
 compute (self, iota, n_expand=10, nstart=5, sbegin=-1.0, send=1.0, sguess=0.0, fixed_point_left=None, fixed_point_right=None, tol=None)
 Look for the flux surface with a irrational rotation number.
 
 plot (self, plottype=None, xlabel=None, ylabel=None, xlim=None, ylim=None, **kwargs)
 Generates the plot for flux surface.
 
 plot_residue (self)
 Generate the plot for residue.
 
- Public Member Functions inherited from pyoculus.solvers.base_solver.BaseSolver
 is_successful (self)
 Returns True if the computation is successfully completed.
 

Public Attributes

 Nfp = problem.Nfp
 
 nstart = nstart
 
 fixedpoints = fixedpoints
 
bool successful = True
 
- Public Attributes inherited from pyoculus.solvers.base_solver.BaseSolver
bool successful = False
 flagging if the computation is done and successful
 

Additional Inherited Members

- Protected Attributes inherited from pyoculus.solvers.base_solver.BaseSolver
 _integrator_type = RKIntegrator
 
 _params = dict(params)
 
 _integrator = self._integrator_type(integrator_params)
 
 _problem = problem
 
 _integrator_params = dict(integrator_params)
 

Detailed Description

Class that used to set up the flux surface finder.

Constructor & Destructor Documentation

◆ __init__()

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.__init__ ( self,
problem,
params = dict(),
integrator = None,
integrator_params = dict() )

Set up the class of the flux surface point finder using Greene's method.

Parameters
problemmust inherit pyoculus.problems.BaseProblem, the problem to solve
paramsdict, the parameters for the solver
integratorthe integrator to use, must inherit \pyoculus.integrators.BaseIntegrator, if set to None by default using RKIntegrator
integrator_paramsdict, the parmaters passed to the integrator

These parameters will be passed to the fixed point finder

params['niter']=100 – the maximum number of Newton iterations params['theta']=None – if we look for fixed point on some symmetry line =None : theta is also a free variable to look for =somenumber : only look for theta with this number params['zeta']=0.0 – the toroidal plane we are after params['nrestart']=1 – if search failed, the number of time to restart (randomly within the domain)

Reimplemented from pyoculus.solvers.base_solver.BaseSolver.

Member Function Documentation

◆ compute()

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.compute ( self,
iota,
n_expand = 10,
nstart = 5,
sbegin = -1.0,
send = 1.0,
sguess = 0.0,
fixed_point_left = None,
fixed_point_right = None,
tol = None )

Look for the flux surface with a irrational rotation number.

Parameters
iotathe irrational! rotation number of the flux surface
fixed_point_lefta sucessfully found FixPoint to mark the left bound of the flux surface, its rotation number needs to be in the convergent sequence of iota
fixed_point_righta sucessfully found FixPoint to mark the right bound of the flux surface, its rotation number needs to be in the convergent sequence of iota and next to fixed_point_left
n_expand=10the number of terms in the continued fraction expansion of iota, used to approximate the flux surface
Returns
a class that contains the results fdata.MackayResidue – the Mackay Residue of the fixed points fdata.fixed_points – all the fixed point located fdata.rmnc, fdata.rmns,fdata.zmnc,fdata.zmns` – the Fourier harmonics

◆ plot()

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.plot ( self,
plottype = None,
xlabel = None,
ylabel = None,
xlim = None,
ylim = None,
** kwargs )

Generates the plot for flux surface.

Parameters
plottypewhich variables to plot: 'RZ' or 'yx', by default using "poincare_plot_type" in problem
xlabel,ylabelwhat to put for the xlabel and ylabel, by default using "poincare_plot_xlabel" in problem
xlim,ylimthe range of plotting, by default plotting the range of all data
**kwargspassed to the plotting routine "plot"

◆ plot_residue()

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.plot_residue ( self)

Generate the plot for residue.

Member Data Documentation

◆ fixedpoints

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.fixedpoints = fixedpoints

◆ Nfp

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.Nfp = problem.Nfp

◆ nstart

pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.nstart = nstart

◆ successful

bool pyoculus.solvers.flux_surface_gr.FluxSurfaceGR.successful = True

The documentation for this class was generated from the following file: