BasicLagrangianThermo.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::BasicLagrangianThermo
26 
27 Description
28  Lagrangian thermodynamic model implementation and storage of energy.
29  Provides overloads of the functions defined in the basic Lagrangian
30  thermodynamic type that depend on the primitive thermodynamic model.
31 
32 SourceFiles
33  BasicLagrangianThermo.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef BasicLagrangianThermo_H
38 #define BasicLagrangianThermo_H
39 
40 #include "basicLagrangianThermo.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class BasicThermoName Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 
53 
54 /*---------------------------------------------------------------------------*\
55  Class basicLagrangianThermo Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class MixtureType, class BasicThermoType>
60 :
61  public BasicLagrangianThermoName,
62  public physicalProperties,
63  public MixtureType,
64  public BasicThermoType
65 {
66 protected:
67 
68  // Protected Data
69 
70  //- Internal energy [J/kg]
72 
73 
74  // Protected Member Functions
75 
76  //- Return a LagrangianInternalScalarField of the given property
77  template<class Mixture, class Method, class ... Args>
79  (
80  const word& psiName,
81  const dimensionSet& psiDim,
82  Mixture mixture,
83  Method psiMethod,
84  const Args& ... args
85  ) const;
86 
87  //- Return a LagrangianSubScalarField of the given property
88  template<class Mixture, class Method, class ... Args>
90  (
91  const LagrangianSubMesh& subMesh,
92  const word& psiName,
93  const dimensionSet& psiDim,
94  Mixture mixture,
95  Method psiMethod,
96  const Args& ... args
97  ) const;
98 
99  //- Return a LagrangianSubScalarField of the given property
100  template<class Mixture, class Method, class ... Args>
102  (
103  const LagrangianInjection& injection,
104  const LagrangianSubMesh& subMesh,
105  const word& psiName,
106  const dimensionSet& psiDim,
107  Mixture mixture,
108  Method psiMethod,
109  const Args& ... args
110  ) const;
111 
112 
113 public:
114 
115  // Typedefs
116 
117  //- Mixture type
118  typedef MixtureType mixtureType;
119 
120  //- Basic thermo
121  typedef BasicThermoType basicThermoType;
122 
123 
124  //- Disambiguate debug switch used by derivations
125  using BasicLagrangianThermoName::debug;
126 
127 
128  // Constructors
129 
130  //- Construct from mesh and phase name
131  BasicLagrangianThermo(const LagrangianMesh&, const word& phaseName);
132 
133  //- Disallow default bitwise copy construction
135  (
137  ) = delete;
138 
139 
140  //- Destructor
141  virtual ~BasicLagrangianThermo();
142 
143 
144  // Member Functions
145 
146  //- Access the properties dictionary
147  virtual const IOdictionary& properties() const;
148 
149  //- Modify the properties dictionary
150  virtual IOdictionary& properties();
151 
152  //- Return the full name of the thermodynamic model
153  virtual word thermoName() const;
154 
155 
156  // Molecular Properties
157 
158  //- Molecular weight for a sub-mesh [kg/kmol]
160  (
161  const LagrangianSubMesh&
162  ) const;
163 
164 
165  // Thermodynamic Properties
166 
167  using BasicThermoType::rho;
168 
169  //- Density for an injection [kg/m^3]
171  (
173  const LagrangianInjection&
174  ) const;
175 
176  //- Internal energy [J/kg]
177  virtual const LagrangianScalarDynamicField& e() const;
178 
179  //- Modify the internal energy [J/kg]
180  virtual LagrangianScalarDynamicField& e();
181 
182  //- Internal energy for an injection [J/kg]
184  (
186  const LagrangianInjection&
187  ) const;
188 
189  using BasicThermoType::Cv;
190 
191  //- Heat capacity at constant volume for an injection [J/kg/K]
193  (
195  const LagrangianInjection&
196  ) const;
197 
198  //- Heat capacity at constant pressure for a sub-mesh [J/kg/K]
200  (
201  const LagrangianSubMesh&
202  ) const;
203 
204  //- Coefficient of thermal expansion for a sub-mesh [1/K]
206  (
207  const LagrangianSubMesh&
208  ) const;
209 
210 
211  // Transport Properties
212 
214 
215  //- Thermal conductivity for an injection [W/m/K]
217  (
219  const LagrangianInjection&
220  ) const;
221 
222 
223  //- Read thermophysical properties dictionary
224  using BasicThermoType::read;
225 
226  //- Read thermophysical properties dictionary
227  virtual bool read();
228 };
229 
230 
231 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232 
233 } // End namespace Foam
234 
235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 
237 #ifdef NoRepository
238  #include "BasicLagrangianThermo.C"
239 #endif
240 
241 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
242 
243 #endif
244 
245 // ************************************************************************* //
scalar Cv(const scalar p, const scalar T) const
Definition: HtoEthermo.H:2
Lagrangian thermodynamic model implementation and storage of energy. Provides overloads of the functi...
virtual const IOdictionary & properties() const
Access the properties dictionary.
virtual tmp< LagrangianSubScalarField > rho(const LagrangianSubScalarField &T, const LagrangianInjection &) const
Density for an injection [kg/m^3].
virtual tmp< LagrangianSubScalarField > W(const LagrangianSubMesh &) const
Molecular weight for a sub-mesh [kg/kmol].
virtual tmp< LagrangianSubScalarField > Cp(const LagrangianSubMesh &) const
Heat capacity at constant pressure for a sub-mesh [J/kg/K].
BasicLagrangianThermo(const LagrangianMesh &, const word &phaseName)
Construct from mesh and phase name.
virtual const LagrangianScalarDynamicField & e() const
Internal energy [J/kg].
MixtureType mixtureType
Mixture type.
tmp< LagrangianSubScalarField > LagrangianInjectionProperty(const LagrangianInjection &injection, const LagrangianSubMesh &subMesh, const word &psiName, const dimensionSet &psiDim, Mixture mixture, Method psiMethod, const Args &... args) const
Return a LagrangianSubScalarField of the given property.
tmp< LagrangianSubScalarField > LagrangianSubScalarFieldProperty(const LagrangianSubMesh &subMesh, const word &psiName, const dimensionSet &psiDim, Mixture mixture, Method psiMethod, const Args &... args) const
Return a LagrangianSubScalarField of the given property.
BasicThermoType basicThermoType
Basic thermo.
tmp< LagrangianInternalScalarField > LagrangianInternalScalarFieldProperty(const word &psiName, const dimensionSet &psiDim, Mixture mixture, Method psiMethod, const Args &... args) const
Return a LagrangianInternalScalarField of the given property.
virtual word thermoName() const
Return the full name of the thermodynamic model.
LagrangianScalarDynamicField e_
Internal energy [J/kg].
virtual tmp< LagrangianSubScalarField > kappa(const LagrangianSubScalarField &T, const LagrangianInjection &) const
Thermal conductivity for an injection [W/m/K].
virtual tmp< LagrangianSubScalarField > alphav(const LagrangianSubMesh &) const
Coefficient of thermal expansion for a sub-mesh [1/K].
virtual tmp< LagrangianSubScalarField > Cv(const LagrangianSubScalarField &T, const LagrangianInjection &) const
Heat capacity at constant volume for an injection [J/kg/K].
virtual ~BasicLagrangianThermo()
Destructor.
virtual bool read()
Read thermophysical properties dictionary.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility ...
Class containing Lagrangian geometry and topology.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Dimension set for the base types.
Definition: dimensionSet.H:125
A base class for physical properties.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
rho
Definition: pEqn.H:1
void read(Istream &, label &, const dictionary &)
In-place read with dictionary lookup.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Namespace for OpenFOAM.
TemplateName(FvFaceCellWave)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
Foam::argList args(argc, argv)