Fixing indentation in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticNonLinIncrTLSolidFoam / createFields.H
blobb90f4c1e75dd8993e951bad0273e03b6e6899792
1     Info<< "Reading 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     volVectorField U
18     (
19         IOobject
20         (
21             "U",
22             runTime.timeName(),
23             mesh,
24             IOobject::READ_IF_PRESENT,
25             IOobject::AUTO_WRITE
26         ),
27         mesh,
28         dimensionedVector("zero", dimLength, vector::zero)
29     );
31     volTensorField gradU
32     (
33         IOobject
34         (
35             "grad(U)",
36             runTime.timeName(),
37             mesh,
38             IOobject::READ_IF_PRESENT,
39             IOobject::AUTO_WRITE
40         ),
41         mesh,
42         dimensionedTensor("zero", dimless, tensor::zero)
43     );
45     //- increment of Green finite strain tensor
46     volSymmTensorField DEpsilon
47     (
48         IOobject
49         (
50             "DEpsilonGreen",
51             runTime.timeName(),
52             mesh,
53             IOobject::READ_IF_PRESENT,
54             IOobject::AUTO_WRITE
55         ),
56         mesh,
57         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
58     );
60     //- Green strain tensor
61     volSymmTensorField epsilon
62     (
63         IOobject
64         (
65             "epsilonGreen",
66             runTime.timeName(),
67             mesh,
68             IOobject::READ_IF_PRESENT,
69             IOobject::AUTO_WRITE
70         ),
71         mesh,
72         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
73     );
76     //- increment of 2nd Piola-Kirchhoff stress tensor
77     volSymmTensorField DSigma
78     (
79         IOobject
80         (
81             "DSigma",
82             runTime.timeName(),
83             mesh,
84             IOobject::READ_IF_PRESENT,
85             IOobject::AUTO_WRITE
86         ),
87         mesh,
88         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
89     );
91     //- 2nd Piola-Kirchhoff stress tensor
92     volSymmTensorField sigma
93     (
94         IOobject
95         (
96             "sigma",
97             runTime.timeName(),
98             mesh,
99             IOobject::READ_IF_PRESENT,
100             IOobject::AUTO_WRITE
101         ),
102         mesh,
103         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
104     );
106     constitutiveModel rheology(sigma, DU);
108     volScalarField rho = rheology.rho();
109     volScalarField mu = rheology.mu();
110     volScalarField lambda = rheology.lambda();
111     surfaceScalarField muf = fvc::interpolate(mu, "mu");
112     surfaceScalarField lambdaf = fvc::interpolate(lambda, "lambda");
114     surfaceVectorField n = mesh.Sf()/mesh.magSf();