lib_He_thermo_m Module

Helium equation of state (Arp reference EOS) and transport properties.


Uses

  • module~~lib_he_thermo_m~~UsesGraph module~lib_he_thermo_m lib_He_thermo_m ieee_arithmetic ieee_arithmetic module~lib_he_thermo_m->ieee_arithmetic module~krn_global_tools_m krn_global_tools_m module~lib_he_thermo_m->module~krn_global_tools_m module~krn_simulation_m krn_simulation_m module~lib_he_thermo_m->module~krn_simulation_m module~lib_ext_math_m lib_ext_math_m module~lib_he_thermo_m->module~lib_ext_math_m module~krn_global_tools_m->ieee_arithmetic iso_c_binding iso_c_binding module~krn_global_tools_m->iso_c_binding iso_fortran_env iso_fortran_env module~krn_global_tools_m->iso_fortran_env module~krn_simulation_m->module~krn_global_tools_m fortran_yaml_c fortran_yaml_c module~krn_simulation_m->fortran_yaml_c module~lib_hdf_write_m lib_hdf_write_m module~krn_simulation_m->module~lib_hdf_write_m module~lib_input_m lib_input_m module~krn_simulation_m->module~lib_input_m module~lib_ext_math_m->module~krn_global_tools_m module~lib_hdf_write_m->module~krn_global_tools_m module~lib_hdf_write_m->iso_c_binding module~lib_hdf_write_m->module~lib_input_m h5ds h5ds module~lib_hdf_write_m->h5ds h5lt h5lt module~lib_hdf_write_m->h5lt hdf5 hdf5 module~lib_hdf_write_m->hdf5 module~lib_input_m->module~krn_global_tools_m module~lib_input_m->fortran_yaml_c module~lib_input_m->h5lt module~lib_input_m->hdf5

Used by

  • module~~lib_he_thermo_m~~UsedByGraph module~lib_he_thermo_m lib_He_thermo_m module~cmp_boundary_calc_m cmp_boundary_calc_m module~cmp_boundary_calc_m->module~lib_he_thermo_m module~cmp_boundary_init_m cmp_boundary_init_m module~cmp_boundary_calc_m->module~cmp_boundary_init_m module~cmp_boundary_init_m->module~lib_he_thermo_m module~cmp_channel_flux_m cmp_channel_flux_m module~cmp_channel_flux_m->module~lib_he_thermo_m module~cmp_channel_init_m cmp_channel_init_m module~cmp_channel_flux_m->module~cmp_channel_init_m module~cmp_channel_init_m->module~lib_he_thermo_m module~cmp_channel_source_terms_m cmp_channel_source_terms_m module~cmp_channel_source_terms_m->module~lib_he_thermo_m module~cmp_channel_source_terms_m->module~cmp_channel_init_m module~cmp_circulator_init_m cmp_circulator_init_m module~cmp_circulator_init_m->module~lib_he_thermo_m module~cmp_ffsrclink_calc_m cmp_FFsrcLink_calc_m module~cmp_ffsrclink_calc_m->module~lib_he_thermo_m module~cmp_junction_calc_m cmp_junction_calc_m module~cmp_junction_calc_m->module~lib_he_thermo_m module~cmp_junction_init_m cmp_junction_init_m module~cmp_junction_calc_m->module~cmp_junction_init_m module~cmp_junction_init_m->module~lib_he_thermo_m module~cmp_channel_calc_m cmp_channel_calc_m module~cmp_channel_calc_m->module~cmp_channel_init_m module~cmp_channel_calc_m->module~cmp_channel_source_terms_m module~cmp_circulator_calc_m cmp_circulator_calc_m module~cmp_circulator_calc_m->module~cmp_circulator_init_m program~reims_p reims_p program~reims_p->module~cmp_boundary_calc_m program~reims_p->module~cmp_channel_flux_m program~reims_p->module~cmp_ffsrclink_calc_m program~reims_p->module~cmp_junction_calc_m program~reims_p->module~cmp_channel_calc_m program~reims_p->module~cmp_circulator_calc_m

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: Pri_ro = 1

Density

integer, public, parameter :: Pri_u = 2

Velocity

integer, public, parameter :: Pri_p = 3

Pressure

integer, public, parameter :: Pri_e = 4

Internal energy

integer, public, parameter :: Pri_T = 5

Temperature

integer, public, parameter :: Pri_c = 6

Sound speed

integer, public, parameter :: Pri_R = 7

Extra variable for the mechanical equilibrium recovering

integer, public, parameter :: Con_Mas = 1

Mass conservative variable

integer, public, parameter :: Con_Qdm = 2

Momentum conservative variable

integer, public, parameter :: Con_Ene = 3

Energy conservative variable

integer, public, parameter :: Con_R = 4

Extra variable for conservative variable array

real(kind=dp), public, parameter :: T_He_min = 3.0_dp

EOS lower bound (K)

real(kind=dp), public, parameter :: T_He_max = 1500.0_dp

EOS upper bound (K)

real(kind=dp), public, parameter :: MolMass = 4.0026e-3_dp

Molar mass of helium (kg/mol)

real(kind=dp), public, parameter :: R_cte_gaz_Arp = 8.31431e-3_dp

Universal gas constant (kJ/(mol*K))

real(kind=dp), public, parameter :: cp0_Arp = 5193.16943986d0*MolMass*1.0e-3_dp

Reference specific heat at constant pressure (kJ/(kg*K))

real(kind=dp), private, parameter :: tau = 1.0_dp/(17.399_dp**2)
real(kind=dp), private, parameter :: q0_Arp = 5210.521090595d0*MolMass*1.0e-3_dp
real(kind=dp), private, parameter :: nn(32) = [+0.4558980227431e-04_dp, 0.1260692007853e-02_dp, -0.7139657549318e-02_dp, +0.9728903861441e-02_dp, -0.1589302471562e-01_dp, 0.1454229259623e-05_dp, -0.4708238429298e-04_dp, 0.1132915223587e-02_dp, 0.2410763742104e-02_dp, -0.5093547838381e-08_dp, 0.2699726927900e-05_dp, -0.3954146691114e-04_dp, +0.1551961438127e-08_dp, 0.1050712335785e-07_dp, -0.5501158366750e-07_dp, -0.1037673478521e-09_dp, 0.6446881346448e-12_dp, 0.3298960057071e-10_dp, -0.3555585738784e-12_dp, -0.6885401367690e-02_dp, 0.9166109232806e-02_dp, -0.6544314242937e-05_dp, -0.3315398880031e-04_dp, -0.2067693644676e-07_dp, +0.3850153114958e-07_dp, -0.1399040626999e-10_dp, -0.1888462892389e-11_dp, -0.4595138561035e-14_dp, 0.6872567403738e-14_dp, -0.6097223119177e-18_dp, -0.7636186157005e-17_dp, 0.3848665703556e-17_dp]
real(kind=dp), private, parameter :: Newton_T_guess0 = 10.0_dp
real(kind=dp), private, parameter :: Newton_FunctTol = 1.0e-8_dp
integer, private, parameter :: Newton_MaxIte = 80
real(kind=dp), private, parameter :: Brent_MachEps = 1.0e-15_dp
real(kind=dp), private, parameter :: Brent_Tol = 1.0e-10_dp
real(kind=dp), private, parameter :: Brent_ResidTol = Newton_FunctTol
real(kind=dp), private, parameter :: ro_from_pT_min_Arp = 0.01_dp/(MolMass*1000.0_dp)
real(kind=dp), private, parameter :: ro_from_pT_max_Arp = 290.0_dp/(MolMass*1000.0_dp)

Derived Types

type, private ::  ThArrays_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, dimension(14) :: f
real(kind=dp), public, dimension(14) :: g
real(kind=dp), public, dimension(14) :: Derf
real(kind=dp), public, dimension(14) :: Derg
real(kind=dp), public, dimension(14) :: Dergg
real(kind=dp), public, dimension(14) :: hh
real(kind=dp), public, dimension(14) :: Derhh
real(kind=dp), public, dimension(14) :: Der2f
real(kind=dp), public, dimension(14) :: Der2g
real(kind=dp), public, dimension(14) :: Der2gg
real(kind=dp), public, dimension(14) :: gg
real(kind=dp), public, dimension(14) :: ff

type, private, extends(brent_t) ::  ro_from_pT_obj_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: p
real(kind=dp), public :: T

Type-Bound Procedures

procedure, public :: f => funct_ro_from_pT

type, private, extends(brent_t) ::  T_from_roP_obj_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: ro
real(kind=dp), public :: p

Type-Bound Procedures

procedure, public :: f => funct_T_from_roP

type, private, extends(brent_t) ::  T_from_roE_obj_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: ro
real(kind=dp), public :: e

Type-Bound Procedures

procedure, public :: f => funct_T_from_roE

Functions

private function funct_ro_from_pT(me, x)

Arguments

Type IntentOptional Attributes Name
class(ro_from_pT_obj_t), intent(in) :: me
real(kind=dp), intent(in) :: x

x is ro (Arp units)

Return Value real(kind=dp)

private function funct_T_from_roP(me, x)

Arguments

Type IntentOptional Attributes Name
class(T_from_roP_obj_t), intent(in) :: me
real(kind=dp), intent(in) :: x

x is T

Return Value real(kind=dp)

private function funct_T_from_roE(me, x)

Arguments

Type IntentOptional Attributes Name
class(T_from_roE_obj_t), intent(in) :: me
real(kind=dp), intent(in) :: x

x is T

Return Value real(kind=dp)

private function brent(obj, xmin, xmax, label) result(x)

Arguments

Type IntentOptional Attributes Name
class(brent_t), intent(in) :: obj
real(kind=dp), intent(in) :: xmin
real(kind=dp), intent(in) :: xmax
character(len=*), intent(in) :: label

Return Value real(kind=dp)

public elemental function r_roT(ro, T) result(r)

r = rho*h consistent with (ro,T), fast direct evaluation

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T

Return Value real(kind=dp)

public function ro_pT(p, T) result(ro)

Solve p(ro,T) = p for ro.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: p
real(kind=dp), intent(in) :: T

Return Value real(kind=dp)

public function T_roP(ro, p) result(T)

Solve p(ro,T) = p for T.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: p

Return Value real(kind=dp)

public function T_roE(ro, e) result(T)

Solve e(ro,T) = e for T

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: e

Return Value real(kind=dp)

public function droeint_droP(ro, p, e, dedv, dedp) result(droeint_dro)

Energy-related terms from (ro,p): returns d(rho*e)/d(ro)|p and can also provide e, de/dv|p, and de/dp|v.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: p
real(kind=dp), intent(out), optional :: e
real(kind=dp), intent(out), optional :: dedv
real(kind=dp), intent(out), optional :: dedp

Return Value real(kind=dp)


Subroutines

private elemental subroutine fill_f_terms(ro, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
type(ThArrays_t), intent(inout) :: ThAr

private elemental subroutine fill_ff_terms(ro, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
type(ThArrays_t), intent(inout) :: ThAr

private elemental subroutine fill_g_Dreg_terms(T, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: T
type(ThArrays_t), intent(inout) :: ThAr

private elemental subroutine eos_pT_terms(ro, T, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
type(ThArrays_t), intent(inout) :: ThAr

private elemental subroutine fill_e_Tpart(T, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: T
type(ThArrays_t), intent(inout) :: ThAr

private elemental subroutine eos_e_terms(ro, T, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
type(ThArrays_t), intent(inout) :: ThAr

private elemental subroutine eos_terms(ro, T, ThAr)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
type(ThArrays_t), intent(out) :: ThAr

public elemental subroutine state_roT(ro, T, r, p, e, c)

Full state from (ro,T): r, p, e, c.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
real(kind=dp), intent(out) :: r
real(kind=dp), intent(out) :: p
real(kind=dp), intent(out) :: e
real(kind=dp), intent(out) :: c

public subroutine state_roP(ro, p, r, e, T, c)

Full state from (ro,p): r, e, T, c. Solves for T internally.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: p
real(kind=dp), intent(out) :: r
real(kind=dp), intent(out) :: e
real(kind=dp), intent(out) :: T
real(kind=dp), intent(out) :: c

public subroutine state_roP_withR(ro, p, r, e, T, c)

State from (ro,p) when r is already known (e.g. carried as a conservative variable): e, T, c. Solves for T internally.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: p
real(kind=dp), intent(in) :: r
real(kind=dp), intent(out) :: e
real(kind=dp), intent(out) :: T
real(kind=dp), intent(out) :: c

public subroutine state_roE(ro, e, p, T, c)

State from (ro,e): p, T, c for the physical EOS path.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: e
real(kind=dp), intent(out) :: p
real(kind=dp), intent(out) :: T
real(kind=dp), intent(out) :: c

public subroutine state_roE_withR(ro, e, r, p, T, c)

State from (ro,e) when r is already known: p, T, c.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: e
real(kind=dp), intent(in) :: r
real(kind=dp), intent(out) :: p
real(kind=dp), intent(out) :: T
real(kind=dp), intent(out) :: c

public elemental subroutine jacobian_roT(ro, T, cv, dPdT, dTdP, dTdRo, dRdRo, dRdT, r, p, d2TdP_dT, d2TdP_dRo)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
real(kind=dp), intent(out) :: cv
real(kind=dp), intent(out) :: dPdT
real(kind=dp), intent(out), optional :: dTdP
real(kind=dp), intent(out), optional :: dTdRo
real(kind=dp), intent(out), optional :: dRdRo
real(kind=dp), intent(out), optional :: dRdT
real(kind=dp), intent(out), optional :: r
real(kind=dp), intent(out), optional :: p
real(kind=dp), intent(out), optional :: d2TdP_dT
real(kind=dp), intent(out), optional :: d2TdP_dRo

public elemental subroutine dc2_roT(ro, T, dc2dRo, dc2dP)

d(c^2)/dRo and d(c^2)/dP at constant T / constant Ro respectively.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
real(kind=dp), intent(out) :: dc2dRo
real(kind=dp), intent(out) :: dc2dP

public subroutine he_prop(ro, T, cv, cp, mu, lambda, dPdT)

Viscosity and thermal conductivity correlations for helium. The critical-region enhancement term in lambda needs dP/dRo and dP/dT;

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: ro
real(kind=dp), intent(in) :: T
real(kind=dp), intent(out) :: cv
real(kind=dp), intent(out) :: cp
real(kind=dp), intent(out) :: mu
real(kind=dp), intent(out) :: lambda
real(kind=dp), intent(out) :: dPdT