![]() |
The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
|
L2-projected poloidal gradient of F (dF/dR, dF/dZ); helper used by the C wrapper for output.
Combined MUG and TokaMaker time-dependent simulation object, which allows simultaneous evolution of plasma, solid, and flowing conductor regions
Public Member Functions | |
| procedure | delete (self) |
| Delete time-dependent simulation. | |
| procedure | plot (self) |
| Plot from rst files. | |
| procedure | setup (self, equil, dt, lin_tol, nl_tol, mhd_flag, dens_reg, visc_reg, eta_reg, incomp, toroidal_flow) |
| Setup time-dependent simulation. | |
| procedure | step (self, coil_currents, time, dt, nl_its, lin_its, nretry) |
| Take a timestep. | |
Public Attributes | |
| class(oft_vector), pointer | aug_vec => NULL() |
| Augmented vector template (fields + coil currents). | |
| integer(i4) | f0_node = 0 |
| Index of the first plasma_flag=.TRUE. DOF, used to evolve F0 (0 if none). | |
| real(r8) | f_scale_prev = 1.d0 |
| FF' scale (tkmrf_scale) from previous timestep. | |
| type(oft_fem_comp_type), pointer | fe_rep => NULL() |
| Finite element representation for solution fields (without coil currents). | |
| class(flux_func), pointer | i_prev => NULL() |
| FF' profile (gs_equilI) from previous timestep. | |
| type(oft_native_gmres_solver), pointer | mf_solver => NULL() |
| Outer linear solver. | |
| type(oft_mf_matrix), pointer | mfmat => NULL() |
| Matrix free Jacobian operator. | |
| type(oft_xmhd_2d_sim), pointer | mug => NULL() |
| MUG time-dependent simulation object. | |
| type(oft_nksolver) | nksolver |
| Newton-Krylov solver for time-advance. | |
| type(oft_mugtok_td_mfop), pointer | nlfun => NULL() |
| logical, dimension(:), allocatable | plasma_flag |
| True for DOFs in or on the border of region 1 (the plasma). | |
| logical | pm = .FALSE. |
| type(oft_lusolver), pointer | pre => NULL() |
| Preconditioner using approximate jacobian. | |
| class(oft_vector), pointer | rhs => NULL() |
| Temporary RHS vector. | |
| integer(i4) | rst_count = 0 |
| Completed-step counter (used as the restart-file index). | |
| integer(i4) | rst_freq = 1 |
| Restart-file output frequency (in steps). | |
| logical | save_rst = .FALSE. |
| If true, write restart files ('mugtok_NNNNN.rst') for plotting. | |
| type(oft_tmaker_td_mfop), pointer | tkmr => NULL() |
| TokaMaker time-dependent simulation object. | |
| class(oft_vector), pointer | tmp => NULL() |
| Temporary storage vector. | |
| class(oft_vector), pointer | u => NULL() |
| Current solution vector. | |
| procedure delete | ( | class(oft_mugtok_td), intent(inout) | self | ) |
Delete time-dependent simulation.
| [in,out] | self | NL operator object |
| procedure plot | ( | class(oft_mugtok_td), intent(inout) | self | ) |
Plot from rst files.
| Option | Description | Type [dim] |
|---|---|---|
| rst_start=0 | First restart-file index to read | int |
| rst_end=2000 | Last restart-file index to read | int |
| procedure setup | ( | class(oft_mugtok_td), intent(inout), target | self, |
| type(gs_equil), intent(inout), target | equil, | ||
| real(8), intent(in) | dt, | ||
| real(8), intent(in) | lin_tol, | ||
| real(8), intent(in) | nl_tol, | ||
| logical, dimension(:), intent(in) | mhd_flag, | ||
| real(8), dimension(:), intent(in) | dens_reg, | ||
| real(8), dimension(:), intent(in) | visc_reg, | ||
| real(8), dimension(:,:), intent(in), optional | eta_reg, | ||
| logical, intent(in), optional | incomp, | ||
| logical, intent(in), optional | toroidal_flow ) |
Setup time-dependent simulation.
| [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 |
| procedure step | ( | class(oft_mugtok_td), intent(inout), target | self, |
| real(r8), dimension(:), intent(in) | coil_currents, | ||
| real(8), intent(inout) | time, | ||
| real(8), intent(inout) | dt, | ||
| integer(4), intent(out) | nl_its, | ||
| integer(4), intent(out) | lin_its, | ||
| integer(4), intent(out) | nretry ) |
Take a timestep.
| [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 |
| class(oft_vector), pointer aug_vec => NULL() |
Augmented vector template (fields + coil currents).
| integer(i4) f0_node = 0 |
Index of the first plasma_flag=.TRUE. DOF, used to evolve F0 (0 if none).
| real(r8) f_scale_prev = 1.d0 |
FF' scale (tkmrf_scale) from previous timestep.
| type(oft_fem_comp_type), pointer fe_rep => NULL() |
Finite element representation for solution fields (without coil currents).
| type(oft_native_gmres_solver), pointer mf_solver => NULL() |
Outer linear solver.
| type(oft_mf_matrix), pointer mfmat => NULL() |
Matrix free Jacobian operator.
| type(oft_xmhd_2d_sim), pointer mug => NULL() |
MUG time-dependent simulation object.
| type(oft_nksolver) nksolver |
Newton-Krylov solver for time-advance.
| type(oft_mugtok_td_mfop), pointer nlfun => NULL() |
| logical, dimension(:), allocatable plasma_flag |
True for DOFs in or on the border of region 1 (the plasma).
| logical pm = .FALSE. |
| type(oft_lusolver), pointer pre => NULL() |
Preconditioner using approximate jacobian.
| class(oft_vector), pointer rhs => NULL() |
Temporary RHS vector.
| integer(i4) rst_count = 0 |
Completed-step counter (used as the restart-file index).
| integer(i4) rst_freq = 1 |
Restart-file output frequency (in steps).
| logical save_rst = .FALSE. |
If true, write restart files ('mugtok_NNNNN.rst') for plotting.
| type(oft_tmaker_td_mfop), pointer tkmr => NULL() |
TokaMaker time-dependent simulation object.
| class(oft_vector), pointer tmp => NULL() |
Temporary storage vector.
| class(oft_vector), pointer u => NULL() |
Current solution vector.