solid.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) 2022-2023 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::solvers::solid
26 
27 Description
28  Solver module for thermal transport in solid domains and regions for
29  conjugate heat transfer, HVAC and similar applications, with optional mesh
30  motion and mesh topology changes.
31 
32 SourceFiles
33  solid.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef solid_H
38 #define solid_H
39 
40 #include "solver.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace solvers
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class solid Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class solid
55 :
56  public solver
57 {
58 
59 protected:
60 
61  // Control parameters
62 
63  scalar maxDi;
64 
65  scalar maxDeltaT_;
66 
67 
68  // Thermophysical properties
69 
71 
73 
75 
76 
77  // Thermophysical transport
78 
79  //- Pointer to the solid thermophysical transport model
81 
82 
83  // Time-step controls
84 
85  scalar DiNum;
86 
87 
88  // Protected Member Functions
89 
90  //- Read controls
91  virtual void readControls();
92 
93 
94 private:
95 
96  // Private Member Functions
97 
98  //- Correct the cached Courant numbers
99  void correctDiNum();
100 
101 
102 public:
103 
104  // Public Data
105 
106  //- Reference to the solid thermophysical properties
107  const solidThermo& thermo;
108 
109  //- Reference to the temperature field
110  const volScalarField& T;
111 
112 
113  //- Runtime type information
114  TypeName("solid");
115 
116 
117  // Constructors
118 
119  //- Construct from region mesh and thermophysical properties
121 
122  //- Construct from region mesh
123  solid(fvMesh& mesh);
124 
125  //- Disallow default bitwise copy construction
126  solid(const solid&) = delete;
127 
128 
129  //- Destructor
130  virtual ~solid();
131 
132 
133  // Member Functions
134 
135  //- Return the current maximum time-step for stable solution
136  virtual scalar maxDeltaT() const;
137 
138  //- Called at the start of the time-step, before the PIMPLE loop
139  virtual void preSolve();
140 
141  //- Called at the start of the PIMPLE loop to move the mesh
142  virtual void moveMesh();
143 
144  //- Called at the beginning of the PIMPLE loop
145  virtual void prePredictor();
146 
147  //- Construct and optionally solve the momentum equation
148  virtual void momentumPredictor();
149 
150  //- Construct and solve the energy equation,
151  // convert to temperature
152  // and update thermophysical and transport properties
153  virtual void thermophysicalPredictor();
154 
155  //- Construct and solve the pressure equation in the PISO loop
156  virtual void pressureCorrector();
157 
158  //- Correct the thermophysical transport modelling
159  virtual void postCorrector();
160 
161  //- Called after the PIMPLE loop at the end of the time-step
162  virtual void postSolve();
163 
164 
165  // Member Operators
166 
167  //- Disallow default bitwise assignment
168  void operator=(const solid&) = delete;
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace solvers
175 } // End namespace Foam
176 
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 
179 #endif
180 
181 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Base-class for solid thermodynamic properties.
Definition: solidThermo.H:56
Abstract base class for run-time selectable region solvers.
Definition: solver.H:55
const fvMesh & mesh
Region mesh.
Definition: solver.H:94
Solver module for thermal transport in solid domains and regions for conjugate heat transfer,...
Definition: solid.H:56
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
Definition: solid.C:203
virtual void prePredictor()
Called at the beginning of the PIMPLE loop.
Definition: solid.C:190
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
Definition: solid.C:244
virtual void moveMesh()
Called at the start of the PIMPLE loop to move the mesh.
Definition: solid.C:173
virtual scalar maxDeltaT() const
Return the current maximum time-step for stable solution.
Definition: solid.C:143
TypeName("solid")
Runtime type information.
autoPtr< solidThermo > thermoPtr_
Definition: solid.H:69
const solidThermo & thermo
Reference to the solid thermophysical properties.
Definition: solid.H:106
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
Definition: solid.C:231
virtual void postCorrector()
Correct the thermophysical transport modelling.
Definition: solid.C:235
virtual void momentumPredictor()
Construct and optionally solve the momentum equation.
Definition: solid.C:199
autoPtr< solidThermophysicalTransportModel > thermophysicalTransport
Pointer to the solid thermophysical transport model.
Definition: solid.H:79
virtual void readControls()
Read controls.
Definition: solid.C:46
volScalarField & T_
Definition: solid.H:73
void operator=(const solid &)=delete
Disallow default bitwise assignment.
solid(fvMesh &mesh, autoPtr< solidThermo >)
Construct from region mesh and thermophysical properties.
Definition: solid.C:90
const volScalarField & T
Reference to the temperature field.
Definition: solid.H:109
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
Definition: solid.C:156
solidThermo & thermo_
Definition: solid.H:71
scalar maxDeltaT_
Definition: solid.H:64
virtual ~solid()
Destructor.
Definition: solid.C:137
Namespace for OpenFOAM.