Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticOrthoNonLinULSolidFoam / checkPlaneStress.H
blob4610dd2bf3f7fd89d6a0a9bc879725ed89107aa4
1 if(rheology.planeStress())
3     //- add higher order terms
4     volScalarField higherTerms = -0.5*volTensorField(gradDU&gradDU.T()).component(tensor::ZZ);
6     forAll(gradDU.internalField(), celli)
7     {
8         gradDU.internalField()[celli][tensor::ZZ] =
9             (
10                 (-C.internalField()[celli][symmTensor4thOrder::XXZZ]*DEpsilon.internalField()[celli][symmTensor::XX]
11               - C.internalField()[celli][symmTensor4thOrder::YYZZ]*DEpsilon.internalField()[celli][symmTensor::YY]
12             )
13             /
14             C.internalField()[celli][symmTensor4thOrder::ZZZZ])
15           - higherTerms.internalField()[celli];
16     }
17     forAll(gradDU.boundaryField(), patchi)
18     {
19         forAll(gradDU.boundaryField()[patchi], facei)
20         {
21             gradDU.boundaryField()[patchi][facei][tensor::ZZ] =
22                 (
23                     (
24                         - C.boundaryField()[patchi][facei][symmTensor4thOrder::XXZZ]*
25                           DEpsilon.boundaryField()[patchi][facei][symmTensor::XX]
26                         - C.boundaryField()[patchi][facei][symmTensor4thOrder::YYZZ]*
27                           DEpsilon.boundaryField()[patchi][facei][symmTensor::YY]
28                     )
29                     /
30                     C.boundaryField()[patchi][facei][symmTensor4thOrder::ZZZZ]
31                 )
32               - higherTerms.boundaryField()[patchi][facei];
33         }
34     }