Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinTLSolidFoam / calculateDivDSigmaExp.H
blobc938e46ed533022829f3bf1c56e5575bbe2526d0
1 if(divDSigmaExpMethod == "standard")
2   {
3     divDSigmaExp = fvc::div
4       (
5        (mu*gradDU.T())
6        + (lambda*(I*tr(gradDU)))
7        - ((mu + lambda)*gradDU),
8        "div(sigma)"
9        );
10   }
11  else if(divDSigmaExpMethod == "surface")
12    { 
13      divDSigmaExp =
14        fvc::div(
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                 );
22      // divDSigmaExp = fvc::div
23      //   (
24      //         muf*(mesh.Sf() & fvc::interpolate(gradDU.T()))
25      //         + lambdaf*(mesh.Sf() & I*fvc::interpolate(tr(gradDU)))
26      //         - (muf + lambdaf)*(mesh.Sf() & fvc::interpolate(gradDU))
27      //         );
28    }
29  else if(divDSigmaExpMethod == "decompose")
30    {
31      surfaceTensorField shearGradDU =
32        ((I - n*n)&fvc::interpolate(gradDU));
33      
34      divDSigmaExp =
35        fvc::div(
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                 );
43      // divDSigmaExp = fvc::div
44      //   (
45      //         mesh.magSf()
46      //         *(
47      //           - (muf + lambdaf)*(fvc::snGrad(DU)&(I - n*n))
48      //           + lambdaf*tr(shearGradDU&(I - n*n))*n
49      //           + muf*(shearGradDU&n)
50      //           )
51      //         );
52    }
53  else if(divDSigmaExpMethod == "laplacian")
54    {
55      divDSigmaExp =
56        - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)")
57        + fvc::div
58        (
59         mu*gradDU.T()
60         + lambda*(I*tr(gradDU)),
61         "div(sigma)"
62         );
63    }
64  else
65    {
66      FatalError << "divDSigmaExp method " << divDSigmaExpMethod << " not found!" << endl;
67    }