db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
26 lines
613 B
C
26 lines
613 B
C
{
|
|
# 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);
|
|
}
|