FELiCS.Equation.Reactions.janafopenfoam#
Module Contents#
Classes#
Thermodynamic property evaluator using JANAF polynomials for OpenFOAM species. |
- class FELiCS.Equation.Reactions.janafopenfoam.Janafopenfoam(P)#
Thermodynamic property evaluator using JANAF polynomials for OpenFOAM species.
This class provides methods to evaluate specific heat capacity, enthalpy, entropy, and Gibbs free energy of chemical species based on JANAF polynomial coefficients. It supports scalar and expression-based evaluations for compatibility with dolfinx.
Initialize the Janafopenfoam object
- Parameters:
P (
int) – Polynomial degree used in expression evaluation.- Variables:
P (
int) – Polynomial degree for expression evaluation.R_univ (
float) – Universal gas constant [J/kmol·K].Tstd (
float) – Standard reference temperature [K].pref (
float) – Reference pressure [Pa].
- janaf_cp(Specie, T)#
Compute specific isobaric heat capacity cp [J/kmol·K].
- Parameters:
Specie (
object) – Species object containing JANAF coefficients.T (
float) – Temperature [K].
- Returns:
cp – Isobaric heat capacity [J/kmol·K].
- Return type:
float- Raises:
Exception – If temperature is out of the valid JANAF polynomial range.
- janaf_cp_expr(Specie, T)#
Generate an expression for specific isobaric heat capacity cp [J/kmol·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
cp – Expression for cp [J/kmol·K].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
This is an implementation of the following OpenFOAM source-code:
- janaf_hc(Specie)#
Compute chemical enthalpy of formation hc [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.- Returns:
hc – Enthalpy of formation [J/kmol].
- Return type:
float
- janaf_ha(Specie, T)#
Compute absolute enthalpy ha [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
ha – Absolute enthalpy [J/kmol].
- Return type:
float- Raises:
Exception – If temperature is out of the valid JANAF polynomial range.
- janaf_ha_expr(Specie, T)#
Generate an expression for absolute enthalpy ha [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
ha – Expression for ha [J/kmol].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_hs(Specie, T)#
Compute sensible enthalpy hs [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
hs – Sensible enthalpy [J/kmol].
- Return type:
float- Raises:
Exception – If temperature is out of the valid JANAF polynomial range.
- janaf_hs_expr(Specie, T)#
Generate an expression for sensible enthalpy hs [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
hs – Expression for hs [J/kmol].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_Hc(Specie)#
Compute specific chemical enthalpy Hc [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.- Returns:
Hc – Specific enthalpy of formation [J/kg].
- Return type:
float
- janaf_Ha(Specie, T)#
Compute specific absolute enthalpy Ha [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
Ha – Specific absolute enthalpy [J/kg].
- Return type:
float
- janaf_Ha_expr(Specie, T)#
Generate an expression for specific absolute enthalpy Ha [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
Ha – Expression for Ha [J/kg].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_Hs(Specie, T)#
Compute specific sensible enthalpy Hs [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
Hs – Specific sensible enthalpy [J/kg].
- Return type:
float
- janaf_Hs_expr(Specie, T)#
Generate an expression for specific sensible enthalpy Hs [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
Hs – Expression for Hs [J/kg].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_s0(Specie)#
Compute standard entropy s0 [J/kmol·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.- Returns:
s0 – Standard entropy [J/kmol·K].
- Return type:
float
- janaf_s(Specie, T)#
Compute entropy s [J/kmol·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
s – Entropy [J/kmol·K].
- Return type:
float- Raises:
Exception – If temperature is out of the valid JANAF polynomial range.
- janaf_s_expr(Specie, T)#
Generate an expression for entropy s [J/kmol·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
s – Expression for s [J/kmol·K].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_S0(Specie)#
Compute standard entropy S0 [J/kg·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.- Returns:
S0 – Standard entropy [J/kg·K].
- Return type:
float
- janaf_S(Specie, T)#
Compute entropy S [J/kg·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
S – Entropy [J/kg·K].
- Return type:
float
- janaf_S_expr(Specie, T)#
Generate an expression for entropy S [J/kg·K].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
S – Expression for S [J/kg·K].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_S_in_mix_expr(Specie, T, p, Y_spec, Wmix)#
Generate an expression for entropy S [J/kg·K] of a species in a mixture.
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.p (
dolfinx.fem.Function) – Pressure field [Pa].Y_spec (
dolfinx.fem.Function) – Mass fraction of the species.Wmix (
dolfinx.fem.Function) – Mixture molecular weight.
- Returns:
S_in_mix – Entropy expression for the species in the mixture [J/kg·K].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_g(Specie, T)#
Compute Gibbs free energy g [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
g – Gibbs free energy [J/kmol].
- Return type:
float
- janaf_gs(Specie, T)#
Compute sensible Gibbs free energy gs [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
gs – Sensible Gibbs free energy [J/kmol].
- Return type:
float
- janaf_g_expr(Specie, T)#
Generate an expression for Gibbs free energy g [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
g (
dolfinx.fem.Expression) – Expression for g [J/kmol].Notes
-------- Computed by expressiontobe used on dolfin fields.
- janaf_gs_expr(Specie, T)#
Generate an expression for sensible Gibbs free energy gs [J/kmol].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
gs – Expression for gs [J/kmol].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_G(Specie, T)#
Compute Gibbs free energy G [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
G – Gibbs free energy [J/kg].
- Return type:
float
- janaf_Gs(Specie, T)#
Compute sensible Gibbs free energy Gs [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
float) – Temperature [K].
- Returns:
Gs – Sensible Gibbs free energy [J/kg].
- Return type:
float
- janaf_G_expr(Specie, T)#
Generate an expression for Gibbs free energy G [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
G – Expression for G [J/kg].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.
- janaf_Gs_expr(Specie, T)#
Generate an expression for sensible Gibbs free energy Gs [J/kg].
- Parameters:
Specie (
object) – Species object with JANAF coefficients.T (
dolfinx.fem.Function) – Temperature field.
- Returns:
Gs – Expression for Gs [J/kg].
- Return type:
dolfinx.fem.Expression
Notes
Computed by expression to be used on dolfin fields.