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/elasticThermalSolidFoam/calculateSigmaExp.H

48 lines
1.1 KiB
C
Raw Normal View History

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