BUGFIX: Uninitialised member variables
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticOrthoNonLinULSolidFoam / writeFields.H
blob9e154984eac51967cece869840ab539ae9eeb700
1 if (runTime.outputTime())
2   {
3     //C.write();
5     volScalarField epsilonEq
6       (
7        IOobject
8        (
9         "epsilonEq",
10         runTime.timeName(),
11         mesh,
12         IOobject::NO_READ,
13         IOobject::AUTO_WRITE
14         ),
15        sqrt((2.0/3.0)*magSqr(dev(epsilon)))
16        );
18     Info<< "Max epsilonEq = " << max(epsilonEq).value()
19         << endl;
21     volScalarField sigmaEq
22       (
23        IOobject
24        (
25         "sigmaEq",
26         runTime.timeName(),
27         mesh,
28         IOobject::NO_READ,
29         IOobject::AUTO_WRITE
30         ),
31        sqrt((3.0/2.0)*magSqr(dev(sigma)))
32        );
33     
34     Info<< "Max sigmaEq = " << max(sigmaEq).value()
35         << endl;
37 //     volVectorField traction
38 //       (
39 //         IOobject
40 //         (
41 //       "traction",
42 //       runTime.timeName(),
43 //       mesh,
44 //       IOobject::NO_READ,
45 //       IOobject::AUTO_WRITE
46 //       ),
47 //         mesh,
48 //         dimensionedVector("zero", dimForce/dimArea, vector::zero)
49 //        );
50 //     forAll(mesh.boundary(), patchi)
51 //       {
52 //      traction.boundaryField()[patchi] =
53 //        n.boundaryField()[patchi] & sigma.boundaryField()[patchi];
54 //       }
56 //     //- patch forces    
57 //     forAll(mesh.boundary(), patchi)
58 //       {
59 //         Info << "Patch " << mesh.boundary()[patchi].name() << endl;
60 //         vectorField totalForce = mesh.Sf().boundaryField()[patchi] & sigma.boundaryField()[patchi];
61 //         vector force = sum( totalForce );
62 //         Info << "\ttotal force is " << force << " N" << endl;
63 //      tensorField F = I + gradDU.boundaryField()[patchi];
64 //         tensorField Finv = inv(F);
65 //         scalar normalForce = sum( n.boundaryField()[patchi] & totalForce );
66 //         Info << "\tnormal force is " << normalForce << " N" << endl;
67 //         scalar shearForce = mag(sum( (I - sqr(n.boundaryField()[patchi])) & totalForce ));
68 //         Info << "\tshear force is " << shearForce << " N" << endl;
69 //       }
71     runTime.write();
72   }