Bugfix: set boundary velocity on a moving IB surface

This commit is contained in:
Hrvoje Jasak 2015-11-11 12:48:18 +00:00
parent 897d0cdb9d
commit a9448b5c60
2 changed files with 19 additions and 0 deletions

View file

@ -77,6 +77,23 @@ void Foam::movingImmersedBoundary::movePoints() const
<< abort(FatalError);
}
// Get non-const reference to velocity field
volVectorField& U = const_cast<volVectorField&>
(
mesh().lookupObject<volVectorField>("U")
);
// Get non-const reference to patch field
immersedBoundaryFvPatchVectorField& ibPatchField =
refCast<immersedBoundaryFvPatchVectorField>
(
U.boundaryField()[patchID]
);
// Set refValue_ to moving boundary velocity
ibPatchField.refValue() =
transform(sbmfPtr_->velocity(), refIbSurface_.points());
const immersedBoundaryPolyPatch& cibPatch =
refCast<const immersedBoundaryPolyPatch>
(

View file

@ -39,6 +39,8 @@ SourceFiles
#include "fvMesh.H"
#include "solidBodyMotionFunction.H"
#include "triSurfaceMesh.H"
#include "fvPatchFields.H"
#include "immersedBoundaryFvPatchFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //