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; with prandtl the conductivity follows it, 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. |
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 or power-law. |
viscosity_exponent | real(kind=R8P) | Power-law exponent omega. | |
reference_temperature | real(kind=R8P) | Power-law reference temperature. | |
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, mu = mu0 (T / tref)^omega_mu, k = k0 (T / tref)^omega_k: the constant law is tref = 1 with zero exponents; under the power law the conductivity follows the viscosity only when it comes from the Prandtl number.
Attributes: pure
fortran
subroutine laws(self, tref, omega_mu, omega_k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_dissipation_object) | in | Dissipation. | |
tref | 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)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. |
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