diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C index c6b330cd1b..116cfd92ca 100644 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C @@ -144,32 +144,41 @@ void VoFPatchTransfer::correct // Do not correct if no patches selected if (!patchIDs_.size()) return; + // Film properties + const thermoSurfaceFilm& film = filmType(); const scalarField& delta = film.delta(); const scalarField& rho = film.rho(); + const vectorField& U = film.U(); + const scalarField& he = film.thermo().he(); + const scalarField& magSf = film.magSf(); const polyBoundaryMesh& pbm = film.mesh().boundaryMesh(); + // Primary region properties + + const fvMesh& primaryMesh = film.primaryMesh(); + const compressibleTwoPhaseVoFMixture& thermo ( - film.primaryMesh().lookupObject + primaryMesh.lookupObject ( "phaseProperties" ) ); - const volVectorField& UVoF - ( - film.primaryMesh().lookupObject("U") - ); - const volScalarField& alphaVoF = thermo.alpha1(); const volScalarField& rhoVoF = thermo.thermo1().rho()(); const volScalarField& heVoF = thermo.thermo1().he(); + const volVectorField& UVoF + ( + primaryMesh.lookupObject("U") + ); + forAll(patchIDs_, pidi) { const label patchi = patchIDs_[pidi]; @@ -192,7 +201,7 @@ void VoFPatchTransfer::correct film.toFilm ( patchi, - film.primaryMesh().boundary()[primaryPatchi].deltaCoeffs() + primaryMesh.boundary()[primaryPatchi].deltaCoeffs() ) ); @@ -221,17 +230,14 @@ void VoFPatchTransfer::correct film.toFilm ( patchi, - film.primaryMesh().boundary()[primaryPatchi] - .patchInternalField(film.primaryMesh().V()) + primaryMesh.boundary()[primaryPatchi] + .patchInternalField(primaryMesh.V()) ) ); const polyPatch& pp = pbm[patchi]; const labelList& faceCells = pp.faceCells(); - const vectorField& U = film.U(); - const scalarField& he = film.thermo().he(); - // Accumulate the total mass removed from patch scalar dMassPatch = 0; diff --git a/applications/solvers/modules/isothermalFilm/contactForce.C b/applications/solvers/modules/isothermalFilm/contactForce.C index 04d0e0017a..d81ebadae0 100644 --- a/applications/solvers/modules/isothermalFilm/contactForce.C +++ b/applications/solvers/modules/isothermalFilm/contactForce.C @@ -72,8 +72,8 @@ Foam::solvers::isothermalFilm::contactForce(const volScalarField& sigma) const } // Filter for film wall and surface patches - labelHashSet wallSurfacePatches(wallPatchIDs); - wallSurfacePatches.insert(surfacePatchIDs); + labelHashSet wallAndSurfacePatches(wallPatchIDs); + wallAndSurfacePatches.insert(surfacePatchID); const volScalarField::Boundary& deltaBf = delta.boundaryField(); @@ -82,7 +82,7 @@ Foam::solvers::isothermalFilm::contactForce(const volScalarField& sigma) const const fvPatch& p(mesh.boundary()[patchi]); // For internal coupled patches - if (p.coupled() && !wallSurfacePatches.found(patchi)) + if (p.coupled() && !wallAndSurfacePatches.found(patchi)) { tmp tdeltan = deltaBf[patchi].patchNeighbourField(); const scalarField& deltan = tdeltan(); diff --git a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C index 6b874aedeb..9b1e89502e 100644 --- a/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C +++ b/applications/solvers/modules/isothermalFilm/derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C @@ -129,7 +129,7 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs() ); // Set the reference value to the neighbouring fluid internal velocity - refValue() = mpp.distribute(UpNbr); + refValue() = mpp.fromNeigbour(UpNbr); // Remove the normal component of the surface vel const vectorField n(patch().nf()); @@ -164,7 +164,7 @@ void Foam::filmSurfaceVelocityFvPatchVectorField::updateCoeffs() // Get the patch laminar viscosity const tmp nuEffByDeltaNbr ( - mpp.distribute + mpp.fromNeigbour ( transportModelNbr.nuEff(patchiNbr)*patchNbr.deltaCoeffs() ) diff --git a/applications/solvers/modules/isothermalFilm/isothermalFilm.C b/applications/solvers/modules/isothermalFilm/isothermalFilm.C index 06fe7642ac..2c78e85d77 100644 --- a/applications/solvers/modules/isothermalFilm/isothermalFilm.C +++ b/applications/solvers/modules/isothermalFilm/isothermalFilm.C @@ -152,10 +152,8 @@ bool Foam::solvers::isothermalFilm::initFilmMesh() wallPatchIDs.transfer(wallPatchIDs_); - // Search for film surface patches - - label nSurfaceFaces = 0; - DynamicList