Fix set dead cell value for moving immersed boundary

This commit is contained in:
Hrvoje Jasak 2018-09-06 18:33:34 +01:00
parent 012e01815a
commit 094039ec24

View file

@ -66,7 +66,12 @@ movingImmersedBoundaryVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchVectorField(p, iF), // Do not read data fixedValueFvPatchVectorField(p, iF), // Do not read data
immersedBoundaryFieldBase<vector>(p, false, vector::zero) immersedBoundaryFieldBase<vector>
(
p,
Switch(dict.lookup("setDeadValue")),
vector(dict.lookup("deadValue"))
)
{ {
readPatchType(dict); readPatchType(dict);
updateIbValues(); updateIbValues();
@ -83,7 +88,7 @@ movingImmersedBoundaryVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchVectorField(p, iF), // Do not data fixedValueFvPatchVectorField(p, iF), // Do not data
immersedBoundaryFieldBase<vector>(p, false, vector::zero) immersedBoundaryFieldBase<vector>(p, ptf.setDeadValue(), ptf.deadValue())
{ {
updateIbValues(); updateIbValues();
} }
@ -96,7 +101,12 @@ movingImmersedBoundaryVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchVectorField(ptf), fixedValueFvPatchVectorField(ptf),
immersedBoundaryFieldBase<vector>(ptf.ibPatch(), false, vector::zero) immersedBoundaryFieldBase<vector>
(
ptf.ibPatch(),
ptf.setDeadValue(),
ptf.deadValue()
)
{} {}
@ -108,7 +118,12 @@ movingImmersedBoundaryVelocityFvPatchVectorField
) )
: :
fixedValueFvPatchVectorField(ptf, iF), fixedValueFvPatchVectorField(ptf, iF),
immersedBoundaryFieldBase<vector>(ptf.ibPatch(), false, vector::zero) immersedBoundaryFieldBase<vector>
(
ptf.ibPatch(),
ptf.setDeadValue(),
ptf.deadValue()
)
{} {}
@ -138,10 +153,8 @@ void Foam::movingImmersedBoundaryVelocityFvPatchVectorField::rmap
void Foam::movingImmersedBoundaryVelocityFvPatchVectorField::updateOnMotion() void Foam::movingImmersedBoundaryVelocityFvPatchVectorField::updateOnMotion()
{ {
Info<< "Update on motion, 1" << endl;
if (size() != ibPatch().size()) if (size() != ibPatch().size())
{ {
Info<< "Update on motion, 2" << endl;
updateIbValues(); updateIbValues();
} }
} }
@ -208,6 +221,8 @@ void Foam::movingImmersedBoundaryVelocityFvPatchVectorField::write
{ {
fvPatchVectorField::write(os); fvPatchVectorField::write(os);
this->writeDeadData(os);
vectorField::null().writeEntry("value", os); vectorField::null().writeEntry("value", os);
// writeEntry("value", os); // writeEntry("value", os);