solidEqulibriumEnergySource.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 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::solidEqulibriumEnergySource
26 
27 Description
28  This option 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 constant/alpha.<phase>,
33  and the associated thermophysical properties are specified in
34  constant/thermophysicalProperties.<phase>.
35 
36 Usage
37  \table
38  Property | Description | Req'd? | Default
39  phase | Name of the solid phase | yes |
40  field | Name of the energy field to apply the option to \\
41  | yes |
42  \endtable
43 
44  Example specification:
45  \verbatim
46  <fvOptionName>
47  {
48  type solidEqulibriumEnergySource;
49  phase solid;
50  field e;
51  }
52  \endverbatim
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef solidEqulibriumEnergySource_H
57 #define solidEqulibriumEnergySource_H
58 
59 #include "fvOption.H"
60 #include "volFields.H"
61 #include "solidThermo.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace fv
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class solidEqulibriumEnergySource Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class solidEqulibriumEnergySource
75 :
76  public option
77 {
78  // Private Member Data
79 
80  //- The name of the phase
81  const word phaseName_;
82 
83  //- Get the volume fraction field
84  const volScalarField& alpha() const;
85 
86  //- Get the thermo
87  const solidThermo& thermo() const;
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("solidEqulibriumEnergySource");
94 
95 
96  // Constructors
97 
98  //- Construct from components
100  (
101  const word& name,
102  const word& modelType,
103  const dictionary& dict,
104  const fvMesh& mesh
105  );
106 
107  //- Disallow default bitwise copy construction
109  (
111  ) = delete;
112 
113 
114  //- Destructor
116 
117 
118  // Member Functions
119 
120  // Evaluation
121 
122  //- Explicit and implicit sources for compressible equations
123  virtual void addSup
124  (
125  const volScalarField&,
127  const label
128  );
129 
130  //- Explicit and implicit sources for phase equations
131  virtual void addSup
132  (
133  const volScalarField&,
134  const volScalarField&,
136  const label
137  );
138 
139 
140  // IO
141 
142  //- Read dictionary
143  virtual bool read(const dictionary& dict);
144 
145 
146  // Member Operators
147 
148  //- Disallow default bitwise assignment
149  void operator=(const solidEqulibriumEnergySource&) = delete;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace fv
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
This option adds the thermal inertia of a solid phase into the energy equation. It assumes that the s...
dictionary dict
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
virtual bool read(const dictionary &dict)
Read dictionary.
A class for handling words, derived from string.
Definition: word.H:59
labelList fv(nPoints)
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
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
solidEqulibriumEnergySource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:48
void operator=(const solidEqulibriumEnergySource &)=delete
Disallow default bitwise assignment.
virtual void addSup(const volScalarField &, fvMatrix< scalar > &, const label)
Explicit and implicit sources for compressible equations.
TypeName("solidEqulibriumEnergySource")
Runtime type information.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Namespace for OpenFOAM.