Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticIncrSolidFoam / calculateDivDSigmaExp.H
blob417b25d3f460ffb05c7991280d95d566d6aa7c2b
1 if(divDSigmaExpMethod == "standard")
3     divDSigmaExp = fvc::div
4     (
5         mu*gradDU.T() + lambda*(I*tr(gradDU)) - (mu + lambda)*gradDU,
6         "div(sigma)"
7     );
9 else if(divDSigmaExpMethod == "surface")
11     divDSigmaExp = fvc::div
12     (
13         muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
14       + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradDU)))
15       - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradDU))
16     );
18 else if(divDSigmaExpMethod == "decompose")
20     surfaceTensorField shearGradDU = ((I - n*n) & fvc::interpolate(gradDU));
22     divDSigmaExp = fvc::div
23     (
24         mesh.magSf()*
25         (
26           - (muf + lambdaf)*(fvc::snGrad(DU) & (I - n*n))
27           + lambdaf*tr(shearGradDU&(I - n*n))*n
28           + muf*(shearGradDU&n)
29         )
30     );
32 else if(divDSigmaExpMethod == "laplacian")
34     divDSigmaExp =
35       - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)")
36       + fvc::div(mu*gradDU.T() + lambda*(I*tr(gradDU)), "div(sigma)");
38 else
40     FatalErrorIn(args.executable())
41         << "divDSigmaExp method " << divDSigmaExpMethod << " not found!"
42         << abort(FatalError);