diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/overPotentialFoam.C b/applications/solvers/basic/potentialFoam/overPotentialFoam/overPotentialFoam.C index b41908e526..d172fccd07 100644 --- a/applications/solvers/basic/potentialFoam/overPotentialFoam/overPotentialFoam.C +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/overPotentialFoam.C @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) mesh.update(); - surfaceScalarField faceMask(localMin(mesh).interpolate(cellMask)); + //surfaceScalarField faceMask(localMin(mesh).interpolate(cellMask)); // Since solver contains no time loop it would never execute // function objects so do it ourselves diff --git a/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H b/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H index e4f473cbf3..74568e701c 100644 --- a/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H +++ b/applications/solvers/incompressible/simpleFoam/overSimpleFoam/createOversetFields.H @@ -24,7 +24,3 @@ bool adjustFringe ( simple.dict().getOrDefault("oversetAdjustPhi", false) ); -bool massFluxInterpolation -( - simple.dict().getOrDefault("massFluxInterpolation", false) -); diff --git a/applications/solvers/incompressible/simpleFoam/overSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/overSimpleFoam/pEqn.H index 78555ec5ce..17b4577563 100644 --- a/applications/solvers/incompressible/simpleFoam/overSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/overSimpleFoam/pEqn.H @@ -1,5 +1,5 @@ { - surfaceScalarField faceMask(localMin(mesh).interpolate(cellMask)); + //surfaceScalarField faceMask(localMin(mesh).interpolate(cellMask)); volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rAUf("rAUf", faceMask*fvc::interpolate(rAU)); @@ -7,12 +7,6 @@ volVectorField HbyA("HbyA", U); HbyA = constrainHbyA(cellMask*rAU*UEqn.H(), U, p); - //mesh.interpolate(HbyA); - if (massFluxInterpolation) - { - #include "interpolatedFaces.H" - } - tUEqn.clear(); surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA)); diff --git a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/createFields.H index 5fc2185ab5..57ff76c20a 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/createFields.H @@ -129,10 +129,5 @@ compressibleInterPhaseTransportModel turbulence // Mask field for zeroing out contributions on hole cells #include "createCellMask.H" -surfaceScalarField faceMask -( - localMin(mesh).interpolate(cellMask) -); - // Create bool field with interpolated cells #include "createInterpolatedCells.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/overCompressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/overCompressibleInterDyMFoam.C index 4367efe6bd..68db602098 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/overCompressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/overCompressibleInterDyMFoam.C @@ -80,9 +80,6 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" #include "createDynamicFvMesh.H" - pimpleControl pimple(mesh); - - #include "createTimeControls.H" #include "createDyMControls.H" #include "createFields.H" @@ -109,7 +106,7 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readControls.H" + #include "readDyMControls.H" if (LTS) { @@ -154,25 +151,7 @@ int main(int argc, char *argv[]) // Update cellMask field for blocking out hole cells #include "setCellMask.H" #include "setInterpolatedCells.H" - - faceMask = - localMin(mesh).interpolate(cellMask.oldTime()); - - // Zero Uf on old faceMask (H-I) - Uf *= faceMask; - - const surfaceVectorField Uint(fvc::interpolate(U)); - // Update Uf and phi on new C-I faces - Uf += (1-faceMask)*Uint; - - // Update Uf boundary - forAll(Uf.boundaryField(), patchI) - { - Uf.boundaryFieldRef()[patchI] = - Uint.boundaryField()[patchI]; - } - - phi = mesh.Sf() & Uf; + #include "correctPhiFaceMask.H" // Correct phi on individual regions if (correctPhi) @@ -182,12 +161,6 @@ int main(int argc, char *argv[]) mixture.correct(); - // Zero phi on current H-I - faceMask = localMin(mesh).interpolate(cellMask); - - phi *= faceMask; - U *= cellMask; - // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); @@ -202,10 +175,6 @@ int main(int argc, char *argv[]) #include "alphaControls.H" #include "compressibleAlphaEqnSubCycle.H" - const surfaceScalarField faceMask - ( - localMin(mesh).interpolate(cellMask) - ); rhoPhi *= faceMask; turbulence.correctPhasePhi(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/pEqn.H index 7def40d509..b69ce2e75d 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/pEqn.H @@ -10,19 +10,6 @@ fvc::flux(HbyA) ); - if (ddtCorr) - { - surfaceScalarField faceMaskOld - ( - localMin(mesh).interpolate(cellMask.oldTime()) - ); - phiHbyA += - MRF.zeroFilter - ( - fvc::interpolate(rho*rAU)*faceMaskOld*fvc::ddtCorr(U, Uf) - ); - } - MRF.makeRelative(phiHbyA); surfaceScalarField phig diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/createFields.H index 476a2780af..d560a9fcba 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/createFields.H @@ -149,10 +149,5 @@ surfaceScalarField alphaPhi10 // Mask field for zeroing out contributions on hole cells #include "createCellMask.H" -surfaceScalarField faceMask -( - localMin(mesh).interpolate(cellMask) -); - // Create bool field with interpolated cells #include "createInterpolatedCells.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/overInterPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/overInterPhaseChangeDyMFoam.C index ab83f493e0..14ac6e05e7 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/overInterPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/overInterPhaseChangeDyMFoam.C @@ -82,9 +82,7 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" #include "createDynamicFvMesh.H" - pimpleControl pimple(mesh); - #include "createTimeControls.H" #include "createDyMControls.H" #include "initContinuityErrs.H" #include "createFields.H" @@ -118,7 +116,7 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readControls.H" + #include "readDyMControls.H" // Store divU from the previous mesh so that it can be mapped // and used in correctPhi to ensure the corrected phi has the @@ -153,26 +151,7 @@ int main(int argc, char *argv[]) // Update cellMask field for blocking out hole cells #include "setCellMask.H" #include "setInterpolatedCells.H" - - faceMask = - localMin(mesh).interpolate(cellMask.oldTime()); - - - // Zero Uf on old faceMask (H-I) - Uf *= faceMask; - - const surfaceVectorField Uint(fvc::interpolate(U)); - // Update Uf and phi on new C-I faces - Uf += (1-faceMask)*Uint; - - // Update Uf boundary - forAll(Uf.boundaryField(), patchI) - { - Uf.boundaryFieldRef()[patchI] = - Uint.boundaryField()[patchI]; - } - - phi = mesh.Sf() & Uf; + #include "correctPhiFaceMask.H" if (correctPhi) { @@ -181,12 +160,6 @@ int main(int argc, char *argv[]) mixture->correct(); - // Zero phi on current H-I - faceMask = localMin(mesh).interpolate(cellMask); - - phi *= faceMask; - U *= cellMask; - // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/pEqn.H index 41a8ef3cb6..850888b9f4 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/overInterPhaseChangeDyMFoam/pEqn.H @@ -8,16 +8,6 @@ fvc::flux(HbyA) ); - - if (ddtCorr) - { - surfaceScalarField faceMaskOld - ( - localMin(mesh).interpolate(cellMask.oldTime()) - ); - phiHbyA += faceMaskOld*fvc::ddtCorr(U, Uf); - } - if (p_rgh.needReference()) { fvc::makeRelative(phiHbyA, U);