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/elasticPlasticSolidFoam/calculateDivDSigmaExp.H

59 lines
1.4 KiB
C
Raw Normal View History

2012-09-11 15:42:55 +00:00
if(divDSigmaExpMethod == "standard")
{
2012-09-11 15:42:55 +00:00
divDSigmaExp = fvc::div
(
2012-09-11 15:42:55 +00:00
mu*gradDU.T() + lambda*(I*tr(gradDU)) - (mu + lambda)*gradDU,
"div(sigma)"
);
}
else if(divDSigmaExpMethod == "surface")
{
surfaceTensorField gradDUf = fvc::interpolate(gradDU);
divDSigmaExp =
fvc::div(
mesh.magSf()
*(
muf*(n & gradDUf.T())
+ lambdaf*tr(gradDUf)*n
- (muf + lambdaf)*(n & gradDUf)
)
);
// divDSigmaExp = fvc::div
// (
// muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
// + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradDU)))
// - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradDU))
// );
}
else if(divDSigmaExpMethod == "decompose")
{
surfaceTensorField shearGradDU =
((I - n*n)&fvc::interpolate(gradDU));
divDSigmaExp = fvc::div
(
mesh.magSf()
*(
- (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
+ lambdaf*tr(shearGradDU&(I - n*n))*n
+ muf*(shearGradDU&n)
)
);
}
else if(divDSigmaExpMethod == "laplacian")
{
divDSigmaExp =
- fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)")
2012-09-11 15:42:55 +00:00
+ fvc::div
(
mu*gradDU.T()
+ lambda*(I*tr(gradDU)),
"div(sigma)"
);
}
else
{
2012-09-11 15:42:55 +00:00
FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << endl;
}