ClimFluids

Documentation for ClimFluids.

ClimFluids.IdealPerfectGasType
fluid = 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.

source
ClimFluids.VarCpPerfectGasMethod
gas = 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.

source
ClimFluids.canonical_stateMethod
cstate = 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.

source
ClimFluids.conservative_variableFunction
consvar = 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.

source
ClimFluids.exner_functionsFunction
h, 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.

source
ClimFluids.potential_volumeFunction
vpot = potential_volume(fluid, state)

Returns potential volume given a fluid and a state (named tuple of state variables).

source
ClimFluids.pressureFunction
p = pressure(fluid, state)

Returns pressure given a fluid and a state (named tuple of state variables).

source
ClimFluids.sound_speedFunction
cs = 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)).

source
ClimFluids.sound_speed2Function
c2 = sound_speed2(fluid, (;p,T))

Returns the squared speed of sound given a fluid and a state (named tuple of state variables).

source
ClimFluids.specific_volumeFunction
v = specific_volume(fluid, state)

Returns specific volume given a fluid and a state (named tuple of state variables).

source
ClimFluids.temperatureFunction
T = temperature(fluid, state)

Returns temperature given a fluid and a state (named tuple of state variables).

source
ClimFluids.volume_functionsFunction
v, 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.

source