Replace tabs by 4 spaces in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / elasticSolidFoam / calculateForceResidual.H
blobc7feb2d3b462f02e59e20a5eb16214d689c93437
2   // force residual is the net force on the model
3   // this should got to zero in a converged steady state model
4   // should be altered for parallel runs
5   vector netForce = vector::zero;
6   forAll(mesh.boundary(), patchi)
7     {
8       netForce +=
9     sum(
10         mesh.Sf().boundaryField()[patchi]
11         &
12         (
13          2*mu.boundaryField()[patchi]*symm(gradU.boundaryField()[patchi])
14          + lambda*tr(gradU.boundaryField()[patchi])*I
15          )
16         );
17     }
18   forceResidual = mag(netForce);