Appearance
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
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=7) | parameter | INI (config) file section name containing physics configs. |
Derived Types
flume_physics_object
FLUME physics class definition.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
physical_model | character(len=:) | allocatable | Physical model. |
model | integer(kind=I4P) | Physical model id (MODEL_*), the host controllers dispatch on it. | |
cp | real(kind=R8P) | Specific heat at constant pressure. | |
cv | real(kind=R8P) | Specific heat at constant volume. | |
gamma | real(kind=R8P) | Specific heats ratio, cp/cv. | |
R | real(kind=R8P) | Gas constant, cp-cv. | |
nv | integer(kind=I4P) | Conservative variables number. | |
nv_aux | integer(kind=I4P) | Auxiliary variables number. | |
mhd | type(flume_mhd_object) | MHD configs ([mhd], loaded with mhd-ideal only). |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize physics. |
load_from_file | pass(self) | Load config from file. |
Subroutines
initialize
Initialize physics.
fortran
subroutine initialize(self, file_parameters)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_physics_object) | inout | Physics. | |
file_parameters | type(file_ini) | in | Simulation 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_physics_object) | inout | Physics. | |
file_parameters | type(file_ini) | in | Simulation 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
model | integer(kind=I4P) | in | Physical model id. | |
gamma | real(kind=R8P) | in | Specific heats ratio. | |
prim | real(kind=R8P) | in | Primitive state (first 5 used by Euler). | |
q | real(kind=R8P) | out | Conservative variables [nv]. |
Call graph
Functions
description
Return a pretty-formatted object description.
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_physics_object) | in | Physics. |
Call graph