The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
Loading...
Searching...
No Matches
oft_mugtok_td Type Reference

Detailed Description

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.

Member Function/Subroutine Documentation

◆ delete()

procedure delete ( class(oft_mugtok_td), intent(inout) self)

Delete time-dependent simulation.

Parameters
[in,out]selfNL operator object

◆ plot()

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

◆ setup()

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.

Parameters
[in,out]selfSimulation object to be setup
[in,out]equilTokamaker equilibrium object
[in]dtDesired timestep [s]
[in]lin_tolLinear solver tolerance
[in]nl_tolNon-linear solver tolerance
[in]mhd_flagTrue for regions where MHD should be used, false for TokaMaker
[in]dens_regDensity [kg/m^3] in each region [unused where mhd_flag is false]
[in]visc_regViscosity [m^2/s] in each region [unused where mhd_flag is false]
[in]eta_regElectrical resistivity [in plane, out of plane], in units of mu0, in each region. Defaults to TokaMaker region resistivites
[in]incompIf true, use incompressible MHD model (false currently not supported)
[in]toroidal_flowAllow toroidal (phi) flow in MHD regions

◆ step()

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.

Parameters
[in,out]selfSimulation object
[in]coil_currentsPrescribed I-coil currents for this step (size ncoils)
[in,out]dtCurrent time and desired timestep size [s]
[out]nretryNumber of nonlinear and linear iterations, and number of retries

Member Data Documentation

◆ aug_vec

class(oft_vector), pointer aug_vec => NULL()

Augmented vector template (fields + coil currents).

◆ f0_node

integer(i4) f0_node = 0

Index of the first plasma_flag=.TRUE. DOF, used to evolve F0 (0 if none).

◆ f_scale_prev

real(r8) f_scale_prev = 1.d0

FF' scale (tkmrf_scale) from previous timestep.

◆ fe_rep

type(oft_fem_comp_type), pointer fe_rep => NULL()

Finite element representation for solution fields (without coil currents).

◆ i_prev

class(flux_func), pointer i_prev => NULL()

FF' profile (gs_equilI) from previous timestep.

◆ mf_solver

type(oft_native_gmres_solver), pointer mf_solver => NULL()

Outer linear solver.

◆ mfmat

type(oft_mf_matrix), pointer mfmat => NULL()

Matrix free Jacobian operator.

◆ mug

type(oft_xmhd_2d_sim), pointer mug => NULL()

MUG time-dependent simulation object.

◆ nksolver

type(oft_nksolver) nksolver

Newton-Krylov solver for time-advance.

◆ nlfun

type(oft_mugtok_td_mfop), pointer nlfun => NULL()

◆ plasma_flag

logical, dimension(:), allocatable plasma_flag

True for DOFs in or on the border of region 1 (the plasma).

◆ pm

logical pm = .FALSE.

◆ pre

type(oft_lusolver), pointer pre => NULL()

Preconditioner using approximate jacobian.

◆ rhs

class(oft_vector), pointer rhs => NULL()

Temporary RHS vector.

◆ rst_count

integer(i4) rst_count = 0

Completed-step counter (used as the restart-file index).

◆ rst_freq

integer(i4) rst_freq = 1

Restart-file output frequency (in steps).

◆ save_rst

logical save_rst = .FALSE.

If true, write restart files ('mugtok_NNNNN.rst') for plotting.

◆ tkmr

type(oft_tmaker_td_mfop), pointer tkmr => NULL()

TokaMaker time-dependent simulation object.

◆ tmp

class(oft_vector), pointer tmp => NULL()

Temporary storage vector.

◆ u

class(oft_vector), pointer u => NULL()

Current solution vector.


The documentation for this type was generated from the following file: