From 6e143e5ab0cec01bbce2f16c944c29d5d1e314f2 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 24 Jan 2018 14:57:14 +0000 Subject: [PATCH] reactingEulerFoam: Added wall-boiling and phase change capability to populationBalance functionality Introduced thermalPhaseChangePopulationBalanceTwo- and MultiphaseSystem as user-selectable phaseSystems which are the first to actually use multiple mass transfer mechanisms enabled by commit d3a237f5608212988f742d0a89f6fbe82b64e7b4. The functionality is demonstrated using the reactingTwoPhaseEulerFoam wallBoilingPolydisperse tutorial. Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR). --- .../multiphase/reactingEulerFoam/Allwmake | 1 + .../reactingEulerFoam/phaseSystems/Make/files | 5 + .../phaseSystems/Make/options | 1 + .../PopulationBalancePhaseSystem.C | 4 +- .../velocityGroup/velocityGroup.C | 25 +- .../binaryBreakupModel/binaryBreakupModel.C | 7 - .../binaryBreakupModel/binaryBreakupModel.H | 7 +- .../breakupModels/breakupModel/breakupModel.C | 7 - .../breakupModels/breakupModel/breakupModel.H | 7 +- .../coalescenceModel/coalescenceModel.C | 9 +- .../coalescenceModel/coalescenceModel.H | 9 +- .../driftModels/driftModel/driftModel.C | 9 +- .../driftModels/driftModel/driftModel.H | 9 +- .../driftModels/phaseChange/phaseChange.C | 123 ++++ .../driftModels/phaseChange/phaseChange.H | 112 ++++ .../constantNucleation/constantNucleation.C | 117 ++++ .../constantNucleation/constantNucleation.H | 111 ++++ .../nucleationModel/nucleationModel.C | 86 +++ .../nucleationModel/nucleationModel.H | 163 +++++ .../wallBoiling/wallBoiling.C | 199 ++++++ .../wallBoiling/wallBoiling.H | 115 ++++ .../populationBalanceModel.C | 620 ++++++++++-------- .../populationBalanceModel.H | 42 +- .../multiphaseSystem/multiphaseSystems.C | 23 +- .../twoPhaseSystem/twoPhaseSystems.C | 23 +- .../dynamicIndexedOctree.C | 34 +- .../RAS/wallBoiling1D_2phase/0.org/T.liquid | 59 -- .../RAS/wallBoiling1D_2phase/0.org/U.gas2 | 54 -- .../RAS/wallBoiling1D_2phase/0.org/alphat.gas | 73 --- .../wallBoiling1D_2phase/0.org/alphat.liquid | 101 --- .../RAS/wallBoiling1D_2phase/Allrun | 5 +- .../RAS/wallBoiling1D_3phase/0.org/T.gas | 55 -- .../RAS/wallBoiling1D_3phase/0.org/U.gas2 | 54 -- .../RAS/wallBoiling1D_3phase/0.org/U.liquid | 54 -- .../wallBoiling1D_3phase/0.org/alphat.gas2 | 66 -- .../wallBoiling1D_3phase/0.org/epsilon.gas | 62 -- .../wallBoiling1D_3phase/0.org/epsilon.gas2 | 62 -- .../wallBoiling1D_3phase/0.org/epsilon.liquid | 63 -- .../RAS/wallBoiling1D_3phase/0.org/k.gas | 57 -- .../RAS/wallBoiling1D_3phase/0.org/k.gas2 | 57 -- .../RAS/wallBoiling1D_3phase/0.org/k.liquid | 57 -- .../RAS/wallBoiling1D_3phase/0.org/nut.gas | 57 -- .../RAS/wallBoiling1D_3phase/0.org/nut.gas2 | 57 -- .../RAS/wallBoiling1D_3phase/0.org/nut.liquid | 57 -- .../RAS/wallBoiling1D_3phase/Allrun | 5 +- .../constant/phaseProperties | 3 + .../constant/phaseProperties | 3 + .../RAS/wallBoiling/Allrun | 2 + .../constant/thermophysicalProperties.gas | 1 - .../RAS/wallBoiling/system/controlDict | 2 +- .../RAS/wallBoiling/system/controlDict.org | 2 +- .../RAS/wallBoiling1D/0.org/T.gas | 55 -- .../RAS/wallBoiling1D/0.org/T.liquid | 59 -- .../RAS/wallBoiling1D/0.org/U.gas | 54 -- .../RAS/wallBoiling1D/0.org/U.gas2 | 54 -- .../RAS/wallBoiling1D/0.org/U.liquid | 54 -- .../RAS/wallBoiling1D/0.org/alpha.gas | 51 -- .../RAS/wallBoiling1D/0.org/alpha.liquid | 51 -- .../RAS/wallBoiling1D/0.org/alphat.gas | 73 --- .../RAS/wallBoiling1D/0.org/alphat.liquid | 101 --- .../RAS/wallBoiling1D/0.org/epsilon.gas | 62 -- .../RAS/wallBoiling1D/0.org/epsilon.liquid | 63 -- .../RAS/wallBoiling1D/0.org/k.gas | 57 -- .../RAS/wallBoiling1D/0.org/k.liquid | 57 -- .../RAS/wallBoiling1D/0.org/nut.gas | 57 -- .../RAS/wallBoiling1D/0.org/nut.liquid | 57 -- .../RAS/wallBoiling1D/0.org/p | 51 -- .../RAS/wallBoiling1D/Allrun | 5 +- .../RAS/wallBoilingPolyDisperse/0}/T.gas | 4 +- .../RAS/wallBoilingPolyDisperse/0}/T.liquid | 6 +- .../RAS/wallBoilingPolyDisperse/0}/U.gas | 0 .../RAS/wallBoilingPolyDisperse/0}/U.liquid | 0 .../RAS/wallBoilingPolyDisperse/0}/alpha.gas | 0 .../wallBoilingPolyDisperse/0}/alpha.liquid | 0 .../RAS/wallBoilingPolyDisperse/0}/alphat.gas | 0 .../wallBoilingPolyDisperse/0}/alphat.liquid | 25 +- .../wallBoilingPolyDisperse/0}/epsilon.gas | 0 .../wallBoilingPolyDisperse/0}/epsilon.liquid | 0 .../wallBoilingPolyDisperse/0/f.gas.bubbles} | 16 +- .../RAS/wallBoilingPolyDisperse/0}/k.gas | 0 .../RAS/wallBoilingPolyDisperse/0}/k.liquid | 0 .../RAS/wallBoilingPolyDisperse/0}/nut.gas | 0 .../RAS/wallBoilingPolyDisperse/0}/nut.liquid | 0 .../RAS/wallBoilingPolyDisperse/0}/p | 0 .../RAS/wallBoilingPolyDisperse/0}/p_rgh | 0 .../RAS/wallBoilingPolyDisperse/Allclean | 10 + .../RAS/wallBoilingPolyDisperse/Allrun | 21 + .../Tsat_water_1_2bar.csv | 66 ++ .../RAS/wallBoilingPolyDisperse/constant/g | 21 + .../constant/phaseProperties | 218 ++++++ .../constant/thermophysicalProperties.gas} | 54 +- .../constant/thermophysicalProperties.liquid} | 59 +- .../constant/turbulenceProperties.gas} | 39 +- .../constant/turbulenceProperties.liquid} | 39 +- .../system/blockMeshDict} | 75 ++- .../system/controlDict} | 67 +- .../system/controlDict.org} | 67 +- .../wallBoilingPolyDisperse/system/fvSchemes | 76 +++ .../wallBoilingPolyDisperse/system/fvSolution | 122 ++++ 99 files changed, 2254 insertions(+), 2628 deletions(-) create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.H delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.liquid delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.gas2 delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.gas delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.liquid delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas2 delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.liquid delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.gas2 delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas2 delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.liquid delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas2 delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.liquid delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas2 delete mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas2 delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.gas delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.liquid delete mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/T.gas (92%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/T.liquid (89%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/U.gas (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/U.liquid (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/alpha.gas (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/alpha.liquid (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/alphat.gas (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/alphat.liquid (78%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/epsilon.gas (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/epsilon.liquid (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas2 => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/f.gas.bubbles} (78%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/k.gas (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/k.liquid (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/nut.gas (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/nut.liquid (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/p (100%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0}/p_rgh (100%) create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allclean create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allrun create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Tsat_water_1_2bar.csv create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/g create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.gas} (56%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.liquid} (54%) rename tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/{wallBoiling1D/0.org/p_rgh => wallBoilingPolyDisperse/constant/turbulenceProperties.gas} (58%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p_rgh => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.liquid} (58%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas2 => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/blockMeshDict} (53%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.liquid => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict} (56%) rename tutorials/multiphase/{reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas => reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict.org} (56%) create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSchemes create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSolution diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/Allwmake index 0414175eb..be8ba39a1 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwmake @@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory wmakeLnInclude interfacialModels wmakeLnInclude interfacialCompositionModels +wmakeLnInclude derivedFvPatchFields wmake $targetType phaseSystems wmake $targetType interfacialModels wmake $targetType interfacialCompositionModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/files b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/files index 6e3548f45..ba3fde4f0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/files +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/files @@ -34,6 +34,11 @@ populationBalanceModel/daughterSizeDistributionModels/uniformBinaryDsd/uniformBi populationBalanceModel/driftModels/driftModel/driftModel.C populationBalanceModel/driftModels/constantDrift/constantDrift.C populationBalanceModel/driftModels/densityChange/densityChange.C +populationBalanceModel/driftModels/phaseChange/phaseChange.C + +populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.C +populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.C +populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.C BlendedInterfacialModel/blendingMethods/blendingMethod/blendingMethod.C BlendedInterfacialModel/blendingMethods/blendingMethod/newBlendingMethod.C diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options index b93dd16af..aa2c1fa5a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I../interfacialModels/lnInclude \ -I../interfacialCompositionModels/lnInclude \ + -I../derivedFvPatchFields/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C index 9b3030634..60b8b1191 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C @@ -359,8 +359,6 @@ void Foam::PopulationBalancePhaseSystem::solve() { BasePhaseSystem::solve(); - BasePhaseSystem::correct(); - forAll(populationBalances_, i) { populationBalances_[i].solve(); @@ -368,4 +366,4 @@ void Foam::PopulationBalancePhaseSystem::solve() } -// ************************************************************************* //1 +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C index e8834f377..e54d3109f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C @@ -74,7 +74,7 @@ Foam::diameterModels::velocityGroup::secondMoment() const const sizeGroup& fi = sizeGroups_[i]; m2 += sqr(fi.d())*formFactor()*fi - *max(fi.phase(), fi.phase().residualAlpha())/fi.x(); + *max(fi.phase(), SMALL)/fi.x(); } return tm2; @@ -106,7 +106,7 @@ Foam::diameterModels::velocityGroup::thirdMoment() const const sizeGroup& fi = sizeGroups_[i]; m3 += pow3(fi.d())*formFactor()*fi - *max(fi.phase(), fi.phase().residualAlpha())/fi.x(); + *max(fi.phase(), SMALL)/fi.x(); } return tm3; @@ -308,6 +308,12 @@ Foam::diameterModels::velocityGroup::velocityGroup { if ( + phase_.mesh().solverDict(popBalName_).lookupOrDefault + ( + "renormalizeAtRestart", + false + ) + || phase_.mesh().solverDict(popBalName_).lookupOrDefault ( "renormalize", @@ -328,11 +334,18 @@ Foam::diameterModels::velocityGroup::velocityGroup ) { FatalErrorInFunction - << "Initial values of the sizeGroups belonging to velocityGroup " + << " Initial values of the sizeGroups belonging to velocityGroup " << this->phase().name() - << " must add to unity. The sizeGroup fractions can be" - << " renormalized by setting the renormalize switch" - << " in the fvSolution subdictionary " << popBalName_ << "." << endl + << " must add to" << nl << " unity. This condition might be" + << " violated due to wrong entries in the" << nl + << " velocityGroupCoeffs subdictionary or bad initial conditions in" + << " the startTime" << nl + << " directory. The sizeGroups can be renormalized at every" + << " timestep or at restart" << nl + << " only by setting the corresponding switch renormalize or" + << " renormalizeAtRestart" << nl + << " in the fvSolution subdictionary " << popBalName_ << "." + << " Note that boundary conditions are not" << nl << "renormalized." << exit(FatalError); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.C index b4231c009..b9fc2d0ca 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.C @@ -79,13 +79,6 @@ Foam::diameterModels::binaryBreakupModel::binaryBreakupModel // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::diameterModels::populationBalanceModel& -Foam::diameterModels::binaryBreakupModel::popBal() const -{ - return popBal_; -} - - void Foam::diameterModels::binaryBreakupModel::correct() {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.H index bbcc09371..7478f6ac8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.H @@ -138,8 +138,11 @@ public: // Member Functions - //- Return reference to populationBalance - const populationBalanceModel& popBal() const; + //- Return reference to the populationBalance + const populationBalanceModel& popBal() const + { + return popBal_; + } //- Correct diameter independent expressions virtual void correct(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.C index 3426a53df..00c46ff81 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.C @@ -82,13 +82,6 @@ Foam::diameterModels::breakupModel::breakupModel // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::diameterModels::populationBalanceModel& -Foam::diameterModels::breakupModel::popBal() const -{ - return popBal_; -} - - void Foam::diameterModels::breakupModel::correct() {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H index fe63f56ad..547d95156 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H @@ -145,9 +145,12 @@ public: // Member Functions //- Return reference to the populationBalance - const populationBalanceModel& popBal() const; + const populationBalanceModel& popBal() const + { + return popBal_; + } - //- Return const reference to daughter size distribution pointer + //- Return const-reference to daughter size distribution pointer const autoPtr& dsdPtr() const { return dsd_; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.C index 8a6f17b2d..746cda8da 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,13 +80,6 @@ Foam::diameterModels::coalescenceModel::coalescenceModel // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::diameterModels::populationBalanceModel& -Foam::diameterModels::coalescenceModel::popBal() const -{ - return popBal_; -} - - void Foam::diameterModels::coalescenceModel::correct() {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.H index 44767d361..f01b81b07 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,8 +136,11 @@ public: // Member Functions - //- Return reference to populationBalance - const populationBalanceModel& popBal() const; + //- Return reference to the populationBalance + const populationBalanceModel& popBal() const + { + return popBal_; + } //- Correct diameter independent expressions virtual void correct(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.C index b2c69c5b9..d09acfa63 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,13 +79,6 @@ Foam::diameterModels::driftModel::driftModel // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::diameterModels::populationBalanceModel& -Foam::diameterModels::driftModel::popBal() const -{ - return popBal_; -} - - void Foam::diameterModels::driftModel::correct() {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.H index 6c8fb3928..d31b02577 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,8 +133,11 @@ public: // Member Functions - //- Return reference to populationBalanceModel - const populationBalanceModel& popBal() const; + //- Return reference to the populationBalance + const populationBalanceModel& popBal() const + { + return popBal_; + } //- Correct diameter independent expressions virtual void correct(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C new file mode 100644 index 000000000..8e9b193be --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.C @@ -0,0 +1,123 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "phaseChange.H" +#include "addToRunTimeSelectionTable.H" +#include "phaseSystem.H" +#include "phasePairKey.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ +namespace driftModels +{ + defineTypeNameAndDebug(phaseChange, 0); + addToRunTimeSelectionTable(driftModel, phaseChange, dictionary); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModels::driftModels::phaseChange::phaseChange +( + const populationBalanceModel& popBal, + const dictionary& dict +) +: + driftModel(popBal, dict), + pairNames_(dict.lookup("pairNames")), + iDmdt_ + ( + IOobject + ( + "iDmdt", + popBal.time().timeName(), + popBal.mesh() + ), + popBal.mesh(), + dimensionedScalar("Sui", dimDensity/dimTime, Zero) + ), + N_ + ( + IOobject + ( + "N", + popBal.mesh().time().timeName(), + popBal.mesh() + ), + popBal.mesh(), + dimensionedScalar("Sui", inv(dimVolume), Zero) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + + +void Foam::diameterModels::driftModels::phaseChange::correct() +{ + iDmdt_ *= 0.0; + + forAll(pairNames_, i) + { + const word& pairName = pairNames_[i]; + + iDmdt_ += + popBal_.mesh().lookupObject + ( + IOobject::groupName("iDmdt", pairName) + ); + } + + N_ *= 0.0; + + forAll(popBal_.sizeGroups(), i) + { + const sizeGroup& fi = *popBal_.sizeGroups()[i]; + + N_ += fi*max(fi.phase(), SMALL)/fi.x(); + } +} + + +void Foam::diameterModels::driftModels::phaseChange::driftRate +( + volScalarField& driftRate, + const label i +) +{ + const sizeGroup& fi = *popBal_.sizeGroups()[i]; + + driftRate += iDmdt_/(N_*fi.phase().rho()); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.H new file mode 100644 index 000000000..bc209d239 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/phaseChange/phaseChange.H @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::diameterModels::driftModels::isothermal + +Description + Drift induced by interfacial phaseChange. + +SourceFiles + isothermal.C + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseChange_H +#define phaseChange_H + +#include "driftModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ +namespace driftModels +{ + +/*---------------------------------------------------------------------------*\ + Class phaseChange Declaration +\*---------------------------------------------------------------------------*/ + +class phaseChange +: + public driftModel +{ + // Private data + + //- Names of unorderd phasePairs between which phaseChange occurs, i.e. + // "(gasIAndLiquid gasIIAndLiquid)" + List pairNames_; + + //- Total mass transfer rate due to phaseChange + volScalarField iDmdt_; + + //- Total number concentration + volScalarField N_; + +public: + + //- Runtime type information + TypeName("phaseChange"); + + // Constructor + + phaseChange + ( + const populationBalanceModel& popBal, + const dictionary& dict + ); + + + //- Destructor + virtual ~phaseChange() + {} + + + // Member Functions + + //- Correct diameter independent expressions + virtual void correct(); + + //- Add to driftRate + virtual void driftRate + ( + volScalarField& driftRate, + const label i + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace driftModels +} // End namespace diameterModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.C new file mode 100644 index 000000000..bf5cda759 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.C @@ -0,0 +1,117 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "constantNucleation.H" +#include "phaseSystem.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ +namespace nucleationModels +{ + defineTypeNameAndDebug(constantNucleation, 0); + addToRunTimeSelectionTable + ( + nucleationModel, + constantNucleation, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModels::nucleationModels::constantNucleation:: +constantNucleation +( + const populationBalanceModel& popBal, + const dictionary& dict +) +: + nucleationModel(popBal, dict), + d_("departureDiameter", dimLength, dict), + velGroup_ + ( + refCast + ( + popBal.mesh().lookupObject + ( + IOobject::groupName + ( + "alpha", + dict.lookup("velocityGroup") + ) + ).dPtr()() + ) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::diameterModels::nucleationModels::constantNucleation::correct() +{ + if + ( + d_.value() < velGroup_.sizeGroups().first().d().value() + || d_.value() > velGroup_.sizeGroups().last().d().value() + ) + { + WarningInFunction + << "Departure diameter " << d_.value() << " m outside of range [" + << velGroup_.sizeGroups().first().d().value() << ", " + << velGroup_.sizeGroups().last().d().value() << "] m" << endl + << " The nucleation rate is set to zero." << endl + << " Adjust discretization over property space to suppress this" + << " warning." + << endl; + } +} + + +void Foam::diameterModels::nucleationModels::constantNucleation:: +nucleationRate +( + volScalarField& nucleationRate, + const label i +) +{ + const sizeGroup& fi = *popBal_.sizeGroups()[i]; + phaseModel& phase = const_cast(fi.phase()); + volScalarField& rho = phase.thermo().rho(); + + nucleationRate += + popBal_.gamma(i, velGroup_.formFactor()*pow3(d_)) + *(popBal_.fluid().fvOptions()(phase, rho)&rho)/rho/fi.x(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.H new file mode 100644 index 000000000..3199fe409 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/constantNucleation/constantNucleation.H @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::diameterModels::nucleationModels::constant + +Description + Constant nucleation rate within all classes. Used for verification and + validation of the nucleation formulation implemented in the + populationBalanceModel class. Rate is calculated from fvOptions mass source. + +SourceFiles + constant.C + +\*---------------------------------------------------------------------------*/ + +#ifndef constantNucleation_H +#define constantNucleation_H + +#include "nucleationModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ +namespace nucleationModels +{ + +/*---------------------------------------------------------------------------*\ + Class constantNucleation Declaration +\*---------------------------------------------------------------------------*/ + +class constantNucleation +: + public nucleationModel +{ + // Private data + + //- Departure diameter + dimensionedScalar d_; + + //- Velocity group in which the nucleation occurs + const velocityGroup& velGroup_; + + +public: + + //- Runtime type information + TypeName("constant"); + + // Constructor + + constantNucleation + ( + const populationBalanceModel& popBal, + const dictionary& dict + ); + + + //- Destructor + virtual ~constantNucleation() + {} + + + // Member Functions + + //- Correct diameter independent expressions + virtual void correct(); + + //- Add to nucleationRate + virtual void nucleationRate + ( + volScalarField& nucleationRate, + const label i + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace nucleationModels +} // End namespace diameterModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.C new file mode 100644 index 000000000..083b9bdb3 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "nucleationModel.H" +#include "phaseSystem.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ + defineTypeNameAndDebug(nucleationModel, 0); + defineRunTimeSelectionTable(nucleationModel, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::diameterModels::nucleationModel::New +( + const word& type, + const populationBalanceModel& popBal, + const dictionary& dict +) +{ + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(type); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorInFunction + << "Unknown zeroeth order model type " + << type << nl << nl + << "Valid zeroeth order model types : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return autoPtr(cstrIter()(popBal, dict)); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModels::nucleationModel::nucleationModel +( + const populationBalanceModel& popBal, + const dictionary& dict +) +: + popBal_(popBal) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::diameterModels::nucleationModel::correct() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.H new file mode 100644 index 000000000..05b16d246 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/nucleationModel/nucleationModel.H @@ -0,0 +1,163 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::diameterModels::nucleationModel + +Description + Base class for nucleation models. + +SourceFiles + nucleationModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef nucleationModel_H +#define nucleationModel_H + +#include "populationBalanceModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ + +/*---------------------------------------------------------------------------*\ + Class nucleationModel Declaration +\*---------------------------------------------------------------------------*/ + +class nucleationModel +{ +protected: + + // Protected data + + //- Reference to the populationBalanceModel + const populationBalanceModel& popBal_; + + +public: + + //- Runtime type information + TypeName("nucleationModel"); + + + // Declare run-time constructor selection table + + declareRunTimeSelectionTable + ( + autoPtr, + nucleationModel, + dictionary, + ( + const populationBalanceModel& popBal, + const dictionary& dict + ), + (popBal, dict) + ); + + + //- Class used for the read-construction of + // PtrLists of nucleation models + class iNew + { + const populationBalanceModel& popBal_; + + public: + + iNew(const populationBalanceModel& popBal) + : + popBal_(popBal) + {} + + autoPtr operator()(Istream& is) const + { + word type(is); + dictionary dict(is); + return nucleationModel::New(type, popBal_, dict); + } + }; + + + // Constructor + + nucleationModel + ( + const populationBalanceModel& popBal, + const dictionary& dict + ); + + autoPtr clone() const + { + NotImplemented; + return autoPtr(nullptr); + } + + + // Selector + + static autoPtr New + ( + const word& type, + const populationBalanceModel& popBal, + const dictionary& dict + ); + + + //- Destructor + virtual ~nucleationModel() + {} + + + // Member Functions + + //- Return reference to the populationBalance + const populationBalanceModel& popBal() const + { + return popBal_; + } + + //- Correct diameter independent expressions + virtual void correct(); + + //- Add to nucleationRate + virtual void nucleationRate + ( + volScalarField& nucleationRate, + const label i + ) = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace diameterModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.C new file mode 100644 index 000000000..0b63146b7 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.C @@ -0,0 +1,199 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "wallBoiling.H" +#include "alphatWallBoilingWallFunctionFvPatchScalarField.H" +#include "phaseSystem.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ +namespace nucleationModels +{ + defineTypeNameAndDebug(wallBoiling, 0); + addToRunTimeSelectionTable + ( + nucleationModel, + wallBoiling, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModels::nucleationModels::wallBoiling:: +wallBoiling +( + const populationBalanceModel& popBal, + const dictionary& dict +) +: + nucleationModel(popBal, dict), + velGroup_ + ( + refCast + ( + popBal.mesh().lookupObject + ( + IOobject::groupName + ( + "alpha", + dict.lookup("velocityGroup") + ) + ).dPtr()() + ) + ), + turbulence_ + ( + popBal_.mesh().lookupObjectRef + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + popBal_.continuousPhase().name() + ) + ) + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::diameterModels::nucleationModels::wallBoiling::correct() +{ + const tmp talphat(turbulence_.alphat()); + const volScalarField::Boundary& alphatBf = talphat().boundaryField(); + + typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField + alphatWallBoilingWallFunction; + + forAll(alphatBf, patchi) + { + if + ( + isA(alphatBf[patchi]) + ) + { + const alphatWallBoilingWallFunction& alphatw = + refCast(alphatBf[patchi]); + + const scalarField& dDep = alphatw.dDeparture(); + + if (min(dDep) < velGroup_.sizeGroups().first().d().value()) + { + Warning + << "Minimum departure diameter " << min(dDep) + << " m outside of range [" + << velGroup_.sizeGroups().first().d().value() << ", " + << velGroup_.sizeGroups().last().d().value() << "] m" + << " at patch " << alphatw.patch().name() + << endl + << " The nucleation rate in populationBalance " + << popBal_.name() << " is set to zero." << endl + << " Adjust discretization over property space to" + << " suppress this warning." + << endl; + } + else if (max(dDep) > velGroup_.sizeGroups().last().d().value()) + { + Warning + << "Maximum departure diameter " << max(dDep) + << " m outside of range [" + << velGroup_.sizeGroups().first().d().value() << ", " + << velGroup_.sizeGroups().last().d().value() << "] m" + << " at patch " << alphatw.patch().name() + << endl + << " The nucleation rate in populationBalance " + << popBal_.name() << " is set to zero." << endl + << " Adjust discretization over property space to" + << " suppress this warning." + << endl; + } + } + } +} + + +void Foam::diameterModels::nucleationModels::wallBoiling:: +nucleationRate +( + volScalarField& nucleationRate, + const label i +) +{ + const sizeGroup& fi = *popBal_.sizeGroups()[i]; + phaseModel& phase = const_cast(fi.phase()); + volScalarField& rho = phase.thermo().rho(); + const tmp talphat(turbulence_.alphat()); + const volScalarField::Boundary& alphatBf = talphat().boundaryField(); + + typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField + alphatWallBoilingWallFunction; + + forAll(alphatBf, patchi) + { + if + ( + isA(alphatBf[patchi]) + ) + { + const alphatWallBoilingWallFunction& alphatw = + refCast(alphatBf[patchi]); + + const scalarField& dmdt = alphatw.dmdt(); + const scalarField& dDep = alphatw.dDeparture(); + + const labelList& faceCells = alphatw.patch().faceCells(); + + dimensionedScalar unitLength("unitLength", dimLength, 1.0); + + forAll(alphatw, facei) + { + if (dmdt[facei] > SMALL) + { + const label faceCelli = faceCells[facei]; + + nucleationRate[faceCelli] += + popBal_.gamma + ( + i, + velGroup_.formFactor()*pow3(dDep[facei]*unitLength) + ).value() + *dmdt[facei]/rho[faceCelli]/fi.x().value(); + } + } + } + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.H new file mode 100644 index 000000000..fe35beee0 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/nucleationModels/wallBoiling/wallBoiling.H @@ -0,0 +1,115 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::diameterModels::nucleationModels::wall + +Description + Wall-boiling model which requires a velocityGroup (i.e. phase) to be + specified in which the nucleation occurs. This setting must be consistent + with the specifications in the alphatWallBoilingWallFunction. If the + departure-diameter lies outside the diameter-range given by the sizeGroups + of the corresponding velocityGroup, the solver will give a warning and the + nucleation rate will be set to zero. + +SourceFiles + wallBoiling.C + +\*---------------------------------------------------------------------------*/ + +#ifndef wallBoiling_H +#define wallBoiling_H + +#include "nucleationModel.H" +#include "phaseCompressibleTurbulenceModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ +namespace nucleationModels +{ + +/*---------------------------------------------------------------------------*\ + Class wallBoiling Declaration +\*---------------------------------------------------------------------------*/ + +class wallBoiling +: + public nucleationModel +{ + // Private data + + //- Velocity group in which the nucleation occurs + const velocityGroup& velGroup_; + + //- Pointer to turbulence model + const phaseCompressibleTurbulenceModel& turbulence_; + + +public: + + //- Runtime type information + TypeName("wallBoiling"); + + // Constructor + + wallBoiling + ( + const populationBalanceModel& popBal, + const dictionary& dict + ); + + + //- Destructor + virtual ~wallBoiling() + {} + + + // Member Functions + + //- Correct diameter independent expressions + virtual void correct(); + + //- Add to nucleationRate + virtual void nucleationRate + ( + volScalarField& nucleationRate, + const label i + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace nucleationModels +} // End namespace diameterModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C index 2559e7cb2..bcf58ae4b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C @@ -28,6 +28,7 @@ License #include "breakupModel.H" #include "binaryBreakupModel.H" #include "driftModel.H" +#include "nucleationModel.H" #include "phaseSystem.H" #include "fvmDdt.H" #include "fvcDdt.H" @@ -36,7 +37,8 @@ License // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -void Foam::diameterModels::populationBalanceModel::registerVelocityGroups() +void +Foam::diameterModels::populationBalanceModel::registerVelocityAndSizeGroups() { forAll(fluid_.phases(), phasei) { @@ -245,50 +247,10 @@ void Foam::diameterModels::populationBalanceModel::preSolve() { drift_[model].correct(); } -} - -Foam::dimensionedScalar -Foam::diameterModels::populationBalanceModel:: -gamma -( - const label i, - const dimensionedScalar& v -) const -{ - dimensionedScalar lowerBoundary(v); - dimensionedScalar upperBoundary(v); - const dimensionedScalar& xi = sizeGroups_[i]->x(); - - if (i == 0) + forAll(nucleation_, model) { - lowerBoundary = xi; - } - else - { - lowerBoundary = sizeGroups_[i-1]->x(); - } - - if (i == sizeGroups_.size() - 1) - { - upperBoundary = xi; - } - else - { - upperBoundary = sizeGroups_[i+1]->x(); - } - - if (v < lowerBoundary || v > upperBoundary) - { - return 0.0; - } - else if (v.value() <= xi.value()) - { - return (v - lowerBoundary)/(xi - lowerBoundary); - } - else - { - return (upperBoundary - v)/(upperBoundary - xi); + nucleation_[model].correct(); } } @@ -317,73 +279,54 @@ birthByCoalescence const sizeGroup& fi = *sizeGroups_[i]; - if (velocityGroups_.size() > 1) + // Avoid double counting of events + if (j == k) { - // Avoid double counting of events - if (j == k) - { - Sui_() = 0.5*fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk - *alphak/fk.x()*Gamma; - } - else - { - Sui_() = fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak - /fk.x()*Gamma; - } - - Su_[i] += Sui_(); - - dimensionedScalar ratio = fj.x()/fi.x(); - - const volScalarField& rho = fi.phase().rho(); - - const phasePairKey pairij - ( - fi.phase().name(), - fj.phase().name() - ); - - // Check whether fi and fj reside in different velocityGroups - if (pDmdt_.found(pairij)) - { - const scalar dmdtSign - ( - Pair::compare(pDmdt_.find(pairij).key(), pairij) - ); - - pDmdt_[pairij]->ref() += dmdtSign*ratio*Sui_()*rho; - } - - const phasePairKey pairik - ( - fi.phase().name(), - fk.phase().name() - ); - - // Check whether fi and fk reside in different velocityGroups - if (pDmdt_.found(pairik)) - { - const scalar dmdtSign - ( - Pair::compare(pDmdt_.find(pairik).key(), pairik) - ); - - pDmdt_[pairik]->ref() += dmdtSign*(1 - ratio)*Sui_()*rho; - } + Sui_ = 0.5*fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak + /fk.x()*Gamma; } else { - // Avoid double counting of events - if (j == k) - { - Su_[i] += 0.5*fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk - *alphak/fk.x()*Gamma; - } - else - { - Su_[i] += fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak - /fk.x()*Gamma; - } + Sui_ = fi.x()*coalescenceRate_()*fj*alphaj/fj.x()*fk*alphak/fk.x() + *Gamma; + } + + Su_[i] += Sui_; + + dimensionedScalar ratio = fj.x()/fi.x(); + + const volScalarField& rho = fi.phase().rho(); + + const phasePairKey pairij + ( + fi.phase().name(), + fj.phase().name() + ); + + if (pDmdt_.found(pairij)) + { + const scalar dmdtSign + ( + Pair::compare(pDmdt_.find(pairij).key(), pairij) + ); + + pDmdt_[pairij]->ref() += dmdtSign*ratio*Sui_*rho; + } + + const phasePairKey pairik + ( + fi.phase().name(), + fk.phase().name() + ); + + if (pDmdt_.found(pairik)) + { + const scalar dmdtSign + ( + Pair::compare(pDmdt_.find(pairik).key(), pairik) + ); + + pDmdt_[pairik]->ref() += dmdtSign*(1 - ratio)*Sui_*rho; } } } @@ -429,36 +372,27 @@ birthByBreakup { const sizeGroup& fi = *sizeGroups_[i]; - if (velocityGroups_.size() > 1) + Sui_ = fi.x()*breakupRate_()*breakup_[model].dsdPtr()().nik(i, k)*fk + *fk.phase()/fk.x(); + + Su_[i] += Sui_; + + const volScalarField& rho = fi.phase().rho(); + + const phasePairKey pair + ( + fi.phase().name(), + fk.phase().name() + ); + + if (pDmdt_.found(pair)) { - Sui_() = fi.x()*breakupRate_()*breakup_[model].dsdPtr()().nik(i, k) - *fk*fk.phase()/fk.x(); - - Su_[i] += Sui_(); - - const volScalarField& rho = fi.phase().rho(); - - const phasePairKey pair + const scalar dmdtSign ( - fi.phase().name(), - fk.phase().name() + Pair::compare(pDmdt_.find(pair).key(), pair) ); - // Check whether fi and fk reside in different velocityGroups - if (pDmdt_.found(pair)) - { - const scalar dmdtSign - ( - Pair::compare(pDmdt_.find(pair).key(), pair) - ); - - pDmdt_[pair]->ref() += dmdtSign*Sui_()*rho; - } - } - else - { - Su_[i] += fi.x()*breakupRate_()*breakup_[model].dsdPtr()().nik(i, k) - *fk*fk.phase()/fk.x(); + pDmdt_[pair]->ref() += dmdtSign*Sui_*rho; } } } @@ -521,32 +455,24 @@ birthByBinaryBreakup const volScalarField& alphaj = fj.phase(); const volScalarField& rho = fj.phase().rho(); - if (velocityGroups_.size() > 1) + Sui_ = fi.x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj/fj.x(); + + Su_[i] += Sui_; + + const phasePairKey pairij + ( + fi.phase().name(), + fj.phase().name() + ); + + if (pDmdt_.found(pairij)) { - Sui_() = fi.x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj/fj.x(); - - Su_[i] += Sui_(); - - const phasePairKey pairij + const scalar dmdtSign ( - fi.phase().name(), - fj.phase().name() + Pair::compare(pDmdt_.find(pairij).key(), pairij) ); - // Check whether fi and fj reside in different velocityGroups - if (pDmdt_.found(pairij)) - { - const scalar dmdtSign - ( - Pair::compare(pDmdt_.find(pairij).key(), pairij) - ); - - pDmdt_[pairij]->ref() += dmdtSign*Sui_()*rho; - } - } - else - { - Su_[i] += fi.x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj/fj.x(); + pDmdt_[pairij]->ref() += dmdtSign*Sui_*rho; } dimensionedScalar Gamma; @@ -561,42 +487,32 @@ birthByBinaryBreakup const sizeGroup& fk = *sizeGroups_[k]; - if (velocityGroups_.size() > 1) + volScalarField& Suk = Sui_; + + Suk = sizeGroups_[k]->x()*binaryBreakupRate_()*delta_[i][j]*fj*alphaj + /fj.x()*Gamma; + + Su_[k] += Suk; + + const phasePairKey pairkj + ( + fk.phase().name(), + fj.phase().name() + ); + + if (pDmdt_.found(pairkj)) { - volScalarField& Suk = Sui_(); - - Suk = sizeGroups_[k]->x()*binaryBreakupRate_()*delta_[i][j]*fj - *alphaj/fj.x()*Gamma; - - Su_[k] += Suk; - - const phasePairKey pairkj + const scalar dmdtSign ( - fk.phase().name(), - fj.phase().name() + Pair::compare + ( + pDmdt_.find(pairkj).key(), + pairkj + ) ); - // Check whether fk and fj reside in different velocityGroups - if (pDmdt_.found(pairkj)) - { - const scalar dmdtSign - ( - Pair::compare - ( - pDmdt_.find(pairkj).key(), - pairkj - ) - ); - - pDmdt_[pairkj]->ref() += dmdtSign*Suk*rho; - } + pDmdt_[pairkj]->ref() += dmdtSign*Suk*rho; } - else - { - Su_[k] += sizeGroups_[k]->x()*binaryBreakupRate_()*delta_[i][j]*fj - *alphaj/fj.x()*Gamma; - } - } } @@ -616,117 +532,126 @@ deathByBinaryBreakup void Foam::diameterModels::populationBalanceModel::drift(const label i) { - r_() *= 0.0; - - if (i == sizeGroups_.size() - 1) - { - r_() += pos(driftRate_())*sizeGroups_[i]->x()/sizeGroups_[i-1]->x(); - } - else - { - r_() += pos(driftRate_())*sizeGroups_[i+1]->x()/sizeGroups_[i]->x(); - } - - if (i == 0) - { - r_() += neg(driftRate_())*sizeGroups_[i]->x()/sizeGroups_[i+1]->x(); - } - else - { - r_() += neg(driftRate_())*sizeGroups_[i-1]->x()/sizeGroups_[i]->x(); - } - const sizeGroup& fi = *sizeGroups_[i]; const volScalarField& rho = fi.phase().rho(); - if (i == sizeGroups_.size() - 1) + if (i == 0) { - SuSp_[i] += neg(driftRate_())*fi.x()*driftRate_()*fi.phase()/fi.x() - /((r_() - 1)*v_[i]); + rx_() = pos(driftRate_())*sizeGroups_[i+1]->x()/sizeGroups_[i]->x(); } - else if (i == 0) + else if (i == sizeGroups_.size() - 1) { - SuSp_[i] += pos(driftRate_())*fi.x()*driftRate_()*fi.phase()/fi.x() - /((r_() - 1)*v_[i]); + rx_() = neg(driftRate_())*sizeGroups_[i-1]->x()/sizeGroups_[i]->x(); } else { - SuSp_[i] += fi.x()*driftRate_()*fi.phase()/fi.x()/((r_() - 1)*v_[i]); + rx_() = pos(driftRate_())*sizeGroups_[i+1]->x()/sizeGroups_[i]->x() + + neg(driftRate_())*sizeGroups_[i-1]->x()/sizeGroups_[i]->x(); } - if (i != 0) + SuSp_[i] += (neg(1 - rx_()) + neg(1 - rx_()/(1 - rx_())))*driftRate_() + *fi.phase()/((rx_() - 1)*sizeGroups_[i]->x()); + + rx_() *= 0.0; + rdx_() *= 0.0; + + if (i < sizeGroups_.size() - 2) { - if (velocityGroups_.size() > 1) - { - const sizeGroup& fh = *sizeGroups_[i-1]; + rx_() += pos(driftRate_())*sizeGroups_[i+2]->x()/sizeGroups_[i+1]->x(); - volScalarField& Suh = Sui_(); + rdx_() += pos(driftRate_()) + *(sizeGroups_[i+2]->x() - sizeGroups_[i+1]->x()) + /(sizeGroups_[i+1]->x() - sizeGroups_[i]->x()); + } + else if (i == sizeGroups_.size() - 2) + { + rx_() += pos(driftRate_())*sizeGroups_[i+1]->x() + /sizeGroups_[i]->x(); - Suh = neg(driftRate_())*fh.x()*r_()*driftRate_()*fi*fi.phase() - /fi.x()/((r_() - 1)*v_[i-1]); + rdx_() += pos(driftRate_()) + *(sizeGroups_[i+1]->x() - sizeGroups_[i]->x()) + /(sizeGroups_[i]->x() - sizeGroups_[i-1]->x()); + } - const phasePairKey pair - ( - fi.phase().name(), - fh.phase().name() - ); + if (i == 1) + { + rx_() += neg(driftRate_())*sizeGroups_[i-1]->x() + /sizeGroups_[i]->x(); - // Check whether fi and fh reside in different velocityGroups - if (pDmdt_.found(pair)) - { - const scalar dmdtSign - ( - Pair::compare(pDmdt_.find(pair).key(), pair) - ); + rdx_() += neg(driftRate_()) + *(sizeGroups_[i]->x() - sizeGroups_[i-1]->x()) + /(sizeGroups_[i+1]->x() - sizeGroups_[i]->x()); + } + else if (i > 1) + { + rx_() += neg(driftRate_())*sizeGroups_[i-2]->x()/sizeGroups_[i-1]->x(); - pDmdt_[pair]->ref() -= dmdtSign*Suh*rho; - } - - Su_[i-1] += Suh; - } - else - { - Su_[i-1] += neg(driftRate_())*sizeGroups_[i-1]->x()*r_() - *driftRate_()*fi*fi.phase()/fi.x()/((r_() - 1)*v_[i-1]); - } + rdx_() += neg(driftRate_()) + *(sizeGroups_[i-1]->x() - sizeGroups_[i-2]->x()) + /(sizeGroups_[i]->x() - sizeGroups_[i-1]->x()); } if (i != sizeGroups_.size() - 1) { - if (velocityGroups_.size() > 1) + const sizeGroup& fj = *sizeGroups_[i+1]; + volScalarField& Suj = Sui_; + + Suj = pos(driftRate_())*driftRate_()*rdx_()*fi*fi.phase()/fi.x() + /(rx_() - 1); + + Su_[i+1] += Suj; + + const phasePairKey pairij + ( + fi.phase().name(), + fj.phase().name() + ); + + if (pDmdt_.found(pairij)) { - const sizeGroup& fj = *sizeGroups_[i+1]; - - volScalarField& Suj = Sui_(); - - Suj = pos(driftRate_())*fj.x()*r_()*driftRate_()*fi*fi.phase() - /fi.x()/((r_() - 1)*v_[i+1]); - - const phasePairKey pair + const scalar dmdtSign ( - fi.phase().name(), - fj.phase().name() + Pair::compare(pDmdt_.find(pairij).key(), pairij) ); - // Check whether fi and fj reside in different velocityGroups - if (pDmdt_.found(pair)) - { - const scalar dmdtSign - ( - Pair::compare(pDmdt_.find(pair).key(), pair) - ); - - pDmdt_[pair]->ref() -= dmdtSign*Suj*rho; - } - - Su_[i+1] += Suj; - } - else - { - Su_[i+1] += pos(driftRate_())*sizeGroups_[i+1]->x()*r_() - *driftRate_()*fi*fi.phase()/fi.x()/((r_() - 1)*v_[i+1]); + pDmdt_[pairij]->ref() -= dmdtSign*Suj*rho; } } + + if (i != 0) + { + const sizeGroup& fh = *sizeGroups_[i-1]; + volScalarField& Suh = Sui_; + + Suh = neg(driftRate_())*driftRate_()*rdx_()*fi*fi.phase()/fi.x() + /(rx_() - 1); + + Su_[i-1] += Suh; + + const phasePairKey pairih + ( + fi.phase().name(), + fh.phase().name() + ); + + if (pDmdt_.found(pairih)) + { + const scalar dmdtSign + ( + Pair::compare(pDmdt_.find(pairih).key(), pairih) + ); + + pDmdt_[pairih]->ref() -= dmdtSign*Suh*rho; + } + } +} + + +void Foam::diameterModels::populationBalanceModel::nucleation(const label i) +{ + dimensionedScalar volume("volume", dimVolume, 1.0); + + Su_[i] += sizeGroups_[i]->x()*nucleationRate_(); } @@ -830,6 +755,18 @@ void Foam::diameterModels::populationBalanceModel::sources() drift(i); } + + if (nucleation_.size() != 0) + { + nucleationRate_() *= 0.0; + + forAll(nucleation_, model) + { + nucleation_[model].nucleationRate(nucleationRate_(), i); + } + + nucleation(i); + } } } @@ -872,7 +809,8 @@ void Foam::diameterModels::populationBalanceModel::calcVelocity() forAllIter(PtrListDictionary, velocityGroups_, iter) { - U_ += iter().phase().U()*iter().phase() + U_ += iter().phase().U() + *max(iter().phase(), iter().phase().residualAlpha()) /max(alphas_, iter().phase().residualAlpha()); } } @@ -983,7 +921,17 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel delta_(), Su_(), SuSp_(), - Sui_(), + Sui_ + ( + IOobject + ( + "Sui", + fluid_.time().timeName(), + fluid_.mesh() + ), + fluid_.mesh(), + dimensionedScalar("Sui", inv(dimTime), Zero) + ), coalescence_ ( dict_.lookup("coalescenceModels"), @@ -1008,7 +956,14 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel driftModel::iNew(*this) ), driftRate_(), - r_(), + rx_(), + rdx_(), + nucleation_ + ( + dict_.lookup("nucleationModels"), + nucleationModel::iNew(*this) + ), + nucleationRate_(), alphas_ ( IOobject @@ -1047,27 +1002,21 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel ), d_() { - this->registerVelocityGroups(); + this->registerVelocityAndSizeGroups(); this->createPhasePairs(); + if (sizeGroups_.size() < 3) + { + FatalErrorInFunction + << "The populationBalance " << name_ + << " requires a minimum number of three sizeGroups to be" + << " specified." + << exit(FatalError); + } + if (velocityGroups_.size() > 1) { - Sui_.reset - ( - new volScalarField - ( - IOobject - ( - "Sui", - fluid_.time().timeName(), - fluid_.mesh() - ), - fluid_.mesh(), - dimensionedScalar("Sui", inv(dimTime), Zero) - ) - ); - d_.reset ( new volScalarField @@ -1169,7 +1118,7 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel ) ); - r_.reset + rx_.reset ( new volScalarField ( @@ -1183,6 +1132,44 @@ Foam::diameterModels::populationBalanceModel::populationBalanceModel dimensionedScalar("r", dimless, Zero) ) ); + + rdx_.reset + ( + new volScalarField + ( + IOobject + ( + "r", + fluid_.time().timeName(), + fluid_.mesh() + ), + fluid_.mesh(), + dimensionedScalar("r", dimless, Zero) + ) + ); + } + + if (nucleation_.size() != 0) + { + nucleationRate_.reset + ( + new volScalarField + ( + IOobject + ( + "nucleationRate", + fluid.time().timeName(), + fluid.mesh() + ), + fluid.mesh(), + dimensionedScalar + ( + "nucleationRate", + inv(dimTime*dimVolume), + Zero + ) + ) + ); } } @@ -1207,6 +1194,50 @@ bool Foam::diameterModels::populationBalanceModel::writeData(Ostream& os) const } +const Foam::dimensionedScalar +Foam::diameterModels::populationBalanceModel::gamma +( + const label i, + const dimensionedScalar& v +) const +{ + dimensionedScalar lowerBoundary(v); + dimensionedScalar upperBoundary(v); + const dimensionedScalar& xi = sizeGroups_[i]->x(); + + if (i == 0) + { + lowerBoundary = xi; + } + else + { + lowerBoundary = sizeGroups_[i-1]->x(); + } + + if (i == sizeGroups_.size() - 1) + { + upperBoundary = xi; + } + else + { + upperBoundary = sizeGroups_[i+1]->x(); + } + + if (v < lowerBoundary || v > upperBoundary) + { + return 0.0; + } + else if (v.value() <= xi.value()) + { + return (v - lowerBoundary)/(xi - lowerBoundary); + } + else + { + return (upperBoundary - v)/(upperBoundary - xi); + } +} + + void Foam::diameterModels::populationBalanceModel::solve() { const dictionary& solutionControls = mesh_.solverDict(name_); @@ -1312,6 +1343,17 @@ void Foam::diameterModels::populationBalanceModel::solve() { d_() = dsm(); } + + volScalarField fAlpha0 = + *sizeGroups_.first()*sizeGroups_.first()->phase(); + + volScalarField fAlphaN = + *sizeGroups_.last()*sizeGroups_.last()->phase(); + + Info<< this->name() << " sizeGroup phase fraction first, last = " + << fAlpha0.weightedAverage(this->mesh().V()).value() + << ' ' << fAlphaN.weightedAverage(this->mesh().V()).value() + << endl; } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.H index fbb6e8e36..dc5532b56 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.H @@ -31,8 +31,8 @@ Description a transport equation of the volume-based number density function. The discretization is done using the fixed pivot technique of Kumar and Ramkrishna (1996). The source terms are written in a way that particle - number and mass are preserved. Coalescence (aggregation), breakup as well - as drift (growth and surface loss) are supported. + number and mass are preserved. Coalescence (aggregation), breakup, drift + (growth and surface loss) as well as nucleation are supported. For the discrete breakup term two recipies are available, depending on the model choice. For models which state a total breakup rate and a separate daughter size distribution function, the formulation of Kumar and Ramkrishna @@ -132,6 +132,9 @@ Usage ( densityChange{} ); + + nucleationModels + (); } } \endverbatim @@ -166,6 +169,7 @@ class coalescenceModel; class breakupModel; class binaryBreakupModel; class driftModel; +class nucleationModel; /*---------------------------------------------------------------------------*\ Class populationBalanceModel Declaration @@ -226,8 +230,8 @@ class populationBalanceModel //- Sources treated implicitly or explicitly depending on sign PtrList SuSp_; - //- Field for caching pDmdt sources - autoPtr Sui_; + //- Field for caching sources + volScalarField Sui_; //- Coalescence models PtrList coalescence_; @@ -253,8 +257,17 @@ class populationBalanceModel //- Drift rate autoPtr driftRate_; - //- Ratio between sucessive reprasentative volumes - autoPtr r_; + //- Ratio between sucessive representative volumes + autoPtr rx_; + + //- Ratio between sucessive class widths + autoPtr rdx_; + + //- Zeroeth order models + PtrList nucleation_; + + //- Zeroeth order rate + autoPtr nucleationRate_; //- Total void fraction of phases belonging to this populationBalance volScalarField alphas_; @@ -268,7 +281,7 @@ class populationBalanceModel // Private member functions - void registerVelocityGroups(); + void registerVelocityAndSizeGroups(); void add(sizeGroup* group); @@ -276,12 +289,6 @@ class populationBalanceModel void preSolve(); - dimensionedScalar gamma - ( - const label i, - const dimensionedScalar& v - ) const; - void birthByCoalescence(const label j, const label k); void deathByCoalescence(const label i, const label j); @@ -298,6 +305,8 @@ class populationBalanceModel void drift(const label i); + void nucleation(const label i); + void sources(); void dmdt(); @@ -401,6 +410,13 @@ public: //- Return average velocity inline const volVectorField& U() const; + //- Return allocation coefficient + const dimensionedScalar gamma + ( + const label i, + const dimensionedScalar& v + ) const; + //- Solve the population balance equation void solve(); }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C index 6451d0d55..9d1e750e0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,9 +123,26 @@ namespace Foam populationBalanceMultiphaseSystem ); + typedef + ThermalPhaseChangePhaseSystem + < + PopulationBalancePhaseSystem + < + HeatAndMassTransferPhaseSystem + < + MomentumTransferPhaseSystem + > + > + > + thermalPhaseChangePopulationBalanceMultiphaseSystem; - - + addNamedToRunTimeSelectionTable + ( + multiphaseSystem, + thermalPhaseChangePopulationBalanceMultiphaseSystem, + dictionary, + thermalPhaseChangePopulationBalanceMultiphaseSystem + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C index bf5564779..10cdd1b42 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,6 +121,27 @@ namespace Foam dictionary, populationBalanceTwoPhaseSystem ); + + typedef + ThermalPhaseChangePhaseSystem + < + PopulationBalancePhaseSystem + < + HeatAndMassTransferPhaseSystem + < + MomentumTransferPhaseSystem + > + > + > + thermalPhaseChangePopulationBalanceTwoPhaseSystem; + + addNamedToRunTimeSelectionTable + ( + twoPhaseSystem, + thermalPhaseChangePopulationBalanceTwoPhaseSystem, + dictionary, + thermalPhaseChangePopulationBalanceTwoPhaseSystem + ); } diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C index 20475acea..96e239547 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C @@ -31,7 +31,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template -Foam::scalar Foam::dynamicIndexedOctree::perturbTol_ = 10*SMALL; +Foam::scalar Foam::dynamicIndexedOctree::perturbTol_ = 10*small; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -653,13 +653,13 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint if (mag(pt[dir]-bb.min()[dir]) < mag(perturbVec[dir])) { // Close to 'left' side. Push well beyond left side. - scalar perturbDist = perturbVec[dir] + ROOTVSMALL; + scalar perturbDist = perturbVec[dir] + rootVSmall; perturbedPt[dir] = bb.min()[dir] + perturbDist; } else if (mag(pt[dir]-bb.max()[dir]) < mag(perturbVec[dir])) { // Close to 'right' side. Push well beyond right side. - scalar perturbDist = perturbVec[dir] + ROOTVSMALL; + scalar perturbDist = perturbVec[dir] + rootVSmall; perturbedPt[dir] = bb.max()[dir] - perturbDist; } } @@ -670,12 +670,12 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint { if (mag(pt[dir]-bb.min()[dir]) < mag(perturbVec[dir])) { - scalar perturbDist = perturbVec[dir] + ROOTVSMALL; + scalar perturbDist = perturbVec[dir] + rootVSmall; perturbedPt[dir] = bb.min()[dir] - perturbDist; } else if (mag(pt[dir]-bb.max()[dir]) < mag(perturbVec[dir])) { - scalar perturbDist = perturbVec[dir] + ROOTVSMALL; + scalar perturbDist = perturbVec[dir] + rootVSmall; perturbedPt[dir] = bb.max()[dir] + perturbDist; } } @@ -729,22 +729,22 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint { if (pushInside) { - perturbedPt[0] = bb.min()[0] + (perturbVec[0] + ROOTVSMALL); + perturbedPt[0] = bb.min()[0] + (perturbVec[0] + rootVSmall); } else { - perturbedPt[0] = bb.min()[0] - (perturbVec[0] + ROOTVSMALL); + perturbedPt[0] = bb.min()[0] - (perturbVec[0] + rootVSmall); } } else if (faceID & treeBoundBox::RIGHTBIT) { if (pushInside) { - perturbedPt[0] = bb.max()[0] - (perturbVec[0] + ROOTVSMALL); + perturbedPt[0] = bb.max()[0] - (perturbVec[0] + rootVSmall); } else { - perturbedPt[0] = bb.max()[0] + (perturbVec[0] + ROOTVSMALL); + perturbedPt[0] = bb.max()[0] + (perturbVec[0] + rootVSmall); } } @@ -752,22 +752,22 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint { if (pushInside) { - perturbedPt[1] = bb.min()[1] + (perturbVec[1] + ROOTVSMALL); + perturbedPt[1] = bb.min()[1] + (perturbVec[1] + rootVSmall); } else { - perturbedPt[1] = bb.min()[1] - (perturbVec[1] + ROOTVSMALL); + perturbedPt[1] = bb.min()[1] - (perturbVec[1] + rootVSmall); } } else if (faceID & treeBoundBox::TOPBIT) { if (pushInside) { - perturbedPt[1] = bb.max()[1] - (perturbVec[1] + ROOTVSMALL); + perturbedPt[1] = bb.max()[1] - (perturbVec[1] + rootVSmall); } else { - perturbedPt[1] = bb.max()[1] + (perturbVec[1] + ROOTVSMALL); + perturbedPt[1] = bb.max()[1] + (perturbVec[1] + rootVSmall); } } @@ -775,22 +775,22 @@ Foam::point Foam::dynamicIndexedOctree::pushPoint { if (pushInside) { - perturbedPt[2] = bb.min()[2] + (perturbVec[2] + ROOTVSMALL); + perturbedPt[2] = bb.min()[2] + (perturbVec[2] + rootVSmall); } else { - perturbedPt[2] = bb.min()[2] - (perturbVec[2] + ROOTVSMALL); + perturbedPt[2] = bb.min()[2] - (perturbVec[2] + rootVSmall); } } else if (faceID & treeBoundBox::FRONTBIT) { if (pushInside) { - perturbedPt[2] = bb.max()[2] - (perturbVec[2] + ROOTVSMALL); + perturbedPt[2] = bb.max()[2] - (perturbVec[2] + rootVSmall); } else { - perturbedPt[2] = bb.max()[2] + (perturbVec[2] + ROOTVSMALL); + perturbedPt[2] = bb.max()[2] + (perturbVec[2] + rootVSmall); } } diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.liquid b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.liquid deleted file mode 100644 index e0c2166e0..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.liquid +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "5"; - object T.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 1 0 0 0]; - -internalField uniform 368; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 368; - } - outlet - { - type inletOutlet; - phi phi.liquid; - inletValue uniform 368; - value uniform 368; - } - wall1 - { - type fixedMultiPhaseHeatFlux; - relax 0.5; - q uniform 0; - phase "liquid"; - value uniform 368; - } - wall2 - { - type fixedMultiPhaseHeatFlux; - relax 0.5; - q uniform 0; - phase "liquid"; - value uniform 368; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.gas2 b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.gas2 deleted file mode 100644 index 4eea782c9..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.gas2 +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - location "0"; - object U.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField -{ - inlet - { - type mapped; - field U.gas; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); - } - outlet - { - type pressureInletOutletVelocity; - phi phi.gas; - value uniform (0 1 0); - } - wall1 - { - type slip; - } - wall2 - { - type slip; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.gas b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.gas deleted file mode 100644 index 5811e8c01..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.gas +++ /dev/null @@ -1,73 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alphat.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 1e-8; - -boundaryField -{ - inlet - { - type calculated; - value uniform 1e-8; - } - outlet - { - type calculated; - value uniform 1e-8; - } - wall1 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase liquid; - phaseType vapor; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - partitioningModel - { - type phaseFraction; - alphaCrit 0.2; - } - value uniform 0; - } - wall2 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase liquid; - phaseType vapor; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - partitioningModel - { - type phaseFraction; - alphaCrit 0.2; - } - value uniform 0; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.liquid b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.liquid deleted file mode 100644 index 1fe631cb7..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alphat.liquid +++ /dev/null @@ -1,101 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alphat.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 1e-8; - -boundaryField -{ - inlet - { - type calculated; - value uniform 1e-8; - } - outlet - { - type calculated; - value uniform 1e-8; - } - wall1 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase gas; - phaseType liquid; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - relax 0.01; - dmdt uniform 0; - partitioningModel - { - type phaseFraction;//Lavieville; - alphaCrit 0.2; - } - nucleationSiteModel - { - type LemmertChawla; - } - departureDiamModel - { - type TolubinskiKostanchuk; - } - departureFreqModel - { - type Cole; - } - value uniform 0.01; - } - wall2 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase gas; - phaseType liquid; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - relax 0.01; - dmdt uniform 0; - partitioningModel - { - type phaseFraction;//Lavieville; - alphaCrit 0.2; - } - nucleationSiteModel - { - type LemmertChawla; - } - departureDiamModel - { - type TolubinskiKostanchuk; - } - departureFreqModel - { - type Cole; - } - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun index 8520077d2..57240ca9b 100755 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun @@ -6,17 +6,16 @@ cd ${0%/*} || exit 1 # Run from this directory application=`getApplication` -\rm -rf 0 -cp -r 0.org 0 - runApplication blockMesh runApplication $application if ! isTest $@ then foamDictionary system/controlDict -entry endTime -set 5 + foamDictionary system/controlDict -entry startTime -set 2 foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 500000' foamDictionary 2/T.liquid -entry boundaryField.wall1.q -set 'uniform 500000' + foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue' runApplication -a $application fi diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas deleted file mode 100644 index 0b91c30f6..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas +++ /dev/null @@ -1,55 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "5"; - object T.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 1 0 0 0]; - -internalField uniform 368; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 368; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 368; - value uniform 368; - } - wall1 - { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; - } - wall2 - { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas2 b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas2 deleted file mode 100644 index 4eea782c9..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas2 +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - location "0"; - object U.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField -{ - inlet - { - type mapped; - field U.gas; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); - } - outlet - { - type pressureInletOutletVelocity; - phi phi.gas; - value uniform (0 1 0); - } - wall1 - { - type slip; - } - wall2 - { - type slip; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.liquid b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.liquid deleted file mode 100644 index f0433c830..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.liquid +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - location "0"; - object U.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField -{ - inlet - { - type mapped; - field U.liquid; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); - } - outlet - { - type pressureInletOutletVelocity; - phi phi.liquid; - value uniform (0 1 0); - } - wall1 - { - type noSlip; - } - wall2 - { - type noSlip; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.gas2 b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.gas2 deleted file mode 100644 index 35e692c85..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.gas2 +++ /dev/null @@ -1,66 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alphat.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 1e-8; - -boundaryField -{ - inlet - { - type calculated; - value uniform 1e-8; - } - outlet - { - type calculated; - value uniform 1e-8; - } - wall1 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase liquid; - phaseType vapor; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - partitioningModel - { - type phaseFraction; - } - value uniform 0; - } - wall2 - { - type compressible::alphatPhaseChangeJayatillekeWallFunction; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas deleted file mode 100644 index 1cf8c6291..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas +++ /dev/null @@ -1,62 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 0.001; - -boundaryField -{ - inlet - { - type mapped; - field epsilon.gas; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0.001; - } - wall1 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - wall2 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas2 b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas2 deleted file mode 100644 index 1cf8c6291..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.gas2 +++ /dev/null @@ -1,62 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 0.001; - -boundaryField -{ - inlet - { - type mapped; - field epsilon.gas; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0.001; - } - wall1 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - wall2 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.liquid b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.liquid deleted file mode 100644 index 0ee42c771..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/epsilon.liquid +++ /dev/null @@ -1,63 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 0.001; - -boundaryField -{ - inlet - { - type mapped; - field epsilon.liquid; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.001; - } - outlet - { - type inletOutlet; - phi phi.liquid; - inletValue uniform 0.00015; - value uniform 0.001; - } - wall1 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - wall2 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas deleted file mode 100644 index 40de4d9d9..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 0.01; - -boundaryField -{ - inlet - { - type mapped; - field k.gas; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0.01; - value uniform 0.01; - } - wall1 - { - type kqRWallFunction; - value uniform 0.01; - } - wall2 - { - type kqRWallFunction; - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas2 b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas2 deleted file mode 100644 index 40de4d9d9..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.gas2 +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 0.01; - -boundaryField -{ - inlet - { - type mapped; - field k.gas; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0.01; - value uniform 0.01; - } - wall1 - { - type kqRWallFunction; - value uniform 0.01; - } - wall2 - { - type kqRWallFunction; - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.liquid b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.liquid deleted file mode 100644 index 0cff3a0a1..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/k.liquid +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 0.01; - -boundaryField -{ - inlet - { - type mapped; - field k.liquid; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.liquid; - inletValue uniform 3.75e-05; - value uniform 0.01; - } - wall1 - { - type kqRWallFunction; - value uniform 0.01; - } - wall2 - { - type kqRWallFunction; - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas deleted file mode 100644 index 94928c3ce..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object nut.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -1 0 0 0 0]; - -internalField uniform 0.0001; - -boundaryField -{ - inlet - { - type calculated; - value uniform 0.0001; - } - outlet - { - type calculated; - value uniform 0.0001; - } - wall1 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - wall2 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas2 b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas2 deleted file mode 100644 index 94928c3ce..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.gas2 +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object nut.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -1 0 0 0 0]; - -internalField uniform 0.0001; - -boundaryField -{ - inlet - { - type calculated; - value uniform 0.0001; - } - outlet - { - type calculated; - value uniform 0.0001; - } - wall1 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - wall2 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.liquid b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.liquid deleted file mode 100644 index 70e2e63c8..000000000 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/nut.liquid +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object nut.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -1 0 0 0 0]; - -internalField uniform 0.0001; - -boundaryField -{ - inlet - { - type calculated; - value uniform 0.0001; - } - outlet - { - type calculated; - value uniform 0.0001; - } - wall1 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.0001; - } - wall2 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.0001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun index 8520077d2..57240ca9b 100755 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun @@ -6,17 +6,16 @@ cd ${0%/*} || exit 1 # Run from this directory application=`getApplication` -\rm -rf 0 -cp -r 0.org 0 - runApplication blockMesh runApplication $application if ! isTest $@ then foamDictionary system/controlDict -entry endTime -set 5 + foamDictionary system/controlDict -entry startTime -set 2 foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 500000' foamDictionary 2/T.liquid -entry boundaryField.wall1.q -set 'uniform 500000' + foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue' runApplication -a $application fi diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties index 3386194a3..96469c3f7 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties @@ -122,6 +122,9 @@ populationBalanceCoeffs ( densityChange{} ); + + nucleationModels + (); } } diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties index 30a8e888e..f2017e44d 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties @@ -104,6 +104,9 @@ populationBalanceCoeffs ( densityChange{} ); + + nucleationModels + (); } } diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun index d44704ad3..2c2e384c2 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun @@ -12,7 +12,9 @@ runApplication $application if ! isTest $@ then foamDictionary system/controlDict -entry endTime -set 5 + foamDictionary system/controlDict -entry startTime -set 2 foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5' + foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue' runApplication -a $application fi diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/thermophysicalProperties.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/thermophysicalProperties.gas index 5dc1c0110..5b89c64bb 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/thermophysicalProperties.gas +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/constant/thermophysicalProperties.gas @@ -38,7 +38,6 @@ mixture { rho 1; } - thermodynamics { Hf 0; diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict index 6ea473a1e..6fa65654e 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict @@ -17,7 +17,7 @@ FoamFile application reactingTwoPhaseEulerFoam; -startFrom latestTime; +startFrom startTime; startTime 0; diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict.org b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict.org index 6ea473a1e..6fa65654e 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict.org +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/system/controlDict.org @@ -17,7 +17,7 @@ FoamFile application reactingTwoPhaseEulerFoam; -startFrom latestTime; +startFrom startTime; startTime 0; diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.gas deleted file mode 100644 index 0b91c30f6..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.gas +++ /dev/null @@ -1,55 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "5"; - object T.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 1 0 0 0]; - -internalField uniform 368; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 368; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 368; - value uniform 368; - } - wall1 - { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; - } - wall2 - { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.liquid deleted file mode 100644 index e0c2166e0..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/T.liquid +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "5"; - object T.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 1 0 0 0]; - -internalField uniform 368; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 368; - } - outlet - { - type inletOutlet; - phi phi.liquid; - inletValue uniform 368; - value uniform 368; - } - wall1 - { - type fixedMultiPhaseHeatFlux; - relax 0.5; - q uniform 0; - phase "liquid"; - value uniform 368; - } - wall2 - { - type fixedMultiPhaseHeatFlux; - relax 0.5; - q uniform 0; - phase "liquid"; - value uniform 368; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas deleted file mode 100644 index 4eea782c9..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - location "0"; - object U.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField -{ - inlet - { - type mapped; - field U.gas; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); - } - outlet - { - type pressureInletOutletVelocity; - phi phi.gas; - value uniform (0 1 0); - } - wall1 - { - type slip; - } - wall2 - { - type slip; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas2 b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas2 deleted file mode 100644 index 4eea782c9..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.gas2 +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - location "0"; - object U.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField -{ - inlet - { - type mapped; - field U.gas; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); - } - outlet - { - type pressureInletOutletVelocity; - phi phi.gas; - value uniform (0 1 0); - } - wall1 - { - type slip; - } - wall2 - { - type slip; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.liquid deleted file mode 100644 index f0433c830..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/U.liquid +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volVectorField; - location "0"; - object U.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField -{ - inlet - { - type mapped; - field U.liquid; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); - } - outlet - { - type pressureInletOutletVelocity; - phi phi.liquid; - value uniform (0 1 0); - } - wall1 - { - type noSlip; - } - wall2 - { - type noSlip; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.gas deleted file mode 100644 index ee7b855f1..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.gas +++ /dev/null @@ -1,51 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alpha.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 0; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0; - value uniform 0; - } - wall1 - { - type zeroGradient; - } - wall2 - { - type zeroGradient; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.liquid deleted file mode 100644 index d5601d6a3..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alpha.liquid +++ /dev/null @@ -1,51 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alpha.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 0 0 0 0]; - -internalField uniform 1; - -boundaryField -{ - inlet - { - type calculated; - value uniform 1; - } - outlet - { - type calculated; - value uniform 1; - } - wall1 - { - type calculated; - value uniform 1; - } - wall2 - { - type calculated; - value uniform 1; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.gas deleted file mode 100644 index 5811e8c01..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.gas +++ /dev/null @@ -1,73 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alphat.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 1e-8; - -boundaryField -{ - inlet - { - type calculated; - value uniform 1e-8; - } - outlet - { - type calculated; - value uniform 1e-8; - } - wall1 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase liquid; - phaseType vapor; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - partitioningModel - { - type phaseFraction; - alphaCrit 0.2; - } - value uniform 0; - } - wall2 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase liquid; - phaseType vapor; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - partitioningModel - { - type phaseFraction; - alphaCrit 0.2; - } - value uniform 0; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.liquid deleted file mode 100644 index 1fe631cb7..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/alphat.liquid +++ /dev/null @@ -1,101 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object alphat.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 1e-8; - -boundaryField -{ - inlet - { - type calculated; - value uniform 1e-8; - } - outlet - { - type calculated; - value uniform 1e-8; - } - wall1 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase gas; - phaseType liquid; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - relax 0.01; - dmdt uniform 0; - partitioningModel - { - type phaseFraction;//Lavieville; - alphaCrit 0.2; - } - nucleationSiteModel - { - type LemmertChawla; - } - departureDiamModel - { - type TolubinskiKostanchuk; - } - departureFreqModel - { - type Cole; - } - value uniform 0.01; - } - wall2 - { - type compressible::alphatWallBoilingWallFunction; - otherPhase gas; - phaseType liquid; - Prt 0.85; - Cmu 0.09; - kappa 0.41; - E 9.8; - relax 0.01; - dmdt uniform 0; - partitioningModel - { - type phaseFraction;//Lavieville; - alphaCrit 0.2; - } - nucleationSiteModel - { - type LemmertChawla; - } - departureDiamModel - { - type TolubinskiKostanchuk; - } - departureFreqModel - { - type Cole; - } - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.gas deleted file mode 100644 index 1cf8c6291..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.gas +++ /dev/null @@ -1,62 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 0.001; - -boundaryField -{ - inlet - { - type mapped; - field epsilon.gas; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0.001; - } - wall1 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - wall2 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.liquid deleted file mode 100644 index 0ee42c771..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/epsilon.liquid +++ /dev/null @@ -1,63 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object epsilon.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -3 0 0 0 0]; - -internalField uniform 0.001; - -boundaryField -{ - inlet - { - type mapped; - field epsilon.liquid; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.001; - } - outlet - { - type inletOutlet; - phi phi.liquid; - inletValue uniform 0.00015; - value uniform 0.001; - } - wall1 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - wall2 - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.gas deleted file mode 100644 index 40de4d9d9..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.gas +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 0.01; - -boundaryField -{ - inlet - { - type mapped; - field k.gas; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0.01; - value uniform 0.01; - } - wall1 - { - type kqRWallFunction; - value uniform 0.01; - } - wall2 - { - type kqRWallFunction; - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.liquid deleted file mode 100644 index 0cff3a0a1..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/k.liquid +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object k.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -2 0 0 0 0]; - -internalField uniform 0.01; - -boundaryField -{ - inlet - { - type mapped; - field k.liquid; - setAverage 0; - average 0; - interpolationScheme cell; - value uniform 0.01; - } - outlet - { - type inletOutlet; - phi phi.liquid; - inletValue uniform 3.75e-05; - value uniform 0.01; - } - wall1 - { - type kqRWallFunction; - value uniform 0.01; - } - wall2 - { - type kqRWallFunction; - value uniform 0.01; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.gas deleted file mode 100644 index 94928c3ce..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.gas +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object nut.gas; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -1 0 0 0 0]; - -internalField uniform 0.0001; - -boundaryField -{ - inlet - { - type calculated; - value uniform 0.0001; - } - outlet - { - type calculated; - value uniform 0.0001; - } - wall1 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - wall2 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.liquid deleted file mode 100644 index 70e2e63c8..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/nut.liquid +++ /dev/null @@ -1,57 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object nut.liquid; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 2 -1 0 0 0 0]; - -internalField uniform 0.0001; - -boundaryField -{ - inlet - { - type calculated; - value uniform 0.0001; - } - outlet - { - type calculated; - value uniform 0.0001; - } - wall1 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.0001; - } - wall2 - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0.0001; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p deleted file mode 100644 index 219a0bfbf..000000000 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p +++ /dev/null @@ -1,51 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - location "0"; - object p; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -2 0 0 0 0]; - -internalField uniform 100000; - -boundaryField -{ - inlet - { - type calculated; - value uniform 100000; - } - outlet - { - type calculated; - value uniform 100000; - } - wall1 - { - type calculated; - value uniform 100000; - } - wall2 - { - type calculated; - value uniform 100000; - } - defaultFaces - { - type empty; - } -} - - -// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun index 8520077d2..57240ca9b 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun @@ -6,17 +6,16 @@ cd ${0%/*} || exit 1 # Run from this directory application=`getApplication` -\rm -rf 0 -cp -r 0.org 0 - runApplication blockMesh runApplication $application if ! isTest $@ then foamDictionary system/controlDict -entry endTime -set 5 + foamDictionary system/controlDict -entry startTime -set 2 foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 500000' foamDictionary 2/T.liquid -entry boundaryField.wall1.q -set 'uniform 500000' + foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue' runApplication -a $application fi diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/T.gas similarity index 92% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/T.gas index 0b91c30f6..31f188e88 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/T.gas +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/T.gas @@ -35,9 +35,7 @@ boundaryField } wall1 { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; + type zeroGradient; } wall2 { diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/T.liquid similarity index 89% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/T.liquid index e0c2166e0..d2c4c4648 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.liquid +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/T.liquid @@ -35,11 +35,7 @@ boundaryField } wall1 { - type fixedMultiPhaseHeatFlux; - relax 0.5; - q uniform 0; - phase "liquid"; - value uniform 368; + type zeroGradient; } wall2 { diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/U.gas similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/U.gas diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/U.liquid similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/U.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/U.liquid diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alpha.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alpha.gas similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alpha.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alpha.gas diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alpha.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alpha.liquid similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/alpha.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alpha.liquid diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alphat.gas similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alphat.gas diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alphat.liquid similarity index 78% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alphat.liquid index 29edf3123..3cff73f10 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alphat.liquid +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/alphat.liquid @@ -33,32 +33,13 @@ boundaryField } wall1 { - type compressible::alphatWallBoilingWallFunction; - otherPhase gas2; - phaseType liquid; + type compressible::alphatPhaseChangeJayatillekeWallFunction; Prt 0.85; Cmu 0.09; kappa 0.41; E 9.8; - relax 0.01; - dmdt uniform 0; - partitioningModel - { - type phaseFraction; - } - nucleationSiteModel - { - type LemmertChawla; - } - departureDiamModel - { - type TolubinskiKostanchuk; - } - departureFreqModel - { - type Cole; - } - value uniform 0.01; + + value uniform 1e-8; } wall2 { diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/epsilon.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/epsilon.gas similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/epsilon.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/epsilon.gas diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/epsilon.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/epsilon.liquid similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/epsilon.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/epsilon.liquid diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas2 b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/f.gas.bubbles similarity index 78% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas2 rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/f.gas.bubbles index ee7b855f1..f9b94a628 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas2 +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/f.gas.bubbles @@ -11,27 +11,24 @@ FoamFile format ascii; class volScalarField; location "0"; - object alpha.gas; + object f.gas.bubbles; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; -internalField uniform 0; +internalField uniform 1.0; boundaryField { inlet { type fixedValue; - value uniform 0; + value uniform 1.0; } outlet { - type inletOutlet; - phi phi.gas; - inletValue uniform 0; - value uniform 0; + type zeroGradient; } wall1 { @@ -41,11 +38,6 @@ boundaryField { type zeroGradient; } - defaultFaces - { - type empty; - } } - // ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/k.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/k.gas similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/k.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/k.gas diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/k.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/k.liquid similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/k.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/k.liquid diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/nut.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/nut.gas similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/nut.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/nut.gas diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/nut.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/nut.liquid similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/nut.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/nut.liquid diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/p b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/p similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/p rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/p diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/p_rgh b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/p_rgh similarity index 100% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/0.org/p_rgh rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/0/p_rgh diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allclean b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allclean new file mode 100644 index 000000000..4d3ae417c --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +cp ./system/controlDict.org ./system/controlDict + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allrun new file mode 100644 index 000000000..2c2e384c2 --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Allrun @@ -0,0 +1,21 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=`getApplication` + +runApplication blockMesh +runApplication $application + +if ! isTest $@ +then + foamDictionary system/controlDict -entry endTime -set 5 + foamDictionary system/controlDict -entry startTime -set 2 + foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 'uniform 1e5' + foamDictionary 2/U.liquid -entry boundaryField.inlet.type -set 'fixedValue' + runApplication -a $application +fi + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Tsat_water_1_2bar.csv b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Tsat_water_1_2bar.csv new file mode 100644 index 000000000..bdab8b9ab --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/Tsat_water_1_2bar.csv @@ -0,0 +1,66 @@ +p,Tsat +99083.3,372.499 +100667,372.942 +102250,373.379 +103833,373.811 +105417,374.237 +107000,374.658 +108583,375.074 +110167,375.485 +111750,375.891 +113333,376.293 +114917,376.689 +116500,377.082 +118083,377.47 +119667,377.853 +121250,378.233 +122833,378.608 +124417,378.98 +126000,379.347 +127583,379.711 +129167,380.071 +130750,380.427 +132333,380.78 +133917,381.13 +135500,381.476 +137083,381.819 +138667,382.158 +140250,382.494 +141833,382.828 +143417,383.158 +145000,383.485 +146583,383.809 +148167,384.131 +149750,384.449 +151333,384.765 +152917,385.078 +154500,385.389 +156083,385.697 +157667,386.002 +159250,386.305 +160833,386.605 +162417,386.903 +164000,387.199 +165583,387.492 +167167,387.783 +168750,388.072 +170333,388.358 +171917,388.642 +173500,388.925 +175083,389.205 +176667,389.483 +178250,389.759 +179833,390.033 +181417,390.305 +183000,390.575 +184583,390.843 +186167,391.109 +187750,391.374 +189333,391.636 +190917,391.897 +192500,392.156 +194083,392.413 +195667,392.669 +197250,392.923 +198833,393.175 +200417,393.426 diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/g b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/g new file mode 100644 index 000000000..b2809d8ba --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0 ); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties new file mode 100644 index 000000000..a5ee44680 --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/phaseProperties @@ -0,0 +1,218 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type thermalPhaseChangePopulationBalanceTwoPhaseSystem; + +phases (gas liquid); + +massTransfer on; + +populationBalances (bubbles); + +gas +{ + type purePhaseModel; + diameterModel velocityGroup; + velocityGroupCoeffs + { + populationBalance bubbles; + + formFactor 0.5235987756; + + sizeGroups + ( + f0 {d 1.0e-4; value 0 ;} + f1 {d 2.0e-4; value 0 ;} + f2 {d 3.0e-4; value 0 ;} + f3 {d 4.0e-4; value 0 ;} + f4 {d 5.0e-4; value 0 ;} + f5 {d 6.0e-4; value 0 ;} + f6 {d 7.0e-4; value 0 ;} + f7 {d 8.0e-4; value 1.0 ;} + f8 {d 9.0e-4; value 0 ;} + f9 {d 1.0e-3; value 0 ;} + f10 {d 1.1e-3; value 0 ;} + f11 {d 1.2e-3; value 0 ;} + f12 {d 1.3e-3; value 0 ;} + f13 {d 1.4e-3; value 0 ;} + ); + } + + residualAlpha 1e-4; +} + +liquid +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 0.00045; + } + Sc 0.7; + + residualAlpha 1e-4; +} + +populationBalanceCoeffs +{ + bubbles + { + continuousPhase liquid; + + coalescenceModels + ( + hydrodynamic + { + C 0.25; + } + ); + + binaryBreakupModels + (); + + breakupModels + ( + exponential + { + C 0.5; + exponent 0.01; + daughterSizeDistributionModel uniformBinary; + } + ); + + driftModels + ( + phaseChange + { + pairNames (gasAndLiquid); + } + + densityChange{} + ); + + nucleationModels + ( + wallBoiling + { + velocityGroup gas; + } + ); + } +} + +blending +{ + default + { + type none; + continuousPhase liquid; + } +} + +surfaceTension +(); + +saturationModel +{ + type function1; + + function csvFile; + functionCoeffs + { + nHeaderLine 1; + refColumn 0; + componentColumns (1); + separator ","; + mergeSeparators no; + file "Tsat_water_1_2bar.csv"; + outOfBounds clamp; + interpolationScheme linear; + }; +}; + +aspectRatio +(); + +drag +( + (gas in liquid) + { + type SchillerNaumann; + residualRe 1e-3; + swarmCorrection + { + type none; + } + } +); + +virtualMass +( + (gas in liquid) + { + type constantCoefficient; + Cvm 0.5; + } +); + +heatTransfer.gas +( + (gas in liquid) + { + type spherical; + residualAlpha 1e-3; + } +); + +heatTransfer.liquid +( + (gas in liquid) + { + type RanzMarshall; + residualAlpha 1e-3; + } +); + +massTransfer.gas +(); + +massTransfer.liquid +(); + +lift +(); + +wallLubrication +(); + +turbulentDispersion +( + (gas in liquid) + { + type Burns; + sigma 0.7; + Ctd 1.0; + residualAlpha 1e-3; + } +); + +// Minimum allowable pressure +pMin 10000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.gas similarity index 56% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.gas index 219a0bfbf..5b89c64bb 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.gas @@ -9,43 +9,47 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "0"; - object p; + class dictionary; + location "constant"; + object thermophysicalProperties.gas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; - -internalField uniform 100000; - -boundaryField +thermoType { - inlet + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hRefConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +dpdt no; + +mixture +{ + specie { - type calculated; - value uniform 100000; + molWeight 18.0153; } - outlet + equationOfState { - type calculated; - value uniform 100000; + rho 1; } - wall1 + thermodynamics { - type calculated; - value uniform 100000; + Hf 0; + Cp 12078.4; + Tref 373.55; + Href 2675500; } - wall2 + transport { - type calculated; - value uniform 100000; - } - defaultFaces - { - type empty; + mu 1.2256e-5; + Pr 2.289; } } - // ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.liquid similarity index 54% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.liquid index 4eea782c9..8f94c4713 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/U.gas +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/thermophysicalProperties.liquid @@ -9,46 +9,51 @@ FoamFile { version 2.0; format ascii; - class volVectorField; - location "0"; - object U.gas; + class dictionary; + location "constant"; + object thermophysicalProperties.liquid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 1 -1 0 0 0 0]; - -internalField uniform (0 1 0); - -boundaryField +thermoType { - inlet + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hRefConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +dpdt no; + +mixture +{ + specie { - type mapped; - field U.gas; - setAverage 1; - average (0 1 0); - interpolationScheme cell; - value uniform (0 1 0); + molWeight 18.0153; } - outlet + equationOfState { - type pressureInletOutletVelocity; - phi phi.gas; - value uniform (0 1 0); + R 3000; + rho0 959; + rho 959; } - wall1 + thermodynamics { - type slip; + Hf 0; + Cp 4195; + Tref 373.55; + Href 417500; } - wall2 + transport { - type slip; - } - defaultFaces - { - type empty; + mu 2.8291e-4; + Pr 2.289; } } + // ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p_rgh b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.gas similarity index 58% rename from tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p_rgh rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.gas index 3512d1360..2e6e532bf 100644 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/0.org/p_rgh +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.gas @@ -9,41 +9,20 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "5"; - object p_rgh; + class dictionary; + location "constant"; + object turbulenceProperties.air; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +simulationType laminar;//RAS; -internalField uniform 100000; - -boundaryField +RAS { - inlet - { - type fixedFluxPressure; - } - outlet - { - type prghPressure; - p uniform 100000; - value uniform 100000; - } - wall1 - { - type fixedFluxPressure; - } - wall2 - { - type fixedFluxPressure; - } - defaultFaces - { - type empty; - } + RASModel continuousGasKEpsilon; + + turbulence on; + printCoeffs on; } - // ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p_rgh b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.liquid similarity index 58% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p_rgh rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.liquid index 3512d1360..d2e3743ab 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/p_rgh +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/constant/turbulenceProperties.liquid @@ -9,41 +9,20 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "5"; - object p_rgh; + class dictionary; + location "constant"; + object turbulenceProperties.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -2 0 0 0 0]; +simulationType RAS; -internalField uniform 100000; - -boundaryField +RAS { - inlet - { - type fixedFluxPressure; - } - outlet - { - type prghPressure; - p uniform 100000; - value uniform 100000; - } - wall1 - { - type fixedFluxPressure; - } - wall2 - { - type fixedFluxPressure; - } - defaultFaces - { - type empty; - } + RASModel kEpsilon; + + turbulence on; + printCoeffs on; } - // ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas2 b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/blockMeshDict similarity index 53% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas2 rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/blockMeshDict index 0b91c30f6..d2ab81e94 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/T.gas2 +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/blockMeshDict @@ -9,47 +9,72 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "5"; - object T.gas; + class dictionary; + object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 0 0 1 0 0 0]; +convertToMeters 1; -internalField uniform 368; +vertices +( + (0 0 0) + (0.05 0 0) + (0.05 2 0) + (0 2 0) + (0 0 0.1) + (0.05 0 0.1) + (0.05 2 0.1) + (0 2 0.1) +); -boundaryField -{ +blocks +( + hex (0 1 2 3 4 5 6 7) (25 75 1) simpleGrading (1 1 1) +); + +boundary +( inlet { - type fixedValue; - value uniform 368; + type mappedPatch; + offset (0 0.1 0); + sampleRegion region0; + sampleMode nearestCell; + samplePatch none; + + faces + ( + (1 5 4 0) + ); } + outlet { - type inletOutlet; - phi phi.gas; - inletValue uniform 368; - value uniform 368; + type patch; + faces + ( + (3 7 6 2) + ); } + wall1 { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; + type wall; + faces + ( + (0 4 7 3) + ); } + wall2 { - type copiedFixedValue; - sourceFieldName T.liquid; - value uniform 368; + type wall; + faces + ( + (2 6 5 1) + ); } - defaultFaces - { - type empty; - } -} - +); // ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.liquid b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict similarity index 56% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.liquid rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict index d5601d6a3..6fa65654e 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.liquid +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict @@ -9,43 +9,46 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "0"; - object alpha.liquid; + class dictionary; + location "system"; + object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 0 0 0 0 0 0]; +application reactingTwoPhaseEulerFoam; -internalField uniform 1; +startFrom startTime; -boundaryField -{ - inlet - { - type calculated; - value uniform 1; - } - outlet - { - type calculated; - value uniform 1; - } - wall1 - { - type calculated; - value uniform 1; - } - wall2 - { - type calculated; - value uniform 1; - } - defaultFaces - { - type empty; - } -} +startTime 0; +stopAt endTime; + +endTime 2; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.5; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 9; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.05; + +maxDeltaT 0.001; // ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict.org similarity index 56% rename from tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas rename to tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict.org index ee7b855f1..6fa65654e 100644 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/0.org/alpha.gas +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/controlDict.org @@ -9,43 +9,46 @@ FoamFile { version 2.0; format ascii; - class volScalarField; - location "0"; - object alpha.gas; + class dictionary; + location "system"; + object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 0 0 0 0 0 0]; +application reactingTwoPhaseEulerFoam; -internalField uniform 0; +startFrom startTime; -boundaryField -{ - inlet - { - type fixedValue; - value uniform 0; - } - outlet - { - type inletOutlet; - phi phi.gas; - inletValue uniform 0; - value uniform 0; - } - wall1 - { - type zeroGradient; - } - wall2 - { - type zeroGradient; - } - defaultFaces - { - type empty; - } -} +startTime 0; +stopAt endTime; + +endTime 2; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.5; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 9; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.05; + +maxDeltaT 0.001; // ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSchemes b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSchemes new file mode 100644 index 000000000..bcf8b0058 --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSchemes @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + "div\(phi,alpha.*\)" Gauss vanLeer; + "div\(phir,alpha.*\)" Gauss vanLeer; + + "div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; + + "div\(alphaRhoPhi.*,Yi\)" Gauss limitedLinear 1; + "div\(alphaRhoPhi.*,(h|e|f).*\)" Gauss limitedLinear 1; + "div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,p\)" Gauss limitedLinear 1; + + "div\(alphaRhoPhi.*,(k|epsilon).*\)" Gauss upwind; + "div\(phim,(k|epsilon)m\)" Gauss upwind; + + "div\(\(\(\(alpha.*\*thermo:rho.*\)\*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +fluxRequired +{ + default no; +} + +wallDist +{ + method meshWave; + nRequired yes; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSolution b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSolution new file mode 100644 index 000000000..d141304e9 --- /dev/null +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse/system/fvSolution @@ -0,0 +1,122 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.*" + { + nAlphaCorr 1; + nAlphaSubCycles 3; + } + + bubbles + { + nCorr 1; + tolerance 1e-4; + renormalizeOnRestart true; + renormalize false; + solveOnFinalIterOnly true; + } + + p_rgh + { + solver GAMG; + smoother DIC; + tolerance 1e-8; + relTol 0.01; + maxIter 100; + minIter 1; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0; + minIter 1; + } + + "(e|h).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-12; + relTol 0.001; + minIter 1; + maxIter 20; + } + + "(k|epsilon|Theta).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + minIter 1; + } + + Yi + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0; + minIter 1; + residualAlpha 1e-8; + } + + "f.*" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-6; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 6; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + nEnergyCorrectors 2; + faceMomentum yes; +} + +relaxationFactors +{ + fields + { + iDmdt 0.1; + } + + equations + { + ".*" 1; + "h.*" 0.3; + } +} + + +// ************************************************************************* //