solidEquilibriumEnergySource.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-2022 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::solidEquilibriumEnergySource
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 solidEquilibriumEnergySource;
49 
50  solidPhase solid;
51  }
52  \endverbatim
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef solidEquilibriumEnergySource_H
57 #define solidEquilibriumEnergySource_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 solidEquilibriumEnergySource Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class solidEquilibriumEnergySource
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("solidEquilibriumEnergySource");
103 
104 
105  // Constructors
106 
107  //- Construct from components
109  (
110  const word& name,
111  const word& modelType,
112  const dictionary& dict,
113  const fvMesh& mesh
114  );
115 
116  //- Disallow default bitwise copy construction
118  (
120  ) = delete;
121 
122 
123  //- Destructor
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&,
143  const word& fieldName
144  ) const;
145 
146  //- Explicit and implicit sources for phase equations
147  virtual void addSup
148  (
149  const volScalarField&,
150  const volScalarField&,
152  const word& fieldName
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 solidEquilibriumEnergySource&) = delete;
181 };
182 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 } // End namespace fv
187 } // End namespace Foam
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
dictionary dict
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:28
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual bool read(const dictionary &dict)
Read dictionary.
This fvModel adds the thermal inertia of a solid phase into the energy equation. It assumes that the ...
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:34
virtual bool movePoints()
Update for mesh motion.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:72
Base-class for solid thermodynamic properties.
Definition: solidThermo.H:53
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
void operator=(const solidEquilibriumEnergySource &)=delete
Disallow default bitwise assignment.
virtual void addSup(const volScalarField &, fvMatrix< scalar > &, const word &fieldName) const
Explicit and implicit sources for compressible equations.
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:50
solidEquilibriumEnergySource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
TypeName("solidEquilibriumEnergySource")
Runtime type information.
Namespace for OpenFOAM.