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/icoFsiElasticNonLinULSolidFoam/moveSolidMesh.H_old
2012-09-11 16:42:55 +01:00

36 lines
982 B
Text

if(min(J.internalField()) > 0)
{
Info << "\nMove solid mesh" << endl;
volPointInterpolation pointInterpolation(stressMesh);
// Calculate mesh points displacement
pointInterpolation.interpolate(DU, pointDU);
const vectorField& pointDUI = pointDU.internalField();
// Move mesh
vectorField newPoints = stressMesh.allPoints();
forAll(pointDUI, pointI)
{
newPoints[pointI] += pointDUI[pointI];
}
twoDPointCorrector twoDCorrector(stressMesh);
twoDCorrector.correctPoints(newPoints);
stressMesh.movePoints(newPoints);
stressMesh.V00();
stressMesh.moving(false);
// Rotate stress field (old Cauchy becomes new 2nd Piola)
//sigma = 1/J * symm(F & sigma & F.T());
//rho = rho/J;
}
else
{
FatalErrorIn(args.executable())
<< "Negative Jacobian"
<< exit(FatalError);
}