solidDisplacementThermo.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-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::solidDisplacementThermo
26 
27 Description
28  Fundamental solid thermodynamic properties
29 
30 SourceFiles
31  solidDisplacementThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef solidDisplacementThermo_H
36 #define solidDisplacementThermo_H
37 
38 #include "constSolidThermo.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class solidDisplacementThermo Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public constSolidThermo
52 {
53  // Private data
54 
55  //- Switch to enable plane stress
56  Switch planeStress_;
57 
58  //- Switch to enable thermal stress
59  Switch thermalStress_;
60 
61  //- Youngs modulus [Pa]
62  volScalarField E_;
63 
64  //- Poisson's ratio []
65  volScalarField nu_;
66 
67  //- Volumetric thermal expansion coefficient [1/T]
68  volScalarField alphav_;
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("solidDisplacementThermo");
75 
76 
77  // Constructors
78 
79  //- Construct from mesh and phase name
81  (
82  const fvMesh&,
83  const word& phaseName = word::null
84  );
85 
86 
87  //- Destructor
88  virtual ~solidDisplacementThermo();
89 
90 
91  // Member Functions
92 
93  //- Returns true to enable plane stress
94  bool planeStress() const
95  {
96  return planeStress_;
97  }
98 
99  //- Returns true to enable thermal stress
100  bool thermalStress() const
101  {
102  return thermalStress_;
103  }
104 
105 
106  // Mechanical state
107 
108  //- Youngs modulus [Pa]
109  virtual const volScalarField& E() const;
110 
111  //- Youngs modulus for a patch [Pa]
112  virtual const scalarField& E(const label patchi) const;
113 
114  //- Poisson's ratio []
115  virtual const volScalarField& nu() const;
116 
117  //- Poisson's ratio for a patch[]
118  virtual const scalarField& nu(const label patchi) const;
119 
120  //- Volumetric thermal expansion coefficient [1/T]
121  virtual const volScalarField& alphav() const;
122 
123  //- Volumetric thermal expansion coefficient for a patch [1/T]
124  virtual const scalarField& alphav(const label patchi) const;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
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
virtual const word & phaseName() const
Phase name.
Definition: basicThermo.H:502
Uniform or non-uniform constant solid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Fundamental solid thermodynamic properties.
bool planeStress() const
Returns true to enable plane stress.
TypeName("solidDisplacementThermo")
Runtime type information.
virtual const volScalarField & E() const
Youngs modulus [Pa].
virtual const volScalarField & alphav() const
Volumetric thermal expansion coefficient [1/T].
virtual const volScalarField & nu() const
Poisson's ratio [].
bool thermalStress() const
Returns true to enable thermal stress.
virtual ~solidDisplacementThermo()
Destructor.
solidDisplacementThermo(const fvMesh &, const word &phaseName=word::null)
Construct from mesh and phase name.
A class for handling words, derived from string.
Definition: word.H:62
static const word null
An empty word.
Definition: word.H:77
label patchi
Namespace for OpenFOAM.
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