Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticIncrAcpSolidFoam / createFields.H
blob3bdbf70a9a0e01e7254cabd053a3ee9a0d9d81ba
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);
16     volTensorField gradDU
17     (
18         IOobject
19         (
20             "grad(DU)",
21             runTime.timeName(),
22             mesh,
23             IOobject::NO_READ,
24             IOobject::NO_WRITE
25         ),
26         mesh,
27         dimensionedTensor("zero", dimless, tensor::zero)
28     );
29     surfaceVectorField snGradDU
30     (
31         IOobject
32         (
33             "snGrad(DU)",
34             runTime.timeName(),
35             mesh,
36             IOobject::NO_READ,
37             IOobject::NO_WRITE
38         ),
39         mesh,
40         dimensionedVector("zero", dimless, vector::zero)
41     );
43     Info<< "Creating field U\n" << endl;
44     volVectorField U
45     (
46         IOobject
47         (
48             "U",
49             runTime.timeName(),
50             mesh,
51             IOobject::READ_IF_PRESENT,
52             IOobject::AUTO_WRITE
53         ),
54         mesh,
55         dimensionedVector("zero", dimLength, vector::zero)
56     );
58     volSymmTensorField DEpsilon
59     (
60         IOobject
61         (
62             "DEpsilon",
63             runTime.timeName(),
64             mesh,
65             IOobject::READ_IF_PRESENT,
66             IOobject::AUTO_WRITE
67         ),
68         mesh,
69         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
70     );
72     volSymmTensorField DSigma
73     (
74         IOobject
75         (
76             "DSigma",
77             runTime.timeName(),
78             mesh,
79             IOobject::READ_IF_PRESENT,
80             IOobject::AUTO_WRITE
81         ),
82         mesh,
83         dimensionedSymmTensor("zero", dimForce/dimArea, symmTensor::zero)
84     );
86     volSymmTensorField epsilon
87     (
88         IOobject
89         (
90             "epsilon",
91             runTime.timeName(),
92             mesh,
93             IOobject::READ_IF_PRESENT,
94             IOobject::AUTO_WRITE
95         ),
96         mesh,
97         dimensionedSymmTensor("zero", dimless, symmTensor::zero)
98     );
100     volSymmTensorField sigma
101     (
102         IOobject
103         (
104             "sigma",
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     volVectorField divDSigmaExp
115     (
116         IOobject
117         (
118             "divDSigmaExp",
119             runTime.timeName(),
120             mesh,
121             IOobject::NO_READ,
122             IOobject::NO_WRITE
123         ),
124         mesh,
125         dimensionedVector("zero", dimForce/dimVolume, vector::zero)
126     );
128     constitutiveModel rheology(sigma, DU);
129     //solidInterface interface(mesh, rheology);
130     //solidInterface* interfacePtr = new solidInterface(mesh, rheology);
132     surfaceVectorField traction
133     (
134         IOobject
135         (
136             "traction",
137             runTime.timeName(),
138             mesh,
139             IOobject::NO_READ,
140             IOobject::NO_WRITE
141         ),
142         mesh,
143         dimensionedVector("zero", dimForce/dimArea, vector::zero)
144     );
146     // for aitken relaxation
147     volVectorField aitkenDelta
148     (
149         IOobject
150         (
151             "aitkenDelta",
152             runTime.timeName(),
153             mesh,
154             IOobject::NO_READ,
155             IOobject::NO_WRITE
156         ),
157         mesh,
158         dimensionedVector("zero", dimLength, vector::zero)
159     );
161     // aitken relaxation factor
162     scalar aitkenInitialRes = 1.0;
163     scalar aitkenTheta = 0.1;