Appearance
adam_nasto_eos_object
ADAM, NASTO Equations Of State (EOS) class definition, CPU backend.
Source: src/app/nasto/common/adam_nasto_eos_object.F90
Dependencies
Contents
- nasto_eos_object
- nasto_eos_object
- compute_derivate
- destroy
- initialize
- load_from_file
- save_into_file
- nasto_physics_assign_nasto_physics
- conservative2primitive
- description
- primitive2conservative
- density
- internal_energy
- pressure
- speed_of_sound
- temperature
- total_energy
- total_entalpy
- ic_density
- ic_internal_energy
- ic_pressure
- ic_speed_of_sound
- ic_temperature
- ic_total_energy
- ic_total_entalpy
- nasto_eos_instance
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=15) | parameter | INI file section name containing fluid eos. |
Derived Types
nasto_eos_object
NASTO Equations Of State (EOS, ideal, compressible fluid) class definition.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_object) | MPI handler. | |
cp | real(kind=R8P) | Specific heat at constant pressure cp. | |
cv | real(kind=R8P) | Specific heat at constant volume cv. | |
g | real(kind=R8P) | Specific heats ratio gamma = cp / cv. | |
R | real(kind=R8P) | Fluid constant R = cp - cv. | |
gm1 | real(kind=R8P) | gamma - 1. | |
gp1 | real(kind=R8P) | gamma + 1. | |
delta | real(kind=R8P) | (gamma - 1) / 2. | |
eta | real(kind=R8P) | 2 * gamma / (gamma - 1). | |
mu | real(kind=R8P) | Dynamic viscosity. | |
kd | real(kind=R8P) | Thermal diffusivity. | |
dha | real(kind=R8P) | Entalpy formation. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
compute_derivate | pass(self) | Compute derivate quantities (from cp and cv). |
conservative2primitive | pass(self) | Return primitive variables from conservative ones. |
description | pass(self) | Return pretty-printed object description. |
destroy | pass(self) | Destroy physics. |
initialize | pass(self) | initialize physics. |
load_from_file | pass(self) | Load from finer file. |
primitive2conservative | pass(self) | Return conservative variables from primitive ones. |
save_into_file | pass(self) | Save into finer file. |
density | pass(self) | Return density. |
internal_energy | pass(self) | Return specific internal energy. |
pressure | pass(self) | Return pressure. |
speed_of_sound | pass(self) | Return speed of sound. |
temperature | pass(self) | Return temperature. |
total_energy | pass(self) | Return total specific energy. |
total_entalpy | pass(self) | Return total specific entalpy. |
assignment(=) | Overload =. | |
nasto_physics_assign_nasto_physics | pass(lhs) | Operator =. |
Interfaces
nasto_eos_object
Overload nasto_eos_object name with its constructor.
Module procedures: nasto_eos_instance
Subroutines
compute_derivate
Compute derivate quantities (from cp and cv).
Attributes: elemental
fortran
subroutine compute_derivate(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | inout | Fluid physics. |
Call graph
destroy
Destroy physics.
Attributes: elemental
fortran
subroutine destroy(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | inout | Fluid physics. |
Call graph
initialize
Initialize fluid physics.
fortran
subroutine initialize(self, physics, mu, kd, dha, cp, cv, gam, R)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | inout | Fluid physics. | |
physics | type(nasto_eos_object) | in | optional | Fluid physics. |
mu | real(kind=R8P) | in | optional | Dynamic viscosity. |
kd | real(kind=R8P) | in | optional | Thermal diffusivity. |
dha | real(kind=R8P) | in | optional | Entalpy formation. |
cp | real(kind=R8P) | in | optional | Specific heat at constant pressure cp value. |
cv | real(kind=R8P) | in | optional | Specific heat at constant volume cv value. |
gam | real(kind=R8P) | in | optional | Specific heats ratio gamma=cp/cv value. |
R | real(kind=R8P) | in | optional | Fluid constant R=cp-cv value. |
Call graph
load_from_file
Load from file.
fortran
subroutine load_from_file(self, file_parameters, s, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | inout | Fluid physics. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
s | integer(kind=I4P) | in | Fluid specie number. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
save_into_file
Save into file.
fortran
subroutine save_into_file(self, file_parameters, s)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | inout | Free conditions. | |
file_parameters | type(file_ini) | inout | Simulation parameters ini file handler. | |
s | integer(kind=I4P) | in | Fluid specie number. |
Call graph
nasto_physics_assign_nasto_physics
Operator =.
Attributes: pure
fortran
subroutine nasto_physics_assign_nasto_physics(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(nasto_eos_object) | inout | Left hand side. | |
rhs | type(nasto_eos_object) | in | Right hand side. |
Functions
conservative2primitive
Return primitive variables (r, u, v, w, p) from conservative variables (r, ru, rv, rw, rE).
Attributes: pure
Returns: real(kind=R8P)
fortran
function conservative2primitive(self, conservative) result(primitive)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
conservative | real(kind=R8P) | in | Conservative variables |
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self, prefix) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
prefix | character(len=*) | in | optional | Prefixing string. |
Call graph
primitive2conservative
Return conservative variables (r, ru, rv, rw, rE) from primitive variables (r, u, v, w, p).
Attributes: pure
Returns: real(kind=R8P)
fortran
function primitive2conservative(self, primitive) result(conservative)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
primitive | real(kind=R8P) | in | Primitive variables |
Call graph
density
Return density.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function density(self, pressure, speed_of_sound) result(density_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
pressure | real(kind=R8P) | in | Pressure value. | |
speed_of_sound | real(kind=R8P) | in | Speed of sound value. |
Call graph
internal_energy
Return specific internal energy.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function internal_energy(self, density, pressure) result(energy_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. |
Call graph
pressure
Return pressure.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function pressure(self, density, energy) result(pressure_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
density | real(kind=R8P) | in | Density value. | |
energy | real(kind=R8P) | in | Specific internal energy value. |
Call graph
speed_of_sound
Return speed of sound.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function speed_of_sound(self, density, pressure) result(speed_of_sound_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. |
Call graph
temperature
Return temperature.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function temperature(self, density, pressure) result(temperature_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. |
Call graph
total_energy
Return total specific energy.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function total_energy(self, density, pressure, velocity_sq_norm) result(energy_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. | |
velocity_sq_norm | real(kind=R8P) | in | Velocity vector square norm ||velocity||^2. |
Call graph
total_entalpy
Return total specific entalpy.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function total_entalpy(self, density, pressure, velocity_sq_norm) result(entalpy_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_eos_object) | in | Fluid physics. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. | |
velocity_sq_norm | real(kind=R8P) | in | Velocity vector square norm ||velocity||^2. |
Call graph
ic_density
Return density for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_density(g, pressure, speed_of_sound) result(density_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
g | real(kind=R8P) | in | Specific heats ratio. | |
pressure | real(kind=R8P) | in | Pressure value. | |
speed_of_sound | real(kind=R8P) | in | Speed of sound value. |
Call graph
ic_internal_energy
Return specific internal energy for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_internal_energy(gm1, density, pressure) result(energy_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
gm1 | real(kind=R8P) | in | Specific heats ratio minus 1. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. |
Call graph
ic_pressure
Return pressure for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_pressure(gm1, density, energy) result(pressure_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
gm1 | real(kind=R8P) | in | Specific heats ratio minus 1. | |
density | real(kind=R8P) | in | Density value. | |
energy | real(kind=R8P) | in | Specific internal energy value. |
Call graph
ic_speed_of_sound
Return speed of sound for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_speed_of_sound(g, density, pressure) result(speed_of_sound_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
g | real(kind=R8P) | in | Specific heats ratio. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. |
Call graph
ic_temperature
Return temperature for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_temperature(R, density, pressure) result(temperature_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
R | real(kind=R8P) | in | Fluid constant. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. |
Call graph
ic_total_energy
Return total specific energy for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_total_energy(gm1, density, pressure, velocity_sq_norm) result(energy_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
gm1 | real(kind=R8P) | in | Specific heats ratio minus 1. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. | |
velocity_sq_norm | real(kind=R8P) | in | Velocity vector square norm ||velocity||^2. |
Call graph
ic_total_entalpy
Return total specific entalpy for ideal compressible fluid.
Attributes: elemental
Returns: real(kind=R8P)
fortran
function ic_total_entalpy(g, density, pressure, velocity_sq_norm) result(entalpy_)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
g | real(kind=R8P) | in | Specific heats ratio. | |
density | real(kind=R8P) | in | Density value. | |
pressure | real(kind=R8P) | in | Pressure value. | |
velocity_sq_norm | real(kind=R8P) | in | Velocity vector square norm ||velocity||^2. |
Call graph
nasto_eos_instance
Return and instance of nasto_eos_object.
@note This procedure is used for overloading nasto_eos_object name.
Attributes: elemental
Returns: type(nasto_eos_object)
fortran
function nasto_eos_instance(mu, kd, dha, cp, cv, gam, R) result(instance)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
mu | real(kind=R8P) | in | Dynamic viscosity. | |
kd | real(kind=R8P) | in | Thermal diffusivity. | |
dha | real(kind=R8P) | in | Entalpy formation. | |
cp | real(kind=R8P) | in | optional | Specific heat at constant pressure cp value. |
cv | real(kind=R8P) | in | optional | Specific heat at constant volume cv value. |
gam | real(kind=R8P) | in | optional | Specific heats ratio gamma=cp/cv value. |
R | real(kind=R8P) | in | optional | Fluid constant R=cp-cv value. |
Call graph