This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/elasticOrthoNonLinULSolidFoam/checkPlaneStress.H

36 lines
1.4 KiB
C++
Raw Normal View History

if(rheology.planeStress())
{
//- add higher order terms
volScalarField higherTerms = -0.5*volTensorField(gradDU&gradDU.T()).component(tensor::ZZ);
forAll(gradDU.internalField(), celli)
{
gradDU.internalField()[celli][tensor::ZZ] =
(
(-C.internalField()[celli][symmTensor4thOrder::XXZZ]*DEpsilon.internalField()[celli][symmTensor::XX]
- C.internalField()[celli][symmTensor4thOrder::YYZZ]*DEpsilon.internalField()[celli][symmTensor::YY]
)
/
C.internalField()[celli][symmTensor4thOrder::ZZZZ])
- higherTerms.internalField()[celli];
}
forAll(gradDU.boundaryField(), patchi)
{
forAll(gradDU.boundaryField()[patchi], facei)
{
gradDU.boundaryField()[patchi][facei][tensor::ZZ] =
(
(
- C.boundaryField()[patchi][facei][symmTensor4thOrder::XXZZ]*
DEpsilon.boundaryField()[patchi][facei][symmTensor::XX]
- C.boundaryField()[patchi][facei][symmTensor4thOrder::YYZZ]*
DEpsilon.boundaryField()[patchi][facei][symmTensor::YY]
)
/
C.boundaryField()[patchi][facei][symmTensor4thOrder::ZZZZ]
)
- higherTerms.boundaryField()[patchi][facei];
}
}
}