filmSurfaceVelocityFvPatchVectorField: Corrected to use the dynamic rather than kinematic viscosity
This commit is contained in:
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "filmSurfaceVelocityFvPatchVectorField.H"
|
#include "filmSurfaceVelocityFvPatchVectorField.H"
|
||||||
#include "momentumTransportModel.H"
|
#include "compressibleMomentumTransportModel.H"
|
||||||
#include "mappedPatchBase.H"
|
#include "mappedPatchBase.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
@ -122,6 +122,7 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
const fvPatch& patchNbr =
|
const fvPatch& patchNbr =
|
||||||
refCast<const fvMesh>(mpp.nbrMesh()).boundary()[patchiNbr];
|
refCast<const fvMesh>(mpp.nbrMesh()).boundary()[patchiNbr];
|
||||||
|
|
||||||
|
// Neighbour patch face-cell velocity
|
||||||
const vectorField UpNbr
|
const vectorField UpNbr
|
||||||
(
|
(
|
||||||
patchNbr.lookupPatchField<volVectorField, scalar>("U")
|
patchNbr.lookupPatchField<volVectorField, scalar>("U")
|
||||||
@ -136,43 +137,57 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
refValue() -= n*(n & refValue());
|
refValue() -= n*(n & refValue());
|
||||||
|
|
||||||
// Lookup the momentum transport model
|
// Lookup the momentum transport model
|
||||||
const momentumTransportModel& transportModel =
|
const compressibleMomentumTransportModel& transportModel =
|
||||||
db().lookupType<momentumTransportModel>();
|
db().lookupType<compressibleMomentumTransportModel>();
|
||||||
|
|
||||||
// Get the patch laminar viscosity divided by delta
|
// Patch density
|
||||||
const tmp<scalarField> nuEffByDelta
|
const scalarField& rhop
|
||||||
(
|
(
|
||||||
transportModel.nuEff(patch().index())*patch().deltaCoeffs()
|
transportModel.rho().boundaryField()[patch().index()]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Patch laminar dynamic viscosity divided by delta
|
||||||
|
const tmp<scalarField> muEffByDelta
|
||||||
|
(
|
||||||
|
rhop*transportModel.nuEff(patch().index())
|
||||||
|
*patch().deltaCoeffs()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Lookup the neighbour momentum transport model
|
||||||
|
const compressibleMomentumTransportModel& transportModelNbr =
|
||||||
|
mpp.nbrMesh().lookupType<compressibleMomentumTransportModel>();
|
||||||
|
|
||||||
|
// Neighbour patch density
|
||||||
|
const scalarField& rhopNbr
|
||||||
|
(
|
||||||
|
transportModelNbr.rho().boundaryField()[patchiNbr]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Cs_ > 0)
|
if (Cs_ > 0)
|
||||||
{
|
{
|
||||||
// Calculate the drag coefficient from the drag constant
|
// Calculate the drag coefficient from the drag constant
|
||||||
// and the magnitude of the velocity difference
|
// and the magnitude of the velocity difference
|
||||||
const scalarField Ds(Cs_*mag(refValue() - *this));
|
const scalarField Ds(Cs_*rhopNbr*mag(refValue() - *this));
|
||||||
|
|
||||||
// Calculate the value-fraction from the balance between the
|
// Calculate the value-fraction from the balance between the
|
||||||
// external fluid drag and internal film stress
|
// external fluid drag and internal film stress
|
||||||
valueFraction() = Ds/(Ds + nuEffByDelta);
|
valueFraction() = Ds/(muEffByDelta + Ds);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Lookup the neighbour momentum transport model
|
// Get the neighbour patch laminar dynamic viscosity divided by delta
|
||||||
const momentumTransportModel& transportModelNbr =
|
const tmp<scalarField> muEffByDeltaNbr
|
||||||
mpp.nbrMesh().lookupType<momentumTransportModel>();
|
|
||||||
|
|
||||||
// Get the patch laminar viscosity
|
|
||||||
const tmp<scalarField> nuEffByDeltaNbr
|
|
||||||
(
|
(
|
||||||
mpp.fromNeighbour
|
mpp.fromNeighbour
|
||||||
(
|
(
|
||||||
transportModelNbr.nuEff(patchiNbr)*patchNbr.deltaCoeffs()
|
rhopNbr*transportModelNbr.nuEff(patchiNbr)
|
||||||
|
*patchNbr.deltaCoeffs()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Calculate the value-fraction from the balance between the
|
// Calculate the value-fraction from the balance between the
|
||||||
// external fluid and internal film stresses
|
// external fluid and internal film stresses
|
||||||
valueFraction() = nuEffByDeltaNbr()/(nuEffByDelta + nuEffByDeltaNbr());
|
valueFraction() = muEffByDeltaNbr()/(muEffByDelta + muEffByDeltaNbr());
|
||||||
}
|
}
|
||||||
|
|
||||||
mixedFvPatchField<vector>::updateCoeffs();
|
mixedFvPatchField<vector>::updateCoeffs();
|
||||||
|
|||||||
Reference in New Issue
Block a user