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/setMotion.H
2014-06-01 20:12:52 +02:00

35 lines
851 B
C++

{
// Setting mesh motion
pointVectorField solidPointsDispl =
cpi.interpolate(Usolid - Usolid.oldTime());
vectorField newPoints =
stressMesh.points()
+ solidPointsDispl.internalField();
stressMesh.movePoints(newPoints);
vectorField fluidPatchPointsDispl =
interpolatorSolidFluid.pointInterpolate
(
solidPointsDispl.boundaryField()[solidPatchID].
patchInternalField()
);
motionUFluidPatch ==
tppi.pointToPointInterpolate
(
fluidPatchPointsDispl/runTime.deltaT().value()
);
mesh.update();
# include "volContinuity.H"
Info << "Motion magnitude: mean = "
<< average(mag(Usolid.boundaryField()[solidPatchID]))
<< " max = "
<< max(mag(Usolid.boundaryField()[solidPatchID])) << endl;
}