solidThermalEquilibrium.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) 2019-2024 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::fv::solidThermalEquilibrium
26 
27 Description
28  This fvModel adds the thermal inertia of a solid phase into the energy
29  equation. It assumes that the solid is in thermal equilibrium with the
30  surrounding fluid phase.
31 
32  The volume fraction of the solid phase is read from
33  constant/alpha.<solidPhase>, and the associated thermophysical properties
34  are specified in constant/thermophysicalProperties.<solidPhase>.
35 
36 Usage
37  \table
38  Property | Description | Req'd? | Default
39  phase | Name of the phase to which this fvModel applies \\
40  | no | none
41  solidPhase | Name of the solid phase | yes |
42  \endtable
43 
44  Example specification:
45  \verbatim
46  <fvModelName>
47  {
48  type solidThermalEquilibrium;
49 
50  solidPhase solid;
51  }
52  \endverbatim
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef solidThermalEquilibrium_H
57 #define solidThermalEquilibrium_H
58 
59 #include "fvModel.H"
60 #include "volFields.H"
61 #include "solidThermo.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace fv
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class solidThermalEquilibrium Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class solidThermalEquilibrium
75 :
76  public fvModel
77 {
78  // Private Member Data
79 
80  //- The name of the phase to which this fvModel applies
81  word phaseName_;
82 
83  //- The name of the solid phase
84  word solidPhaseName_;
85 
86 
87  // Private Member Functions
88 
89  //- Non-virtual read
90  void readCoeffs();
91 
92  //- Get the solid volume fraction field
93  const volScalarField& solidAlpha() const;
94 
95  //- Get the solid thermo
96  const Foam::solidThermo& solidThermo() const;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("solidThermalEquilibrium");
103 
104 
105  // Constructors
106 
107  //- Construct from components
109  (
110  const word& name,
111  const word& modelType,
112  const fvMesh& mesh,
113  const dictionary& dict
114  );
115 
116  //- Disallow default bitwise copy construction
118  (
120  ) = delete;
121 
122 
123  //- Destructor
124  virtual ~solidThermalEquilibrium();
125 
126 
127  // Member Functions
128 
129  // Checks
130 
131  //- Return the list of fields for which the fvModel adds source term
132  // to the transport equation
133  virtual wordList addSupFields() const;
134 
135 
136  // Evaluation
137 
138  //- Explicit and implicit sources for compressible equations
139  virtual void addSup
140  (
141  const volScalarField& rho,
142  const volScalarField& he,
143  fvMatrix<scalar>& eqn
144  ) const;
145 
146  //- Explicit and implicit sources for phase equations
147  virtual void addSup
148  (
149  const volScalarField& alpha,
150  const volScalarField& rho,
151  const volScalarField& he,
152  fvMatrix<scalar>& eqn
153  ) const;
154 
155 
156  // Mesh changes
157 
158  //- Update for mesh motion
159  virtual bool movePoints();
160 
161  //- Update topology using the given map
162  virtual void topoChange(const polyTopoChangeMap&);
163 
164  //- Update from another mesh using the given map
165  virtual void mapMesh(const polyMeshMap&);
166 
167  //- Redistribute or update using the given distribution map
168  virtual void distribute(const polyDistributionMap&);
169 
170 
171  // IO
172 
173  //- Read dictionary
174  virtual bool read(const dictionary& dict);
175 
176 
177  // Member Operators
178 
179  //- Disallow default bitwise assignment
180  void operator=(const solidThermalEquilibrium&) = delete;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace fv
187 } // End namespace Foam
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
Generic GeometricField class.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:53
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:47
This fvModel adds the thermal inertia of a solid phase into the energy equation. It assumes that the ...
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
void operator=(const solidThermalEquilibrium &)=delete
Disallow default bitwise assignment.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void addSup(const volScalarField &rho, const volScalarField &he, fvMatrix< scalar > &eqn) const
Explicit and implicit sources for compressible equations.
TypeName("solidThermalEquilibrium")
Runtime type information.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
solidThermalEquilibrium(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Base-class for solid thermodynamic properties.
Definition: solidThermo.H:59
A class for handling words, derived from string.
Definition: word.H:62
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
thermo he()
labelList fv(nPoints)
dictionary dict