From 85b27f674fdaaec45b6a6be8d334725dae83ea09 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Fri, 11 Sep 2015 15:33:12 +0100 Subject: [PATCH] reactingMultiphaseEulerFoam: New Euler-Euler multiphase solver Supporting any number of phases with heat and mass transfer, phase-change and reactions --- .../multiphase/multiphaseEulerFoam/UEqns.H | 2 +- .../multiphaseSystem/multiphaseSystem.C | 34 +- .../multiphaseSystem/phaseModel/phaseModel.C | 4 +- .../multiphaseSystem/phaseModel/phaseModel.H | 10 +- .../multiphase/reactingEulerFoam/Allwclean | 1 + .../multiphase/reactingEulerFoam/Allwmake | 1 + .../interfacialCompositionModels/Make/options | 1 - .../interfacialModels/Make/options | 1 - .../dragModels/segregated/segregated.C | 5 +- .../HeatAndMassTransferPhaseSystem.C | 54 + .../HeatAndMassTransferPhaseSystem.H | 8 +- .../HeatTransferPhaseSystem.C | 24 + .../HeatTransferPhaseSystem.H | 3 + .../MomentumTransferPhaseSystem.C | 88 +- .../MomentumTransferPhaseSystem.H | 3 + .../AnisothermalPhaseModel.C | 7 +- .../AnisothermalPhaseModel.H | 7 +- .../InertPhaseModel/InertPhaseModel.C | 5 +- .../InertPhaseModel/InertPhaseModel.H | 7 +- .../IsothermalPhaseModel.C | 5 +- .../IsothermalPhaseModel.H | 7 +- .../MovingPhaseModel/MovingPhaseModel.C | 6 +- .../MovingPhaseModel/MovingPhaseModel.H | 3 +- .../MultiComponentPhaseModel.C | 5 +- .../MultiComponentPhaseModel.H | 3 +- .../PurePhaseModel/PurePhaseModel.C | 5 +- .../PurePhaseModel/PurePhaseModel.H | 7 +- .../ReactingPhaseModel/ReactingPhaseModel.C | 5 +- .../ReactingPhaseModel/ReactingPhaseModel.H | 3 +- .../ThermoPhaseModel/ThermoPhaseModel.C | 3 +- .../ThermoPhaseModel/ThermoPhaseModel.H | 1 + .../phaseModel/phaseModel/newPhaseModel.C | 5 +- .../phaseModel/phaseModel/phaseModel.C | 10 +- .../phaseModel/phaseModel/phaseModel.H | 25 +- .../phaseSystems/phaseSystem/phaseSystem.C | 2 + .../reactingMultiphaseEulerFoam/Allwclean | 9 + .../reactingMultiphaseEulerFoam/Allwmake | 9 + .../reactingMultiphaseEulerFoam/CourantNo.H | 60 + .../reactingMultiphaseEulerFoam/EEqns.H | 47 + .../reactingMultiphaseEulerFoam/Make/files | 3 + .../reactingMultiphaseEulerFoam/Make/options | 25 + .../reactingMultiphaseEulerFoam/YEqns.H | 36 + .../createFields.H | 52 + .../reactingMultiphaseEulerFoam/log | 6 + .../Make/files | 3 + .../Make/options | 13 + .../multiphaseCompressibleTurbulenceModels.C | 70 + .../multiphaseSystem/Make/files | 6 + .../multiphaseSystem/Make/options | 21 + .../alphaContactAngleFvPatchScalarField.C | 146 ++ .../alphaContactAngleFvPatchScalarField.H | 215 ++ .../multiphaseSystem/multiphaseSystem.C | 713 ++++++ .../multiphaseSystem/multiphaseSystem.H | 207 ++ .../multiphaseSystem/multiphaseSystemI.H | 28 + .../multiphaseSystem/multiphaseSystems.C | 86 + .../multiphaseSystem/newMultiphaseSystem.C | 70 + .../reactingMultiphaseEulerFoam/pU/UEqns.H | 37 + .../reactingMultiphaseEulerFoam/pU/pEqn.H | 447 ++++ .../reactingMultiphaseEulerFoam/pU/pEqnSave.H | 285 +++ .../reactingMultiphaseEulerFoam.C | 143 ++ .../reactingMultiphaseEulerFoam/setRDeltaT.H | 36 + .../reactingTwoPhaseEulerFoam/EEqns.H | 16 +- .../reactingTwoPhaseEulerFoam/pU/pEqn.H | 124 +- .../bubbleColumn/system/fvSchemes | 2 +- .../damBreak4phase/system/fvSchemes | 2 +- .../damBreak4phaseFine/system/fvSchemes | 2 +- .../mixerVessel2D/system/fvSchemes | 2 +- .../laminar/bubbleColumn/0/T.air | 45 + .../laminar/bubbleColumn/0/T.water | 45 + .../laminar/bubbleColumn/0/Theta | 47 + .../laminar/bubbleColumn/0/U.air | 41 + .../laminar/bubbleColumn/0/U.water | 41 + .../laminar/bubbleColumn/0/alpha.air | 1926 +++++++++++++++++ .../laminar/bubbleColumn/0/alpha.air.org | 42 + .../laminar/bubbleColumn/0/alpha.water | 1926 +++++++++++++++++ .../laminar/bubbleColumn/0/alpha.water.org | 41 + .../laminar/bubbleColumn/0/p | 40 + .../laminar/bubbleColumn/0/p_rgh | 41 + .../laminar/bubbleColumn/constant/g | 22 + .../bubbleColumn/constant/phaseProperties | 169 ++ .../bubbleColumn/constant/polyMesh/boundary | 48 + .../constant/thermophysicalProperties.air | 49 + .../constant/thermophysicalProperties.water | 54 + .../constant/turbulenceProperties.air | 20 + .../constant/turbulenceProperties.water | 20 + .../laminar/bubbleColumn/system/blockMeshDict | 61 + .../laminar/bubbleColumn/system/controlDict | 95 + .../laminar/bubbleColumn/system/fvSchemes | 63 + .../laminar/bubbleColumn/system/fvSolution | 82 + .../laminar/bubbleColumn/system/setFieldsDict | 36 + .../laminar/damBreak4phase/0.org/U | 51 + .../laminar/damBreak4phase/0.org/U.air | 51 + .../laminar/damBreak4phase/0.org/U.mercury | 51 + .../laminar/damBreak4phase/0.org/U.oil | 51 + .../laminar/damBreak4phase/0.org/U.water | 51 + .../laminar/damBreak4phase/0.org/alpha.air | 79 + .../damBreak4phase/0.org/alpha.mercury | 49 + .../laminar/damBreak4phase/0.org/alpha.oil | 49 + .../laminar/damBreak4phase/0.org/alpha.water | 49 + .../laminar/damBreak4phase/0.org/alphas | 47 + .../laminar/damBreak4phase/0.org/p_rgh | 59 + .../laminar/damBreak4phase/Allclean | 11 + .../laminar/damBreak4phase/Allrun | 17 + .../laminar/damBreak4phase/constant/g | 22 + .../damBreak4phase/constant/motionProperties | 21 + .../damBreak4phase/constant/polyMesh/boundary | 56 + .../constant/transportProperties | 236 ++ .../constant/turbulenceProperties | 21 + .../damBreak4phase/system/blockMeshDict | 108 + .../laminar/damBreak4phase/system/controlDict | 56 + .../damBreak4phase/system/decomposeParDict | 45 + .../laminar/damBreak4phase/system/fvSchemes | 53 + .../laminar/damBreak4phase/system/fvSolution | 98 + .../damBreak4phase/system/setFieldsDict | 65 + .../laminar/damBreak4phaseFine/0.org/U | 51 + .../laminar/damBreak4phaseFine/0.org/U.air | 51 + .../damBreak4phaseFine/0.org/U.mercury | 51 + .../laminar/damBreak4phaseFine/0.org/U.oil | 51 + .../laminar/damBreak4phaseFine/0.org/U.water | 51 + .../damBreak4phaseFine/0.org/alpha.air | 79 + .../damBreak4phaseFine/0.org/alpha.mercury | 49 + .../damBreak4phaseFine/0.org/alpha.oil | 49 + .../damBreak4phaseFine/0.org/alpha.water | 49 + .../laminar/damBreak4phaseFine/0.org/alphas | 47 + .../laminar/damBreak4phaseFine/0.org/p_rgh | 59 + .../laminar/damBreak4phaseFine/Allclean | 11 + .../laminar/damBreak4phaseFine/Allrun | 19 + .../laminar/damBreak4phaseFine/constant/g | 22 + .../constant/motionProperties | 21 + .../constant/polyMesh/boundary | 56 + .../constant/transportProperties | 236 ++ .../constant/turbulenceProperties | 21 + .../damBreak4phaseFine/system/blockMeshDict | 108 + .../damBreak4phaseFine/system/controlDict | 56 + .../system/decomposeParDict | 45 + .../damBreak4phaseFine/system/fvSchemes | 53 + .../damBreak4phaseFine/system/fvSolution | 98 + .../damBreak4phaseFine/system/setFieldsDict | 65 + .../laminar/mixerVessel2D/0/T.air | 48 + .../laminar/mixerVessel2D/0/T.mercury | 48 + .../laminar/mixerVessel2D/0/T.oil | 48 + .../laminar/mixerVessel2D/0/T.water | 48 + .../laminar/mixerVessel2D/0/Theta | 44 + .../laminar/mixerVessel2D/0/U.air | 46 + .../laminar/mixerVessel2D/0/U.mercury | 46 + .../laminar/mixerVessel2D/0/U.oil | 46 + .../laminar/mixerVessel2D/0/U.water | 46 + .../laminar/mixerVessel2D/0/alpha.air | 44 + .../laminar/mixerVessel2D/0/alpha.mercury | 44 + .../laminar/mixerVessel2D/0/alpha.oil | 44 + .../laminar/mixerVessel2D/0/alpha.water | 44 + .../laminar/mixerVessel2D/0/p | 46 + .../laminar/mixerVessel2D/0/p_rgh | 46 + .../laminar/mixerVessel2D/Allrun | 12 + .../mixerVessel2D/constant/MRFProperties | 31 + .../laminar/mixerVessel2D/constant/g | 22 + .../mixerVessel2D/constant/phaseProperties | 456 ++++ .../mixerVessel2D/constant/polyMesh/boundary | 50 + .../constant/thermophysicalProperties.air | 49 + .../constant/thermophysicalProperties.mercury | 53 + .../constant/thermophysicalProperties.oil | 53 + .../constant/thermophysicalProperties.water | 54 + .../constant/turbulenceProperties.air | 20 + .../constant/turbulenceProperties.mercury | 20 + .../constant/turbulenceProperties.oil | 20 + .../constant/turbulenceProperties.water | 20 + .../laminar/mixerVessel2D/makeMesh | 6 + .../mixerVessel2D/system/blockMeshDict.m4 | 818 +++++++ .../laminar/mixerVessel2D/system/controlDict | 55 + .../laminar/mixerVessel2D/system/fvSchemes | 58 + .../laminar/mixerVessel2D/system/fvSolution | 109 + .../laminar/mixerVessel2D/system/topoSetDict | 32 + 172 files changed, 13507 insertions(+), 148 deletions(-) create mode 100755 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean create mode 100755 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/CourantNo.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/files create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/YEqns.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/createFields.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/log create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/files create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/multiphaseCompressibleTurbulenceModels.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/files create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/options create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystemI.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/UEqns.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqnSave.H create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C create mode 100644 applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/Theta create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air.org create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water.org create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/g create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/blockMeshDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/controlDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSchemes create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSolution create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/setFieldsDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alphas create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/p_rgh create mode 100755 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allclean create mode 100755 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/motionProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alphas create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/p_rgh create mode 100755 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allclean create mode 100755 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allrun create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/g create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/motionProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/transportProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/turbulenceProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/blockMeshDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/controlDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/decomposeParDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSchemes create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSolution create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/setFieldsDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/Theta create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p_rgh create mode 100755 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/MRFProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/g create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/polyMesh/boundary create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.water create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.air create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.mercury create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.oil create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.water create mode 100755 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/blockMeshDict.m4 create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/controlDict create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSchemes create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSolution create mode 100644 tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/topoSetDict diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H index 6b9174def73..abad0dfaf04 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H @@ -18,7 +18,7 @@ forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) new fvVectorMatrix ( fvm::ddt(alpha, U) - + fvm::div(phase.phiAlpha(), U) + + fvm::div(phase.alphaPhi(), U) + (alpha/phase.rho())*fluid.Cvm(phase)* ( diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 01637a6cc15..2203d6e144f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -61,7 +61,7 @@ void Foam::multiphaseSystem::calcAlphas() void Foam::multiphaseSystem::solveAlphas() { - PtrList<surfaceScalarField> phiAlphaCorrs(phases_.size()); + PtrList<surfaceScalarField> alphaPhiCorrs(phases_.size()); int phasei = 0; forAllIter(PtrDictionary<phaseModel>, phases_, iter) @@ -69,10 +69,10 @@ void Foam::multiphaseSystem::solveAlphas() phaseModel& phase1 = iter(); volScalarField& alpha1 = phase1; - phase1.phiAlpha() = + phase1.alphaPhi() = dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0); - phiAlphaCorrs.set + alphaPhiCorrs.set ( phasei, new surfaceScalarField @@ -87,7 +87,7 @@ void Foam::multiphaseSystem::solveAlphas() ) ); - surfaceScalarField& phiAlphaCorr = phiAlphaCorrs[phasei]; + surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei]; forAllIter(PtrDictionary<phaseModel>, phases_, iter2) { @@ -118,7 +118,7 @@ void Foam::multiphaseSystem::solveAlphas() "div(phir," + alpha2.name() + ',' + alpha1.name() + ')' ); - phiAlphaCorr += fvc::flux + alphaPhiCorr += fvc::flux ( -fvc::flux(-phir, phase2, phirScheme), phase1, @@ -127,21 +127,21 @@ void Foam::multiphaseSystem::solveAlphas() } // Ensure that the flux at inflow BCs is preserved - forAll(phiAlphaCorr.boundaryField(), patchi) + forAll(alphaPhiCorr.boundaryField(), patchi) { - fvsPatchScalarField& phiAlphaCorrp = - phiAlphaCorr.boundaryField()[patchi]; + fvsPatchScalarField& alphaPhiCorrp = + alphaPhiCorr.boundaryField()[patchi]; - if (!phiAlphaCorrp.coupled()) + if (!alphaPhiCorrp.coupled()) { const scalarField& phi1p = phase1.phi().boundaryField()[patchi]; const scalarField& alpha1p = alpha1.boundaryField()[patchi]; - forAll(phiAlphaCorrp, facei) + forAll(alphaPhiCorrp, facei) { if (phi1p[facei] < 0) { - phiAlphaCorrp[facei] = alpha1p[facei]*phi1p[facei]; + alphaPhiCorrp[facei] = alpha1p[facei]*phi1p[facei]; } } } @@ -153,7 +153,7 @@ void Foam::multiphaseSystem::solveAlphas() geometricOneField(), phase1, phi_, - phiAlphaCorr, + alphaPhiCorr, zeroField(), zeroField(), 1, @@ -164,7 +164,7 @@ void Foam::multiphaseSystem::solveAlphas() phasei++; } - MULES::limitSum(phiAlphaCorrs); + MULES::limitSum(alphaPhiCorrs); volScalarField sumAlpha ( @@ -184,19 +184,19 @@ void Foam::multiphaseSystem::solveAlphas() { phaseModel& phase1 = iter(); - surfaceScalarField& phiAlpha = phiAlphaCorrs[phasei]; - phiAlpha += upwind<scalar>(mesh_, phi_).flux(phase1); + surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei]; + alphaPhi += upwind<scalar>(mesh_, phi_).flux(phase1); MULES::explicitSolve ( geometricOneField(), phase1, - phiAlpha, + alphaPhi, zeroField(), zeroField() ); - phase1.phiAlpha() += phiAlpha; + phase1.alphaPhi() += alphaPhi; Info<< phase1.name() << " volume fraction, min, max = " << phase1.weightedAverage(mesh_.V()).value() diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 9f6ed4ac731..f107cfb4405 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C @@ -100,11 +100,11 @@ Foam::phaseModel::phaseModel mesh, dimensionedVector("0", dimVelocity/dimTime, vector::zero) ), - phiAlpha_ + alphaPhi_ ( IOobject ( - IOobject::groupName("phiAlpha", phaseName), + IOobject::groupName("alphaPhi", phaseName), mesh.time().timeName(), mesh ), diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.H index 54d6119e493..d1f1157b9a1 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.H @@ -80,7 +80,7 @@ class phaseModel volVectorField DDtU_; //- Volumetric flux of the phase - surfaceScalarField phiAlpha_; + surfaceScalarField alphaPhi_; //- Volumetric flux for the phase autoPtr<surfaceScalarField> phiPtr_; @@ -198,14 +198,14 @@ public: return phiPtr_(); } - const surfaceScalarField& phiAlpha() const + const surfaceScalarField& alphaPhi() const { - return phiAlpha_; + return alphaPhi_; } - surfaceScalarField& phiAlpha() + surfaceScalarField& alphaPhi() { - return phiAlpha_; + return alphaPhi_; } //- Correct the phase properties diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/Allwclean index e9a7070211a..618570ccbb2 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwclean +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwclean @@ -6,5 +6,6 @@ wclean libso phaseSystems wclean libso interfacialModels wclean libso interfacialCompositionModels reactingTwoPhaseEulerFoam/Allwclean +reactingMultiphaseEulerFoam/Allwclean # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/Allwmake index 4682cf568df..91c6cd94917 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwmake @@ -8,5 +8,6 @@ wmake libso phaseSystems wmake libso interfacialModels wmake libso interfacialCompositionModels reactingTwoPhaseEulerFoam/Allwmake +reactingMultiphaseEulerFoam/Allwmake # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/options index 088d504706b..b25751cd2d0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/Make/options @@ -21,7 +21,6 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ - -lreactingTwoPhaseSystem \ -lfluidThermophysicalModels \ -lreactionThermophysicalModels \ -lspecie diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/options index ba5bb85f993..1e5f8f0aea9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/Make/options @@ -10,7 +10,6 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ - -lreactingTwoPhaseSystem \ -lcompressibleTransportModels \ -lfluidThermophysicalModels \ -lspecie diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C index 4b1fc88ddc5..2f3e0db6992 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -132,7 +132,10 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const volScalarField muAlphaI ( alpha1*rho1*nu1*alpha2*rho2*nu2 - /(alpha1*rho1*nu1 + alpha2*rho2*nu2) + /( + max(alpha1, pair_.phase1().residualAlpha())*rho1*nu1 + + max(alpha2, pair_.phase2().residualAlpha())*rho2*nu2 + ) ); volScalarField ReI diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C index 8b2bbdb99e2..66d119fd947 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C @@ -164,6 +164,60 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::dmdt } +template<class BasePhaseSystem> +Foam::tmp<Foam::volScalarField> +Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::dmdt +( + const Foam::phaseModel& phase +) const +{ + tmp<volScalarField> tdmdt + ( + new volScalarField + ( + IOobject + ( + IOobject::groupName("dmdt", phase.name()), + this->mesh_.time().timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar("zero", dimDensity/dimTime, 0) + ) + ); + + forAllConstIter + ( + phaseSystem::phasePairTable, + this->phasePairs_, + phasePairIter + ) + { + const phasePair& pair(phasePairIter()); + + if (pair.ordered()) + { + continue; + } + + const phaseModel* phase1 = &pair.phase1(); + const phaseModel* phase2 = &pair.phase2(); + + forAllConstIter(phasePair, pair, iter) + { + if (phase1 == &phase) + { + tdmdt() += this->dmdt(pair); + } + + Swap(phase1, phase2); + } + } + + return tdmdt; +} + + template<class BasePhaseSystem> Foam::autoPtr<Foam::phaseSystem::momentumTransferTable> Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H index 3f20c575f83..d8aa29676aa 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.H @@ -121,10 +121,10 @@ public: // Member Functions //- Return the interfacial mass flow rate - virtual tmp<volScalarField> dmdt - ( - const phasePairKey& key - ) const; + virtual tmp<volScalarField> dmdt(const phasePairKey& key) const; + + //- Return the total interfacial mass transfer rate for phase + virtual tmp<volScalarField> dmdt(const phaseModel& phase) const; //- Return the momentum transfer matrices virtual autoPtr<phaseSystem::momentumTransferTable> diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 0a5d8a7060b..67a3918a325 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C @@ -85,6 +85,30 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::dmdt } +template<class BasePhaseSystem> +Foam::tmp<Foam::volScalarField> +Foam::HeatTransferPhaseSystem<BasePhaseSystem>::dmdt +( + const Foam::phaseModel& phase +) const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + IOobject::groupName("dmdt", phase.name()), + this->mesh().time().timeName(), + this->mesh().time() + ), + this->mesh(), + dimensionedScalar("zero", dimDensity/dimTime, 0) + ) + ); +} + + template<class BasePhaseSystem> Foam::autoPtr<Foam::phaseSystem::heatTransferTable> Foam::HeatTransferPhaseSystem<BasePhaseSystem>::heatTransfer() const diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H index 6bb96c90bae..cef3b696bd6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.H @@ -95,6 +95,9 @@ public: const phasePairKey& key ) const; + //- Return the total interfacial mass transfer rate for phase + virtual tmp<volScalarField> dmdt(const phaseModel& phase) const; + //- Return the heat transfer matrices virtual autoPtr<phaseSystem::heatTransferTable> heatTransfer() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index a209933b095..cf7fae6f405 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -182,7 +182,6 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Kd ) ); - // Add the implicit part of the drag force forAllConstIter ( phaseSystem::KdTable, @@ -442,7 +441,6 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const } // Add the implicit part of the drag force - /* ***HGW Currently this is handled in the pEqn forAllConstIter ( phaseSystem::KdTable, @@ -466,7 +464,6 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const Swap(phase, otherPhase); } } - */ // Update the virtual mass coefficients forAllConstIter @@ -499,20 +496,57 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const const volVectorField& U = phase->U(); const surfaceScalarField& phi = phase->phi(); - *eqns[phase->name()] += - - Vm + *eqns[phase->name()] -= + Vm *( fvm::ddt(U) + fvm::div(phi, U) - fvm::Sp(fvc::div(phi), U) - otherPhase->DUDt() ) - - this->MRF_.DDt(Vm, U - otherPhase->U()); + + this->MRF_.DDt(Vm, U - otherPhase->U()); Swap(phase, otherPhase); } } + return eqnsPtr; +} + + +template<class BasePhaseSystem> +Foam::autoPtr<Foam::PtrList<Foam::volVectorField> > +Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Fs() const +{ + autoPtr<PtrList<volVectorField> > tFs + ( + new PtrList<volVectorField>(this->phases().size()) + ); + + PtrList<volVectorField>& Fs = tFs(); + + forAll(Fs, phasei) + { + Fs.set + ( + phasei, + new volVectorField + ( + IOobject + ( + liftModel::typeName + ":F", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedVector("zero", liftModel::dimF, vector::zero) + ) + ); + } + // Add the lift force forAllConstIter ( @@ -525,8 +559,8 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const const phasePair& pair(this->phasePairs_[liftModelIter.key()]); - *eqns[pair.phase1().name()] += F; - *eqns[pair.phase2().name()] -= F; + Fs[pair.phase1().index()] += F; + Fs[pair.phase2().index()] -= F; } // Add the wall lubrication force @@ -542,28 +576,28 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() const const phasePair& pair(this->phasePairs_[wallLubricationModelIter.key()]); - *eqns[pair.phase1().name()] += F; - *eqns[pair.phase2().name()] -= F; + Fs[pair.phase1().index()] += F; + Fs[pair.phase2().index()] -= F; } // Add the turbulent dispersion force - forAllConstIter - ( - turbulentDispersionModelTable, - turbulentDispersionModels_, - turbulentDispersionModelIter - ) - { - const volVectorField F(turbulentDispersionModelIter()->F<vector>()); - - const phasePair& - pair(this->phasePairs_[turbulentDispersionModelIter.key()]); - - *eqns[pair.phase1().name()] += F; - *eqns[pair.phase2().name()] -= F; - } - - return eqnsPtr; + // forAllConstIter + // ( + // turbulentDispersionModelTable, + // turbulentDispersionModels_, + // turbulentDispersionModelIter + // ) + // { + // const volVectorField F(turbulentDispersionModelIter()->F<vector>()); + + // const phasePair& + // pair(this->phasePairs_[turbulentDispersionModelIter.key()]); + + // *eqns[pair.phase1().name()] += F; + // *eqns[pair.phase2().name()] -= F; + // } + + return tFs; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H index b6aeadd34ca..194602dfc9b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H @@ -172,6 +172,9 @@ public: //- Return the combined force (lift + wall-lubrication) virtual tmp<volVectorField> F(const phasePairKey& key) const; + //- Return the combined force (lift + wall-lubrication) + virtual autoPtr<PtrList<volVectorField> > Fs() const; + //- Return the combined face-force (lift + wall-lubrication) virtual tmp<surfaceScalarField> Ff(const phasePairKey& key) const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index 3a2786d75c1..78e015ff3ae 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -32,10 +32,11 @@ template<class BasePhaseModel> Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName), + BasePhaseModel(fluid, phaseName, index), divU_ ( IOobject @@ -134,7 +135,7 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn() template<class BasePhaseModel> bool Foam::AnisothermalPhaseModel<BasePhaseModel>::compressible() const { - return true; + return !this->thermo().incompressible(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H index e7a76bf496e..9d7a92b499d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H @@ -65,7 +65,12 @@ public: // Constructors - AnisothermalPhaseModel(const phaseSystem& fluid, const word& phaseName); + AnisothermalPhaseModel + ( + const phaseSystem& fluid, + const word& phaseName, + const label index + ); //- Destructor diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C index 909a5418b92..ba5e90459bf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C @@ -32,10 +32,11 @@ template<class BasePhaseModel> Foam::InertPhaseModel<BasePhaseModel>::InertPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName) + BasePhaseModel(fluid, phaseName, index) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H index c74088eaa50..77823d44913 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H @@ -56,7 +56,12 @@ public: // Constructors - InertPhaseModel(const phaseSystem& fluid, const word& phaseName); + InertPhaseModel + ( + const phaseSystem& fluid, + const word& phaseName, + const label index + ); //- Destructor diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C index 07f99c5a5d2..19b7b73ebe1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.C @@ -32,10 +32,11 @@ template<class BasePhaseModel> Foam::IsothermalPhaseModel<BasePhaseModel>::IsothermalPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName) + BasePhaseModel(fluid, phaseName, index) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H index d43a1a6119b..bdf1a14aed6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/IsothermalPhaseModel/IsothermalPhaseModel.H @@ -57,7 +57,12 @@ public: // Constructors - IsothermalPhaseModel(const phaseSystem& fluid, const word& phaseName); + IsothermalPhaseModel + ( + const phaseSystem& fluid, + const word& phaseName, + const label index + ); //- Destructor diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 090d29fafe0..d06c61987a6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -123,10 +123,11 @@ template<class BasePhaseModel> Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName), + BasePhaseModel(fluid, phaseName, index), U_ ( IOobject @@ -197,6 +198,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel dimensionedScalar("0", dimDensity/dimTime, 0) ) { + phi_.writeOpt() = IOobject::AUTO_WRITE; correctKinematics(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H index fc719c18ca6..b78762fd533 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H @@ -106,7 +106,8 @@ public: MovingPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index d6e05a51397..efa486a0e47 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -41,10 +41,11 @@ template<class BasePhaseModel> Foam::MultiComponentPhaseModel<BasePhaseModel>::MultiComponentPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName), + BasePhaseModel(fluid, phaseName, index), Sc_ ( "Sc", diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H index 272e520eeb3..94ca80582c4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H @@ -73,7 +73,8 @@ public: MultiComponentPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C index c3e1831158a..be280057446 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.C @@ -32,10 +32,11 @@ template<class BasePhaseModel> Foam::PurePhaseModel<BasePhaseModel>::PurePhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName) + BasePhaseModel(fluid, phaseName, index) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H index f17c60cb6f8..2aa8034ede7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/PurePhaseModel/PurePhaseModel.H @@ -64,7 +64,12 @@ public: // Constructors - PurePhaseModel(const phaseSystem& fluid, const word& phaseName); + PurePhaseModel + ( + const phaseSystem& fluid, + const word& phaseName, + const label index + ); //- Destructor diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C index 0bd35ee16f2..96a76de1698 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C @@ -33,10 +33,11 @@ template<class BasePhaseModel, class ReactionType> Foam::ReactingPhaseModel<BasePhaseModel, ReactionType>::ReactingPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : - BasePhaseModel(fluid, phaseName, false), + BasePhaseModel(fluid, phaseName, index, false), reaction_ ( ReactionType::New(fluid.mesh(), this->name()) diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H index 988674d55c8..305b62590a8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H @@ -67,7 +67,8 @@ public: ReactingPhaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C index 72aef43d2af..2367cda4147 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C @@ -41,10 +41,11 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::ThermoPhaseModel ( const phaseSystem& fluid, const word& phaseName, + const label index, const bool createThermo ) : - BasePhaseModel(fluid, phaseName) + BasePhaseModel(fluid, phaseName, index) { if (createThermo) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H index 923187931ee..960d2c1ba68 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H @@ -76,6 +76,7 @@ public: ( const phaseSystem& fluid, const word& phaseName, + const label index, const bool createThermo = true ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C index f2686cedb5c..0a577313b22 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/newPhaseModel.C @@ -31,7 +31,8 @@ License Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) { word phaseModelType(fluid.subDict(phaseName).lookup("type")); @@ -52,7 +53,7 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New << exit(FatalError); } - return cstrIter()(fluid, phaseName); + return cstrIter()(fluid, phaseName, index); } // ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index b0a54fa5823..08498679447 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -41,7 +41,8 @@ namespace Foam Foam::phaseModel::phaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ) : volScalarField @@ -60,6 +61,7 @@ Foam::phaseModel::phaseModel fluid_(fluid), name_(phaseName), + index_(index), residualAlpha_ ( "residualAlpha", @@ -99,6 +101,12 @@ const Foam::word& Foam::phaseModel::keyword() const } +Foam::label Foam::phaseModel::index() const +{ + return index_; +} + + const Foam::phaseSystem& Foam::phaseModel::fluid() const { return fluid_; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H index d5e50410c53..ae94353aebf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H @@ -67,6 +67,9 @@ class phaseModel //- Name of phase word name_; + //- Index of phase + label index_; + //- Return the residual phase-fraction for given phase // Used to stabilize the phase momentum as the phase-fraction -> 0 dimensionedScalar residualAlpha_; @@ -93,9 +96,10 @@ public: phaseSystem, ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ), - (fluid, phaseName) + (fluid, phaseName, index) ); @@ -104,7 +108,8 @@ public: phaseModel ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ); //- Return clone @@ -116,7 +121,8 @@ public: static autoPtr<phaseModel> New ( const phaseSystem& fluid, - const word& phaseName + const word& phaseName, + const label index ); //- Return a pointer to a new phase created on freestore @@ -124,6 +130,7 @@ public: class iNew { const phaseSystem& fluid_; + mutable label indexCounter_; public: @@ -132,14 +139,16 @@ public: const phaseSystem& fluid ) : - fluid_(fluid) + fluid_(fluid), + indexCounter_(-1) {} autoPtr<phaseModel> operator()(Istream& is) const { + indexCounter_++; return autoPtr<phaseModel> ( - phaseModel::New(fluid_, word(is)) + phaseModel::New(fluid_, word(is), indexCounter_) ); } }; @@ -154,8 +163,12 @@ public: //- Return the name of this phase const word& name() const; + //- Return the name of the phase for use as the keyword in PtrDictionary const word& keyword() const; + //- Return the index of the phase + label index() const; + //- Return the system to which this phase belongs const phaseSystem& fluid() const; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index dee40846b63..31dc2375db0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -162,6 +162,8 @@ Foam::phaseSystem::phaseSystem MRF_(mesh_), fvOptions_(mesh_) { + phi_.writeOpt() = IOobject::AUTO_WRITE; + // Blending methods forAllConstIter(dictionary, subDict("blending"), iter) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean new file mode 100755 index 00000000000..93ee94face2 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +set -x + +wclean libso multiphaseSystem +wclean libso multiphaseCompressibleTurbulenceModels +wclean + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake new file mode 100755 index 00000000000..c60b665df4f --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +set -x + +wmake libso multiphaseSystem +wmake libso multiphaseCompressibleTurbulenceModels +wmake + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/CourantNo.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/CourantNo.H new file mode 100644 index 00000000000..df28acb69fb --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/CourantNo.H @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>. + +Global + CourantNo + +Description + Calculates and outputs the mean and maximum Courant Numbers. + +\*---------------------------------------------------------------------------*/ + +scalar CoNum = 0.0; +scalar meanCoNum = 0.0; + +if (mesh.nInternalFaces()) +{ + scalarField sumPhi + ( + fvc::surfaceSum(mag(phi))().internalField() + ); + + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + sumPhi = max + ( + sumPhi, + fvc::surfaceSum(mag(iter().phi()))().internalField() + ); + } + + CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); + + meanCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); +} + +Info<< "Courant Number mean: " << meanCoNum + << " max: " << CoNum << endl; + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H new file mode 100644 index 00000000000..86150a045de --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H @@ -0,0 +1,47 @@ +{ + fluid.correctEnergyTransport(); + + autoPtr<phaseSystem::heatTransferTable> + heatTransferPtr(fluid.heatTransfer()); + + phaseSystem::heatTransferTable& heatTransfer = heatTransferPtr(); + + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + const volScalarField& rho = phase.rho(); + const volVectorField& U = phase.U(); + + tmp<fvScalarMatrix> EEqn(phase.heEqn()); + + if (EEqn.valid()) + { + EEqn = + ( + EEqn + == + *heatTransfer[phase.name()] + + alpha*rho*(U&g) + + fvOptions(alpha, rho, phase.thermo().he()) + ); + + EEqn->relax(); + fvOptions.constrain(EEqn()); + EEqn->solve(); + } + } +} + +fluid.correctThermo(); + +forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) +{ + phaseModel& phase = iter(); + + Info<< phase.name() << " min/max T " + << min(phase.thermo().T()).value() + << " - " + << max(phase.thermo().T()).value() + << endl; +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/files b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/files new file mode 100644 index 00000000000..0f1d5ae2711 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/files @@ -0,0 +1,3 @@ +reactingMultiphaseEulerFoam.C + +EXE = $(FOAM_APPBIN)/reactingMultiphaseEulerFoam diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options new file mode 100644 index 00000000000..27e4869309a --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Make/options @@ -0,0 +1,25 @@ +EXE_INC = -ggdb3 \ + -ImultiphaseSystem/lnInclude \ + -I../phaseSystems/lnInclude \ + -I../interfacialModels/lnInclude \ + -I../interfacialCompositionModels/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude + +EXE_LIBS = \ + -lreactingPhaseSystem \ + -lreactingMultiphaseSystem \ + -lreactingEulerianInterfacialModels \ + -lreactingEulerianInterfacialCompositionModels \ + -lmultiphaseReactingTurbulenceModels \ + -lfiniteVolume \ + -lfvOptions \ + -lmeshTools \ + -lsampling diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/YEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/YEqns.H new file mode 100644 index 00000000000..7c4345913dc --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/YEqns.H @@ -0,0 +1,36 @@ +{ + autoPtr<phaseSystem::massTransferTable> + massTransferPtr(fluid.massTransfer()); + + phaseSystem::massTransferTable& + massTransfer(massTransferPtr()); + + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + PtrList<volScalarField>& Y = phase.Y(); + const volScalarField& alpha = phase; + const volScalarField& rho = phase.rho(); + + forAll(Y, i) + { + tmp<fvScalarMatrix> YiEqn(phase.YiEqn(Y[i])); + + if (YiEqn.valid()) + { + YiEqn = + ( + YiEqn + == + *massTransfer[Y[i].name()] + + fvOptions(alpha, rho, Y[i]) + ); + + YiEqn->relax(); + YiEqn->solve(mesh.solver("Yi")); + } + } + } + + fluid.massTransfer(); // updates interfacial mass flow rates +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/createFields.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/createFields.H new file mode 100644 index 00000000000..7f89ea5f450 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/createFields.H @@ -0,0 +1,52 @@ +#include "readGravitationalAcceleration.H" +#include "readhRef.H" + +Info<< "Creating phaseSystem\n" << endl; + +autoPtr<multiphaseSystem> fluidPtr +( + multiphaseSystem::New(mesh) +); +multiphaseSystem& fluid = fluidPtr(); + +surfaceScalarField& phi = fluid.phi(); + +dimensionedScalar pMin +( + "pMin", + dimPressure, + fluid +); + +#include "gh.H" + +volScalarField& p = fluid.phases().first().thermo().p(); + +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +label pRefCell = 0; +scalar pRefValue = 0.0; +setRefCell +( + p, + p_rgh, + pimple.dict(), + pRefCell, + pRefValue +); +mesh.setFluxRequired(p_rgh.name()); + +const IOMRFZoneList& MRF = fluid.MRF(); +fv::IOoptionList& fvOptions = fluid.fvOptions(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/log b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/log new file mode 100644 index 00000000000..6a64f4e14f5 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/log @@ -0,0 +1,6 @@ +/home/dm2/henry/OpenFOAM/OpenFOAM-dev/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam +Making dependency list for source file reactingMultiphaseEulerFoam.C +clang++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-c++11-extensions -O3 -DNoRepository -ftemplate-depth-100 -ImultiphaseSystem/lnInclude -I../phaseSystems/lnInclude -I../interfacialModels/lnInclude -I../interfacialCompositionModels/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/basic/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/transportModels/compressible/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/compressible/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/phaseCompressible/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/finiteVolume/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/fvOptions/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/meshTools/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/sampling/lnInclude -IlnInclude -I. -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/OSspecific/POSIX/lnInclude -fPIC -c reactingMultiphaseEulerFoam.C -o /home/dm2/henry/OpenFOAM/OpenFOAM-dev/platforms/linux64ClangDPInt32Opt/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.o +clang++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-c++11-extensions -O3 -DNoRepository -ftemplate-depth-100 -ImultiphaseSystem/lnInclude -I../phaseSystems/lnInclude -I../interfacialModels/lnInclude -I../interfacialCompositionModels/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/thermophysicalModels/basic/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/transportModels/compressible/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/compressible/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/TurbulenceModels/phaseCompressible/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/finiteVolume/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/fvOptions/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/meshTools/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/sampling/lnInclude -IlnInclude -I. -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude -I/home/dm2/henry/OpenFOAM/OpenFOAM-dev/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed /home/dm2/henry/OpenFOAM/OpenFOAM-dev/platforms/linux64ClangDPInt32Opt/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.o -L/home/dm2/henry/OpenFOAM/OpenFOAM-dev/platforms/linux64ClangDPInt32Opt/lib \ + -lreactingPhaseSystem -lreactingMultiphaseSystem -lreactingEulerianInterfacialModels -lreactingEulerianInterfacialCompositionModels -lmultiphaseReactingTurbulenceModels -lfiniteVolume -lfvOptions -lmeshTools -lsampling -lOpenFOAM -ldl \ + -lm -o /home/dm2/henry/OpenFOAM/OpenFOAM-dev/platforms/linux64ClangDPInt32Opt/bin/reactingMultiphaseEulerFoam diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/files b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/files new file mode 100644 index 00000000000..dd421b52a3d --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/files @@ -0,0 +1,3 @@ +multiphaseCompressibleTurbulenceModels.C + +LIB = $(FOAM_LIBBIN)/libmultiphaseReactingTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options new file mode 100644 index 00000000000..553f60638c2 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options @@ -0,0 +1,13 @@ +EXE_INC = \ + -I../multiphaseSystem/lnInclude \ + -I../../phaseSystems/lnInclude \ + -I../../interfacialModels/lnInclude\ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/transportModels/incompressible/transportModel \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/multiphaseCompressibleTurbulenceModels.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/multiphaseCompressibleTurbulenceModels.C new file mode 100644 index 00000000000..de792b433a7 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/multiphaseCompressibleTurbulenceModels.C @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014-2015 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "PhaseCompressibleTurbulenceModel.H" +#include "phaseModel.H" +#include "multiphaseSystem.H" +#include "addToRunTimeSelectionTable.H" +#include "makeTurbulenceModel.H" + +#include "ThermalDiffusivity.H" +#include "EddyDiffusivity.H" + +#include "laminar.H" +#include "RASModel.H" +#include "LESModel.H" + +makeBaseTurbulenceModel +( + volScalarField, + volScalarField, + compressibleTurbulenceModel, + PhaseCompressibleTurbulenceModel, + ThermalDiffusivity, + phaseModel +); + +#define makeRASModel(Type) \ + makeTemplatedTurbulenceModel \ + (phaseModelPhaseCompressibleTurbulenceModel, RAS, Type) + +#define makeLESModel(Type) \ + makeTemplatedTurbulenceModel \ + (phaseModelPhaseCompressibleTurbulenceModel, LES, Type) + +#include "kEpsilon.H" +makeRASModel(kEpsilon); + +#include "kOmegaSST.H" +makeRASModel(kOmegaSST); + +#include "Smagorinsky.H" +makeLESModel(Smagorinsky); + +#include "kEqn.H" +makeLESModel(kEqn); + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/files b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/files new file mode 100644 index 00000000000..f1728bb33dc --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/files @@ -0,0 +1,6 @@ +alphaContactAngle/alphaContactAngleFvPatchScalarField.C +multiphaseSystem.C +newMultiphaseSystem.C +multiphaseSystems.C + +LIB = $(FOAM_LIBBIN)/libreactingMultiphaseSystem diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/options new file mode 100644 index 00000000000..f4de6a6d849 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/Make/options @@ -0,0 +1,21 @@ +EXE_INC = -ggdb3 \ + -I../../interfacialModels/lnInclude \ + -I../../interfacialCompositionModels/lnInclude \ + -I../../phaseSystems/lnInclude \ + -IalphaContactAngle \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \ + -I$(LIB_SRC)/combustionModels/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude + +LIB_LIBS = \ + -lcombustionModels \ + -lreactingPhaseSystem diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C new file mode 100644 index 00000000000..b26ec2faa08 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "alphaContactAngleFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" +#include "fvPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps +( + Istream& is +) +: + theta0_(readScalar(is)), + uTheta_(readScalar(is)), + thetaA_(readScalar(is)), + thetaR_(readScalar(is)) +{} + + +Istream& operator>> +( + Istream& is, + alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp +) +{ + is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_; + return is; +} + + +Ostream& operator<< +( + Ostream& os, + const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp +) +{ + os << tp.theta0_ << token::SPACE + << tp.uTheta_ << token::SPACE + << tp.thetaA_ << token::SPACE + << tp.thetaR_; + + return os; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF +) +: + zeroGradientFvPatchScalarField(p, iF) +{} + + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const alphaContactAngleFvPatchScalarField& gcpsf, + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF, + const fvPatchFieldMapper& mapper +) +: + zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper), + thetaProps_(gcpsf.thetaProps_) +{} + + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF, + const dictionary& dict +) +: + zeroGradientFvPatchScalarField(p, iF), + thetaProps_(dict.lookup("thetaProperties")) +{ + evaluate(); +} + + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const alphaContactAngleFvPatchScalarField& gcpsf, + const DimensionedField<scalar, volMesh>& iF +) +: + zeroGradientFvPatchScalarField(gcpsf, iF), + thetaProps_(gcpsf.thetaProps_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void alphaContactAngleFvPatchScalarField::write(Ostream& os) const +{ + fvPatchScalarField::write(os); + os.writeKeyword("thetaProperties") + << thetaProps_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + alphaContactAngleFvPatchScalarField +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H new file mode 100644 index 00000000000..17fced8dfa6 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -0,0 +1,215 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>. + +Class + Foam::alphaContactAngleFvPatchScalarField + +Description + Contact-angle boundary condition for multi-phase interface-capturing + simulations. Used in conjuction with multiphaseSystem. + +SourceFiles + alphaContactAngleFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef alphaContactAngleFvPatchScalarField_H +#define alphaContactAngleFvPatchScalarField_H + +#include "zeroGradientFvPatchFields.H" +#include "multiphaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class alphaContactAngleFvPatch Declaration +\*---------------------------------------------------------------------------*/ + +class alphaContactAngleFvPatchScalarField +: + public zeroGradientFvPatchScalarField +{ +public: + + class interfaceThetaProps + { + //- Equilibrium contact angle + scalar theta0_; + + //- Dynamic contact angle velocity scale + scalar uTheta_; + + //- Limiting advancing contact angle + scalar thetaA_; + + //- Limiting receeding contact angle + scalar thetaR_; + + + public: + + // Constructors + interfaceThetaProps() + {} + + interfaceThetaProps(Istream&); + + + // Member functions + + //- Return the equilibrium contact angle theta0 + scalar theta0(bool matched=true) const + { + if (matched) return theta0_; + else return 180.0 - theta0_; + } + + //- Return the dynamic contact angle velocity scale + scalar uTheta() const + { + return uTheta_; + } + + //- Return the limiting advancing contact angle + scalar thetaA(bool matched=true) const + { + if (matched) return thetaA_; + else return 180.0 - thetaA_; + } + + //- Return the limiting receeding contact angle + scalar thetaR(bool matched=true) const + { + if (matched) return thetaR_; + else return 180.0 - thetaR_; + } + + + // IO functions + + friend Istream& operator>>(Istream&, interfaceThetaProps&); + friend Ostream& operator<<(Ostream&, const interfaceThetaProps&); + }; + + typedef HashTable + < + interfaceThetaProps, + phasePairKey, + phasePairKey::hash + > thetaPropsTable; + + +private: + + // Private data + + thetaPropsTable thetaProps_; + + +public: + + //- Runtime type information + TypeName("alphaContactAngle"); + + + // Constructors + + //- Construct from patch and internal field + alphaContactAngleFvPatchScalarField + ( + const fvPatch&, + const DimensionedField<scalar, volMesh>& + ); + + //- Construct from patch, internal field and dictionary + alphaContactAngleFvPatchScalarField + ( + const fvPatch&, + const DimensionedField<scalar, volMesh>&, + const dictionary& + ); + + //- Construct by mapping given alphaContactAngleFvPatchScalarField + // onto a new patch + alphaContactAngleFvPatchScalarField + ( + const alphaContactAngleFvPatchScalarField&, + const fvPatch&, + const DimensionedField<scalar, volMesh>&, + const fvPatchFieldMapper& + ); + + //- Construct and return a clone + virtual tmp<fvPatchScalarField> clone() const + { + return tmp<fvPatchScalarField> + ( + new alphaContactAngleFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + alphaContactAngleFvPatchScalarField + ( + const alphaContactAngleFvPatchScalarField&, + const DimensionedField<scalar, volMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<fvPatchScalarField> clone + ( + const DimensionedField<scalar, volMesh>& iF + ) const + { + return tmp<fvPatchScalarField> + ( + new alphaContactAngleFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + //- Return the contact angle properties + const thetaPropsTable& thetaProps() const + { + return thetaProps_; + } + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C new file mode 100644 index 00000000000..276dd4e0262 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -0,0 +1,713 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013-2015 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "multiphaseSystem.H" +#include "alphaContactAngleFvPatchScalarField.H" + +#include "MULES.H" +#include "subCycle.H" + +#include "fvcDdt.H" +#include "fvcDiv.H" +#include "fvcSnGrad.H" +#include "fvcFlux.H" +#include "fvcMeshPhi.H" +#include "fvcSup.H" + +#include "fvmDdt.H" +#include "fvmLaplacian.H" +#include "fvmSup.H" + +// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(multiphaseSystem, 0); + defineRunTimeSelectionTable(multiphaseSystem, dictionary); +} + +const Foam::scalar Foam::multiphaseSystem::convertToRad = + Foam::constant::mathematical::pi/180.0; + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::multiphaseSystem::calcAlphas() +{ + scalar level = 0.0; + alphas_ == 0.0; + + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + alphas_ += level*iter(); + level += 1.0; + } + + alphas_.correctBoundaryConditions(); +} + + +void Foam::multiphaseSystem::solveAlphas() +{ + PtrList<surfaceScalarField> alphaPhiCorrs(phases().size()); + int phasei = 0; + + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + phaseModel& phase = iter(); + volScalarField& alpha1 = phase; + + phase.alphaPhi() = + dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0); + + alphaPhiCorrs.set + ( + phasei, + new surfaceScalarField + ( + "phi" + alpha1.name() + "Corr", + fvc::flux + ( + phi_, + phase, + "div(phi," + alpha1.name() + ')' + ) + ) + ); + + surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei]; + + forAllIter(PtrDictionary<phaseModel>, phases(), iter2) + { + phaseModel& phase2 = iter2(); + volScalarField& alpha2 = phase2; + + if (&phase2 == &phase) continue; + + surfaceScalarField phir(phase.phi() - phase2.phi()); + + cAlphaTable::const_iterator cAlpha + ( + cAlphas_.find(phasePairKey(phase.name(), phase2.name())) + ); + + if (cAlpha != cAlphas_.end()) + { + surfaceScalarField phic + ( + (mag(phi_) + mag(phir))/mesh_.magSf() + ); + + phir += min(cAlpha()*phic, max(phic))*nHatf(phase, phase2); + } + + word phirScheme + ( + "div(phir," + alpha2.name() + ',' + alpha1.name() + ')' + ); + + alphaPhiCorr += fvc::flux + ( + -fvc::flux(-phir, phase2, phirScheme), + phase, + phirScheme + ); + } + + // Ensure that the flux at inflow BCs is preserved + forAll(alphaPhiCorr.boundaryField(), patchi) + { + fvsPatchScalarField& alphaPhiCorrp = + alphaPhiCorr.boundaryField()[patchi]; + + if (!alphaPhiCorrp.coupled()) + { + const scalarField& phi1p = phase.phi().boundaryField()[patchi]; + const scalarField& alpha1p = alpha1.boundaryField()[patchi]; + + forAll(alphaPhiCorrp, facei) + { + if (phi1p[facei] < 0) + { + alphaPhiCorrp[facei] = alpha1p[facei]*phi1p[facei]; + } + } + } + } + + MULES::limit + ( + 1.0/mesh_.time().deltaT().value(), + geometricOneField(), + phase, + phi_, + alphaPhiCorr, + zeroField(), + zeroField(), + phase.alphaMax(), + 0, + true + ); + + phasei++; + } + + MULES::limitSum(alphaPhiCorrs); + + volScalarField sumAlpha + ( + IOobject + ( + "sumAlpha", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("sumAlpha", dimless, 0) + ); + + + volScalarField divU(fvc::div(fvc::absolute(phi_, phases().first().U()))); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + phaseModel& phase = iter(); + volScalarField& alpha = phase; + + surfaceScalarField& alphaPhic = alphaPhiCorrs[phasei]; + alphaPhic += upwind<scalar>(mesh_, phi_).flux(phase); + + volScalarField::DimensionedInternalField Sp + ( + IOobject + ( + "Sp", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("Sp", phase.divU().dimensions(), 0.0) + ); + + volScalarField::DimensionedInternalField Su + ( + IOobject + ( + "Su", + mesh_.time().timeName(), + mesh_ + ), + // Divergence term is handled explicitly to be + // consistent with the explicit transport solution + divU*min(alpha, scalar(1)) + ); + + if (phase.compressible()) + { + const scalarField& dgdt = phase.divU(); + + forAll(dgdt, celli) + { + if (dgdt[celli] > 0.0) + { + Sp[celli] -= dgdt[celli]; + Su[celli] += dgdt[celli]; + } + else if (dgdt[celli] < 0.0) + { + Sp[celli] += + dgdt[celli] + *(1.0 - alpha[celli])/max(alpha[celli], 1e-4); + } + } + } + + forAllConstIter(PtrDictionary<phaseModel>, phases(), iter2) + { + const phaseModel& phase2 = iter2(); + const volScalarField& alpha2 = phase2; + + if (&phase2 == &phase) continue; + + if (phase2.compressible()) + { + const scalarField& dgdt2 = phase2.divU(); + + forAll(dgdt2, celli) + { + if (dgdt2[celli] < 0.0) + { + Sp[celli] += + dgdt2[celli] + *(1.0 - alpha2[celli])/max(alpha2[celli], 1e-4); + + Su[celli] -= + dgdt2[celli] + *alpha[celli]/max(alpha2[celli], 1e-4); + } + else if (dgdt2[celli] > 0.0) + { + Sp[celli] -= dgdt2[celli]; + } + } + } + } + + MULES::explicitSolve + ( + geometricOneField(), + alpha, + alphaPhic, + Sp, + Su + ); + + phase.alphaPhi() += alphaPhic; + + Info<< phase.name() << " volume fraction, min, max = " + << phase.weightedAverage(mesh_.V()).value() + << ' ' << min(phase).value() + << ' ' << max(phase).value() + << endl; + + sumAlpha += phase; + + phasei++; + } + + Info<< "Phase-sum volume fraction, min, max = " + << sumAlpha.weightedAverage(mesh_.V()).value() + << ' ' << min(sumAlpha).value() + << ' ' << max(sumAlpha).value() + << endl; +} + + +Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseSystem::nHatfv +( + const volScalarField& alpha1, + const volScalarField& alpha2 +) const +{ + /* + // Cell gradient of alpha + volVectorField gradAlpha = + alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2); + + // Interpolated face-gradient of alpha + surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha); + */ + + surfaceVectorField gradAlphaf + ( + fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1)) + - fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2)) + ); + + // Face unit interface normal + return gradAlphaf/(mag(gradAlphaf) + deltaN_); +} + + +Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::nHatf +( + const volScalarField& alpha1, + const volScalarField& alpha2 +) const +{ + // Face unit interface normal flux + return nHatfv(alpha1, alpha2) & mesh_.Sf(); +} + + +// Correction for the boundary condition on the unit normal nHat on +// walls to produce the correct contact angle. + +// The dynamic contact angle is calculated from the component of the +// velocity on the direction of the interface, parallel to the wall. + +void Foam::multiphaseSystem::correctContactAngle +( + const phaseModel& phase1, + const phaseModel& phase2, + surfaceVectorField::GeometricBoundaryField& nHatb +) const +{ + const volScalarField::GeometricBoundaryField& gbf + = phase1.boundaryField(); + + const fvBoundaryMesh& boundary = mesh_.boundary(); + + forAll(boundary, patchi) + { + if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi])) + { + const alphaContactAngleFvPatchScalarField& acap = + refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]); + + vectorField& nHatPatch = nHatb[patchi]; + + vectorField AfHatPatch + ( + mesh_.Sf().boundaryField()[patchi] + /mesh_.magSf().boundaryField()[patchi] + ); + + alphaContactAngleFvPatchScalarField::thetaPropsTable:: + const_iterator tp = + acap.thetaProps() + .find(phasePairKey(phase1.name(), phase2.name())); + + if (tp == acap.thetaProps().end()) + { + FatalErrorIn + ( + "multiphaseSystem::correctContactAngle" + "(const phaseModel& phase1, const phaseModel& phase2, " + "fvPatchVectorFieldField& nHatb) const" + ) << "Cannot find interface " + << phasePairKey(phase1.name(), phase2.name()) + << "\n in table of theta properties for patch " + << acap.patch().name() + << exit(FatalError); + } + + bool matched = (tp.key().first() == phase1.name()); + + scalar theta0 = convertToRad*tp().theta0(matched); + scalarField theta(boundary[patchi].size(), theta0); + + scalar uTheta = tp().uTheta(); + + // Calculate the dynamic contact angle if required + if (uTheta > SMALL) + { + scalar thetaA = convertToRad*tp().thetaA(matched); + scalar thetaR = convertToRad*tp().thetaR(matched); + + // Calculated the component of the velocity parallel to the wall + vectorField Uwall + ( + phase1.U()().boundaryField()[patchi].patchInternalField() + - phase1.U()().boundaryField()[patchi] + ); + Uwall -= (AfHatPatch & Uwall)*AfHatPatch; + + // Find the direction of the interface parallel to the wall + vectorField nWall + ( + nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch + ); + + // Normalise nWall + nWall /= (mag(nWall) + SMALL); + + // Calculate Uwall resolved normal to the interface parallel to + // the interface + scalarField uwall(nWall & Uwall); + + theta += (thetaA - thetaR)*tanh(uwall/uTheta); + } + + + // Reset nHatPatch to correspond to the contact angle + + scalarField a12(nHatPatch & AfHatPatch); + + scalarField b1(cos(theta)); + + scalarField b2(nHatPatch.size()); + + forAll(b2, facei) + { + b2[facei] = cos(acos(a12[facei]) - theta[facei]); + } + + scalarField det(1.0 - a12*a12); + + scalarField a((b1 - a12*b2)/det); + scalarField b((b2 - a12*b1)/det); + + nHatPatch = a*AfHatPatch + b*nHatPatch; + + nHatPatch /= (mag(nHatPatch) + deltaN_.value()); + } + } +} + + +Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::K +( + const phaseModel& phase1, + const phaseModel& phase2 +) const +{ + tmp<surfaceVectorField> tnHatfv = nHatfv(phase1, phase2); + + correctContactAngle(phase1, phase2, tnHatfv().boundaryField()); + + // Simple expression for curvature + return -fvc::div(tnHatfv & mesh_.Sf()); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::multiphaseSystem::multiphaseSystem +( + const fvMesh& mesh +) +: + phaseSystem(mesh), + + alphas_ + ( + IOobject + ( + "alphas", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("alphas", dimless, 0.0), + zeroGradientFvPatchScalarField::typeName + ), + + cAlphas_(lookup("interfaceCompression")), + + deltaN_ + ( + "deltaN", + 1e-8/pow(average(mesh.V()), 1.0/3.0) + ) +{ + forAllIter(phaseSystem::phaseModelTable, phases(), iter) + { + volScalarField& alphai = iter(); + mesh.setFluxRequired(alphai.name()); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::multiphaseSystem::~multiphaseSystem() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension +( + const phaseModel& phase1 +) const +{ + tmp<surfaceScalarField> tSurfaceTension + ( + new surfaceScalarField + ( + IOobject + ( + "surfaceTension", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar + ( + "surfaceTension", + dimensionSet(1, -2, -2, 0, 0), + 0 + ) + ) + ); + + forAllConstIter(PtrDictionary<phaseModel>, phases(), iter) + { + const phaseModel& phase2 = iter(); + + if (&phase2 != &phase1) + { + phasePairKey key12(phase1.name(), phase2.name()); + + cAlphaTable::const_iterator cAlpha(cAlphas_.find(key12)); + + if (cAlpha != cAlphas_.end()) + { + tSurfaceTension() += + fvc::interpolate(sigma(key12)*K(phase1, phase2)) + *( + fvc::interpolate(phase2)*fvc::snGrad(phase1) + - fvc::interpolate(phase1)*fvc::snGrad(phase2) + ); + } + } + } + + return tSurfaceTension; +} + + +Foam::tmp<Foam::volScalarField> +Foam::multiphaseSystem::nearInterface() const +{ + tmp<volScalarField> tnearInt + ( + new volScalarField + ( + IOobject + ( + "nearInterface", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("nearInterface", dimless, 0.0) + ) + ); + + forAllConstIter(PtrDictionary<phaseModel>, phases(), iter) + { + tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); + } + + return tnearInt; +} + + +void Foam::multiphaseSystem::solve() +{ + const fvMesh& mesh = this->mesh(); + const Time& runTime = mesh.time(); + + const dictionary& alphaControls = mesh_.solverDict("alpha"); + label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles"))); + + bool LTS = fv::localEulerDdt::enabled(mesh); + + if (nAlphaSubCycles > 1) + { + tmp<volScalarField> trSubDeltaT; + + if (LTS) + { + trSubDeltaT = + fv::localEulerDdt::localRSubDeltaT(mesh, nAlphaSubCycles); + } + + dimensionedScalar totalDeltaT = runTime.deltaT(); + + PtrList<volScalarField> alpha0s(phases().size()); + PtrList<surfaceScalarField> phiSums(phases().size()); + + int phasei = 0; + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + phaseModel& phase = iter(); + volScalarField& alpha = phase; + + alpha0s.set + ( + phasei, + new volScalarField(alpha.oldTime()) + ); + + phiSums.set + ( + phasei, + new surfaceScalarField + ( + IOobject + ( + "phiSum" + alpha.name(), + runTime.timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + ) + ); + + phasei++; + } + + for + ( + subCycleTime alphaSubCycle + ( + const_cast<Time&>(runTime), + nAlphaSubCycles + ); + !(++alphaSubCycle).end(); + ) + { + solveAlphas(); + + int phasei = 0; + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + phiSums[phasei] += iter().phi(); + phasei++; + } + } + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + phaseModel& phase = iter(); + volScalarField& alpha = phase; + + phase.phi() = phiSums[phasei]/nAlphaSubCycles; + + // Correct the time index of the field + // to correspond to the global time + alpha.timeIndex() = runTime.timeIndex(); + + // Reset the old-time field value + alpha.oldTime() = alpha0s[phasei]; + alpha.oldTime().timeIndex() = runTime.timeIndex(); + + phasei++; + } + } + else + { + solveAlphas(); + } + + forAllIter(PtrDictionary<phaseModel>, phases(), iter) + { + phaseModel& phase = iter(); + phase.alphaRhoPhi() = fvc::interpolate(phase.rho())*phase.alphaPhi(); + } + + calcAlphas(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H new file mode 100644 index 00000000000..9b7e3da3c14 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H @@ -0,0 +1,207 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013-2015 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 <http://www.gnu.org/licenses/>. + +Class + Foam::multiphaseSystem + +Description + Class which solves the volume fraction equations for two phases. + +SourceFiles + multiphaseSystem.C + +\*---------------------------------------------------------------------------*/ + +#ifndef multiphaseSystem_H +#define multiphaseSystem_H + +#include "phaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class dragModel; +class virtualMassModel; + +/*---------------------------------------------------------------------------*\ + Class multiphaseSystem Declaration +\*---------------------------------------------------------------------------*/ + +class multiphaseSystem +: + public phaseSystem +{ + // Private data + + volScalarField alphas_; + + typedef HashTable<scalar, phasePairKey, phasePairKey::hash> + cAlphaTable; + + cAlphaTable cAlphas_; + + //- Stabilisation for normalisation of the interface normal + const dimensionedScalar deltaN_; + + //- Conversion factor for degrees into radians + static const scalar convertToRad; + + + // Private member functions + + void calcAlphas(); + + void solveAlphas(); + + tmp<surfaceVectorField> nHatfv + ( + const volScalarField& alpha1, + const volScalarField& alpha2 + ) const; + + tmp<surfaceScalarField> nHatf + ( + const volScalarField& alpha1, + const volScalarField& alpha2 + ) const; + + void correctContactAngle + ( + const phaseModel& alpha1, + const phaseModel& alpha2, + surfaceVectorField::GeometricBoundaryField& nHatb + ) const; + + tmp<volScalarField> K + ( + const phaseModel& alpha1, + const phaseModel& alpha2 + ) const; + + + //- Return the drag coefficient for phase pair + virtual tmp<volScalarField> Kd(const phasePairKey& key) const = 0; + + //- Return the face drag coefficient for phase pair + virtual tmp<surfaceScalarField> Kdf(const phasePairKey& key) const = 0; + + //- Return the virtual mass coefficient for phase pair + virtual tmp<volScalarField> Vm(const phasePairKey& key) const = 0; + + //- Return the face virtual mass coefficient for phase pair + virtual tmp<surfaceScalarField> Vmf(const phasePairKey& key) const = 0; + + //- Return the turbulent diffusivity for phase pair + // Multiplies the phase-fraction gradient + virtual tmp<volScalarField> D(const phasePairKey& key) const = 0; + + //- Return the interfacial mass flow rate for phase pair + virtual tmp<volScalarField> dmdt(const phasePairKey& key) const = 0; + + +public: + + //- Runtime type information + TypeName("multiphaseSystem"); + + // Declare runtime construction + + declareRunTimeSelectionTable + ( + autoPtr, + multiphaseSystem, + dictionary, + ( + const fvMesh& mesh + ), + (mesh) + ); + + + // Constructors + + //- Construct from fvMesh + multiphaseSystem(const fvMesh&); + + + //- Destructor + virtual ~multiphaseSystem(); + + + // Selectors + + static autoPtr<multiphaseSystem> New + ( + const fvMesh& mesh + ); + + + // Member Functions + + //- Return the drag coefficient for all phase-pairs + virtual const phaseSystem::KdTable& Kds() const = 0; + + //- Return the drag coefficient for phase + virtual tmp<volScalarField> Kd(const phaseModel& phase) const = 0; + + //- Return the combined force (lift + wall-lubrication) for phase pair + virtual autoPtr<PtrList<Foam::volVectorField> > Fs() const = 0; + + //- Return the total interfacial mass transfer rate for phase + virtual tmp<volScalarField> dmdt(const phaseModel& phase) const = 0; + + //- Return the momentum transfer matrices + virtual autoPtr<momentumTransferTable> momentumTransfer() const = 0; + + //- Return the heat transfer matrices + virtual autoPtr<heatTransferTable> heatTransfer() const = 0; + + //- Return the mass transfer matrices + virtual autoPtr<massTransferTable> massTransfer() const = 0; + + tmp<surfaceScalarField> surfaceTension(const phaseModel& phase) const; + + //- Indicator of the proximity of the interface + // Field values are 1 near and 0 away for the interface. + tmp<volScalarField> nearInterface() const; + + //- Solve for the phase fractions + virtual void solve(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "multiphaseSystemI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystemI.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystemI.H new file mode 100644 index 00000000000..b4ea3674517 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystemI.H @@ -0,0 +1,28 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014-2015 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C new file mode 100644 index 00000000000..3e1a3eaf9f3 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystems.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "addToRunTimeSelectionTable.H" + +#include "phaseSystem.H" +#include "multiphaseSystem.H" +#include "MomentumTransferPhaseSystem.H" +#include "HeatTransferPhaseSystem.H" +#include "InterfaceCompositionPhaseChangePhaseSystem.H" +#include "ThermalPhaseChangePhaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef + HeatTransferPhaseSystem + < + MomentumTransferPhaseSystem<multiphaseSystem> + > + heatAndMomentumTransferMultiphaseSystem; + + addNamedToRunTimeSelectionTable + ( + multiphaseSystem, + heatAndMomentumTransferMultiphaseSystem, + dictionary, + heatAndMomentumTransferMultiphaseSystem + ); + + typedef + InterfaceCompositionPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem<multiphaseSystem> + > + interfaceCompositionPhaseChangeMultiphaseSystem; + + addNamedToRunTimeSelectionTable + ( + multiphaseSystem, + interfaceCompositionPhaseChangeMultiphaseSystem, + dictionary, + interfaceCompositionPhaseChangeMultiphaseSystem + ); + + typedef + ThermalPhaseChangePhaseSystem + < + MomentumTransferPhaseSystem<multiphaseSystem> + > + thermalPhaseChangeMultiphaseSystem; + + addNamedToRunTimeSelectionTable + ( + multiphaseSystem, + thermalPhaseChangeMultiphaseSystem, + dictionary, + thermalPhaseChangeMultiphaseSystem + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C new file mode 100644 index 00000000000..79e3546c491 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/newMultiphaseSystem.C @@ -0,0 +1,70 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2015 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "multiphaseSystem.H" + +// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New +( + const fvMesh& mesh +) +{ + const word multiphaseSystemType + ( + IOdictionary + ( + IOobject + ( + propertiesName, + mesh.time().constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false + ) + ).lookup("type") + ); + + Info<< "Selecting multiphaseSystem " + << multiphaseSystemType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(multiphaseSystemType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn("multiphaseSystem::New") + << "Unknown multiphaseSystemType type " + << multiphaseSystemType << endl << endl + << "Valid multiphaseSystem types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(mesh); +} + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/UEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/UEqns.H new file mode 100644 index 00000000000..07a5c881947 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/UEqns.H @@ -0,0 +1,37 @@ +Info<< "Constructing momentum equations" << endl; + +PtrList<fvVectorMatrix> UEqns(fluid.phases().size()); + +{ + autoPtr<phaseSystem::momentumTransferTable> + momentumTransferPtr(fluid.momentumTransfer()); + + phaseSystem::momentumTransferTable& + momentumTransfer(momentumTransferPtr()); + + int phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + const volScalarField& rho = phase.rho(); + volVectorField& U = phase.U(); + + UEqns.set + ( + phasei, + new fvVectorMatrix + ( + phase.UEqn() + == + *momentumTransfer[phase.name()] + + fvOptions(alpha, rho, U) + ) + ); + + UEqns[phasei].relax(); + fvOptions.constrain(UEqns[phasei]); + + phasei++; + } +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H new file mode 100644 index 00000000000..442676d1b94 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H @@ -0,0 +1,447 @@ +PtrList<surfaceScalarField> alphafs(fluid.phases().size()); +PtrList<volScalarField> rAUs(fluid.phases().size()); +PtrList<surfaceScalarField> alpharAUfs(fluid.phases().size()); + +int phasei = 0; +forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) +{ + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + alphafs.set(phasei, fvc::interpolate(alpha).ptr()); + alphafs[phasei].rename("pEqn" + alphafs[phasei].name()); + + rAUs.set + ( + phasei, + new volScalarField + ( + IOobject::groupName("rAU", phase.name()), + 1.0 + /( + UEqns[phasei].A() + + max(phase.residualAlpha() - alpha, scalar(0)) + *phase.rho()/runTime.deltaT() + ) + ) + ); + + alpharAUfs.set + ( + phasei, + ( + fvc::interpolate(max(alpha, phase.residualAlpha())*rAUs[phasei]) + ).ptr() + ); + + phasei++; +} + +// Turbulent diffusion, particle-pressure, lift and wall-lubrication fluxes +PtrList<surfaceScalarField> phiFs(fluid.phases().size()); +{ + autoPtr<PtrList<volVectorField> > Fs = fluid.Fs(); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phiFs.set + ( + phasei, + new surfaceScalarField + ( + IOobject::groupName("phiF", phase.name()), + (fvc::interpolate(rAUs[phasei]*Fs()[phasei]) & mesh.Sf()) + ) + ); + + phasei++; + } +} + +// --- Pressure corrector loop +while (pimple.correct()) +{ + // Update continuity errors due to temperature changes + fluid.correct(); + + PtrList<volVectorField> HbyAs(fluid.phases().size()); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + // Correct fixed-flux BCs to be consistent with the velocity BCs + MRF.correctBoundaryFlux(phase.U(), phase.phi()); + + HbyAs.set + ( + phasei, + new volVectorField + ( + IOobject::groupName("HbyA", phase.name()), + phase.U() + ) + ); + + HbyAs[phasei] = + rAUs[phasei] + *( + UEqns[phasei].H() + + max(phase.residualAlpha() - alpha, scalar(0)) + *phase.rho()*phase.U().oldTime()/runTime.deltaT() + ); + + phasei++; + } + + // Mean density for buoyancy force and p_rgh -> p + volScalarField rho("rho", fluid.rho()); + + surfaceScalarField ghSnGradRho + ( + "ghSnGradRho", + ghf*fvc::snGrad(rho)*mesh.magSf() + ); + + PtrList<surfaceScalarField> phigs(fluid.phases().size()); + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phigs.set + ( + phasei, + ( + alpharAUfs[phasei] + *( + ghSnGradRho + - (fvc::interpolate(phase.rho() - rho))*(g & mesh.Sf()) + - fluid.surfaceTension(phase)*mesh.magSf() + ) + ).ptr() + ); + + phasei++; + } + + PtrList<surfaceScalarField> phiHbyAs(fluid.phases().size()); + + surfaceScalarField phiHbyA + ( + IOobject + ( + "phiHbyA", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0) + ); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + // ddtPhiCorr filter -- only apply in pure(ish) phases + surfaceScalarField alphafBar + ( + fvc::interpolate(fvc::average(alphafs[phasei])) + ); + surfaceScalarField phiCorrCoeff(pos(alphafBar - 0.99)); + + forAll(mesh.boundary(), patchi) + { + // Set ddtPhiCorr to 0 on non-coupled boundaries + if + ( + !mesh.boundary()[patchi].coupled() + || isA<cyclicAMIFvPatch>(mesh.boundary()[patchi]) + ) + { + phiCorrCoeff.boundaryField()[patchi] = 0; + } + } + + phiHbyAs.set + ( + phasei, + new surfaceScalarField + ( + IOobject::groupName("phiHbyA", phase.name()), + (fvc::interpolate(HbyAs[phasei]) & mesh.Sf()) + + phiCorrCoeff + *fvc::interpolate + ( + alpha.oldTime()*phase.rho()().oldTime()*rAUs[phasei] + ) + *( + MRF.absolute(phase.phi().oldTime()) + - (fvc::interpolate(phase.U().oldTime()) & mesh.Sf()) + )/runTime.deltaT() + - phiFs[phasei] + - phigs[phasei] + ) + ); + + forAllConstIter + ( + phaseSystem::KdTable, + fluid.Kds(), + KdIter + ) + { + const volScalarField& K(*KdIter()); + + const phasePair& pair(fluid.phasePairs()[KdIter.key()]); + + const phaseModel* phase1 = &pair.phase1(); + const phaseModel* phase2 = &pair.phase2(); + + forAllConstIter(phasePair, pair, iter) + { + if (phase1 == &phase) + { + phiHbyAs[phasei] += + fvc::interpolate(rAUs[phasei]*K) + *MRF.absolute(phase2->phi()); + + HbyAs[phasei] += rAUs[phasei]*K*phase2->U(); + } + + Swap(phase1, phase2); + } + } + + phiHbyA += alphafs[phasei]*phiHbyAs[phasei]; + + phasei++; + } + + MRF.makeRelative(phiHbyA); + + // Construct pressure "diffusivity" + surfaceScalarField rAUf + ( + IOobject + ( + "rAUf", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("rAUf", dimensionSet(-1, 3, 1, 0, 0), 0) + ); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + rAUf += alphafs[phasei]*alpharAUfs[phasei]; + phasei++; + } + rAUf = mag(rAUf); + + + // Update the fixedFluxPressure BCs to ensure flux consistency + { + surfaceScalarField::GeometricBoundaryField phib(phi.boundaryField()); + phib = 0; + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + phib += alphafs[phasei].boundaryField()*phase.phi().boundaryField(); + phasei++; + } + + setSnGrad<fixedFluxPressureFvPatchScalarField> + ( + p_rgh.boundaryField(), + ( + phiHbyA.boundaryField() - phib + )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) + ); + } + + PtrList<fvScalarMatrix> pEqnComps(fluid.phases().size()); + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + if (phase.compressible()) + { + const volScalarField& alpha = phase; + const volScalarField& rho = phase.rho(); + + if (pimple.transonic()) + { + surfaceScalarField phid + ( + IOobject::groupName("phid", phase.name()), + fvc::interpolate(phase.thermo().psi())*phase.phi() + ); + + pEqnComps.set + ( + phasei, + ( + ( + phase.continuityError() - fluid.dmdt(phase) + - fvc::Sp + ( + fvc::ddt(alpha) + fvc::div(phase.alphaPhi()), + rho + ) + )/rho + + (alpha/rho)*correction + ( + phase.thermo().psi()*fvm::ddt(p_rgh) + + fvm::div(phid, p_rgh) + - fvm::Sp(fvc::div(phid), p_rgh) + ) + ).ptr() + ); + + deleteDemandDrivenData + ( + pEqnComps[phasei].faceFluxCorrectionPtr() + ); + pEqnComps[phasei].relax(); + } + else + { + pEqnComps.set + ( + phasei, + ( + ( + phase.continuityError() - fluid.dmdt(phase) + - fvc::Sp + ( + (fvc::ddt(alpha) + fvc::div(phase.alphaPhi())), + rho + ) + )/rho + + (alpha*phase.thermo().psi()/rho) + *correction(fvm::ddt(p_rgh)) + ).ptr() + ); + } + } + + phasei++; + } + + // Cache p prior to solve for density update + volScalarField p_rgh_0(p_rgh); + + // Iterate over the pressure equation to correct for non-orthogonality + while (pimple.correctNonOrthogonal()) + { + // Construct the transport part of the pressure equation + fvScalarMatrix pEqnIncomp + ( + fvc::div(phiHbyA) + - fvm::laplacian(rAUf, p_rgh) + ); + + { + fvScalarMatrix pEqn(pEqnIncomp); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + if (phase.compressible()) + { + pEqn += pEqnComps[phasei]; + } + + phasei++; + } + + solve + ( + pEqn, + mesh.solver(p_rgh.select(pimple.finalInnerIter())) + ); + } + + // Correct fluxes and velocities on last non-orthogonal iteration + if (pimple.finalNonOrthogonalIter()) + { + phi = phiHbyA + pEqnIncomp.flux(); + + surfaceScalarField mSfGradp("mSfGradp", pEqnIncomp.flux()/rAUf); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phase.phi() = phiHbyAs[phasei] + alpharAUfs[phasei]*mSfGradp; + + // Set the phase dilatation rates + if (phase.compressible()) + { + phase.divU(-pEqnComps[phasei] & p_rgh); + } + + phasei++; + } + + // Optionally relax pressure for velocity correction + p_rgh.relax(); + + mSfGradp = pEqnIncomp.flux()/rAUf; + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phase.U() = + HbyAs[phasei] + + fvc::reconstruct + ( + alpharAUfs[phasei]*mSfGradp + - phiFs[phasei] + - phigs[phasei] + ); + phase.U().correctBoundaryConditions(); + fvOptions.correct(phase.U()); + + phasei++; + } + } + } + + // Update and limit the static pressure + p = max(p_rgh + rho*gh, pMin); + + // Limit p_rgh + p_rgh = p - rho*gh; + + // Update densities from change in p_rgh + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + phase.rho()() += phase.thermo().psi()*(p_rgh - p_rgh_0); + } + + // Correct p_rgh for consistency with p and the updated densities + rho = fluid.rho(); + p_rgh = p - rho*gh; + p_rgh.correctBoundaryConditions(); +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqnSave.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqnSave.H new file mode 100644 index 00000000000..e94f68d8f20 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqnSave.H @@ -0,0 +1,285 @@ +// --- Pressure corrector loop +while (pimple.correct()) +{ + // rho1 = rho10 + psi1*p_rgh; + // rho2 = rho20 + psi2*p_rgh; + + // tmp<fvScalarMatrix> pEqnComp1; + // tmp<fvScalarMatrix> pEqnComp2; + + // //if (transonic) + // //{ + // //} + // //else + // { + // surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi1); + // surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi2); + + // pEqnComp1 = + // fvc::ddt(rho1) + psi1*correction(fvm::ddt(p_rgh)) + // + fvc::div(phid1, p_rgh) + // - fvc::Sp(fvc::div(phid1), p_rgh); + + // pEqnComp2 = + // fvc::ddt(rho2) + psi2*correction(fvm::ddt(p_rgh)) + // + fvc::div(phid2, p_rgh) + // - fvc::Sp(fvc::div(phid2), p_rgh); + // } + + PtrList<surfaceScalarField> alphafs(fluid.phases().size()); + PtrList<volVectorField> HbyAs(fluid.phases().size()); + PtrList<surfaceScalarField> phiHbyAs(fluid.phases().size()); + PtrList<volScalarField> rAUs(fluid.phases().size()); + PtrList<surfaceScalarField> rAlphaAUfs(fluid.phases().size()); + + int phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + MRF.makeAbsolute(phase.phi().oldTime()); + MRF.makeAbsolute(phase.phi()); + + HbyAs.set(phasei, new volVectorField(phase.U())); + phiHbyAs.set(phasei, new surfaceScalarField(1.0*phase.phi())); + + phasei++; + } + + surfaceScalarField phiHbyA + ( + IOobject + ( + "phiHbyA", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0) + ); + + volScalarField rho("rho", fluid.rho()); + surfaceScalarField ghSnGradRho(ghf*fvc::snGrad(rho)*mesh.magSf()); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + alphafs.set(phasei, fvc::interpolate(alpha).ptr()); + alphafs[phasei].rename("hmm" + alpha.name()); + + volScalarField dragCoeffi + ( + IOobject + ( + "dragCoeffi", + runTime.timeName(), + mesh + ), + fluid.Kd(phase), + zeroGradientFvPatchScalarField::typeName + ); + dragCoeffi.correctBoundaryConditions(); + + rAUs.set(phasei, (1.0/(UEqns[phasei].A() + dragCoeffi)).ptr()); + rAlphaAUfs.set + ( + phasei, + ( + alphafs[phasei]*fvc::interpolate(phase.rho()) + /fvc::interpolate(UEqns[phasei].A() + dragCoeffi) + ).ptr() + ); + + HbyAs[phasei] = rAUs[phasei]*UEqns[phasei].H(); + + phiHbyAs[phasei] = + ( + (fvc::interpolate(HbyAs[phasei]) & mesh.Sf()) + + rAlphaAUfs[phasei]*fvc::ddtCorr(phase.U(), phase.phi()) + ); + MRF.makeRelative(phiHbyAs[phasei]); + MRF.makeRelative(phase.phi().oldTime()); + MRF.makeRelative(phase.phi()); + + phiHbyAs[phasei] += + rAlphaAUfs[phasei] + *( + fluid.surfaceTension(phase)*mesh.magSf() + + (fvc::interpolate(phase.rho() - rho))*(g & mesh.Sf()) + - ghSnGradRho + )/fvc::interpolate(phase.rho()); + + forAllConstIter + ( + phaseSystem::KdTable, + fluid.Kds(), + KdIter + ) + { + const volScalarField& K(*KdIter()); + + const phasePair& pair(fluid.phasePairs()[KdIter.key()]); + + const phaseModel* phase1 = &pair.phase1(); + const phaseModel* phase2 = &pair.phase2(); + + forAllConstIter(phasePair, pair, iter) + { + if (phase1 == &phase) + { + phiHbyAs[phasei] += + fvc::interpolate(K) + /fvc::interpolate(UEqns[phasei].A() + dragCoeffi) + *phase2->phi(); + + HbyAs[phasei] += rAUs[phasei]*K*phase2->U(); + } + + Swap(phase1, phase2); + } + } + + phiHbyA += alphafs[phasei]*phiHbyAs[phasei]; + + phasei++; + } + + surfaceScalarField rAUf + ( + IOobject + ( + "rAUf", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("rAUf", dimensionSet(-1, 3, 1, 0, 0), 0) + ); + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + rAUf += mag(alphafs[phasei]*rAlphaAUfs[phasei]) + /fvc::interpolate(phase.rho()); + + phasei++; + } + + // Update the fixedFluxPressure BCs to ensure flux consistency + { + surfaceScalarField::GeometricBoundaryField phib(phi.boundaryField()); + phib = 0; + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phib += + alphafs[phasei].boundaryField() + *(mesh.Sf().boundaryField() & phase.U().boundaryField()); + + phasei++; + } + + setSnGrad<fixedFluxPressureFvPatchScalarField> + ( + p_rgh.boundaryField(), + ( + phiHbyA.boundaryField() - MRF.relative(phib) + )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) + ); + } + + while (pimple.correctNonOrthogonal()) + { + fvScalarMatrix pEqnIncomp + ( + fvc::div(phiHbyA) + - fvm::laplacian(rAUf, p_rgh) + ); + + pEqnIncomp.setReference(pRefCell, pRefValue); + + solve + ( + // ( + // (alpha1/rho1)*pEqnComp1() + // + (alpha2/rho2)*pEqnComp2() + // ) + + pEqnIncomp, + mesh.solver(p_rgh.select(pimple.finalInnerIter())) + ); + + if (pimple.finalNonOrthogonalIter()) + { + surfaceScalarField mSfGradp("mSfGradp", pEqnIncomp.flux()/rAUf); + + phasei = 0; + phi = dimensionedScalar("phi", phi.dimensions(), 0); + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phase.phi() = + phiHbyAs[phasei] + + rAlphaAUfs[phasei]*mSfGradp/fvc::interpolate(phase.rho()); + phi += + alphafs[phasei]*phiHbyAs[phasei] + + mag(alphafs[phasei]*rAlphaAUfs[phasei]) + *mSfGradp/fvc::interpolate(phase.rho()); + + phasei++; + } + + // dgdt = + + // ( + // pos(alpha2)*(pEqnComp2 & p)/rho2 + // - pos(alpha1)*(pEqnComp1 & p)/rho1 + // ); + + p_rgh.relax(); + + p = p_rgh + rho*gh; + + mSfGradp = pEqnIncomp.flux()/rAUf; + + phasei = 0; + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phase.U() = + HbyAs[phasei] + + fvc::reconstruct + ( + rAlphaAUfs[phasei] + *( + fvc::interpolate(phase.rho() - rho) + *(g & mesh.Sf()) + - ghSnGradRho + + mSfGradp + ) + )/phase.rho(); + + phase.U().correctBoundaryConditions(); + + phasei++; + } + } + } + + //p = max(p, pMin); + + // rho1 = rho10 + psi1*p_rgh; + // rho2 = rho20 + psi2*p_rgh; + + // Dp1Dt = fvc::DDt(phi1, p_rgh); + // Dp2Dt = fvc::DDt(phi2, p_rgh); +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C new file mode 100644 index 00000000000..cb90ee11962 --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C @@ -0,0 +1,143 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2015 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 <http://www.gnu.org/licenses/>. + +Application + reactingMultiphaseEulerFoam + +Description + Solver for a system of any number of compressible fluid phases with a + common pressure, but otherwise separate properties. The type of phase model + is run time selectable and can optionally represent multiple species and + in-phase reactions. The phase system is also run time selectable and can + optionally represent different types of momentun, heat and mass transfer. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "multiphaseSystem.H" +#include "fixedFluxPressureFvPatchScalarField.H" +#include "pimpleControl.H" +#include "localEulerDdtScheme.H" +#include "fvcSmooth.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + + pimpleControl pimple(mesh); + + #include "createTimeControls.H" + #include "createRDeltaT.H" + #include "createFields.H" + + if (!LTS) + { + #include "CourantNo.H" + #include "setInitialDeltaT.H" + } + + // Switch faceMomentum + // ( + // pimple.dict().lookupOrDefault<Switch>("faceMomentum", false) + // ); + + // Switch implicitPhasePressure + // ( + // mesh.solverDict(alpha1.name()).lookupOrDefault<Switch> + // ( + // "implicitPhasePressure", false + // ) + // ); + + //#include "pUf/createDDtU.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + + if (LTS) + { + #include "setRDeltaT.H" + } + else + { + #include "CourantNo.H" + #include "setDeltaT.H" + } + + runTime++; + Info<< "Time = " << runTime.timeName() << nl << endl; + + // --- Pressure-velocity PIMPLE corrector loop + while (pimple.loop()) + { + fluid.solve(); + fluid.correct(); + + #include "YEqns.H" + + // if (faceMomentum) + // { + // #include "pUf/UEqns.H" + // #include "EEqns.H" + // #include "pUf/pEqn.H" + // #include "pUf/DDtU.H" + // } + // else + { + #include "pU/UEqns.H" + #include "EEqns.H" + #include "pU/pEqn.H" + } + + fluid.correctKinematics(); + + if (pimple.turbCorr()) + { + fluid.correctTurbulence(); + } + } + + runTime.write(); + + Info<< "ExecutionTime = " + << runTime.elapsedCpuTime() + << " s\n\n" << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H new file mode 100644 index 00000000000..3a609e41a8e --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H @@ -0,0 +1,36 @@ +{ + volScalarField& rDeltaT = trDeltaT(); + + scalar rDeltaTSmoothingCoeff + ( + runTime.controlDict().lookupOrDefault<scalar> + ( + "rDeltaTSmoothingCoeff", + 0.02 + ) + ); + + surfaceScalarField maxPhi("maxPhi", phi); + + forAllIter(PtrDictionary<phaseModel>, fluid.phases(), iter) + { + maxPhi = max(maxPhi, mag(iter().phi())); + } + + // Set the reciprocal time-step from the local Courant number + rDeltaT.dimensionedInternalField() = max + ( + 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), + fvc::surfaceSum(maxPhi)().dimensionedInternalField() + /((2*maxCo)*mesh.V()) + ); + + // Update tho boundary values of the reciprocal time-step + rDeltaT.correctBoundaryConditions(); + + fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); + + Info<< "Flow time scale min/max = " + << gMin(1/rDeltaT.internalField()) + << ", " << gMax(1/rDeltaT.internalField()) << endl; +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H index 27db7d1a362..684e5ede43f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H @@ -50,8 +50,14 @@ fluid.correctThermo(); -Info<< " phase1.thermo().T(): " << min(phase1.thermo().T()).value() - << " - " << max(phase1.thermo().T()).value() << endl; - -Info<< " phase2.thermo().T(): " << min(phase2.thermo().T()).value() - << " - " << max(phase2.thermo().T()).value() << endl; +Info<< phase1.name() << " min/max T " + << min(phase1.thermo().T()).value() + << " - " + << max(phase1.thermo().T()).value() + << endl; + +Info<< phase2.name() << " min/max T " + << min(phase2.thermo().T()).value() + << " - " + << max(phase2.thermo().T()).value() + << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H index 19f2d473b9b..5ffc70ec846 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H @@ -237,58 +237,72 @@ while (pimple.correct()) // Construct the compressibility parts of the pressure equation if (pimple.transonic()) { - surfaceScalarField phid1 - ( - IOobject::groupName("phid", phase1.name()), - fvc::interpolate(psi1)*phi1 - ); - surfaceScalarField phid2 - ( - IOobject::groupName("phid", phase2.name()), - fvc::interpolate(psi2)*phi2 - ); - - pEqnComp1 = - ( - phase1.continuityError() - fluid.dmdt() - - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1) - )/rho1 - + (alpha1/rho1)*correction + if (phase1.compressible()) + { + surfaceScalarField phid1 ( - psi1*fvm::ddt(p_rgh) - + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) + IOobject::groupName("phid", phase1.name()), + fvc::interpolate(psi1)*phi1 ); - deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr()); - pEqnComp1().relax(); - pEqnComp2 = - ( - phase2.continuityError() + fluid.dmdt() - - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2) - )/rho2 - + (alpha2/rho2)*correction + pEqnComp1 = + ( + phase1.continuityError() - fluid.dmdt() + - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1) + )/rho1 + + (alpha1/rho1)*correction + ( + psi1*fvm::ddt(p_rgh) + + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) + ); + + deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr()); + pEqnComp1().relax(); + } + + if (phase2.compressible()) + { + surfaceScalarField phid2 ( - psi2*fvm::ddt(p_rgh) - + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) + IOobject::groupName("phid", phase2.name()), + fvc::interpolate(psi2)*phi2 ); - deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr()); - pEqnComp2().relax(); + + pEqnComp2 = + ( + phase2.continuityError() + fluid.dmdt() + - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2) + )/rho2 + + (alpha2/rho2)*correction + ( + psi2*fvm::ddt(p_rgh) + + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) + ); + deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr()); + pEqnComp2().relax(); + } } else { - pEqnComp1 = - ( - phase1.continuityError() - fluid.dmdt() - - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1) - )/rho1 - + (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh)); + if (phase1.compressible()) + { + pEqnComp1 = + ( + phase1.continuityError() - fluid.dmdt() + - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1) + )/rho1 + + (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh)); + } - pEqnComp2 = - ( - phase2.continuityError() + fluid.dmdt() - - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2) - )/rho2 - + (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh)); + if (phase2.compressible()) + { + pEqnComp2 = + ( + phase2.continuityError() + fluid.dmdt() + - fvc::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), rho2) + )/rho2 + + (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh)); + } } // Cache p prior to solve for density update @@ -304,11 +318,25 @@ while (pimple.correct()) - fvm::laplacian(rAUf, p_rgh) ); - solve - ( - pEqnComp1() + pEqnComp2() + pEqnIncomp, - mesh.solver(p_rgh.select(pimple.finalInnerIter())) - ); + { + fvScalarMatrix pEqn(pEqnIncomp); + + if (phase1.compressible()) + { + pEqn += pEqnComp1(); + } + + if (phase2.compressible()) + { + pEqn += pEqnComp2(); + } + + solve + ( + pEqn, + mesh.solver(p_rgh.select(pimple.finalInnerIter())) + ); + } // Correct fluxes and velocities on last non-orthogonal iteration if (pimple.finalNonOrthogonalIter()) diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes index ac5bbc54b1a..c861bbec908 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes "div\(phi,alpha.*\)" Gauss vanLeer; "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; - "div\(phiAlpha.*,U.*\)" Gauss limitedLinearV 1; + "div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1; div(Rc) Gauss linear; "div\(phi.*,U.*\)" Gauss limitedLinearV 1; } diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes index acf13bc703e..bed046cf3af 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes "div\(phi,alpha.*\)" Gauss vanLeer; "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; - "div\(phiAlpha.*,U.*\)" Gauss limitedLinearV 1; + "div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1; div(Rc) Gauss linear; "div\(phi.*,U.*\)" Gauss limitedLinearV 1; } diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/fvSchemes index acf13bc703e..bed046cf3af 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/fvSchemes +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes "div\(phi,alpha.*\)" Gauss vanLeer; "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; - "div\(phiAlpha.*,U.*\)" Gauss limitedLinearV 1; + "div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1; div(Rc) Gauss linear; "div\(phi.*,U.*\)" Gauss limitedLinearV 1; } diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/system/fvSchemes index acf13bc703e..bed046cf3af 100644 --- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/system/fvSchemes @@ -30,7 +30,7 @@ divSchemes "div\(phi,alpha.*\)" Gauss vanLeer; "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; - "div\(phiAlpha.*,U.*\)" Gauss limitedLinearV 1; + "div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1; div(Rc) Gauss linear; "div\(phi.*,U.*\)" Gauss limitedLinearV 1; } diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air new file mode 100644 index 00000000000..9c0fd4206c1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.air @@ -0,0 +1,45 @@ +/*--------------------------------*- 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; + object Tair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + phi phi.air; + inletValue $internalField; + value $internalField; + } + inlet + { + type fixedValue; + value $internalField; + } + frontAndBackPlanes + { + type empty; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water new file mode 100644 index 00000000000..e592c501d54 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/T.water @@ -0,0 +1,45 @@ +/*--------------------------------*- 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; + object Twater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 350; + +boundaryField +{ + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + phi phi.water; + inletValue $internalField; + value $internalField; + } + inlet + { + type fixedValue; + value $internalField; + } + frontAndBackPlanes + { + type empty; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/Theta b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/Theta new file mode 100644 index 00000000000..4cfbc0bbea6 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/Theta @@ -0,0 +1,47 @@ +/*--------------------------------*- 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; + object Theta; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 1.0e-7; + } + + outlet + { + type inletOutlet; + inletValue uniform 1.0e-7; + value uniform 1.0e-7; + } + + walls + { + type zeroGradient; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.air new file mode 100644 index 00000000000..e81fffac061 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.air @@ -0,0 +1,41 @@ +/*--------------------------------*- 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 binary; + class volVectorField; + object U.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0.1 0); + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type pressureInletOutletVelocity; + phi phi.air; + value $internalField; + } + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.water new file mode 100644 index 00000000000..aab00fd78bb --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/U.water @@ -0,0 +1,41 @@ +/*--------------------------------*- 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 binary; + class volVectorField; + object U.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type pressureInletOutletVelocity; + phi phi.water; + value $internalField; + } + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air new file mode 100644 index 00000000000..1b1a35684a0 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air @@ -0,0 +1,1926 @@ +/*--------------------------------*- 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.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField nonuniform List<scalar> +1875 +( +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +) +; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phi.air; + inletValue uniform 1; + value uniform 1; + } + walls + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air.org b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air.org new file mode 100644 index 00000000000..4472b0c6359 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.air.org @@ -0,0 +1,42 @@ +/*--------------------------------*- 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.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phi.air; + inletValue uniform 1; + value uniform 1; + } + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water new file mode 100644 index 00000000000..92b1a774aaa --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water @@ -0,0 +1,1926 @@ +/*--------------------------------*- 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.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField nonuniform List<scalar> +1875 +( +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +) +; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phi.water; + inletValue uniform 0; + value uniform 0; + } + walls + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water.org b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water.org new file mode 100644 index 00000000000..75a49e41693 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/alpha.water.org @@ -0,0 +1,41 @@ +/*--------------------------------*- 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; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phi.water; + inletValue uniform 0; + value uniform 0; + } + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p new file mode 100644 index 00000000000..0af317df792 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p @@ -0,0 +1,40 @@ +/*--------------------------------*- 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; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + outlet + { + type calculated; + value $internalField; + } + walls + { + type calculated; + value $internalField; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh new file mode 100644 index 00000000000..de5ac9e4379 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/0/p_rgh @@ -0,0 +1,41 @@ +/*--------------------------------*- 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; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + inlet + { + type fixedFluxPressure; + value $internalField; + } + outlet + { + type prghPressure; + p $internalField; + value $internalField; + } + walls + { + type fixedFluxPressure; + value $internalField; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/g b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/g new file mode 100644 index 00000000000..0cc222ca345 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- 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/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties new file mode 100644 index 00000000000..f7590f98f3f --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/phaseProperties @@ -0,0 +1,169 @@ +/*--------------------------------*- 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 heatAndMomentumTransferMultiphaseSystem; + +phases (air water); + +air +{ + type purePhaseModel; + diameterModel isothermal; + isothermalCoeffs + { + d0 3e-3; + p0 1e5; + } + + residualAlpha 1e-6; +} + +water +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-4; + } + + residualAlpha 1e-6; +} + +blending +{ + default + { + type linear; + minFullyContinuousAlpha.air 0.7; + minPartlyContinuousAlpha.air 0.5; + minFullyContinuousAlpha.water 0.7; + minPartlyContinuousAlpha.water 0.5; + } +} + +surfaceTension +( + (air and water) + { + type constant; + sigma 0.07; + } +); + +interfaceCompression +(); + +aspectRatio +( + (air in water) + { + type constant; + E0 1.0; + } + + (water in air) + { + type constant; + E0 1.0; + } +); + +drag +( + (air in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and water) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } +); + +virtualMass +( + (air in water) + { + type constantCoefficient; + Cvm 0.5; + } + + (water in air) + { + type constantCoefficient; + Cvm 0.5; + } +); + +heatTransfer +( + (air in water) + { + type RanzMarshall; + residualAlpha 1e-4; + } + + (water in air) + { + type RanzMarshall; + residualAlpha 1e-4; + } +); + +lift +( +); + +wallLubrication +( +); + +turbulentDispersion +( +); + +// Minimum allowable pressure +pMin 10000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/polyMesh/boundary b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/polyMesh/boundary new file mode 100644 index 00000000000..4564ccc46a6 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/polyMesh/boundary @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + inlet + { + type patch; + nFaces 25; + startFace 3650; + } + outlet + { + type patch; + nFaces 25; + startFace 3675; + } + walls + { + type wall; + inGroups 1(wall); + nFaces 150; + startFace 3700; + } + defaultFaces + { + type empty; + inGroups 1(empty); + nFaces 3750; + startFace 3850; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.air new file mode 100644 index 00000000000..befc0aeae44 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.air @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 thermophysicalProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.water new file mode 100644 index 00000000000..c44c005d3b1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/thermophysicalProperties.water @@ -0,0 +1,54 @@ +/*--------------------------------*- 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 thermophysicalProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectFluid; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 18; + } + equationOfState + { + R 3000; + rho0 1027; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.air new file mode 100644 index 00000000000..1296429b72a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.air @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 turbulenceProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.water new file mode 100644 index 00000000000..7f0d75a82fc --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/constant/turbulenceProperties.water @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 turbulenceProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/blockMeshDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/blockMeshDict new file mode 100644 index 00000000000..d03967afdc2 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/blockMeshDict @@ -0,0 +1,61 @@ +/*--------------------------------*- 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; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (0.15 0 0) + (0.15 1 0) + (0 1 0) + (0 0 0.1) + (0.15 0 0.1) + (0.15 1 0.1) + (0 1 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (25 75 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch inlet + ( + (1 5 4 0) + ) + patch outlet + ( + (3 7 6 2) + ) + wall walls + ( + (0 4 7 3) + (2 6 5 1) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/controlDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/controlDict new file mode 100644 index 00000000000..c718db46696 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/controlDict @@ -0,0 +1,95 @@ +/*--------------------------------*- 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 controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingMultiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 0.005; + +writeControl runTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 0.5; + +maxDeltaT 1; + +functions0 +{ + fieldAverage1 + { + type fieldAverage; + functionObjectLibs ( "libfieldFunctionObjects.so" ); + outputControl outputTime; + fields + ( + U.air + { + mean on; + prime2Mean off; + base time; + } + + U.water + { + mean on; + prime2Mean off; + base time; + } + + alpha.air + { + mean on; + prime2Mean off; + base time; + } + + p + { + mean on; + prime2Mean off; + base time; + } + ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSchemes b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSchemes new file mode 100644 index 00000000000..3560150851a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSchemes @@ -0,0 +1,63 @@ +/*--------------------------------*- 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.air) Gauss vanLeer; + div(phi,alpha.water) Gauss vanLeer; + div(phir,alpha.water,alpha.air) Gauss vanLeer; + div(phir,alpha.air,alpha.water) Gauss vanLeer; + + "div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; + + "div\(alphaRhoPhi.*,(h|e).*\)" Gauss limitedLinear 1; + "div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,p\)" Gauss limitedLinear 1; + + "div\(\(\(\(alpha.*\*thermo:rho.*\)*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSolution b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSolution new file mode 100644 index 00000000000..06c5db7aee0 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/fvSolution @@ -0,0 +1,82 @@ +/*--------------------------------*- 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 2; + } + + p_rgh + { + solver GAMG; + smoother DIC; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + tolerance 1e-8; + relTol 0; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-5; + relTol 0; + minIter 1; + } + + "e.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + minIter 1; + } +} + +PIMPLE +{ + nOuterCorrectors 3; + nCorrectors 1; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/setFieldsDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/setFieldsDict new file mode 100644 index 00000000000..93d742ba74a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/bubbleColumn/system/setFieldsDict @@ -0,0 +1,36 @@ +/*--------------------------------*- 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 setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.air 1 +); + +regions +( + boxToCell + { + box (0 0 -0.1) (0.15 0.701 0.1); + fieldValues + ( + volScalarFieldValue alpha.air 0 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U new file mode 100644 index 00000000000..b82b7ce18ae --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U @@ -0,0 +1,51 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.air new file mode 100644 index 00000000000..abef789c9c1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.air @@ -0,0 +1,51 @@ +/*--------------------------------*- 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.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.mercury new file mode 100644 index 00000000000..c9a998697db --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.mercury @@ -0,0 +1,51 @@ +/*--------------------------------*- 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.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.oil new file mode 100644 index 00000000000..1820dbd6d64 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.oil @@ -0,0 +1,51 @@ +/*--------------------------------*- 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.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.water new file mode 100644 index 00000000000..4977c8a6d56 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/U.water @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 Uwater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.air new file mode 100644 index 00000000000..be8307fdf27 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.air @@ -0,0 +1,79 @@ +/*--------------------------------*- 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.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 0; + } + rightWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 1; + } + lowerWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 0; + } + atmosphere + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.mercury new file mode 100644 index 00000000000..d224de9509a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.mercury @@ -0,0 +1,49 @@ +/*--------------------------------*- 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.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.oil new file mode 100644 index 00000000000..bfcff63aedd --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.oil @@ -0,0 +1,49 @@ +/*--------------------------------*- 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.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.water new file mode 100644 index 00000000000..cf96bb9d9f3 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alpha.water @@ -0,0 +1,49 @@ +/*--------------------------------*- 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.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alphas b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alphas new file mode 100644 index 00000000000..10e3ea7a072 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/alphas @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 alphas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/p_rgh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/p_rgh new file mode 100644 index 00000000000..22671e295d2 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/0.org/p_rgh @@ -0,0 +1,59 @@ +/*--------------------------------*- 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; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type fixedFluxPressure; + value uniform 0; + } + + rightWall + { + type fixedFluxPressure; + value uniform 0; + } + + lowerWall + { + type fixedFluxPressure; + value uniform 0; + } + + atmosphere + { + type totalPressure; + p0 uniform 0; + U U.air; + phi phi.air; + rho rho; + psi none; + gamma 1; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allclean b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allclean new file mode 100755 index 00000000000..7ac80418725 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +\rm -rf 0 + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun new file mode 100755 index 00000000000..81cae15eabd --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/Allrun @@ -0,0 +1,17 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application=`getApplication` + +\rm -rf 0 +cp -r 0.org 0 + +runApplication blockMesh +runApplication setFields +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g new file mode 100644 index 00000000000..0cc222ca345 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- 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/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/motionProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/motionProperties new file mode 100644 index 00000000000..93e07019847 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/motionProperties @@ -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 dictionary; + location "constant"; + object motionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +movingFvMesh staticFvMesh; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/polyMesh/boundary b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/polyMesh/boundary new file mode 100644 index 00000000000..79ef3a79e11 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/polyMesh/boundary @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + leftWall + { + type wall; + inGroups 1(wall); + nFaces 50; + startFace 4432; + } + rightWall + { + type wall; + inGroups 1(wall); + nFaces 50; + startFace 4482; + } + lowerWall + { + type wall; + inGroups 1(wall); + nFaces 62; + startFace 4532; + } + atmosphere + { + type patch; + nFaces 46; + startFace 4594; + } + defaultFaces + { + type empty; + inGroups 1(empty); + nFaces 4536; + startFace 4640; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties new file mode 100644 index 00000000000..c74003969a9 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/transportProperties @@ -0,0 +1,236 @@ +/*--------------------------------*- 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 transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases +( + water + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 1000; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + oil + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 500; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + mercury + { + nu 1.125e-07; + kappa 1e-06; + Cp 4195; + rho 13529; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + air + { + nu 1.48e-05; + kappa 2.63e-2; + Cp 1007; + rho 1; + + diameterModel constant; + constantCoeffs + { + d 3e-3; + } + } +); + +sigmas +( + (air water) 0.07 + (air oil) 0.07 + (air mercury) 0.07 +); + +interfaceCompression +( + (air water) 1 + (air oil) 1 + (air mercury) 1 +); + +virtualMass +( +); + +drag +( + (air water) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (air oil) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (air mercury) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water oil) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water mercury) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (oil mercury) + { + type blended; + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } +); + + +// This is a dummy to support the Smagorinsky model +transportModel Newtonian; +nu [0 2 -1 0 0 0 0] 0; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties new file mode 100644 index 00000000000..c2c3b28a1b4 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/constant/turbulenceProperties @@ -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 dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict new file mode 100644 index 00000000000..11344be6ac8 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/blockMeshDict @@ -0,0 +1,108 @@ +/*--------------------------------*- 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; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict new file mode 100644 index 00000000000..bb472a3e633 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingMultiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.05; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; +maxAlphaCo 0.5; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict new file mode 100644 index 00000000000..652d42b1954 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/decomposeParDict @@ -0,0 +1,45 @@ +/*--------------------------------*- 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 decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 1 1); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes new file mode 100644 index 00000000000..bed046cf3af --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSchemes @@ -0,0 +1,53 @@ +/*--------------------------------*- 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 +{ + "div\(phi,alpha.*\)" Gauss vanLeer; + "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; + + "div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1; + div(Rc) Gauss linear; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution new file mode 100644 index 00000000000..831f8a3740e --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/fvSolution @@ -0,0 +1,98 @@ +/*--------------------------------*- 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.*" + { + nAlphaSubCycles 3; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.05; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-7; + relTol 0; + nVcycles 2; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + tolerance 1e-7; + relTol 0; + maxIter 20; + } + + pcorr + { + $p_rghFinal; + tolerance 1e-5; + relTol 0; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-8; + relTol 0.1; + nSweeps 1; + } + + UFinal + { + $U; + tolerance 1e-7; + relTol 0; + } +} + +PIMPLE +{ + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + "U.*" 1; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict new file mode 100644 index 00000000000..b277afb1c5b --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phase/system/setFieldsDict @@ -0,0 +1,65 @@ +/*--------------------------------*- 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 setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.air 1 + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 0 + volVectorFieldValue U (0 0 0) +); + +regions +( + boxToCell + { + box (0 0 -1) (0.1461 0.292 1); + fieldValues + ( + volScalarFieldValue alpha.water 1 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 0 + volScalarFieldValue alpha.air 0 + ); + } + boxToCell + { + box (0.1461 0 -1) (0.2922 0.292 1); + fieldValues + ( + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 1 + volScalarFieldValue alpha.mercury 0 + volScalarFieldValue alpha.air 0 + ); + } + boxToCell + { + box (0 0 -1) (0.1461 0.1 1); + fieldValues + ( + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 1 + volScalarFieldValue alpha.air 0 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U new file mode 100644 index 00000000000..b82b7ce18ae --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U @@ -0,0 +1,51 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.air new file mode 100644 index 00000000000..abef789c9c1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.air @@ -0,0 +1,51 @@ +/*--------------------------------*- 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.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.mercury new file mode 100644 index 00000000000..c9a998697db --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.mercury @@ -0,0 +1,51 @@ +/*--------------------------------*- 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.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.oil new file mode 100644 index 00000000000..1820dbd6d64 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.oil @@ -0,0 +1,51 @@ +/*--------------------------------*- 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.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.water new file mode 100644 index 00000000000..4977c8a6d56 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/U.water @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 Uwater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.air new file mode 100644 index 00000000000..be8307fdf27 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.air @@ -0,0 +1,79 @@ +/*--------------------------------*- 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.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 0; + } + rightWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 1; + } + lowerWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 0; + } + atmosphere + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.mercury new file mode 100644 index 00000000000..d224de9509a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.mercury @@ -0,0 +1,49 @@ +/*--------------------------------*- 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.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.oil new file mode 100644 index 00000000000..bfcff63aedd --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.oil @@ -0,0 +1,49 @@ +/*--------------------------------*- 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.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.water new file mode 100644 index 00000000000..cf96bb9d9f3 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alpha.water @@ -0,0 +1,49 @@ +/*--------------------------------*- 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.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alphas b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alphas new file mode 100644 index 00000000000..10e3ea7a072 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/alphas @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 alphas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/p_rgh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/p_rgh new file mode 100644 index 00000000000..cfabea4db1c --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/0.org/p_rgh @@ -0,0 +1,59 @@ +/*--------------------------------*- 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; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type fixedFluxPressure; + value uniform 0; + } + + rightWall + { + type fixedFluxPressure; + value uniform 0; + } + + lowerWall + { + type fixedFluxPressure; + value uniform 0; + } + + atmosphere + { + type totalPressure; + p0 uniform 0; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allclean b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allclean new file mode 100755 index 00000000000..7ac80418725 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +\rm -rf 0 + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allrun new file mode 100755 index 00000000000..33fca4c7bd4 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/Allrun @@ -0,0 +1,19 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application=`getApplication` + +\rm -rf 0 +cp -r 0.org 0 + +runApplication blockMesh +runApplication setFields +runApplication decomposePar +runParallel $application 4 +runApplication reconstructPar + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/g b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/g new file mode 100644 index 00000000000..0cc222ca345 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- 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/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/motionProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/motionProperties new file mode 100644 index 00000000000..93e07019847 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/motionProperties @@ -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 dictionary; + location "constant"; + object motionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +movingFvMesh staticFvMesh; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/polyMesh/boundary b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/polyMesh/boundary new file mode 100644 index 00000000000..f1ec545053d --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/polyMesh/boundary @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + leftWall + { + type wall; + inGroups 1(wall); + nFaces 195; + startFace 68014; + } + rightWall + { + type wall; + inGroups 1(wall); + nFaces 195; + startFace 68209; + } + lowerWall + { + type wall; + inGroups 1(wall); + nFaces 206; + startFace 68404; + } + atmosphere + { + type patch; + nFaces 176; + startFace 68610; + } + defaultFaces + { + type empty; + inGroups 1(empty); + nFaces 68400; + startFace 68786; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/transportProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/transportProperties new file mode 100644 index 00000000000..c74003969a9 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/transportProperties @@ -0,0 +1,236 @@ +/*--------------------------------*- 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 transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases +( + water + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 1000; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + oil + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 500; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + mercury + { + nu 1.125e-07; + kappa 1e-06; + Cp 4195; + rho 13529; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + air + { + nu 1.48e-05; + kappa 2.63e-2; + Cp 1007; + rho 1; + + diameterModel constant; + constantCoeffs + { + d 3e-3; + } + } +); + +sigmas +( + (air water) 0.07 + (air oil) 0.07 + (air mercury) 0.07 +); + +interfaceCompression +( + (air water) 1 + (air oil) 1 + (air mercury) 1 +); + +virtualMass +( +); + +drag +( + (air water) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (air oil) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (air mercury) + { + type blended; + + air + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water oil) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (water mercury) + { + type blended; + + water + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } + + (oil mercury) + { + type blended; + + oil + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + mercury + { + type SchillerNaumann; + residualPhaseFraction 0; + residualSlip 0; + } + + residualPhaseFraction 1e-3; + residualSlip 1e-3; + } +); + + +// This is a dummy to support the Smagorinsky model +transportModel Newtonian; +nu [0 2 -1 0 0 0 0] 0; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/turbulenceProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/turbulenceProperties new file mode 100644 index 00000000000..c2c3b28a1b4 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/constant/turbulenceProperties @@ -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 dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/blockMeshDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/blockMeshDict new file mode 100644 index 00000000000..fd11bf53fdc --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/blockMeshDict @@ -0,0 +1,108 @@ +/*--------------------------------*- 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; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (92 15 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (76 15 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (92 180 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (8 180 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (76 180 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/controlDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/controlDict new file mode 100644 index 00000000000..be82da29a59 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- 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 controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingMultiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.01; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; +maxAlphaCo 0.5; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/decomposeParDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/decomposeParDict new file mode 100644 index 00000000000..652d42b1954 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/decomposeParDict @@ -0,0 +1,45 @@ +/*--------------------------------*- 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 decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 1 1); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSchemes b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSchemes new file mode 100644 index 00000000000..bed046cf3af --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSchemes @@ -0,0 +1,53 @@ +/*--------------------------------*- 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 +{ + "div\(phi,alpha.*\)" Gauss vanLeer; + "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; + + "div\(alphaPhi.*,U.*\)" Gauss limitedLinearV 1; + div(Rc) Gauss linear; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSolution b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSolution new file mode 100644 index 00000000000..831f8a3740e --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/fvSolution @@ -0,0 +1,98 @@ +/*--------------------------------*- 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.*" + { + nAlphaSubCycles 3; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.05; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-7; + relTol 0; + nVcycles 2; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + tolerance 1e-7; + relTol 0; + maxIter 20; + } + + pcorr + { + $p_rghFinal; + tolerance 1e-5; + relTol 0; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-8; + relTol 0.1; + nSweeps 1; + } + + UFinal + { + $U; + tolerance 1e-7; + relTol 0; + } +} + +PIMPLE +{ + nCorrectors 3; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + "U.*" 1; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/setFieldsDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/setFieldsDict new file mode 100644 index 00000000000..b277afb1c5b --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/damBreak4phaseFine/system/setFieldsDict @@ -0,0 +1,65 @@ +/*--------------------------------*- 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 setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.air 1 + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 0 + volVectorFieldValue U (0 0 0) +); + +regions +( + boxToCell + { + box (0 0 -1) (0.1461 0.292 1); + fieldValues + ( + volScalarFieldValue alpha.water 1 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 0 + volScalarFieldValue alpha.air 0 + ); + } + boxToCell + { + box (0.1461 0 -1) (0.2922 0.292 1); + fieldValues + ( + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 1 + volScalarFieldValue alpha.mercury 0 + volScalarFieldValue alpha.air 0 + ); + } + boxToCell + { + box (0 0 -1) (0.1461 0.1 1); + fieldValues + ( + volScalarFieldValue alpha.water 0 + volScalarFieldValue alpha.oil 0 + volScalarFieldValue alpha.mercury 1 + volScalarFieldValue alpha.air 0 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.air new file mode 100644 index 00000000000..328ba98e8d8 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.air @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 T.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.mercury new file mode 100644 index 00000000000..7e5ba636aad --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.mercury @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 T.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.oil new file mode 100644 index 00000000000..bd22fff2fec --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.oil @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 T.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.water new file mode 100644 index 00000000000..0671cbf1ad3 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/T.water @@ -0,0 +1,48 @@ +/*--------------------------------*- 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 T.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/Theta b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/Theta new file mode 100644 index 00000000000..b18d202df89 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/Theta @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; + object Theta; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air new file mode 100644 index 00000000000..6c91343655a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.air @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + object U.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type fixedValue; + value uniform (0 0 0); + } + + stator + { + type fixedValue; + value uniform (0 0 0); + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury new file mode 100644 index 00000000000..44441b84d81 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.mercury @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + object U.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type fixedValue; + value uniform (0 0 0); + } + + stator + { + type fixedValue; + value uniform (0 0 0); + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil new file mode 100644 index 00000000000..9f6f8f999c1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.oil @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + object U.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type fixedValue; + value uniform (0 0 0); + } + + stator + { + type fixedValue; + value uniform (0 0 0); + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water new file mode 100644 index 00000000000..65f9af410b9 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/U.water @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + object U.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type fixedValue; + value uniform (0 0 0); + } + + stator + { + type fixedValue; + value uniform (0 0 0); + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.air new file mode 100644 index 00000000000..1b2bf4793dd --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.air @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; + object alpha.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.mercury new file mode 100644 index 00000000000..a75393eb38b --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.mercury @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; + object alpha.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.oil new file mode 100644 index 00000000000..fe67cfa6add --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.oil @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; + object alpha.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.water new file mode 100644 index 00000000000..8e47199187f --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/alpha.water @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.7; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p new file mode 100644 index 00000000000..515add92dbe --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + rotor + { + type calculated; + value $internalField; + } + + stator + { + type calculated; + value $internalField; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p_rgh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p_rgh new file mode 100644 index 00000000000..1e324882729 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/0/p_rgh @@ -0,0 +1,46 @@ +/*--------------------------------*- 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; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + rotor + { + type fixedFluxPressure; + value $internalField; + } + + stator + { + type fixedFluxPressure; + value $internalField; + } + + front + { + type empty; + } + + back + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun new file mode 100755 index 00000000000..349ea685ea5 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=`getApplication` + +runApplication ./makeMesh +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/MRFProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/MRFProperties new file mode 100644 index 00000000000..c604aa7e2c4 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/MRFProperties @@ -0,0 +1,31 @@ +/*--------------------------------*- 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 MRFProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +MRF1 +{ + cellZone rotor; + active yes; + + // Fixed patches (by default they 'move' with the MRF zone) + nonRotatingPatches (); + + origin (0 0 0); + axis (0 0 1); + omega constant 10.472; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/g b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/g new file mode 100644 index 00000000000..508d6584943 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- 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 0 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties new file mode 100644 index 00000000000..a2f2f7ba113 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/phaseProperties @@ -0,0 +1,456 @@ +/*--------------------------------*- 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 heatAndMomentumTransferMultiphaseSystem; + +phases (water oil mercury air); + +water +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +oil +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +mercury +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +air +{ + type purePhaseModel; + diameterModel isothermal; + isothermalCoeffs + { + d0 1e-3; + p0 1e5; + } + + residualAlpha 1e-3; +} + +blending +{ + default + { + type linear; + minFullyContinuousAlpha.water 0.7; + minPartlyContinuousAlpha.water 0.5; + minFullyContinuousAlpha.oil 0.7; + minPartlyContinuousAlpha.oil 0.5; + minFullyContinuousAlpha.mercury 0.7; + minPartlyContinuousAlpha.mercury 0.5; + minFullyContinuousAlpha.air 0.7; + minPartlyContinuousAlpha.air 0.5; + } +} + +surfaceTension +( + (air and water) + { + type constant; + sigma 0.07; + } + (air and oil) + { + type constant; + sigma 0.07; + } + (air and mercury) + { + type constant; + sigma 0.07; + } + (water and oil) + { + type constant; + sigma 0; + } + (water and mercury) + { + type constant; + sigma 0; + } + (oil and mercury) + { + type constant; + sigma 0; + } +); + +interfaceCompression +( + (air and water) 0 + (air and oil) 0 + (air and mercury) 0 + (water and oil) 0 + (water and mercury) 0 + (oil and mercury) 0 +); + +aspectRatio +(); + +drag +( + (air in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and water) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (air in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and oil) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (air in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + + (water in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water and oil) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (water in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + + (oil in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } +); + +virtualMass +( + (air in water) + { + type constantCoefficient; + Cvm 0.5; + } + + (air in oil) + { + type constantCoefficient; + Cvm 0.5; + } + + (air in mercury) + { + type constantCoefficient; + Cvm 0.5; + } +); + +heatTransfer +( + (air in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (water in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (air in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (oil in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (air in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + + (water in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (oil in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (water in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + + (oil in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } +); + +wallLubrication +(); + +turbulentDispersion +(); + +// Minimum allowable pressure +pMin 10000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/polyMesh/boundary b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/polyMesh/boundary new file mode 100644 index 00000000000..5c2a6cf99c5 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/polyMesh/boundary @@ -0,0 +1,50 @@ +/*--------------------------------*- 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 polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + rotor + { + type wall; + inGroups 1(wall); + nFaces 192; + startFace 5952; + } + stator + { + type wall; + inGroups 1(wall); + nFaces 192; + startFace 6144; + } + front + { + type empty; + inGroups 1(empty); + nFaces 3072; + startFace 6336; + } + back + { + type empty; + inGroups 1(empty); + nFaces 3072; + startFace 9408; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.air new file mode 100644 index 00000000000..befc0aeae44 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.air @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 thermophysicalProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.mercury new file mode 100644 index 00000000000..864b73f24ed --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.mercury @@ -0,0 +1,53 @@ +/*--------------------------------*- 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 thermophysicalProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 200; + } + equationOfState + { + rho 13529; + } + thermodynamics + { + Cp 135; + Hf 0; + } + transport + { + mu 8.6e-4; + Pr 111; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.oil new file mode 100644 index 00000000000..7c0d16aa903 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.oil @@ -0,0 +1,53 @@ +/*--------------------------------*- 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 thermophysicalProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 160; + } + equationOfState + { + rho 500; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 5e-4; + Pr 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.water new file mode 100644 index 00000000000..c44c005d3b1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/thermophysicalProperties.water @@ -0,0 +1,54 @@ +/*--------------------------------*- 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 thermophysicalProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectFluid; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 18; + } + equationOfState + { + R 3000; + rho0 1027; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.air b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.air new file mode 100644 index 00000000000..1296429b72a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.air @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 turbulenceProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.mercury b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.mercury new file mode 100644 index 00000000000..cf1ca5634de --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.mercury @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 turbulenceProperties.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.oil b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.oil new file mode 100644 index 00000000000..eb2604b78c1 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.oil @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 turbulenceProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.water b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.water new file mode 100644 index 00000000000..7f0d75a82fc --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/constant/turbulenceProperties.water @@ -0,0 +1,20 @@ +/*--------------------------------*- 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 turbulenceProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh new file mode 100755 index 00000000000..4d667956a0a --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/makeMesh @@ -0,0 +1,6 @@ +#!/bin/sh + +m4 < system/blockMeshDict.m4 > system/blockMeshDict +blockMesh +topoSet +setsToZones -noFlipMap diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/blockMeshDict.m4 b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/blockMeshDict.m4 new file mode 100644 index 00000000000..a93868498ba --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/blockMeshDict.m4 @@ -0,0 +1,818 @@ +/*--------------------------------*- 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; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'print ($1)')]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) +define(pi, 3.14159265) + +define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t)) +define(quad2D, ($1b $2b $2t $1t)) +define(frontQuad, ($1t $2t $3t $4t)) +define(backQuad, ($1b $4b $3b $2b)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +// Hub radius +define(r, 0.2) + +// Impeller-tip radius +define(rb, 0.5) + +// Baffle-tip radius +define(Rb, 0.7) + +// Tank radius +define(R, 1) + +// MRF region radius +define(ri, calc(0.5*(rb + Rb))) + +// Thickness of 2D slab +define(z, 0.1) + +// Base z +define(Zb, 0) + +// Top z +define(Zt, calc(Zb + z)) + +// Number of cells radially between hub and impeller tip +define(Nr, 12) + +// Number of cells radially in each of the two regions between +// impeller and baffle tips +define(Ni, 4) + +// Number of cells radially between baffle tip and tank +define(NR, 12) + +// Number of cells azimuthally in each of the 8 blocks +define(Na, 12) + +// Number of cells in the thickness of the slab +define(Nz, 1) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +define(vert, (x$1$2 y$1$2 $3)) +define(evert, (ex$1$2 ey$1$2 $3)) + +define(a0, 0) +define(a1, -45) +define(a2, -90) +define(a3, -135) +define(a4, 180) +define(a5, 135) +define(a6, 90) +define(a7, 45) + +define(ea0, -22.5) +define(ea1, -67.5) +define(ea2, -112.5) +define(ea3, -157.5) +define(ea4, 157.5) +define(ea5, 112.5) +define(ea6, 67.5) +define(ea7, 22.5) + +define(ca0, calc(cos((pi/180)*a0))) +define(ca1, calc(cos((pi/180)*a1))) +define(ca2, calc(cos((pi/180)*a2))) +define(ca3, calc(cos((pi/180)*a3))) +define(ca4, calc(cos((pi/180)*a4))) +define(ca5, calc(cos((pi/180)*a5))) +define(ca6, calc(cos((pi/180)*a6))) +define(ca7, calc(cos((pi/180)*a7))) + +define(sa0, calc(sin((pi/180)*a0))) +define(sa1, calc(sin((pi/180)*a1))) +define(sa2, calc(sin((pi/180)*a2))) +define(sa3, calc(sin((pi/180)*a3))) +define(sa4, calc(sin((pi/180)*a4))) +define(sa5, calc(sin((pi/180)*a5))) +define(sa6, calc(sin((pi/180)*a6))) +define(sa7, calc(sin((pi/180)*a7))) + +define(cea0, calc(cos((pi/180)*ea0))) +define(cea1, calc(cos((pi/180)*ea1))) +define(cea2, calc(cos((pi/180)*ea2))) +define(cea3, calc(cos((pi/180)*ea3))) +define(cea4, calc(cos((pi/180)*ea4))) +define(cea5, calc(cos((pi/180)*ea5))) +define(cea6, calc(cos((pi/180)*ea6))) +define(cea7, calc(cos((pi/180)*ea7))) + +define(sea0, calc(sin((pi/180)*ea0))) +define(sea1, calc(sin((pi/180)*ea1))) +define(sea2, calc(sin((pi/180)*ea2))) +define(sea3, calc(sin((pi/180)*ea3))) +define(sea4, calc(sin((pi/180)*ea4))) +define(sea5, calc(sin((pi/180)*ea5))) +define(sea6, calc(sin((pi/180)*ea6))) +define(sea7, calc(sin((pi/180)*ea7))) + +define(x00, calc(r*ca0)) +define(x01, calc(r*ca1)) +define(x02, calc(r*ca2)) +define(x03, calc(r*ca3)) +define(x04, calc(r*ca4)) +define(x05, calc(r*ca5)) +define(x06, calc(r*ca6)) +define(x07, calc(r*ca7)) + +define(x10, calc(rb*ca0)) +define(x11, calc(rb*ca1)) +define(x12, calc(rb*ca2)) +define(x13, calc(rb*ca3)) +define(x14, calc(rb*ca4)) +define(x15, calc(rb*ca5)) +define(x16, calc(rb*ca6)) +define(x17, calc(rb*ca7)) + +define(x20, calc(ri*ca0)) +define(x21, calc(ri*ca1)) +define(x22, calc(ri*ca2)) +define(x23, calc(ri*ca3)) +define(x24, calc(ri*ca4)) +define(x25, calc(ri*ca5)) +define(x26, calc(ri*ca6)) +define(x27, calc(ri*ca7)) + +define(x30, calc(Rb*ca0)) +define(x31, calc(Rb*ca1)) +define(x32, calc(Rb*ca2)) +define(x33, calc(Rb*ca3)) +define(x34, calc(Rb*ca4)) +define(x35, calc(Rb*ca5)) +define(x36, calc(Rb*ca6)) +define(x37, calc(Rb*ca7)) + +define(x40, calc(R*ca0)) +define(x41, calc(R*ca1)) +define(x42, calc(R*ca2)) +define(x43, calc(R*ca3)) +define(x44, calc(R*ca4)) +define(x45, calc(R*ca5)) +define(x46, calc(R*ca6)) +define(x47, calc(R*ca7)) + +define(y00, calc(r*sa0)) +define(y01, calc(r*sa1)) +define(y02, calc(r*sa2)) +define(y03, calc(r*sa3)) +define(y04, calc(r*sa4)) +define(y05, calc(r*sa5)) +define(y06, calc(r*sa6)) +define(y07, calc(r*sa7)) + +define(y10, calc(rb*sa0)) +define(y11, calc(rb*sa1)) +define(y12, calc(rb*sa2)) +define(y13, calc(rb*sa3)) +define(y14, calc(rb*sa4)) +define(y15, calc(rb*sa5)) +define(y16, calc(rb*sa6)) +define(y17, calc(rb*sa7)) + +define(y20, calc(ri*sa0)) +define(y21, calc(ri*sa1)) +define(y22, calc(ri*sa2)) +define(y23, calc(ri*sa3)) +define(y24, calc(ri*sa4)) +define(y25, calc(ri*sa5)) +define(y26, calc(ri*sa6)) +define(y27, calc(ri*sa7)) + +define(y30, calc(Rb*sa0)) +define(y31, calc(Rb*sa1)) +define(y32, calc(Rb*sa2)) +define(y33, calc(Rb*sa3)) +define(y34, calc(Rb*sa4)) +define(y35, calc(Rb*sa5)) +define(y36, calc(Rb*sa6)) +define(y37, calc(Rb*sa7)) + +define(y40, calc(R*sa0)) +define(y41, calc(R*sa1)) +define(y42, calc(R*sa2)) +define(y43, calc(R*sa3)) +define(y44, calc(R*sa4)) +define(y45, calc(R*sa5)) +define(y46, calc(R*sa6)) +define(y47, calc(R*sa7)) + +define(ex00, calc(r*cea0)) +define(ex01, calc(r*cea1)) +define(ex02, calc(r*cea2)) +define(ex03, calc(r*cea3)) +define(ex04, calc(r*cea4)) +define(ex05, calc(r*cea5)) +define(ex06, calc(r*cea6)) +define(ex07, calc(r*cea7)) + +define(ex10, calc(rb*cea0)) +define(ex11, calc(rb*cea1)) +define(ex12, calc(rb*cea2)) +define(ex13, calc(rb*cea3)) +define(ex14, calc(rb*cea4)) +define(ex15, calc(rb*cea5)) +define(ex16, calc(rb*cea6)) +define(ex17, calc(rb*cea7)) + +define(ex20, calc(ri*cea0)) +define(ex21, calc(ri*cea1)) +define(ex22, calc(ri*cea2)) +define(ex23, calc(ri*cea3)) +define(ex24, calc(ri*cea4)) +define(ex25, calc(ri*cea5)) +define(ex26, calc(ri*cea6)) +define(ex27, calc(ri*cea7)) + +define(ex30, calc(Rb*cea0)) +define(ex31, calc(Rb*cea1)) +define(ex32, calc(Rb*cea2)) +define(ex33, calc(Rb*cea3)) +define(ex34, calc(Rb*cea4)) +define(ex35, calc(Rb*cea5)) +define(ex36, calc(Rb*cea6)) +define(ex37, calc(Rb*cea7)) + +define(ex40, calc(R*cea0)) +define(ex41, calc(R*cea1)) +define(ex42, calc(R*cea2)) +define(ex43, calc(R*cea3)) +define(ex44, calc(R*cea4)) +define(ex45, calc(R*cea5)) +define(ex46, calc(R*cea6)) +define(ex47, calc(R*cea7)) + +define(ey00, calc(r*sea0)) +define(ey01, calc(r*sea1)) +define(ey02, calc(r*sea2)) +define(ey03, calc(r*sea3)) +define(ey04, calc(r*sea4)) +define(ey05, calc(r*sea5)) +define(ey06, calc(r*sea6)) +define(ey07, calc(r*sea7)) + +define(ey10, calc(rb*sea0)) +define(ey11, calc(rb*sea1)) +define(ey12, calc(rb*sea2)) +define(ey13, calc(rb*sea3)) +define(ey14, calc(rb*sea4)) +define(ey15, calc(rb*sea5)) +define(ey16, calc(rb*sea6)) +define(ey17, calc(rb*sea7)) + +define(ey20, calc(ri*sea0)) +define(ey21, calc(ri*sea1)) +define(ey22, calc(ri*sea2)) +define(ey23, calc(ri*sea3)) +define(ey24, calc(ri*sea4)) +define(ey25, calc(ri*sea5)) +define(ey26, calc(ri*sea6)) +define(ey27, calc(ri*sea7)) + +define(ey30, calc(Rb*sea0)) +define(ey31, calc(Rb*sea1)) +define(ey32, calc(Rb*sea2)) +define(ey33, calc(Rb*sea3)) +define(ey34, calc(Rb*sea4)) +define(ey35, calc(Rb*sea5)) +define(ey36, calc(Rb*sea6)) +define(ey37, calc(Rb*sea7)) + +define(ey40, calc(R*sea0)) +define(ey41, calc(R*sea1)) +define(ey42, calc(R*sea2)) +define(ey43, calc(R*sea3)) +define(ey44, calc(R*sea4)) +define(ey45, calc(R*sea5)) +define(ey46, calc(R*sea6)) +define(ey47, calc(R*sea7)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +vertices +( + vert(0, 0, Zb) vlabel(r0b) + vert(0, 0, Zb) vlabel(r0sb) + vert(0, 1, Zb) vlabel(r1b) + vert(0, 2, Zb) vlabel(r2b) + vert(0, 2, Zb) vlabel(r2sb) + vert(0, 3, Zb) vlabel(r3b) + vert(0, 4, Zb) vlabel(r4b) + vert(0, 4, Zb) vlabel(r4sb) + vert(0, 5, Zb) vlabel(r5b) + vert(0, 6, Zb) vlabel(r6b) + vert(0, 6, Zb) vlabel(r6sb) + vert(0, 7, Zb) vlabel(r7b) + + vert(1, 0, Zb) vlabel(rb0b) + vert(1, 1, Zb) vlabel(rb1b) + vert(1, 2, Zb) vlabel(rb2b) + vert(1, 3, Zb) vlabel(rb3b) + vert(1, 4, Zb) vlabel(rb4b) + vert(1, 5, Zb) vlabel(rb5b) + vert(1, 6, Zb) vlabel(rb6b) + vert(1, 7, Zb) vlabel(rb7b) + + vert(2, 0, Zb) vlabel(ri0b) + vert(2, 1, Zb) vlabel(ri1b) + vert(2, 2, Zb) vlabel(ri2b) + vert(2, 3, Zb) vlabel(ri3b) + vert(2, 4, Zb) vlabel(ri4b) + vert(2, 5, Zb) vlabel(ri5b) + vert(2, 6, Zb) vlabel(ri6b) + vert(2, 7, Zb) vlabel(ri7b) + + vert(3, 0, Zb) vlabel(Rb0b) + vert(3, 1, Zb) vlabel(Rb1b) + vert(3, 2, Zb) vlabel(Rb2b) + vert(3, 3, Zb) vlabel(Rb3b) + vert(3, 4, Zb) vlabel(Rb4b) + vert(3, 5, Zb) vlabel(Rb5b) + vert(3, 6, Zb) vlabel(Rb6b) + vert(3, 7, Zb) vlabel(Rb7b) + + vert(4, 0, Zb) vlabel(R0b) + vert(4, 1, Zb) vlabel(R1b) + vert(4, 1, Zb) vlabel(R1sb) + vert(4, 2, Zb) vlabel(R2b) + vert(4, 3, Zb) vlabel(R3b) + vert(4, 3, Zb) vlabel(R3sb) + vert(4, 4, Zb) vlabel(R4b) + vert(4, 5, Zb) vlabel(R5b) + vert(4, 5, Zb) vlabel(R5sb) + vert(4, 6, Zb) vlabel(R6b) + vert(4, 7, Zb) vlabel(R7b) + vert(4, 7, Zb) vlabel(R7sb) + + vert(0, 0, Zt) vlabel(r0t) + vert(0, 0, Zt) vlabel(r0st) + vert(0, 1, Zt) vlabel(r1t) + vert(0, 2, Zt) vlabel(r2t) + vert(0, 2, Zt) vlabel(r2st) + vert(0, 3, Zt) vlabel(r3t) + vert(0, 4, Zt) vlabel(r4t) + vert(0, 4, Zt) vlabel(r4st) + vert(0, 5, Zt) vlabel(r5t) + vert(0, 6, Zt) vlabel(r6t) + vert(0, 6, Zt) vlabel(r6st) + vert(0, 7, Zt) vlabel(r7t) + + vert(1, 0, Zt) vlabel(rb0t) + vert(1, 1, Zt) vlabel(rb1t) + vert(1, 2, Zt) vlabel(rb2t) + vert(1, 3, Zt) vlabel(rb3t) + vert(1, 4, Zt) vlabel(rb4t) + vert(1, 5, Zt) vlabel(rb5t) + vert(1, 6, Zt) vlabel(rb6t) + vert(1, 7, Zt) vlabel(rb7t) + + vert(2, 0, Zt) vlabel(ri0t) + vert(2, 1, Zt) vlabel(ri1t) + vert(2, 2, Zt) vlabel(ri2t) + vert(2, 3, Zt) vlabel(ri3t) + vert(2, 4, Zt) vlabel(ri4t) + vert(2, 5, Zt) vlabel(ri5t) + vert(2, 6, Zt) vlabel(ri6t) + vert(2, 7, Zt) vlabel(ri7t) + + vert(3, 0, Zt) vlabel(Rb0t) + vert(3, 1, Zt) vlabel(Rb1t) + vert(3, 2, Zt) vlabel(Rb2t) + vert(3, 3, Zt) vlabel(Rb3t) + vert(3, 4, Zt) vlabel(Rb4t) + vert(3, 5, Zt) vlabel(Rb5t) + vert(3, 6, Zt) vlabel(Rb6t) + vert(3, 7, Zt) vlabel(Rb7t) + + vert(4, 0, Zt) vlabel(R0t) + vert(4, 1, Zt) vlabel(R1t) + vert(4, 1, Zt) vlabel(R1st) + vert(4, 2, Zt) vlabel(R2t) + vert(4, 3, Zt) vlabel(R3t) + vert(4, 3, Zt) vlabel(R3st) + vert(4, 4, Zt) vlabel(R4t) + vert(4, 5, Zt) vlabel(R5t) + vert(4, 5, Zt) vlabel(R5st) + vert(4, 6, Zt) vlabel(R6t) + vert(4, 7, Zt) vlabel(R7t) + vert(4, 7, Zt) vlabel(R7st) +); + +blocks +( + // block0 + hex2D(r0, r1, rb1, rb0) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(r1, r2s, rb2, rb1) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(r2, r3, rb3, rb2) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(r3, r4s, rb4, rb3) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(r4, r5, rb5, rb4) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(r5, r6s, rb6, rb5) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(r6, r7, rb7, rb6) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(r7, r0s, rb0, rb7) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(rb0, rb1, ri1, ri0) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(rb1, rb2, ri2, ri1) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(rb2, rb3, ri3, ri2) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(rb3, rb4, ri4, ri3) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(rb4, rb5, ri5, ri4) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(rb5, rb6, ri6, ri5) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(rb6, rb7, ri7, ri6) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(rb7, rb0, ri0, ri7) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(ri0, ri1, Rb1, Rb0) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(ri1, ri2, Rb2, Rb1) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(ri2, ri3, Rb3, Rb2) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(ri3, ri4, Rb4, Rb3) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(ri4, ri5, Rb5, Rb4) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(ri5, ri6, Rb6, Rb5) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(ri6, ri7, Rb7, Rb6) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(ri7, ri0, Rb0, Rb7) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(Rb0, Rb1, R1s, R0) + (Na NR Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(Rb1, Rb2, R2, R1) + (Na NR Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(Rb2, Rb3, R3s, R2) + (Na NR Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(Rb3, Rb4, R4, R3) + (Na NR Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(Rb4, Rb5, R5s, R4) + (Na NR Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(Rb5, Rb6, R6, R5) + (Na NR Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(Rb6, Rb7, R7s, R6) + (Na NR Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(Rb7, Rb0, R0, R7) + (Na NR Nz) + simpleGrading (1 1 1) +); + +edges +( + arc r0b r1b evert(0, 0, Zb) + arc r1b r2sb evert(0, 1, Zb) + arc r2b r3b evert(0, 2, Zb) + arc r3b r4sb evert(0, 3, Zb) + arc r4b r5b evert(0, 4, Zb) + arc r5b r6sb evert(0, 5, Zb) + arc r6b r7b evert(0, 6, Zb) + arc r7b r0sb evert(0, 7, Zb) + + arc rb0b rb1b evert(1, 0, Zb) + arc rb1b rb2b evert(1, 1, Zb) + arc rb2b rb3b evert(1, 2, Zb) + arc rb3b rb4b evert(1, 3, Zb) + arc rb4b rb5b evert(1, 4, Zb) + arc rb5b rb6b evert(1, 5, Zb) + arc rb6b rb7b evert(1, 6, Zb) + arc rb7b rb0b evert(1, 7, Zb) + + arc ri0b ri1b evert(2, 0, Zb) + arc ri1b ri2b evert(2, 1, Zb) + arc ri2b ri3b evert(2, 2, Zb) + arc ri3b ri4b evert(2, 3, Zb) + arc ri4b ri5b evert(2, 4, Zb) + arc ri5b ri6b evert(2, 5, Zb) + arc ri6b ri7b evert(2, 6, Zb) + arc ri7b ri0b evert(2, 7, Zb) + + arc Rb0b Rb1b evert(3, 0, Zb) + arc Rb1b Rb2b evert(3, 1, Zb) + arc Rb2b Rb3b evert(3, 2, Zb) + arc Rb3b Rb4b evert(3, 3, Zb) + arc Rb4b Rb5b evert(3, 4, Zb) + arc Rb5b Rb6b evert(3, 5, Zb) + arc Rb6b Rb7b evert(3, 6, Zb) + arc Rb7b Rb0b evert(3, 7, Zb) + + arc R0b R1sb evert(4, 0, Zb) + arc R1b R2b evert(4, 1, Zb) + arc R2b R3sb evert(4, 2, Zb) + arc R3b R4b evert(4, 3, Zb) + arc R4b R5sb evert(4, 4, Zb) + arc R5b R6b evert(4, 5, Zb) + arc R6b R7sb evert(4, 6, Zb) + arc R7b R0b evert(4, 7, Zb) + + arc r0t r1t evert(0, 0, Zt) + arc r1t r2st evert(0, 1, Zt) + arc r2t r3t evert(0, 2, Zt) + arc r3t r4st evert(0, 3, Zt) + arc r4t r5t evert(0, 4, Zt) + arc r5t r6st evert(0, 5, Zt) + arc r6t r7t evert(0, 6, Zt) + arc r7t r0st evert(0, 7, Zt) + + arc rb0t rb1t evert(1, 0, Zt) + arc rb1t rb2t evert(1, 1, Zt) + arc rb2t rb3t evert(1, 2, Zt) + arc rb3t rb4t evert(1, 3, Zt) + arc rb4t rb5t evert(1, 4, Zt) + arc rb5t rb6t evert(1, 5, Zt) + arc rb6t rb7t evert(1, 6, Zt) + arc rb7t rb0t evert(1, 7, Zt) + + arc ri0t ri1t evert(2, 0, Zt) + arc ri1t ri2t evert(2, 1, Zt) + arc ri2t ri3t evert(2, 2, Zt) + arc ri3t ri4t evert(2, 3, Zt) + arc ri4t ri5t evert(2, 4, Zt) + arc ri5t ri6t evert(2, 5, Zt) + arc ri6t ri7t evert(2, 6, Zt) + arc ri7t ri0t evert(2, 7, Zt) + + arc Rb0t Rb1t evert(3, 0, Zt) + arc Rb1t Rb2t evert(3, 1, Zt) + arc Rb2t Rb3t evert(3, 2, Zt) + arc Rb3t Rb4t evert(3, 3, Zt) + arc Rb4t Rb5t evert(3, 4, Zt) + arc Rb5t Rb6t evert(3, 5, Zt) + arc Rb6t Rb7t evert(3, 6, Zt) + arc Rb7t Rb0t evert(3, 7, Zt) + + arc R0t R1st evert(4, 0, Zt) + arc R1t R2t evert(4, 1, Zt) + arc R2t R3st evert(4, 2, Zt) + arc R3t R4t evert(4, 3, Zt) + arc R4t R5st evert(4, 4, Zt) + arc R5t R6t evert(4, 5, Zt) + arc R6t R7st evert(4, 6, Zt) + arc R7t R0t evert(4, 7, Zt) +); + +patches +( + wall rotor + ( + quad2D(r0, r1) + quad2D(r1, r2s) + quad2D(r2, r3) + quad2D(r3, r4s) + quad2D(r4, r5) + quad2D(r5, r6s) + quad2D(r6, r7) + quad2D(r7, r0s) + + quad2D(r0, rb0) + quad2D(r0s, rb0) + + quad2D(r2, rb2) + quad2D(r2s, rb2) + + quad2D(r4, rb4) + quad2D(r4s, rb4) + + quad2D(r6, rb6) + quad2D(r6s, rb6) + ) + + wall stator + ( + quad2D(R0, R1s) + quad2D(R1, R2) + quad2D(R2, R3s) + quad2D(R3, R4) + quad2D(R4, R5s) + quad2D(R5, R6) + quad2D(R6, R7s) + quad2D(R7, R0) + + quad2D(R1, Rb1) + quad2D(R1s, Rb1) + + quad2D(R3, Rb3) + quad2D(R3s, Rb3) + + quad2D(R5, Rb5) + quad2D(R5s, Rb5) + + quad2D(R7, Rb7) + quad2D(R7s, Rb7) + ) + + empty front + ( + frontQuad(r0, r1, rb1, rb0) + frontQuad(r1, r2s, rb2, rb1) + frontQuad(r2, r3, rb3, rb2) + frontQuad(r3, r4s, rb4, rb3) + frontQuad(r4, r5, rb5, rb4) + frontQuad(r5, r6s, rb6, rb5) + frontQuad(r6, r7, rb7, rb6) + frontQuad(r7, r0s, rb0, rb7) + frontQuad(rb0, rb1, ri1, ri0) + frontQuad(rb1, rb2, ri2, ri1) + frontQuad(rb2, rb3, ri3, ri2) + frontQuad(rb3, rb4, ri4, ri3) + frontQuad(rb4, rb5, ri5, ri4) + frontQuad(rb5, rb6, ri6, ri5) + frontQuad(rb6, rb7, ri7, ri6) + frontQuad(rb7, rb0, ri0, ri7) + frontQuad(ri0, ri1, Rb1, Rb0) + frontQuad(ri1, ri2, Rb2, Rb1) + frontQuad(ri2, ri3, Rb3, Rb2) + frontQuad(ri3, ri4, Rb4, Rb3) + frontQuad(ri4, ri5, Rb5, Rb4) + frontQuad(ri5, ri6, Rb6, Rb5) + frontQuad(ri6, ri7, Rb7, Rb6) + frontQuad(ri7, ri0, Rb0, Rb7) + frontQuad(Rb0, Rb1, R1s, R0) + frontQuad(Rb1, Rb2, R2, R1) + frontQuad(Rb2, Rb3, R3s, R2) + frontQuad(Rb3, Rb4, R4, R3) + frontQuad(Rb4, Rb5, R5s, R4) + frontQuad(Rb5, Rb6, R6, R5) + frontQuad(Rb6, Rb7, R7s, R6) + frontQuad(Rb7, Rb0, R0, R7) + ) + + empty back + ( + backQuad(r0, r1, rb1, rb0) + backQuad(r1, r2s, rb2, rb1) + backQuad(r2, r3, rb3, rb2) + backQuad(r3, r4s, rb4, rb3) + backQuad(r4, r5, rb5, rb4) + backQuad(r5, r6s, rb6, rb5) + backQuad(r6, r7, rb7, rb6) + backQuad(r7, r0s, rb0, rb7) + backQuad(rb0, rb1, ri1, ri0) + backQuad(rb1, rb2, ri2, ri1) + backQuad(rb2, rb3, ri3, ri2) + backQuad(rb3, rb4, ri4, ri3) + backQuad(rb4, rb5, ri5, ri4) + backQuad(rb5, rb6, ri6, ri5) + backQuad(rb6, rb7, ri7, ri6) + backQuad(rb7, rb0, ri0, ri7) + backQuad(ri0, ri1, Rb1, Rb0) + backQuad(ri1, ri2, Rb2, Rb1) + backQuad(ri2, ri3, Rb3, Rb2) + backQuad(ri3, ri4, Rb4, Rb3) + backQuad(ri4, ri5, Rb5, Rb4) + backQuad(ri5, ri6, Rb6, Rb5) + backQuad(ri6, ri7, Rb7, Rb6) + backQuad(ri7, ri0, Rb0, Rb7) + backQuad(Rb0, Rb1, R1s, R0) + backQuad(Rb1, Rb2, R2, R1) + backQuad(Rb2, Rb3, R3s, R2) + backQuad(Rb3, Rb4, R4, R3) + backQuad(Rb4, Rb5, R5s, R4) + backQuad(Rb5, Rb6, R6, R5) + backQuad(Rb6, Rb7, R7s, R6) + backQuad(Rb7, Rb0, R0, R7) + ) +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/controlDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/controlDict new file mode 100644 index 00000000000..8ac877bb69f --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/controlDict @@ -0,0 +1,55 @@ +/*--------------------------------*- 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 controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application reactingMultiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSchemes new file mode 100644 index 00000000000..4cd730fdd38 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- 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 +{ + "div\(phi,alpha.*\)" Gauss vanLeer; + "div\(phir,alpha.*,alpha.*\)" Gauss vanLeer; + + "div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; + + "div\(alphaRhoPhi.*,(h|e).*\)" Gauss limitedLinear 1; + "div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,p\)" Gauss limitedLinear 1; + + "div\(\(\(\(alpha.*\*thermo:rho.*\)*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSolution b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSolution new file mode 100644 index 00000000000..a49313e5c00 --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/fvSolution @@ -0,0 +1,109 @@ +/*--------------------------------*- 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.*" + { + nAlphaSubCycles 2; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-7; + relTol 0; + nVcycles 2; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + tolerance 1e-7; + relTol 0; + maxIter 30; + } + + pcorr + { + $p_rghFinal; + tolerance 1e-5; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-5; + relTol 0; + minIter 1; + } + + "e.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + minIter 1; + maxIter 10; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/topoSetDict b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/topoSetDict new file mode 100644 index 00000000000..bf749449bfe --- /dev/null +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/system/topoSetDict @@ -0,0 +1,32 @@ +/*--------------------------------*- 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 topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name rotor; + type cellSet; + action new; + source zoneToCell; + sourceInfo + { + name rotor; + } + } +); + +// ************************************************************************* // -- GitLab