solidDisplacementThermo.C
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 \*---------------------------------------------------------------------------*/
25 
27 
28 /* * * * * * * * * * * * * * * Private Static Data * * * * * * * * * * * * * */
29 
30 namespace Foam
31 {
33 }
34 
35 
36 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37 
39 (
40  const fvMesh& mesh,
41  const word& phaseName
42 )
43 :
44  constSolidThermo(mesh, phaseName),
45  planeStress_(lookup("planeStress")),
46  thermalStress_(lookup("thermalStress")),
47  E_(readProperty<scalar>("E", dimPressure)),
48  nu_(readProperty<scalar>("nu", dimless)),
49  alphav_(readProperty<scalar>("alphav", dimless/dimTemperature))
50 {}
51 
52 
53 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
54 
56 {}
57 
58 
59 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
60 
62 {
63  return E_;
64 }
65 
66 
68 (
69  const label patchi
70 ) const
71 {
72  return E_.boundaryField()[patchi];
73 }
74 
75 
77 {
78  return nu_;
79 }
80 
81 
83 (
84  const label patchi
85 ) const
86 {
87  return nu_.boundaryField()[patchi];
88 }
89 
90 
92 {
93  return alphav_;
94 }
95 
96 
98 (
99  const label patchi
100 ) const
101 {
102  return alphav_.boundaryField()[patchi];
103 }
104 
105 
106 // ************************************************************************* //
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Uniform or non-uniform constant solid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Fundamental solid thermodynamic properties.
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 [].
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
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
const dimensionSet dimPressure
const dimensionSet dimless
const dimensionSet dimTemperature
defineTypeNameAndDebug(combustionModel, 0)