Appearance
adam_flume_dissipation_object
ADAM, FLUME dissipative coefficients: viscosity, heat conduction, Ohmic resistivity (issue #65, M4).
The coefficients are read from [physics], each either as a coefficient or as the dimensionless number it stands for (issue #49, N4, section 4.5); giving two keys of a term is fatal, giving none leaves the term off (ideal):
| term | coefficient (code units) | number | coefficient from the number |
|---|---|---|---|
| viscosity | viscosity (dynamic, mu) | reynolds | mu = 1 / Re |
| heat conduction | conductivity (k) | prandtl | k = mu cp / Pr |
| Ohmic resistivity (MHD) | resistivity (magnetic diffusivity eta) | magnetic_reynolds, lundquist | 1 / Rm, 1 / S |
In code units the references are 1, so a number is the reciprocal coefficient. The [reference] layer converts the dimensional coefficients (mu: length x velocity x density; k the same divided by the gas constant; eta: length x velocity) and leaves the numbers as they are; lundquist needs its Alfvenic preset (the velocity unit is then the Alfven speed and S is Rm). The heat flux is -k grad T with T = p / (rho R).
viscosity_law = power-law makes the viscosity depend on the temperature, mu (T / reference_temperature) ** viscosity_exponent; viscosity_law = sutherland is Sutherland's law, mu (T / T_ref)^(3/2) (T_ref + S) / (T + S) with S = sutherland_temperature (110.4 K for air), a temperature in the units of reference_temperature (both converted by the [reference] layer); with [physics] temperature_unit_kelvin it may be omitted, and is then 110.4 K (Sutherland's constant of air) in code units. With prandtl the conductivity follows either law, k = mu(T) cp / Pr.
The viscous and heat-conduction kernels landed in issue #65 P2 (Euler), the MHD ones land in P3: until then a non-zero coefficient with an MHD model is refused at initialisation by the common object, so no coefficient is ever ignored silently.
Source: src/app/flume/common/adam_flume_dissipation_object.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=7) | parameter | INI section of the coefficients. |
VISCOSITY_LAW_CONSTANT | character(len=8) | parameter | [physics].(viscosity_law): constant mu. |
VISCOSITY_LAW_POWER | character(len=9) | parameter | [physics].(viscosity_law): mu (T / T_ref)^omega. |
VISCOSITY_LAW_SUTHERLAND | character(len=10) | parameter | [physics].(viscosity_law): Sutherland's law. |
SUTHERLAND_AIR_KELVIN | real(kind=R8P) | parameter | Sutherland's constant of air [K]. |
Derived Types
flume_dissipation_object
FLUME dissipative coefficients, code units.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mu | real(kind=R8P) | Dynamic viscosity (at the reference temperature). | |
k | real(kind=R8P) | Thermal conductivity (with Prandtl: at mu). | |
eta | real(kind=R8P) | Magnetic diffusivity (Ohmic resistivity). | |
prandtl | real(kind=R8P) | Prandtl number, 0 when k is given directly. | |
viscosity_law | character(len=:) | allocatable | Viscosity law: constant, power-law or sutherland. |
viscosity_exponent | real(kind=R8P) | Power-law exponent omega. | |
reference_temperature | real(kind=R8P) | Reference temperature of the power or Sutherland law. | |
sutherland_temperature | real(kind=R8P) | Sutherland's constant S. | |
has_viscosity | logical | mu > 0. | |
has_conduction | logical | k > 0. | |
has_resistivity | logical | eta > 0. | |
is_active | logical | Any term on. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
laws | pass(self) | Return the temperature laws of the kernels. |
load_from_file | pass(self) | Load the coefficients from file. |
Subroutines
laws
Return the temperature laws as the kernels take them (temperature_law of adam_flume_dissipation_library), mu = mu0 L(T, omega_mu), k = k0 L(T, omega_k), L = (T / tref)^omega, times (tref + suth) / (T + suth) when suth > 0: the constant law is tref = 1 with zero exponents, Sutherland's omega = 3/2 with suth = S; under either law the conductivity follows the viscosity only when it comes from the Prandtl number.
Attributes: pure
fortran
subroutine laws(self, tref, suth, omega_mu, omega_k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_dissipation_object) | in | Dissipation. | |
tref | real(kind=R8P) | out | Reference temperature. | |
suth | real(kind=R8P) | out | Reference temperature. | |
omega_mu | real(kind=R8P) | out | Exponents. | |
omega_k | real(kind=R8P) | out | Exponents. |
Call graph
load_from_file
Load the coefficients: a coefficient or its number per term (two keys of a term are fatal, none is the ideal 0).
fortran
subroutine load_from_file(self, file_parameters, model, cp, kelvin)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_dissipation_object) | inout | Dissipation. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
model | integer(kind=I4P) | in | Physical model id. | |
cp | real(kind=R8P) | in | Specific heat at constant pressure, code units. | |
kelvin | real(kind=R8P) | in | Kelvin per code temperature unit, 0 if not given. |
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_dissipation_object) | in | Dissipation. |
Call graph