![]() |
The Open FUSION Toolkit 26.6
An open-source framework for fusion and plasma science and engineering
|
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(r8) | chi = -1.d0 |
| thermal diffusivity | |
| logical | cyl_flag = .FALSE. |
| real(r8) | d_diff = -1.d0 |
| diffusivity | |
| real(r8) | den_scale = 1.d19 |
| scale factor used to normalize density | |
| real(r8) | dt = -1.d0 |
| timestep | |
| real(r8) | eta |
| electrical resistivity, in units of mu0 | |
| type(oft_fem_comp_type), pointer | fe_rep => NULL() |
| Finite element representation for solution field. | |
| real(r8) | gamma = 2.d0/3.d0 |
| adiabatic index | |
| integer(i4) | ittarget = 40 |
| Needs docs. | |
| real(r8) | jac_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(r8) | k_boltz = elec_charge |
| Boltzmann constant (use elec_charge for T in eV). | |
| real(r8) | lin_tol = 1.d-8 |
| absolute tolerance for linear solver | |
| logical | linear = .FALSE. |
| real(r8) | m_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(r8) | nl_tol = 1.d-5 |
| absolute tolerance for nonlinear solver | |
| type(xmhd_2d_nlfun), pointer | nlfun => NULL() |
| Nonlinear function. | |
| integer(i4) | nsteps = -1 |
| real(r8) | nu = -1.d0 |
| kinematic viscosity [m^2/2] | |
| integer(i4) | pre_freq = 1 |
| frequency to update preconditioner | |
| logical, dimension(:), pointer, contiguous | psi_bc => NULL() |
| psi BC flag | |
| integer(i4) | rst_base = 0 |
| starting index of restart files | |
| integer(i4) | rst_freq = 10 |
| frequency to generate restart files | |
| real(r8) | t = 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_file) | xdmf_plot |
| type(xml_node) | xml_pre_def |
| XML element for preconditioner definition. | |
| type(xml_node) | xml_root |
| XML root element. | |
| 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.
| [in,out] | u | Solution to load |
| [in] | filename | Name of restart file |
| [in] | path | Path to store solution vector in file |
| [out] | t | Time of loaded solution |
| [out] | dt | Timestep at loaded time |
| 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.
| [in,out] | u | Solution to save |
| [in] | t | Current solution time |
| [in] | dt | Current timestep |
| [in] | filename | Name of restart file |
| [in] | path | Path to store solution vector in file |
| procedure run_lin_simulation | ( | class(oft_xmhd_2d_sim), intent(inout), target | self | ) |
Run simulation in linear mode.
| procedure run_simulation | ( | class(oft_xmhd_2d_sim), intent(inout), target | self | ) |
Run simulation.
| 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.
| procedure setup_bc | ( | class(oft_xmhd_2d_sim), intent(inout) | self | ) |
Set default boundary conditions.
| real (r8), dimension(3) b_0 = 0.d0 |
background, static magnetic field
| logical, dimension(:), pointer, contiguous by_bc => NULL() |
by BC flag
| real(r8) chi = -1.d0 |
thermal diffusivity
| logical cyl_flag = .FALSE. |
| real(r8) d_diff = -1.d0 |
diffusivity
| real(r8) den_scale = 1.d19 |
scale factor used to normalize density
| real(r8) dt = -1.d0 |
timestep
| real(r8) eta |
electrical resistivity, in units of mu0
| type(oft_fem_comp_type), pointer fe_rep => NULL() |
Finite element representation for solution field.
| real(r8) gamma = 2.d0/3.d0 |
adiabatic index
| integer(i4) ittarget = 40 |
Needs docs.
| real(r8) jac_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(r8) k_boltz = elec_charge |
Boltzmann constant (use elec_charge for T in eV).
| real(r8) lin_tol = 1.d-8 |
absolute tolerance for linear solver
| logical linear = .FALSE. |
| real(r8) m_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(r8) nl_tol = 1.d-5 |
absolute tolerance for nonlinear solver
| type(xmhd_2d_nlfun), pointer nlfun => NULL() |
Nonlinear function.
| integer(i4) nsteps = -1 |
| real(r8) nu = -1.d0 |
kinematic viscosity [m^2/2]
| integer(i4) pre_freq = 1 |
frequency to update preconditioner
| logical, dimension(:), pointer, contiguous psi_bc => NULL() |
psi BC flag
| integer(i4) rst_base = 0 |
starting index of restart files
| integer(i4) rst_freq = 10 |
frequency to generate restart files
| real(r8) t = 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_file) xdmf_plot |
| type(xml_node) xml_pre_def |
XML element for preconditioner definition.
| type(xml_node) xml_root |
XML root element.