Skip to content

adam_flume_mhd_object ​

ADAM, FLUME MHD class definition: the [mhd] section.

Loaded only when [physics].(physical_model) = mhd-ideal (issue #41, section 6.2). divergence_control selects the model variant, hence the state width: glm (mixed GLM cleaning, nv = 9) or none (nv = 8). The GLM keys are required with glm only: glm_ch is the constant, uniform cleaning speed; the damping is c_h^2 / c_p^2 = glm_alpha c_h / L, L = glm_damping_length, a positive length or min-cell (the minimum cell spacing of the realm over the active directions, Mignone & Tzeferacos 2010; set by set_glm_damping once the grid exists, issue #41, section 3.5); glm_ch_check decides what happens when the fastest wave outruns c_h (warning or error). divb_tol arms the div(B) monitor (0 disables it) and divb_error makes an exceeded tolerance fatal. rho_floor and p_floor are the positivity floors (0 disables them).

Source: src/app/flume/common/adam_flume_mhd_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=3)parameterINI (config) file section name containing MHD configs.

Derived Types ​

flume_mhd_object ​

FLUME MHD class definition.

Components ​

NameTypeAttributesDescription
divergence_controlcharacter(len=:)allocatableDivergence control: glm or none.
has_glmlogicalGLM cleaning active (host-side flag only).
glm_chreal(kind=R8P)GLM cleaning speed (constant, uniform).
glm_alphareal(kind=R8P)GLM damping parameter.
glm_damping_lengthreal(kind=R8P)GLM damping length (min-cell: set by set_glm_damping).
glm_damping_min_celllogicalThe damping length is the minimum cell spacing.
glm_dampingreal(kind=R8P)Damping rate c_h^2 / c_p^2 (set by set_glm_damping).
glm_ch_checkcharacter(len=:)allocatableAction when the fastest wave outruns c_h.
divb_tolreal(kind=R8P)div(B) monitor tolerance (0: disabled).
divb_errorlogicalStop when the div(B) tolerance is exceeded.
rho_floorreal(kind=R8P)Density floor (0: disabled).
p_floorreal(kind=R8P)Pressure floor (0: disabled).

Type-Bound Procedures ​

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize MHD configs.
load_from_filepass(self)Load config from file.
set_glm_dampingpass(self)Set the damping length (min-cell) and the damping rate.

Subroutines ​

initialize ​

Initialize MHD configs.

fortran
subroutine initialize(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_mhd_object)inoutMHD configs.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

load_from_file ​

Load config from file; every key in use is required and an unknown or out-of-range value is fatal.

fortran
subroutine load_from_file(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_mhd_object)inoutMHD configs.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

set_glm_damping ​

Set the damping length (with min-cell, the minimum cell spacing of the realm) and the damping rate c_h^2 / c_p^2 = glm_alpha c_h / L (issue #41, section 3.5); a no-op without GLM.

fortran
subroutine set_glm_damping(self, min_cell)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_mhd_object)inoutMHD configs.
min_cellreal(kind=R8P)inMinimum cell spacing of the realm (active directions).

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_mhd_object)inMHD configs.

Call graph