From 3e577d8515dccaa079827db9d40a220b36a55647 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 31 Dec 2017 19:59:47 +0000 Subject: [PATCH] reactingEulerFoam: Added population balance modeling capability This patch enables the reactingEulerFoam solvers to simulate polydisperse flow situations, i.e. flows where the disperse phase is subject to a size distribution. The newly added populationBalanceModel class solves the integro-partial differential population balance equation (PBE) by means of a class method, also called discrete or sectional method. This approach is based on discretizing the PBE over its internal coordinate, the particle volume. This yields a set of transport equations for the number concentration of particles in classes with a different representative size. These are coupled through their source-terms and solved in a segregated manner. The implementation is done in a way, that the total particle number and mass is preserved for coalescence, breakup and drift (i.e. isothermal growth or phase change) processes, irrespective of the chosen discretization over the internal coordinate. A population balance can be split over multiple velocity (temperature) fields, using the capability of reactingMultiphaseEulerFoam to solve for n momentum (energy) equations. To a certain degree, this takes into account the dependency of heat- and momentum transfer on the disperse phase diameter. It is also possible to define multiple population balances, e.g. bubbles and droplets simultaneously. The functionality can be switched on by choosing the appropriate phaseSystem type, e.g. populationBalanceMultiphaseSystem and the newly added diameterModel class called velocityGroup. To illustrate the use of the functionality, a bubbleColumnPolydisperse tutorial was added for reactingTwoPhaseEulerFoam and reactingMultiphaseEulerFoam. Furthermore, a reactingEulerFoam-specific functionObject called sizeDistribution was added to allow post-Processing of the size distribution, e.g. to obtain the number density function in a specific region. Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR) and VTT Technical Research Centre of Finland Ltd. --- .../multiphase/reactingEulerFoam/Allwclean | 1 + .../multiphase/reactingEulerFoam/Allwmake | 1 + .../functionObjects/Make/files | 3 + .../functionObjects/Make/options | 10 + .../sizeDistribution/sizeDistribution.C | 602 ++++++ .../sizeDistribution/sizeDistribution.H | 280 +++ .../reactingEulerFoam/phaseSystems/Make/files | 22 + .../PopulationBalancePhaseSystem.C | 378 ++++ .../PopulationBalancePhaseSystem.H | 128 ++ .../isothermalDiameter/isothermalDiameter.C | 21 +- .../isothermalDiameter/isothermalDiameter.H | 6 + .../velocityGroup/sizeGroup/sizeGroup.C | 107 + .../velocityGroup/sizeGroup/sizeGroup.H | 185 ++ .../velocityGroup/sizeGroup/sizeGroupI.H | 63 + .../velocityGroup/velocityGroup.C | 401 ++++ .../velocityGroup/velocityGroup.H | 221 ++ .../velocityGroup/velocityGroupI.H | 90 + .../phaseModel/phaseModel/phaseModel.C | 6 + .../phaseModel/phaseModel/phaseModel.H | 3 + .../phaseSystems/phaseSystem/phaseSystem.C | 24 + .../phaseSystems/phaseSystem/phaseSystem.H | 3 + .../binaryBreakupModel/binaryBreakupModel.C | 93 + .../binaryBreakupModel/binaryBreakupModel.H | 164 ++ .../powerLawUniformBinary.C | 82 + .../powerLawUniformBinary.H | 106 + .../breakupModels/breakupModel/breakupModel.C | 96 + .../breakupModels/breakupModel/breakupModel.H | 182 ++ .../breakupModels/exponential/exponential.C | 71 + .../breakupModels/exponential/exponential.H | 104 + .../breakupModels/powerLaw/powerLaw.C | 71 + .../breakupModels/powerLaw/powerLaw.H | 104 + .../coalescenceModel/coalescenceModel.C | 94 + .../coalescenceModel/coalescenceModel.H | 164 ++ .../constantCoalescence/constantCoalescence.C | 77 + .../constantCoalescence/constantCoalescence.H | 105 + .../hydrodynamic/hydrodynamic.C | 73 + .../hydrodynamic/hydrodynamic.H | 99 + .../daughterSizeDistributionModel.C | 124 ++ .../daughterSizeDistributionModel.H | 134 ++ .../uniformBinaryDsd/uniformBinaryDsd.C | 144 ++ .../uniformBinaryDsd/uniformBinaryDsd.H | 96 + .../driftModels/constantDrift/constantDrift.C | 112 + .../driftModels/constantDrift/constantDrift.H | 115 + .../driftModels/densityChange/densityChange.C | 76 + .../driftModels/densityChange/densityChange.H | 97 + .../driftModels/driftModel/driftModel.C | 93 + .../driftModels/driftModel/driftModel.H | 160 ++ .../populationBalanceModel.C | 1292 +++++++++++ .../populationBalanceModel.H | 403 ++++ .../populationBalanceModelI.H | 98 + .../multiphaseSystem/multiphaseSystems.C | 24 + .../IATEsources/phaseChange/phaseChange.C | 2 +- .../twoPhaseSystem/twoPhaseSystems.C | 27 +- .../bubbleColumnFixedPolydisperse/0/T.airI | 45 + .../bubbleColumnFixedPolydisperse/0/T.airII | 45 + .../bubbleColumnFixedPolydisperse/0/T.water | 45 + .../bubbleColumnFixedPolydisperse/0/Theta | 47 + .../bubbleColumnFixedPolydisperse/0/U.airI | 41 + .../bubbleColumnFixedPolydisperse/0/U.airII | 41 + .../bubbleColumnFixedPolydisperse/0/U.water | 41 + .../0/alpha.airI | 47 + .../0/alpha.airI.orig | 42 + .../0/alpha.airII | 1926 +++++++++++++++++ .../0/alpha.airII.orig | 42 + .../0/alpha.water | 1926 +++++++++++++++++ .../0/alpha.water.orig | 41 + .../laminar/bubbleColumnFixedPolydisperse/0/p | 40 + .../bubbleColumnFixedPolydisperse/0/p_rgh | 44 + .../bubbleColumnFixedPolydisperse/Allrun | 14 + .../bubbleColumnFixedPolydisperse/constant/g | 22 + .../constant/phaseProperties | 307 +++ .../constant/thermophysicalProperties.airI | 48 + .../constant/thermophysicalProperties.airII | 48 + .../constant/thermophysicalProperties.water | 53 + .../constant/turbulenceProperties.airI | 20 + .../constant/turbulenceProperties.airII | 20 + .../constant/turbulenceProperties.water | 20 + .../system/blockMeshDict | 61 + .../system/controlDict | 109 + .../system/fvSchemes | 62 + .../system/fvSolution | 76 + .../system/setFieldsDict | 39 + .../laminar/bubbleColumnPolydisperse/0/T.airI | 45 + .../bubbleColumnPolydisperse/0/T.airII | 45 + .../bubbleColumnPolydisperse/0/T.water | 45 + .../laminar/bubbleColumnPolydisperse/0/Theta | 47 + .../laminar/bubbleColumnPolydisperse/0/U.airI | 41 + .../bubbleColumnPolydisperse/0/U.airII | 41 + .../bubbleColumnPolydisperse/0/U.water | 41 + .../bubbleColumnPolydisperse/0/alpha.airI | 47 + .../0/alpha.airI.orig | 42 + .../bubbleColumnPolydisperse/0/alpha.airII | 1926 +++++++++++++++++ .../0/alpha.airII.orig | 42 + .../bubbleColumnPolydisperse/0/alpha.water | 1926 +++++++++++++++++ .../0/alpha.water.orig | 41 + .../bubbleColumnPolydisperse/0/f.airI.bubbles | 42 + .../0/f.airII.bubbles | 42 + .../laminar/bubbleColumnPolydisperse/0/p | 40 + .../laminar/bubbleColumnPolydisperse/0/p_rgh | 44 + .../laminar/bubbleColumnPolydisperse/Allrun | 14 + .../bubbleColumnPolydisperse/constant/g | 22 + .../constant/phaseProperties | 430 ++++ .../constant/thermophysicalProperties.airI | 48 + .../constant/thermophysicalProperties.airII | 48 + .../constant/thermophysicalProperties.water | 53 + .../constant/turbulenceProperties.airI | 20 + .../constant/turbulenceProperties.airII | 20 + .../constant/turbulenceProperties.water | 20 + .../system/blockMeshDict | 61 + .../system/controlDict | 125 ++ .../bubbleColumnPolydisperse/system/fvSchemes | 62 + .../system/fvSolution | 91 + .../system/setFieldsDict | 39 + .../system/topoSetDict | 45 + .../RAS/bubbleColumnPolydisperse/0/T.air | 45 + .../RAS/bubbleColumnPolydisperse/0/T.water | 45 + .../RAS/bubbleColumnPolydisperse/0/Theta | 47 + .../RAS/bubbleColumnPolydisperse/0/U.air | 41 + .../RAS/bubbleColumnPolydisperse/0/U.water | 41 + .../RAS/bubbleColumnPolydisperse/0/alpha.air | 1926 +++++++++++++++++ .../bubbleColumnPolydisperse/0/alpha.air.orig | 42 + .../RAS/bubbleColumnPolydisperse/0/alphat.air | 48 + .../bubbleColumnPolydisperse/0/alphat.water | 48 + .../bubbleColumnPolydisperse/0/epsilon.air | 49 + .../bubbleColumnPolydisperse/0/epsilon.water | 49 + .../RAS/bubbleColumnPolydisperse/0/epsilonm | 49 + .../bubbleColumnPolydisperse/0/f.air.bubbles | 42 + .../RAS/bubbleColumnPolydisperse/0/k.air | 49 + .../RAS/bubbleColumnPolydisperse/0/k.water | 49 + .../RAS/bubbleColumnPolydisperse/0/km | 49 + .../RAS/bubbleColumnPolydisperse/0/nut.air | 47 + .../RAS/bubbleColumnPolydisperse/0/nut.water | 47 + .../RAS/bubbleColumnPolydisperse/0/p | 40 + .../RAS/bubbleColumnPolydisperse/0/p_rgh | 41 + .../RAS/bubbleColumnPolydisperse/Allrun | 16 + .../RAS/bubbleColumnPolydisperse/constant/g | 22 + .../constant/phaseProperties | 252 +++ .../constant/thermophysicalProperties.air | 48 + .../constant/thermophysicalProperties.water | 53 + .../constant/turbulenceProperties.air | 34 + .../constant/turbulenceProperties.water | 28 + .../system/blockMeshDict | 61 + .../system/controlDict | 111 + .../bubbleColumnPolydisperse/system/fvSchemes | 64 + .../system/fvSolution | 99 + .../system/setFieldsDict | 36 + .../system/topoSetDict | 45 + 147 files changed, 21801 insertions(+), 6 deletions(-) create mode 100644 applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/files create mode 100644 applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/options create mode 100644 applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/PopulationBalancePhaseSystem/PopulationBalancePhaseSystem.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroup.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroup.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/sizeGroup/sizeGroupI.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroup.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/velocityGroup/velocityGroupI.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/binaryBreakupModel/binaryBreakupModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/powerLawUniformBinary/powerLawUniformBinary.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/binaryBreakupModels/powerLawUniformBinary/powerLawUniformBinary.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/breakupModel/breakupModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/exponential/exponential.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/exponential/exponential.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/powerLaw/powerLaw.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/breakupModels/powerLaw/powerLaw.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/coalescenceModel/coalescenceModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/constantCoalescence/constantCoalescence.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/constantCoalescence/constantCoalescence.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/hydrodynamic/hydrodynamic.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/coalescenceModels/hydrodynamic/hydrodynamic.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/daughterSizeDistributionModels/daughterSizeDistributionModel/daughterSizeDistributionModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/daughterSizeDistributionModels/daughterSizeDistributionModel/daughterSizeDistributionModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/daughterSizeDistributionModels/uniformBinaryDsd/uniformBinaryDsd.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/daughterSizeDistributionModels/uniformBinaryDsd/uniformBinaryDsd.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/constantDrift/constantDrift.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/constantDrift/constantDrift.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/densityChange/densityChange.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/densityChange/densityChange.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/driftModels/driftModel/driftModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModel.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/populationBalanceModel/populationBalanceModel/populationBalanceModelI.H create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/T.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/T.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/T.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/Theta create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/U.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/U.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/U.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/alpha.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/alpha.airI.orig create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/alpha.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/alpha.airII.orig create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/alpha.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/alpha.water.orig create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/p create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/0/p_rgh create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/Allrun create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/g create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/phaseProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/thermophysicalProperties.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/thermophysicalProperties.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/thermophysicalProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/turbulenceProperties.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/turbulenceProperties.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/constant/turbulenceProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/system/blockMeshDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/system/controlDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/system/fvSchemes create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/system/fvSolution create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnFixedPolydisperse/system/setFieldsDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/T.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/T.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/T.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/Theta create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/U.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/U.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/U.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/alpha.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/alpha.airI.orig create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/alpha.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/alpha.airII.orig create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/alpha.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/alpha.water.orig create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/f.airI.bubbles create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/f.airII.bubbles create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/p create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/0/p_rgh create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/Allrun create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/g create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/phaseProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/thermophysicalProperties.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/thermophysicalProperties.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/thermophysicalProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/turbulenceProperties.airI create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/turbulenceProperties.airII create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/constant/turbulenceProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/system/blockMeshDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/system/controlDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/system/fvSchemes create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/system/fvSolution create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/system/setFieldsDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumnPolydisperse/system/topoSetDict create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/T.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/T.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/Theta create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/U.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/U.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/alpha.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/alpha.air.orig create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/alphat.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/alphat.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/epsilon.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/epsilon.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/epsilonm create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/f.air.bubbles create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/k.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/k.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/km create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/nut.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/nut.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/p create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/0/p_rgh create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/Allrun create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/g create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/phaseProperties create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/thermophysicalProperties.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/thermophysicalProperties.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/turbulenceProperties.air create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/constant/turbulenceProperties.water create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/system/blockMeshDict create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/system/controlDict create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/system/fvSchemes create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/system/fvSolution create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/system/setFieldsDict create mode 100644 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/bubbleColumnPolydisperse/system/topoSetDict diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/Allwclean index 414e7d3b2..40a8acade 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwclean +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwclean @@ -7,5 +7,6 @@ wclean libso interfacialCompositionModels wclean libso derivedFvPatchFields reactingTwoPhaseEulerFoam/Allwclean reactingMultiphaseEulerFoam/Allwclean +wclean libso functionObjects #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/Allwmake index fe2a898dc..0414175eb 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwmake @@ -14,5 +14,6 @@ wmakeLnInclude reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels wmakeLnInclude reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels reactingTwoPhaseEulerFoam/Allwmake $targetType $* reactingMultiphaseEulerFoam/Allwmake $targetType $* +wmake $targetType functionObjects #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/files b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/files new file mode 100644 index 000000000..4e4b829d9 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/files @@ -0,0 +1,3 @@ +sizeDistribution/sizeDistribution.C + +LIB = $(FOAM_LIBBIN)/libreactingEulerFoamFunctionObjects diff --git a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/options b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/options new file mode 100644 index 000000000..6a0c4ab90 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/functionObjects/field/lnInclude \ + -I../phaseSystems/lnInclude + +LIB_LIBS = \ + -lfieldFunctionObjects \ + -lfiniteVolume diff --git a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C new file mode 100644 index 000000000..52ea09b71 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C @@ -0,0 +1,602 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2017 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 "sizeDistribution.H" +#include "sizeGroup.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace functionObjects +{ + defineTypeNameAndDebug(sizeDistribution, 0); + addToRunTimeSelectionTable(functionObject, sizeDistribution, dictionary); +} +} + +template<> +const char* +Foam::NamedEnum +< + Foam::functionObjects::sizeDistribution::regionTypes, + 2 +>::names[] = {"cellZone", "all"}; + +template<> +const char* +Foam::NamedEnum +< + Foam::functionObjects::sizeDistribution::functionTypes, + 4 +>::names[] = + { + "numberDensity", + "volumeDensity", + "numberConcentration", + "moments" + }; + +template<> +const char* +Foam::NamedEnum +< + Foam::functionObjects::sizeDistribution::abszissaTypes, + 2 +>::names[] = {"diameter", "volume"}; + +const Foam::NamedEnum +< + Foam::functionObjects::sizeDistribution::regionTypes, + 2 +> Foam::functionObjects::sizeDistribution::regionTypeNames_; + +const Foam::NamedEnum +< + Foam::functionObjects::sizeDistribution::functionTypes, + 4 +> Foam::functionObjects::sizeDistribution::functionTypeNames_; + +const Foam::NamedEnum +< + Foam::functionObjects::sizeDistribution::abszissaTypes, + 2 +> Foam::functionObjects::sizeDistribution::abszissaTypeNames_; + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +void Foam::functionObjects::sizeDistribution::initialise +( + const dictionary& dict +) +{ + switch (functionType_) + { + case ftNdf: + { + break; + } + + case ftVdf: + { + break; + } + + case ftNc: + { + break; + } + + case ftMom: + { + break; + } + + default: + { + FatalErrorInFunction + << "Unknown function type. Valid function types are:" + << functionTypeNames_ << nl << exit(FatalError); + } + } + + switch (abszissaType_) + { + case atDiameter: + { + break; + } + + case atVolume: + { + break; + } + + default: + { + FatalErrorInFunction + << "Unknown abszissa type. Valid abszissa types are:" + << abszissaTypeNames_ << nl << exit(FatalError); + } + } + + setCellZoneCells(); + + if (nCells_ == 0) + { + FatalErrorInFunction + << type() << " " << name() << ": " + << regionTypeNames_[regionType_] << "(" << regionName_ << "):" << nl + << " Region has no cells" << exit(FatalError); + } + + volume_ = volume(); + + Info<< type() << " " << name() << ":" + << regionTypeNames_[regionType_] << "(" << regionName_ << "):" << nl + << " total cells = " << nCells_ << nl + << " total volume = " << volume_ + << nl << endl; + + Info<< nl << endl; +} + + +void Foam::functionObjects::sizeDistribution::setCellZoneCells() +{ + switch (regionType_) + { + case rtCellZone: + { + dict().lookup("name") >> regionName_; + + label zoneId = mesh().cellZones().findZoneID(regionName_); + + if (zoneId < 0) + { + FatalErrorInFunction + << "Unknown cell zone name: " << regionName_ + << ". Valid cell zones are: " << mesh().cellZones().names() + << nl << exit(FatalError); + } + + cellId_ = mesh().cellZones()[zoneId]; + nCells_ = returnReduce(cellId_.size(), sumOp