From 13e1addc356a6e7be75df5d48c6589eb147b0e82 Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Thu, 15 Aug 2013 17:03:52 +0100 Subject: [PATCH] twoPhaseEulerFoam: Corrected potential conservation issue at inlet-outlet BCs Updated MULES to ensure the limiter is 1 at inlet BCs --- .../solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H | 6 ++++++ src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C | 5 +++-- .../twoPhaseEulerFoam/laminar/fluidisedBed/0/U.particles | 5 ++--- .../laminar/fluidisedBed/0/alpha.particles | 3 +-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H index 77a04592e32..f4b97ccd9c5 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H @@ -92,6 +92,12 @@ ) ); + alphaPhic1.boundaryField() = min + ( + phi1.boundaryField()*alpha1.boundaryField(), + alphaPhic1.boundaryField() + ); + MULES::explicitSolve ( geometricOneField(), diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index e0718f923a9..53b64a5f7b5 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C @@ -485,11 +485,12 @@ void Foam::MULES::limiter const labelList& pFaceCells = mesh.boundary()[patchi].faceCells(); const scalarField& phiBDPf = phiBDBf[patchi]; + const scalarField& phiCorrPf = phiCorrBf[patchi]; forAll(lambdaPf, pFacei) { // Limit outlet faces only - if (phiBDPf[pFacei] > 0) + if ((phiBDPf[pFacei] + phiCorrPf[pFacei]) > SMALL*SMALL) { label pfCelli = pFaceCells[pFacei]; @@ -862,7 +863,7 @@ void Foam::MULES::limiterCorr forAll(lambdaPf, pFacei) { // Limit outlet faces only - if (phiCorrPf[pFacei] > 0) + if (phiCorrPf[pFacei] > SMALL*SMALL) { label pfCelli = pFaceCells[pFacei]; diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.particles b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.particles index 95abcf62b37..fa0397ae355 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.particles +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/U.particles @@ -28,9 +28,8 @@ boundaryField outlet { - type pressureInletOutletVelocity; - phi phi.particles; - value $internalField; + type fixedValue; + value uniform (0 0 0); } walls diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/alpha.particles b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/alpha.particles index 7a433521e86..cf55161b4a5 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/alpha.particles +++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/fluidisedBed/0/alpha.particles @@ -6027,8 +6027,7 @@ boundaryField { inlet { - type fixedValue; - value uniform 0; + type zeroGradient; } outlet { -- GitLab