ClimFluids
Documentation for ClimFluids.
ClimFluids.AbstractFluid
ClimFluids.IdealPerfectGas
ClimFluids.VarCpPerfectGas
ClimFluids.canonical_state
ClimFluids.conservative_variable
ClimFluids.exner_functions
ClimFluids.potential_enthalpy
ClimFluids.potential_temperature
ClimFluids.potential_volume
ClimFluids.pressure
ClimFluids.sound_speed
ClimFluids.sound_speed2
ClimFluids.specific_enthalpy
ClimFluids.specific_entropy
ClimFluids.specific_internal_energy
ClimFluids.specific_volume
ClimFluids.temperature
ClimFluids.volume_functions
ClimFluids.AbstractFluid
— TypeAbstractFluid{F,N}
Parent type for types describing thermodynamics of a fluid with N components.
ClimFluids.IdealPerfectGas
— Typefluid = IdealPerfectGas(consvar, kappa, Cp, p0, T0)
fluid = IdealPerfectGas(options)
Return an object fluid
describing the thermodynamics of a single-component ideal perfect gas. fluid
can then be used as first argument of thermodynamic functions. Argument consvar
defines the conservative variable chosen. Valid values are :temperature
, :entropy
, :enthalpy
, :volume
, corresponding to potential temperature, entropy, potential enthalpy, potential specific volume.
Arguments can also be passed as a named tuple options
.
ClimFluids.VarCpPerfectGas
— Methodgas = VarCpPerfectGas(kappa,Cp,p0,T0,nu)
Return an object describing the thermodynamics of a single-component perfect gas with temperature-dependent heat capacity (Lebonnois et al., J. Geohys. Res., 2010). This object can then be used as first argument of thermodynamic functions. The conservative variable is specific entropy.
ClimFluids.canonical_state
— Methodcstate = canonical_state(fluid, state)
Converts the named tuple state
of state variables to the preferred tuple cstate
. It is expected that all thermodynamic functions are implemented for arguments (fluid, cstate)
. This function is used internally to provide fallback implementations for thermodynamic functions.
ClimFluids.conservative_variable
— Functionconsvar = conservative_variable(fluid, state)
Returns the conservative variable given a fluid
and a state
(named tuple of state variables). Which conservative variable is chosen is a parameter given to the constructor of fluid
.
ClimFluids.exner_functions
— Functionh, v, exner, [exner_q] = exner_functions(fluid, state)
Returns specific enthalpy, regarded as a function of pressure, conservative variable and (if applicable) composition, and its derivatives : specific volume, and Exner-like functions.
ClimFluids.potential_enthalpy
— Functionhpot = potential_enthalpy(fluid, state)
Returns potential enthalpy given a fluid
and a state
(named tuple of state variables).
ClimFluids.potential_temperature
— Functiontheta = potential_temperature(fluid, state)
Returns potential temperature given a fluid
and a state
(named tuple of state variables).
ClimFluids.potential_volume
— Functionvpot = potential_volume(fluid, state)
Returns potential volume given a fluid
and a state
(named tuple of state variables).
ClimFluids.pressure
— Functionp = pressure(fluid, state)
Returns pressure given a fluid
and a state
(named tuple of state variables).
ClimFluids.sound_speed
— Functioncs = sound_speed(fluid, (;p,T))
Returns the speed of sound given a fluid
and a state
(named tuple of state variables). Default implementation returns sqrt(sound_speed2(fluid, state))
.
ClimFluids.sound_speed2
— Functionc2 = sound_speed2(fluid, (;p,T))
Returns the squared speed of sound given a fluid
and a state
(named tuple of state variables).
ClimFluids.specific_enthalpy
— Functionh = specific_enthalpy(fluid, state)
Returns specific enthalpy given a fluid
and a state
(named tuple of state variables).
ClimFluids.specific_entropy
— Functions = specific_entropy(fluid, state)
Returns specific entropy given a fluid
and a state
(named tuple of state variables).
ClimFluids.specific_internal_energy
— Functione = specific_internal_energy(fluid, state)
Returns specific internal energy given a fluid
and a state
(named tuple of state variables).
ClimFluids.specific_volume
— Functionv = specific_volume(fluid, state)
Returns specific volume given a fluid
and a state
(named tuple of state variables).
ClimFluids.temperature
— FunctionT = temperature(fluid, state)
Returns temperature given a fluid
and a state
(named tuple of state variables).
ClimFluids.volume_functions
— Functionv, dv_dp, dv_consvar, [dv_dq] = volume_functions(fluid, state)
Returns specific volume, regarded as a function of pressure, conservative variable and (if applicable) composition, and its derivatives.