diff --git a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C index 8735cbe195..bf6acf4ee0 100644 --- a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C +++ b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "filmSurfaceVelocityFvPatchVectorField.H" -#include "momentumTransportModel.H" +#include "compressibleMomentumTransportModel.H" #include "mappedPatchBase.H" #include "addToRunTimeSelectionTable.H" @@ -122,6 +122,7 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs() const fvPatch& patchNbr = refCast(mpp.nbrMesh()).boundary()[patchiNbr]; + // Neighbour patch face-cell velocity const vectorField UpNbr ( patchNbr.lookupPatchField("U") @@ -136,43 +137,57 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs() refValue() -= n*(n & refValue()); // Lookup the momentum transport model - const momentumTransportModel& transportModel = - db().lookupType(); + const compressibleMomentumTransportModel& transportModel = + db().lookupType(); - // Get the patch laminar viscosity divided by delta - const tmp nuEffByDelta + // Patch density + const scalarField& rhop ( - transportModel.nuEff(patch().index())*patch().deltaCoeffs() + transportModel.rho().boundaryField()[patch().index()] + ); + + // Patch laminar dynamic viscosity divided by delta + const tmp muEffByDelta + ( + rhop*transportModel.nuEff(patch().index()) + *patch().deltaCoeffs() + ); + + // Lookup the neighbour momentum transport model + const compressibleMomentumTransportModel& transportModelNbr = + mpp.nbrMesh().lookupType(); + + // Neighbour patch density + const scalarField& rhopNbr + ( + transportModelNbr.rho().boundaryField()[patchiNbr] ); if (Cs_ > 0) { // Calculate the drag coefficient from the drag constant // 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 // external fluid drag and internal film stress - valueFraction() = Ds/(Ds + nuEffByDelta); + valueFraction() = Ds/(muEffByDelta + Ds); } else { - // Lookup the neighbour momentum transport model - const momentumTransportModel& transportModelNbr = - mpp.nbrMesh().lookupType(); - - // Get the patch laminar viscosity - const tmp nuEffByDeltaNbr + // Get the neighbour patch laminar dynamic viscosity divided by delta + const tmp muEffByDeltaNbr ( mpp.fromNeighbour ( - transportModelNbr.nuEff(patchiNbr)*patchNbr.deltaCoeffs() + rhopNbr*transportModelNbr.nuEff(patchiNbr) + *patchNbr.deltaCoeffs() ) ); // Calculate the value-fraction from the balance between the // external fluid and internal film stresses - valueFraction() = nuEffByDeltaNbr()/(nuEffByDelta + nuEffByDeltaNbr()); + valueFraction() = muEffByDeltaNbr()/(muEffByDelta + muEffByDeltaNbr()); } mixedFvPatchField::updateCoeffs();