This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/solidMechanics/deprecatedSolvers/icoFsiFoam/solveSolid.H

27 lines
609 B
C++
Raw Permalink Normal View History

{
# include "readStressedFoamControls.H"
int iCorr = 0;
scalar initialResidual = 0;
do
{
volTensorField gradU = fvc::grad(Usolid);
fvVectorMatrix UEqn
(
fvm::d2dt2(Usolid)
==
fvm::laplacian(2*mu + lambda, Usolid, "laplacian(DU,U)")
+ fvc::div
(
mu*gradU.T() + lambda*(I*tr(gradU)) - (mu + lambda)*gradU,
"div(sigma)"
)
);
initialResidual = UEqn.solve().initialResidual();
} while (initialResidual > convergenceTolerance && ++iCorr < nCorr);
}