Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticNonLinULSolidFoam / createFields.H
blob891b94b107dd22629540cc706984c385dec6eace
1     Info<< "Reading incremental displacement field DU\n" << endl;
2     volVectorField DU
3     (
4         IOobject
5         (
6             "DU",
7             runTime.timeName(),
8             mesh,
9             IOobject::MUST_READ,
10             IOobject::AUTO_WRITE
11         ),
12         mesh
13     );
15     volTensorField gradDU = fvc::grad(DU);
17     Info<< "Reading accumulated displacement field U\n" << endl;
18     volVectorField U
19     (
20         IOobject
21         (
22             "U",
23             runTime.timeName(),
24             mesh,
25             IOobject::READ_IF_PRESENT,
26             IOobject::AUTO_WRITE
27         ),
28         mesh,
29         dimensionedVector("zero", dimLength, vector::zero)
30     );
32     Info << "Reading accumulated strain field epsilon\n" << endl;
33     volSymmTensorField epsilon
34     (
35         IOobject
36         (
37             "epsilon",
38             runTime.timeName(),
39             mesh,
40             IOobject::READ_IF_PRESENT,
41             IOobject::AUTO_WRITE
42         ),
43         mesh,
44         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
45     );
47     volSymmTensorField DEpsilon
48     (
49         IOobject
50         (
51             "DEpsilon",
52             runTime.timeName(),
53             mesh,
54             IOobject::READ_IF_PRESENT,
55             IOobject::AUTO_WRITE
56         ),
57         mesh,
58         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
59     );
61     Info << "Reading accumulated stress field sigma\n" << endl;
62     volSymmTensorField sigma
63     (
64         IOobject
65         (
66             "sigma",
67             runTime.timeName(),
68             mesh,
69             IOobject::READ_IF_PRESENT,
70             IOobject::AUTO_WRITE
71         ),
72         mesh,
73         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
74     );
77     Info << "Reading incremental stress field DSigma\n" << endl;
78     volSymmTensorField DSigma
79     (
80         IOobject
81         (
82             "DSigma",
83             runTime.timeName(),
84             mesh,
85             IOobject::READ_IF_PRESENT,
86             IOobject::AUTO_WRITE
87         ),
88         mesh,
89         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
90     );
92     //- explicit terms in the momentum equation
93     volVectorField divDSigmaExp
94         (
95          IOobject
96          (
97           "divDSigmaExp",
98           runTime.timeName(),
99           mesh,
100           IOobject::NO_READ,
101           IOobject::NO_WRITE
102           ),
103          mesh,
104          dimensionedVector("zero", dimensionSet(1, -2, -2, 0, 0, 0, 0), vector::zero)
105          );
107      volVectorField divDSigmaLargeStrainExp
108         (
109          IOobject
110          (
111           "divDSigmaLargeStrainExp",
112           runTime.timeName(),
113           mesh,
114           IOobject::NO_READ,
115           IOobject::NO_WRITE
116           ),
117          mesh,
118          dimensionedVector("zero", dimensionSet(1, -2, -2, 0, 0, 0, 0), vector::zero)
119          );
121     constitutiveModel rheology(sigma, DU);
123     volScalarField rho = rheology.rho();
124     volScalarField mu = rheology.mu();
125     volScalarField lambda = rheology.lambda();
126     surfaceScalarField muf = fvc::interpolate(rheology.mu());
127     surfaceScalarField lambdaf = fvc::interpolate(rheology.lambda());
129     surfaceVectorField n = mesh.Sf()/mesh.magSf();