From f771192d5c2e92f4f7c533320df00ea7020ea16b Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 1 Sep 2022 17:51:18 +0100 Subject: [PATCH] solvers::compressibleVoF: New solver module for compressible two-phase flow with VoF executed with foamRun for single region simulations of foamMultiRun for multi-region simulations. Replaces compressibleInterFoam and all the corresponding tutorials have been updated and moved to tutorials/modules/compressibleVoF. Class Foam::solvers::compressibleVoF Description Solver module for for 2 compressible, non-isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, with optional mesh motion and mesh topology changes including adaptive re-meshing. The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. Either mixture or two-phase transport modelling may be selected. In the mixture approach a single laminar, RAS or LES model is selected to model the momentum stress. In the Euler-Euler two-phase approach separate laminar, RAS or LES selected models are selected for each of the phases. Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and pseudo-transient and steady simulations. Optional fvModels and fvConstraints are provided to enhance the simulation in many ways including adding various sources, Lagrangian particles, surface film etc. and constraining or limiting the solution. SourceFiles compressibleVoF.C See also Foam::solvers::fluidSolver --- .../fluid/compressibleVoF}/Allwclean | 0 .../fluid/compressibleVoF}/Allwmake | 0 .../modules/fluid/compressibleVoF/Make/files | 9 + .../fluid/compressibleVoF}/Make/options | 18 +- .../compressibleVoF}/VoFClouds/Make/files | 0 .../compressibleVoF}/VoFClouds/Make/options | 0 .../compressibleVoF}/VoFClouds/VoFClouds.C | 0 .../compressibleVoF}/VoFClouds/VoFClouds.H | 0 .../VoFSolidificationMeltingSource.C | 0 .../VoFSolidificationMeltingSource.H | 0 .../VoFSurfaceFilm/Make/files | 0 .../VoFSurfaceFilm/Make/options | 0 .../VoFPatchTransfer/VoFPatchTransfer.C | 2 +- .../VoFPatchTransfer/VoFPatchTransfer.H | 2 +- .../VoFSurfaceFilm/VoFSurfaceFilm.C | 0 .../VoFSurfaceFilm/VoFSurfaceFilm.H | 0 .../VoFTurbulenceDamping/Make/files | 0 .../VoFTurbulenceDamping/Make/options | 0 .../VoFTurbulenceDamping.C | 0 .../VoFTurbulenceDamping.H | 0 .../fluid/compressibleVoF/alphaPredictor.C | 110 ++++++ .../fluid/compressibleVoF}/alphaSuSp.H | 0 .../Make/files | 0 .../Make/options | 0 .../compressibleInterPhaseTransportModel.C | 2 +- .../compressibleInterPhaseTransportModel.H | 2 +- .../compressibleTwoPhaseMixture/Make/files | 0 .../compressibleTwoPhaseMixture/Make/options | 0 .../compressibleTwoPhaseMixture.C | 2 +- .../compressibleTwoPhaseMixture.H | 2 +- .../fluid/compressibleVoF/compressibleVoF.C | 368 ++++++++++++++++++ .../fluid/compressibleVoF/compressibleVoF.H | 272 +++++++++++++ .../fluid/compressibleVoF/momentumPredictor.C | 69 ++++ .../modules/fluid/compressibleVoF/moveMesh.C | 93 +++++ .../fluid/compressibleVoF/pressureCorrector.C | 222 +++++++++++ .../fluid/compressibleVoF}/rhofs.H | 0 .../fluid/compressibleVoF/setRDeltaT.C | 181 +++++++++ .../surfaceTensionModels/Make/files | 0 .../surfaceTensionModels/Make/options | 0 .../liquidPropertiesSurfaceTension.C | 2 +- .../liquidPropertiesSurfaceTension.H | 2 +- .../compressibleVoF/thermophysicalPredictor.C | 70 ++++ .../twoPhaseChange/Make/files | 0 .../twoPhaseChange/Make/options | 0 .../twoPhaseChange/cavitation/Kunz/Kunz.C | 0 .../twoPhaseChange/cavitation/Kunz/Kunz.H | 0 .../twoPhaseChange/cavitation/Merkle/Merkle.C | 0 .../twoPhaseChange/cavitation/Merkle/Merkle.H | 0 .../cavitation/SchnerrSauer/SchnerrSauer.C | 0 .../cavitation/SchnerrSauer/SchnerrSauer.H | 0 .../cavitationModel/cavitationModel.C | 0 .../cavitationModel/cavitationModel.H | 0 .../noPhaseChange/noPhaseChange.C | 0 .../noPhaseChange/noPhaseChange.H | 0 .../twoPhaseChangeModel/twoPhaseChangeModel.C | 0 .../twoPhaseChangeModel/twoPhaseChangeModel.H | 0 .../twoPhaseChangeModelNew.C | 0 .../modules/fluid/isothermalFluid/Make/files | 1 - .../compressibleInterFoam/Make/files | 4 - .../multiphase/compressibleInterFoam/TEqn.H | 33 -- .../multiphase/compressibleInterFoam/UEqn.H | 33 -- .../compressibleAlphaEqnSubCycle.H | 67 ---- .../compressibleInterFoam.C | 194 --------- .../compressibleInterFoam/correctPhi.H | 21 - .../compressibleInterFoam/createFieldRefs.H | 30 -- .../compressibleInterFoam/createFields.H | 110 ------ .../multiphase/compressibleInterFoam/pEqn.H | 164 -------- ...bleInterFilmFoam => compressibleInterFoam} | 28 +- etc/config.sh/bash_completion | 25 -- src/finiteVolume/Make/files | 1 + .../cfdTools/general}/buoyancy/buoyancy.C | 0 .../cfdTools/general}/buoyancy/buoyancy.H | 0 .../limitTemperature/limitTemperature.H | 2 +- .../twoPhaseMixture/VoF/setDeltaT.H | 17 +- .../compressibleVoF}/ballValve/0/Phi | 0 .../compressibleVoF}/ballValve/0/T | 0 .../modules/compressibleVoF/ballValve/0/U | Bin 0 -> 749834 bytes .../compressibleVoF}/ballValve/0/alpha.water | 0 .../compressibleVoF}/ballValve/0/epsilon | 0 .../compressibleVoF}/ballValve/0/k | 0 .../compressibleVoF}/ballValve/0/nut | 0 .../compressibleVoF}/ballValve/0/p | 0 .../compressibleVoF}/ballValve/0/p_rgh | 0 .../compressibleVoF}/ballValve/Allclean | 0 .../compressibleVoF}/ballValve/Allrun | 0 .../ballValve/constant/dynamicMeshDict | 0 .../compressibleVoF}/ballValve/constant/g | 0 .../ballValve/constant/momentumTransport | 0 .../ballValve/constant/phaseChangeProperties | 0 .../ballValve/constant/phaseProperties | 0 .../constant/physicalProperties.vapour | 0 .../constant/physicalProperties.water | 0 .../ballValve/system/controlDict | 6 +- .../ballValve/system/decomposeParDict | 0 .../ballValve/system/fvSchemes | 0 .../ballValve/system/fvSolution | 0 .../ballValve/system/wallsSurface | 0 .../compressibleVoF}/climbingRod/0/T | 0 .../compressibleVoF}/climbingRod/0/U | 0 .../climbingRod/0/alpha.liquid.orig | 0 .../compressibleVoF}/climbingRod/0/p | 0 .../compressibleVoF}/climbingRod/0/p_rgh | 0 .../climbingRod/0/sigma.liquid | 0 .../compressibleVoF/climbingRod}/Allclean | 0 .../compressibleVoF}/climbingRod/Allrun | 0 .../compressibleVoF}/climbingRod/README | 0 .../climbingRod/constant/fvModels | 0 .../compressibleVoF/climbingRod}/constant/g | 0 .../climbingRod/constant/momentumTransport | 0 .../constant/momentumTransport.air | 0 .../constant/momentumTransport.liquid | 0 .../climbingRod/constant/phaseProperties | 0 .../constant/physicalProperties.air | 0 .../constant/physicalProperties.liquid | 0 .../climbingRod/system/blockMeshDict | 0 .../climbingRod/system/controlDict | 4 +- .../climbingRod/system/extrudeMeshDict | 0 .../climbingRod/system/fvSchemes | 0 .../climbingRod/system/fvSolution | 0 .../climbingRod/system/setFieldsDict | 0 .../compressibleVoF}/cylinder/0/T | 0 .../compressibleVoF}/cylinder/0/U | 0 .../compressibleVoF}/cylinder/0/alpha.liquid | 0 .../compressibleVoF}/cylinder/0/p | 0 .../compressibleVoF}/cylinder/0/p_rgh | 0 .../compressibleVoF}/cylinder/0/wallFilm/T | 0 .../compressibleVoF}/cylinder/0/wallFilm/U | 0 .../cylinder/0/wallFilm/delta | 0 .../compressibleVoF}/cylinder/Allclean | 0 .../compressibleVoF}/cylinder/Allrun | 0 .../cylinder/constant/cloudProperties | 0 .../cylinder/constant/combustionProperties | 0 .../cylinder/constant/fvModels | 0 .../compressibleVoF/cylinder}/constant/g | 0 .../cylinder/constant/momentumTransport | 0 .../constant/parcelInjectionProperties | 0 .../cylinder/constant/phaseProperties | 0 .../cylinder/constant/physicalProperties.air | 0 .../constant/physicalProperties.liquid | 0 .../cylinder/constant/speciesThermo | 0 .../cylinder/constant/surfaceFilmProperties | 0 .../constant/wallFilm/physicalProperties | 0 .../cylinder/system/blockMeshDict | 0 .../cylinder/system/controlDict | 4 +- .../cylinder/system/decomposeParDict | 0 .../cylinder/system/extrudeToRegionMeshDict | 0 .../cylinder/system/fvSchemes | 0 .../cylinder/system/fvSolution | 0 .../cylinder/system/wallFilm/fvSchemes | 0 .../cylinder/system/wallFilm/fvSolution | 0 .../compressibleVoF}/damBreak/0/T | 0 .../compressibleVoF}/damBreak/0/U | 0 .../damBreak/0/alpha.water.orig | 0 .../compressibleVoF}/damBreak/0/epsilon | 0 .../compressibleVoF}/damBreak/0/k | 0 .../compressibleVoF}/damBreak/0/nuTilda | 0 .../compressibleVoF}/damBreak/0/nut | 0 .../compressibleVoF}/damBreak/0/omega | 0 .../compressibleVoF}/damBreak/0/p | 0 .../compressibleVoF}/damBreak/0/p_rgh | 0 .../compressibleVoF/damBreak}/Allclean | 0 .../compressibleVoF}/damBreak/Allrun | 0 .../damBreak/constant/fvModels | 0 .../compressibleVoF/damBreak}/constant/g | 0 .../damBreak/constant/momentumTransport | 0 .../damBreak/constant/phaseProperties | 0 .../damBreak/constant/physicalProperties.air | 0 .../constant/physicalProperties.water | 0 .../damBreak/system/blockMeshDict | 0 .../damBreak/system/controlDict | 4 +- .../damBreak/system/decomposeParDict | 0 .../damBreak/system/fvSchemes | 0 .../damBreak/system/fvSolution | 0 .../damBreak/system/setFieldsDict | 0 .../compressibleVoF}/depthCharge2D/0/T.orig | 0 .../compressibleVoF}/depthCharge2D/0/U | 0 .../depthCharge2D/0/alpha.water.orig | 0 .../compressibleVoF}/depthCharge2D/0/p.orig | 0 .../depthCharge2D/0/p_rgh.orig | 0 .../compressibleVoF}/depthCharge2D/Allclean | 0 .../compressibleVoF}/depthCharge2D/Allrun | 0 .../compressibleVoF}/depthCharge2D/constant/g | 0 .../depthCharge2D/constant/momentumTransport | 0 .../depthCharge2D/constant/phaseProperties | 0 .../constant/physicalProperties.air | 0 .../constant/physicalProperties.water | 0 .../depthCharge2D/system/blockMeshDict | 0 .../depthCharge2D/system/controlDict | 6 +- .../depthCharge2D/system/decomposeParDict | 0 .../depthCharge2D/system/fvSchemes | 0 .../depthCharge2D/system/fvSolution | 0 .../depthCharge2D/system/setFieldsDict | 0 .../compressibleVoF}/depthCharge3D/0/T.orig | 0 .../compressibleVoF}/depthCharge3D/0/U | 0 .../depthCharge3D/0/alpha.water.orig | 0 .../compressibleVoF}/depthCharge3D/0/p.orig | 0 .../depthCharge3D/0/p_rgh.orig | 0 .../compressibleVoF}/depthCharge3D/Allclean | 0 .../compressibleVoF}/depthCharge3D/Allrun | 0 .../compressibleVoF}/depthCharge3D/constant/g | 0 .../depthCharge3D/constant/momentumTransport | 0 .../depthCharge3D/constant/phaseProperties | 0 .../constant/physicalProperties.air | 0 .../constant/physicalProperties.water | 0 .../depthCharge3D/system/blockMeshDict | 0 .../depthCharge3D/system/controlDict | 4 +- .../depthCharge3D/system/decomposeParDict | 0 .../depthCharge3D/system/fvSchemes | 0 .../depthCharge3D/system/fvSolution | 0 .../depthCharge3D/system/setFieldsDict | 0 .../compressibleVoF}/plateFilm/0/T | 0 .../compressibleVoF}/plateFilm/0/U | 0 .../plateFilm/0/alpha.liquid.orig | 0 .../compressibleVoF}/plateFilm/0/p | 0 .../compressibleVoF}/plateFilm/0/p_rgh | 0 .../compressibleVoF}/plateFilm/0/plate/T | 0 .../compressibleVoF}/plateFilm/0/plate/U | 0 .../compressibleVoF}/plateFilm/0/plate/delta | 0 .../compressibleVoF}/plateFilm/Allclean | 0 .../compressibleVoF}/plateFilm/Allrun | 0 .../plateFilm/constant/fvModels | 0 .../compressibleVoF}/plateFilm/constant/g | 0 .../plateFilm/constant/momentumTransport | 0 .../plateFilm/constant/phaseProperties | 0 .../plateFilm/constant/physicalProperties.air | 0 .../constant/physicalProperties.liquid | 0 .../constant/plate/physicalProperties | 0 .../plateFilm/constant/surfaceFilmProperties | 0 .../plateFilm/system/blockMeshDict | 0 .../plateFilm/system/controlDict | 4 +- .../plateFilm/system/extrudeToRegionMeshDict | 0 .../plateFilm/system/fvSchemes | 0 .../plateFilm/system/fvSolution | 0 .../plateFilm/system/plate/fvSchemes | 0 .../plateFilm/system/plate/fvSolution | 0 .../plateFilm/system/setFieldsDict | 0 .../compressibleVoF}/sloshingTank2D/0/T | 0 .../compressibleVoF}/sloshingTank2D/0/T.air | 0 .../compressibleVoF}/sloshingTank2D/0/T.water | 0 .../compressibleVoF}/sloshingTank2D/0/U | 0 .../sloshingTank2D/0/alpha.water.orig | 0 .../compressibleVoF}/sloshingTank2D/0/p | 0 .../compressibleVoF}/sloshingTank2D/0/p_rgh | 0 .../compressibleVoF}/sloshingTank2D/Allclean | 0 .../compressibleVoF}/sloshingTank2D/Allrun | 0 .../sloshingTank2D/constant/dynamicMeshDict | 0 .../sloshingTank2D/constant/g | 0 .../sloshingTank2D/constant/momentumTransport | 0 .../sloshingTank2D/constant/phaseProperties | 0 .../constant/physicalProperties.air | 0 .../constant/physicalProperties.water | 0 .../sloshingTank2D/system/controlDict | 4 +- .../sloshingTank2D/system/decomposeParDict | 0 .../sloshingTank2D/system/fvSchemes | 0 .../sloshingTank2D/system/fvSolution | 0 .../sloshingTank2D/system/setFieldsDict | 0 .../compressibleInterFoam/RAS/ballValve/0/U | 46 --- 257 files changed, 1460 insertions(+), 780 deletions(-) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/Allwclean (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/Allwmake (100%) create mode 100644 applications/solvers/modules/fluid/compressibleVoF/Make/files rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/Make/options (67%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFClouds/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFClouds/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFClouds/VoFClouds.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFClouds/VoFClouds.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSurfaceFilm/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSurfaceFilm/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C (99%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H (98%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSurfaceFilm/VoFSurfaceFilm.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFSurfaceFilm/VoFSurfaceFilm.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFTurbulenceDamping/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFTurbulenceDamping/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFTurbulenceDamping/VoFTurbulenceDamping.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/VoFTurbulenceDamping/VoFTurbulenceDamping.H (100%) create mode 100644 applications/solvers/modules/fluid/compressibleVoF/alphaPredictor.C rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/alphaSuSp.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleInterPhaseTransportModel/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleInterPhaseTransportModel/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C (98%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H (98%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleTwoPhaseMixture/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleTwoPhaseMixture/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C (98%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H (98%) create mode 100644 applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.C create mode 100644 applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.H create mode 100644 applications/solvers/modules/fluid/compressibleVoF/momentumPredictor.C create mode 100644 applications/solvers/modules/fluid/compressibleVoF/moveMesh.C create mode 100644 applications/solvers/modules/fluid/compressibleVoF/pressureCorrector.C rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/rhofs.H (100%) create mode 100644 applications/solvers/modules/fluid/compressibleVoF/setRDeltaT.C rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/surfaceTensionModels/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/surfaceTensionModels/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C (98%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.H (98%) create mode 100644 applications/solvers/modules/fluid/compressibleVoF/thermophysicalPredictor.C rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/Make/files (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/Make/options (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/Kunz/Kunz.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/Kunz/Kunz.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/Merkle/Merkle.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/Merkle/Merkle.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/SchnerrSauer/SchnerrSauer.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/SchnerrSauer/SchnerrSauer.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/cavitationModel/cavitationModel.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/cavitation/cavitationModel/cavitationModel.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/noPhaseChange/noPhaseChange.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/noPhaseChange/noPhaseChange.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/twoPhaseChangeModel/twoPhaseChangeModel.C (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/twoPhaseChangeModel/twoPhaseChangeModel.H (100%) rename applications/solvers/{multiphase/compressibleInterFoam => modules/fluid/compressibleVoF}/twoPhaseChange/twoPhaseChangeModel/twoPhaseChangeModelNew.C (100%) delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/Make/files delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/TEqn.H delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/UEqn.H delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/correctPhi.H delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/createFieldRefs.H delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/createFields.H delete mode 100644 applications/solvers/multiphase/compressibleInterFoam/pEqn.H rename bin/{compressibleInterFilmFoam => compressibleInterFoam} (65%) rename {applications/solvers/modules/fluid/isothermalFluid => src/finiteVolume/cfdTools/general}/buoyancy/buoyancy.C (100%) rename {applications/solvers/modules/fluid/isothermalFluid => src/finiteVolume/cfdTools/general}/buoyancy/buoyancy.H (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/Phi (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/T (100%) create mode 100644 tutorials/modules/compressibleVoF/ballValve/0/U rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/alpha.water (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/epsilon (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/k (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/nut (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/p (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/0/p_rgh (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/dynamicMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/phaseChangeProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/physicalProperties.vapour (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/constant/physicalProperties.water (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/system/controlDict (94%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/system/decomposeParDict (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/ballValve/system/wallsSurface (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/0/T (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/0/alpha.liquid.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/0/p (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/0/p_rgh (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/0/sigma.liquid (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS/damBreak => modules/compressibleVoF/climbingRod}/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/README (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/fvModels (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS/damBreak => modules/compressibleVoF/climbingRod}/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/momentumTransport.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/momentumTransport.liquid (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/constant/physicalProperties.liquid (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/system/blockMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/system/controlDict (94%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/system/extrudeMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/climbingRod/system/setFieldsDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/T (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/alpha.liquid (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/p (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/p_rgh (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/wallFilm/T (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/wallFilm/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/0/wallFilm/delta (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/cloudProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/combustionProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/fvModels (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar/climbingRod => modules/compressibleVoF/cylinder}/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/parcelInjectionProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/physicalProperties.liquid (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/speciesThermo (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/surfaceFilmProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/constant/wallFilm/physicalProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/blockMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/controlDict (94%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/decomposeParDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/extrudeToRegionMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/wallFilm/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/cylinder/system/wallFilm/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/T (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/alpha.water.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/epsilon (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/k (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/nuTilda (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/nut (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/omega (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/p (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/0/p_rgh (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar/climbingRod => modules/compressibleVoF/damBreak}/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/constant/fvModels (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar/cylinder => modules/compressibleVoF/damBreak}/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/constant/physicalProperties.water (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/system/blockMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/system/controlDict (94%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/system/decomposeParDict (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/RAS => modules/compressibleVoF}/damBreak/system/setFieldsDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/0/T.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/0/alpha.water.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/0/p.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/0/p_rgh.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/constant/physicalProperties.water (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/system/blockMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/system/controlDict (92%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/system/decomposeParDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge2D/system/setFieldsDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/0/T.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/0/alpha.water.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/0/p.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/0/p_rgh.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/constant/physicalProperties.water (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/system/blockMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/system/controlDict (94%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/system/decomposeParDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/depthCharge3D/system/setFieldsDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/T (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/alpha.liquid.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/p (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/p_rgh (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/plate/T (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/plate/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/0/plate/delta (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/fvModels (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/physicalProperties.liquid (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/plate/physicalProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/constant/surfaceFilmProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/blockMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/controlDict (94%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/extrudeToRegionMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/plate/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/plate/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/plateFilm/system/setFieldsDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/T (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/T.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/T.water (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/U (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/alpha.water.orig (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/p (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/0/p_rgh (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/Allclean (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/Allrun (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/constant/dynamicMeshDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/constant/g (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/constant/momentumTransport (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/constant/phaseProperties (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/constant/physicalProperties.air (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/constant/physicalProperties.water (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/system/controlDict (96%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/system/decomposeParDict (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/system/fvSchemes (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/system/fvSolution (100%) rename tutorials/{multiphase/compressibleInterFoam/laminar => modules/compressibleVoF}/sloshingTank2D/system/setFieldsDict (100%) delete mode 100644 tutorials/multiphase/compressibleInterFoam/RAS/ballValve/0/U diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/modules/fluid/compressibleVoF/Allwclean similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/Allwclean rename to applications/solvers/modules/fluid/compressibleVoF/Allwclean diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/modules/fluid/compressibleVoF/Allwmake similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/Allwmake rename to applications/solvers/modules/fluid/compressibleVoF/Allwmake diff --git a/applications/solvers/modules/fluid/compressibleVoF/Make/files b/applications/solvers/modules/fluid/compressibleVoF/Make/files new file mode 100644 index 0000000000..d9c9a59678 --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/Make/files @@ -0,0 +1,9 @@ +setRDeltaT.C +moveMesh.C +alphaPredictor.C +momentumPredictor.C +thermophysicalPredictor.C +pressureCorrector.C +compressibleVoF.C + +LIB = $(FOAM_LIBBIN)/libcompressibleVoF diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/modules/fluid/compressibleVoF/Make/options similarity index 67% rename from applications/solvers/multiphase/compressibleInterFoam/Make/options rename to applications/solvers/modules/fluid/compressibleVoF/Make/options index 795c199081..857e2b90fe 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/modules/fluid/compressibleVoF/Make/options @@ -1,36 +1,30 @@ EXE_INC = \ - -I. \ + -I$(FOAM_SOLVERS)/modules/fluid/fluidSolver/lnInclude \ -IcompressibleTwoPhaseMixture \ -IcompressibleInterPhaseTransportModel/lnInclude \ -ItwoPhaseChange/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/fvModels/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude -EXE_LIBS = \ +LIB_LIBS = \ + -lfluidSolver \ -lcompressibleTwoPhaseMixture \ -ltwoPhaseSurfaceTension \ -lfluidThermophysicalModels \ - -lspecie \ -ltwoPhaseMixture \ -ltwoPhaseProperties \ -linterfaceProperties \ -lcompressibleTwoPhaseChangeModels \ - -lmomentumTransportModels \ - -lcompressibleMomentumTransportModels \ -lcompressibleInterPhaseTransportModel \ -lfiniteVolume \ -lfvModels \ -lfvConstraints \ - -lmeshTools + -lmeshTools \ + -lsampling diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/Make/files b/applications/solvers/modules/fluid/compressibleVoF/VoFClouds/Make/files similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFClouds/Make/files rename to applications/solvers/modules/fluid/compressibleVoF/VoFClouds/Make/files diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/Make/options b/applications/solvers/modules/fluid/compressibleVoF/VoFClouds/Make/options similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFClouds/Make/options rename to applications/solvers/modules/fluid/compressibleVoF/VoFClouds/Make/options diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.C b/applications/solvers/modules/fluid/compressibleVoF/VoFClouds/VoFClouds.C similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.C rename to applications/solvers/modules/fluid/compressibleVoF/VoFClouds/VoFClouds.C diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.H b/applications/solvers/modules/fluid/compressibleVoF/VoFClouds/VoFClouds.H similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.H rename to applications/solvers/modules/fluid/compressibleVoF/VoFClouds/VoFClouds.H diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C b/applications/solvers/modules/fluid/compressibleVoF/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C rename to applications/solvers/modules/fluid/compressibleVoF/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H b/applications/solvers/modules/fluid/compressibleVoF/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H rename to applications/solvers/modules/fluid/compressibleVoF/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/Make/files b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/Make/files similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/Make/files rename to applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/Make/files diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/Make/options b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/Make/options similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/Make/options rename to applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/Make/options diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C similarity index 99% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C rename to applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C index ebdb712320..57c95c7e9d 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H similarity index 98% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H rename to applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H index 0d022ecddb..4c2249838f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H +++ b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFSurfaceFilm.C similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C rename to applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFSurfaceFilm.C diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H b/applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFSurfaceFilm.H similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H rename to applications/solvers/modules/fluid/compressibleVoF/VoFSurfaceFilm/VoFSurfaceFilm.H diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/Make/files b/applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/Make/files similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/Make/files rename to applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/Make/files diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/Make/options b/applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/Make/options similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/Make/options rename to applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/Make/options diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C b/applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/VoFTurbulenceDamping.C similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C rename to applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/VoFTurbulenceDamping.C diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H b/applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/VoFTurbulenceDamping.H similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H rename to applications/solvers/modules/fluid/compressibleVoF/VoFTurbulenceDamping/VoFTurbulenceDamping.H diff --git a/applications/solvers/modules/fluid/compressibleVoF/alphaPredictor.C b/applications/solvers/modules/fluid/compressibleVoF/alphaPredictor.C new file mode 100644 index 0000000000..e03deac98a --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/alphaPredictor.C @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "compressibleVoF.H" +#include "interfaceCompression.H" +#include "CMULES.H" +#include "localEulerDdtScheme.H" +#include "CrankNicolsonDdtScheme.H" +#include "subCycle.H" + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::solvers::compressibleVoF::alphaPredictor() +{ + #include "alphaControls.H" + + volScalarField& alpha2(mixture.alpha2()); + + const volScalarField& rho1 = mixture.thermo1().rho(); + const volScalarField& rho2 = mixture.thermo2().rho(); + + tmp talphaPhi1(alphaPhi1); + + if (nAlphaSubCycles > 1) + { + dimensionedScalar totalDeltaT = runTime.deltaT(); + + talphaPhi1 = new surfaceScalarField + ( + IOobject + ( + "alphaPhi1", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar(alphaPhi1.dimensions(), 0) + ); + + surfaceScalarField rhoPhiSum + ( + IOobject + ( + "rhoPhiSum", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar(rhoPhi.dimensions(), 0) + ); + + tmp trSubDeltaT; + + if (LTS) + { + trSubDeltaT = + fv::localEulerDdt::localRSubDeltaT(mesh, nAlphaSubCycles); + } + + for + ( + subCycle alphaSubCycle(alpha1, nAlphaSubCycles); + !(++alphaSubCycle).end(); + ) + { + #include "alphaEqn.H" + talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi1; + rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; + } + + alphaPhi1 = talphaPhi1(); + rhoPhi = rhoPhiSum; + } + else + { + #include "alphaEqn.H" + } + + contErr = + ( + fvc::ddt(rho)()() + fvc::div(rhoPhi)()() + - (fvModels().source(alpha1, rho1)&rho1)() + - (fvModels().source(alpha2, rho2)&rho2)() + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H b/applications/solvers/modules/fluid/compressibleVoF/alphaSuSp.H similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H rename to applications/solvers/modules/fluid/compressibleVoF/alphaSuSp.H diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/Make/files b/applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/Make/files similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/Make/files rename to applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/Make/files diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/Make/options b/applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/Make/options similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/Make/options rename to applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/Make/options diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C b/applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C similarity index 98% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C rename to applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C index 988d640bfa..8b0aeb2951 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C +++ b/applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H b/applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H similarity index 98% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H rename to applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H index 405d5d0d47..6ee5bf48cb 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H +++ b/applications/solvers/modules/fluid/compressibleVoF/compressibleInterPhaseTransportModel/compressibleInterPhaseTransportModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/Make/files b/applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/Make/files similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/Make/files rename to applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/Make/files diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/Make/options b/applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/Make/options similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/Make/options rename to applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/Make/options diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C b/applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C similarity index 98% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C rename to applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C index c3b72b4fe8..a3f6cb4956 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C +++ b/applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H b/applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H similarity index 98% rename from applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H rename to applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H index 4b9284c1a7..fb5689ebcd 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H +++ b/applications/solvers/modules/fluid/compressibleVoF/compressibleTwoPhaseMixture/compressibleTwoPhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.C b/applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.C new file mode 100644 index 0000000000..bba8065dd7 --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.C @@ -0,0 +1,368 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "compressibleVoF.H" +#include "localEulerDdtScheme.H" +#include "hydrostaticInitialisation.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solvers +{ + defineTypeNameAndDebug(compressibleVoF, 0); + addToRunTimeSelectionTable(solver, compressibleVoF, fvMesh); +} +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::solvers::compressibleVoF::correctCoNum() +{ + fluidSolver::correctCoNum(phi); + + alphaCoNum = 0; + scalar meanAlphaCoNum = 0; + + if (mesh.nInternalFaces()) + { + const scalarField sumPhi + ( + mixture.nearInterface()().primitiveField() + *fvc::surfaceSum(mag(phi))().primitiveField() + ); + + alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); + + meanAlphaCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); + } + + Info<< "Interface Courant Number mean: " << meanAlphaCoNum + << " max: " << alphaCoNum << endl; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::solvers::compressibleVoF::compressibleVoF(fvMesh& mesh) +: + fluidSolver(mesh), + + U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + + phi + ( + IOobject + ( + "phi", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + linearInterpolate(U) & mesh.Sf() + ), + + mixture(U, phi), + + alpha1(mixture.alpha1()), + + alphaRestart + ( + typeIOobject + ( + IOobject::groupName("alphaPhi", alpha1.group()), + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ).headerOk() + ), + + buoyancy(mesh), + + p_rgh(buoyancy.p_rgh), + + rho(mixture.rho()), + + dgdt + ( + IOobject + ( + "dgdt", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + alpha1*fvc::div(phi) + ), + + pressureReference + ( + mixture.p(), + p_rgh, + pimple.dict(), + false + ), + + pMin + ( + "pMin", + dimPressure, + mixture + ), + + rhoPhi + ( + IOobject + ( + "rhoPhi", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + fvc::interpolate(rho)*phi + ), + + alphaPhi1 + ( + IOobject + ( + IOobject::groupName("alphaPhi", alpha1.group()), + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + phi*fvc::interpolate(alpha1) + ), + + K("K", 0.5*magSqr(U)), + + turbulence + ( + rho, + U, + phi, + rhoPhi, + alphaPhi1, + mixture + ), + + phaseChangePtr + ( + compressible::twoPhaseChangeModel::New(mixture) + ), + + phaseChange(*phaseChangePtr), + + MRF(mesh) +{ + // Read the controls + read(); + + mesh.schemes().setFluxRequired(p_rgh.name()); + mesh.schemes().setFluxRequired(alpha1.name()); + + if (alphaRestart) + { + Info << "Restarting alpha" << endl; + } + + if (mesh.dynamic()) + { + Info<< "Constructing face momentum Uf" << endl; + + Uf = new surfaceVectorField + ( + IOobject + ( + "Uf", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + fvc::interpolate(U) + ); + } + + if (transient()) + { + correctCoNum(); + } + else if (LTS) + { + Info<< "Using LTS" << endl; + + trDeltaT = tmp + ( + new volScalarField + ( + IOobject + ( + fv::localEulerDdt::rDeltaTName, + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar(dimless/dimTime, 1), + extrapolatedCalculatedFvPatchScalarField::typeName + ) + ); + } + + if (correctPhi) + { + rAU = new volScalarField + ( + IOobject + ( + "rAU", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar(dimTime/dimDensity, 1) + ); + } +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::solvers::compressibleVoF::~compressibleVoF() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::scalar Foam::solvers::compressibleVoF::maxDeltaT() const +{ + const scalar maxAlphaCo + ( + runTime.controlDict().lookup("maxAlphaCo") + ); + + const scalar deltaT = fluidSolver::maxDeltaT(); + + if (alphaCoNum > small) + { + return min + ( + deltaT, + maxAlphaCo/(alphaCoNum + small)*runTime.deltaTValue() + ); + } + else + { + return deltaT; + } +} + + +void Foam::solvers::compressibleVoF::prePredictor() +{ + fvModels().correct(); + alphaPredictor(); + turbulence.correctPhasePhi(); +} + + +void Foam::solvers::compressibleVoF::preSolve() +{ + // Read the controls + read(); + + if (transient()) + { + correctCoNum(); + } + else if (LTS) + { + setRDeltaT(); + } + + // Store divU from the previous mesh so that it can be mapped + // and used in correctPhi to ensure the corrected phi has the + // same divergence + if (correctPhi && mesh.topoChanged()) + { + // Construct and register divU for mapping + divU = new volScalarField + ( + "divU0", + fvc::div(fvc::absolute(phi, U)) + ); + } + + fvModels().preUpdateMesh(); + + // Update the mesh for topology change, mesh to mesh mapping + mesh.update(); +} + + +void Foam::solvers::compressibleVoF::momentumTransportCorrector() +{ + if (pimple.transportCorr()) + { + turbulence.correct(); + } +} + + +void Foam::solvers::compressibleVoF::thermophysicalTransportCorrector() +{} + + +void Foam::solvers::compressibleVoF::postSolve() +{ + divU.clear(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.H b/applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.H new file mode 100644 index 0000000000..256f378e9c --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/compressibleVoF.H @@ -0,0 +1,272 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::solvers::compressibleVoF + +Description + Solver module for for 2 compressible, non-isothermal immiscible fluids + using a VOF (volume of fluid) phase-fraction based interface capturing + approach, with optional mesh motion and mesh topology changes including + adaptive re-meshing. + + The momentum and other fluid properties are of the "mixture" and a single + momentum equation is solved. + + Either mixture or two-phase transport modelling may be selected. In the + mixture approach a single laminar, RAS or LES model is selected to model the + momentum stress. In the Euler-Euler two-phase approach separate laminar, + RAS or LES selected models are selected for each of the phases. + + Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and + pseudo-transient and steady simulations. + + Optional fvModels and fvConstraints are provided to enhance the simulation + in many ways including adding various sources, Lagrangian + particles, surface film etc. and constraining or limiting the solution. + +SourceFiles + compressibleVoF.C + +See also + Foam::solvers::fluidSolver + Foam::solvers::incompressibleFluid + +\*---------------------------------------------------------------------------*/ + +#ifndef compressibleVoF_H +#define compressibleVoF_H + +#include "fluidSolver.H" +#include "compressibleInterPhaseTransportModel.H" +#include "twoPhaseChangeModel.H" +#include "buoyancy.H" +#include "pressureReference.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solvers +{ + +/*---------------------------------------------------------------------------*\ + Class compressibleVoF Declaration +\*---------------------------------------------------------------------------*/ + +class compressibleVoF +: + public fluidSolver +{ + +protected: + + // Kinematic properties + + //- Velocity field + volVectorField U; + + //- Volumetric-flux field + surfaceScalarField phi; + + + // Phase properties + + //- The compressible two-phase mixture + compressibleTwoPhaseMixture mixture; + + //- Reference to the primary phase-fraction + volScalarField& alpha1; + + //- Switch indicating if this is a restart + bool alphaRestart; + + scalar alphaCoNum; + + + // Thermophysical properties + + //- Buoyancy force + solvers::buoyancy buoyancy; + + //- Reference to the buoyant pressure for buoyant cases + // otherwise to the pressure + volScalarField& p_rgh; + + //- Reference to the mixture continuity density field + const volScalarField& rho; + + //- Compressibility source + volScalarField::Internal dgdt; + + + // Pressure reference + + //- Pressure reference + Foam::pressureReference pressureReference; + + //- Minimum pressure + dimensionedScalar pMin; + + + // Kinematic properties + + //- Mass flux field + surfaceScalarField rhoPhi; + + // Phase-1 volumetric flux + surfaceScalarField alphaPhi1; + + //- Kinetic energy field + // Used in the energy equation + volScalarField K; + + + // Momentum transport + + //- Momentum transport model + compressibleInterPhaseTransportModel turbulence; + + autoPtr phaseChangePtr; + + compressible::twoPhaseChangeModel& phaseChange; + + + // Optional models + + //- MRF zone list + IOMRFZoneList MRF; + + + // Cached temporary fields + + tmp rAU; + + tmp contErr; + + //- MULES Correction + tmp talphaPhi1Corr0; + + //- Pointer to the surface momentum field + // used to recreate the flux after mesh-change + autoPtr Uf; + + //- Pointer to the momentum divergence field + // used in correctPhi to ensure the corrected phi has the + // same divergence + autoPtr divU; + + //- Optional LTS reciprocal time-step field + tmp trDeltaT; + + //- Cached momentum matrix + // shared between the momentum predictor and pressure corrector + tmp tUEqn; + + +private: + + // Private Member Functions + + //- Set rDeltaT for LTS + virtual void setRDeltaT(); + + //- Correct the cached Courant numbers + void correctCoNum(); + + //- Solve for the phase-fractions + void alphaPredictor(); + + +public: + + //- Runtime type information + TypeName("compressibleVoF"); + + + // Constructors + + //- Construct from region mesh + compressibleVoF(fvMesh& mesh); + + //- Disallow default bitwise copy construction + compressibleVoF(const compressibleVoF&) = delete; + + + //- Destructor + virtual ~compressibleVoF(); + + + // Member Functions + + //- Return the current maximum time-step for stable solution + virtual scalar maxDeltaT() const; + + //- Called at the start of the time-step, before the PIMPLE loop + virtual void preSolve(); + + //- Called at the start of the PIMPLE loop to move the mesh + virtual bool moveMesh(); + + //- Called at the start of the PIMPLE loop + virtual void prePredictor(); + + //- Construct and optionally solve the momentum equation + virtual void momentumPredictor(); + + //- Construct and solve the energy equation, + // convert to temperature + // and update thermophysical and transport properties + virtual void thermophysicalPredictor(); + + //- Construct and solve the pressure equation in the PISO loop + virtual void pressureCorrector(); + + //- Correct the momentum transport modelling + // Newtonian, non-Newtonian or turbulent + virtual void momentumTransportCorrector(); + + //- Correct the thermophysical transport modelling + virtual void thermophysicalTransportCorrector(); + + //- Called after the PIMPLE loop at the end of the time-step + virtual void postSolve(); + + + // Member Operators + + //- Disallow default bitwise assignment + void operator=(const compressibleVoF&) = delete; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace solvers +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/modules/fluid/compressibleVoF/momentumPredictor.C b/applications/solvers/modules/fluid/compressibleVoF/momentumPredictor.C new file mode 100644 index 0000000000..970c1ada83 --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/momentumPredictor.C @@ -0,0 +1,69 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "compressibleVoF.H" + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::solvers::compressibleVoF::momentumPredictor() +{ + tUEqn = + ( + fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::Sp(contErr(), U) + + MRF.DDt(rho, U) + + turbulence.divDevTau(U) + == + fvModels().source(rho, U) + ); + fvVectorMatrix& UEqn = tUEqn.ref(); + + UEqn.relax(); + + fvConstraints().constrain(UEqn); + + if (pimple.momentumPredictor()) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + ( + mixture.surfaceTensionForce() + - buoyancy.ghf*fvc::snGrad(rho) + - fvc::snGrad(p_rgh) + ) * mesh.magSf() + ) + ); + + fvConstraints().constrain(U); + + K = 0.5*magSqr(U); + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/modules/fluid/compressibleVoF/moveMesh.C b/applications/solvers/modules/fluid/compressibleVoF/moveMesh.C new file mode 100644 index 0000000000..1c22912427 --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/moveMesh.C @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "compressibleVoF.H" +#include "CorrectPhi.H" + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +bool Foam::solvers::compressibleVoF::moveMesh() +{ + if (pimple.firstIter() || pimple.moveMeshOuterCorrectors()) + { + if (correctPhi && !divU.valid()) + { + // Construct and register divU for correctPhi + divU = new volScalarField + ( + "divU0", + fvc::div(fvc::absolute(phi, U)) + ); + } + + // Move the mesh + mesh.move(); + + if (mesh.changing()) + { + buoyancy.moveMesh(); + + MRF.update(); + + if (correctPhi) + { + // Calculate absolute flux + // from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + correctUphiBCs(U, phi, true); + + CorrectPhi + ( + phi, + U, + p_rgh, + surfaceScalarField("rAUf", fvc::interpolate(rAU())), + divU(), + pressureReference, + pimple + ); + + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phi, U); + } + + mixture.correct(); + + meshCourantNo(); + + divU.clear(); + + return true; + } + + divU.clear(); + } + + return false; +} + + +// ************************************************************************* // diff --git a/applications/solvers/modules/fluid/compressibleVoF/pressureCorrector.C b/applications/solvers/modules/fluid/compressibleVoF/pressureCorrector.C new file mode 100644 index 0000000000..95db6cc076 --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/pressureCorrector.C @@ -0,0 +1,222 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "compressibleVoF.H" +#include "constrainHbyA.H" +#include "constrainPressure.H" +#include "adjustPhi.H" + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::solvers::compressibleVoF::pressureCorrector() +{ + volScalarField& p = mixture.p(); + + const volScalarField& alpha2(mixture.alpha2()); + + const volScalarField& rho1 = mixture.rho1(); + const volScalarField& rho2 = mixture.rho2(); + + const volScalarField& psi1 = mixture.thermo1().psi(); + const volScalarField& psi2 = mixture.thermo2().psi(); + + fvVectorMatrix& UEqn = tUEqn.ref(); + + if (rAU.valid()) + { + rAU.ref() = 1.0/UEqn.A(); + } + else + { + rAU = 1.0/UEqn.A(); + } + + surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU())); + + const surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1); + + while (pimple.correct()) + { + volVectorField HbyA(constrainHbyA(rAU()*UEqn.H(), U, p_rgh)); + surfaceScalarField phiHbyA + ( + "phiHbyA", + fvc::flux(HbyA) + + MRF.zeroFilter(fvc::interpolate(rho*rAU())*fvc::ddtCorr(U, phi, Uf)) + ); + + MRF.makeRelative(phiHbyA); + + surfaceScalarField phig + ( + ( + mixture.surfaceTensionForce() + - buoyancy.ghf*fvc::snGrad(rho) + )*rAUf*mesh.magSf() + ); + + phiHbyA += phig; + + // Update the pressure BCs to ensure flux consistency + constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF); + + // Cache the phase change pressure source + fvScalarMatrix Sp_rgh(phaseChange.Sp_rgh(rho, buoyancy.gh, p_rgh)); + + // Make the fluxes relative to the mesh motion + fvc::makeRelative(phiHbyA, U); + + tmp p_rghEqnComp1; + tmp p_rghEqnComp2; + + if (pimple.transonic()) + { + const surfaceScalarField rho1f(fvc::interpolate(rho1)); + const surfaceScalarField rho2f(fvc::interpolate(rho2)); + + surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi); + surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi); + + p_rghEqnComp1 = + ( + (fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f))/rho1 + - fvc::ddt(alpha1) - fvc::div(alphaPhi1) + + (alpha1/rho1) + *correction + ( + psi1*fvm::ddt(p_rgh) + + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) + ) + ); + + p_rghEqnComp2 = + ( + (fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f))/rho2 + - fvc::ddt(alpha2) - fvc::div(alphaPhi2) + + (alpha2/rho2) + *correction + ( + psi2*fvm::ddt(p_rgh) + + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) + ) + ); + } + else + { + const surfaceScalarField rho1f(fvc::interpolate(rho1)); + const surfaceScalarField rho2f(fvc::interpolate(rho2)); + + p_rghEqnComp1 = + ( + (fvc::ddt(alpha1, rho1) + fvc::div(alphaPhi1*rho1f))/rho1 + - fvc::ddt(alpha1) - fvc::div(alphaPhi1) + + (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh)) + ); + + p_rghEqnComp2 = + ( + (fvc::ddt(alpha2, rho2) + fvc::div(alphaPhi2*rho2f))/rho2 + - fvc::ddt(alpha2) - fvc::div(alphaPhi2) + + (alpha2*psi2/rho2)*correction(fvm::ddt(p_rgh)) + ); + } + + if (mesh.moving()) + { + p_rghEqnComp1.ref() += fvc::div(mesh.phi())*alpha1; + p_rghEqnComp2.ref() += fvc::div(mesh.phi())*alpha2; + } + + p_rghEqnComp1.ref() *= pos(alpha1); + p_rghEqnComp2.ref() *= pos(alpha2); + + p_rghEqnComp1.ref() -= + (fvModels().source(alpha1, mixture.thermo1().rho())&rho1)/rho1; + p_rghEqnComp2.ref() -= + (fvModels().source(alpha2, mixture.thermo2().rho())&rho2)/rho2; + + if (pimple.transonic()) + { + p_rghEqnComp1.ref().relax(); + p_rghEqnComp2.ref().relax(); + } + + // Cache p_rgh prior to solve for density update + volScalarField p_rgh_0(p_rgh); + + while (pimple.correctNonOrthogonal()) + { + fvScalarMatrix p_rghEqnIncomp + ( + fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) + == Sp_rgh + ); + + solve + ( + p_rghEqnComp1() + p_rghEqnComp2() + p_rghEqnIncomp + ); + + if (pimple.finalNonOrthogonalIter()) + { + dgdt = + ( + alpha1*(p_rghEqnComp2 & p_rgh) + - alpha2*(p_rghEqnComp1 & p_rgh) + ); + + phi = phiHbyA + p_rghEqnIncomp.flux(); + + p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*buoyancy.gh, pMin); + p_rgh = p - (alpha1*rho1 + alpha2*rho2)*buoyancy.gh; + p_rgh.correctBoundaryConditions(); + + U = HbyA + + rAU()*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf); + U.correctBoundaryConditions(); + fvConstraints().constrain(U); + } + } + + // Correct Uf if the mesh is moving + fvc::correctUf(Uf, U, fvc::absolute(phi, U), MRF); + + // Update densities from change in p_rgh + mixture.thermo1().correctRho(psi1*(p_rgh - p_rgh_0)); + mixture.thermo2().correctRho(psi2*(p_rgh - p_rgh_0)); + mixture.correct(); + + // Correct p_rgh for consistency with p and the updated densities + p_rgh = p - rho*buoyancy.gh; + p_rgh.correctBoundaryConditions(); + } + + K = 0.5*magSqr(U); + + tUEqn.clear(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/rhofs.H b/applications/solvers/modules/fluid/compressibleVoF/rhofs.H similarity index 100% rename from applications/solvers/multiphase/compressibleInterFoam/rhofs.H rename to applications/solvers/modules/fluid/compressibleVoF/rhofs.H diff --git a/applications/solvers/modules/fluid/compressibleVoF/setRDeltaT.C b/applications/solvers/modules/fluid/compressibleVoF/setRDeltaT.C new file mode 100644 index 0000000000..13de7a4783 --- /dev/null +++ b/applications/solvers/modules/fluid/compressibleVoF/setRDeltaT.C @@ -0,0 +1,181 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "compressibleVoF.H" +#include "fvcSmooth.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::solvers::compressibleVoF::setRDeltaT() +{ + volScalarField& rDeltaT = trDeltaT.ref(); + + const dictionary& pimpleDict = pimple.dict(); + + const scalar maxCo + ( + pimpleDict.lookupOrDefault("maxCo", 0.9) + ); + + const scalar maxAlphaCo + ( + pimpleDict.lookupOrDefault("maxAlphaCo", 0.2) + ); + + const scalar rDeltaTSmoothingCoeff + ( + pimpleDict.lookupOrDefault("rDeltaTSmoothingCoeff", 0.1) + ); + + const label nAlphaSpreadIter + ( + pimpleDict.lookupOrDefault