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-2025 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 maxDeltaT_;
64 
65 
66  // Thermophysical properties
67 
69 
71 
73 
74 
75  // Thermophysical transport
76 
77  //- Pointer to the solid thermophysical transport model
79 
80 
81  // Protected Member Functions
82 
83  //- Return true if the solver's dependencies have been modified
84  virtual bool dependenciesModified() const;
85 
86  //- Read controls
87  virtual bool read();
88 
89 
90 public:
91 
92  // Public Data
93 
94  //- Reference to the solid thermophysical properties
95  const solidThermo& thermo;
96 
97  //- Reference to the temperature field
98  const volScalarField& T;
99 
100 
101  //- Runtime type information
102  TypeName("solid");
103 
104 
105  // Constructors
106 
107  //- Construct from region mesh and thermophysical properties
109 
110  //- Construct from region mesh
111  solid(fvMesh& mesh);
112 
113  //- Disallow default bitwise copy construction
114  solid(const solid&) = delete;
115 
116 
117  //- Destructor
118  virtual ~solid();
119 
120 
121  // Member Functions
122 
123  //- Return the current maximum time-step for stable solution
124  virtual scalar maxDeltaT() const;
125 
126  //- Called at the start of the time-step, before the PIMPLE loop
127  virtual void preSolve();
128 
129  //- Called at the start of the PIMPLE loop to move the mesh
130  virtual void moveMesh();
131 
132  //- Corrections that follow mesh motion
133  virtual void motionCorrector();
134 
135  //- Called at the beginning of the PIMPLE loop
136  virtual void prePredictor();
137 
138  //- Predict the momentum transport
139  virtual void momentumTransportPredictor();
140 
141  //- Predict thermophysical transport
142  virtual void thermophysicalTransportPredictor();
143 
144  //- Construct and optionally solve the momentum equation
145  virtual void momentumPredictor();
146 
147  //- Construct and solve the energy equation,
148  // convert to temperature
149  // and update thermophysical and transport properties
150  virtual void thermophysicalPredictor();
151 
152  //- Construct and solve the pressure equation in the PISO loop
153  virtual void pressureCorrector();
154 
155  //- Correct the momentum transport
156  virtual void momentumTransportCorrector();
157 
158  //- Correct the thermophysical transport
159  virtual void thermophysicalTransportCorrector();
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:96
Base-class for solid thermodynamic properties.
Definition: solidThermo.H:59
Abstract base class for run-time selectable region solvers.
Definition: solver.H:56
const fvMesh & mesh
Region mesh.
Definition: solver.H:101
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:169
virtual void momentumTransportCorrector()
Correct the momentum transport.
Definition: solid.C:201
virtual void prePredictor()
Called at the beginning of the PIMPLE loop.
Definition: solid.C:151
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
Definition: solid.C:211
virtual void momentumTransportPredictor()
Predict the momentum transport.
Definition: solid.C:155
virtual bool dependenciesModified() const
Return true if the solver's dependencies have been modified.
Definition: solid.C:46
virtual void moveMesh()
Called at the start of the PIMPLE loop to move the mesh.
Definition: solid.C:130
virtual scalar maxDeltaT() const
Return the current maximum time-step for stable solution.
Definition: solid.C:115
TypeName("solid")
Runtime type information.
virtual void motionCorrector()
Corrections that follow mesh motion.
Definition: solid.C:147
autoPtr< solidThermo > thermoPtr_
Definition: solid.H:67
const solidThermo & thermo
Reference to the solid thermophysical properties.
Definition: solid.H:94
virtual void pressureCorrector()
Construct and solve the pressure equation in the PISO loop.
Definition: solid.C:197
virtual void momentumPredictor()
Construct and optionally solve the momentum equation.
Definition: solid.C:165
autoPtr< solidThermophysicalTransportModel > thermophysicalTransport
Pointer to the solid thermophysical transport model.
Definition: solid.H:77
virtual void thermophysicalTransportCorrector()
Correct the thermophysical transport.
Definition: solid.C:205
volScalarField & T_
Definition: solid.H:71
void operator=(const solid &)=delete
Disallow default bitwise assignment.
solid(fvMesh &mesh, autoPtr< solidThermo >)
Construct from region mesh and thermophysical properties.
Definition: solid.C:68
const volScalarField & T
Reference to the temperature field.
Definition: solid.H:97
virtual void preSolve()
Called at the start of the time-step, before the PIMPLE loop.
Definition: solid.C:121
solidThermo & thermo_
Definition: solid.H:69
scalar maxDeltaT_
Definition: solid.H:62
virtual void thermophysicalTransportPredictor()
Predict thermophysical transport.
Definition: solid.C:159
virtual bool read()
Read controls.
Definition: solid.C:52
virtual ~solid()
Destructor.
Definition: solid.C:109
Namespace for OpenFOAM.