MulticomponentLagrangianThermo.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::MulticomponentLagrangianThermo
26 
27 Description
28  Multicomponent Lagrangian thermodynamic model implementation
29 
30 SourceFiles
31  MulticomponentLagrangianThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef MulticomponentLagrangianThermo_H
36 #define MulticomponentLagrangianThermo_H
37 
38 #include "BasicLagrangianThermo.H"
39 #include "speciesTable.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class MulticomponentLagrangianThermo Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class BaseThermo>
52 :
53  public BaseThermo
54 {
55 protected:
56 
57  // Protected Member Functions
58 
59  //- Return a LagrangianInternalScalarField of the given property
60  template<class Method, class ... Args>
63  (
64  const word& psiName,
65  const dimensionSet& psiDim,
66  Method psiMethod,
67  const label speciei,
68  const Args& ... args
69  ) const;
70 
71  //- Return a LagrangianSubScalarField of the given property
72  template<class Method, class ... Args>
75  (
76  const LagrangianSubMesh& subMesh,
77  const word& psiName,
78  const dimensionSet& psiDim,
79  Method psiMethod,
80  const label speciei,
81  const Args& ... args
82  ) const;
83 
84 
85 public:
86 
87  // Constructors
88 
89  //- Inherit constructors
90  using BaseThermo::BaseThermo;
91 
92 
93  //- Destructor
95 
96 
97  // Member Functions
98 
99  // Species set
100 
101  //- Return the table of species
102  virtual const speciesTable& species() const
103  {
104  return BaseThermo::mixtureType::species();
105  }
106 
107 
108  // Specie molecular properties
109 
110  //- Molecular weight [kg/kmol]
111  virtual dimensionedScalar Wi(const label speciei) const;
112 
113 
114  // Specie thermodynamic properties
115 
116  //- Density [kg/m^3]
118  (
119  const label speciei,
122  ) const;
123 
124  //- Sensible enthalpy [J/kg]
126  (
127  const label speciei,
130  ) const;
131 
132  //- Enthalpy of formation [J/kg]
133  virtual dimensionedScalar hfi(const label speciei) const;
134 
135  //- Heat capacity at constant volume [J/kg/K]
137  (
138  const label speciei,
141  ) const;
142 
143  //- Heat capacity at constant pressure [J/kg/K]
145  (
146  const label speciei,
149  ) const;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #ifdef NoRepository
161 #endif
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Multicomponent Lagrangian thermodynamic model implementation.
virtual const speciesTable & species() const
Return the table of species.
virtual tmp< LagrangianSubScalarField > Cvi(const label speciei, const LagrangianSubScalarField &p, const LagrangianSubScalarField &T) const
Heat capacity at constant volume [J/kg/K].
virtual dimensionedScalar hfi(const label speciei) const
Enthalpy of formation [J/kg].
virtual tmp< LagrangianSubScalarField > rhoi(const label speciei, const LagrangianSubScalarField &p, const LagrangianSubScalarField &T) const
Density [kg/m^3].
virtual tmp< LagrangianSubScalarField > Cpi(const label speciei, const LagrangianSubScalarField &p, const LagrangianSubScalarField &T) const
Heat capacity at constant pressure [J/kg/K].
tmp< LagrangianSubScalarField > LagrangianSubScalarFieldPropertyi(const LagrangianSubMesh &subMesh, const word &psiName, const dimensionSet &psiDim, Method psiMethod, const label speciei, const Args &... args) const
Return a LagrangianSubScalarField of the given property.
virtual tmp< LagrangianSubScalarField > hsi(const label speciei, const LagrangianSubScalarField &p, const LagrangianSubScalarField &T) const
Sensible enthalpy [J/kg].
virtual dimensionedScalar Wi(const label speciei) const
Molecular weight [kg/kmol].
tmp< LagrangianInternalScalarField > LagrangianInternalScalarFieldPropertyi(const word &psiName, const dimensionSet &psiDim, Method psiMethod, const label speciei, const Args &... args) const
Return a LagrangianInternalScalarField of the given property.
Dimension set for the base types.
Definition: dimensionSet.H:125
A wordList with hashed indices for faster lookup by name.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
Foam::argList args(argc, argv)
volScalarField & p