Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticThermalSolidFoam / calculateSigmaExp.H
blob0387691e019644d367cdb86d9fda6f7eb5cbaa1f
1 if(sigmaExpMethod == "standard")
3     sigmaExp = fvc::div
4       (
5        mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU,
6        "div(sigma)"
7        );
9 else if(sigmaExpMethod == "surface")
11      sigmaExp = fvc::div
12      (
13          muf*(mesh.Sf() & fvc::interpolate(gradU.T()))
14        + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradU)))
15        - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradU))
16     );
18 else if(sigmaExpMethod == "decompose")
20      surfaceTensorField shearGradU = ((I - n*n)&fvc::interpolate(gradU));
22      sigmaExp = fvc::div
23      (
24          mesh.magSf()
25         *
26          (
27             - (muf + lambdaf)*(fvc::snGrad(U)&(I - n*n))
28             + lambdaf*tr(shearGradU&(I - n*n))*n
29             + muf*(shearGradU&n)
30          )
31     );
33 else if(sigmaExpMethod == "expLaplacian")
35     sigmaExp =
36        - fvc::laplacian(mu + lambda, U, "laplacian(DU,U)")
37        + fvc::div
38          (
39              mu*gradU.T()
40            + lambda*(I*tr(gradU)),
41              "div(sigma)"
42          );
44 else
46      FatalError << "sigmaExp method " << sigmaExpMethod << " not found!" << endl;