solidLagrangianThermo.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::solidLagrangianThermo
26 
27 Description
28  Base-class for solid Lagrangian thermodynamic models
29 
30 SourceFiles
31  solidLagrangianThermo.C
32  solidLagrangianThermoTemplates.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef solidLagrangianThermo_H
37 #define solidLagrangianThermo_H
38 
39 #include "SolidLagrangianThermo.H"
40 #include "pureLagrangianThermo.H"
42 #include "uniformGeometricFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class solidLagrangianThermo Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  virtual public basicLagrangianThermo
56 {
57 public:
58 
59  // Public Classes
60 
61  //- Forward declare the implementation class
62  class implementation;
63 
64  //- Forward declare the composite class
65  class composite;
66 
67 
68  // Public Typedefs
69 
70  //- The derived type
71  template<class MixtureType>
72  using DerivedThermoType =
74  <
76  <
77  MixtureType,
78  composite
79  >
80  >;
81 
82  //- The derived name
83  static word derivedThermoName()
84  {
85  return "heSolidThermo";
86  }
87 
88 
89  //- Runtime type information
90  TypeName("solidLagrangianThermo");
91 
92 
93  //- Declare run-time constructor selection table
95  (
96  autoPtr,
99  (const LagrangianMesh& mesh, const word& phaseName),
100  (mesh, phaseName)
101  );
102 
103 
104  // Selectors
105 
106  //- Select a solid thermo
108  (
109  const LagrangianMesh& mesh,
110  const word& phaseName=word::null
111  );
112 
113 
114  //- Destructor
115  virtual ~solidLagrangianThermo();
116 
117 
118  // Member Functions
119 
120  //- Initialise state
121  virtual void initialise();
122 
123  //- Update the pressure (does nothing)
124  virtual void correctPressure(const LagrangianSubMesh&);
125 };
126 
127 
128 /*---------------------------------------------------------------------------*\
129  Class solidLagrangianThermo::implementation Declaration
130 \*---------------------------------------------------------------------------*/
131 
133 :
134  virtual public solidLagrangianThermo
135 {
136 protected:
137 
138  // Protected Data
139 
140  //- Pressure [Pa]
141  // Note: This value should never be used. Solid thermo should only be
142  // instantiated with thermo models that do not depend on pressure.
143  // This uniform field takes a value of NaN, so that if any thermo
144  // models that do depend on pressure are used then the code will exit.
145  uniformGeometricScalarField p_;
146 
147 
148  // Protected Member Functions
149 
150  //- Pressure for a sub-mesh [Pa]
152  (
153  const LagrangianSubMesh&
154  ) const;
155 
156  //- Pressure for an injection [Pa]
158  (
159  const LagrangianInjection&,
160  const LagrangianSubMesh&
161  ) const;
162 
163 
164 public:
165 
166  // Constructors
167 
168  //- Construct from dictionary, mesh and phase name
169  implementation(const dictionary&, const LagrangianMesh&, const word&);
170 
171 
172  //- Destructor
173  virtual ~implementation();
174 };
175 
176 
177 /*---------------------------------------------------------------------------*\
178  Class solidLagrangianThermo::composite Declaration
179 \*---------------------------------------------------------------------------*/
180 
182 :
184  public pureLagrangianThermo,
186 {
187 public:
188 
189  // Constructors
190 
191  //- Construct from dictionary, mesh and phase name
192  composite
193  (
194  const dictionary& dict,
195  const LagrangianMesh& mesh,
196  const word& phaseName
197  )
198  :
201  {}
202 
203  //- Construct from dictionary, mesh and phase name
204  template<class MixtureType>
205  composite
206  (
207  const dictionary& dict,
208  const MixtureType& mixture,
209  const LagrangianMesh& mesh,
210  const word& phaseName
211  )
212  :
214  {}
215 };
216 
217 
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 
220 } // End namespace Foam
221 
222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 
224 #endif
225 
226 // ************************************************************************* //
Lagrangian thermodynamic model implementation and storage of energy. Provides overloads of the functi...
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...
Solid Lagrangian thermodynamic model implementation.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
virtual const word & phaseName() const
Phase name.
virtual const LagrangianMesh & mesh() const
Return const access to the mesh.
Base-class for Lagrangian fluid and solid thermodynamic models.
virtual const LagrangianMesh & mesh() const =0
Access the mesh.
virtual const word & phaseName() const =0
Access the phase name.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Base-class for pure (i.e., single-component) Lagrangian thermodynamic models.
composite(const dictionary &dict, const LagrangianMesh &mesh, const word &phaseName)
Construct from dictionary, mesh and phase name.
tmp< uniformDimensionedScalarField > p(const LagrangianSubMesh &) const
Pressure for a sub-mesh [Pa].
uniformGeometricScalarField p_
Pressure [Pa].
implementation(const dictionary &, const LagrangianMesh &, const word &)
Construct from dictionary, mesh and phase name.
Base-class for solid Lagrangian thermodynamic models.
virtual void initialise()
Initialise state.
static word derivedThermoName()
The derived name.
virtual ~solidLagrangianThermo()
Destructor.
virtual void correctPressure(const LagrangianSubMesh &)
Update the pressure (does nothing)
declareRunTimeSelectionTable(autoPtr, solidLagrangianThermo, LagrangianMesh,(const LagrangianMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection table.
static autoPtr< solidLagrangianThermo > New(const LagrangianMesh &mesh, const word &phaseName=word::null)
Select a solid thermo.
TypeName("solidLagrangianThermo")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
static const word null
An empty word.
Definition: word.H:78
Namespace for OpenFOAM.
dictionary dict
Typedefs for UniformDimensionedField.
Typedefs for UniformGeometricField.