Skip to content

adam_flume_physics_object ​

ADAM, FLUME physics class definition.

The physical model is the ONE predicate that decides the state vector width nv (and nv_aux): the name arrays of the common object are built from the same predicate, so allocation and names cannot disagree. For mhd-ideal the predicate is (physical_model, [mhd].(divergence_control)) (issue #41, D-4): none gives MODEL_MHD (nv = 8), glm gives MODEL_MHD_GLM (nv = 9).

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

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=7)parameterINI (config) file section name containing physics configs.

Derived Types ​

flume_physics_object ​

FLUME physics class definition.

Components ​

NameTypeAttributesDescription
physical_modelcharacter(len=:)allocatablePhysical model.
modelinteger(kind=I4P)Physical model id (MODEL_*), the host controllers dispatch on it.
cpreal(kind=R8P)Specific heat at constant pressure.
cvreal(kind=R8P)Specific heat at constant volume.
gammareal(kind=R8P)Specific heats ratio, cp/cv.
Rreal(kind=R8P)Gas constant, cp-cv.
nvinteger(kind=I4P)Conservative variables number.
nv_auxinteger(kind=I4P)Auxiliary variables number.
mhdtype(flume_mhd_object)MHD configs ([mhd], loaded with mhd-ideal only).

Type-Bound Procedures ​

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize physics.
load_from_filepass(self)Load config from file.

Subroutines ​

initialize ​

Initialize physics.

fortran
subroutine initialize(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_physics_object)inoutPhysics.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

load_from_file ​

Load config from file; every key is required and an unknown or inconsistent value is fatal.

fortran
subroutine load_from_file(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_physics_object)inoutPhysics.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

primitive_state_to_conservative ​

Convert one primitive state (r, u, v, w, p [, bx, by, bz]) to the conservative variables of the model.

Initialisation only (IC regions, BC inflow states): the model branch is outside every kernel and hot loop.

Attributes: pure

fortran
subroutine primitive_state_to_conservative(model, gamma, prim, q)

Arguments

NameTypeIntentAttributesDescription
modelinteger(kind=I4P)inPhysical model id.
gammareal(kind=R8P)inSpecific heats ratio.
primreal(kind=R8P)inPrimitive state (first 5 used by Euler).
qreal(kind=R8P)outConservative variables [nv].

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_physics_object)inPhysics.

Call graph