Replace tabs by 4 spaces in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinTLSolidFoam / calculateDivDSigmaExp.H
bloba90e0b11258ff425b882b71d50a01cdeb29c8a57
1 if(divDSigmaExpMethod == "standard")
3     divDSigmaExp = fvc::div
4     (
5         (mu*gradDU.T())
6       + (lambda*(I*tr(gradDU)))
7       - ((mu + lambda)*gradDU),
8         "div(sigma)"
9     );
11 else if(divDSigmaExpMethod == "surface")
13     divDSigmaExp = fvc::div
14     (
15         mesh.magSf()*
16         (
17             muf*(n & fvc::interpolate(gradDU.T()))
18           + lambdaf*tr(fvc::interpolate(gradDU))*n
19           - (muf + lambdaf)*(n & fvc::interpolate(gradDU))
20         )
21     );
23      // divDSigmaExp = fvc::div
24      //   (
25      //     muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
26      //     + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradDU)))
27      //     - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradDU))
28      //     );
30 else if(divDSigmaExpMethod == "decompose")
32     surfaceTensorField shearGradDU((I - n*n) & fvc::interpolate(gradDU));
34     divDSigmaExp = fvc::div
35     (
36         mesh.magSf()*
37         (
38           - (muf + lambdaf)*(fvc::snGrad(DU) & (I - n*n))
39           + lambdaf*tr(shearGradDU & (I - n*n))*n
40           + muf*(shearGradDU & n)
41         )
42     );
44      // divDSigmaExp = fvc::div
45      //   (
46      //     mesh.magSf()
47      //     *(
48      //       - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
49      //       + lambdaf*tr(shearGradDU&(I - n*n))*n
50      //       + muf*(shearGradDU&n)
51      //       )
52      //     );
54 else if(divDSigmaExpMethod == "laplacian")
56     divDSigmaExp =
57       - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)")
58       + fvc::div
59         (
60             mu*gradDU.T()
61           + lambda*(I*tr(gradDU)),
62             "div(sigma)"
63         );
65 else
67     FatalErrorIn(args.executable())
68         << "divDSigmaExp method " << divDSigmaExpMethod << " not found!"
69         << abort(FatalError);