Replace tabs by 4 spaces in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticSolidFoam / calculateDivSigmaExp.H
blob73f0ff6d779487a41a27a0405442d5c70eea1ccc
1 if(divSigmaExpMethod == "standard")
2   {
3     divSigmaExp = fvc::div
4       (
5        mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU,
6        "div(sigma)"
7        );
8   }
9  else if(divSigmaExpMethod == "surface")
10    {
11      divSigmaExp = 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     );
17    }
18  else if(divSigmaExpMethod == "decompose")
19    {
20      snGradU = fvc::snGrad(U);
22      surfaceTensorField shearGradU =
23        ((I - n*n)&fvc::interpolate(gradU));
25      divSigmaExp = fvc::div
26        (
27     mesh.magSf()
28     *(
29       - (muf + lambdaf)*(snGradU&(I - n*n))
30       + lambdaf*tr(shearGradU&(I - n*n))*n
31       + muf*(shearGradU&n)
32       )
33     );
34    }
35  else if(divSigmaExpMethod == "expLaplacian")
36    {
37      divSigmaExp =
38        - fvc::laplacian(mu + lambda, U, "laplacian(DU,U)")
39        + fvc::div
40        (
41     mu*gradU.T()
42     + lambda*(I*tr(gradU)),
43     "div(sigma)"
44     );
45    }
46  else
47    {
48      FatalError << "divSigmaExp method " << divSigmaExpMethod << " not found!" << endl;
49    }