![]() |
The Open FUSION Toolkit 1.0.0-6f445ef
An open-source framework for fusion and plasma science and engineering
|
Grad-Shafranov equilibrium object.
Public Member Functions | |
| procedure | delete (self) |
| Destory G-S object. | |
| procedure | init (self) |
| Build operators and allocate storage. | |
| procedure | init_psi (self, equil, ierr, r0, a, kappa, delta, curr_source) |
| Initialize \( \psi \) using simple definition. | |
| procedure | lin_solve (self, equil, adjust_r0, ierr) |
| Solve linearized version of G-S system (fixed RHS) | |
| procedure | load_limiters (self) |
| Load non-node limiter points. | |
| procedure | setup (self, ml_lag_2d) |
| Setup G-S object from FE representation. | |
| procedure | solve (self, equil, ierr) |
| Solve nonlinear G-S system. | |
| procedure | vac_solve (self, equil, psi_sol, rhs_source, ierr) |
| Solve vacuum field for given \( J_{\phi} \). | |
Public Attributes | |
| class(oft_vector), pointer | aug_vec => NULL() |
| Augmented space (psi + coils) vector template. | |
| logical, dimension(:), pointer | axis_flag => NULL() |
| FE boundary flag for on-axis nodes. | |
| real(r8), dimension(:,:), pointer | bc_bmat => NULL() |
| Second part of free-boundary BC matrix. | |
| real(r8), dimension(:,:), pointer | bc_lmat => NULL() |
| First part of free-boundary BC matrix. | |
| integer(i4) | bc_nrhs = 0 |
| Number of terms in free-boundary BC. | |
| integer(i4), dimension(:), pointer | bc_rhs_list => NULL() |
| List of terms interacting with free-boundary BC. | |
| real(r8), dimension(:,:), pointer | coil_bounds => NULL() |
| Coil current bounds. | |
| character(len=oft_path_slen) | coil_file = 'none' |
| File containing coil definitions. | |
| type(oft_map), pointer | coil_map => NULL() |
| Coil vector map information. | |
| real(r8), dimension(:,:), pointer | coil_nturns => NULL() |
| Number of turns for each coil in each region. | |
| type(coil_region), dimension(:), pointer | coil_regions => NULL() |
| Meshed coil regions. | |
| type(oft_seam), pointer | coil_stitch => NULL() |
| Coil vector stitching information. | |
| real(r8), dimension(:), pointer | coil_vcont => NULL() |
| Virtual VSC definition as weighted sum of other coils. | |
| class(oft_vector), pointer | coil_vec => NULL() |
| Coil vector template. | |
| real(r8), dimension(:), pointer | coils_dt => NULL() |
| Coil currents at start of step for quasi-static calculations. | |
| type(axi_coil_set), dimension(:), pointer | coils_ext => NULL() |
| External coil definitions. | |
| real(r8), dimension(:), pointer | coils_volt => NULL() |
| Coil voltages for (valid for Vcoils only) | |
| logical | compute_chi = .FALSE. |
| Compute toroidal field potential? | |
| type(cond_region), dimension(:), pointer | cond_regions => NULL() |
| Meshed conducting regions. | |
| real(r8), dimension(:), pointer | cond_weights => NULL() |
| Needs docs. | |
| class(oft_matrix), pointer | dels => NULL() |
| \( \frac{1}{R} \Delta^* \) matrix | |
| class(oft_matrix), pointer | dels_dt => NULL() |
| LHS matrix with time dependence. | |
| class(oft_matrix), pointer | dels_full => NULL() |
| \( \frac{1}{R} \Delta^* \) matrix with no BC | |
| logical | dipole_mode = .FALSE. |
| Include modifications for Dipole geometry. | |
| type(oft_1d_real), dimension(:), pointer | dist_coil => NULL() |
| Current distribution for each coil (if defined) | |
| real(r8) | dt = -1.d0 |
| Timestep size for time-dependent and quasi-static solves. | |
| real(r8) | dt_last = -1.d0 |
| Timestep size for current LHS matrix. | |
| class(oft_scalar_bfem), pointer | fe_rep => NULL() |
| Lagrange FE representation. | |
| logical | free = .FALSE. |
| Computing free-boundary equilibrium? | |
| logical | full_domain = .FALSE. |
| Solve across full domain (for Solov'ev test cases) | |
| type(oft_gs_zerob), pointer | gs_zerob_bc => NULL() |
| BC object for zeroing nodes outside plasma region. | |
| integer(i4) | ierr = 0 |
| Error flag from most recent solve. | |
| real(r8) | isoflux_grad_wt_lim = -1.d0 |
| Limit for isoflux inverse gradient weighting (negative to disable) | |
| real(r8), dimension(:,:), pointer | lcoils => NULL() |
| Coil mutual inductance matrix. | |
| real(r8) | lim_area = -1.d0 |
| Area inside the limiter. | |
| integer(i4), dimension(:), pointer | lim_con => NULL() |
| Limiter contour list (contains all limiters) | |
| integer(i4) | lim_nloops = 0 |
| Number of limiter loops. | |
| integer(i4), dimension(:), pointer | lim_ptr => NULL() |
| Pointer to start of each. | |
| real(r8) | lim_zmax = 1.d99 |
| Vertical position cutoff for limiter points. | |
| character(len=oft_path_slen) | limiter_file = 'none' |
| File non-node limiter points. | |
| integer(i4), dimension(:), pointer | limiter_nds => NULL() |
| List of limiter nodes. | |
| real(r8), dimension(:,:), pointer | limiter_pts => NULL() |
| Location of non-node limiter points. | |
| type(oft_lusolver) | lu_solver |
| \( \frac{1}{R} \Delta^* \) inverse solver | |
| type(oft_lusolver) | lu_solver_dt |
| LHS inverse solver with time dependence. | |
| integer(i4) | maxits = 30 |
| Maximum number of iterations for nonlinear solve. | |
| class(oft_bmesh), pointer | mesh => NULL() |
| Mesh. | |
| logical | mirror_mode = .FALSE. |
| Include modifications for Mirror/FRC geometry. | |
| type(oft_ml_fem_type), pointer | ml_fe_rep => NULL() |
| Multi-level Lagrange FE representation (only top level used) | |
| class(oft_matrix), pointer | mop => NULL() |
| Lagrange FE mass matrix. | |
| class(oft_matrix), pointer | mop_axis => NULL() |
| Lagrange FE mass matrix with Dirichlet BCs on axis. | |
| class(oft_matrix), pointer | mrop => NULL() |
| 1/R-scaled Lagrange FE mass matrix | |
| integer(i4) | ncoil_regs = 0 |
| Number of meshed coil regions in device. | |
| integer(i4) | ncoils = 0 |
| Number of coils in device. | |
| integer(i4) | ncoils_ext = 0 |
| Number of external (non-meshed) coils in device. | |
| integer(i4) | ncond_eigs = 0 |
| Number of total fixed-shape current modes for conducting regions. | |
| integer(i4) | ncond_regs = 0 |
| Number of conducting regions. | |
| integer(i4) | ninner_limiter_nds = 0 |
| Needs docs. | |
| real(r8) | nl_tol = 1.d-8 |
| Tolerance for nonlinear solve. | |
| integer(i4) | nlim_con = 0 |
| Number of node points in limiter contour list. | |
| integer(i4) | nlimiter_nds = 0 |
| Number of grid nodes used as limiter points. | |
| integer(i4) | nlimiter_pts = 0 |
| Number of non-node limiter points. | |
| integer(i4) | nr0_ramp = 6 |
| Number of iterations for R0 ramp if R0 target is used. | |
| integer(i4), dimension(:), pointer | olbp => NULL() |
| Oriented list of boundary points. | |
| logical | plot_final = .TRUE. |
| Save solver result for plotting. | |
| logical | plot_step = .TRUE. |
| Save solver steps for plotting. | |
| class(oft_vector_ptr), dimension(:), pointer | psi_coil => NULL() |
| \( \psi \) for each coil | |
| class(oft_vector), pointer | psi_dt => NULL() |
| \( \psi \) at start of step for quasi-static calculations | |
| real(r8), dimension(:), pointer | rcoils => NULL() |
| Lumped resistance [Ohms] of each coil (negative for Icoils) | |
| type(gs_region_info) | region_info |
| Region information for non-continuous conductors. | |
| real(r8), dimension(:,:), pointer | rlimiter_nds => NULL() |
| Location of limiter nodes. | |
| real(r8) | rmax = 0.d0 |
| Maximum radial coordinate in model. | |
| real(r8) | rmin = 0.d0 |
| Minimum radial coordinate in model. | |
| logical, dimension(:), pointer | saddle_cmask => NULL() |
| Cell mask for saddle search. | |
| logical, dimension(:), pointer | saddle_pmask => NULL() |
| Point mask for saddle search. | |
| logical, dimension(:), pointer | saddle_rmask => NULL() |
| Region mask for saddle search. | |
| logical | save_visit = .TRUE. |
| Save information for plotting? | |
| real(r8), dimension(2, 2) | spatial_bounds = RESHAPE([-1.d99,1.d99,-1.d99,1.d99], [2,2]) |
| Maximum R,Z extents of plasma. | |
| real(r8), dimension(4) | timing = 0.d0 |
| Timing for each phase of solve. | |
| real(r8) | urf = .2d0 |
| Under-relaxation factor for Picard iteration. | |
| type(xdmf_plot_file) | xdmf |
| XDMF plotting object. | |
| type(oft_blag_zerob), pointer | zerob_bc => NULL() |
| BC object for zeroing boundary nodes. | |
| type(oft_blag_zerogrnd), pointer | zerogrnd_bc => NULL() |
| BC object for zeroing grounding node(s) | |
| procedure delete | ( | class(gs_factory), intent(inout) | self | ) |
Destory G-S object.
| [in,out] | self | G-S object |
| procedure init | ( | class(gs_factory), intent(inout) | self | ) |
Build operators and allocate storage.
| [in,out] | self | G-S object |
| procedure init_psi | ( | class(gs_factory), intent(inout) | self, |
| class(gs_equil), intent(inout) | equil, | ||
| integer(4), intent(out) | ierr, | ||
| real(8), dimension(2), intent(in), optional | r0, | ||
| real(8), intent(in), optional | a, | ||
| real(8), intent(in), optional | kappa, | ||
| real(8), intent(in), optional | delta, | ||
| real(8), dimension(:), intent(in), optional | curr_source | ||
| ) |
Initialize \( \psi \) using simple definition.
\( \psi \) can be initialized in one of four ways:
r0 < 0.0 is passed a uniform current across the entire plasma region is usedr0 and a, and optionally kappa and delta, are passed then a uniform current across a cross-section defined by those parameters is usedcurr_source is passed then the source defined by those values is usedIn all cases the solution is scaled to match the target Ip value
| [in,out] | self | G-S device/factory object |
| [in,out] | equil | G-S equilibrium object |
| [out] | ierr | Error flag |
| [in] | r0 | Center for cross-section initialization |
| [in] | a | Minor radius for cross-section initialization |
| [in] | kappa | Elongation for cross-section initialization |
| [in] | delta | Triangularity for cross-section initialization |
| [in] | curr_source | Explicit current source |
| procedure lin_solve | ( | class(gs_factory), intent(inout) | self, |
| class(gs_equil), intent(inout) | equil, | ||
| logical, intent(in) | adjust_r0, | ||
| integer(4), intent(out), optional | ierr | ||
| ) |
Solve linearized version of G-S system (fixed RHS)
| [in,out] | self | G-S factory/device object |
| [in,out] | equil | G-S equilibrium object |
| [in] | adjust_r0 | Needs docs |
| [out] | ierr | Error flag |
| procedure load_limiters | ( | class(gs_factory), intent(inout) | self | ) |
Load non-node limiter points.
| [in,out] | self | G-S object |
| procedure setup | ( | class(gs_factory), intent(inout) | self, |
| class(oft_ml_fem_type), intent(inout), target | ml_lag_2d | ||
| ) |
Setup G-S object from FE representation.
| [in,out] | self | G-S object |
| procedure solve | ( | class(gs_factory), intent(inout) | self, |
| class(gs_equil), intent(inout) | equil, | ||
| integer(4), intent(out), optional | ierr | ||
| ) |
Solve nonlinear G-S system.
| [in,out] | self | G-S factory/device object |
| [in,out] | equil | G-S equilibrium object |
| [out] | ierr | Error flag |
| procedure vac_solve | ( | class(gs_factory), intent(inout) | self, |
| class(gs_equil), intent(inout) | equil, | ||
| class(oft_vector), intent(inout) | psi_sol, | ||
| class(bfem_interp), intent(inout), optional | rhs_source, | ||
| integer(4), intent(out), optional | ierr | ||
| ) |
Solve vacuum field for given \( J_{\phi} \).
| [in,out] | self | G-S object |
| [in,out] | equil | Vacuum field |
| [in,out] | psi_sol | Input: BCs for \( \psi \), Output: solution |
| [in,out] | rhs_source | Specified current source (optional) |
| [out] | ierr | Error flag |
| class(oft_vector), pointer aug_vec => NULL() |
Augmented space (psi + coils) vector template.
| logical, dimension(:), pointer axis_flag => NULL() |
FE boundary flag for on-axis nodes.
| real(r8), dimension(:,:), pointer bc_bmat => NULL() |
Second part of free-boundary BC matrix.
| real(r8), dimension(:,:), pointer bc_lmat => NULL() |
First part of free-boundary BC matrix.
| integer(i4) bc_nrhs = 0 |
Number of terms in free-boundary BC.
| integer(i4), dimension(:), pointer bc_rhs_list => NULL() |
List of terms interacting with free-boundary BC.
| real(r8), dimension(:,:), pointer coil_bounds => NULL() |
Coil current bounds.
| character(len=oft_path_slen) coil_file = 'none' |
File containing coil definitions.
| type(oft_map), pointer coil_map => NULL() |
Coil vector map information.
| real(r8), dimension(:,:), pointer coil_nturns => NULL() |
Number of turns for each coil in each region.
| type(coil_region), dimension(:), pointer coil_regions => NULL() |
Meshed coil regions.
| type(oft_seam), pointer coil_stitch => NULL() |
Coil vector stitching information.
| real(r8), dimension(:), pointer coil_vcont => NULL() |
Virtual VSC definition as weighted sum of other coils.
| class(oft_vector), pointer coil_vec => NULL() |
Coil vector template.
| real(r8), dimension(:), pointer coils_dt => NULL() |
Coil currents at start of step for quasi-static calculations.
| type(axi_coil_set), dimension(:), pointer coils_ext => NULL() |
External coil definitions.
| real(r8), dimension(:), pointer coils_volt => NULL() |
Coil voltages for (valid for Vcoils only)
| logical compute_chi = .FALSE. |
Compute toroidal field potential?
| type(cond_region), dimension(:), pointer cond_regions => NULL() |
Meshed conducting regions.
| real(r8), dimension(:), pointer cond_weights => NULL() |
Needs docs.
| class(oft_matrix), pointer dels => NULL() |
\( \frac{1}{R} \Delta^* \) matrix
| class(oft_matrix), pointer dels_dt => NULL() |
LHS matrix with time dependence.
| class(oft_matrix), pointer dels_full => NULL() |
\( \frac{1}{R} \Delta^* \) matrix with no BC
| logical dipole_mode = .FALSE. |
Include modifications for Dipole geometry.
| type(oft_1d_real), dimension(:), pointer dist_coil => NULL() |
Current distribution for each coil (if defined)
| real(r8) dt = -1.d0 |
Timestep size for time-dependent and quasi-static solves.
| real(r8) dt_last = -1.d0 |
Timestep size for current LHS matrix.
| class(oft_scalar_bfem), pointer fe_rep => NULL() |
Lagrange FE representation.
| logical free = .FALSE. |
Computing free-boundary equilibrium?
| logical full_domain = .FALSE. |
Solve across full domain (for Solov'ev test cases)
| type(oft_gs_zerob), pointer gs_zerob_bc => NULL() |
BC object for zeroing nodes outside plasma region.
| integer(i4) ierr = 0 |
Error flag from most recent solve.
| real(r8) isoflux_grad_wt_lim = -1.d0 |
Limit for isoflux inverse gradient weighting (negative to disable)
| real(r8), dimension(:,:), pointer lcoils => NULL() |
Coil mutual inductance matrix.
| real(r8) lim_area = -1.d0 |
Area inside the limiter.
| integer(i4), dimension(:), pointer lim_con => NULL() |
Limiter contour list (contains all limiters)
| integer(i4) lim_nloops = 0 |
Number of limiter loops.
| integer(i4), dimension(:), pointer lim_ptr => NULL() |
Pointer to start of each.
| real(r8) lim_zmax = 1.d99 |
Vertical position cutoff for limiter points.
| character(len=oft_path_slen) limiter_file = 'none' |
File non-node limiter points.
| integer(i4), dimension(:), pointer limiter_nds => NULL() |
List of limiter nodes.
| real(r8), dimension(:,:), pointer limiter_pts => NULL() |
Location of non-node limiter points.
| type(oft_lusolver) lu_solver |
\( \frac{1}{R} \Delta^* \) inverse solver
| type(oft_lusolver) lu_solver_dt |
LHS inverse solver with time dependence.
| integer(i4) maxits = 30 |
Maximum number of iterations for nonlinear solve.
| class(oft_bmesh), pointer mesh => NULL() |
Mesh.
| logical mirror_mode = .FALSE. |
Include modifications for Mirror/FRC geometry.
| type(oft_ml_fem_type), pointer ml_fe_rep => NULL() |
Multi-level Lagrange FE representation (only top level used)
| class(oft_matrix), pointer mop => NULL() |
Lagrange FE mass matrix.
| class(oft_matrix), pointer mop_axis => NULL() |
Lagrange FE mass matrix with Dirichlet BCs on axis.
| class(oft_matrix), pointer mrop => NULL() |
1/R-scaled Lagrange FE mass matrix
| integer(i4) ncoil_regs = 0 |
Number of meshed coil regions in device.
| integer(i4) ncoils = 0 |
Number of coils in device.
| integer(i4) ncoils_ext = 0 |
Number of external (non-meshed) coils in device.
| integer(i4) ncond_eigs = 0 |
Number of total fixed-shape current modes for conducting regions.
| integer(i4) ncond_regs = 0 |
Number of conducting regions.
| integer(i4) ninner_limiter_nds = 0 |
Needs docs.
| real(r8) nl_tol = 1.d-8 |
Tolerance for nonlinear solve.
| integer(i4) nlim_con = 0 |
Number of node points in limiter contour list.
| integer(i4) nlimiter_nds = 0 |
Number of grid nodes used as limiter points.
| integer(i4) nlimiter_pts = 0 |
Number of non-node limiter points.
| integer(i4) nr0_ramp = 6 |
Number of iterations for R0 ramp if R0 target is used.
| integer(i4), dimension(:), pointer olbp => NULL() |
Oriented list of boundary points.
| logical plot_final = .TRUE. |
Save solver result for plotting.
| logical plot_step = .TRUE. |
Save solver steps for plotting.
| class(oft_vector_ptr), dimension(:), pointer psi_coil => NULL() |
\( \psi \) for each coil
| class(oft_vector), pointer psi_dt => NULL() |
\( \psi \) at start of step for quasi-static calculations
| real(r8), dimension(:), pointer rcoils => NULL() |
Lumped resistance [Ohms] of each coil (negative for Icoils)
| type(gs_region_info) region_info |
Region information for non-continuous conductors.
| real(r8), dimension(:,:), pointer rlimiter_nds => NULL() |
Location of limiter nodes.
| real(r8) rmax = 0.d0 |
Maximum radial coordinate in model.
| real(r8) rmin = 0.d0 |
Minimum radial coordinate in model.
| logical, dimension(:), pointer saddle_cmask => NULL() |
Cell mask for saddle search.
| logical, dimension(:), pointer saddle_pmask => NULL() |
Point mask for saddle search.
| logical, dimension(:), pointer saddle_rmask => NULL() |
Region mask for saddle search.
| logical save_visit = .TRUE. |
Save information for plotting?
| real(r8), dimension(2,2) spatial_bounds = RESHAPE([-1.d99,1.d99,-1.d99,1.d99], [2,2]) |
Maximum R,Z extents of plasma.
| real(r8), dimension(4) timing = 0.d0 |
Timing for each phase of solve.
| real(r8) urf = .2d0 |
Under-relaxation factor for Picard iteration.
| type(xdmf_plot_file) xdmf |
XDMF plotting object.
| type(oft_blag_zerob), pointer zerob_bc => NULL() |
BC object for zeroing boundary nodes.
| type(oft_blag_zerogrnd), pointer zerogrnd_bc => NULL() |
BC object for zeroing grounding node(s)