1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "linearElastic.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "zeroGradientFvPatchFields.H"
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 defineTypeNameAndDebug(linearElastic, 0);
35 addToRunTimeSelectionTable(rheologyLaw, linearElastic, dictionary);
39 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44 // Construct from dictionary
45 Foam::linearElastic::linearElastic
48 const volSymmTensorField& sigma,
49 const dictionary& dict
52 rheologyLaw(name, sigma, dict),
53 rho_(dict.lookup("rho")),
55 nu_(dict.lookup("nu"))
59 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
61 Foam::linearElastic::~linearElastic()
65 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
67 Foam::tmp<Foam::volScalarField> Foam::linearElastic::rho() const
69 tmp<volScalarField> tresult
76 mesh().time().timeName(),
83 zeroGradientFvPatchScalarField::typeName
87 tresult().correctBoundaryConditions();
93 Foam::tmp<Foam::volScalarField> Foam::linearElastic::E() const
95 tmp<volScalarField> tresult
102 mesh().time().timeName(),
109 zeroGradientFvPatchScalarField::typeName
113 tresult().correctBoundaryConditions();
119 Foam::tmp<Foam::volScalarField> Foam::linearElastic::nu() const
121 tmp<volScalarField> tresult
128 mesh().time().timeName(),
135 zeroGradientFvPatchScalarField::typeName
139 tresult().correctBoundaryConditions();
144 Foam::tmp<Foam::volScalarField> Foam::linearElastic::Ep() const
146 // notImplemented(type() + "::Ep()");
148 return tmp<volScalarField>
155 mesh().time().timeName(),
161 dimensionedScalar("zeroEp", dimForce/dimArea, 0.0),
162 zeroGradientFvPatchScalarField::typeName
167 Foam::tmp<Foam::volScalarField> Foam::linearElastic::sigmaY() const
169 // notImplemented(type() + "::sigmaY()");
171 return tmp<volScalarField>
178 mesh().time().timeName(),
184 dimensionedScalar("zeroSigmaY", dimForce/dimArea, GREAT),
185 zeroGradientFvPatchScalarField::typeName
191 Foam::linearElastic::sigmaY(const scalar epsilonPEq, const label cellID) const
196 // ************************************************************************* //