MulticomponentThermo.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) 2011-2025 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::MulticomponentThermo
26 
27 Description
28  Multi-component thermo implementation
29 
30 SourceFiles
31  MulticomponentThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef MulticomponentThermo_H
36 #define MulticomponentThermo_H
37 
38 #include "BasicThermo.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class MulticomponentThermo Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class BaseThermo>
51 :
52  public BaseThermo
53 {
54 protected:
55 
56  // Protected Member Functions
57 
58  //- Return a volScalarField of the given property
59  template<class Method, class ... Args>
61  (
62  const word& psiName,
63  const dimensionSet& psiDim,
64  Method psiMethod,
65  const label speciei,
66  const Args& ... args
67  ) const;
68 
69  //- Return a volScalarField::Internal of the given property
70  template<class Method, class ... Args>
72  (
73  const word& psiName,
74  const dimensionSet& psiDim,
75  Method psiMethod,
76  const label speciei,
77  const Args& ... args
78  ) const;
79 
80  //- Return a scalarField of the given property
81  template<class Method, class Arg, class ... Args>
83  (
84  Method psiMethod,
85  const label speciei,
86  const Arg& arg,
87  const Args& ... args
88  ) const;
89 
90 
91 public:
92 
93  // Constructors
94 
95  //- Construct from mesh and phase name
96  MulticomponentThermo(const fvMesh&, const word& phaseName);
97 
98  //- Disallow default bitwise copy construction
100 
101 
102  //- Destructor
103  virtual ~MulticomponentThermo();
104 
105 
106  // Member Functions
107 
108  // Specie molecular properties
109 
110  //- Molecular weight [kg/kmol]
111  virtual scalar WiValue(const label speciei) const;
112 
113  //- Molecular weight [kg/kmol]
114  virtual dimensionedScalar Wi(const label speciei) const;
115 
116 
117  // Specie thermodynamic properties
118 
119  //- Density [kg/m^3]
120  virtual scalar rhoi
121  (
122  const label speciei,
123  const scalar p,
124  const scalar T
125  ) const;
126 
127  //- Density [kg/m^3]
128  virtual tmp<volScalarField> rhoi
129  (
130  const label speciei,
131  const volScalarField& p,
132  const volScalarField& T
133  ) const;
134 
135  //- Heat capacity at constant pressure [J/kg/K]
136  virtual scalar Cpi
137  (
138  const label speciei,
139  const scalar p,
140  const scalar T
141  ) const;
142 
143  //- Heat capacity at constant pressure [J/kg/K]
144  virtual tmp<volScalarField> Cpi
145  (
146  const label speciei,
147  const volScalarField& p,
148  const volScalarField& T
149  ) const;
150 
151  //- Enthalpy/Internal energy [J/kg]
152  virtual scalar hei
153  (
154  const label speciei,
155  const scalar p,
156  const scalar T
157  ) const;
158 
159  //- Enthalpy/Internal energy [J/kg]
160  virtual tmp<scalarField> hei
161  (
162  const label speciei,
163  const scalarField& p,
164  const scalarField& T
165  ) const;
166 
167  //- Enthalpy/Internal energy [J/kg]
169  (
170  const label speciei,
173  ) const;
174 
175  //- Enthalpy/Internal energy [J/kg]
176  virtual tmp<volScalarField> hei
177  (
178  const label speciei,
179  const volScalarField& p,
180  const volScalarField& T
181  ) const;
182 
183  //- Sensible enthalpy [J/kg]
184  virtual scalar hsi
185  (
186  const label speciei,
187  const scalar p,
188  const scalar T
189  ) const;
190 
191  //- Sensible enthalpy [J/kg]
192  virtual tmp<scalarField> hsi
193  (
194  const label speciei,
195  const scalarField& p,
196  const scalarField& T
197  ) const;
198 
199  //- Sensible enthalpy [J/kg]
201  (
202  const label speciei,
205  ) const;
206 
207  //- Sensible enthalpy [J/kg]
208  virtual tmp<volScalarField> hsi
209  (
210  const label speciei,
211  const volScalarField& p,
212  const volScalarField& T
213  ) const;
214 
215  //- Absolute enthalpy [J/kg]
216  virtual scalar hai
217  (
218  const label speciei,
219  const scalar p,
220  const scalar T
221  ) const;
222 
223  //- Absolute enthalpy [J/kg]
224  virtual tmp<scalarField> hai
225  (
226  const label speciei,
227  const scalarField& p,
228  const scalarField& T
229  ) const;
230 
231  //- Absolute enthalpy [J/kg]
233  (
234  const label speciei,
237  ) const;
238 
239  //- Absolute enthalpy [J/kg]
240  virtual tmp<volScalarField> hai
241  (
242  const label speciei,
243  const volScalarField& p,
244  const volScalarField& T
245  ) const;
246 
247  //- Enthalpy of formation [J/kg]
248  virtual scalar hfiValue(const label speciei) const;
249 
250  //- Enthalpy of formation [J/kg]
251  virtual dimensionedScalar hfi(const label speciei) const;
252 
253 
254  // Specie transport properties
255 
256  //- Thermal conductivity [W/m/K]
257  virtual scalar kappai
258  (
259  const label speciei,
260  const scalar p,
261  const scalar T
262  ) const;
263 
264  //- Thermal conductivity [W/m/K]
266  (
267  const label speciei,
268  const volScalarField& p,
269  const volScalarField& T
270  ) const;
271 };
272 
273 
274 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
275 
276 } // End namespace Foam
277 
278 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
279 
280 #ifdef NoRepository
281  #include "MulticomponentThermo.C"
282 #endif
283 
284 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
285 
286 #endif
287 
288 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
Multi-component thermo implementation.
virtual ~MulticomponentThermo()
Destructor.
virtual scalar WiValue(const label speciei) const
Molecular weight [kg/kmol].
virtual scalar kappai(const label speciei, const scalar p, const scalar T) const
Thermal conductivity [W/m/K].
virtual scalar Cpi(const label speciei, const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
virtual scalar rhoi(const label speciei, const scalar p, const scalar T) const
Density [kg/m^3].
virtual dimensionedScalar hfi(const label speciei) const
Enthalpy of formation [J/kg].
tmp< volScalarField::Internal > volInternalScalarFieldPropertyi(const word &psiName, const dimensionSet &psiDim, Method psiMethod, const label speciei, const Args &... args) const
Return a volScalarField::Internal of the given property.
tmp< volScalarField > volScalarFieldPropertyi(const word &psiName, const dimensionSet &psiDim, Method psiMethod, const label speciei, const Args &... args) const
Return a volScalarField of the given property.
MulticomponentThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
virtual scalar hfiValue(const label speciei) const
Enthalpy of formation [J/kg].
virtual dimensionedScalar Wi(const label speciei) const
Molecular weight [kg/kmol].
tmp< scalarField > scalarFieldPropertyi(Method psiMethod, const label speciei, const Arg &arg, const Args &... args) const
Return a scalarField of the given property.
virtual scalar hai(const label speciei, const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
virtual scalar hei(const label speciei, const scalar p, const scalar T) const
Enthalpy/Internal energy [J/kg].
virtual scalar hsi(const label speciei, const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
Dimension set for the base types.
Definition: dimensionSet.H:125
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
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(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
Foam::argList args(argc, argv)
volScalarField & p