ClimFluids
Documentation for ClimFluids.
ClimFluids.AbstractFluidClimFluids.IdealPerfectGasClimFluids.NonlinearBinaryFluidClimFluids.VarCpPerfectGasClimFluids.canonical_stateClimFluids.conjugate_variableClimFluids.conservative_variableClimFluids.exner_functionsClimFluids.potential_enthalpyClimFluids.potential_temperatureClimFluids.potential_volumeClimFluids.pressureClimFluids.sound_speedClimFluids.sound_speed2ClimFluids.specific_enthalpyClimFluids.specific_entropyClimFluids.specific_internal_energyClimFluids.specific_volumeClimFluids.temperatureClimFluids.volume_functions
ClimFluids.AbstractFluid — Type
AbstractFluid{F,N}
Parent type for types describing thermodynamics of a fluid with N components.
ClimFluids.IdealPerfectGas — Type
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.
ClimFluids.NonlinearBinaryFluid — Type
fluid = NonlinearBinaryFluid(consvar, prec)
fluid = NonlinearBinaryFluid(options)Return an object fluid describing the thermodynamics of a nonlinear binary fluid. The fluid has a constant heat capacity, but includes cabelling and thermobaric terms. fluid can then be used as first argument of thermodynamic functions. Argument consvar defines the conservative variable chosen. Valid values are :entropy, :potential_temperature.
Arguments can also be passed as a named tuple options.
ClimFluids.VarCpPerfectGas — Method
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.
ClimFluids.canonical_state — Method
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.
ClimFluids.conjugate_variable — Function
conjvar = conjugate_variable(fluid, state)Returns the variable conjugate to the conservative variable given a fluid and a state (named tuple of state variables).
ClimFluids.conservative_variable — Function
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.
ClimFluids.exner_functions — Function
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.
ClimFluids.potential_enthalpy — Function
hpot = potential_enthalpy(fluid, state)Returns potential enthalpy given a fluid and a state (named tuple of state variables).
ClimFluids.potential_temperature — Function
theta = potential_temperature(fluid, state)Returns potential temperature given a fluid and a state (named tuple of state variables).
ClimFluids.potential_volume — Function
vpot = potential_volume(fluid, state)Returns potential volume given a fluid and a state (named tuple of state variables).
ClimFluids.pressure — Function
p = pressure(fluid, state)Returns pressure given a fluid and a state (named tuple of state variables).
ClimFluids.sound_speed — Function
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)).
ClimFluids.sound_speed2 — Function
c2 = 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 — Function
h = specific_enthalpy(fluid, state)Returns specific enthalpy given a fluid and a state (named tuple of state variables).
ClimFluids.specific_entropy — Function
s = specific_entropy(fluid, state)Returns specific entropy given a fluid and a state (named tuple of state variables).
ClimFluids.specific_internal_energy — Function
e = specific_internal_energy(fluid, state)Returns specific internal energy given a fluid and a state (named tuple of state variables).
ClimFluids.specific_volume — Function
v = specific_volume(fluid, state)Returns specific volume given a fluid and a state (named tuple of state variables).
ClimFluids.temperature — Function
T = temperature(fluid, state)Returns temperature given a fluid and a state (named tuple of state variables).
ClimFluids.volume_functions — Function
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.