Remove trailing whitespace systematically
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinULSolidFoam / calculateDivDSigmaExp.H
blobdd9244a67e0a0e6d5f7206c35a3d01b5c2fd4c65
1 if(divDSigmaExpMethod == "standard")
2   {
3     divDSigmaExp = fvc::div
4       (
5        mu*gradDU.T() + lambda*(I*tr(gradDU)) - (mu + lambda)*gradDU,
6        "div(sigma)"
7        );
8   }
9  else if(divDSigmaExpMethod == "surface")
10    {
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         );
17    }
18  else if(divDSigmaExpMethod == "decompose")
19    {
20      surfaceTensorField shearGradDU =
21        ((I - n*n)&fvc::interpolate(gradDU));
23      divDSigmaExp = fvc::div
24        (
25         mesh.magSf()
26         *(
27           - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
28           + lambdaf*tr(shearGradDU&(I - n*n))*n
29           + muf*(shearGradDU&n)
30           )
31         );
32    }
33  else if(divDSigmaExpMethod == "laplacian")
34    {
35      divDSigmaExp =
36        - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)")
37        + fvc::div
38        (
39         mu*gradDU.T()
40         + lambda*(I*tr(gradDU)),
41         "div(sigma)"
42         );
43    }
44  else
45    {
46      FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << endl;
47    }