Skip to content
Snippets Groups Projects
Commit 1ebe55d9 authored by Henry's avatar Henry
Browse files

multiphase solvers: remove lift and drag at fixed-flux BCs, i.e. inlets

parent 06bbf06c
Branches
Tags
No related merge requests found
......@@ -33,6 +33,7 @@ Description
#include "fvCFD.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
#include "fixedValueFvsPatchFields.H"
#include "Switch.H"
#include "IFstream.H"
......
......@@ -77,4 +77,15 @@ volScalarField heatTransferCoeff
heatTransferCoeff *= alpha1Coeff;
liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U));
// Remove lift, drag and phase heat-transfer at fixed-flux boundaries
forAll(phi1.boundaryField(), patchi)
{
if (isA<fixedValueFvsPatchScalarField>(phi1.boundaryField()[patchi]))
{
dragCoeff.boundaryField()[patchi] = 0.0;
heatTransferCoeff.boundaryField()[patchi] = 0.0;
liftForce.boundaryField()[patchi] = vector::zero;
}
}
}
......@@ -25,6 +25,7 @@ License
#include "multiphaseSystem.H"
#include "alphaContactAngleFvPatchScalarField.H"
#include "fixedValueFvsPatchFields.H"
#include "Time.H"
#include "subCycle.H"
#include "MULES.H"
......@@ -610,6 +611,21 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
}
}
// Remove lift at fixed-flux boundaries
forAll(phase.phi().boundaryField(), patchi)
{
if
(
isA<fixedValueFvsPatchScalarField>
(
phase.phi().boundaryField()[patchi]
)
)
{
tSvm().boundaryField()[patchi] = vector::zero;
}
}
return tSvm;
}
......@@ -623,9 +639,7 @@ Foam::multiphaseSystem::dragCoeffs() const
{
const dragModel& dm = *iter();
dragCoeffsPtr().insert
(
iter.key(),
volScalarField* Kptr =
(
max
(
......@@ -642,8 +656,24 @@ Foam::multiphaseSystem::dragCoeffs() const
dm.residualSlip()
)
)
).ptr()
);
).ptr();
// Remove drag at fixed-flux boundaries
forAll(dm.phase1().phi().boundaryField(), patchi)
{
if
(
isA<fixedValueFvsPatchScalarField>
(
dm.phase1().phi().boundaryField()[patchi]
)
)
{
Kptr->boundaryField()[patchi] = 0.0;
}
}
dragCoeffsPtr().insert(iter.key(), Kptr);
}
return dragCoeffsPtr;
......
......@@ -19,3 +19,13 @@
(
Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U))
);
// Remove lift and drag at fixed-flux boundaries
forAll(phi1.boundaryField(), patchi)
{
if (isA<fixedValueFvsPatchScalarField>(phi1.boundaryField()[patchi]))
{
K.boundaryField()[patchi] = 0.0;
liftCoeff.boundaryField()[patchi] = vector::zero;
}
}
......@@ -35,6 +35,7 @@ Description
#include "subCycle.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
#include "fixedValueFvsPatchFields.H"
#include "Switch.H"
#include "IFstream.H"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment