Bugfix: set boundary velocity on a moving IB surface
This commit is contained in:
parent
897d0cdb9d
commit
a9448b5c60
2 changed files with 19 additions and 0 deletions
|
@ -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>
|
||||
(
|
||||
|
|
|
@ -39,6 +39,8 @@ SourceFiles
|
|||
#include "fvMesh.H"
|
||||
#include "solidBodyMotionFunction.H"
|
||||
#include "triSurfaceMesh.H"
|
||||
#include "fvPatchFields.H"
|
||||
#include "immersedBoundaryFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
|
Reference in a new issue