Fixing indentation in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticThermalSolidFoam / calculateDivSigmaExp.H
blob8af9d4da295be73893347e2845a62f8342245e32
1 if(divSigmaExpMethod == "standard")
3     divSigmaExp = fvc::div
4     (
5         mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU,
6         "div(sigma)"
7     )
8     - gradThreeKalphaDeltaT;
10 else if(divSigmaExpMethod == "surface")
12     divSigmaExp = fvc::div
13     (
14         muf*(mesh.Sf() & fvc::interpolate(gradU.T()))
15       + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradU)))
16       - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradU))
17       - threeKalphaDeltaTf
18     );
20 else if(divSigmaExpMethod == "decompose")
22     snGradU = fvc::snGrad(U);
24     surfaceTensorField shearGradU = ((I - n*n) & fvc::interpolate(gradU));
26     divSigmaExp = fvc::div
27     (
28         mesh.magSf()*
29         (
30           - (muf + lambdaf)*(snGradU & (I - n*n))
31           + lambdaf*tr(shearGradU & (I - n*n))*n
32           + muf*(shearGradU & n)
33         )
34       - threeKalphaDeltaTf
35     );
38 else if(divSigmaExpMethod == "expLaplacian")
40     divSigmaExp =
41       - fvc::laplacian(mu + lambda, U, "laplacian(DU,U)")
42       + fvc::div(mu*gradU.T() + lambda*(I*tr(gradU)), "div(sigma)");
45 else
47     FatalErrorIn(args.executable())
48         << "divSigmaExp method " << divSigmaExpMethod << " not found!" << endl;