solidDisplacement.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) 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::solidDisplacement
26 
27 Description
28  Solver module for steady or transient segregated finite-volume solution of
29  linear-elastic, small-strain deformation of a solid body, with optional
30  thermal diffusion and thermal stresses.
31 
32  Solves for the displacement vector field D, also generating the stress
33  tensor field sigma, including the thermal stress contribution if selected.
34 
35 SourceFiles
36  solidDisplacement.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef solidDisplacement_H
41 #define solidDisplacement_H
42 
43 #include "solid.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace solvers
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class solidDisplacement Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public solid
60 {
61 
62 protected:
63 
64  // Thermophysical properties
65 
67 
68 
69  // Solution algorithm controls
70 
71  //- Switch for normal stress discretisation (required)
72  // The compact form uses snGrad (more convergent, less accurate)
73  // The non-compact form uses grad (less convergent, more accurate)
75 
76  //- Maximum number of displacement/stress correctors per time-step
77  // Defaults to 1
78  int nCorr;
79 
80  //- Convergence tolerance for the displacement/stress correctors
81  // Defaults to 0
82  scalar convergenceTolerance;
83 
84  //- Acceleration factor for faster steady-state simulations
85  // Applies over-relaxation to the displacement field after solution
86  // Typically between 1 and 2, the optimal value is case dependent
87  // and should be selected to maximise convergence rate while
88  // maintaining stability.
89  // Should be set lower for higher Poisson's ratios for stability.
90  scalar accFac;
91 
92 
93  // Kinematic properties
94 
95  //- Displacement field
97 
98  //- Young's modulus
99  const volScalarField& E;
100 
101  //- Poisson's ratio
102  const volScalarField& nu;
103 
104  //- Lame's coefficient
105  const volScalarField mu;
106 
107  //- Lame's coefficient
108  const volScalarField lambda;
109 
110  const volScalarField threeK;
111 
113 
114 
115  // Cached temporary fields
116 
117  //- Stress field
119 
120  //- Divergence of the explicit part of the stress
122 
123 
124  // Protected Member Functions
125 
126  //- Return true if the solver's dependencies have been modified
127  virtual bool dependenciesModified() const;
128 
129  //- Read controls
130  virtual bool read();
131 
132 
133 public:
134 
135  // Public Data
136 
137  //- Reference to the solid thermophysical properties
139 
140  //- Reference to the Displacement field
141  const volVectorField& D;
142 
143 
144  //- Runtime type information
145  TypeName("solidDisplacement");
146 
147 
148  // Constructors
149 
150  //- Construct from region mesh
152 
153  //- Disallow default bitwise copy construction
154  solidDisplacement(const solidDisplacement&) = delete;
155 
156 
157  //- Destructor
158  virtual ~solidDisplacement();
159 
160 
161  // Member Functions
162 
163  //- Called at the beginning of the PIMPLE loop
164  virtual void prePredictor();
165 
166  //- Construct and solve the energy equation,
167  // convert to temperature
168  // and update thermophysical and transport properties
169  virtual void thermophysicalPredictor();
170 
171  //- Construct and solve the displacement equation to obtain the stress
172  virtual void pressureCorrector();
173 
174  //- Correct the thermophysical transport modelling
175  virtual void postCorrector();
176 
177  //- Called after the PIMPLE loop at the end of the time-step
178  virtual void postSolve();
179 
180 
181  // Member Operators
182 
183  //- Disallow default bitwise assignment
184  void operator=(const solidDisplacement&) = delete;
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace solvers
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
Generic GeometricField class.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:61
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Fundamental solid thermodynamic properties.
const fvMesh & mesh
Region mesh.
Definition: solver.H:101
Solver module for steady or transient segregated finite-volume solution of linear-elastic,...
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
const solidDisplacementThermo & thermo
Reference to the solid thermophysical properties.
const volScalarField & nu
Poisson's ratio.
scalar convergenceTolerance
Convergence tolerance for the displacement/stress correctors.
virtual ~solidDisplacement()
Destructor.
virtual void prePredictor()
Called at the beginning of the PIMPLE loop.
virtual void postSolve()
Called after the PIMPLE loop at the end of the time-step.
scalar accFac
Acceleration factor for faster steady-state simulations.
Switch compactNormalStress
Switch for normal stress discretisation (required)
const volScalarField lambda
Lame's coefficient.
TypeName("solidDisplacement")
Runtime type information.
const volScalarField & E
Young's modulus.
virtual bool dependenciesModified() const
Return true if the solver's dependencies have been modified.
solidDisplacement(fvMesh &mesh)
Construct from region mesh.
const volVectorField & D
Reference to the Displacement field.
const volScalarField mu
Lame's coefficient.
volVectorField divSigmaExp
Divergence of the explicit part of the stress.
virtual void pressureCorrector()
Construct and solve the displacement equation to obtain the stress.
virtual void postCorrector()
Correct the thermophysical transport modelling.
volSymmTensorField sigmaD
Stress field.
volVectorField D_
Displacement field.
int nCorr
Maximum number of displacement/stress correctors per time-step.
solidDisplacementThermo & thermo_
virtual bool read()
Read controls.
void operator=(const solidDisplacement &)=delete
Disallow default bitwise assignment.
Solver module for thermal transport in solid domains and regions for conjugate heat transfer,...
Definition: solid.H:56
Namespace for OpenFOAM.