![]() |
The Open FUSION Toolkit 1.0.0-beta7
An open-source framework for fusion and plasma science and engineering
|
TokaMaker G-S solver class.
Public Member Functions | |
| __del__ (self) | |
| Free Fortran-side objects by calling reset() before object is deleted or GC'd. | |
| __init__ (self, OFT_env) | |
| Initialize TokaMaker object. | |
| reset (self) | |
| Reset G-S object to enable loading a new mesh and coil configuration. | |
| setup (self, order=2, F0=0.0, full_domain=False) | |
| Setup G-S solver. | |
| setup_mesh (self, r=None, lc=None, reg=None, mesh_file=None) | |
| Setup mesh for static and time-dependent G-S calculations. | |
| setup_regions (self, cond_dict={}, coil_dict={}) | |
| Define mesh regions (coils and conductors). | |
Public Attributes | |
| float | alam = 0.1 |
| F*F' normalization value. | |
| list | coil_set_names = [] |
| Coil set names in order of id number. | |
| dict | coil_sets = {} |
| Coil set definitions, including sub-coils. | |
| dict | dist_coils = {} |
| Distribution coils, only (currently) saved for plotting utility. | |
| lc = None | |
| Mesh triangles [nc,3]. | |
| lim_contour = None | |
| Limiting contour. | |
| list | lim_contours = None |
| Limiting contours (if multiple). | |
| lim_point = None | |
| Limiting point (limter or active X-point) [2]. | |
| int | nc = -1 |
| Number of cells in mesh. | |
| ncoils = ncoils.value | |
| Number of coils in mesh. | |
| int | np = -1 |
| Number of points in mesh. | |
| int | nregs = -1 |
| Number of regions in mesh. | |
| int | nvac = 0 |
| Number of vacuum regions in mesh. | |
| o_point = None | |
| Location of O-point (magnetic axis) [2]. | |
| float | pnorm = 0.1 |
| P' normalization value. | |
| psi_bounds = None | |
| Bounding values for \(\psi\) ( \(\psi_a\), \(\psi_0\)) [2]. | |
| int | psi_convention = 0 |
| Normalized flux convention (0 -> tokamak, 1 -> spheromak). | |
| r = None | |
| Mesh vertices [np,3] (last column should be all zeros). | |
| reg = None | |
| Mesh regions [nc]. | |
| settings = tokamaker_default_settings(self._oft_env) | |
| General settings object. | |
| x_points = None | |
| Location of X-points [20,2]. | |
Protected Attributes | |
| _alam = None | |
| F*F' normalization value [1] (use alam property). | |
| dict | _coil_dict = {} |
| Coil definition dictionary. | |
| dict | _cond_dict = {} |
| Conductor definition dictionary. | |
| _diverted = None | |
| Diverted (limited) flag [1] (use diverted property). | |
| _estore_target = c_double(self._oft_env.float_disable_flag) | |
| Stored energy target value (use set_targets). | |
| float | _F0 = 0.0 |
| Vacuum F value. | |
| _flux_targets = None | |
| Flux constraint points (use set_flux). | |
| _Ip_ratio_target = c_double(self._oft_env.float_disable_flag) | |
| Plasma current target ratio I_p(FF') / I_p(P') (use set_targets). | |
| _Ip_target = c_double(self._oft_env.float_disable_flag) | |
| Plasma current target value (use set_targets). | |
| _isoflux_targets = None | |
| Isoflux constraint points (use set_isoflux). | |
| _mesh_ptr = c_void_p() | |
| Internal mesh object. | |
| _oft_env = OFT_env | |
| _pax_target = c_double(self._oft_env.float_disable_flag) | |
| Axis pressure target value (use set_targets). | |
| _pnorm = None | |
| Pressure normalization value [1] (use pnorm property). | |
| _R0_target = c_double(self._oft_env.float_disable_flag) | |
| R0 target value (use set_targets). | |
| _saddle_targets = None | |
| Saddle constraint points (use set_saddles). | |
| _tMaker_ptr = c_void_p() | |
| Internal Grad-Shafranov object (gs_eq). | |
| _V0_target = c_double(self._oft_env.float_disable_flag) | |
| V0 target value (use set_targets). | |
| dict | _vac_dict = {} |
| Vacuum definition dictionary. | |
| dict | _virtual_coils = {'#VSC': -1} |
| Virtual coils, if present (currently only '#VSC'). | |
| __init__ | ( | self, | |
| OFT_env ) |
| __del__ | ( | self | ) |
Free Fortran-side objects by calling reset() before object is deleted or GC'd.
| reset | ( | self | ) |
Reset G-S object to enable loading a new mesh and coil configuration.
| setup | ( | self, | |
| order = 2, | |||
| F0 = 0.0, | |||
| full_domain = False ) |
Setup G-S solver.
| order | Order of FE representation to use |
| F0 | Vacuum \(F(\psi)\) value (B0*R0) |
| setup_mesh | ( | self, | |
| r = None, | |||
| lc = None, | |||
| reg = None, | |||
| mesh_file = None ) |
Setup mesh for static and time-dependent G-S calculations.
A mesh should be specified by passing "r", "lc", and optionally "reg" or using a "mesh_file". When a region is specified the following ordering should apply:
| r | Mesh point list [np,2] |
| lc | Mesh cell list [nc,3] (base one) |
| reg | Mesh region list [nc] (base one) |
| mesh_file | Filename containing mesh to load (native format only) |
| setup_regions | ( | self, | |
| cond_dict = {}, | |||
| coil_dict = {} ) |
Define mesh regions (coils and conductors).
| cond_dict | Dictionary specifying conducting regions |
|
protected |
F*F' normalization value [1] (use alam property).
|
protected |
Coil definition dictionary.
|
protected |
Conductor definition dictionary.
|
protected |
Diverted (limited) flag [1] (use diverted property).
|
protected |
Stored energy target value (use set_targets).
|
protected |
Vacuum F value.
|
protected |
Flux constraint points (use set_flux).
|
protected |
Plasma current target ratio I_p(FF') / I_p(P') (use set_targets).
|
protected |
Plasma current target value (use set_targets).
|
protected |
Isoflux constraint points (use set_isoflux).
|
protected |
Internal mesh object.
|
protected |
|
protected |
Axis pressure target value (use set_targets).
|
protected |
Pressure normalization value [1] (use pnorm property).
|
protected |
R0 target value (use set_targets).
|
protected |
Saddle constraint points (use set_saddles).
|
protected |
Internal Grad-Shafranov object (gs_eq).
|
protected |
V0 target value (use set_targets).
|
protected |
Vacuum definition dictionary.
|
protected |
Virtual coils, if present (currently only '#VSC').
| float alam = 0.1 |
F*F' normalization value.
| list coil_set_names = [] |
Coil set names in order of id number.
| dict coil_sets = {} |
Coil set definitions, including sub-coils.
| dict dist_coils = {} |
Distribution coils, only (currently) saved for plotting utility.
| lc = None |
Mesh triangles [nc,3].
Number of cells in mesh
Mesh vertices [np,3] (last column should be all zeros)
Mesh triangles [nc,3]
| lim_contour = None |
Limiting contour.
| list lim_contours = None |
Limiting contours (if multiple).
| lim_point = None |
Limiting point (limter or active X-point) [2].
| int nc = -1 |
Number of cells in mesh.
Number of cells in mesh
| ncoils = ncoils.value |
Number of coils in mesh.
| int np = -1 |
Number of points in mesh.
| nregs = -1 |
Number of regions in mesh.
| int nvac = 0 |
Number of vacuum regions in mesh.
| o_point = None |
Location of O-point (magnetic axis) [2].
| float pnorm = 0.1 |
P' normalization value.
| psi_bounds = None |
Bounding values for \(\psi\) ( \(\psi_a\), \(\psi_0\)) [2].
| int psi_convention = 0 |
Normalized flux convention (0 -> tokamak, 1 -> spheromak).
| r = None |
Mesh vertices [np,3] (last column should be all zeros).
Number of cells in mesh
Mesh vertices [np,3] (last column should be all zeros)
| reg = None |
Mesh regions [nc].
Number of cells in mesh
Mesh vertices [np,3] (last column should be all zeros)
Mesh triangles [nc,3]
Mesh regions [nc]
| settings = tokamaker_default_settings(self._oft_env) |
General settings object.
| x_points = None |
Location of X-points [20,2].