![]() |
The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
|
Data Types | |
| type | oft_mugtok_td |
| L2-projected poloidal gradient of F (dF/dR, dF/dZ); helper used by the C wrapper for output. More... | |
| type | oft_mugtok_td_mfop |
| Combined MUG and TokaMaker time-advance operator. More... | |
Functions/Subroutines | |
| subroutine | add_f_jac (self, mat) |
| Add approximate Jacobian entries corresponding to add_f_terms 1) F resistive-diffusion Jacobian in solid conductor (and vacuum) regions 2) An approximate F0/F0 diagonal = integral over the plasma region of dA/R (no profile effects). 3) The plasma-DOF constraint rows F(ind) - F0. | |
| subroutine | add_f_terms (self, a, b, dt) |
| subroutine | apply_rhs_mugtok (self, a, b) |
| subroutine | build_mugtok_td_jacobian (self, mat, a, update_vac) |
| subroutine | build_psi_vac (self, coil_currents) |
| Compute vacuum psi from a set of coil currents, for use in MUG. | |
| subroutine, public | compute_gradf (self, gradf_r, gradf_z) |
| Compute the projected poloidal gradient of F (for poloidal current calculation). | |
| subroutine | delete_mfop (self) |
| subroutine | delete_mugtok_td (self) |
| subroutine | mugtok_mfnk_update (a) |
| subroutine | mugtok_rst_save (self, t) |
| Save the current solution (fields 1-7 of the augmented vector) to a restart file 'mugtok_NNNNN.rst', indexed by the step counter. | |
| subroutine | mugtok_td_plot (self) |
| Plot saved restart states to XDMF/HDF5 output Runtime options are set in the main input file using the group mugtok_plot_options. Option group: mugtok_plot_options. | |
| subroutine | nlfun_apply (self, a, b) |
| subroutine | setup_mugtok_td (self, equil, dt, lin_tol, nl_tol, mhd_flag, dens_reg, visc_reg, eta_reg, incomp, toroidal_flow) |
| Setup combined MUG and TokaMaker simulation object. | |
| subroutine | snapshot_f_profile (self) |
| Snapshot current FF' profile and f_scale into the sim's f_scale_prev / I_prev, so the next step's RHS pass of add_f_diff uses these previous-step values while the LHS uses whatever is set/computed for the next step. | |
| subroutine | step_mugtok_td (self, coil_currents, time, dt, nl_its, lin_its, nretry) |
| Take one timestep of the combined MUG and TokaMaker simulation. | |
Variables | |
| type(oft_mugtok_td), pointer | current_sim => NULL() |
| Current mug/tokamaker simulation object. | |
| class(oft_scalar_bfem), pointer | lag_rep => NULL() |
| Pointer to single field FE representation. | |
| class(oft_bmesh), pointer, public | mesh => NULL() |
| Pointer to FE mesh. | |
|
private |
Add approximate Jacobian entries corresponding to add_f_terms 1) F resistive-diffusion Jacobian in solid conductor (and vacuum) regions 2) An approximate F0/F0 diagonal = integral over the plasma region of dA/R (no profile effects). 3) The plasma-DOF constraint rows F(ind) - F0.
| [in,out] | self | simulation object |
| [in,out] | mat | Matrix to add entries to |
|
private |
| [in,out] | a | Source field |
| [in,out] | b | Result |
| [in] | dt | Timestep (0 for the RHS) |
|
private |
| [in,out] | self | Time-advance operator |
| [in,out] | a | Source field |
| [in,out] | b | Result of metric function |
|
private |
| [in,out] | self | Simulation object |
| [in,out] | mat | Jacobian matrix to populate |
| [in,out] | a | Solution for computing Jacobian |
| [in] | update_vac | Whether to update the vacuum psi operator (default: true) |
|
private |
Compute vacuum psi from a set of coil currents, for use in MUG.
| [in,out] | self | Simulation object |
| [in] | coil_currents | Coil currents (size ncoils) |
| subroutine, public compute_gradf | ( | class(oft_mugtok_td), intent(inout) | self, |
| real(r8), dimension(:), intent(inout) | gradf_r, | ||
| real(r8), dimension(:), intent(inout) | gradf_z ) |
Compute the projected poloidal gradient of F (for poloidal current calculation).
| [in,out] | gradf_r | dF/dR at nodes (length lag_repne) |
| [in,out] | gradf_z | dF/dZ at nodes (length lag_repne) |
|
private |
| [in,out] | self | Time-advance operator |
|
private |
| [in,out] | self | NL operator object |
|
private |
| [in,out] | a | Current solution vector |
|
private |
Save the current solution (fields 1-7 of the augmented vector) to a restart file 'mugtok_NNNNN.rst', indexed by the step counter.
| [in] | t | Current solution time |
|
private |
Plot saved restart states to XDMF/HDF5 output Runtime options are set in the main input file using the group mugtok_plot_options. Option group: mugtok_plot_options.
| Option | Description | Type [dim] |
|---|---|---|
| rst_start=0 | First restart-file index to read | int |
| rst_end=2000 | Last restart-file index to read | int |
|
private |
| [in,out] | self | Time-advance operator |
| [in,out] | a | Source field |
| [in,out] | b | Result of metric function |
|
private |
Setup combined MUG and TokaMaker simulation object.
| [in,out] | self | Simulation object to be setup |
| [in,out] | equil | Tokamaker equilibrium object |
| [in] | dt | Desired timestep [s] |
| [in] | lin_tol | Linear solver tolerance |
| [in] | nl_tol | Non-linear solver tolerance |
| [in] | mhd_flag | True for regions where MHD should be used, false for TokaMaker |
| [in] | dens_reg | Density [kg/m^3] in each region [unused where mhd_flag is false] |
| [in] | visc_reg | Viscosity [m^2/s] in each region [unused where mhd_flag is false] |
| [in] | eta_reg | Electrical resistivity [in plane, out of plane], in units of mu0, in each region. Defaults to TokaMaker region resistivites |
| [in] | incomp | If true, use incompressible MHD model (false currently not supported) |
| [in] | toroidal_flow | Allow toroidal (phi) flow in MHD regions |
|
private |
Snapshot current FF' profile and f_scale into the sim's f_scale_prev / I_prev, so the next step's RHS pass of add_f_diff uses these previous-step values while the LHS uses whatever is set/computed for the next step.
| [in,out] | self | Simulation object |
|
private |
Take one timestep of the combined MUG and TokaMaker simulation.
| [in,out] | self | Simulation object |
| [in] | coil_currents | Prescribed I-coil currents for this step (size ncoils) |
| [in,out] | dt | Current time and desired timestep size [s] |
| [out] | nretry | Number of nonlinear and linear iterations, and number of retries |
| type(oft_mugtok_td), pointer current_sim => NULL() |
Current mug/tokamaker simulation object.
|
private |
Pointer to single field FE representation.
| class(oft_bmesh), pointer, public mesh => NULL() |
Pointer to FE mesh.