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

29 lines
840 B
C

if(divSigmaExpMethod == "standard")
{
//- calculating the full gradient has good convergence and no high freq oscillations
divSigmaExp = fvc::div((C && symm(gradU)) - (K & gradU), "div(sigma)");
}
else if(divSigmaExpMethod == "surface")
{
//- this form seems to have the best convergence
divSigmaExp = fvc::div
(
mesh.magSf()*
(
(n & (Cf && fvc::interpolate(symm(gradU))))
- (n & (Kf & fvc::interpolate(gradU)))
)
);
}
else if(divSigmaExpMethod == "laplacian")
{
//- can cause high freq oscillations and slow convergence
divSigmaExp =
fvc::div(C && symm(epsilon), "div(sigma)")
- fvc::laplacian(K, U, "laplacian(K, U)");
}
else
{
FatalErrorIn(args.executable())
<< "divSigmaExp method " << divSigmaExpMethod << " not found!" << endl;
}