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/stressAnalysis/icoFsiFoam/solveSolid.H

27 lines
609 B
C
Raw 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();
2011-06-26 21:44:30 +00:00
} while (initialResidual > convergenceTolerance && ++iCorr < nCorr);
}