diff --git a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C index 4a7296ebcd..6b874aedeb 100644 --- a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C +++ b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C @@ -55,7 +55,7 @@ filmSurfaceVelocityFvPatchVectorField ) : mixedFvPatchField(p, iF, dict, false), - Cs_(dict.lookup("Cs")) + Cs_(dict.lookupOrDefault("Cs", 0)) { refValue() = Zero; refGrad() = Zero; @@ -139,16 +139,41 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs() const momentumTransportModel& transportModel = db().lookupType(); - // Get the patch laminar viscosity - const tmp nuEff(transportModel.nuEff(patch().index())); + // Get the patch laminar viscosity divided by delta + const tmp nuEffByDelta + ( + transportModel.nuEff(patch().index())*patch().deltaCoeffs() + ); - // Calculate the drag coefficient from the drag constant - // and the magnitude of the velocity difference - const scalarField Ds(Cs_*mag(refValue() - *this)); + 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)); - // Calculate the value-fraction from the balance between the - // external fluid drag and internal film stress - valueFraction() = Ds/(Ds + patch().deltaCoeffs()*nuEff); + // Calculate the value-fraction from the balance between the + // external fluid drag and internal film stress + valueFraction() = Ds/(Ds + nuEffByDelta); + } + else + { + // Lookup the neighbour momentum transport model + const momentumTransportModel& transportModelNbr = + mpp.nbrMesh().lookupType(); + + // Get the patch laminar viscosity + const tmp nuEffByDeltaNbr + ( + mpp.distribute + ( + transportModelNbr.nuEff(patchiNbr)*patchNbr.deltaCoeffs() + ) + ); + + // Calculate the value-fraction from the balance between the + // external fluid and internal film stresses + valueFraction() = nuEffByDeltaNbr()/(nuEffByDelta + nuEffByDeltaNbr()); + } mixedFvPatchField::updateCoeffs(); @@ -163,7 +188,12 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::write ) const { fvPatchField::write(os); - writeEntry(os, "Cs", Cs_); + + if (Cs_ > 0) + { + writeEntry(os, "Cs", Cs_); + } + writeEntry(os, "value", *this); } diff --git a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.H b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.H index 1f4e93a6be..256ddb23c5 100644 --- a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.H +++ b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.H @@ -28,24 +28,36 @@ Description Film surface velocity boundary condition Evaluates the surface velocity from the shear imposed by the neighbouring - fluid velocity using a simple drag model based on the difference between the - fluid and film velocities multiplied by the coefficient \c Cs. This simple - model is used in preference to the standard viscous shear stress model in - order to provide some means to include the drag enhancing effect - of surface ripples, rivulets etc. in the film surface. + fluid velocity using either a simple drag model based on the difference + between the fluid and film velocities multiplied by the coefficient \c Cs or + if \c Cs is not specified or set to 0 the fluid viscous shear stress. + + The simple model might be used in preference to the fluid viscous shear + stress model in order to provide some means to include the drag enhancing + effect of surface ripples, rivulets etc. in the film surface. Usage \table Property | Description | Required | Default value - Cs | Fluid-film drag coefficient | yes | + Cs | Fluid-film drag coefficient | no | 0 \endtable - Example of the boundary condition specification: + Example of the boundary condition specification using the simple drag model: \verbatim { type filmSurfaceVelocity; Cs 0.005; + value $internalField; + } + \endverbatim + + Example of the boundary condition specification using the fluid stress: + \verbatim + + { + type filmSurfaceVelocity; + value $internalField; } \endverbatim