Replace tabs by 4 spaces in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinTLSolidFoam / writeFields.H
blobc2db3454ec86b2db0010235c70cbd9aca092ffcd
1 if (runTime.outputTime())
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() << endl;
17     volScalarField epsilonPEq
18     (
19         IOobject
20         (
21             "epsilonPEq",
22             runTime.timeName(),
23             mesh,
24             IOobject::NO_READ,
25             IOobject::AUTO_WRITE
26         ),
27         sqrt((2.0/3.0)*magSqr(dev(epsilonP)))
28     );
29     Info<< "Max epsilonPEq = " << max(epsilonPEq).value()<< endl;
31     volScalarField sigmaEq
32     (
33         IOobject
34         (
35             "sigmaEq",
36             runTime.timeName(),
37             mesh,
38             IOobject::NO_READ,
39             IOobject::AUTO_WRITE
40         ),
41         sqrt((3.0/2.0)*magSqr(dev(sigma)))
42     );
44     Info<< "Max sigmaEq = " << max(sigmaEq).value() << endl;
46     // Deformation gradient
47     volTensorField F = I + gradU;
48     volScalarField J = det(F);
50     // Calculate Cauchy stress
51     volSymmTensorField sigmaCauchy
52     (
53         IOobject
54         (
55             "sigmaCauchy",
56             runTime.timeName(),
57             mesh,
58             IOobject::NO_READ,
59             IOobject::AUTO_WRITE
60         ),
61         (1/J)*symm(F.T() & sigma & F)
62     );
64     // Cauchy von Mises stress
65     volScalarField sigmaCauchyEq
66     (
67         IOobject
68         (
69             "sigmaCauchyEq",
70             runTime.timeName(),
71             mesh,
72             IOobject::NO_READ,
73             IOobject::AUTO_WRITE
74         ),
75         sqrt((3.0/2.0)*magSqr(dev(sigmaCauchy)))
76     );
78     Info<< "Max sigmaCauchyEq = " << max(sigmaCauchyEq).value() << endl;
80 //     volTensorField Finv = inv(F);
81 //     volSymmTensorField epsilonAlmansi
82 //     (
83 //         IOobject
84 //         (
85 //             "epsilonAlmansi",
86 //             runTime.timeName(),
87 //             mesh,
88 //             IOobject::NO_READ,
89 //             IOobject::AUTO_WRITE
90 //         ),
91 //         symm(Finv & epsilon & Finv.T())
92 //     );
94     runTime.write();