BUGFIX: Uninitialised member variables
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticOrthoNonLinULSolidFoam / createFields.H
blob4ca9e05eb63d24d5e5f63734c966df359199264e
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     volSymmTensorField epsilon
33     (
34         IOobject
35         (
36             "epsilon",
37             runTime.timeName(),
38             mesh,
39             IOobject::READ_IF_PRESENT,
40             IOobject::AUTO_WRITE
41         ),
42         mesh,
43         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
44     );
46     volSymmTensorField DEpsilon
47     (
48         IOobject
49         (
50             "DEpsilon",
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     volSymmTensorField sigma
61     (
62         IOobject
63         (
64             "sigma",
65             runTime.timeName(),
66             mesh,
67             IOobject::READ_IF_PRESENT,
68             IOobject::AUTO_WRITE
69         ),
70         mesh,
71         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
72     );
75     volSymmTensorField DSigma
76     (
77         IOobject
78         (
79             "DSigma",
80             runTime.timeName(),
81             mesh,
82             IOobject::READ_IF_PRESENT,
83             IOobject::AUTO_WRITE
84         ),
85         mesh,
86         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
87     );
89    //- material properties
90    constitutiveModel rheology(sigma, DU);
91    volSymmTensor4thOrderField C = rheology.C();
92    volDiagTensorField K = rheology.K();
93    //surfaceSymmTensor4thOrderField Cf = fvc::interpolate(C);
94    //surfaceDiagTensorField Kf = fvc::interpolate(K);
96    surfaceVectorField n = mesh.Sf()/mesh.magSf();
98    //volScalarField rho = rheology.rho();
99     volScalarField rho
100     (
101         IOobject
102         (
103             "rho",
104             runTime.timeName(),
105             mesh,
106             IOobject::READ_IF_PRESENT,
107             IOobject::AUTO_WRITE
108         ),
109         rheology.rho()
110     );
112 //     if(rheology.planeStress())
113 //       {
114 //      Info << nl << "Plane stress is set to yes -> the zz stress will be zero" << nl << endl;
115 //       }