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/calculateDivSigmaExp.H

56 lines
1.2 KiB
C
Raw Normal View History

if(divSigmaExpMethod == "standard")
2014-05-19 15:44:10 +00:00
{
divSigmaExp = fvc::div
(
mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU,
"div(sigma)"
)
- gradThreeKalphaDeltaT;
2014-05-19 15:44:10 +00:00
}
else if(divSigmaExpMethod == "surface")
{
divSigmaExp = fvc::div
(
muf*(mesh.Sf() & fvc::interpolate(gradU.T()))
+ lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradU)))
- (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradU))
- threeKalphaDeltaTf
);
2014-05-19 15:44:10 +00:00
}
else if(divSigmaExpMethod == "decompose")
{
snGradU = fvc::snGrad(U);
2014-05-19 15:44:10 +00:00
surfaceTensorField shearGradU =
((I - n*n)&fvc::interpolate(gradU));
2014-05-19 15:44:10 +00:00
divSigmaExp = fvc::div
(
(
mesh.magSf()*
(
- (muf + lambdaf)*(snGradU & (I - n*n))
+ lambdaf*tr(shearGradU & (I - n*n))*n
+ muf*(shearGradU & n)
)
)
- threeKalphaDeltaTf
);
2014-05-19 15:44:10 +00:00
}
/* else if(divSigmaExpMethod == "expLaplacian")
{
divSigmaExp =
- fvc::laplacian(mu + lambda, U, "laplacian(DU,U)")
+ fvc::div
(
mu*gradU.T()
+ lambda*(I*tr(gradU)),
"div(sigma)"
);
}*/
2014-05-19 15:44:10 +00:00
else
{
FatalErrorIn(args.executable())
<< "divSigmaExp method " << divSigmaExpMethod << " not found!" << endl;
}