Forward compatibility: flex
[foam-extend-3.2.git] / applications / solvers / solidMechanics / viscoElasticSolidFoam / createFields.H
blob3c0bc2fe7d234756d23f76b3e44cdda2c9731d6f
1     Info<< "Reading displacement increment 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     // gradDU.checkOut();
18     // gradDU.checkIn();
20     Info<< "Reading velocity increment field DV\n" << endl;
21     volVectorField DV
22     (
23         IOobject
24         (
25             "DV",
26             runTime.timeName(),
27             mesh,
28             IOobject::READ_IF_PRESENT,
29             IOobject::AUTO_WRITE
30         ),
31         mesh,
32         dimensionedVector("zero", dimVelocity, vector::zero)
33     );
35     Info<< "Reading stress increment field DSigma\n" << endl;
36     volSymmTensorField DSigma
37     (
38         IOobject
39         (
40             "DSigma",
41             runTime.timeName(),
42             mesh,
43             IOobject::READ_IF_PRESENT,
44             IOobject::AUTO_WRITE
45         ),
46         mesh,
47         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
48     );
51     Info<< "Reading strain increment field Depsilon\n" << endl;
52     volSymmTensorField Depsilon
53     (
54         IOobject
55         (
56             "Depsilon",
57             runTime.timeName(),
58             mesh,
59             IOobject::READ_IF_PRESENT,
60             IOobject::AUTO_WRITE
61         ),
62         mesh,
63         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
64     );
67     Info<< "Reading accumulated displacement field U\n" << endl;
68     volVectorField U
69     (
70         IOobject
71         (
72             "U",
73             runTime.timeName(),
74             mesh,
75             IOobject::READ_IF_PRESENT,
76             IOobject::AUTO_WRITE
77         ),
78         mesh,
79         dimensionedVector("zero", dimLength, vector::zero)
80     );
83     Info<< "Reading stress field sigma\n" << endl;
84     volSymmTensorField sigma
85     (
86         IOobject
87         (
88             "sigma",
89             runTime.timeName(),
90             mesh,
91             IOobject::READ_IF_PRESENT,
92             IOobject::AUTO_WRITE
93         ),
94         mesh,
95         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
96     );
99     Info<< "Reading stress increment field DSigmaCorr\n" << endl;
100     volSymmTensorField DSigmaCorr
101     (
102         IOobject
103         (
104             "DSigmaCorr",
105             runTime.timeName(),
106             mesh,
107             IOobject::READ_IF_PRESENT,
108             IOobject::AUTO_WRITE
109         ),
110         mesh,
111         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
112     );
114     constitutiveModel rheology(sigma, DU);
116     volScalarField rho = rheology.rho();