Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinTLSolidFoam / writeFields.H
bloba3de4657b647b9f23f6602f26aae1a1500f10aab
1 if (runTime.outputTime())
2   {
3     volScalarField epsilonEq
4       (
5        IOobject
6        (
7         "epsilonEq",
8         runTime.timeName(),
9         mesh,
10         IOobject::NO_READ,
11         IOobject::AUTO_WRITE
12         ),
13        sqrt((2.0/3.0)*magSqr(dev(epsilon)))
14        );
15     Info<< "Max epsilonEq = " << max(epsilonEq).value()
16         << endl;
18     volScalarField epsilonPEq
19       (
20        IOobject
21        (
22         "epsilonPEq",
23         runTime.timeName(),
24         mesh,
25         IOobject::NO_READ,
26         IOobject::AUTO_WRITE
27         ),
28        sqrt((2.0/3.0)*magSqr(dev(epsilonP)))
29        );
30     Info<< "Max epsilonPEq = " << max(epsilonPEq).value()
31         << endl;
33     volScalarField sigmaEq
34       (
35        IOobject
36        (
37         "sigmaEq",
38         runTime.timeName(),
39         mesh,
40         IOobject::NO_READ,
41         IOobject::AUTO_WRITE
42         ),
43        sqrt((3.0/2.0)*magSqr(dev(sigma)))
44        );
45     
46     Info<< "Max sigmaEq = " << max(sigmaEq).value()
47         << endl;
49     // deformation gradient
50     volTensorField F = I + gradU;
51     volScalarField J = det(F);
53     //- Calculate Cauchy stress
54     volSymmTensorField sigmaCauchy
55       (
56        IOobject
57        (
58         "sigmaCauchy",
59         runTime.timeName(),
60         mesh,
61         IOobject::NO_READ,
62         IOobject::AUTO_WRITE
63         ),
64        (1/J) * symm(F.T() & sigma & F)
65        );
67     //- Cauchy von Mises stress
68     volScalarField sigmaCauchyEq
69       (
70        IOobject
71        (
72         "sigmaCauchyEq",
73         runTime.timeName(),
74         mesh,
75         IOobject::NO_READ,
76         IOobject::AUTO_WRITE
77         ),
78        sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy)))
79        );
80     
81     Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value()
82         << endl;
84     //volTensorField Finv = inv(F);
85     // volSymmTensorField epsilonAlmansi
86 //       (
87 //        IOobject
88 //        (
89 //      "epsilonAlmansi",
90 //      runTime.timeName(),
91 //      mesh,
92 //      IOobject::NO_READ,
93 //      IOobject::AUTO_WRITE
94 //      ),
95 //        symm(Finv & epsilon & Finv.T())
96 //        );
99     runTime.write();
100   }