|
pyoculus 0.1.1
|
Class that used to setup the SPEC bfield problem for interfacing Fortran, used in ODE solver. More...
Public Member Functions | |
| __init__ (self, spec_data, lvol) | |
| the problem size, 2 for 1.5D/2D Hamiltonian system | |
| B (self, coords, *args) | |
| Returns magnetic fields. | |
| dBdX (self, coords, *args) | |
| Returns magnetic fields. | |
| B_many (self, x1arr, x2arr, x3arr, input1D=True, *args) | |
| Returns magnetic fields, with multipy coordinate inputs. | |
| dBdX_many (self, x1arr, x2arr, x3arr, input1D=True, *args) | |
| Returns magnetic fields. | |
| convert_coords (self, stz) | |
| Python wrapper for getting the xyz coordinates from stz. | |
Public Member Functions inherited from pyoculus.problems.spec_problem.SPECProblem | |
| __init__ (self, spec_data, lvol) | |
| Set up the equilibrium for use of the fortran module. | |
Public Member Functions inherited from pyoculus.problems.toroidal_bfield.ToroidalBfield | |
| __init__ (self) | |
| Set up the problem with two cyclical coordinates, e.g. | |
| f (self, zeta, st, *args) | |
| Returns ODE RHS. | |
| f_tangent (self, zeta, st, *args) | |
| Returns ODE RHS, with tangent. | |
Public Member Functions inherited from pyoculus.problems.toroidal_problem.ToroidalProblem | |
| __init__ (self) | |
| Set up the problem with two cyclical coordinates, e.g. | |
Public Member Functions inherited from pyoculus.problems.base_problem.BaseProblem | |
| __init__ (self) | |
Public Member Functions inherited from pyoculus.problems.bfield_problem.BfieldProblem | |
| __init__ (self) | |
| Set up the problem. | |
Additional Inherited Members | |
Public Attributes inherited from pyoculus.problems.spec_problem.SPECProblem | |
| fortran_module = fortran_module | |
| Mvol = spec_data.output.Mvol | |
| Ntor = spec_data.input.physics.Ntor | |
| Mpol = spec_data.input.physics.Mpol | |
| Igeometry = spec_data.input.physics.Igeometry | |
| int | NOTstellsym = 0 |
| Nfp = spec_data.input.physics.Nfp | |
| float | rpol = spec_data.input.physics.rpol |
| float | rtor = spec_data.input.physics.rtor |
| ivol = lvol | |
| Lrad = spec_data.input.physics.Lrad[lvol - 1] | |
| tuple | Lcoordinatesingularity |
Public Attributes inherited from pyoculus.problems.base_problem.BaseProblem | |
| int | problem_size = 2 |
| str | poincare_plot_type = "yx" |
| str | poincare_plot_xlabel = "y" |
| str | poincare_plot_ylabel = "x" |
Public Attributes inherited from pyoculus.problems.bfield_problem.BfieldProblem | |
| bool | has_jacobian = False |
| if the output magnetic field contains the jacobian factor or not | |
Class that used to setup the SPEC bfield problem for interfacing Fortran, used in ODE solver.
See specbfield for more details.
The SPECBfield system of ODEs is given by
\[ \frac{ds}{d\zeta} = \frac{B^{s}}{B^{\zeta}} \]
\[ \frac{d\theta}{d\zeta} = \frac{B^{\theta}}{B^{\zeta}} \]
| pyoculus.problems.spec_bfield.SPECBfield.__init__ | ( | self, | |
| spec_data, | |||
| lvol ) |
the problem size, 2 for 1.5D/2D Hamiltonian system
Set up the equilibrium for use of the fortran module
| spec_data | the SPEC data generated by py_spec.SPECout |
| lvol | which volume we are interested in, from 1 to spec_data.input.Mvol Only support SPEC version >=3.0 |
| pyoculus.problems.spec_bfield.SPECBfield.B | ( | self, | |
| coords, | |||
| * | args ) |
Returns magnetic fields.
| coordinates | \((s,\theta,\zeta)\) |
| *args | extra parameters |
Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.
| pyoculus.problems.spec_bfield.SPECBfield.B_many | ( | self, | |
| x1arr, | |||
| x2arr, | |||
| x3arr, | |||
| input1D = True, | |||
| * | args ) |
Returns magnetic fields, with multipy coordinate inputs.
| x1arr | the first coordinates. Should have the same length as the other two if input1D=True. |
| x2arr | the second coordinates. Should have the same length as the other two if input1D=True. |
| x3arr | the third coordinates. Should have the same length as the other two if input1D=True. |
| input1D | if False, create a meshgrid with sarr, tarr and zarr, if True, treat them as a list of points |
| *args | extra parameters |
Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.
| pyoculus.problems.spec_bfield.SPECBfield.convert_coords | ( | self, | |
| stz ) |
Python wrapper for getting the xyz coordinates from stz.
| stz | the stz coordinate |
Reimplemented from pyoculus.problems.toroidal_problem.ToroidalProblem.
| pyoculus.problems.spec_bfield.SPECBfield.dBdX | ( | self, | |
| coords, | |||
| * | args ) |
Returns magnetic fields.
| coordinates | \((s,\theta,\zeta)\) |
| *args | extra parameters |
Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.
| pyoculus.problems.spec_bfield.SPECBfield.dBdX_many | ( | self, | |
| x1arr, | |||
| x2arr, | |||
| x3arr, | |||
| input1D = True, | |||
| * | args ) |
Returns magnetic fields.
| x1arr | the first coordinates. Should have the same length as the other two if input1D=True. |
| x2arr | the second coordinates. Should have the same length as the other two if input1D=True. |
| x3arr | the third coordinates. Should have the same length as the other two if input1D=True. |
| input1D | if False, create a meshgrid with sarr, tarr and zarr, if True, treat them as a list of points |
| *args | extra parameters |
Reimplemented from pyoculus.problems.bfield_problem.BfieldProblem.