From b7ea5fcc2972b58b7a0f676f12677556c5bb5f82 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 29 Dec 2022 23:53:33 +0000 Subject: [PATCH] solvers::XiFluid: New solver module for compressible premixed/partially-premixed combustion executed with foamRun for single region simulations of foamMultiRun for multi-region simulations. Replaces XiFoam and all the corresponding tutorials have been updated and moved to tutorials/modules/XiFluid. Class Foam::solvers::XiFluid Description Solver module for compressible premixed/partially-premixed combustion with turbulence modelling. Combusting RANS code using the b-Xi two-equation model. Xi may be obtained by either the solution of the Xi transport equation or from an algebraic expression. Both approaches are based on Gulder's flame speed correlation which has been shown to be appropriate by comparison with the results from the spectral model. Strain effects are encorporated directly into the Xi equation but not in the algebraic approximation. Further work need to be done on this issue, particularly regarding the enhanced removal rate caused by flame compression. Analysis using results of the spectral model will be required. For cases involving very lean Propane flames or other flames which are very strain-sensitive, a transport equation for the laminar flame speed is present. This equation is derived using heuristic arguments involving the strain time scale and the strain-rate at extinction. the transport velocity is the same as that for the Xi equation. 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, chemical reactions, combustion, Lagrangian particles, radiation, surface film etc. and constraining or limiting the solution. Reference: \verbatim Greenshields, C. J., & Weller, H. G. (2022). Notes on Computational Fluid Dynamics: General Principles. CFD Direct Ltd.: Reading, UK. \endverbatim SourceFiles XiFluid.C See also Foam::solvers::fluidSolver Foam::solvers::isothermalFluid --- .../combustion/{XiFoam => }/PDRFoam/EaEqn.H | 0 .../combustion/{XiFoam => }/PDRFoam/EauEqn.H | 0 .../{XiFoam => }/PDRFoam/Make/files | 0 .../{XiFoam => }/PDRFoam/Make/options | 5 +- .../combustion/{XiFoam => }/PDRFoam/PDRFoam.C | 0 .../{XiFoam => }/PDRFoam/PDRFoamAutoRefine.C | 0 .../basicXiSubXiEq/basicXiSubXiEq.C | 0 .../basicXiSubXiEq/basicXiSubXiEq.H | 0 .../XiGModels/basicXiSubG/basicXiSubG.C | 0 .../XiGModels/basicXiSubG/basicXiSubG.H | 0 .../dragModels/PDRDragModel/PDRDragModel.C | 2 +- .../dragModels/PDRDragModel/PDRDragModel.H | 0 .../dragModels/PDRDragModel/PDRDragModelNew.C | 2 +- .../PDRModels/dragModels/basic/basic.C | 2 +- .../PDRModels/dragModels/basic/basic.H | 2 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.C | 2 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.H | 2 +- .../combustion/{XiFoam => PDRFoam}/StCorr.H | 0 .../{XiFoam => }/PDRFoam/StCourantNo.H | 0 .../combustion/{XiFoam => }/PDRFoam/UEqn.H | 0 .../XiModels/XiEqModels/Gulder/Gulder.C | 0 .../XiModels/XiEqModels/Gulder/Gulder.H | 0 .../SCOPEBlendXiEq/SCOPEBlendXiEq.C | 0 .../SCOPEBlendXiEq/SCOPEBlendXiEq.H | 0 .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C | 0 .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H | 0 .../XiModels/XiEqModels/XiEqModel/XiEqModel.C | 0 .../XiModels/XiEqModels/XiEqModel/XiEqModel.H | 0 .../XiEqModels/XiEqModel/XiEqModelNew.C | 0 .../instabilityXiEq/instabilityXiEq.C | 0 .../instabilityXiEq/instabilityXiEq.H | 0 .../PDRFoam/XiModels/XiGModels/KTS/KTS.C | 0 .../PDRFoam/XiModels/XiGModels/KTS/KTS.H | 0 .../XiModels/XiGModels/XiGModel/XiGModel.C | 0 .../XiModels/XiGModels/XiGModel/XiGModel.H | 0 .../XiModels/XiGModels/XiGModel/XiGModelNew.C | 0 .../XiGModels/instabilityG/instabilityG.C | 0 .../XiGModels/instabilityG/instabilityG.H | 0 .../PDRFoam/XiModels/XiModel/XiModel.C | 0 .../PDRFoam/XiModels/XiModel/XiModel.H | 0 .../PDRFoam/XiModels/XiModel/XiModelNew.C | 0 .../PDRFoam/XiModels/algebraic/algebraic.C | 0 .../PDRFoam/XiModels/algebraic/algebraic.H | 0 .../PDRFoam/XiModels/fixed/fixed.C | 0 .../PDRFoam/XiModels/fixed/fixed.H | 0 .../PDRFoam/XiModels/transport/transport.C | 0 .../PDRFoam/XiModels/transport/transport.H | 0 .../combustion/{XiFoam => }/PDRFoam/bEqn.H | 0 .../{XiFoam => }/PDRFoam/createFieldRefs.H | 0 .../{XiFoam => }/PDRFoam/createFields.H | 0 .../combustion/{XiFoam => }/PDRFoam/ftEqn.H | 0 .../SCOPE/SCOPELaminarFlameSpeed.C | 0 .../SCOPE/SCOPELaminarFlameSpeed.H | 0 .../combustion/{XiFoam => }/PDRFoam/pEqn.H | 0 .../PDRFoam/readCombustionProperties.H | 0 .../combustion/{XiFoam => }/PDRFoam/rhoEqn.H | 2 +- .../{XiFoam => }/PDRFoam/setDeltaT.H | 0 .../solvers/combustion/XiFoam/Allwclean | 9 - .../solvers/combustion/XiFoam/Allwmake | 12 - .../solvers/combustion/XiFoam/EaEqn.H | 26 - .../solvers/combustion/XiFoam/EauEqn.H | 32 - .../solvers/combustion/XiFoam/Make/files | 3 - applications/solvers/combustion/XiFoam/UEqn.H | 20 - .../solvers/combustion/XiFoam/XiFoam.C | 206 ------ applications/solvers/combustion/XiFoam/bEqn.H | 282 --------- .../solvers/combustion/XiFoam/correctPhi.H | 19 - .../combustion/XiFoam/createFieldRefs.H | 1 - .../solvers/combustion/XiFoam/createFields.H | 157 ----- .../solvers/combustion/XiFoam/ftEqn.H | 30 - .../combustion/XiFoam/ignition/Make/options | 11 - applications/solvers/combustion/XiFoam/pEqn.H | 89 --- .../XiFoam/readCombustionProperties.H | 45 -- applications/solvers/modules/Allwmake | 1 + .../solvers/modules/XiFluid/Make/files | 4 + .../XiFoam => modules/XiFluid}/Make/options | 23 +- .../solvers/modules/XiFluid/XiFluid.C | 199 ++++++ .../solvers/modules/XiFluid/XiFluid.H | 264 ++++++++ .../modules/XiFluid/thermophysicalPredictor.C | 591 ++++++++++++++++++ ...leInterPhaseThermophysicalTransportModel.C | 1 + .../modules/compressibleVoF/compressibleVoF.C | 1 + .../modules/compressibleVoF/compressibleVoF.H | 1 + .../compressibleVoF/pressureCorrector.C | 6 + .../compressibleVoF/thermophysicalPredictor.C | 3 + applications/solvers/modules/fluid/fluid.C | 4 +- .../modules/fluid/thermophysicalPredictor.C | 4 +- .../incompressibleFluid/correctPressure.C | 4 + .../incompressibleFluid/incompressibleFluid.H | 1 + .../incompressibleFluid/momentumPredictor.C | 1 + .../modules/incompressibleFluid/moveMesh.C | 1 + .../incompressibleVoF/incompressibleVoF.C | 1 + .../incompressibleVoF/pressureCorrector.C | 5 + .../isothermalFluid/correctBuoyantPressure.C | 7 + .../modules/isothermalFluid/correctPressure.C | 7 + .../modules/isothermalFluid/isothermalFluid.C | 13 +- .../modules/isothermalFluid/isothermalFluid.H | 8 +- .../isothermalFluid/momentumPredictor.C | 1 + .../modules/isothermalFluid/setRDeltaT.C | 1 + .../multicomponentFluid/multicomponentFluid.C | 2 + .../thermophysicalPredictor.C | 3 +- .../cavitation/cavitation.C | 2 +- .../kineticTheoryModel/kineticTheoryModel.C | 2 + .../AnisothermalPhaseModel.C | 4 + .../StationaryPhaseModel.C | 1 + bin/XiFoam | 46 ++ etc/config.sh/bash_completion | 50 +- .../incompressible/RAS/qZeta/qZeta.C | 1 + .../LES/LESfilters/LESfilter/LESfilter.C | 3 +- .../anisotropicFilter/anisotropicFilter.C | 5 +- .../LESfilters/laplaceFilter/laplaceFilter.C | 4 +- .../LESfilters/simpleFilter/simpleFilter.C | 5 +- .../RAS/LaunderSharmaKE/LaunderSharmaKE.C | 1 + .../RAS/kOmegaSSTSAS/kOmegaSSTSAS.C | 3 +- .../ReynoldsStress/ReynoldsStress.C | 3 +- .../eddyViscosity/eddyViscosity.C | 5 +- .../lambdaThixotropic/lambdaThixotropic.C | 2 + .../linearViscousStress/linearViscousStress.C | 7 +- .../nonlinearEddyViscosity.C | 2 - .../unityLewisEddyDiffusivity.C | 1 + .../cfdTools/general/bound/bound.C | 4 +- src/thermophysicalModels/Allwmake | 2 + .../thermophysicalModels}/ignition/Make/files | 0 .../ignition/Make/options | 5 + .../thermophysicalModels}/ignition/ignite.H | 0 .../thermophysicalModels}/ignition/ignition.C | 3 +- .../thermophysicalModels}/ignition/ignition.H | 2 +- .../ignition/ignitionIO.C | 2 +- .../ignition/ignitionSite.C | 2 +- .../ignition/ignitionSite.H | 2 +- .../ignition/ignitionSiteIO.C | 2 +- .../RAS => modules/XiFluid}/kivaTest/-180/Su | 0 .../RAS => modules/XiFluid}/kivaTest/-180/T | 0 .../RAS => modules/XiFluid}/kivaTest/-180/Tu | 0 .../RAS => modules/XiFluid}/kivaTest/-180/U | 0 .../RAS => modules/XiFluid}/kivaTest/-180/Xi | 0 .../XiFluid}/kivaTest/-180/alphat | 0 .../RAS => modules/XiFluid}/kivaTest/-180/b | 0 .../XiFluid}/kivaTest/-180/epsilon | 0 .../RAS => modules/XiFluid}/kivaTest/-180/ft | 0 .../RAS => modules/XiFluid}/kivaTest/-180/fu | 0 .../RAS => modules/XiFluid}/kivaTest/-180/k | 0 .../RAS => modules/XiFluid}/kivaTest/-180/nut | 0 .../RAS => modules/XiFluid}/kivaTest/-180/p | 0 .../RAS => modules/XiFluid}/kivaTest/Allclean | 0 .../RAS => modules/XiFluid}/kivaTest/Allrun | 0 .../kivaTest/constant/combustionProperties | 0 .../kivaTest/constant/dynamicMeshDict | 0 .../kivaTest/constant/momentumTransport | 0 .../kivaTest/constant/physicalProperties | 0 .../RAS => modules/XiFluid}/kivaTest/otape17 | 0 .../XiFluid}/kivaTest/system/controlDict | 4 +- .../XiFluid}/kivaTest/system/fvSchemes | 33 +- .../XiFluid}/kivaTest/system/fvSolution | 0 .../XiFluid}/moriyoshiHomogeneous/Allclean | 0 .../XiFluid}/moriyoshiHomogeneous/Allrun | 0 .../moriyoshiHomogeneous/0/Su | 0 .../moriyoshiHomogeneous/0/T | 0 .../moriyoshiHomogeneous/0/Tu | 0 .../moriyoshiHomogeneous/0/U | 0 .../moriyoshiHomogeneous/0/Xi | 0 .../moriyoshiHomogeneous/0/alphat | 0 .../moriyoshiHomogeneous/0/b | 0 .../moriyoshiHomogeneous/0/epsilon | 0 .../moriyoshiHomogeneous/0/ft | 0 .../moriyoshiHomogeneous/0/fu | 0 .../moriyoshiHomogeneous/0/k | 0 .../moriyoshiHomogeneous/0/nut | 0 .../moriyoshiHomogeneous/0/p | 0 .../constant/combustionProperties | 0 .../constant/combustionPropertiesInclude | 0 .../combustionPropertiesInclude.hydrogen | 0 .../constant/momentumTransport | 0 .../constant/physicalProperties | 0 .../constant/physicalProperties.hydrogen | 0 .../moriyoshiHomogeneous/system/blockMeshDict | 0 .../system/controlDict.orig | 4 +- .../moriyoshiHomogeneous/system/fvSchemes | 34 +- .../moriyoshiHomogeneous/system/fvSolution | 0 177 files changed, 1305 insertions(+), 1059 deletions(-) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/EaEqn.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/EauEqn.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/Make/files (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/Make/options (96%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRFoam.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRFoamAutoRefine.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C (97%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C (97%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/dragModels/basic/basic.C (98%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/dragModels/basic/basic.H (98%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C (98%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H (98%) rename applications/solvers/combustion/{XiFoam => PDRFoam}/StCorr.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/StCourantNo.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/UEqn.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/KTS/KTS.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/KTS/KTS.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiModel/XiModel.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiModel/XiModel.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/XiModel/XiModelNew.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/algebraic/algebraic.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/algebraic/algebraic.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/fixed/fixed.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/fixed/fixed.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/transport/transport.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/XiModels/transport/transport.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/bEqn.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/createFieldRefs.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/createFields.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/ftEqn.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/pEqn.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/readCombustionProperties.H (100%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/rhoEqn.H (95%) rename applications/solvers/combustion/{XiFoam => }/PDRFoam/setDeltaT.H (100%) delete mode 100755 applications/solvers/combustion/XiFoam/Allwclean delete mode 100755 applications/solvers/combustion/XiFoam/Allwmake delete mode 100644 applications/solvers/combustion/XiFoam/EaEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/EauEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/Make/files delete mode 100644 applications/solvers/combustion/XiFoam/UEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/XiFoam.C delete mode 100644 applications/solvers/combustion/XiFoam/bEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/correctPhi.H delete mode 100644 applications/solvers/combustion/XiFoam/createFieldRefs.H delete mode 100644 applications/solvers/combustion/XiFoam/createFields.H delete mode 100644 applications/solvers/combustion/XiFoam/ftEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/ignition/Make/options delete mode 100644 applications/solvers/combustion/XiFoam/pEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/readCombustionProperties.H create mode 100644 applications/solvers/modules/XiFluid/Make/files rename applications/solvers/{combustion/XiFoam => modules/XiFluid}/Make/options (76%) create mode 100644 applications/solvers/modules/XiFluid/XiFluid.C create mode 100644 applications/solvers/modules/XiFluid/XiFluid.H create mode 100644 applications/solvers/modules/XiFluid/thermophysicalPredictor.C create mode 100755 bin/XiFoam rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/Make/files (100%) create mode 100644 src/thermophysicalModels/ignition/Make/options rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignite.H (100%) rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignition.C (96%) rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignition.H (97%) rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignitionIO.C (96%) rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignitionSite.C (98%) rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignitionSite.H (98%) rename {applications/solvers/combustion/XiFoam => src/thermophysicalModels}/ignition/ignitionSiteIO.C (97%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/Su (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/T (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/Tu (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/U (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/Xi (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/alphat (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/b (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/epsilon (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/ft (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/fu (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/k (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/nut (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/-180/p (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/Allclean (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/Allrun (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/constant/combustionProperties (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/constant/dynamicMeshDict (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/constant/momentumTransport (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/constant/physicalProperties (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/otape17 (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/system/controlDict (96%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/system/fvSchemes (70%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/kivaTest/system/fvSolution (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/Allclean (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/Allrun (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/Su (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/T (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/Tu (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/U (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/Xi (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/alphat (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/b (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/epsilon (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/ft (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/fu (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/k (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/nut (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/0/p (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionProperties (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionPropertiesInclude (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/combustionPropertiesInclude.hydrogen (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/momentumTransport (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/constant/physicalProperties.hydrogen (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/system/blockMeshDict (100%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/system/controlDict.orig (95%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/system/fvSchemes (66%) rename tutorials/{combustion/XiFoam/RAS => modules/XiFluid}/moriyoshiHomogeneous/moriyoshiHomogeneous/system/fvSolution (100%) diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/EaEqn.H b/applications/solvers/combustion/PDRFoam/EaEqn.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/EaEqn.H rename to applications/solvers/combustion/PDRFoam/EaEqn.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/EauEqn.H b/applications/solvers/combustion/PDRFoam/EauEqn.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/EauEqn.H rename to applications/solvers/combustion/PDRFoam/EauEqn.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/Make/files b/applications/solvers/combustion/PDRFoam/Make/files similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/Make/files rename to applications/solvers/combustion/PDRFoam/Make/files diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options similarity index 96% rename from applications/solvers/combustion/XiFoam/PDRFoam/Make/options rename to applications/solvers/combustion/PDRFoam/Make/options index 9528af0e4d..18e1534b9f 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -1,6 +1,4 @@ EXE_INC = \ - -I.. \ - -I../ignition/lnInclude \ -IXiModels/transport \ -IXiModels/fixed \ -IXiModels/algebraic \ @@ -26,6 +24,7 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/ignition/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \ @@ -36,7 +35,6 @@ EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ EXE_LIBS = \ - -lXiIgnition \ -lmeshTools \ -lfluidThermophysicalModels \ -lmulticomponentThermophysicalModels \ @@ -45,6 +43,7 @@ EXE_LIBS = \ -lcompressibleMomentumTransportModels \ -lcoupledThermophysicalTransportModels \ -llaminarFlameSpeedModels \ + -lXiIgnition \ -lfiniteVolume \ -lfvModels \ -lfvConstraints diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRFoam.C rename to applications/solvers/combustion/PDRFoam/PDRFoam.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRFoamAutoRefine.C rename to applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C rename to applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H rename to applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C rename to applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H rename to applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C similarity index 97% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C rename to applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C index ede45c71b9..3ed09bd9b9 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H rename to applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C similarity index 97% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C rename to applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 9fc3c64556..c33caf232e 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C similarity index 98% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/basic/basic.C rename to applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 6e72f4e038..e090a220d7 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/basic/basic.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H similarity index 98% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/basic/basic.H rename to applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H index a095f511b3..fb767f7c76 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/dragModels/basic/basic.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C similarity index 98% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C rename to applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index c05533a103..56058fac54 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H similarity index 98% rename from applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H rename to applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 0c958e9500..7db8b1f2c4 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/StCorr.H b/applications/solvers/combustion/PDRFoam/StCorr.H similarity index 100% rename from applications/solvers/combustion/XiFoam/StCorr.H rename to applications/solvers/combustion/PDRFoam/StCorr.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/StCourantNo.H b/applications/solvers/combustion/PDRFoam/StCourantNo.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/StCourantNo.H rename to applications/solvers/combustion/PDRFoam/StCourantNo.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/UEqn.H b/applications/solvers/combustion/PDRFoam/UEqn.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/UEqn.H rename to applications/solvers/combustion/PDRFoam/UEqn.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/KTS/KTS.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/KTS/KTS.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiModel/XiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiModel/XiModel.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiModel/XiModel.H rename to applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/XiModel/XiModelNew.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/algebraic/algebraic.C rename to applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/algebraic/algebraic.H rename to applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/fixed/fixed.C b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/fixed/fixed.C rename to applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/fixed/fixed.H rename to applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/transport/transport.C rename to applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/XiModels/transport/transport.H rename to applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/bEqn.H rename to applications/solvers/combustion/PDRFoam/bEqn.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/createFieldRefs.H b/applications/solvers/combustion/PDRFoam/createFieldRefs.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/createFieldRefs.H rename to applications/solvers/combustion/PDRFoam/createFieldRefs.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/createFields.H rename to applications/solvers/combustion/PDRFoam/createFields.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/ftEqn.H b/applications/solvers/combustion/PDRFoam/ftEqn.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/ftEqn.H rename to applications/solvers/combustion/PDRFoam/ftEqn.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C rename to applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H rename to applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/pEqn.H rename to applications/solvers/combustion/PDRFoam/pEqn.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/readCombustionProperties.H b/applications/solvers/combustion/PDRFoam/readCombustionProperties.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/readCombustionProperties.H rename to applications/solvers/combustion/PDRFoam/readCombustionProperties.H diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/rhoEqn.H b/applications/solvers/combustion/PDRFoam/rhoEqn.H similarity index 95% rename from applications/solvers/combustion/XiFoam/PDRFoam/rhoEqn.H rename to applications/solvers/combustion/PDRFoam/rhoEqn.H index aa88c47cbb..c7bb3a7de9 100644 --- a/applications/solvers/combustion/XiFoam/PDRFoam/rhoEqn.H +++ b/applications/solvers/combustion/PDRFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/PDRFoam/setDeltaT.H b/applications/solvers/combustion/PDRFoam/setDeltaT.H similarity index 100% rename from applications/solvers/combustion/XiFoam/PDRFoam/setDeltaT.H rename to applications/solvers/combustion/PDRFoam/setDeltaT.H diff --git a/applications/solvers/combustion/XiFoam/Allwclean b/applications/solvers/combustion/XiFoam/Allwclean deleted file mode 100755 index 5f2ac20eb8..0000000000 --- a/applications/solvers/combustion/XiFoam/Allwclean +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -wclean libso ignition - -wclean -wclean PDRFoam - -#------------------------------------------------------------------------------ diff --git a/applications/solvers/combustion/XiFoam/Allwmake b/applications/solvers/combustion/XiFoam/Allwmake deleted file mode 100755 index 4f5fb28001..0000000000 --- a/applications/solvers/combustion/XiFoam/Allwmake +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Parse arguments for library compilation -. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments - -wmake $targetType ignition - -wmake $targetType -wmake $targetType PDRFoam - -#------------------------------------------------------------------------------ diff --git a/applications/solvers/combustion/XiFoam/EaEqn.H b/applications/solvers/combustion/XiFoam/EaEqn.H deleted file mode 100644 index 3c7917ddbd..0000000000 --- a/applications/solvers/combustion/XiFoam/EaEqn.H +++ /dev/null @@ -1,26 +0,0 @@ -{ - volScalarField& hea = thermo.he(); - - fvScalarMatrix EaEqn - ( - fvm::ddt(rho, hea) + mvConvection->fvmDiv(phi, hea) - + fvc::ddt(rho, K) + fvc::div(phi, K) - + ( - hea.name() == "ea" - ? fvc::div(fvc::absolute(phi, rho, U), p/rho) - : -dpdt - ) - + thermophysicalTransport.divq(hea) - + fvModels.source(rho, hea) - ); - - EaEqn.relax(); - - fvConstraints.constrain(EaEqn); - - EaEqn.solve(); - - fvConstraints.constrain(hea); - - thermo.correct(); -} diff --git a/applications/solvers/combustion/XiFoam/EauEqn.H b/applications/solvers/combustion/XiFoam/EauEqn.H deleted file mode 100644 index 23066e356c..0000000000 --- a/applications/solvers/combustion/XiFoam/EauEqn.H +++ /dev/null @@ -1,32 +0,0 @@ -if (ign.ignited()) -{ - volScalarField& heau = thermo.heu(); - - fvScalarMatrix heauEqn - ( - fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau) - + (fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou() - + ( - heau.name() == "eau" - ? fvc::div(fvc::absolute(phi, rho, U), p/rho) - *rho/thermo.rhou() - : -dpdt*rho/thermo.rhou() - ) - + thermophysicalTransport.divq(heau) - - // These terms cannot be used in partially-premixed combustion due to - // the resultant inconsistency between ft and heau transport. - // A possible solution would be to solve for ftu as well as ft. - //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau) - //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau) - - == - fvModels.source(rho, heau) - ); - - fvConstraints.constrain(heauEqn); - - heauEqn.solve(); - - fvConstraints.constrain(heau); -} diff --git a/applications/solvers/combustion/XiFoam/Make/files b/applications/solvers/combustion/XiFoam/Make/files deleted file mode 100644 index a249e80d66..0000000000 --- a/applications/solvers/combustion/XiFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -XiFoam.C - -EXE = $(FOAM_APPBIN)/XiFoam diff --git a/applications/solvers/combustion/XiFoam/UEqn.H b/applications/solvers/combustion/XiFoam/UEqn.H deleted file mode 100644 index a26acd7134..0000000000 --- a/applications/solvers/combustion/XiFoam/UEqn.H +++ /dev/null @@ -1,20 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) + fvm::div(phi, U) - + MRF.DDt(rho, U) - + turbulence->divDevTau(U) - == - fvModels.source(rho, U) - ); - - UEqn.relax(); - - fvConstraints.constrain(UEqn); - - if (pimple.momentumPredictor()) - { - solve(UEqn == -fvc::grad(p)); - - fvConstraints.constrain(U); - K = 0.5*magSqr(U); - } diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C deleted file mode 100644 index a4e4765ff0..0000000000 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ /dev/null @@ -1,206 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-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 . - -Application - XiFoam - -Description - Solver for compressible premixed/partially-premixed combustion with - turbulence modelling. - - Combusting RANS code using the b-Xi two-equation model. - Xi may be obtained by either the solution of the Xi transport - equation or from an algebraic expression. Both approaches are - based on Gulder's flame speed correlation which has been shown - to be appropriate by comparison with the results from the - spectral model. - - Strain effects are encorporated directly into the Xi equation - but not in the algebraic approximation. Further work need to be - done on this issue, particularly regarding the enhanced removal rate - caused by flame compression. Analysis using results of the spectral - model will be required. - - For cases involving very lean Propane flames or other flames which are - very strain-sensitive, a transport equation for the laminar flame - speed is present. This equation is derived using heuristic arguments - involving the strain time scale and the strain-rate at extinction. - the transport velocity is the same as that for the Xi equation. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "psiuMulticomponentThermo.H" -#include "compressibleMomentumTransportModels.H" -#include "RASThermophysicalTransportModel.H" -#include "unityLewisEddyDiffusivity.H" -#include "laminarFlameSpeed.H" -#include "ignition.H" -#include "Switch.H" -#include "pimpleControl.H" -#include "CorrectPhi.H" -#include "fvModels.H" -#include "fvConstraints.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createMesh.H" - #include "createDyMControls.H" - #include "initContinuityErrs.H" - #include "readCombustionProperties.H" - #include "createFields.H" - #include "createFieldRefs.H" - #include "createRhoUfIfPresent.H" - - turbulence->validate(); - - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (pimple.run(runTime)) - { - #include "readDyMControls.H" - - // Store divrhoU from the previous mesh so that it can be mapped - // and used in correctPhi to ensure the corrected phi has the - // same divergence - autoPtr divrhoU; - if (correctPhi) - { - divrhoU = new volScalarField - ( - "divrhoU", - fvc::div(fvc::absolute(phi, rho, U)) - ); - } - - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - fvModels.preUpdateMesh(); - - // Store momentum to set rhoUf for introduced faces. - autoPtr rhoU; - if (rhoUf.valid()) - { - rhoU = new volVectorField("rhoU", rho*U); - } - - // Update the mesh for topology change, mesh to mesh mapping - mesh.update(); - - runTime++; - - Info<< "Time = " << runTime.userTimeName() << nl << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - if (pimple.firstPimpleIter() || pimple.moveMeshOuterCorrectors()) - { - // Move the mesh - mesh.move(); - - if (mesh.changing()) - { - MRF.update(); - - if (correctPhi) - { - #include "correctPhi.H" - } - - if (checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - } - } - - if - ( - !pimple.simpleRho() - && pimple.firstPimpleIter() - ) - { - #include "rhoEqn.H" - } - - fvModels.correct(); - - if (pimple.predictTransport()) - { - turbulence->predict(); - thermophysicalTransport.predict(); - } - - #include "UEqn.H" - #include "ftEqn.H" - #include "bEqn.H" - #include "EauEqn.H" - #include "EaEqn.H" - - if (!ign.ignited()) - { - thermo.heu() == thermo.he(); - } - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.correctTransport()) - { - turbulence->correct(); - thermophysicalTransport.correct(); - } - } - - rho = thermo.rho(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H deleted file mode 100644 index 9e08594cdb..0000000000 --- a/applications/solvers/combustion/XiFoam/bEqn.H +++ /dev/null @@ -1,282 +0,0 @@ -if (ign.ignited()) -{ - // progress variable - // ~~~~~~~~~~~~~~~~~ - volScalarField c("c", scalar(1) - b); - - // Unburnt gas density - // ~~~~~~~~~~~~~~~~~~~ - volScalarField rhou(thermo.rhou()); - - // Calculate flame normal etc. - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - volVectorField n("n", fvc::grad(b)); - - volScalarField mgb(mag(n)); - - dimensionedScalar dMgb = 1.0e-3* - (b*c*mgb)().weightedAverage(mesh.V()) - /((b*c)().weightedAverage(mesh.V()) + small) - + dimensionedScalar(mgb.dimensions(), small); - - mgb += dMgb; - - surfaceVectorField SfHat(mesh.Sf()/mesh.magSf()); - surfaceVectorField nfVec(fvc::interpolate(n)); - nfVec += SfHat*(fvc::snGrad(b) - (SfHat & nfVec)); - nfVec /= (mag(nfVec) + dMgb); - surfaceScalarField nf((mesh.Sf() & nfVec)); - n /= mgb; - - - #include "StCorr.H" - - // Calculate turbulent flame speed flux - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - surfaceScalarField phiSt("phiSt", fvc::interpolate(rhou*StCorr*Su*Xi)*nf); - - scalar StCoNum = max - ( - mesh.surfaceInterpolation::deltaCoeffs() - *mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf()) - ).value()*runTime.deltaTValue(); - - Info<< "Max St-Courant Number = " << StCoNum << endl; - - // Create b equation - // ~~~~~~~~~~~~~~~~~ - fvScalarMatrix bEqn - ( - fvm::ddt(rho, b) - + mvConvection->fvmDiv(phi, b) - + fvm::div(phiSt, b) - - fvm::Sp(fvc::div(phiSt), b) - - fvm::laplacian(thermophysicalTransport.DEff(b), b) - == - fvModels.source(rho, b) - ); - - - // Add ignition cell contribution to b-equation - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - #include "ignite.H" - - - // Solve for b - // ~~~~~~~~~~~ - bEqn.relax(); - - fvConstraints.constrain(bEqn); - - bEqn.solve(); - - fvConstraints.constrain(b); - - Info<< "min(b) = " << min(b).value() << endl; - - - // Calculate coefficients for Gulder's flame speed correlation - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - volScalarField up(uPrimeCoef*sqrt((2.0/3.0)*turbulence->k())); - // volScalarField up(sqrt(mag(diag(n * n) & diag(turbulence->r())))); - - volScalarField epsilon(pow(uPrimeCoef, 3)*turbulence->epsilon()); - - volScalarField tauEta(sqrt(thermo.muu()/(rhou*epsilon))); - - volScalarField Reta - ( - up - / ( - sqrt(epsilon*tauEta) - + dimensionedScalar(up.dimensions(), 1e-8) - ) - ); - - // volScalarField l = 0.337*k*sqrt(k)/epsilon; - // Reta *= max((l - dimensionedScalar(dimLength, 1.5e-3))/l, 0); - - // Calculate Xi flux - // ~~~~~~~~~~~~~~~~~ - surfaceScalarField phiXi - ( - phiSt - - fvc::interpolate - ( - fvc::laplacian(thermophysicalTransport.DEff(b), b)/mgb - )*nf - + fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf - ); - - - // Calculate mean and turbulent strain rates - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - volVectorField Ut(U + Su*Xi*n); - volScalarField sigmat((n & n)*fvc::div(Ut) - (n & fvc::grad(Ut) & n)); - - volScalarField sigmas - ( - ((n & n)*fvc::div(U) - (n & fvc::grad(U) & n))/Xi - + ( - (n & n)*fvc::div(Su*n) - - (n & fvc::grad(Su*n) & n) - )*(Xi + scalar(1))/(2*Xi) - ); - - - // Calculate the unstrained laminar flame speed - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - volScalarField Su0(unstrainedLaminarFlameSpeed()()); - - - // Calculate the laminar flame speed in equilibrium with the applied strain - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - volScalarField SuInf(Su0*max(scalar(1) - sigmas/sigmaExt, scalar(0.01))); - - if (SuModel == "unstrained") - { - Su == Su0; - } - else if (SuModel == "equilibrium") - { - Su == SuInf; - } - else if (SuModel == "transport") - { - // Solve for the strained laminar flame speed - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - volScalarField Rc - ( - (sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt) - /(sqr(Su0 - SuInf) + sqr(SuMin)) - ); - - fvScalarMatrix SuEqn - ( - fvm::ddt(rho, Su) - + fvm::div(phi + phiXi, Su, "div(phiXi,Su)") - - fvm::Sp(fvc::div(phiXi), Su) - == - - fvm::SuSp(-rho*Rc*Su0/Su, Su) - - fvm::SuSp(rho*(sigmas + Rc), Su) - + fvModels.source(rho, Su) - ); - - SuEqn.relax(); - - fvConstraints.constrain(SuEqn); - - SuEqn.solve(); - - fvConstraints.constrain(Su); - - // Limit the maximum Su - // ~~~~~~~~~~~~~~~~~~~~ - Su.min(SuMax); - Su.max(SuMin); - } - else - { - FatalError - << args.executable() << " : Unknown Su model " << SuModel - << abort(FatalError); - } - - - // Calculate Xi according to the selected flame wrinkling model - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - if (XiModel == "fixed") - { - // Do nothing, Xi is fixed! - } - else if (XiModel == "algebraic") - { - // Simple algebraic model for Xi based on Gulders correlation - // with a linear correction function to give a plausible profile for Xi - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Xi == scalar(1) + - (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) - b)) - *XiCoef*sqrt(up/(Su + SuMin))*Reta; - } - else if (XiModel == "transport") - { - // Calculate Xi transport coefficients based on Gulders correlation - // and DNS data for the rate of generation - // with a linear correction function to give a plausible profile for Xi - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - volScalarField XiEqStar - ( - scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta - ); - - volScalarField XiEq - ( - scalar(1.001) - + ( - scalar(1) - + (2*XiShapeCoef) - *(scalar(0.5) - min(max(b, scalar(0)), scalar(1))) - )*(XiEqStar - scalar(1.001)) - ); - - volScalarField Gstar(0.28/tauEta); - volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1))); - volScalarField G(R*(XiEq - scalar(1.001))/XiEq); - - // R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar; - - // Solve for the flame wrinkling - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - fvScalarMatrix XiEqn - ( - fvm::ddt(rho, Xi) - + fvm::div(phi + phiXi, Xi, "div(phiXi,Xi)") - - fvm::Sp(fvc::div(phiXi), Xi) - == - rho*R - - fvm::Sp(rho*(R - G), Xi) - - fvm::Sp - ( - rho*max - ( - sigmat - sigmas, - dimensionedScalar(sigmat.dimensions(), 0) - ), - Xi - ) - + fvModels.source(rho, Xi) - ); - - XiEqn.relax(); - - fvConstraints.constrain(XiEqn); - - XiEqn.solve(); - - fvConstraints.constrain(Xi); - - // Correct boundedness of Xi - // ~~~~~~~~~~~~~~~~~~~~~~~~~ - Xi.max(1.0); - Info<< "max(Xi) = " << max(Xi).value() << endl; - Info<< "max(XiEq) = " << max(XiEq).value() << endl; - } - else - { - FatalError - << args.executable() << " : Unknown Xi model " << XiModel - << abort(FatalError); - } - - Info<< "Combustion progress = " - << 100*(scalar(1) - b)().weightedAverage(mesh.V()).value() << "%" - << endl; - - St = Xi*Su; -} diff --git a/applications/solvers/combustion/XiFoam/correctPhi.H b/applications/solvers/combustion/XiFoam/correctPhi.H deleted file mode 100644 index d9c9d641fb..0000000000 --- a/applications/solvers/combustion/XiFoam/correctPhi.H +++ /dev/null @@ -1,19 +0,0 @@ -// Calculate absolute flux -// from the mapped surface velocity -phi = mesh.Sf() & rhoUf(); - -correctUphiBCs(rho, U, phi, true); - -CorrectPhi -( - phi, - p, - rho, - psi, - dimensionedScalar("rAUf", dimTime, 1), - divrhoU(), - pimple -); - -// Make the fluxes relative to the mesh-motion -fvc::makeRelative(phi, rho, U); diff --git a/applications/solvers/combustion/XiFoam/createFieldRefs.H b/applications/solvers/combustion/XiFoam/createFieldRefs.H deleted file mode 100644 index 502b3b4230..0000000000 --- a/applications/solvers/combustion/XiFoam/createFieldRefs.H +++ /dev/null @@ -1 +0,0 @@ -const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H deleted file mode 100644 index 002e662d19..0000000000 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ /dev/null @@ -1,157 +0,0 @@ -Info<< "Reading thermophysical properties\n" << endl; - -autoPtr pThermo -( - psiuMulticomponentThermo::New(mesh) -); -psiuMulticomponentThermo& thermo = pThermo(); -thermo.validate(args.executable(), "ha", "ea"); - -basicCombustionMixture& composition = thermo.composition(); - -volScalarField rho -( - IOobject - ( - "rho", - runTime.name(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.renameRho() -); - -volScalarField& p = thermo.p(); - -volScalarField& b = composition.Y("b"); -Info<< "min(b) = " << min(b).value() << endl; - - -Info<< "\nReading field U\n" << endl; -volVectorField U -( - IOobject - ( - "U", - runTime.name(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -#include "compressibleCreatePhi.H" - -mesh.schemes().setFluxRequired(p.name()); - -Info<< "Creating turbulence model\n" << endl; -autoPtr turbulence -( - compressible::momentumTransportModel::New - ( - rho, - U, - phi, - thermo - ) -); - -Info<< "Creating thermophysical transport model\n" << endl; -turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity -< - RASThermophysicalTransportModel - < - ThermophysicalTransportModel - < - compressibleMomentumTransportModel, - fluidThermo - > - > -> thermophysicalTransport(turbulence(), thermo, true); - -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.name(), - mesh - ), - mesh, - dimensionedScalar(p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - -Info<< "Creating field Xi\n" << endl; -volScalarField Xi -( - IOobject - ( - "Xi", - runTime.name(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - - -Info<< "Creating the unstrained laminar flame speed\n" << endl; -autoPtr unstrainedLaminarFlameSpeed -( - laminarFlameSpeed::New(thermo) -); - - -Info<< "Reading strained laminar flame speed field Su\n" << endl; -volScalarField Su -( - IOobject - ( - "Su", - runTime.name(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -dimensionedScalar SuMin = 0.01*Su.average(); -dimensionedScalar SuMax = 4*Su.average(); - -Info<< "Calculating turbulent flame speed field St\n" << endl; -volScalarField St -( - IOobject - ( - "St", - runTime.name(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - Xi*Su -); - - -multivariateSurfaceInterpolationScheme::fieldTable fields; - -if (composition.contains("ft")) -{ - fields.add(composition.Y("ft")); -} - -fields.add(b); -fields.add(thermo.he()); -fields.add(thermo.heu()); - -#include "createMRF.H" -#include "createFvModels.H" -#include "createFvConstraints.H" diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H deleted file mode 100644 index 117995c258..0000000000 --- a/applications/solvers/combustion/XiFoam/ftEqn.H +++ /dev/null @@ -1,30 +0,0 @@ -tmp> mvConvection -( - fv::convectionScheme::New - ( - mesh, - fields, - phi, - mesh.schemes().div("div(phi,ft_b_ha_hau)") - ) -); - -if (composition.contains("ft")) -{ - volScalarField& ft = composition.Y("ft"); - - fvScalarMatrix ftEqn - ( - fvm::ddt(rho, ft) - + mvConvection->fvmDiv(phi, ft) - - fvm::laplacian(thermophysicalTransport.DEff(ft), ft) - == - fvModels.source(rho, ft) - ); - - fvConstraints.constrain(ftEqn); - - ftEqn.solve(); - - fvConstraints.constrain(ft); -} diff --git a/applications/solvers/combustion/XiFoam/ignition/Make/options b/applications/solvers/combustion/XiFoam/ignition/Make/options deleted file mode 100644 index 0929e2bc8f..0000000000 --- a/applications/solvers/combustion/XiFoam/ignition/Make/options +++ /dev/null @@ -1,11 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/fvMotionSolver/lnInclude - -LIB_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -ldynamicMesh \ - -lfvMotionSolvers diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H deleted file mode 100644 index e7a445dab2..0000000000 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ /dev/null @@ -1,89 +0,0 @@ -rho = thermo.rho(); - -volScalarField rAU(1.0/UEqn.A()); -surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); - -surfaceScalarField phiHbyA -( - "phiHbyA", - fvc::interpolate(rho)*fvc::flux(HbyA) - + MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf)) -); - -MRF.makeRelative(fvc::interpolate(rho), phiHbyA); - -// Update the pressure BCs to ensure flux consistency -constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF); - -fvc::makeRelative(phiHbyA, rho, U); - -if (pimple.transonic()) -{ - const surfaceScalarField phid - ( - "phid", - (fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA - ); - - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rhorAUf, p) - == - fvModels.source(psi, p, rho.name()) - ); - - pEqn.solve(); - - if (pimple.finalNonOrthogonalIter()) - { - phi == pEqn.flux(); - } - } -} -else -{ - while (pimple.correctNonOrthogonal()) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvc::div(phiHbyA) - - fvm::laplacian(rhorAUf, p) - == - fvModels.source(psi, p, rho.name()) - ); - - pEqn.solve(); - - if (pimple.finalNonOrthogonalIter()) - { - phi = phiHbyA + pEqn.flux(); - } - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U = HbyA - rAU*fvc::grad(p); -U.correctBoundaryConditions(); -fvConstraints.constrain(U); -K = 0.5*magSqr(U); - -// Correct rhoUf if the mesh is moving -fvc::correctRhoUf(rhoUf, rho, U, phi, MRF); - -if (thermo.dpdt()) -{ - dpdt = fvc::ddt(p); - - if (mesh.moving()) - { - dpdt -= fvc::div(fvc::meshPhi(rho, U), p); - } -} diff --git a/applications/solvers/combustion/XiFoam/readCombustionProperties.H b/applications/solvers/combustion/XiFoam/readCombustionProperties.H deleted file mode 100644 index 58b0626fb4..0000000000 --- a/applications/solvers/combustion/XiFoam/readCombustionProperties.H +++ /dev/null @@ -1,45 +0,0 @@ - Info<< "Reading combustion properties\n" << endl; - - IOdictionary combustionProperties - ( - IOobject - ( - "combustionProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ); - - word SuModel - ( - combustionProperties.lookup("SuModel") - ); - - dimensionedScalar sigmaExt - ( - combustionProperties.lookup("sigmaExt") - ); - - word XiModel - ( - combustionProperties.lookup("XiModel") - ); - - dimensionedScalar XiCoef - ( - combustionProperties.lookup("XiCoef") - ); - - dimensionedScalar XiShapeCoef - ( - combustionProperties.lookup("XiShapeCoef") - ); - - dimensionedScalar uPrimeCoef - ( - combustionProperties.lookup("uPrimeCoef") - ); - - ignition ign(combustionProperties, runTime, mesh); diff --git a/applications/solvers/modules/Allwmake b/applications/solvers/modules/Allwmake index 133d8c9f99..f08b4c7e28 100755 --- a/applications/solvers/modules/Allwmake +++ b/applications/solvers/modules/Allwmake @@ -9,6 +9,7 @@ wmake $targetType incompressibleFluid wmake $targetType isothermalFluid wmake $targetType fluid wmake $targetType multicomponentFluid +wmake $targetType XiFluid wmake $targetType VoFSolver incompressibleVoF/Allwmake $targetType $* compressibleVoF/Allwmake $targetType $* diff --git a/applications/solvers/modules/XiFluid/Make/files b/applications/solvers/modules/XiFluid/Make/files new file mode 100644 index 0000000000..80b9dc16c1 --- /dev/null +++ b/applications/solvers/modules/XiFluid/Make/files @@ -0,0 +1,4 @@ +XiFluid.C +thermophysicalPredictor.C + +LIB = $(FOAM_LIBBIN)/libXiFluid diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/modules/XiFluid/Make/options similarity index 76% rename from applications/solvers/combustion/XiFoam/Make/options rename to applications/solvers/modules/XiFluid/Make/options index 51d632001a..2247441851 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/modules/XiFluid/Make/options @@ -1,21 +1,25 @@ EXE_INC = \ - -Iignition/lnInclude \ - -I$(LIB_SRC)/physicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ + -I$(FOAM_SOLVERS)/modules/fluidSolver/lnInclude \ + -I$(FOAM_SOLVERS)/modules/isothermalFluid/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/fluidThermo/lnInclude \ + -I$(LIB_SRC)/physicalProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/ignition/lnInclude \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude -EXE_LIBS = \ - -lXiIgnition \ +LIB_LIBS = \ + -lfluidSolver \ + -lisothermalFluid \ -lmomentumTransportModels \ -lcompressibleMomentumTransportModels \ -lfluidThermoThermophysicalTransportModels \ @@ -23,6 +27,7 @@ EXE_LIBS = \ -lmulticomponentThermophysicalModels \ -lspecie \ -llaminarFlameSpeedModels \ + -lXiIgnition \ -lfiniteVolume \ -lfvModels \ -lfvConstraints \ diff --git a/applications/solvers/modules/XiFluid/XiFluid.C b/applications/solvers/modules/XiFluid/XiFluid.C new file mode 100644 index 0000000000..7e0de95229 --- /dev/null +++ b/applications/solvers/modules/XiFluid/XiFluid.C @@ -0,0 +1,199 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "XiFluid.H" +#include "localEulerDdtScheme.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solvers +{ + defineTypeNameAndDebug(XiFluid, 0); + addToRunTimeSelectionTable(solver, XiFluid, fvMesh); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::solvers::XiFluid::XiFluid(fvMesh& mesh) +: + isothermalFluid + ( + mesh, + autoPtr(psiuMulticomponentThermo::New(mesh).ptr()) + ), + + thermo(refCast(isothermalFluid::thermo)), + + composition(thermo.composition()), + + b(composition.Y("b")), + + unstrainedLaminarFlameSpeed + ( + laminarFlameSpeed::New(thermo) + ), + + Su + ( + IOobject + ( + "Su", + runTime.name(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + + SuMin(0.01*Su.average()), + SuMax(4*Su.average()), + + Xi + ( + IOobject + ( + "Xi", + runTime.name(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + + St + ( + IOobject + ( + "St", + runTime.name(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Xi*Su + ), + + combustionProperties + ( + IOobject + ( + "combustionProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + ), + + SuModel + ( + combustionProperties.lookup("SuModel") + ), + + sigmaExt + ( + combustionProperties.lookup("sigmaExt") + ), + + XiModel + ( + combustionProperties.lookup("XiModel") + ), + + XiCoef + ( + combustionProperties.lookup("XiCoef") + ), + + XiShapeCoef + ( + combustionProperties.lookup("XiShapeCoef") + ), + + uPrimeCoef + ( + combustionProperties.lookup("uPrimeCoef") + ), + + ign(combustionProperties, runTime, mesh), + + thermophysicalTransport + ( + momentumTransport(), + thermo, + true + ) +{ + thermo.validate(type(), "ha", "ea"); + + if (composition.contains("ft")) + { + fields.add(composition.Y("ft")); + } + + fields.add(b); + fields.add(thermo.he()); + fields.add(thermo.heu()); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::solvers::XiFluid::~XiFluid() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::solvers::XiFluid::prePredictor() +{ + isothermalFluid::prePredictor(); + + if (pimple.predictTransport()) + { + thermophysicalTransport.predict(); + } +} + + +void Foam::solvers::XiFluid::postCorrector() +{ + isothermalFluid::postCorrector(); + + if (pimple.correctTransport()) + { + thermophysicalTransport.correct(); + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/modules/XiFluid/XiFluid.H b/applications/solvers/modules/XiFluid/XiFluid.H new file mode 100644 index 0000000000..cfd5b96105 --- /dev/null +++ b/applications/solvers/modules/XiFluid/XiFluid.H @@ -0,0 +1,264 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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::XiFluid + +Description + Solver module for compressible premixed/partially-premixed combustion with + turbulence modelling. + + Combusting RANS code using the b-Xi two-equation model. + Xi may be obtained by either the solution of the Xi transport + equation or from an algebraic expression. Both approaches are + based on Gulder's flame speed correlation which has been shown + to be appropriate by comparison with the results from the + spectral model. + + Strain effects are encorporated directly into the Xi equation + but not in the algebraic approximation. Further work need to be + done on this issue, particularly regarding the enhanced removal rate + caused by flame compression. Analysis using results of the spectral + model will be required. + + For cases involving very lean Propane flames or other flames which are + very strain-sensitive, a transport equation for the laminar flame + speed is present. This equation is derived using heuristic arguments + involving the strain time scale and the strain-rate at extinction. + the transport velocity is the same as that for the Xi equation. + + 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, chemical reactions, + combustion, Lagrangian particles, radiation, surface film etc. and + constraining or limiting the solution. + + Reference: + \verbatim + Greenshields, C. J., & Weller, H. G. (2022). + Notes on Computational Fluid Dynamics: General Principles. + CFD Direct Ltd.: Reading, UK. + \endverbatim + +SourceFiles + XiFluid.C + +See also + Foam::solvers::fluidSolver + Foam::solvers::isothermalFluid + +\*---------------------------------------------------------------------------*/ + +#ifndef XiFluid_H +#define XiFluid_H + +#include "isothermalFluid.H" +#include "psiuMulticomponentThermo.H" +#include "RASThermophysicalTransportModel.H" +#include "unityLewisEddyDiffusivity.H" +#include "laminarFlameSpeed.H" +#include "ignition.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace solvers +{ + +/*---------------------------------------------------------------------------*\ + Class XiFluid Declaration +\*---------------------------------------------------------------------------*/ + +class XiFluid +: + public isothermalFluid +{ + +protected: + + // Thermophysical properties + + psiuMulticomponentThermo& thermo; + + + // Composition + + //- Reference to the combustion mixture + basicCombustionMixture& composition; + + //- Reference to the combustion regress variable + // obtained from the combustion mixture + volScalarField& b; + + //- Set of fields used for the multivariate convection scheme + multivariateSurfaceInterpolationScheme::fieldTable fields; + + + // Reactions + + //- Laminar flame-speed model + autoPtr unstrainedLaminarFlameSpeed; + + //- Laminar flame-speed field + volScalarField Su; + + //- Minimum laminar flame-speed allowed for numerical stability + dimensionedScalar SuMin; + + //- Maximum laminar flame-speed allowed for numerical stability + dimensionedScalar SuMax; + + //- Flame wrinkling coefficient field + volScalarField Xi; + + //- Turbulent flame-speed field + volScalarField St; + + //- Dictionary of combustion model coefficients + IOdictionary combustionProperties; + + //- Name of the strained laminar flame-speed model + word SuModel; + + //- Laminar flame extinction strain-rate + dimensionedScalar sigmaExt; + + //- Name of the flame wrinkling model + word XiModel; + + //- Flame wrinkling model coefficient + dimensionedScalar XiCoef; + + //- Flame wrinkling model shape coefficient + dimensionedScalar XiShapeCoef; + + //- Flame wrinkling model u' coefficient + dimensionedScalar uPrimeCoef; + + //- Ignition model + ignition ign; + + + // Thermophysical transport + + turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity + < + RASThermophysicalTransportModel + < + ThermophysicalTransportModel + < + compressibleMomentumTransportModel, + fluidThermo + > + > + > thermophysicalTransport; + + + // Protected member functions + + //- Solve the ft equation for partially-premixed mixtures + void ftSolve + ( + const fv::convectionScheme& mvConvection + ); + + //- Calculate and return the turbulent flame-speed kernel correction + dimensionedScalar StCorr + ( + const volScalarField& c, + const surfaceScalarField& nf, + const dimensionedScalar& dMgb + ) const; + + //- Solve the Xi and regress variable equations + void bSolve + ( + const fv::convectionScheme& mvConvection + ); + + //- Solve the unburnt energy equation + void EauSolve + ( + const fv::convectionScheme& mvConvection + ); + + //- Solve the energy equation + void EaSolve + ( + const fv::convectionScheme& mvConvection + ); + + +public: + + //- Runtime type information + TypeName("XiFluid"); + + + // Constructors + + //- Construct from region mesh + XiFluid(fvMesh& mesh); + + //- Disallow default bitwise copy construction + XiFluid(const XiFluid&) = delete; + + + //- Destructor + virtual ~XiFluid(); + + + // Member Functions + + //- Called at the start of the PIMPLE loop + virtual void prePredictor(); + + //- Construct and solve the energy equation, + // convert to temperature + // and update thermophysical and transport properties + virtual void thermophysicalPredictor(); + + //- Correct the momentum and thermophysical transport modelling + virtual void postCorrector(); + + + // Member Operators + + //- Disallow default bitwise assignment + void operator=(const XiFluid&) = delete; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace solvers +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/modules/XiFluid/thermophysicalPredictor.C b/applications/solvers/modules/XiFluid/thermophysicalPredictor.C new file mode 100644 index 0000000000..5e036ed6e3 --- /dev/null +++ b/applications/solvers/modules/XiFluid/thermophysicalPredictor.C @@ -0,0 +1,591 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "XiFluid.H" +#include "fvcSnGrad.H" +#include "fvcLaplacian.H" +#include "fvcDdt.H" +#include "fvcMeshPhi.H" +#include "fvmDiv.H" +#include "fvmSup.H" + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::solvers::XiFluid::ftSolve +( + const fv::convectionScheme& mvConvection +) +{ + volScalarField& ft = composition.Y("ft"); + + fvScalarMatrix ftEqn + ( + fvm::ddt(rho, ft) + + mvConvection.fvmDiv(phi, ft) + - fvm::laplacian(thermophysicalTransport.DEff(ft), ft) + == + fvModels().source(rho, ft) + ); + + fvConstraints().constrain(ftEqn); + + ftEqn.solve(); + + fvConstraints().constrain(ft); +} + + +Foam::dimensionedScalar Foam::solvers::XiFluid::StCorr +( + const volScalarField& c, + const surfaceScalarField& nf, + const dimensionedScalar& dMgb +) const +{ + dimensionedScalar StCorr("StCorr", dimless, 1.0); + + if (ign.igniting()) + { + // Calculate volume of ignition kernel + const dimensionedScalar Vk("Vk", dimVolume, gSum(c*mesh.V().field())); + dimensionedScalar Ak("Ak", dimArea, 0.0); + + if (Vk.value() > small) + { + // Calculate kernel area from its volume + // and the dimensionality of the case + + switch(mesh.nGeometricD()) + { + case 3: + { + // Assume it is part-spherical + const scalar sphereFraction + ( + combustionProperties.lookup + ( + "ignitionSphereFraction" + ) + ); + + Ak = sphereFraction*4.0*constant::mathematical::pi + *pow + ( + 3.0*Vk + /(sphereFraction*4.0*constant::mathematical::pi), + 2.0/3.0 + ); + } + break; + + case 2: + { + // Assume it is part-circular + const dimensionedScalar thickness + ( + combustionProperties.lookup("ignitionThickness") + ); + + const scalar circleFraction + ( + combustionProperties.lookup + ( + "ignitionCircleFraction" + ) + ); + + Ak = circleFraction*constant::mathematical::pi*thickness + *sqrt + ( + 4.0*Vk + /( + circleFraction + *thickness + *constant::mathematical::pi + ) + ); + } + break; + + case 1: + // Assume it is plane or two planes + Ak = dimensionedScalar + ( + combustionProperties.lookup("ignitionKernelArea") + ); + break; + } + + // Calculate kernel area from b field consistent with the + // discretisation of the b equation. + const volScalarField mgb + ( + fvc::div(nf, b, "div(phiSt,b)") - b*fvc::div(nf) + dMgb + ); + const dimensionedScalar AkEst = gSum(mgb*mesh.V().field()); + + StCorr.value() = max(min((Ak/AkEst).value(), 10.0), 1.0); + + Info<< "StCorr = " << StCorr.value() << endl; + } + } + + return StCorr; +} + + +void Foam::solvers::XiFluid::bSolve +( + const fv::convectionScheme& mvConvection +) +{ + // progress variable + // ~~~~~~~~~~~~~~~~~ + const volScalarField c("c", scalar(1) - b); + + // Unburnt gas density + // ~~~~~~~~~~~~~~~~~~~ + const volScalarField rhou(thermo.rhou()); + + // Calculate flame normal etc. + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + volVectorField n("n", fvc::grad(b)); + + volScalarField mgb(mag(n)); + + const dimensionedScalar dMgb = 1.0e-3* + (b*c*mgb)().weightedAverage(mesh.V()) + /((b*c)().weightedAverage(mesh.V()) + small) + + dimensionedScalar(mgb.dimensions(), small); + + mgb += dMgb; + + const surfaceVectorField SfHat(mesh.Sf()/mesh.magSf()); + surfaceVectorField nfVec(fvc::interpolate(n)); + nfVec += SfHat*(fvc::snGrad(b) - (SfHat & nfVec)); + nfVec /= (mag(nfVec) + dMgb); + surfaceScalarField nf((mesh.Sf() & nfVec)); + n /= mgb; + + // Calculate turbulent flame speed flux + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const surfaceScalarField phiSt + ( + "phiSt", + fvc::interpolate(rhou*StCorr(c, nf, dMgb)*Su*Xi)*nf + ); + + const scalar StCoNum = max + ( + mesh.surfaceInterpolation::deltaCoeffs() + *mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf()) + ).value()*runTime.deltaTValue(); + + Info<< "Max St-Courant Number = " << StCoNum << endl; + + // Create b equation + // ~~~~~~~~~~~~~~~~~ + fvScalarMatrix bEqn + ( + fvm::ddt(rho, b) + + mvConvection.fvmDiv(phi, b) + + fvm::div(phiSt, b) + - fvm::Sp(fvc::div(phiSt), b) + - fvm::laplacian(thermophysicalTransport.DEff(b), b) + == + fvModels().source(rho, b) + ); + + + // Add ignition cell contribution to b-equation + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + forAll(ign.sites(), i) + { + const ignitionSite& ignSite = ign.sites()[i]; + + if (ignSite.igniting()) + { + forAll(ignSite.cells(), icelli) + { + label ignCell = ignSite.cells()[icelli]; + Info<< "Igniting cell " << ignCell; + + Info<< " state :" + << ' ' << b[ignCell] + << ' ' << Xi[ignCell] + << ' ' << Su[ignCell] + << ' ' << mgb[ignCell] + << endl; + + bEqn.diag()[ignSite.cells()[icelli]] += + ( + ignSite.strength()*ignSite.cellVolumes()[icelli] + *rhou[ignSite.cells()[icelli]]/ignSite.duration() + )/(b[ignSite.cells()[icelli]] + 0.001); + } + } + } + + + // Solve for b + // ~~~~~~~~~~~ + bEqn.relax(); + + fvConstraints().constrain(bEqn); + + bEqn.solve(); + + fvConstraints().constrain(b); + + Info<< "min(b) = " << min(b).value() << endl; + + + // Calculate coefficients for Gulder's flame speed correlation + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + const volScalarField up(uPrimeCoef*sqrt((2.0/3.0)*momentumTransport->k())); + // volScalarField up(sqrt(mag(diag(n * n) & diag(momentumTransport->r())))); + + const volScalarField epsilon + ( + pow(uPrimeCoef, 3)*momentumTransport->epsilon() + ); + + const volScalarField tauEta(sqrt(thermo.muu()/(rhou*epsilon))); + + const volScalarField Reta + ( + up + / ( + sqrt(epsilon*tauEta) + + dimensionedScalar(up.dimensions(), 1e-8) + ) + ); + + // volScalarField l = 0.337*k*sqrt(k)/epsilon; + // Reta *= max((l - dimensionedScalar(dimLength, 1.5e-3))/l, 0); + + // Calculate Xi flux + // ~~~~~~~~~~~~~~~~~ + const surfaceScalarField phiXi + ( + phiSt + - fvc::interpolate + ( + fvc::laplacian(thermophysicalTransport.DEff(b), b)/mgb + )*nf + + fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf + ); + + + // Calculate mean and turbulent strain rates + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + const volVectorField Ut(U + Su*Xi*n); + const volScalarField sigmat((n & n)*fvc::div(Ut) - (n & fvc::grad(Ut) & n)); + + const volScalarField sigmas + ( + ((n & n)*fvc::div(U) - (n & fvc::grad(U) & n))/Xi + + ( + (n & n)*fvc::div(Su*n) + - (n & fvc::grad(Su*n) & n) + )*(Xi + scalar(1))/(2*Xi) + ); + + + // Calculate the unstrained laminar flame speed + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const volScalarField Su0(unstrainedLaminarFlameSpeed()()); + + + // Calculate the laminar flame speed in equilibrium with the applied strain + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + const volScalarField SuInf + ( + Su0*max(scalar(1) - sigmas/sigmaExt, scalar(0.01)) + ); + + if (SuModel == "unstrained") + { + Su == Su0; + } + else if (SuModel == "equilibrium") + { + Su == SuInf; + } + else if (SuModel == "transport") + { + // Solve for the strained laminar flame speed + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + const volScalarField Rc + ( + (sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt) + /(sqr(Su0 - SuInf) + sqr(SuMin)) + ); + + fvScalarMatrix SuEqn + ( + fvm::ddt(rho, Su) + + fvm::div(phi + phiXi, Su, "div(phiXi,Su)") + - fvm::Sp(fvc::div(phiXi), Su) + == + - fvm::SuSp(-rho*Rc*Su0/Su, Su) + - fvm::SuSp(rho*(sigmas + Rc), Su) + + fvModels().source(rho, Su) + ); + + SuEqn.relax(); + + fvConstraints().constrain(SuEqn); + + SuEqn.solve(); + + fvConstraints().constrain(Su); + + // Limit the maximum Su + // ~~~~~~~~~~~~~~~~~~~~ + Su.min(SuMax); + Su.max(SuMin); + } + else + { + FatalErrorInFunction + << "Unknown Su model " << SuModel + << abort(FatalError); + } + + + // Calculate Xi according to the selected flame wrinkling model + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + if (XiModel == "fixed") + { + // Do nothing, Xi is fixed! + } + else if (XiModel == "algebraic") + { + // Simple algebraic model for Xi based on Gulders correlation + // with a linear correction function to give a plausible profile for Xi + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Xi == scalar(1) + + (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) - b)) + *XiCoef*sqrt(up/(Su + SuMin))*Reta; + } + else if (XiModel == "transport") + { + // Calculate Xi transport coefficients based on Gulders correlation + // and DNS data for the rate of generation + // with a linear correction function to give a plausible profile for Xi + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + const volScalarField XiEqStar + ( + scalar(1.001) + XiCoef*sqrt(up/(Su + SuMin))*Reta + ); + + const volScalarField XiEq + ( + scalar(1.001) + + ( + scalar(1) + + (2*XiShapeCoef) + *(scalar(0.5) - min(max(b, scalar(0)), scalar(1))) + )*(XiEqStar - scalar(1.001)) + ); + + const volScalarField Gstar(0.28/tauEta); + const volScalarField R(Gstar*XiEqStar/(XiEqStar - scalar(1))); + const volScalarField G(R*(XiEq - scalar(1.001))/XiEq); + + // R *= (Gstar + 2*mag(dev(symm(fvc::grad(U)))))/Gstar; + + // Solve for the flame wrinkling + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + fvScalarMatrix XiEqn + ( + fvm::ddt(rho, Xi) + + fvm::div(phi + phiXi, Xi, "div(phiXi,Xi)") + - fvm::Sp(fvc::div(phiXi), Xi) + == + rho*R + - fvm::Sp(rho*(R - G), Xi) + - fvm::Sp + ( + rho*max + ( + sigmat - sigmas, + dimensionedScalar(sigmat.dimensions(), 0) + ), + Xi + ) + + fvModels().source(rho, Xi) + ); + + XiEqn.relax(); + + fvConstraints().constrain(XiEqn); + + XiEqn.solve(); + + fvConstraints().constrain(Xi); + + // Correct boundedness of Xi + // ~~~~~~~~~~~~~~~~~~~~~~~~~ + Xi.max(1.0); + Info<< "max(Xi) = " << max(Xi).value() << endl; + Info<< "max(XiEq) = " << max(XiEq).value() << endl; + } + else + { + FatalErrorInFunction + << "Unknown Xi model " << XiModel + << abort(FatalError); + } + + Info<< "Combustion progress = " + << 100*(scalar(1) - b)().weightedAverage(mesh.V()).value() << "%" + << endl; + + St = Xi*Su; +} + + +void Foam::solvers::XiFluid::EauSolve +( + const fv::convectionScheme& mvConvection +) +{ + volScalarField& heau = thermo.heu(); + + const volScalarField::Internal rhoByRhou(rho()/thermo.rhou()()); + + fvScalarMatrix heauEqn + ( + fvm::ddt(rho, heau) + mvConvection.fvmDiv(phi, heau) + + rhoByRhou + *( + (fvc::ddt(rho, K) + fvc::div(phi, K))() + + pressureWork + ( + heau.name() == "eau" + ? mvConvection.fvcDiv(phi, p/rho)() + : -dpdt + ) + ) + + thermophysicalTransport.divq(heau) + + // These terms cannot be used in partially-premixed combustion due to + // the resultant inconsistency between ft and heau transport. + // A possible solution would be to solve for ftu as well as ft. + //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau) + //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau) + + == + fvModels().source(rho, heau) + ); + + fvConstraints().constrain(heauEqn); + + heauEqn.solve(); + + fvConstraints().constrain(heau); +} + + +void Foam::solvers::XiFluid::EaSolve +( + const fv::convectionScheme& mvConvection +) +{ + volScalarField& hea = thermo.he(); + + fvScalarMatrix EaEqn + ( + fvm::ddt(rho, hea) + mvConvection.fvmDiv(phi, hea) + + fvc::ddt(rho, K) + fvc::div(phi, K) + + pressureWork + ( + hea.name() == "ea" + ? mvConvection.fvcDiv(phi, p/rho)() + : -dpdt + ) + + thermophysicalTransport.divq(hea) + == + ( + buoyancy.valid() + ? fvModels().source(rho, hea) + rho*(U & buoyancy->g) + : fvModels().source(rho, hea) + ) + ); + + EaEqn.relax(); + + fvConstraints().constrain(EaEqn); + + EaEqn.solve(); + + fvConstraints().constrain(hea); +} + + +void Foam::solvers::XiFluid::thermophysicalPredictor() +{ + tmp> mvConvection + ( + fv::convectionScheme::New + ( + mesh, + fields, + phi, + mesh.schemes().div("div(phi,ft_b_ha_hau)") + ) + ); + + if (composition.contains("ft")) + { + ftSolve(mvConvection()); + } + + if (ign.ignited()) + { + bSolve(mvConvection()); + EauSolve(mvConvection()); + } + + EaSolve(mvConvection()); + + if (!ign.ignited()) + { + thermo.heu() == thermo.he(); + } + + thermo.correct(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C index 1edc8f2956..b7d54c842c 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C +++ b/applications/solvers/modules/compressibleVoF/compressibleInterPhaseThermophysicalTransportModel/compressibleInterPhaseThermophysicalTransportModel.C @@ -25,6 +25,7 @@ License #include "compressibleInterPhaseThermophysicalTransportModel.H" #include "compressibleInterPhaseTransportModel.H" +#include "fvcSnGrad.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/compressibleVoF/compressibleVoF.C b/applications/solvers/modules/compressibleVoF/compressibleVoF.C index 8259c63bfe..61c8c2d395 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleVoF.C +++ b/applications/solvers/modules/compressibleVoF/compressibleVoF.C @@ -25,6 +25,7 @@ License #include "compressibleVoF.H" #include "localEulerDdtScheme.H" +#include "fvcDdt.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/compressibleVoF/compressibleVoF.H b/applications/solvers/modules/compressibleVoF/compressibleVoF.H index e4132504ad..13ee50af75 100644 --- a/applications/solvers/modules/compressibleVoF/compressibleVoF.H +++ b/applications/solvers/modules/compressibleVoF/compressibleVoF.H @@ -63,6 +63,7 @@ See also #include "compressibleInterPhaseThermophysicalTransportModel.H" #include "buoyancy.H" #include "pressureReference.H" +#include "fvmSup.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/compressibleVoF/pressureCorrector.C b/applications/solvers/modules/compressibleVoF/pressureCorrector.C index e56fc24039..cfab605fda 100644 --- a/applications/solvers/modules/compressibleVoF/pressureCorrector.C +++ b/applications/solvers/modules/compressibleVoF/pressureCorrector.C @@ -27,6 +27,12 @@ License #include "constrainHbyA.H" #include "constrainPressure.H" #include "adjustPhi.H" +#include "fvcMeshPhi.H" +#include "fvcFlux.H" +#include "fvcDdt.H" +#include "fvcSnGrad.H" +#include "fvcReconstruct.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/compressibleVoF/thermophysicalPredictor.C b/applications/solvers/modules/compressibleVoF/thermophysicalPredictor.C index 21c24a9c99..9dc98b197e 100644 --- a/applications/solvers/modules/compressibleVoF/thermophysicalPredictor.C +++ b/applications/solvers/modules/compressibleVoF/thermophysicalPredictor.C @@ -24,6 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "compressibleVoF.H" +#include "fvcMeshPhi.H" +#include "fvcDdt.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/fluid/fluid.C b/applications/solvers/modules/fluid/fluid.C index 33ce723d80..1a5f2f698c 100644 --- a/applications/solvers/modules/fluid/fluid.C +++ b/applications/solvers/modules/fluid/fluid.C @@ -52,7 +52,9 @@ Foam::solvers::fluid::fluid(fvMesh& mesh) thermo ) ) -{} +{ + thermo.validate(type(), "h", "e"); +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/fluid/thermophysicalPredictor.C b/applications/solvers/modules/fluid/thermophysicalPredictor.C index 40a80ffa83..aa3b6b873e 100644 --- a/applications/solvers/modules/fluid/thermophysicalPredictor.C +++ b/applications/solvers/modules/fluid/thermophysicalPredictor.C @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "fluid.H" +#include "fvcDdt.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // @@ -38,7 +40,7 @@ void Foam::solvers::fluid::thermophysicalPredictor() + pressureWork ( he.name() == "e" - ? fvc::div(phi, p/rho) + ? fvc::div(phi, p/rho)() : -dpdt ) + thermophysicalTransport->divq(he) diff --git a/applications/solvers/modules/incompressibleFluid/correctPressure.C b/applications/solvers/modules/incompressibleFluid/correctPressure.C index 1ca3ca3e66..07d3b744b2 100644 --- a/applications/solvers/modules/incompressibleFluid/correctPressure.C +++ b/applications/solvers/modules/incompressibleFluid/correctPressure.C @@ -27,6 +27,10 @@ License #include "constrainHbyA.H" #include "constrainPressure.H" #include "adjustPhi.H" +#include "fvcMeshPhi.H" +#include "fvcFlux.H" +#include "fvcDdt.H" +#include "fvcSnGrad.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H b/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H index 7cd938886c..61cb5f18fb 100644 --- a/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H +++ b/applications/solvers/modules/incompressibleFluid/incompressibleFluid.H @@ -58,6 +58,7 @@ See also #include "viscosityModel.H" #include "incompressibleMomentumTransportModels.H" #include "pressureReference.H" +#include "IOMRFZoneList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/incompressibleFluid/momentumPredictor.C b/applications/solvers/modules/incompressibleFluid/momentumPredictor.C index a003c422fb..bcdd556927 100644 --- a/applications/solvers/modules/incompressibleFluid/momentumPredictor.C +++ b/applications/solvers/modules/incompressibleFluid/momentumPredictor.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "incompressibleFluid.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/incompressibleFluid/moveMesh.C b/applications/solvers/modules/incompressibleFluid/moveMesh.C index 0357e321e6..830f677589 100644 --- a/applications/solvers/modules/incompressibleFluid/moveMesh.C +++ b/applications/solvers/modules/incompressibleFluid/moveMesh.C @@ -25,6 +25,7 @@ License #include "incompressibleFluid.H" #include "CorrectPhi.H" +#include "geometricZeroField.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C index dee68cae70..7a4a2e5bd5 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C +++ b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C @@ -26,6 +26,7 @@ License #include "incompressibleVoF.H" #include "localEulerDdtScheme.H" #include "CorrectPhi.H" +#include "geometricZeroField.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/incompressibleVoF/pressureCorrector.C b/applications/solvers/modules/incompressibleVoF/pressureCorrector.C index a43f406c82..288e5a67aa 100644 --- a/applications/solvers/modules/incompressibleVoF/pressureCorrector.C +++ b/applications/solvers/modules/incompressibleVoF/pressureCorrector.C @@ -28,6 +28,11 @@ License #include "constrainPressure.H" #include "adjustPhi.H" #include "findRefCell.H" +#include "fvcMeshPhi.H" +#include "fvcFlux.H" +#include "fvcDdt.H" +#include "fvcSnGrad.H" +#include "fvcReconstruct.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/isothermalFluid/correctBuoyantPressure.C b/applications/solvers/modules/isothermalFluid/correctBuoyantPressure.C index d7f550b014..207dafee8f 100644 --- a/applications/solvers/modules/isothermalFluid/correctBuoyantPressure.C +++ b/applications/solvers/modules/isothermalFluid/correctBuoyantPressure.C @@ -27,6 +27,13 @@ License #include "constrainHbyA.H" #include "constrainPressure.H" #include "adjustPhi.H" +#include "fvcMeshPhi.H" +#include "fvcFlux.H" +#include "fvcDdt.H" +#include "fvcSnGrad.H" +#include "fvcReconstruct.H" +#include "fvcVolumeIntegrate.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/isothermalFluid/correctPressure.C b/applications/solvers/modules/isothermalFluid/correctPressure.C index a40fee3a4a..e0a7691085 100644 --- a/applications/solvers/modules/isothermalFluid/correctPressure.C +++ b/applications/solvers/modules/isothermalFluid/correctPressure.C @@ -27,6 +27,13 @@ License #include "constrainHbyA.H" #include "constrainPressure.H" #include "adjustPhi.H" +#include "fvcMeshPhi.H" +#include "fvcFlux.H" +#include "fvcDdt.H" +#include "fvcSnGrad.H" +#include "fvcReconstruct.H" +#include "fvcVolumeIntegrate.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/isothermalFluid/isothermalFluid.C b/applications/solvers/modules/isothermalFluid/isothermalFluid.C index c41e6262e1..a658249215 100644 --- a/applications/solvers/modules/isothermalFluid/isothermalFluid.C +++ b/applications/solvers/modules/isothermalFluid/isothermalFluid.C @@ -26,6 +26,10 @@ License #include "isothermalFluid.H" #include "localEulerDdtScheme.H" #include "hydrostaticInitialisation.H" +#include "fvcMeshPhi.H" +#include "fvcVolumeIntegrate.H" +#include "fvcReconstruct.H" +#include "fvcSnGrad.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -56,10 +60,10 @@ void Foam::solvers::isothermalFluid::continuityErrors() // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // -Foam::tmp +Foam::tmp Foam::solvers::isothermalFluid::pressureWork ( - const tmp& work + const tmp& work ) const { if (mesh.moving()) @@ -71,11 +75,11 @@ Foam::solvers::isothermalFluid::pressureWork fvc::interpolate(rho)*fvc::meshPhi(rho, U), p/rho, "div(phi,(p|rho))" - ); + )(); } else { - return work; + return move(work); } } @@ -178,7 +182,6 @@ Foam::solvers::isothermalFluid::isothermalFluid // Read the controls read(); - thermo.validate("isothermalFluid", "h", "e"); mesh.schemes().setFluxRequired(p.name()); momentumTransport->validate(); diff --git a/applications/solvers/modules/isothermalFluid/isothermalFluid.H b/applications/solvers/modules/isothermalFluid/isothermalFluid.H index f4b406f96f..95d6a0ad7d 100644 --- a/applications/solvers/modules/isothermalFluid/isothermalFluid.H +++ b/applications/solvers/modules/isothermalFluid/isothermalFluid.H @@ -59,6 +59,7 @@ See also #include "compressibleMomentumTransportModels.H" #include "buoyancy.H" #include "pressureReference.H" +#include "IOMRFZoneList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -94,7 +95,7 @@ protected: //- Rate of change of the pressure // Used in the enthalpy equation - volScalarField dpdt; + volScalarField::Internal dpdt; // Optional buoyancy @@ -204,7 +205,10 @@ private: protected: //- Adds the mesh-motion work to the pressure work term provided - tmp pressureWork(const tmp&) const; + tmp pressureWork + ( + const tmp& + ) const; public: diff --git a/applications/solvers/modules/isothermalFluid/momentumPredictor.C b/applications/solvers/modules/isothermalFluid/momentumPredictor.C index b55d9dcaee..206f5dafb5 100644 --- a/applications/solvers/modules/isothermalFluid/momentumPredictor.C +++ b/applications/solvers/modules/isothermalFluid/momentumPredictor.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "isothermalFluid.H" +#include "fvmDiv.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/isothermalFluid/setRDeltaT.C b/applications/solvers/modules/isothermalFluid/setRDeltaT.C index d73082b835..7998fedd0f 100644 --- a/applications/solvers/modules/isothermalFluid/setRDeltaT.C +++ b/applications/solvers/modules/isothermalFluid/setRDeltaT.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "isothermalFluid.H" +#include "fvcFlux.H" #include "fvcSmooth.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/applications/solvers/modules/multicomponentFluid/multicomponentFluid.C b/applications/solvers/modules/multicomponentFluid/multicomponentFluid.C index e7bc0ba203..92f8723a52 100644 --- a/applications/solvers/modules/multicomponentFluid/multicomponentFluid.C +++ b/applications/solvers/modules/multicomponentFluid/multicomponentFluid.C @@ -66,6 +66,8 @@ Foam::solvers::multicomponentFluid::multicomponentFluid(fvMesh& mesh) ) ) { + thermo.validate(type(), "h", "e"); + forAll(Y, i) { fields.add(Y[i]); diff --git a/applications/solvers/modules/multicomponentFluid/thermophysicalPredictor.C b/applications/solvers/modules/multicomponentFluid/thermophysicalPredictor.C index 39bf185e65..d7c37806f2 100644 --- a/applications/solvers/modules/multicomponentFluid/thermophysicalPredictor.C +++ b/applications/solvers/modules/multicomponentFluid/thermophysicalPredictor.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "multicomponentFluid.H" +#include "fvcDdt.H" // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // @@ -80,7 +81,7 @@ void Foam::solvers::multicomponentFluid::thermophysicalPredictor() + pressureWork ( he.name() == "e" - ? mvConvection->fvcDiv(phi, p/rho) + ? mvConvection->fvcDiv(phi, p/rho)() : -dpdt ) + thermophysicalTransport->divq(he) diff --git a/applications/solvers/modules/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C b/applications/solvers/modules/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C index 44ab933a1d..6575e29251 100644 --- a/applications/solvers/modules/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C +++ b/applications/solvers/modules/multiphaseEuler/interfacialModels/phaseTransferModels/cavitation/cavitation.C @@ -25,8 +25,8 @@ License #include "cavitation.H" #include "phaseSystem.H" +#include "zeroGradientFvPatchFields.H" #include "addToRunTimeSelectionTable.H" -#include "fvCFD.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index f22de22bcb..33f824a750 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -26,6 +26,8 @@ License #include "kineticTheoryModel.H" #include "mathematicalConstants.H" #include "phaseSystem.H" +#include "fvcDdt.H" +#include "fvcSup.H" #include "fvModels.H" #include "fvConstraints.H" diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index 5fb7b640d3..af79063c4d 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -25,6 +25,10 @@ License #include "AnisothermalPhaseModel.H" #include "phaseSystem.H" +#include "fvcMeshPhi.H" +#include "fvcDdt.H" +#include "fvmDiv.H" +#include "fvmSup.H" // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C index 257f2451af..fbef4be716 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "StationaryPhaseModel.H" +#include "fvcLaplacian.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/bin/XiFoam b/bin/XiFoam new file mode 100755 index 0000000000..b09b8f2116 --- /dev/null +++ b/bin/XiFoam @@ -0,0 +1,46 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / 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 . +# +# Script +# XiFoam +# +# Description +# Script to inform the user that XiFoam has been superseded +# and replaced by the more general XiFluid solver module +# executed by the foamRun application. +# +#------------------------------------------------------------------------------ + +cat <