multiphase solvers: remove lift and drag at fixed-flux BCs, i.e. inlets
This commit is contained in:
parent
06bbf06c5b
commit
1ebe55d95b
@ -33,6 +33,7 @@ Description
|
|||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "nearWallDist.H"
|
#include "nearWallDist.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
|
#include "fixedValueFvsPatchFields.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
|
@ -77,4 +77,15 @@ volScalarField heatTransferCoeff
|
|||||||
heatTransferCoeff *= alpha1Coeff;
|
heatTransferCoeff *= alpha1Coeff;
|
||||||
|
|
||||||
liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U));
|
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 "multiphaseSystem.H"
|
||||||
#include "alphaContactAngleFvPatchScalarField.H"
|
#include "alphaContactAngleFvPatchScalarField.H"
|
||||||
|
#include "fixedValueFvsPatchFields.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "MULES.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;
|
return tSvm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -623,9 +639,7 @@ Foam::multiphaseSystem::dragCoeffs() const
|
|||||||
{
|
{
|
||||||
const dragModel& dm = *iter();
|
const dragModel& dm = *iter();
|
||||||
|
|
||||||
dragCoeffsPtr().insert
|
volScalarField* Kptr =
|
||||||
(
|
|
||||||
iter.key(),
|
|
||||||
(
|
(
|
||||||
max
|
max
|
||||||
(
|
(
|
||||||
@ -642,8 +656,24 @@ Foam::multiphaseSystem::dragCoeffs() const
|
|||||||
dm.residualSlip()
|
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;
|
return dragCoeffsPtr;
|
||||||
|
@ -19,3 +19,13 @@
|
|||||||
(
|
(
|
||||||
Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U))
|
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 "subCycle.H"
|
||||||
#include "nearWallDist.H"
|
#include "nearWallDist.H"
|
||||||
#include "wallFvPatch.H"
|
#include "wallFvPatch.H"
|
||||||
|
#include "fixedValueFvsPatchFields.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
|
Loading…
Reference in New Issue
Block a user