Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticPlasticNonLinTLSolidFoam / calculateDivDSigmaNonLinExp.H
blob5dd053361ebc5cd9ef7003a6c0bbec81f28fa793
1 if(divDSigmaNonLinExpMethod == "standard")
3     divDSigmaNonLinExp = fvc::div
4     (
5         (
6             mu*
7             (
8                 (gradDU & gradU.T())
9               + (gradU & gradDU.T())
10               + (gradDU & gradDU.T())
11             )
12         )
13       + (
14             0.5*lambda*
15             tr
16             (
17                 (gradDU & gradU.T())
18               + (gradU & gradDU.T())
19               + (gradDU & gradDU.T())
20             )*I
21         )
22       + (DSigma & gradU)
23       + ((sigma + DSigma) & gradDU),
24         "div(sigma)"
25     );
27 else if(divDSigmaNonLinExpMethod == "surface")
29      divDSigmaNonLinExp = fvc::div
30      (
31          mesh.magSf()*
32          (
33              (
34                  muf*
35                  (
36                      n & fvc::interpolate
37                      (
38                          (gradU & gradDU.T())
39                        + (gradDU & gradU.T())
40                        + (gradDU & gradDU.T())
41                      )
42                  )
43              )
44            + (
45                  0.5*lambdaf*
46                  (
47                      n*tr
48                      (
49                          fvc::interpolate
50                          (
51                              (gradU & gradDU.T())
52                            + (gradDU & gradU.T())
53                            + (gradDU & gradDU.T())
54                          )
55                      )
56                  )
57              )
58            + (
59                  n & fvc::interpolate
60                  (
61                      (DSigma & gradU)
62                    + ((sigma + DSigma) & gradDU)
63                  )
64              )
65          )
66      );
68      // divDSigmaNonLinExp =
69      //   fvc::div
70      //   (
71      //     ( muf * mesh.Sf()
72      //       & fvc::interpolate(
73      //                  (gradDU & gradU.T())
74      //                  + (gradU & gradDU.T())
75      //                  + (gradDU & gradDU.T())
76      //                  ) )
77      //     + ( lambdaf * 0.5* tr(
78      //                   fvc::interpolate(
79      //                            (gradDU & gradU.T())
80      //                            + (gradU & gradDU.T())
81      //                            + (gradDU & gradDU.T())
82      //                            )
83      //                   ) * mesh.Sf() )
84      //     + (mesh.Sf() & fvc::interpolate( (DSigma & gradU )
85      //                      + ( (sigma + DSigma) & gradDU )
86      //                      ) )
87      //     );
89 else
91        FatalErrorIn(args.executable())
92            << "divDSigmaExp method " << divDSigmaExpMethod << " not found!"
93            << abort(FatalError);