Fixed URL for libccmio-2.6.1 (bug report #5 by Thomas Oliveira)
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticSolidFoam / calculateDivDSigmaExp.H
blob3cd510eabe35698ee585ce2ca1b1b23da929d4f3
1 if(divDSigmaExpMethod == "standard")
3     divDSigmaExp = fvc::div
4     (
5         mu*gradDU.T() + lambda*(I*tr(gradDU)) - (mu + lambda)*gradDU,
6         "div(sigma)"
7     );
9 else if(divDSigmaExpMethod == "surface")
11     surfaceTensorField gradDUf = fvc::interpolate(gradDU);
13     divDSigmaExp = fvc::div
14     (
15         mesh.magSf()*
16         (
17             muf*(n & gradDUf.T())
18           + lambdaf*tr(gradDUf)*n
19           - (muf + lambdaf)*(n & gradDUf)
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 else if(divDSigmaExpMethod == "laplacian")
46     divDSigmaExp =
47       - fvc::laplacian(mu + lambda, DU, "laplacian(DDU,DU)")
48       + fvc::div(mu*gradDU.T() + lambda*(I*tr(gradDU)), "div(sigma)");
50 else
52     FatalErrorIn(args.executable())
53         << "divDSigmaExp method " << divDSigmaExpMethod << " not found!"
54         << abort(FatalError);