Forward compatibility: flex
[foam-extend-3.2.git] / src / solidModels / constitutiveModel / cohesiveLaws / dugdaleCohesiveLaw / dugdaleCohesiveLaw.C
blob12423907a5364e5f3a0d2d2902053c21d4025840
1 /*---------------------------------------------------------------------------*\
2   =========                 |
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 -------------------------------------------------------------------------------
8 License
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 "dugdaleCohesiveLaw.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "zeroGradientFvPatchFields.H"
29 #include "fvc.H"
30 #include "cohesiveFvPatch.H"
31 #include "cohesiveLaw.H"
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 namespace Foam
37     defineTypeNameAndDebug(dugdaleCohesiveLaw, 0);
38     addToRunTimeSelectionTable(cohesiveLaw, dugdaleCohesiveLaw, dictionary);
42 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
44 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
46 // Construct from dictionary
47 Foam::dugdaleCohesiveLaw::dugdaleCohesiveLaw
49     const word& name,
50     const volSymmTensorField& sigma,
51     const dictionary& dict
54   cohesiveLaw(name, sigma, dict),
55   GIc_(dict.lookup("GIc")),
56   GIIc_(dict.lookup("GIIc")),
57   sigmaMax_(dict.lookup("sigmaMax")),
58   tauMax_(dict.lookup("tauMax"))
62 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
64 Foam::dugdaleCohesiveLaw::~dugdaleCohesiveLaw()
68 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
70 Foam::tmp<Foam::volScalarField> Foam::dugdaleCohesiveLaw::materials() const
72   notImplemented(type() + "::materials()");
74     return tmp<volScalarField>
75     (
76         new volScalarField
77         (
78             IOobject
79             (
80                 "materials",
81                 mesh().time().timeName(),
82                 mesh(),
83                 IOobject::NO_READ,
84                 IOobject::NO_WRITE
85             ),
86             mesh(),
87             dimensionedScalar("zero", dimless, 0.0)
88         )
89     );
92 Foam::tmp<Foam::surfaceScalarField> Foam::dugdaleCohesiveLaw::sigmaMax() const
94     return tmp<surfaceScalarField>
95     (
96         new surfaceScalarField
97         (
98             IOobject
99             (
100                 "sigmaMax",
101                 mesh().time().timeName(),
102                 mesh(),
103                 IOobject::NO_READ,
104                 IOobject::NO_WRITE
105             ),
106             mesh(),
107             sigmaMax_
108         )
109     );
112 Foam::tmp<Foam::surfaceScalarField> Foam::dugdaleCohesiveLaw::tauMax() const
114     return tmp<surfaceScalarField>
115     (
116         new surfaceScalarField
117         (
118             IOobject
119             (
120                 "tauMax",
121                 mesh().time().timeName(),
122                 mesh(),
123                 IOobject::NO_READ,
124                 IOobject::NO_WRITE
125             ),
126             mesh(),
127             tauMax_
128         )
129     );
132 Foam::tmp<Foam::surfaceScalarField> Foam::dugdaleCohesiveLaw::GIc() const
134     return tmp<surfaceScalarField>
135     (
136         new surfaceScalarField
137         (
138             IOobject
139             (
140                 "GIc",
141                 mesh().time().timeName(),
142                 mesh(),
143                 IOobject::NO_READ,
144                 IOobject::NO_WRITE
145             ),
146             mesh(),
147             GIc_
148         )
149     );
152 Foam::tmp<Foam::surfaceScalarField> Foam::dugdaleCohesiveLaw::GIIc() const
154     return tmp<surfaceScalarField>
155     (
156         new surfaceScalarField
157         (
158             IOobject
159             (
160                 "GIIc",
161                 mesh().time().timeName(),
162                 mesh(),
163                 IOobject::NO_READ,
164                 IOobject::NO_WRITE
165             ),
166             mesh(),
167             GIIc_
168         )
169     );
173 void Foam::dugdaleCohesiveLaw::damageTractions
175  scalar& tN,
176  scalar& tS,
177  const scalar deltaN,
178  const scalar deltaS,
179  const scalar GI,
180  const scalar GII,
181  const label faceID,
182  const scalarField& globalPatchMaterials
183  ) const
185   // Update normal traction
186   tN = (
187     sigmaMax_.value() * deltaN /
188     (SMALL + ::sqrt( (deltaN*deltaN)
189                      + (deltaS*deltaS)*(sigmaMax_.value()*sigmaMax_.value()
190                                         /(tauMax_.value()*tauMax_.value()))
191         )
192         )
193     );
195   // Update shear traction
196   tS = (
197     tauMax_.value() * deltaS /
198     (SMALL + ::sqrt( (deltaS*deltaS)
199                      + (deltaN*deltaN)*(tauMax_.value()*tauMax_.value()
200                                         /(sigmaMax_.value()*sigmaMax_.value()))
201         )
202         )
203     );
207 Foam::tmp<Foam::surfaceVectorField>
208 Foam::dugdaleCohesiveLaw::interfaceTraction
210  surfaceVectorField n,
211  volVectorField U,
212  volTensorField gradU,
213  volScalarField mu,
214  volScalarField lambda
215  ) const
217   notImplemented(type() + "::interfaceTraction()");
219     tmp<surfaceVectorField> tresult
220     (
221         new surfaceVectorField
222         (
223             IOobject
224             (
225             "interfaceTraction",
226             mesh().time().timeName(),
227             mesh(),
228             IOobject::NO_READ,
229             IOobject::NO_WRITE
230         ),
231             mesh(),
232             dimensionedVector("zero", dimForce/dimArea, vector(0, 0, 0))
233     )
234     );
236     return tresult;
239 // ************************************************************************* //