From b16e058221bb024f0395af6f1838b75de0699f92 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 21 Dec 2011 10:16:33 +0000 Subject: [PATCH 1/4] MRFZoneTemplates: Call internalField on phi to ensure the old-time value is stored for ddtPhiCorr --- .../cfdTools/general/MRF/MRFZoneTemplates.C | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C index 55821dbfde..23cae40603 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneTemplates.C @@ -44,11 +44,15 @@ void Foam::MRFZone::relativeRhoFlux const vector& origin = origin_.value(); const vector& Omega = Omega_.value(); + const vectorField& Cfi = Cf.internalField(); + const vectorField& Sfi = Sf.internalField(); + scalarField& phii = phi.internalField(); + // Internal faces forAll(internalFaces_, i) { label facei = internalFaces_[i]; - phi[facei] -= rho[facei]*(Omega ^ (Cf[facei] - origin)) & Sf[facei]; + phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin)) & Sfi[facei]; } // Included patches @@ -91,11 +95,15 @@ void Foam::MRFZone::absoluteRhoFlux const vector& origin = origin_.value(); const vector& Omega = Omega_.value(); + const vectorField& Cfi = Cf.internalField(); + const vectorField& Sfi = Sf.internalField(); + scalarField& phii = phi.internalField(); + // Internal faces forAll(internalFaces_, i) { label facei = internalFaces_[i]; - phi[facei] += rho[facei]*(Omega ^ (Cf[facei] - origin)) & Sf[facei]; + phii[facei] += rho[facei]*(Omega ^ (Cfi[facei] - origin)) & Sfi[facei]; } // Included patches From 7b7fe8cf0a9a803c2a533d530c5c0d5772b70a10 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 21 Dec 2011 10:18:53 +0000 Subject: [PATCH 2/4] multiphaseEulerFoam phaseModel : Correct re-reading of dictionary entries --- .../phaseModel/phaseModel/phaseModel.C | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C index bf65fe659c..543927e29b 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -212,10 +212,10 @@ bool Foam::phaseModel::read(const dictionary& phaseDict) //if (nuModel_->read(phaseDict_)) { - phaseDict_.lookup("nu") >> nu_; - phaseDict_.lookup("kappa") >> kappa_; - phaseDict_.lookup("Cp") >> Cp_; - phaseDict_.lookup("rho") >> rho_; + phaseDict_.lookup("nu") >> nu_.value(); + phaseDict_.lookup("kappa") >> kappa_.value(); + phaseDict_.lookup("Cp") >> Cp_.value(); + phaseDict_.lookup("rho") >> rho_.value(); return true; } From 014c92982afeb4b22f7fe6491d9733a8ec0ef8ac Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 21 Dec 2011 10:20:35 +0000 Subject: [PATCH 3/4] multiphaseEulerFoam damBreak4phase tutorial: improved transport settings --- .../constant/transportProperties | 125 +++++++++++++++++- .../damBreak4phaseFine/system/controlDict | 2 +- 2 files changed, 119 insertions(+), 8 deletions(-) diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties index e59dbd8d6f..fad0a7a482 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties @@ -69,7 +69,7 @@ phases diameterModel constant; constantCoeffs { - d 1e-3; + d 3e-3; } } ); @@ -96,9 +96,9 @@ interfaceCompression virtualMass ( - (air water) 0.5 - (air oil) 0.5 - (air mercury) 0.5 + (air water) 0 + (air oil) 0 + (air mercury) 0 (water oil) 0.5 (water mercury) 0.5 (oil mercury) 0.5 @@ -108,21 +108,132 @@ drag ( (air water) { - type SchillerNaumann; + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + residualPhaseFraction 1e-3; residualSlip 1e-3; } (air oil) { - type SchillerNaumann; + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + residualPhaseFraction 1e-3; residualSlip 1e-3; } (air mercury) { - type SchillerNaumann; + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water oil) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water mercury) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (oil mercury) + { + type blended; + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + residualPhaseFraction 1e-3; residualSlip 1e-3; } diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/controlDict b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/controlDict index fdcdcc258c..793c8a9121 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/controlDict +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/controlDict @@ -17,7 +17,7 @@ FoamFile application multiphaseInterFoam; -startFrom latestTime; +startFrom startTime; startTime 0; From 29d4f2ff33fba32c670cc323668c8ed4d64dcc77 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 21 Dec 2011 10:27:09 +0000 Subject: [PATCH 4/4] multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C: updated drag pre-factor --- .../multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 6ae60e42dc..2224030613 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -629,8 +629,9 @@ Foam::multiphaseSystem::dragCoeffs() const ( max ( - fvc::average(dm.phase1())*fvc::average(dm.phase2()), - //dm.phase1()*dm.phase2(), + //fvc::average(dm.phase1()*dm.phase2()), + //fvc::average(dm.phase1())*fvc::average(dm.phase2()), + dm.phase1()*dm.phase2(), dm.residualPhaseFraction() ) *dm.K