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  //- Read controls
127  virtual void readControls();
128 
129 
130 public:
131 
132  // Public Data
133 
134  //- Reference to the solid thermophysical properties
136 
137  //- Reference to the Displacement field
138  const volVectorField& D;
139 
140 
141  //- Runtime type information
142  TypeName("solidDisplacement");
143 
144 
145  // Constructors
146 
147  //- Construct from region mesh
149 
150  //- Disallow default bitwise copy construction
151  solidDisplacement(const solidDisplacement&) = delete;
152 
153 
154  //- Destructor
155  virtual ~solidDisplacement();
156 
157 
158  // Member Functions
159 
160  //- Called at the beginning of the PIMPLE loop
161  virtual void prePredictor();
162 
163  //- Construct and solve the energy equation,
164  // convert to temperature
165  // and update thermophysical and transport properties
166  virtual void thermophysicalPredictor();
167 
168  //- Construct and solve the displacement equation to obtain the stress
169  virtual void pressureCorrector();
170 
171  //- Correct the thermophysical transport modelling
172  virtual void postCorrector();
173 
174  //- Called after the PIMPLE loop at the end of the time-step
175  virtual void postSolve();
176 
177 
178  // Member Operators
179 
180  //- Disallow default bitwise assignment
181  void operator=(const solidDisplacement&) = delete;
182 };
183 
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 } // End namespace solvers
188 } // End namespace Foam
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
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:101
Fundamental solid thermodynamic properties.
const fvMesh & mesh
Region mesh.
Definition: solver.H:94
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.
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.
virtual void readControls()
Read controls.
int nCorr
Maximum number of displacement/stress correctors per time-step.
solidDisplacementThermo & thermo_
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.