From 10f31ddaeae5cc57f090cce6d13f25b5904e7ca5 Mon Sep 17 00:00:00 2001 From: william Date: Wed, 19 Feb 2014 14:19:46 +0000 Subject: [PATCH] ENH: twoPhaseEulerFoam: modified noBlending to handle cases where only the segregated model is used --- .../blendingMethods/noBlending/noBlending.C | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C index 37c543a8ff..f83cdd55b1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/noBlending/noBlending.C @@ -88,7 +88,7 @@ Foam::tmp Foam::blendingMethods::noBlending::f1 ( "f", dimless, - phase1.name() == continuousPhase_ + phase2.name() != continuousPhase_ ) ) ); @@ -101,7 +101,28 @@ Foam::tmp Foam::blendingMethods::noBlending::f2 const phaseModel& phase2 ) const { - return f1(phase1, phase2); + const fvMesh& mesh(phase1.mesh()); + + return + tmp + ( + new volScalarField + ( + IOobject + ( + "f", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar + ( + "f", + dimless, + phase1.name() == continuousPhase_ + ) + ) + ); }