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

Detailed Description

Main 2D MHD simulation object.

Public Member Functions

procedure rst_load (self, u, filename, path, t, dt)
 Load restart file.
procedure rst_save (self, u, t, dt, filename, path)
 Save restart file.
procedure run_lin_simulation (self)
 Run simulation in linear mode.
procedure run_simulation (self)
 Run simulation.
procedure setup (self, mg_mesh_in, order)
 Setup.
procedure setup_bc (self)
 Set default boundary conditions.

Public Attributes

real(r8), dimension(3) b_0 = 0.d0
 background, static magnetic field
logical, dimension(:), pointer, contiguous by_bc => NULL()
 by BC flag
real(r8chi = -1.d0
 thermal diffusivity
logical cyl_flag = .FALSE.
real(r8d_diff = -1.d0
 diffusivity
real(r8den_scale = 1.d19
 scale factor used to normalize density
real(r8dt = -1.d0
 timestep
real(r8eta
 electrical resistivity, in units of mu0
type(oft_fem_comp_type), pointer fe_rep => NULL()
 Finite element representation for solution field.
real(r8gamma = 2.d0/3.d0
 adiabatic index
integer(i4ittarget = 40
 Needs docs.
real(r8jac_dt = -1.d0
class(oft_matrix), pointer jacobian => NULL()
 approximate jacobian matrix
integer(i4), dimension(:,:), pointer, contiguous jacobian_block_mask => NULL()
 Matrix block mask.
real(r8k_boltz = elec_charge
 Boltzmann constant (use elec_charge for T in eV).
real(r8lin_tol = 1.d-8
 absolute tolerance for linear solver
logical linear = .FALSE.
real(r8m_i =proton_mass
 proton mass
type(oft_mf_matrix), pointer mf_mat => NULL()
 Matrix free operator.
logical mfnk = .FALSE.
 Use matrix free method?
type(xmhd_2d_mfun), pointer mfun => NULL()
 mass matrix function
logical, dimension(:), pointer, contiguous n_bc => NULL()
 n BC flag
real(r8nl_tol = 1.d-5
 absolute tolerance for nonlinear solver
type(xmhd_2d_nlfun), pointer nlfun => NULL()
 Nonlinear function.
integer(i4nsteps = -1
real(r8nu = -1.d0
 kinematic viscosity [m^2/2]
integer(i4pre_freq = 1
 frequency to update preconditioner
logical, dimension(:), pointer, contiguous psi_bc => NULL()
 psi BC flag
integer(i4rst_base = 0
 starting index of restart files
integer(i4rst_freq = 10
 frequency to generate restart files
real(r8t = 0.d0
 current time
logical, dimension(:), pointer, contiguous t_bc => NULL()
 T BC flag.
logical timestep_cn = .FALSE.
class(oft_vector), pointer u => NULL()
 current solution vector
class(oft_vector), pointer u0 => NULL()
 equilibrium solution vector (used for linearization if linear = True)
logical, dimension(:), pointer, contiguous velx_bc => NULL()
 vel BC flag
logical, dimension(:), pointer, contiguous vely_bc => NULL()
 vel BC flag
logical, dimension(:), pointer, contiguous velz_bc => NULL()
 vel BC flag
type(xdmf_plot_filexdmf_plot
type(xml_nodexml_pre_def
 XML element for preconditioner definition.
type(xml_nodexml_root
 XML root element.

Member Function/Subroutine Documentation

◆ rst_load()

procedure rst_load ( class(oft_xmhd_2d_sim), intent(inout) self,
class(oft_vector), intent(inout), pointer u,
character(len=*), intent(in) filename,
character(len=*), intent(in) path,
real(r8), intent(out), optional t,
real(r8), intent(out), optional dt )

Load restart file.

Parameters
[in,out]uSolution to load
[in]filenameName of restart file
[in]pathPath to store solution vector in file
[out]tTime of loaded solution
[out]dtTimestep at loaded time

◆ rst_save()

procedure rst_save ( class(oft_xmhd_2d_sim), intent(inout) self,
class(oft_vector), intent(inout), pointer u,
real(r8), intent(in) t,
real(r8), intent(in) dt,
character(len=*), intent(in) filename,
character(len=*), intent(in) path )

Save restart file.

Parameters
[in,out]uSolution to save
[in]tCurrent solution time
[in]dtCurrent timestep
[in]filenameName of restart file
[in]pathPath to store solution vector in file

◆ run_lin_simulation()

procedure run_lin_simulation ( class(oft_xmhd_2d_sim), intent(inout), target self)

Run simulation in linear mode.

◆ run_simulation()

procedure run_simulation ( class(oft_xmhd_2d_sim), intent(inout), target self)

Run simulation.

◆ setup()

procedure setup ( class(oft_xmhd_2d_sim), intent(inout) self,
class(multigrid_mesh), intent(in), target mg_mesh_in,
integer(i4), intent(in) order )

Setup.

◆ setup_bc()

procedure setup_bc ( class(oft_xmhd_2d_sim), intent(inout) self)

Set default boundary conditions.

Member Data Documentation

◆ b_0

real (r8), dimension(3) b_0 = 0.d0

background, static magnetic field

◆ by_bc

logical, dimension(:), pointer, contiguous by_bc => NULL()

by BC flag

◆ chi

real(r8) chi = -1.d0

thermal diffusivity

◆ cyl_flag

logical cyl_flag = .FALSE.

◆ d_diff

real(r8) d_diff = -1.d0

diffusivity

◆ den_scale

real(r8) den_scale = 1.d19

scale factor used to normalize density

◆ dt

real(r8) dt = -1.d0

timestep

◆ eta

real(r8) eta

electrical resistivity, in units of mu0

◆ fe_rep

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

Finite element representation for solution field.

◆ gamma

real(r8) gamma = 2.d0/3.d0

adiabatic index

◆ ittarget

integer(i4) ittarget = 40

Needs docs.

◆ jac_dt

real(r8) jac_dt = -1.d0

◆ jacobian

class(oft_matrix), pointer jacobian => NULL()

approximate jacobian matrix

◆ jacobian_block_mask

integer(i4), dimension(:,:), pointer, contiguous jacobian_block_mask => NULL()

Matrix block mask.

◆ k_boltz

real(r8) k_boltz = elec_charge

Boltzmann constant (use elec_charge for T in eV).

◆ lin_tol

real(r8) lin_tol = 1.d-8

absolute tolerance for linear solver

◆ linear

logical linear = .FALSE.

◆ m_i

real(r8) m_i =proton_mass

proton mass

◆ mf_mat

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

Matrix free operator.

◆ mfnk

logical mfnk = .FALSE.

Use matrix free method?

◆ mfun

type(xmhd_2d_mfun), pointer mfun => NULL()

mass matrix function

◆ n_bc

logical, dimension(:), pointer, contiguous n_bc => NULL()

n BC flag

◆ nl_tol

real(r8) nl_tol = 1.d-5

absolute tolerance for nonlinear solver

◆ nlfun

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

Nonlinear function.

◆ nsteps

integer(i4) nsteps = -1

of timesteps

◆ nu

real(r8) nu = -1.d0

kinematic viscosity [m^2/2]

◆ pre_freq

integer(i4) pre_freq = 1

frequency to update preconditioner

◆ psi_bc

logical, dimension(:), pointer, contiguous psi_bc => NULL()

psi BC flag

◆ rst_base

integer(i4) rst_base = 0

starting index of restart files

◆ rst_freq

integer(i4) rst_freq = 10

frequency to generate restart files

◆ t

real(r8) t = 0.d0

current time

◆ t_bc

logical, dimension(:), pointer, contiguous t_bc => NULL()

T BC flag.

◆ timestep_cn

logical timestep_cn = .FALSE.

◆ u

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

current solution vector

◆ u0

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

equilibrium solution vector (used for linearization if linear = True)

◆ velx_bc

logical, dimension(:), pointer, contiguous velx_bc => NULL()

vel BC flag

◆ vely_bc

logical, dimension(:), pointer, contiguous vely_bc => NULL()

vel BC flag

◆ velz_bc

logical, dimension(:), pointer, contiguous velz_bc => NULL()

vel BC flag

◆ xdmf_plot

type(xdmf_plot_file) xdmf_plot

◆ xml_pre_def

type(xml_node) xml_pre_def

XML element for preconditioner definition.

◆ xml_root

type(xml_node) xml_root

XML root element.


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