From 63da3e9afc27e929989456e80a7fce8d756a7d44 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 30 May 2012 15:19:38 +0100 Subject: [PATCH] Thermodynamics: Rationalization At the specie level: hs = sensible enthalpy ha = absolute (what was total) enthalpy es = sensibly internal energy ea = absolute (what was total) internal energy At top-level Rename total enthalpy h -> ha Rename sensible enthalpy hs -> h Combined h, hs, e and es thermo packages into a single structure. Thermo packages now provide "he" function which may return either enthalpy or internal energy, sensible or absolute according to the run-time selected form alphaEff now returns the effective diffusivity for the particular energy which the thermodynamics package is selected to solve for. --- .../solvers/combustion/PDRFoam/PDRFoam.C | 8 +- .../combustion/PDRFoam/PDRFoamAutoRefine.C | 2 +- .../basicXiSubXiEq/basicXiSubXiEq.C | 2 +- .../basicXiSubXiEq/basicXiSubXiEq.H | 2 +- .../XiGModels/basicXiSubG/basicXiSubG.C | 2 +- .../XiGModels/basicXiSubG/basicXiSubG.H | 2 +- .../dragModels/PDRDragModel/PDRDragModel.H | 2 +- .../XiModels/XiEqModels/Gulder/Gulder.C | 2 +- .../XiModels/XiEqModels/Gulder/Gulder.H | 2 +- .../SCOPEBlendXiEq/SCOPEBlendXiEq.C | 2 +- .../SCOPEBlendXiEq/SCOPEBlendXiEq.H | 2 +- .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C | 2 +- .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H | 2 +- .../XiModels/XiEqModels/XiEqModel/XiEqModel.C | 2 +- .../XiModels/XiEqModels/XiEqModel/XiEqModel.H | 10 +- .../XiEqModels/XiEqModel/XiEqModelNew.C | 4 +- .../instabilityXiEq/instabilityXiEq.C | 2 +- .../instabilityXiEq/instabilityXiEq.H | 2 +- .../PDRFoam/XiModels/XiGModels/KTS/KTS.C | 2 +- .../PDRFoam/XiModels/XiGModels/KTS/KTS.H | 2 +- .../XiModels/XiGModels/XiGModel/XiGModel.C | 2 +- .../XiModels/XiGModels/XiGModel/XiGModel.H | 10 +- .../XiModels/XiGModels/XiGModel/XiGModelNew.C | 4 +- .../XiGModels/instabilityG/instabilityG.C | 2 +- .../XiGModels/instabilityG/instabilityG.H | 2 +- .../PDRFoam/XiModels/XiModel/XiModel.C | 2 +- .../PDRFoam/XiModels/XiModel/XiModel.H | 10 +- .../PDRFoam/XiModels/XiModel/XiModelNew.C | 2 +- .../PDRFoam/XiModels/algebraic/algebraic.C | 2 +- .../PDRFoam/XiModels/algebraic/algebraic.H | 2 +- .../combustion/PDRFoam/XiModels/fixed/fixed.C | 2 +- .../combustion/PDRFoam/XiModels/fixed/fixed.H | 2 +- .../PDRFoam/XiModels/transport/transport.C | 2 +- .../PDRFoam/XiModels/transport/transport.H | 2 +- .../solvers/combustion/PDRFoam/bEqn.H | 8 +- .../solvers/combustion/PDRFoam/createFields.H | 14 +- .../combustion/PDRFoam/{hEqn.H => haEqn.H} | 6 +- .../solvers/combustion/PDRFoam/hauEqn.H | 18 + .../solvers/combustion/PDRFoam/huEqn.H | 18 - .../SCOPE/SCOPELaminarFlameSpeed.C | 24 +- .../SCOPE/SCOPELaminarFlameSpeed.H | 4 +- .../solvers/combustion/XiFoam/XiFoam.C | 8 +- .../solvers/combustion/XiFoam/createFields.H | 16 +- .../solvers/combustion/XiFoam/ftEqn.H | 2 +- applications/solvers/combustion/XiFoam/hEqn.H | 16 - .../solvers/combustion/XiFoam/haEqn.H | 16 + .../solvers/combustion/XiFoam/hauEqn.H | 18 + .../solvers/combustion/XiFoam/huEqn.H | 18 - .../solvers/combustion/chemFoam/chemFoam.C | 2 +- .../combustion/chemFoam/createFields.H | 4 +- .../chemFoam/readInitialConditions.H | 4 +- .../coldEngineFoam/coldEngineFoam.C | 2 +- .../combustion/coldEngineFoam/createFields.H | 8 +- .../combustion/engineFoam/engineFoam.C | 8 +- .../solvers/combustion/fireFoam/YhsEqn.H | 4 +- .../combustion/fireFoam/createFields.H | 4 +- .../solvers/combustion/reactingFoam/YEqn.H | 6 +- .../combustion/reactingFoam/createFields.H | 14 +- .../solvers/combustion/reactingFoam/hsEqn.H | 2 +- .../solvers/combustion/rhoReactingFoam/YEqn.H | 6 +- .../combustion/rhoReactingFoam/createFields.H | 14 +- .../combustion/rhoReactingFoam/hsEqn.H | 2 +- .../rhoCentralFoam/createFields.H | 8 +- .../rhoCentralDyMFoam/rhoCentralDyMFoam.C | 2 +- .../rhoCentralFoam/rhoCentralFoam.C | 2 +- .../compressible/rhoPimpleFoam/createFields.H | 8 +- .../rhoPimpleFoam/rhoPimpleFoam.C | 2 +- .../rhoPimplecFoam/rhoPimplecFoam.C | 2 +- .../rhoPorousMRFLTSPimpleFoam.C | 2 +- .../rhoPorousMRFPimpleFoam.C | 2 +- .../compressible/rhoSimpleFoam/createFields.H | 8 +- .../rhoPorousMRFSimpleFoam.C | 2 +- .../rhoSimpleFoam/rhoSimpleFoam.C | 2 +- .../rhoSimplecFoam/rhoSimplecFoam.C | 2 +- .../compressible/sonicFoam/createFields.H | 8 +- .../sonicFoam/sonicDyMFoam/sonicDyMFoam.C | 2 +- .../compressible/sonicFoam/sonicFoam.C | 2 +- .../buoyantPimpleFoam/buoyantPimpleFoam.C | 2 +- .../buoyantPimpleFoam/createFields.H | 8 +- .../buoyantSimpleFoam/buoyantSimpleFoam.C | 2 +- .../buoyantSimpleFoam/createFields.H | 8 +- .../buoyantSimpleRadiationFoam.C | 2 +- .../chtMultiRegionFoam/chtMultiRegionFoam.C | 2 +- .../chtMultiRegionSimpleFoam.C | 2 +- .../fluid/createFluidFields.H | 23 +- .../chtMultiRegionSimpleFoam/fluid/pEqn.H | 3 - .../fluid/setRegionFluidFields.H | 5 +- .../porousFluid/createPorousFluidFields.H | 4 +- .../porousFluid/setPorousFluidFields.H | 7 +- .../fluid/createFluidFields.H | 23 +- .../chtMultiRegionFoam/fluid/pEqn.H | 3 - .../fluid/setRegionFluidFields.H | 5 +- .../porousFluid/createPorousFluidFields.H | 4 +- .../porousFluid/setPorousFluidFields.H | 5 +- .../LTSReactingParcelFoam/createFields.H | 4 +- .../lagrangian/LTSReactingParcelFoam/hsEqn.H | 2 +- .../coalChemistryFoam/createFields.H | 4 +- .../lagrangian/coalChemistryFoam/hsEqn.H | 2 +- .../createFields.H | 4 +- .../hsEqn.H | 2 +- .../lagrangian/reactingParcelFilmFoam/YEqn.H | 2 +- .../reactingParcelFilmFoam/createFields.H | 4 +- .../lagrangian/reactingParcelFilmFoam/hsEqn.H | 2 +- .../reactingParcelFoam/createFields.H | 4 +- .../lagrangian/reactingParcelFoam/hsEqn.H | 2 +- .../createFields.H | 6 +- .../uncoupledKinematicParcelFoam.C | 2 +- .../wall/wallHeatFlux/createFields.H | 2 +- .../wall/wallHeatFlux/wallHeatFlux.C | 3 +- .../adiabaticFlameT/adiabaticFlameT.C | 5 +- .../equilibriumCO/equilibriumCO.C | 3 +- .../equilibriumFlameT/equilibriumFlameT.C | 5 +- .../mixtureAdiabaticFlameT.C | 5 +- .../reactionRateFlameArea.H | 2 +- .../reactionRateFlameAreaNew.C | 2 +- .../relaxation/relaxation.H | 2 +- .../combustionModel/combustionModelNew.C | 2 +- .../psiChemistryCombustionModel.H | 4 +- .../psiChemistryCombustionModelI.H | 4 +- .../psiCombustionModel/psiCombustionModel.C | 2 +- .../psiCombustionModel/psiCombustionModel.H | 8 +- .../psiCombustionModel/psiCombustionModelI.H | 4 +- .../rhoChemistryCombustionModel.H | 4 +- .../rhoChemistryCombustionModelI.H | 4 +- .../rhoCombustionModel/rhoCombustionModel.C | 2 +- .../rhoCombustionModel/rhoCombustionModel.H | 8 +- .../rhoCombustionModel/rhoCombustionModelI.H | 4 +- .../variableHeatTransfer.C | 6 +- .../Templates/ThermoCloud/ThermoCloud.C | 8 +- .../Templates/ThermoCloud/ThermoCloudI.H | 2 +- .../CompositionModel/CompositionModel.C | 2 +- .../LiquidEvaporation/LiquidEvaporation.C | 2 +- .../LiquidEvaporationBoil.C | 6 +- src/mesh/blockMesh/blockMesh/blockMeshMerge.C | 4 +- .../thermoSingleLayer/thermoSingleLayer.C | 2 +- src/thermophysicalModels/basic/Make/files | 25 +- .../basic/basicThermo/basicThermo.C | 291 +-------- .../basic/basicThermo/basicThermo.H | 178 ++--- .../fixedEnergyFvPatchScalarField.C} | 34 +- .../fixedEnergyFvPatchScalarField.H} | 38 +- .../fixedEnthalpyFvPatchScalarField.C | 131 ---- .../fixedInternalEnergyFvPatchScalarField.H | 139 ---- .../gradientEnergyFvPatchScalarField.C} | 38 +- .../gradientEnergyFvPatchScalarField.H} | 34 +- .../gradientEnthalpyFvPatchScalarField.C | 142 ---- .../gradientEnthalpyFvPatchScalarField.H | 139 ---- .../mixedEnergyFvPatchScalarField.C} | 40 +- .../mixedEnergyFvPatchScalarField.H} | 38 +- .../mixedEnthalpyFvPatchScalarField.C | 152 ----- .../mixedInternalEnergyFvPatchScalarField.H | 139 ---- .../basic/heThermo/heThermo.C | 618 ++++++++++++++++++ .../basic/heThermo/heThermo.H | 256 ++++++++ .../mixtures/basicMixture/basicMixture.H | 4 + .../mixtures/basicMixture/basicMixtures.C | 57 +- .../mixtures/basicMixture/makeBasicMixture.H | 27 +- .../basicPsiThermo/makeBasicPsiThermo.H | 72 -- .../basic/psiThermo/ePsiThermo/ePsiThermo.C | 347 ---------- .../basic/psiThermo/ePsiThermo/ePsiThermo.H | 177 ----- .../basic/psiThermo/ePsiThermo/ePsiThermos.C | 99 --- .../basic/psiThermo/hPsiThermo/hPsiThermo.C | 345 ---------- .../basic/psiThermo/hPsiThermo/hPsiThermo.H | 177 ----- .../basic/psiThermo/hPsiThermo/hPsiThermos.C | 79 --- .../basic/psiThermo/hePsiThermo/hePsiThermo.C | 139 ++++ .../basic/psiThermo/hePsiThermo/hePsiThermo.H | 100 +++ .../hePsiThermo/hePsiThermos.C} | 74 ++- .../basic/psiThermo/hsPsiThermo/hsPsiThermo.C | 345 ---------- .../basic/psiThermo/hsPsiThermo/hsPsiThermo.H | 177 ----- .../psiThermo/hsPsiThermo/hsPsiThermos.C | 79 --- .../psiThermo/psiThermo/makePsiThermo.H} | 87 +-- .../psiThermo.C} | 10 +- .../psiThermo.H} | 28 +- .../psiThermoNew.C} | 12 +- .../basic/rhoThermo/hRhoThermo/hRhoThermo.C | 388 ----------- .../basic/rhoThermo/hRhoThermo/hRhoThermo.H | 193 ------ .../basic/rhoThermo/heRhoThermo/heRhoThermo.C | 138 ++++ .../rhoThermo/heRhoThermo/heRhoThermo.H} | 82 +-- .../heRhoThermos.C} | 65 +- .../basic/rhoThermo/hsRhoThermo/hsRhoThermo.C | 344 ---------- .../basic/rhoThermo/hsRhoThermo/hsRhoThermo.H | 177 ----- .../makeRhoThermo.H} | 70 +- .../rhoThermo.C} | 14 +- .../rhoThermo.H} | 26 +- .../rhoThermoNew.C} | 12 +- .../ODEChemistryModel/ODEChemistryModel.C | 6 +- .../psiChemistryModel/psiChemistryModel.C | 2 +- .../psiChemistryModel/psiChemistryModel.H | 8 +- .../psiChemistryModel/psiChemistryModelI.H | 4 +- .../rhoChemistryModel/rhoChemistryModel.C | 2 +- .../rhoChemistryModel/rhoChemistryModel.H | 8 +- .../rhoChemistryModel/rhoChemistryModelI.H | 4 +- .../laminarFlameSpeed/Gulders/Gulders.C | 16 +- .../laminarFlameSpeed/Gulders/Gulders.H | 4 +- .../laminarFlameSpeed/GuldersEGR/GuldersEGR.C | 20 +- .../laminarFlameSpeed/GuldersEGR/GuldersEGR.H | 4 +- .../laminarFlameSpeed/constant/constant.C | 8 +- .../laminarFlameSpeed/constant/constant.H | 4 +- .../laminarFlameSpeed/laminarFlameSpeed.C | 6 +- .../laminarFlameSpeed/laminarFlameSpeed.H | 12 +- .../laminarFlameSpeed/laminarFlameSpeedNew.C | 4 +- .../radiationModel/radiationModel.C | 26 +- .../radiationModel/radiationModel.H | 5 +- .../reactionThermo/Make/files | 26 +- .../chemistryReader/makeChemistryReaders.C | 2 +- .../hCombustionThermo/hCombustionThermo.C | 66 -- .../hCombustionThermo/makeCombustionThermo.H | 105 --- .../hsCombustionThermo/hsCombustionThermo.C | 66 -- .../hsCombustionThermo/hsCombustionThermo.H | 143 ---- .../hsCombustionThermoNew.C | 148 ----- .../hsCombustionThermo/hsCombustionThermos.C | 179 ----- .../makeHsCombustionThermo.H | 111 ---- .../hPsiMixtureThermo/hPsiMixtureThermo.C | 320 --------- .../hsPsiMixtureThermo/hsPsiMixtureThermo.C | 317 --------- .../hsPsiMixtureThermo/hsPsiMixtureThermo.H | 146 ----- .../fixedUnburntEnthalpyFvPatchScalarField.C | 6 +- ...radientUnburntEnthalpyFvPatchScalarField.C | 8 +- .../mixedUnburntEnthalpyFvPatchScalarField.C | 58 +- .../basicMultiComponentMixture.H | 18 +- .../mixtures/dieselMixture/dieselMixture.C | 19 +- .../mixtures/dieselMixture/dieselMixture.H | 13 +- .../mixtures/egrMixture/egrMixture.C | 19 +- .../mixtures/egrMixture/egrMixture.H | 13 +- .../homogeneousMixture/homogeneousMixture.C | 19 +- .../homogeneousMixture/homogeneousMixture.H | 13 +- .../inhomogeneousMixture.C | 19 +- .../inhomogeneousMixture.H | 13 +- .../multiComponentMixture.C | 19 +- .../multiComponentMixture.H | 11 +- .../veryInhomogeneousMixture.C | 19 +- .../veryInhomogeneousMixture.H | 13 +- .../hePsiReactionThermo/hePsiReactionThermo.C | 141 ++++ .../hePsiReactionThermo.H} | 76 +-- .../hePsiReactionThermos.C} | 122 ++-- .../heheuReactionThermo.C} | 426 ++++-------- .../heheuReactionThermo.H} | 102 ++- .../heheuReactionThermos.C} | 71 +- .../psiReactionThermo/psiReactionThermo.C} | 27 +- .../psiReactionThermo/psiReactionThermo.H} | 58 +- .../psiReactionThermo/psiReactionThermoNew.C} | 24 +- .../psiuReactionThermo/psiuReactionThermo.C} | 49 +- .../psiuReactionThermo/psiuReactionThermo.H} | 59 +- .../psiuReactionThermoNew.C} | 12 +- .../hsReactionThermo/hsReactionThermo.H | 143 ---- .../hsReactionThermo/hsReactionThermoNew.C | 142 ---- .../hsReactionThermo/hsReactionThermos.C | 195 ------ .../hRhoMixtureThermo/hRhoMixtureThermo.C | 319 --------- .../hsRhoMixtureThermo/hsRhoMixtureThermo.C | 319 --------- .../hsRhoMixtureThermo/hsRhoMixtureThermo.H | 147 ----- .../heRhoReactionThermo/heRhoReactionThermo.C | 140 ++++ .../heRhoReactionThermo.H} | 76 +-- .../heRhoReactionThermos.C} | 82 ++- .../rhoReactionThermo}/makeReactionThermo.H | 42 +- .../rhoReactionThermo/rhoReactionThermo.C} | 27 +- .../rhoReactionThermo/rhoReactionThermo.H} | 58 +- .../rhoReactionThermo/rhoReactionThermoNew.C} | 24 +- .../reactions/makeSolidReactionThermo.H | 4 +- src/thermophysicalModels/specie/Make/files | 2 +- .../isobaricPerfectGas.C} | 14 +- .../isobaricPerfectGas.H} | 61 +- .../isobaricPerfectGasI.H} | 60 +- .../specie/include/thermoPhysicsTypes.H | 34 +- .../reaction/reactions/makeChemkinReactions.C | 2 +- .../makeLangmuirHinshelwoodReactions.C | 2 +- .../{makeReactionThermo.H => makeReaction.H} | 6 +- .../reactions/makeReactionThermoReactions.C | 2 +- .../absoluteEnthalpy/absoluteEnthalpy.H | 109 +++ .../specie/thermo/eConst/eConstThermo.H | 4 +- .../specie/thermo/eConst/eConstThermoI.H | 2 +- .../specie/thermo/hConst/hConstThermo.H | 4 +- .../specie/thermo/hConst/hConstThermoI.H | 2 +- .../thermo/hPolynomial/hPolynomialThermo.H | 4 +- .../thermo/hPolynomial/hPolynomialThermoI.H | 4 +- .../specie/thermo/janaf/janafThermo.H | 4 +- .../specie/thermo/janaf/janafThermoI.H | 4 +- .../sensibleEnthalpy/sensibleEnthalpy.H | 109 +++ .../sensibleInternalEnergy.H | 109 +++ .../specie/thermo/specieThermo/specieThermo.C | 29 +- .../specie/thermo/specieThermo/specieThermo.H | 107 ++- .../thermo/specieThermo/specieThermoI.H | 326 ++++++--- .../specie/transport/const/constTransport.H | 5 +- .../specie/transport/const/constTransportI.H | 7 - .../polynomial/polynomialTransport.H | 5 +- .../polynomial/polynomialTransportI.H | 10 - .../speciesTransport/speciesTransport.C | 71 -- .../speciesTransport/speciesTransportI.H | 34 - .../sutherland/sutherlandTransport.C | 2 +- .../sutherland/sutherlandTransport.H | 5 +- .../sutherland/sutherlandTransportI.H | 10 - .../fixedTemperature/fixedTemperature.C | 4 +- .../compressible/LES/LESModel/LESModel.H | 21 +- ...ayatillekeWallFunctionFvPatchScalarField.C | 14 +- ...ayatillekeWallFunctionFvPatchScalarField.H | 2 +- .../compressible/RAS/RASModel/RASModel.H | 21 +- .../htcConv/htcConvFvPatchScalarField.C | 2 +- ...ayatillekeWallFunctionFvPatchScalarField.C | 9 +- .../temperatureCoupledBase.C | 3 +- ...peratureThermoBaffle1DFvPatchScalarField.C | 8 +- ...RateAdvectiveDiffusiveFvPatchScalarField.C | 4 +- .../turbulenceModel/laminar/laminar.H | 21 + .../turbulenceModel/turbulenceModel.H | 6 + tutorials/Alltest | 4 +- .../constant/thermophysicalProperties | 2 +- .../system/fvSchemes | 10 +- .../system/fvSolution | 4 +- .../XiFoam/les/pitzDaily/0/alphaSgs | 4 +- .../constant/thermophysicalProperties | 2 +- .../XiFoam/les/pitzDaily/system/fvSchemes | 14 +- .../XiFoam/les/pitzDaily/system/fvSolution | 4 +- .../XiFoam/les/pitzDaily3D/0/alphaSgs | 4 +- .../constant/thermophysicalProperties | 2 +- .../XiFoam/les/pitzDaily3D/system/fvSchemes | 14 +- .../XiFoam/les/pitzDaily3D/system/fvSolution | 4 +- .../constant/thermophysicalProperties | 2 +- .../ras/moriyoshiHomogeneous/system/fvSchemes | 16 +- .../moriyoshiHomogeneous/system/fvSolution | 4 +- .../gri/constant/thermophysicalProperties | 2 +- .../h2/constant/thermophysicalProperties | 2 +- .../ic8h18/constant/thermophysicalProperties | 2 +- .../nc7h16/constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../engineFoam/kivaTest/system/fvSchemes | 16 +- .../engineFoam/kivaTest/system/fvSolution | 4 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../oppositeBurningPanels/system/fvSchemes | 6 +- .../oppositeBurningPanels/system/fvSolution | 4 +- .../system/panelRegion/fvSchemes | 2 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../les/smallPoolFire2D/system/fvSchemes | 4 +- .../les/smallPoolFire2D/system/fvSolution | 6 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../les/smallPoolFire3D/system/fvSchemes | 4 +- .../les/smallPoolFire3D/system/fvSolution | 6 +- .../constant/thermophysicalProperties | 2 +- .../ras/counterFlowFlame2D/system/fvSolution | 6 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../cavity/constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../prism/constant/thermophysicalProperties | 2 +- .../hotRoom/constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../hotRoom/constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../bottomAir/thermophysicalProperties | 2 +- .../constant/topAir/thermophysicalProperties | 2 +- .../bottomWater/thermophysicalProperties | 3 +- .../constant/topAir/thermophysicalProperties | 2 +- .../bottomAir/thermophysicalProperties | 2 +- .../constant/topAir/thermophysicalProperties | 2 +- .../bottomAir/thermophysicalProperties | 2 +- .../constant/topAir/thermophysicalProperties | 2 +- .../bottomAir/thermophysicalProperties | 2 +- .../constant/topAir/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../counterFlowFlame2D/system/fvSolution | 4 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../verticalChannel/system/fvSchemes | 2 +- .../verticalChannel/system/fvSolution | 2 +- .../constant/coalCloud1Properties | 8 +- .../constant/limestoneCloud1Properties | 2 +- .../constant/sourcesProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../simplifiedSiwek/system/fvSchemes | 4 +- .../simplifiedSiwek/system/fvSolution | 4 +- .../filter/constant/reactingCloud1Properties | 2 +- .../filter/constant/sourcesProperties | 2 +- .../filter/constant/thermophysicalProperties | 2 +- .../filter/system/fvSchemes | 4 +- .../filter/system/fvSolution | 6 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../parcelInBox/system/fvSchemes | 2 +- .../parcelInBox/system/fvSolution | 6 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../verticalChannel/system/fvSchemes | 2 +- .../verticalChannel/system/fvSolution | 6 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../cylinder/system/fvSchemes | 2 +- .../cylinder/system/fvSolution | 6 +- .../cylinder/system/wallFilmRegion/fvSchemes | 4 +- .../cylinder/system/wallFilmRegion/fvSolution | 2 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../hotBoxes/system/fvSchemes | 2 +- .../hotBoxes/system/fvSolution | 6 +- .../system/wallFilmRegion.org/fvSchemes | 4 +- .../system/wallFilmRegion.org/fvSolution | 2 +- .../constant/thermophysicalProperties | 2 +- .../rivuletPanel/system/fvSchemes | 2 +- .../rivuletPanel/system/fvSolution | 6 +- .../system/wallFilmRegion/fvSchemes | 4 +- .../system/wallFilmRegion/fvSolution | 2 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../splashPanel/system/fvSchemes | 2 +- .../splashPanel/system/fvSolution | 6 +- .../system/wallFilmRegion/fvSchemes | 4 +- .../system/wallFilmRegion/fvSolution | 2 +- .../constant/reactingCloud1Properties | 2 +- .../constant/thermophysicalProperties | 2 +- .../evaporationTest/system/fvSchemes | 4 +- .../evaporationTest/system/fvSolution | 4 +- .../aachenBomb/constant/sprayCloudProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../sprayFoam/aachenBomb/system/fvSchemes | 4 +- .../sprayFoam/aachenBomb/system/fvSolution | 4 +- 426 files changed, 4143 insertions(+), 9522 deletions(-) rename applications/solvers/combustion/PDRFoam/{hEqn.H => haEqn.H} (56%) create mode 100644 applications/solvers/combustion/PDRFoam/hauEqn.H delete mode 100644 applications/solvers/combustion/PDRFoam/huEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/hEqn.H create mode 100644 applications/solvers/combustion/XiFoam/haEqn.H create mode 100644 applications/solvers/combustion/XiFoam/hauEqn.H delete mode 100644 applications/solvers/combustion/XiFoam/huEqn.H rename src/thermophysicalModels/basic/derivedFvPatchFields/{fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C => fixedEnergy/fixedEnergyFvPatchScalarField.C} (77%) rename src/thermophysicalModels/basic/derivedFvPatchFields/{fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H => fixedEnergy/fixedEnergyFvPatchScalarField.H} (78%) delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H rename src/thermophysicalModels/basic/derivedFvPatchFields/{gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C => gradientEnergy/gradientEnergyFvPatchScalarField.C} (74%) rename src/thermophysicalModels/basic/derivedFvPatchFields/{gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H => gradientEnergy/gradientEnergyFvPatchScalarField.H} (77%) delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H rename src/thermophysicalModels/basic/derivedFvPatchFields/{mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C => mixedEnergy/mixedEnergyFvPatchScalarField.C} (75%) rename src/thermophysicalModels/basic/derivedFvPatchFields/{mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H => mixedEnergy/mixedEnergyFvPatchScalarField.H} (78%) delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H create mode 100644 src/thermophysicalModels/basic/heThermo/heThermo.C create mode 100644 src/thermophysicalModels/basic/heThermo/heThermo.H delete mode 100644 src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H delete mode 100644 src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C delete mode 100644 src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H delete mode 100644 src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C delete mode 100644 src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C delete mode 100644 src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H delete mode 100644 src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C create mode 100644 src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C create mode 100644 src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H rename src/thermophysicalModels/basic/{rhoThermo/hsRhoThermo/hsRhoThermos.C => psiThermo/hePsiThermo/hePsiThermos.C} (68%) delete mode 100644 src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C delete mode 100644 src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H delete mode 100644 src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C rename src/thermophysicalModels/{reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H => basic/psiThermo/psiThermo/makePsiThermo.H} (54%) rename src/thermophysicalModels/basic/psiThermo/{basicPsiThermo/basicPsiThermo.C => psiThermo/psiThermo.C} (86%) rename src/thermophysicalModels/basic/psiThermo/{basicPsiThermo/basicPsiThermo.H => psiThermo/psiThermo.H} (85%) rename src/thermophysicalModels/basic/psiThermo/{basicPsiThermo/basicPsiThermoNew.C => psiThermo/psiThermoNew.C} (86%) delete mode 100644 src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C delete mode 100644 src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H create mode 100644 src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C rename src/thermophysicalModels/{specie/transport/speciesTransport/speciesTransport.H => basic/rhoThermo/heRhoThermo/heRhoThermo.H} (55%) rename src/thermophysicalModels/basic/rhoThermo/{hRhoThermo/hRhoThermos.C => heRhoThermo/heRhoThermos.C} (74%) delete mode 100644 src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C delete mode 100644 src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H rename src/thermophysicalModels/basic/rhoThermo/{basicRhoThermo/makeBasicRhoThermo.H => rhoThermo/makeRhoThermo.H} (62%) rename src/thermophysicalModels/basic/rhoThermo/{basicRhoThermo/basicRhoThermo.C => rhoThermo/rhoThermo.C} (84%) rename src/thermophysicalModels/basic/rhoThermo/{basicRhoThermo/basicRhoThermo.H => rhoThermo/rhoThermo.H} (86%) rename src/thermophysicalModels/basic/rhoThermo/{basicRhoThermo/basicRhoThermoNew.C => rhoThermo/rhoThermoNew.C} (87%) delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C delete mode 100644 src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H create mode 100644 src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C rename src/thermophysicalModels/reactionThermo/{reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H => psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H} (54%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hCombustionThermo/hCombustionThermos.C => psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C} (67%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C => psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C} (51%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H => psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H} (63%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C => psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C} (72%) rename src/thermophysicalModels/reactionThermo/{reactionThermo/hsReactionThermo/hsReactionThermo.C => psiReactionThermo/psiReactionThermo/psiReactionThermo.C} (74%) rename src/thermophysicalModels/reactionThermo/{reactionThermo/hReactionThermo/hReactionThermo.H => psiReactionThermo/psiReactionThermo/psiReactionThermo.H} (71%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hCombustionThermo/hCombustionThermoNew.C => psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C} (85%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C => psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C} (76%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H => psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H} (77%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C => psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C} (86%) delete mode 100644 src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H delete mode 100644 src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C delete mode 100644 src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C delete mode 100644 src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C delete mode 100644 src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C delete mode 100644 src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H create mode 100644 src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C rename src/thermophysicalModels/reactionThermo/{combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H => rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H} (54%) rename src/thermophysicalModels/reactionThermo/{reactionThermo/hReactionThermo/hReactionThermos.C => rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C} (74%) rename src/thermophysicalModels/reactionThermo/{reactionThermo/hReactionThermo => rhoReactionThermo/rhoReactionThermo}/makeReactionThermo.H (78%) rename src/thermophysicalModels/reactionThermo/{reactionThermo/hReactionThermo/hReactionThermo.C => rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C} (74%) rename src/thermophysicalModels/reactionThermo/{combustionThermo/hCombustionThermo/hCombustionThermo.H => rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H} (71%) rename src/thermophysicalModels/reactionThermo/{reactionThermo/hReactionThermo/hReactionThermoNew.C => rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C} (85%) rename src/thermophysicalModels/specie/equationOfState/{pressurePerfectGas/pressurePerfectGas.C => isobaricPerfectGas/isobaricPerfectGas.C} (82%) rename src/thermophysicalModels/specie/equationOfState/{pressurePerfectGas/pressurePerfectGas.H => isobaricPerfectGas/isobaricPerfectGas.H} (67%) rename src/thermophysicalModels/specie/equationOfState/{pressurePerfectGas/pressurePerfectGasI.H => isobaricPerfectGas/isobaricPerfectGasI.H} (61%) rename src/thermophysicalModels/specie/reaction/reactions/{makeReactionThermo.H => makeReaction.H} (99%) create mode 100644 src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H create mode 100644 src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H create mode 100644 src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H delete mode 100644 src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C delete mode 100644 src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index bf70e83c5d..49428b5909 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -68,7 +68,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "laminarFlameSpeed.H" #include "XiModel.H" @@ -123,12 +123,12 @@ int main(int argc, char *argv[]) { #include "bEqn.H" #include "ftEqn.H" - #include "huEqn.H" - #include "hEqn.H" + #include "hauEqn.H" + #include "haEqn.H" if (!ign.ignited()) { - hu == h; + hau == ha; } #include "pEqn.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index 0c5082df04..c051c2af45 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -57,7 +57,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "laminarFlameSpeed.H" #include "XiModel.H" diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index da44801090..861cbffb64 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::basicSubGrid::basicSubGrid ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H index 44d43b4dc6..7e69085d6d 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H @@ -113,7 +113,7 @@ public: basicSubGrid ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index a0aa0f9cfc..3fa4ac9641 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -43,7 +43,7 @@ namespace XiGModels Foam::XiGModels::basicSubGrid::basicSubGrid ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 09fba91e6c..7e336b698b 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -101,7 +101,7 @@ public: basicSubGrid ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index 152995b9f0..71f9777e1c 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -37,7 +37,7 @@ SourceFiles #define PDRDragModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "multivariateSurfaceInterpolationScheme.H" #include "runTimeSelectionTables.H" diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index 6f7a33c947..4b7e391205 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::Gulder::Gulder ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H index 4531596a3b..3db7b71f2e 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H @@ -89,7 +89,7 @@ public: Gulder ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C index c98f7d9cf7..ff6a77070b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::SCOPEBlend::SCOPEBlend ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H index 65693451d7..efa23124ab 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H @@ -85,7 +85,7 @@ public: SCOPEBlend ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index c1f2996411..86e2ea13eb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 72dcd26de1..de3e8c4697 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -103,7 +103,7 @@ public: SCOPEXiEq ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 7c20dd220b..4f43a40440 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -39,7 +39,7 @@ namespace Foam Foam::XiEqModel::XiEqModel ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index 3f4b2d0f7c..c34db5142a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -42,7 +42,7 @@ SourceFiles #define XiEqModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "runTimeSelectionTables.H" @@ -66,7 +66,7 @@ protected: dictionary XiEqModelCoeffs_; //- Thermo - const hhuCombustionThermo& thermo_; + const psiuReactionThermo& thermo_; //- Turbulence const compressible::RASModel& turbulence_; @@ -107,7 +107,7 @@ public: dictionary, ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ), @@ -126,7 +126,7 @@ public: static autoPtr New ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); @@ -138,7 +138,7 @@ public: XiEqModel ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index 33983c1c9f..f90b0ef342 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -30,7 +30,7 @@ License Foam::autoPtr Foam::XiEqModel::New ( const dictionary& propDict, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) @@ -48,7 +48,7 @@ Foam::autoPtr Foam::XiEqModel::New ( "XiEqModel::New" "(" - " const hhuCombustionThermo& thermo," + " const psiuReactionThermo& thermo," " const compressible::RASModel& turbulence," " const volScalarField& Su" ")" diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index f4698d55f3..7e46924c88 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -43,7 +43,7 @@ namespace XiEqModels Foam::XiEqModels::instability::instability ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H index 0c513bbc0a..9f3ca5d120 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H @@ -84,7 +84,7 @@ public: instability ( const dictionary& XiEqProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index fc57a0cdc7..2ea37eb8ed 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -43,7 +43,7 @@ namespace XiGModels Foam::XiGModels::KTS::KTS ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H index c735c7f4e7..9b3479ccc7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H @@ -79,7 +79,7 @@ public: KTS ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C index 5e5280be0b..9c2bf6a1e5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C @@ -39,7 +39,7 @@ namespace Foam Foam::XiGModel::XiGModel ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index 439bf78bec..50a2fcc11a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -39,7 +39,7 @@ SourceFiles #define XiGModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "runTimeSelectionTables.H" @@ -61,7 +61,7 @@ protected: dictionary XiGModelCoeffs_; - const hhuCombustionThermo& thermo_; + const psiuReactionThermo& thermo_; const compressible::RASModel& turbulence_; const volScalarField& Su_; @@ -92,7 +92,7 @@ public: dictionary, ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ), @@ -111,7 +111,7 @@ public: static autoPtr New ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); @@ -123,7 +123,7 @@ public: XiGModel ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index a04411250f..e70df83131 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -30,7 +30,7 @@ License Foam::autoPtr Foam::XiGModel::New ( const dictionary& propDict, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) @@ -48,7 +48,7 @@ Foam::autoPtr Foam::XiGModel::New ( "XiGModel::New" "(" - " const hhuCombustionThermo& thermo," + " const psiuReactionThermo& thermo," " const compressible::RASModel& turbulence," " const volScalarField& Su" ")" diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C index 06520b0958..844cc7b72d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C @@ -43,7 +43,7 @@ namespace XiGModels Foam::XiGModels::instabilityG::instabilityG ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H index c75b4456db..2088e6044f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H @@ -88,7 +88,7 @@ public: instabilityG ( const dictionary& XiGProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C index e058f813ba..dac2e6b019 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C @@ -39,7 +39,7 @@ namespace Foam Foam::XiModel::XiModel ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index 8509f05a5c..f17e945395 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -91,7 +91,7 @@ SourceFiles #define XiModel_H #include "IOdictionary.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "RASModel.H" #include "multivariateSurfaceInterpolationScheme.H" #include "runTimeSelectionTables.H" @@ -114,7 +114,7 @@ protected: dictionary XiModelCoeffs_; - const hhuCombustionThermo& thermo_; + const psiuReactionThermo& thermo_; const compressible::RASModel& turbulence_; const volScalarField& Su_; const volScalarField& rho_; @@ -151,7 +151,7 @@ public: dictionary, ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, @@ -176,7 +176,7 @@ public: static autoPtr New ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, @@ -191,7 +191,7 @@ public: XiModel ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index 935974c0af..bf2a9cd79c 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -30,7 +30,7 @@ License Foam::autoPtr Foam::XiModel::New ( const dictionary& propDict, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index 06266f1009..c3e1e6aa85 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -43,7 +43,7 @@ namespace XiModels Foam::XiModels::algebraic::algebraic ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H index bbcdde4a09..d0eb879bfb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H @@ -86,7 +86,7 @@ public: algebraic ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C index f72fbda3d1..d9715dece6 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C @@ -43,7 +43,7 @@ namespace XiModels Foam::XiModels::fixed::fixed ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H index 8c55f8e894..5e3ff03427 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H @@ -74,7 +74,7 @@ public: fixed ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C index d034978fea..37aeb1437d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C @@ -43,7 +43,7 @@ namespace XiModels Foam::XiModels::transport::transport ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index 35b4809332..819a0c892c 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -86,7 +86,7 @@ public: transport ( const dictionary& XiProperties, - const hhuCombustionThermo& thermo, + const psiuReactionThermo& thermo, const compressible::RASModel& turbulence, const volScalarField& Su, const volScalarField& rho, diff --git a/applications/solvers/combustion/PDRFoam/bEqn.H b/applications/solvers/combustion/PDRFoam/bEqn.H index 348e4b8991..abec1938c3 100644 --- a/applications/solvers/combustion/PDRFoam/bEqn.H +++ b/applications/solvers/combustion/PDRFoam/bEqn.H @@ -5,7 +5,7 @@ tmp > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,ft_b_h_hu)") + mesh.divScheme("div(phi,ft_b_ha_hau)") ) ); @@ -54,13 +54,13 @@ if (ign.ignited()) surfaceScalarField nf("nf", mesh.Sf() & nfVec); n /= mgb; -# include "StCorr.H" + #include "StCorr.H" // Calculate turbulent flame speed flux // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ surfaceScalarField phiSt("phiSt", fvc::interpolate(rhou*StCorr*St)*nf); -# include "StCourantNo.H" + #include "StCourantNo.H" Db = flameWrinkling->Db(); @@ -78,7 +78,7 @@ if (ign.ignited()) // Add ignition cell contribution to b-equation // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# include "ignite.H" + #include "ignite.H" // Solve for b // ~~~~~~~~~~~ diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 2d8451c9ae..c4be37dfc9 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - hhuCombustionThermo::New(mesh) + psiuReactionThermo::New(mesh) ); - hhuCombustionThermo& thermo = pThermo(); + psiuReactionThermo& thermo = pThermo(); basicMultiComponentMixture& composition = thermo.composition(); volScalarField rho @@ -22,8 +22,8 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); - volScalarField& hu = thermo.hu(); + volScalarField& ha = thermo.he(); + volScalarField& hau = thermo.heu(); volScalarField& b = composition.Y("b"); Info<< "min(b) = " << min(b).value() << endl; @@ -186,6 +186,6 @@ } fields.add(b); - fields.add(h); - fields.add(hu); + fields.add(ha); + fields.add(hau); flameWrinkling->addXi(fields); diff --git a/applications/solvers/combustion/PDRFoam/hEqn.H b/applications/solvers/combustion/PDRFoam/haEqn.H similarity index 56% rename from applications/solvers/combustion/PDRFoam/hEqn.H rename to applications/solvers/combustion/PDRFoam/haEqn.H index 4d8bb54588..20f605f79c 100644 --- a/applications/solvers/combustion/PDRFoam/hEqn.H +++ b/applications/solvers/combustion/PDRFoam/haEqn.H @@ -1,9 +1,9 @@ { solve ( - betav*fvm::ddt(rho, h) - + mvConvection->fvmDiv(phi, h) - - fvm::laplacian(Db, h) + betav*fvm::ddt(rho, ha) + + mvConvection->fvmDiv(phi, ha) + - fvm::laplacian(Db, ha) == betav*dpdt - betav*(fvc::ddt(rho, K) + fvc::div(phi, K)) diff --git a/applications/solvers/combustion/PDRFoam/hauEqn.H b/applications/solvers/combustion/PDRFoam/hauEqn.H new file mode 100644 index 0000000000..1cc1a1fd35 --- /dev/null +++ b/applications/solvers/combustion/PDRFoam/hauEqn.H @@ -0,0 +1,18 @@ +if (ign.ignited()) +{ + solve + ( + betav*fvm::ddt(rho, hau) + + mvConvection->fvmDiv(phi, hau) + - fvm::laplacian(Db, hau) + + // These terms cannot be used in partially-premixed combustion due to + // the resultant inconsistency between ft and hau transport. + // A possible solution would be to solve for ftu as well as ft. + //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hau) + //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hau) + + == + betav*(dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() + ); +} diff --git a/applications/solvers/combustion/PDRFoam/huEqn.H b/applications/solvers/combustion/PDRFoam/huEqn.H deleted file mode 100644 index f0fa7be5ea..0000000000 --- a/applications/solvers/combustion/PDRFoam/huEqn.H +++ /dev/null @@ -1,18 +0,0 @@ -if (ign.ignited()) -{ - solve - ( - betav*fvm::ddt(rho, hu) - + mvConvection->fvmDiv(phi, hu) - - fvm::laplacian(Db, hu) - - // These terms cannot be used in partially-premixed combustion due to - // the resultant inconsistency between ft and hu transport. - // A possible solution would be to solve for ftu as well as ft. - //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hu) - //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu) - - == - betav*(dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() - ); -} diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index 720f3da389..7d28d93c12 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -64,7 +64,7 @@ Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial Foam::laminarFlameSpeedModels::SCOPE::SCOPE ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -383,21 +383,21 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Ma Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Ma() const { - if (hhuCombustionThermo_.composition().contains("ft")) + if (psiuReactionThermo_.composition().contains("ft")) { - const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft"); + const volScalarField& ft = psiuReactionThermo_.composition().Y("ft"); return Ma ( dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )*ft/(scalar(1) - ft) ); } else { - const fvMesh& mesh = hhuCombustionThermo_.p().mesh(); + const fvMesh& mesh = psiuReactionThermo_.p().mesh(); return tmp ( @@ -422,17 +422,17 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::operator()() const { - if (hhuCombustionThermo_.composition().contains("ft")) + if (psiuReactionThermo_.composition().contains("ft")) { - const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft"); + const volScalarField& ft = psiuReactionThermo_.composition().Y("ft"); return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )*ft/(scalar(1) - ft) ); } @@ -440,8 +440,8 @@ Foam::laminarFlameSpeedModels::SCOPE::operator()() const { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), equivalenceRatio_ ); } diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H index cb3dd7f423..32082aa910 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H @@ -186,11 +186,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo SCOPE ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index 069e5b8caa..841571f3a6 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -50,7 +50,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "turbulenceModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" @@ -97,12 +97,12 @@ int main(int argc, char *argv[]) #include "ftEqn.H" #include "bEqn.H" - #include "huEqn.H" - #include "hEqn.H" + #include "hauEqn.H" + #include "haEqn.H" if (!ign.ignited()) { - hu == h; + hau == ha; } // --- Pressure corrector loop diff --git a/applications/solvers/combustion/XiFoam/createFields.H b/applications/solvers/combustion/XiFoam/createFields.H index 1750c693e5..a09e1c8f25 100644 --- a/applications/solvers/combustion/XiFoam/createFields.H +++ b/applications/solvers/combustion/XiFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - hhuCombustionThermo::New(mesh) + psiuReactionThermo::New(mesh) ); - hhuCombustionThermo& thermo = pThermo(); + psiuReactionThermo& thermo = pThermo(); basicMultiComponentMixture& composition = thermo.composition(); volScalarField rho @@ -22,8 +22,8 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); - volScalarField& hu = thermo.hu(); + volScalarField& ha = thermo.he(); + volScalarField& hau = thermo.heu(); volScalarField& b = composition.Y("b"); Info<< "min(b) = " << min(b).value() << endl; @@ -45,7 +45,7 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; @@ -128,5 +128,5 @@ } fields.add(b); - fields.add(h); - fields.add(hu); + fields.add(ha); + fields.add(hau); diff --git a/applications/solvers/combustion/XiFoam/ftEqn.H b/applications/solvers/combustion/XiFoam/ftEqn.H index 46d7aeae82..96dbc3f06b 100644 --- a/applications/solvers/combustion/XiFoam/ftEqn.H +++ b/applications/solvers/combustion/XiFoam/ftEqn.H @@ -5,7 +5,7 @@ tmp > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,ft_b_h_hu)") + mesh.divScheme("div(phi,ft_b_ha_hau)") ) ); diff --git a/applications/solvers/combustion/XiFoam/hEqn.H b/applications/solvers/combustion/XiFoam/hEqn.H deleted file mode 100644 index f562466b20..0000000000 --- a/applications/solvers/combustion/XiFoam/hEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix hEqn - ( - fvm::ddt(rho, h) - + mvConvection->fvmDiv(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - dpdt - - (fvc::ddt(rho, K) + fvc::div(phi, K)) - ); - - hEqn.relax(); - hEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/combustion/XiFoam/haEqn.H b/applications/solvers/combustion/XiFoam/haEqn.H new file mode 100644 index 0000000000..ffbac948ae --- /dev/null +++ b/applications/solvers/combustion/XiFoam/haEqn.H @@ -0,0 +1,16 @@ +{ + fvScalarMatrix haEqn + ( + fvm::ddt(rho, ha) + + mvConvection->fvmDiv(phi, ha) + - fvm::laplacian(turbulence->alphaEff(), ha) + == + dpdt + - (fvc::ddt(rho, K) + fvc::div(phi, K)) + ); + + haEqn.relax(); + haEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/combustion/XiFoam/hauEqn.H b/applications/solvers/combustion/XiFoam/hauEqn.H new file mode 100644 index 0000000000..d9f5767643 --- /dev/null +++ b/applications/solvers/combustion/XiFoam/hauEqn.H @@ -0,0 +1,18 @@ +if (ign.ignited()) +{ + solve + ( + fvm::ddt(rho, hau) + + mvConvection->fvmDiv(phi, hau) + - fvm::laplacian(turbulence->alphaEff(), hau) + + // These terms cannot be used in partially-premixed combustion due to + // the resultant inconsistency between ft and hau transport. + // A possible solution would be to solve for ftu as well as ft. + //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hau) + //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hau) + + == + (dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() + ); +} diff --git a/applications/solvers/combustion/XiFoam/huEqn.H b/applications/solvers/combustion/XiFoam/huEqn.H deleted file mode 100644 index 3059b9445e..0000000000 --- a/applications/solvers/combustion/XiFoam/huEqn.H +++ /dev/null @@ -1,18 +0,0 @@ -if (ign.ignited()) -{ - solve - ( - fvm::ddt(rho, hu) - + mvConvection->fvmDiv(phi, hu) - - fvm::laplacian(turbulence->alphaEff(), hu) - - // These terms cannot be used in partially-premixed combustion due to - // the resultant inconsistency between ft and hu transport. - // A possible solution would be to solve for ftu as well as ft. - //- fvm::div(muEff*fvc::grad(b)/(b + 0.001), hu) - //+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), hu) - - == - (dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)))*rho/thermo.rhou() - ); -} diff --git a/applications/solvers/combustion/chemFoam/chemFoam.C b/applications/solvers/combustion/chemFoam/chemFoam.C index b58177d602..f6800cf871 100644 --- a/applications/solvers/combustion/chemFoam/chemFoam.C +++ b/applications/solvers/combustion/chemFoam/chemFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" +#include "psiReactionThermo.H" #include "turbulenceModel.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index b37a8818e3..3beca02bec 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -29,7 +29,7 @@ psiChemistryModel& chemistry = pChemistry(); scalar dtChem = refCast(chemistry).deltaTChem()[0]; - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); @@ -47,7 +47,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); volScalarField Rspecific ( diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index 08050be816..73e34e510e 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -90,7 +90,7 @@ hs0 += Y0[i]*specieData[i].Hs(T0); } - hs = dimensionedScalar("hs", dimEnergy/dimMass, hs0); + hs = dimensionedScalar("h", dimEnergy/dimMass, hs0); thermo.correct(); @@ -107,5 +107,3 @@ << " T = " << thermo.T()[0] << " [K] " << nl << " rho = " << rho[0] << " [kg/m3]" << nl << endl; - - diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index 6ef3a599c1..1038d8d577 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -32,7 +32,7 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "OFstream.H" #include "pimpleControl.H" diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H index 6286b1a555..0446550579 100644 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ b/applications/solvers/combustion/coldEngineFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( @@ -21,7 +21,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& T = thermo.T(); diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 84472420c5..ca6f345f2e 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -51,7 +51,7 @@ Description #include "fvCFD.H" #include "engineTime.H" #include "engineMesh.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "turbulenceModel.H" #include "laminarFlameSpeed.H" #include "ignition.H" @@ -103,12 +103,12 @@ int main(int argc, char *argv[]) #include "ftEqn.H" #include "bEqn.H" - #include "huEqn.H" - #include "hEqn.H" + #include "hauEqn.H" + #include "haEqn.H" if (!ign.ignited()) { - hu == h; + hau == ha; } // --- Pressure corrector loop diff --git a/applications/solvers/combustion/fireFoam/YhsEqn.H b/applications/solvers/combustion/fireFoam/YhsEqn.H index b85396caa1..1319a4d5df 100644 --- a/applications/solvers/combustion/fireFoam/YhsEqn.H +++ b/applications/solvers/combustion/fireFoam/YhsEqn.H @@ -5,7 +5,7 @@ tmp > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,Yi_hs)") + mesh.divScheme("div(phi,Yi_h)") ) ); { @@ -56,7 +56,7 @@ tmp > mvConvection dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) + combustion->Sh() - + radiation->Shs(thermo) + + radiation->Sh(thermo) + parcels.Sh(hs) + surfaceFilm.Sh() ); diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index e0c11335e3..555e09aefb 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -10,7 +10,7 @@ Info<< "Reading thermophysical properties\n" << endl; - hsCombustionThermo& thermo = combustion->thermo(); + psiReactionThermo& thermo = combustion->thermo(); SLGThermo slgThermo(mesh, thermo); @@ -34,7 +34,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index 87b25079ff..ccc4b135a5 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -10,8 +10,8 @@ tmp > mvConvection ); { - combustion->correct(); - dQ = combustion->dQ(); + reaction->correct(); + dQ = reaction->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -27,7 +27,7 @@ tmp > mvConvection + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == - combustion->R(Yi) + reaction->R(Yi) ); YiEqn.relax(); diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 0b6e9ee2e1..9e02c8de2e 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -1,6 +1,6 @@ -Info<< "Creating combustion model\n" << endl; +Info<< "Creating reaction model\n" << endl; -autoPtr combustion +autoPtr reaction ( combustionModels::psiChemistryCombustionModel::New ( @@ -8,9 +8,9 @@ autoPtr combustion ) ); -psiChemistryModel& chemistry = combustion->pChemistry(); +psiChemistryModel& chemistry = reaction->pChemistry(); -hsCombustionThermo& thermo = chemistry.thermo(); +psiReactionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); @@ -45,7 +45,7 @@ volVectorField U volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); -volScalarField& hs = thermo.hs(); +volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); #include "compressibleCreatePhi.H" @@ -62,8 +62,8 @@ autoPtr turbulence ) ); -// Set the turbulence into the combustion model -combustion->setTurbulence(turbulence()); +// Set the turbulence into the reaction model +reaction->setTurbulence(turbulence()); Info<< "Creating field dpdt\n" << endl; diff --git a/applications/solvers/combustion/reactingFoam/hsEqn.H b/applications/solvers/combustion/reactingFoam/hsEqn.H index 642b7091bc..5bc7c5b169 100644 --- a/applications/solvers/combustion/reactingFoam/hsEqn.H +++ b/applications/solvers/combustion/reactingFoam/hsEqn.H @@ -8,7 +8,7 @@ == dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) - + combustion->Sh() + + reaction->Sh() ); hsEqn.relax(); diff --git a/applications/solvers/combustion/rhoReactingFoam/YEqn.H b/applications/solvers/combustion/rhoReactingFoam/YEqn.H index 87b25079ff..ccc4b135a5 100644 --- a/applications/solvers/combustion/rhoReactingFoam/YEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/YEqn.H @@ -10,8 +10,8 @@ tmp > mvConvection ); { - combustion->correct(); - dQ = combustion->dQ(); + reaction->correct(); + dQ = reaction->dQ(); label inertIndex = -1; volScalarField Yt(0.0*Y[0]); @@ -27,7 +27,7 @@ tmp > mvConvection + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == - combustion->R(Yi) + reaction->R(Yi) ); YiEqn.relax(); diff --git a/applications/solvers/combustion/rhoReactingFoam/createFields.H b/applications/solvers/combustion/rhoReactingFoam/createFields.H index 690cdc4b60..5d71e0f075 100644 --- a/applications/solvers/combustion/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/rhoReactingFoam/createFields.H @@ -1,6 +1,6 @@ -Info<< "Creating combustion model\n" << endl; +Info<< "Creating reaction model\n" << endl; -autoPtr combustion +autoPtr reaction ( combustionModels::rhoChemistryCombustionModel::New ( @@ -8,9 +8,9 @@ autoPtr combustion ) ); -rhoChemistryModel& chemistry = combustion->pChemistry(); +rhoChemistryModel& chemistry = reaction->pChemistry(); -hsReactionThermo& thermo = chemistry.thermo(); +rhoReactionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); @@ -45,7 +45,7 @@ volVectorField U volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); -volScalarField& hs = thermo.hs(); +volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); @@ -64,8 +64,8 @@ autoPtr turbulence ) ); -// Set the turbulence into the combustion model -combustion->setTurbulence(turbulence()); +// Set the turbulence into the reaction model +reaction->setTurbulence(turbulence()); Info<< "Creating field dpdt\n" << endl; diff --git a/applications/solvers/combustion/rhoReactingFoam/hsEqn.H b/applications/solvers/combustion/rhoReactingFoam/hsEqn.H index ba95be8452..f92cfd140b 100644 --- a/applications/solvers/combustion/rhoReactingFoam/hsEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/hsEqn.H @@ -8,7 +8,7 @@ == dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) - + combustion->Sh() + + reaction->Sh() ); hsEqn.relax(); diff --git a/applications/solvers/compressible/rhoCentralFoam/createFields.H b/applications/solvers/compressible/rhoCentralFoam/createFields.H index 60b40db1d1..c1618d6346 100644 --- a/applications/solvers/compressible/rhoCentralFoam/createFields.H +++ b/applications/solvers/compressible/rhoCentralFoam/createFields.H @@ -1,13 +1,13 @@ Info<< "Reading thermophysical properties\n" << endl; -autoPtr pThermo +autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); -basicPsiThermo& thermo = pThermo(); +psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); -volScalarField& e = thermo.e(); +volScalarField& e = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); const volScalarField& mu = thermo.mu(); diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 363a8fd2dc..0e793d51d3 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index df24250066..64404bd665 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "zeroGradientFvPatchFields.H" #include "fixedRhoFvPatchScalarField.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index e2c7b950de..e81fea6291 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -1,13 +1,13 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); volScalarField rho diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 28787716e0..4a4a82db7c 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "bound.H" #include "pimpleControl.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C index 0b01f51c82..73a6f5bd2f 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/rhoPimplecFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "bound.H" #include "pimpleControl.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C index e305916f29..ae57bda417 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFLTSPimpleFoam/rhoPorousMRFLTSPimpleFoam.C @@ -35,7 +35,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "MRFZones.H" #include "porousZones.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C index e02787c35d..a5adc28054 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "bound.H" #include "MRFZones.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 8a7d636f99..d8fdff55ae 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( @@ -20,7 +20,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& e = thermo.e(); + volScalarField& e = thermo.he(); const volScalarField& psi = thermo.psi(); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C index c866aea7df..9238106885 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C @@ -32,7 +32,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "MRFZones.H" #include "thermalPorousZones.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index bb249f5430..0eee9129b5 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "simpleControl.H" diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C index 198b5eea40..561c5e2dc9 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "mixedFvPatchFields.H" #include "bound.H" diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index 5d03dd2bb7..14ae0941d2 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -1,13 +1,13 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); - volScalarField& e = thermo.e(); + volScalarField& e = thermo.he(); const volScalarField& psi = thermo.psi(); volScalarField rho diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index d4ea27e566..75adb30513 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "motionSolver.H" diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 82dcaeaa90..b191997788 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index 3e6b46a4bc..b287f6c4dc 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -34,7 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "pimpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index 1c2a2b94e4..67760f219d 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicRhoThermo::New(mesh) + rhoThermo::New(mesh) ); - basicRhoThermo& thermo = pThermo(); + rhoThermo& thermo = pThermo(); volScalarField rho ( @@ -20,7 +20,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index cebe1207d8..405a9f48d5 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "fixedGradientFvPatchFields.H" #include "simpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index d6fa9acee9..d2fff48837 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( @@ -20,7 +20,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C index fc6a37ea0f..29deb30334 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "RASModel.H" #include "fixedGradientFvPatchFields.H" #include "radiationModel.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index ab7b6add66..f353696ee6 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -37,7 +37,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C index 3cfc5af784..5817d09d33 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C @@ -30,7 +30,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index 0ce4a25ac3..c34b547350 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -1,7 +1,6 @@ // Initialise fluid field pointer lists - PtrList thermoFluid(fluidRegions.size()); + PtrList thermoFluid(fluidRegions.size()); PtrList rhoFluid(fluidRegions.size()); - PtrList kappaFluid(fluidRegions.size()); PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); PtrList gFluid(fluidRegions.size()); @@ -32,7 +31,7 @@ thermoFluid.set ( i, - basicRhoThermo::New(fluidRegions[i]).ptr() + rhoThermo::New(fluidRegions[i]).ptr() ); Info<< " Adding to rhoFluid\n" << endl; @@ -53,24 +52,6 @@ ) ); - Info<< " Adding to kappaFluid\n" << endl; - kappaFluid.set - ( - i, - new volScalarField - ( - IOobject - ( - "kappa", - runTime.timeName(), - fluidRegions[i], - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermoFluid[i].Cp()*thermoFluid[i].alpha() - ) - ); - Info<< " Adding to UFluid\n" << endl; UFluid.set ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H index d23390edeb..e6fc3d6f9a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H @@ -69,7 +69,4 @@ Info<< "Min/max rho:" << min(rho).value() << ' ' << max(rho).value() << endl; - - // Update thermal conductivity - kappa = thermo.Cp()*turb.alphaEff(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H index 39d3de9648..d7e8d6e5c5 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H @@ -1,8 +1,7 @@ const fvMesh& mesh = fluidRegions[i]; - basicRhoThermo& thermo = thermoFluid[i]; + rhoThermo& thermo = thermoFluid[i]; volScalarField& rho = rhoFluid[i]; - volScalarField& kappa = kappaFluid[i]; volVectorField& U = UFluid[i]; surfaceScalarField& phi = phiFluid[i]; @@ -10,7 +9,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); IObasicSourceList& sources = heatSources[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H index fa925f4c87..00762909f3 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/createPorousFluidFields.H @@ -1,5 +1,5 @@ // Initialise porous field pointer lists - PtrList thermoPorous(porousFluidRegions.size()); + PtrList thermoPorous(porousFluidRegions.size()); PtrList rhoPorous(porousFluidRegions.size()); PtrList kappaPorous(porousFluidRegions.size()); PtrList UPorous(porousFluidRegions.size()); @@ -32,7 +32,7 @@ thermoPorous.set ( i, - basicRhoThermo::New(porousFluidRegions[i]).ptr() + rhoThermo::New(porousFluidRegions[i]).ptr() ); Info<< " Adding to rhoPorous\n" << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H index 914a6a7b9c..5b3d004372 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/porousFluid/setPorousFluidFields.H @@ -1,7 +1,6 @@ - const fvMesh& porousMesh = porousFluidRegions[i]; - basicRhoThermo& porousThermo = thermoPorous[i]; + rhoThermo& porousThermo = thermoPorous[i]; volScalarField& porousRho = rhoPorous[i]; volVectorField& porousU = UPorous[i]; @@ -11,7 +10,7 @@ volScalarField& porousP = porousThermo.p(); const volScalarField& porousPsi = porousThermo.psi(); - volScalarField& porousH = porousThermo.h(); + volScalarField& porousH = porousThermo.he(); const dimensionedScalar initialMass ( @@ -27,5 +26,3 @@ const scalar rhoMax = rhoMaxPorous[i].value(); const scalar rhoMin = rhoMinPorous[i].value(); - - diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 27f63f9916..84ac7751d7 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -1,7 +1,6 @@ // Initialise fluid field pointer lists - PtrList thermoFluid(fluidRegions.size()); + PtrList thermoFluid(fluidRegions.size()); PtrList rhoFluid(fluidRegions.size()); - PtrList kappaFluid(fluidRegions.size()); PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); PtrList gFluid(fluidRegions.size()); @@ -29,7 +28,7 @@ thermoFluid.set ( i, - basicRhoThermo::New(fluidRegions[i]).ptr() + rhoThermo::New(fluidRegions[i]).ptr() ); Info<< " Adding to rhoFluid\n" << endl; @@ -50,24 +49,6 @@ ) ); - Info<< " Adding to kappaFluid\n" << endl; - kappaFluid.set - ( - i, - new volScalarField - ( - IOobject - ( - "kappa", - runTime.timeName(), - fluidRegions[i], - IOobject::NO_READ, - IOobject::NO_WRITE - ), - thermoFluid[i].Cp()*thermoFluid[i].alpha() - ) - ); - Info<< " Adding to UFluid\n" << endl; UFluid.set ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index f260acc514..3a4b1814bc 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -92,7 +92,4 @@ rho = thermo.rho(); p_rgh = p - rho*gh; } - - // Update thermal conductivity - kappa = thermoFluid[i].Cp()*turb.alphaEff(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H index bd1f60c9b8..126b8f0961 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/setRegionFluidFields.H @@ -1,8 +1,7 @@ fvMesh& mesh = fluidRegions[i]; - basicRhoThermo& thermo = thermoFluid[i]; + rhoThermo& thermo = thermoFluid[i]; volScalarField& rho = rhoFluid[i]; - volScalarField& kappa = kappaFluid[i]; volVectorField& U = UFluid[i]; surfaceScalarField& phi = phiFluid[i]; @@ -12,7 +11,7 @@ volScalarField& p = thermo.p(); const volScalarField& psi = thermo.psi(); - volScalarField& h = thermo.h(); + volScalarField& h = thermo.he(); volScalarField& p_rgh = p_rghFluid[i]; const volScalarField& gh = ghFluid[i]; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H index 841ce1fee7..7880fe21ba 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/createPorousFluidFields.H @@ -1,5 +1,5 @@ // Initialise porous field pointer lists - PtrList thermoPorous(porousFluidRegions.size()); + PtrList thermoPorous(porousFluidRegions.size()); PtrList rhoPorous(porousFluidRegions.size()); PtrList UPorous(porousFluidRegions.size()); PtrList phiPorous(porousFluidRegions.size()); @@ -27,7 +27,7 @@ thermoPorous.set ( i, - basicRhoThermo::New(porousFluidRegions[i]).ptr() + rhoThermo::New(porousFluidRegions[i]).ptr() ); Info<< " Adding to rhoPorous\n" << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H index c29a232724..36b7b231ff 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/porousFluid/setPorousFluidFields.H @@ -1,7 +1,6 @@ - fvMesh& porousMesh = porousFluidRegions[i]; - basicRhoThermo& porousThermo = thermoPorous[i]; + rhoThermo& porousThermo = thermoPorous[i]; volScalarField& porousRho = rhoPorous[i]; volVectorField& porousU = UPorous[i]; @@ -13,6 +12,6 @@ volScalarField& porousP = porousThermo.p(); const volScalarField& porousPsi = porousThermo.psi(); - volScalarField& porousH = porousThermo.h(); + volScalarField& porousH = porousThermo.he(); IObasicSourceList& porousSources = heatPorousSources[i]; diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H index 264756c833..25ceef7aa6 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ rhoChemistryModel& chemistry = combustion->pChemistry(); - hsReactionThermo& thermo = chemistry.thermo(); + rhoReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H index e8a4da7645..15698b6afa 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/hsEqn.H @@ -7,7 +7,7 @@ == - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)") + parcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() + sources(rho, hs) ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 8c786ae251..9a2b17f1af 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -10,7 +10,7 @@ psiChemistryModel& chemistry = combustion->pChemistry(); - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H index 6a28b32560..37d29778c0 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/hsEqn.H @@ -10,7 +10,7 @@ + combustion->Sh() + coalParcels.Sh(hs) + limestoneParcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + sources(rho, hs) ); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index a656d4ea8c..52ed150808 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ rhoChemistryModel& chemistry = combustion->pChemistry(); - hsReactionThermo& thermo = chemistry.thermo(); + rhoReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H index fc88ba785e..15c598cd59 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hsEqn.H @@ -7,7 +7,7 @@ == - (fvc::ddt(rho, K) + fvc::div(phi, K)) + parcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() + sources(rho, hs) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index 4fad16b57d..b14b7d6dae 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -5,7 +5,7 @@ tmp > mvConvection mesh, fields, phi, - mesh.divScheme("div(phi,Yi_hs)") + mesh.divScheme("div(phi,Yi_h)") ) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 345d795a18..433e3d0182 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -10,7 +10,7 @@ psiChemistryModel& chemistry = combustion->pChemistry(); - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -34,7 +34,7 @@ ); volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H index a6124813a9..dba268581e 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/hsEqn.H @@ -9,7 +9,7 @@ - (fvc::ddt(rho, K) + fvc::div(phi, K)) + parcels.Sh(hs) + surfaceFilm.Sh() - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 6e764c0d6d..655510006d 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -10,7 +10,7 @@ psiChemistryModel& chemistry = combustion->pChemistry(); - hsCombustionThermo& thermo = chemistry.thermo(); + psiReactionThermo& thermo = chemistry.thermo(); SLGThermo slgThermo(mesh, thermo); @@ -28,7 +28,7 @@ } volScalarField& p = thermo.p(); - volScalarField& hs = thermo.hs(); + volScalarField& hs = thermo.he(); const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H index 12438380aa..9107df21c7 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/hsEqn.H @@ -8,7 +8,7 @@ dpdt - (fvc::ddt(rho, K) + fvc::div(phi, K)) + parcels.Sh(hs) - + radiation->Shs(thermo) + + radiation->Sh(thermo) + combustion->Sh() ); diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H index 5b5767ef3e..ee38ffa837 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - basicPsiThermo::New(mesh) + psiThermo::New(mesh) ); - basicPsiThermo& thermo = pThermo(); + psiThermo& thermo = pThermo(); volScalarField rho ( diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 33cf308258..016dd5dbe8 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -33,7 +33,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "psiThermo.H" #include "turbulenceModel.H" #include "basicKinematicCloud.H" diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H b/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H index d4f142d545..4461a3aa55 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/createFields.H @@ -3,7 +3,7 @@ autoPtr thermo basicThermo::New(mesh) ); -const volScalarField& h = thermo->h(); +const volScalarField& h = thermo->he(); volScalarField rho ( diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C index 2789b52f83..18a0dbf6d4 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C @@ -32,7 +32,6 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "hCombustionThermo.H" #include "RASModel.H" #include "wallFvPatch.H" @@ -41,7 +40,7 @@ Description int main(int argc, char *argv[]) { timeSelector::addOptions(); -# include "addRegionOption.H" + #include "addRegionOption.H" #include "setRootCase.H" #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index aabd9c1b67..79a5374e4c 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -37,12 +37,13 @@ Description #include "OSspecific.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" using namespace Foam; -typedef specieThermo > thermo; +typedef specieThermo, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -178,7 +179,7 @@ int main(int argc, char *argv[]) Info<< "products " << (1/products.nMoles())*products << ';' << endl; - scalar Tad = products.TH(reactants.H(T0), 1000.0); + scalar Tad = products.THa(reactants.Ha(T0), 1000.0); Info<< "Tad = " << Tad << nl << endl; } diff --git a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C index 0e67fa0b7f..b51060f10b 100644 --- a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C +++ b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C @@ -36,13 +36,14 @@ Description #include "IOmanip.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" #include "SLPtrList.H" using namespace Foam; -typedef specieThermo > thermo; +typedef specieThermo, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 429d44f54d..4e30fcb85c 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -39,12 +39,13 @@ Description #include "IOmanip.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" using namespace Foam; -typedef specieThermo > thermo; +typedef specieThermo, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -241,7 +242,7 @@ int main(int argc, char *argv[]) scalar equilibriumFlameTemperatureNew = - products.TH(reactants.H(T0), adiabaticFlameTemperature); + products.THa(reactants.Ha(T0), adiabaticFlameTemperature); if (j==0) { diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C index 52135a6942..391964d9bb 100644 --- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C +++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C @@ -36,13 +36,14 @@ Description #include "OSspecific.H" #include "specieThermo.H" +#include "absoluteEnthalpy.H" #include "janafThermo.H" #include "perfectGas.H" #include "mixture.H" using namespace Foam; -typedef specieThermo > thermo; +typedef specieThermo, absoluteEnthalpy> thermo; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -115,7 +116,7 @@ int main(int argc, char *argv[]) } Info<< "Adiabatic flame temperature of mixture " << rMix.name() << " = " - << products.TH(reactants.H(T0), 1000.0) << " K" << endl; + << products.THa(reactants.Ha(T0), 1000.0) << " K" << endl; return 0; } diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H index 099049dfac..79f60208ed 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameArea.H @@ -112,7 +112,7 @@ public: // Constructors - //- Construct from dictionary and hsCombustionThermo + //- Construct from dictionary and psiReactionThermo reactionRateFlameArea ( const dictionary& dict, diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C index fb6a54c58c..19b957b2ea 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/reactionRateFlameArea/reactionRateFlameAreaNew.C @@ -48,7 +48,7 @@ Foam::autoPtr Foam::reactionRateFlameArea::New { FatalIOErrorIn ( - "reactionRateFlameArea::New(const hsCombustionThermo&)", + "reactionRateFlameArea::New(const psiReactionThermo&)", dict ) << "Unknown reactionRateFlameArea type " << reactionRateFlameAreaType << endl << endl diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H index 1984b7e0f6..5cfe838f59 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.H @@ -81,7 +81,7 @@ public: // Constructors - //- Construct from dictionary and hsCombustionThermo + //- Construct from dictionary and psiReactionThermo relaxation ( const word modelType, diff --git a/src/combustionModels/combustionModel/combustionModelNew.C b/src/combustionModels/combustionModel/combustionModelNew.C index 90f8ebd5eb..dc50b19c9b 100644 --- a/src/combustionModels/combustionModel/combustionModelNew.C +++ b/src/combustionModels/combustionModel/combustionModelNew.C @@ -29,7 +29,7 @@ License Foam::autoPtr Foam::combustionModel::New ( const dictionary& combustionProperties, - hsCombustionThermo& thermo, + psiReactionThermo& thermo, const compressible::turbulenceModel& turbulence, const surfaceScalarField& phi, const volScalarField& rho diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H index 8b561adda2..24ab4c984b 100644 --- a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModel.H @@ -131,10 +131,10 @@ public: inline tmp rho() const; //- Return const access to rho - inline const hsCombustionThermo& thermo() const; + inline const psiReactionThermo& thermo() const; //- Return non const access to rho - inline hsCombustionThermo& thermo(); + inline psiReactionThermo& thermo(); // I-O diff --git a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H index 66f55c9b84..e41318befe 100644 --- a/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H +++ b/src/combustionModels/psiChemistryCombustionModel/psiChemistryCombustionModelI.H @@ -44,13 +44,13 @@ Foam::combustionModels::psiChemistryCombustionModel::rho() const return pChemistry_->thermo().rho(); } -inline const Foam::hsCombustionThermo& +inline const Foam::psiReactionThermo& Foam::combustionModels::psiChemistryCombustionModel::thermo() const { return pChemistry_->thermo(); } -inline Foam::hsCombustionThermo& +inline Foam::psiReactionThermo& Foam::combustionModels::psiChemistryCombustionModel::thermo() { return pChemistry_->thermo(); diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel.C b/src/combustionModels/psiCombustionModel/psiCombustionModel.C index 82c3155f2c..28eefb3111 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel.C +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel.C @@ -46,7 +46,7 @@ Foam::combustionModels::psiCombustionModel::psiCombustionModel ) : combustionModel(modelType, mesh), - thermo_(hsCombustionThermo::New(mesh)) + thermo_(psiReactionThermo::New(mesh)) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModel.H b/src/combustionModels/psiCombustionModel/psiCombustionModel.H index 025778a660..639603a8ac 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModel.H +++ b/src/combustionModels/psiCombustionModel/psiCombustionModel.H @@ -40,7 +40,7 @@ SourceFiles #include "combustionModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsCombustionThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,7 +73,7 @@ protected: //- Thermo package - autoPtr thermo_; + autoPtr thermo_; @@ -124,10 +124,10 @@ public: // Member Functions //- Return access to the thermo package - inline hsCombustionThermo& thermo(); + inline psiReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsCombustionThermo& thermo() const; + inline const psiReactionThermo& thermo() const; //- Return tmp of rho virtual tmp rho() const; diff --git a/src/combustionModels/psiCombustionModel/psiCombustionModelI.H b/src/combustionModels/psiCombustionModel/psiCombustionModelI.H index e8e26d5e7a..e5c41ccf75 100644 --- a/src/combustionModels/psiCombustionModel/psiCombustionModelI.H +++ b/src/combustionModels/psiCombustionModel/psiCombustionModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsCombustionThermo& +inline Foam::psiReactionThermo& Foam::combustionModels::psiCombustionModel::thermo() { return thermo_(); } -inline const Foam::hsCombustionThermo& +inline const Foam::psiReactionThermo& Foam::combustionModels::psiCombustionModel::thermo() const { return thermo_(); diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H index 7034675897..b2f3616fb5 100644 --- a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModel.H @@ -131,10 +131,10 @@ public: inline tmp rho() const; //- Return const access to rho - inline const hsReactionThermo& thermo() const; + inline const rhoReactionThermo& thermo() const; //- Return non const access to rho - inline hsReactionThermo& thermo(); + inline rhoReactionThermo& thermo(); // I-O diff --git a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H index 8b2cd8c4c4..095537d2fb 100644 --- a/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H +++ b/src/combustionModels/rhoChemistryCombustionModel/rhoChemistryCombustionModelI.H @@ -44,13 +44,13 @@ Foam::combustionModels::rhoChemistryCombustionModel::rho() const return pChemistry_->thermo().rho(); } -inline const Foam::hsReactionThermo& +inline const Foam::rhoReactionThermo& Foam::combustionModels::rhoChemistryCombustionModel::thermo() const { return pChemistry_->thermo(); } -inline Foam::hsReactionThermo& +inline Foam::rhoReactionThermo& Foam::combustionModels::rhoChemistryCombustionModel::thermo() { return pChemistry_->thermo(); diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C index 2807710f2d..2e02c0ec19 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.C @@ -46,7 +46,7 @@ Foam::combustionModels::rhoCombustionModel::rhoCombustionModel ) : combustionModel(modelType, mesh), - thermo_(hsReactionThermo::New(mesh)) + thermo_(rhoReactionThermo::New(mesh)) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H index 6dc9dc2c5b..5923e3317b 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModel.H @@ -40,7 +40,7 @@ SourceFiles #include "combustionModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsReactionThermo.H" +#include "rhoReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ protected: // Protected data //- Thermo package - autoPtr thermo_; + autoPtr thermo_; public: @@ -127,10 +127,10 @@ public: //- Return access to the thermo package - inline hsReactionThermo& thermo(); + inline rhoReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsReactionThermo& thermo() const; + inline const rhoReactionThermo& thermo() const; //- Return tmp of rho virtual tmp rho() const; diff --git a/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H b/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H index 002eba7ff9..59618b961a 100644 --- a/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H +++ b/src/combustionModels/rhoCombustionModel/rhoCombustionModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsReactionThermo& +inline Foam::rhoReactionThermo& Foam::combustionModels::rhoCombustionModel::thermo() { return thermo_(); } -inline const Foam::hsReactionThermo& +inline const Foam::rhoReactionThermo& Foam::combustionModels::rhoCombustionModel::thermo() const { return thermo_(); diff --git a/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C b/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C index bce2c5a66a..580b7b0c46 100644 --- a/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C +++ b/src/fieldSources/basicSource/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTransfer.C @@ -124,14 +124,12 @@ calculateHtc() const volScalarField Nu(a_*pow(Re, b_)*pow(Pr_, c_)); - const volScalarField K(turb.alphaEff()*secondaryThermo.Cp()); - scalarField htcMapped(htc_.internalField().size(), 0.0); secondaryToPrimaryInterpPtr_->interpolateInternalField ( htcMapped, - Nu*K/ds_, + Nu*turb.kappaEff()/ds_, meshToMesh::MAP, eqOp() ); @@ -184,4 +182,4 @@ bool Foam::variableHeatTransfer::read(const dictionary& dict) } -// ************************************************************************* // \ No newline at end of file +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 1844a6b21e..9eaa877057 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -296,8 +296,8 @@ void Foam::ThermoCloud::relaxSources { CloudType::relaxSources(cloudOldTime); - this->relax(hsTrans_(), cloudOldTime.hsTrans(), "hs"); - this->relax(hsCoeff_(), cloudOldTime.hsCoeff(), "hs"); + this->relax(hsTrans_(), cloudOldTime.hsTrans(), "h"); + this->relax(hsCoeff_(), cloudOldTime.hsCoeff(), "h"); } @@ -306,8 +306,8 @@ void Foam::ThermoCloud::scaleSources() { CloudType::scaleSources(); - this->scale(hsTrans_(), "hs"); - this->scale(hsCoeff_(), "hs"); + this->scale(hsTrans_(), "h"); + this->scale(hsCoeff_(), "h"); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index e7f01f7c66..f78755a2e2 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -135,7 +135,7 @@ Foam::ThermoCloud::Sh(volScalarField& hs) const if (this->solution().coupled()) { - if (this->solution().semiImplicit("hs")) + if (this->solution().semiImplicit("h")) { const volScalarField Cp(thermo_.thermo().Cp()); const DimensionedField diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index ffd5329fbd..f517e11624 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -396,7 +396,7 @@ Foam::scalar Foam::CompositionModel::H forAll(Y, i) { label gid = props.globalIds()[i]; - HMixture += Y[i]*thermo_.carrier().H(gid, T); + HMixture += Y[i]*thermo_.carrier().Hs(gid, T); } break; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index e5948b85a7..900b580811 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C @@ -216,7 +216,7 @@ Foam::scalar Foam::LiquidEvaporation::dh } case (parent::etEnthalpyDifference): { - scalar hc = this->owner().composition().carrier().H(idc, T); + scalar hc = this->owner().composition().carrier().Hs(idc, T); scalar hp = liquids_.properties()[idl].h(p, T); dh = hc - hp; diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C index 643beb55e1..6c9668cd06 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C @@ -171,8 +171,8 @@ void Foam::LiquidEvaporationBoil::calculate forAll(this->owner().thermo().carrier().Y(), i) { scalar Yc = this->owner().thermo().carrier().Y()[i][cellI]; - Hc += Yc*this->owner().thermo().carrier().H(i, Tc); - Hsc += Yc*this->owner().thermo().carrier().H(i, Ts); + Hc += Yc*this->owner().thermo().carrier().Hs(i, Tc); + Hsc += Yc*this->owner().thermo().carrier().Hs(i, Ts); Cpc += Yc*this->owner().thermo().carrier().Cp(i, Ts); kappac += Yc*this->owner().thermo().carrier().kappa(i, Ts); } @@ -315,7 +315,7 @@ Foam::scalar Foam::LiquidEvaporationBoil::dh } case (parent::etEnthalpyDifference): { - scalar hc = this->owner().composition().carrier().H(idc, TDash); + scalar hc = this->owner().composition().carrier().Hs(idc, TDash); scalar hp = liquids_.properties()[idl].h(p, TDash); dh = hc - hp; diff --git a/src/mesh/blockMesh/blockMesh/blockMeshMerge.C b/src/mesh/blockMesh/blockMesh/blockMeshMerge.C index b97270f6c3..5d0d7f4217 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshMerge.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshMerge.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -118,7 +118,7 @@ void Foam::blockMesh::calcMergeInfo() // the size of the block. boundBox bb(blockCells[blockPlabel].points(blockFaces, blockPoints)); - const scalar mergeSqrDist = SMALL*magSqr(bb.span()); + const scalar mergeSqrDist = magSqr(SMALL*bb.span()); // This is an N^2 algorithm diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index c405d98fa9..bfa05abf85 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -383,7 +383,7 @@ thermoSingleLayer::thermoSingleLayer ( IOobject ( - "hsf", + "hf", time().timeName(), regionMesh(), IOobject::NO_READ, diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 1c08f455df..882fa2e54c 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -4,24 +4,17 @@ mixtures/basicMixture/basicMixtures.C basicThermo/basicThermo.C basicThermo/basicThermoNew.C -psiThermo/basicPsiThermo/basicPsiThermo.C -psiThermo/basicPsiThermo/basicPsiThermoNew.C -psiThermo/hPsiThermo/hPsiThermos.C -psiThermo/hsPsiThermo/hsPsiThermos.C -psiThermo/ePsiThermo/ePsiThermos.C +psiThermo/psiThermo/psiThermo.C +psiThermo/psiThermo/psiThermoNew.C +psiThermo/hePsiThermo/hePsiThermos.C -rhoThermo/basicRhoThermo/basicRhoThermo.C -rhoThermo/basicRhoThermo/basicRhoThermoNew.C -rhoThermo/hRhoThermo/hRhoThermos.C -rhoThermo/hsRhoThermo/hsRhoThermos.C +rhoThermo/rhoThermo/rhoThermo.C +rhoThermo/rhoThermo/rhoThermoNew.C +rhoThermo/heRhoThermo/heRhoThermos.C -derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C -derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C -derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C - -derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C -derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C -derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C +derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C +derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C +derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 59c0056040..09df66bfe2 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -27,12 +27,9 @@ License #include "fvMesh.H" #include "HashTable.H" #include "zeroGradientFvPatchFields.H" -#include "fixedEnthalpyFvPatchScalarField.H" -#include "gradientEnthalpyFvPatchScalarField.H" -#include "mixedEnthalpyFvPatchScalarField.H" -#include "fixedInternalEnergyFvPatchScalarField.H" -#include "gradientInternalEnergyFvPatchScalarField.H" -#include "mixedInternalEnergyFvPatchScalarField.H" +#include "fixedEnergyFvPatchScalarField.H" +#include "gradientEnergyFvPatchScalarField.H" +#include "mixedEnergyFvPatchScalarField.H" /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ @@ -44,7 +41,7 @@ namespace Foam // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -Foam::wordList Foam::basicThermo::hBoundaryTypes() +Foam::wordList Foam::basicThermo::heBoundaryTypes() { const volScalarField::GeometricBoundaryField& tbf = T_.boundaryField(); @@ -54,7 +51,7 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() { if (isA(tbf[patchi])) { - hbt[patchi] = fixedEnthalpyFvPatchScalarField::typeName; + hbt[patchi] = fixedEnergyFvPatchScalarField::typeName; } else if ( @@ -62,11 +59,11 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() || isA(tbf[patchi]) ) { - hbt[patchi] = gradientEnthalpyFvPatchScalarField::typeName; + hbt[patchi] = gradientEnergyFvPatchScalarField::typeName; } else if (isA(tbf[patchi])) { - hbt[patchi] = mixedEnthalpyFvPatchScalarField::typeName; + hbt[patchi] = mixedEnergyFvPatchScalarField::typeName; } } @@ -74,75 +71,26 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() } -void Foam::basicThermo::hBoundaryCorrection(volScalarField& h) +void Foam::basicThermo::heBoundaryCorrection(volScalarField& h) { volScalarField::GeometricBoundaryField& hbf = h.boundaryField(); forAll(hbf, patchi) { - if (isA(hbf[patchi])) + if (isA(hbf[patchi])) { - refCast(hbf[patchi]).gradient() + refCast(hbf[patchi]).gradient() = hbf[patchi].fvPatchField::snGrad(); } - else if (isA(hbf[patchi])) + else if (isA(hbf[patchi])) { - refCast(hbf[patchi]).refGrad() + refCast(hbf[patchi]).refGrad() = hbf[patchi].fvPatchField::snGrad(); } } } -Foam::wordList Foam::basicThermo::eBoundaryTypes() -{ - const volScalarField::GeometricBoundaryField& tbf = T_.boundaryField(); - - wordList ebt = tbf.types(); - - forAll(tbf, patchi) - { - if (isA(tbf[patchi])) - { - ebt[patchi] = fixedInternalEnergyFvPatchScalarField::typeName; - } - else if - ( - isA(tbf[patchi]) - || isA(tbf[patchi]) - ) - { - ebt[patchi] = gradientInternalEnergyFvPatchScalarField::typeName; - } - else if (isA(tbf[patchi])) - { - ebt[patchi] = mixedInternalEnergyFvPatchScalarField::typeName; - } - } - - return ebt; -} - - -void Foam::basicThermo::eBoundaryCorrection(volScalarField& e) -{ - volScalarField::GeometricBoundaryField& ebf = e.boundaryField(); - - forAll(ebf, patchi) - { - if (isA(ebf[patchi])) - { - refCast(ebf[patchi]) - .gradient() = ebf[patchi].fvPatchField::snGrad(); - } - else if (isA(ebf[patchi])) - { - refCast(ebf[patchi]) - .refGrad() = ebf[patchi].fvPatchField::snGrad(); - } - } -} - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::basicThermo::basicThermo(const fvMesh& mesh) @@ -255,227 +203,12 @@ const Foam::volScalarField& Foam::basicThermo::psi() const } -Foam::volScalarField& Foam::basicThermo::h() -{ - notImplemented("basicThermo::h()"); - return const_cast(volScalarField::null()); -} - - -const Foam::volScalarField& Foam::basicThermo::h() const -{ - notImplemented("basicThermo::h() const"); - return volScalarField::null(); -} - - -Foam::tmp Foam::basicThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::h" - "(const scalarField& T, const labelList& cells) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::h -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::h" - "(const scalarField& T, const label patchi) const" - ); - return tmp(NULL); -} - - -Foam::volScalarField& Foam::basicThermo::hs() -{ - notImplemented("basicThermo::hs()"); - return const_cast(volScalarField::null()); -} - - -const Foam::volScalarField& Foam::basicThermo::hs() const -{ - notImplemented("basicThermo::hs() const"); - return volScalarField::null(); -} - - -Foam::tmp Foam::basicThermo::hs -( - const scalarField& T, - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::hs" - "(const scalarField& T, const labelList& cells) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::hs -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::hs" - "(const scalarField& T, const label patchi) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::hc() const -{ - notImplemented("basicThermo::hc()"); - return volScalarField::null(); -} - - -Foam::tmp Foam::basicThermo::TH -( - const scalarField& h, - const scalarField& T0, // starting temperature - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::TH" - "(const scalarField&, const scalarField&, const labelList&) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::TH -( - const scalarField& h, - const scalarField& T0, // starting temperature - const label patchi -) const -{ - notImplemented - ( - "basicThermo::TH" - "(const scalarField&, const scalarField&, const label) const" - ); - return tmp(NULL); -} - - -Foam::volScalarField& Foam::basicThermo::e() -{ - notImplemented("basicThermo::e()"); - return const_cast(volScalarField::null()); -} - - -const Foam::volScalarField& Foam::basicThermo::e() const -{ - notImplemented("basicThermo::e()"); - return volScalarField::null(); -} - - -Foam::tmp Foam::basicThermo::e -( - const scalarField& T, - const labelList& cells -) const -{ - notImplemented - ( - "basicThermo::e" - "(const scalarField& T, const labelList& cells) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::e -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::e" - "(const scalarField& T, const label patchi) const" - ); - return tmp(NULL); -} - - const Foam::volScalarField& Foam::basicThermo::T() const { return T_; } -Foam::tmp Foam::basicThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::Cp" - "(const scalarField& T, const label patchi) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::Cp() const -{ - notImplemented("basicThermo::Cp() const"); - return volScalarField::null(); -} - - -Foam::tmp Foam::basicThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - notImplemented - ( - "basicThermo::Cv" - "(const scalarField& T, const label patchi) const" - ); - return tmp(NULL); -} - - -Foam::tmp Foam::basicThermo::Cv() const -{ - notImplemented("basicThermo::Cv() const"); - return volScalarField::null(); -} - - const Foam::volScalarField& Foam::basicThermo::mu() const { return mu_; diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index 92c4b01258..59ac5f1195 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -79,24 +79,14 @@ protected: // Protected Member Functions - // Enthalpy + // Enthalpy/Internal energy - //- Return the enthalpy field boundary types by interrogating the - // temperature field boundary types - wordList hBoundaryTypes(); + //- Return the enthalpy/internal energy field boundary types + // by interrogating the temperature field boundary types + wordList heBoundaryTypes(); - //- Correct the enthalpy field boundaries - void hBoundaryCorrection(volScalarField& h); - - - // Internal energy - - //- Return the internal energy field boundary types by - // interrogating the temperature field boundary types - wordList eBoundaryTypes(); - - //- Correct the internal energy field boundaries - void eBoundaryCorrection(volScalarField& e); + //- Correct the enthalpy/internal energy field boundaries + void heBoundaryCorrection(volScalarField& he); //- Construct as copy (not implemented) @@ -153,87 +143,45 @@ public: //- Compressibility [s^2/m^2] virtual const volScalarField& psi() const; - //- Total enthalpy [J/kg] + //- Enthalpy/Internal energy [J/kg] // Non-const access allowed for transport equations - virtual volScalarField& h(); + virtual volScalarField& he() = 0; - //- Total enthalpy [J/kg] - virtual const volScalarField& h() const; + //- Enthalpy/Internal energy [J/kg] + virtual const volScalarField& he() const = 0; - //- Total enthalpy for cell-set [J/kg] - virtual tmp h + //- Enthalpy/Internal energy for cell-set [J/kg] + virtual tmp he ( const scalarField& T, const labelList& cells - ) const; + ) const = 0; - //- Total enthalpy for patch [J/kg] - virtual tmp h + //- Enthalpy/Internal energy for patch [J/kg] + virtual tmp he ( const scalarField& T, const label patchi - ) const; - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs(); - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const; - - //- Sensible enthalpy for cell-set [J/kg] - virtual tmp hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp hs - ( - const scalarField& T, - const label patchi - ) const; + ) const = 0; //- Chemical enthalpy [J/kg] - virtual tmp hc() const; + virtual tmp hc() const = 0; - //- Temperature from enthalpy for cell-set - virtual tmp TH + //- Temperature from enthalpy/internal energy for cell-set + virtual tmp THE ( const scalarField& h, const scalarField& T0, // starting temperature const labelList& cells - ) const; + ) const = 0; - //- Temperature from enthalpy for patch - virtual tmp TH + //- Temperature from enthalpy/internal energy for patch + virtual tmp THE ( const scalarField& h, const scalarField& T0, // starting temperature const label patchi - ) const; - - //- Internal energy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& e(); - - //- Internal energy [J/kg] - virtual const volScalarField& e() const; - - //- Internal energy for cell-set [J/kg] - virtual tmp e - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Internal energy for patch [J/kg] - virtual tmp e - ( - const scalarField& T, - const label patchi - ) const; + ) const = 0; // Fields derived from thermodynamic state variables @@ -241,25 +189,55 @@ public: //- Temperature [K] virtual const volScalarField& T() const; + //- Heat capacity at constant pressure [J/kg/K] + virtual tmp Cp() const = 0; + //- Heat capacity at constant pressure for patch [J/kg/K] virtual tmp Cp ( const scalarField& T, const label patchi - ) const; + ) const = 0; - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; + //- Heat capacity at constant volume [J/kg/K] + virtual tmp Cv() const = 0; //- Heat capacity at constant volume for patch [J/kg/K] virtual tmp Cv ( const scalarField& T, const label patchi - ) const; + ) const = 0; - //- Heat capacity at constant volume [J/kg/K] - virtual tmp Cv() const; + //- gamma = Cp/Cv [] + virtual tmp gamma() const = 0; + + //- gamma = Cp/Cv for patch [] + virtual tmp gamma + ( + const scalarField& T, + const label patchi + ) const = 0; + + //- Heat capacity at constant pressure/volume [J/kg/K] + virtual tmp Cpv() const = 0; + + //- Heat capacity at constant pressure/volume for patch [J/kg/K] + virtual tmp Cpv + ( + const scalarField& T, + const label patchi + ) const = 0; + + //- Heat capacity ratio [] + virtual tmp CpByCpv() const = 0; + + //- Heat capacity ratio for patch [] + virtual tmp CpByCpv + ( + const scalarField& T, + const label patchi + ) const = 0; // Access to transport state variables @@ -271,6 +249,44 @@ public: virtual const volScalarField& alpha() const; + // Fields derived from transport state variables + + //- Thermal diffusivity for temperature of mixture [J/m/s/K] + virtual tmp kappa() const = 0; + + //- Thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp kappa + ( + const label patchi + ) const = 0; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp kappaEff + ( + const volScalarField& + ) const = 0; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp kappaEff + ( + const scalarField& alphat, + const label patchi + ) const = 0; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp alphaEff + ( + const volScalarField& alphat + ) const = 0; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp alphaEff + ( + const scalarField& alphat, + const label patchi + ) const = 0; + + //- Read thermophysicalProperties dictionary virtual bool read(); }; diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C similarity index 77% rename from src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C index ab28a0b5d9..78a5607435 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "fixedInternalEnergyFvPatchScalarField.H" +#include "fixedEnergyFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -31,8 +31,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -42,10 +42,10 @@ fixedInternalEnergyFvPatchScalarField {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( - const fixedInternalEnergyFvPatchScalarField& ptf, + const fixedEnergyFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -55,8 +55,8 @@ fixedInternalEnergyFvPatchScalarField {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -67,20 +67,20 @@ fixedInternalEnergyFvPatchScalarField {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( - const fixedInternalEnergyFvPatchScalarField& tppsf + const fixedEnergyFvPatchScalarField& tppsf ) : fixedValueFvPatchScalarField(tppsf) {} -Foam::fixedInternalEnergyFvPatchScalarField:: -fixedInternalEnergyFvPatchScalarField +Foam::fixedEnergyFvPatchScalarField:: +fixedEnergyFvPatchScalarField ( - const fixedInternalEnergyFvPatchScalarField& tppsf, + const fixedEnergyFvPatchScalarField& tppsf, const DimensionedField& iF ) : @@ -90,7 +90,7 @@ fixedInternalEnergyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::fixedInternalEnergyFvPatchScalarField::updateCoeffs() +void Foam::fixedEnergyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -107,7 +107,7 @@ void Foam::fixedInternalEnergyFvPatchScalarField::updateCoeffs() fvPatchScalarField& Tw = const_cast(thermo.T().boundaryField()[patchi]); Tw.evaluate(); - operator==(thermo.e(Tw, patchi)); + operator==(thermo.he(Tw, patchi)); fixedValueFvPatchScalarField::updateCoeffs(); } @@ -120,7 +120,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - fixedInternalEnergyFvPatchScalarField + fixedEnergyFvPatchScalarField ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H similarity index 78% rename from src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H index 196d4dfc32..7f29873fed 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::fixedEnthalpyFvPatchScalarField + Foam::fixedEnergyFvPatchScalarField Description - A fixed boundary condition for enthalpy + A fixed boundary condition for internal energy SourceFiles - fixedEnthalpyFvPatchScalarField.C + fixedEnergyFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef fixedEnthalpyFvPatchScalarField_H -#define fixedEnthalpyFvPatchScalarField_H +#ifndef fixedEnergyFvPatchScalarField_H +#define fixedEnergyFvPatchScalarField_H #include "fixedValueFvPatchFields.H" @@ -43,10 +43,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class fixedEnthalpyFvPatchScalarField Declaration + Class fixedEnergyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class fixedEnthalpyFvPatchScalarField +class fixedEnergyFvPatchScalarField : public fixedValueFvPatchScalarField { @@ -54,40 +54,40 @@ class fixedEnthalpyFvPatchScalarField public: //- Runtime type information - TypeName("fixedEnthalpy"); + TypeName("fixedEnergy"); // Constructors //- Construct from patch and internal field - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given fixedEnthalpyFvPatchScalarField + //- Construct by mapping given fixedEnergyFvPatchScalarField // onto a new patch - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( - const fixedEnthalpyFvPatchScalarField&, + const fixedEnergyFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( - const fixedEnthalpyFvPatchScalarField& + const fixedEnergyFvPatchScalarField& ); //- Construct and return a clone @@ -95,14 +95,14 @@ public: { return tmp ( - new fixedEnthalpyFvPatchScalarField(*this) + new fixedEnergyFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - fixedEnthalpyFvPatchScalarField + fixedEnergyFvPatchScalarField ( - const fixedEnthalpyFvPatchScalarField&, + const fixedEnergyFvPatchScalarField&, const DimensionedField& ); @@ -114,7 +114,7 @@ public: { return tmp ( - new fixedEnthalpyFvPatchScalarField(*this, iF) + new fixedEnergyFvPatchScalarField(*this, iF) ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C deleted file mode 100644 index 267e649e85..0000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedEnthalpy/fixedEnthalpyFvPatchScalarField.C +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "fixedEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "basicThermo.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fixedEnthalpyFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fixedEnthalpyFvPatchScalarField& tppsf -) -: - fixedValueFvPatchScalarField(tppsf) -{} - - -Foam::fixedEnthalpyFvPatchScalarField::fixedEnthalpyFvPatchScalarField -( - const fixedEnthalpyFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::fixedEnthalpyFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const basicThermo& thermo = db().lookupObject - ( - "thermophysicalProperties" - ); - - const label patchi = patch().index(); - - fvPatchScalarField& Tw = - const_cast(thermo.T().boundaryField()[patchi]); - Tw.evaluate(); - - if (dimensionedInternalField().name() == "h") - { - operator==(thermo.h(Tw, patchi)); - } - else - { - operator==(thermo.hs(Tw, patchi)); - } - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - fixedEnthalpyFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H deleted file mode 100644 index 4e8997b61d..0000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/fixedInternalEnergy/fixedInternalEnergyFvPatchScalarField.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::fixedInternalEnergyFvPatchScalarField - -Description - A fixed boundary condition for internal energy - -SourceFiles - fixedInternalEnergyFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef fixedInternalEnergyFvPatchScalarField_H -#define fixedInternalEnergyFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class fixedInternalEnergyFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class fixedInternalEnergyFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("fixedInternalEnergy"); - - - // Constructors - - //- Construct from patch and internal field - fixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - fixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given fixedInternalEnergyFvPatchScalarField - // onto a new patch - fixedInternalEnergyFvPatchScalarField - ( - const fixedInternalEnergyFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - fixedInternalEnergyFvPatchScalarField - ( - const fixedInternalEnergyFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new fixedInternalEnergyFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - fixedInternalEnergyFvPatchScalarField - ( - const fixedInternalEnergyFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new fixedInternalEnergyFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C similarity index 74% rename from src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C index a29e43e902..57bf5692c4 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "gradientInternalEnergyFvPatchScalarField.H" +#include "gradientEnergyFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -31,8 +31,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -42,10 +42,10 @@ gradientInternalEnergyFvPatchScalarField {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& ptf, + const gradientEnergyFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -55,8 +55,8 @@ gradientInternalEnergyFvPatchScalarField {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -67,20 +67,20 @@ gradientInternalEnergyFvPatchScalarField {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& tppsf + const gradientEnergyFvPatchScalarField& tppsf ) : fixedGradientFvPatchScalarField(tppsf) {} -Foam::gradientInternalEnergyFvPatchScalarField:: -gradientInternalEnergyFvPatchScalarField +Foam::gradientEnergyFvPatchScalarField:: +gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& tppsf, + const gradientEnergyFvPatchScalarField& tppsf, const DimensionedField& iF ) : @@ -90,7 +90,7 @@ gradientInternalEnergyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::gradientInternalEnergyFvPatchScalarField::updateCoeffs() +void Foam::gradientEnergyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -109,11 +109,11 @@ void Foam::gradientInternalEnergyFvPatchScalarField::updateCoeffs() Tw.evaluate(); - gradient() = thermo.Cv(Tw, patchi)*Tw.snGrad() + gradient() = thermo.Cpv(Tw, patchi)*Tw.snGrad() + patch().deltaCoeffs()* ( - thermo.e(Tw, patchi) - - thermo.e(Tw, patch().faceCells()) + thermo.he(Tw, patchi) + - thermo.he(Tw, patch().faceCells()) ); fixedGradientFvPatchScalarField::updateCoeffs(); @@ -127,7 +127,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H similarity index 77% rename from src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H index 88c0722996..d4007517d2 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientInternalEnergy/gradientInternalEnergyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.H @@ -28,12 +28,12 @@ Description Gradient boundary condition for internal energy SourceFiles - gradientInternalEnergyFvPatchScalarField.C + gradientEnergyFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef gradientInternalEnergyFvPatchScalarField_H -#define gradientInternalEnergyFvPatchScalarField_H +#ifndef gradientEnergyFvPatchScalarField_H +#define gradientEnergyFvPatchScalarField_H #include "fixedGradientFvPatchFields.H" @@ -43,10 +43,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class gradientInternalEnergyFvPatchScalarField Declaration + Class gradientEnergyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class gradientInternalEnergyFvPatchScalarField +class gradientEnergyFvPatchScalarField : public fixedGradientFvPatchScalarField { @@ -54,40 +54,40 @@ class gradientInternalEnergyFvPatchScalarField public: //- Runtime type information - TypeName("gradientInternalEnergy"); + TypeName("gradientEnergy"); // Constructors //- Construct from patch and internal field - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given gradientInternalEnergyFvPatchScalarField + //- Construct by mapping given gradientEnergyFvPatchScalarField // onto a new patch - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField&, + const gradientEnergyFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField& + const gradientEnergyFvPatchScalarField& ); //- Construct and return a clone @@ -95,14 +95,14 @@ public: { return tmp ( - new gradientInternalEnergyFvPatchScalarField(*this) + new gradientEnergyFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - gradientInternalEnergyFvPatchScalarField + gradientEnergyFvPatchScalarField ( - const gradientInternalEnergyFvPatchScalarField&, + const gradientEnergyFvPatchScalarField&, const DimensionedField& ); @@ -114,7 +114,7 @@ public: { return tmp ( - new gradientInternalEnergyFvPatchScalarField(*this, iF) + new gradientEnergyFvPatchScalarField(*this, iF) ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C deleted file mode 100644 index 4712ce52de..0000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.C +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "gradientEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "basicThermo.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedGradientFvPatchScalarField(p, iF) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const gradientEnthalpyFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedGradientFvPatchScalarField(p, iF, dict) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const gradientEnthalpyFvPatchScalarField& tppsf -) -: - fixedGradientFvPatchScalarField(tppsf) -{} - - -Foam::gradientEnthalpyFvPatchScalarField::gradientEnthalpyFvPatchScalarField -( - const gradientEnthalpyFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedGradientFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::gradientEnthalpyFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const basicThermo& thermo = db().lookupObject - ( - "thermophysicalProperties" - ); - - const label patchi = patch().index(); - - fvPatchScalarField& Tw = - const_cast(thermo.T().boundaryField()[patchi]); - - Tw.evaluate(); - - if (dimensionedInternalField().name() == "h") - { - gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() - + patch().deltaCoeffs()* - ( - thermo.h(Tw, patchi) - - thermo.h(Tw, patch().faceCells()) - ); - } - else - { - gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() - + patch().deltaCoeffs()* - ( - thermo.hs(Tw, patchi) - - thermo.hs(Tw, patch().faceCells()) - ); - } - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - gradientEnthalpyFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H deleted file mode 100644 index a2ac2d7447..0000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/gradientEnthalpy/gradientEnthalpyFvPatchScalarField.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::gradientEnthalpyFvPatchScalarField - -Description - Gradient boundary condition for enthalpy - -SourceFiles - gradientEnthalpyFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef gradientEnthalpyFvPatchScalarField_H -#define gradientEnthalpyFvPatchScalarField_H - -#include "fixedGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class gradientEnthalpyFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class gradientEnthalpyFvPatchScalarField -: - public fixedGradientFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("gradientEnthalpy"); - - - // Constructors - - //- Construct from patch and internal field - gradientEnthalpyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - gradientEnthalpyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given gradientEnthalpyFvPatchScalarField - // onto a new patch - gradientEnthalpyFvPatchScalarField - ( - const gradientEnthalpyFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - gradientEnthalpyFvPatchScalarField - ( - const gradientEnthalpyFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new gradientEnthalpyFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - gradientEnthalpyFvPatchScalarField - ( - const gradientEnthalpyFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new gradientEnthalpyFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C similarity index 75% rename from src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C rename to src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C index 6bdae90a06..7f6de1d954 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "mixedInternalEnergyFvPatchScalarField.H" +#include "mixedEnergyFvPatchScalarField.H" #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" @@ -32,8 +32,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -47,10 +47,10 @@ mixedInternalEnergyFvPatchScalarField } -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( - const mixedInternalEnergyFvPatchScalarField& ptf, + const mixedEnergyFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField& iF, const fvPatchFieldMapper& mapper @@ -60,8 +60,8 @@ mixedInternalEnergyFvPatchScalarField {} -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -72,20 +72,20 @@ mixedInternalEnergyFvPatchScalarField {} -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( - const mixedInternalEnergyFvPatchScalarField& tppsf + const mixedEnergyFvPatchScalarField& tppsf ) : mixedFvPatchScalarField(tppsf) {} -Foam::mixedInternalEnergyFvPatchScalarField:: -mixedInternalEnergyFvPatchScalarField +Foam::mixedEnergyFvPatchScalarField:: +mixedEnergyFvPatchScalarField ( - const mixedInternalEnergyFvPatchScalarField& tppsf, + const mixedEnergyFvPatchScalarField& tppsf, const DimensionedField& iF ) : @@ -95,7 +95,7 @@ mixedInternalEnergyFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::mixedInternalEnergyFvPatchScalarField::updateCoeffs() +void Foam::mixedEnergyFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -117,13 +117,13 @@ void Foam::mixedInternalEnergyFvPatchScalarField::updateCoeffs() Tw.evaluate(); valueFraction() = Tw.valueFraction(); - refValue() = thermo.e(Tw.refValue(), patchi); + refValue() = thermo.he(Tw.refValue(), patchi); refGrad() = - thermo.Cv(Tw, patchi)*Tw.refGrad() + thermo.Cpv(Tw, patchi)*Tw.refGrad() + patch().deltaCoeffs()* ( - thermo.e(Tw, patchi) - - thermo.e(Tw, patch().faceCells()) + thermo.he(Tw, patchi) + - thermo.he(Tw, patch().faceCells()) ); mixedFvPatchScalarField::updateCoeffs(); @@ -137,7 +137,7 @@ namespace Foam makePatchTypeField ( fvPatchScalarField, - mixedInternalEnergyFvPatchScalarField + mixedEnergyFvPatchScalarField ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H similarity index 78% rename from src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H rename to src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H index 2a7c2cd7b2..b948843aab 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.H +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnergy/mixedEnergyFvPatchScalarField.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see . Class - Foam::mixedEnthalpyFvPatchScalarField + Foam::mixedEnergyFvPatchScalarField Description - Mixed boundary conditions for enthalpy + Mixed boundary conditions for internal energy SourceFiles - mixedEnthalpyFvPatchScalarField.C + mixedEnergyFvPatchScalarField.C \*---------------------------------------------------------------------------*/ -#ifndef mixedEnthalpyFvPatchScalarField_H -#define mixedEnthalpyFvPatchScalarField_H +#ifndef mixedEnergyFvPatchScalarField_H +#define mixedEnergyFvPatchScalarField_H #include "mixedFvPatchFields.H" @@ -43,10 +43,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class mixedEnthalpyFvPatchScalarField Declaration + Class mixedEnergyFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ -class mixedEnthalpyFvPatchScalarField +class mixedEnergyFvPatchScalarField : public mixedFvPatchScalarField { @@ -54,40 +54,40 @@ class mixedEnthalpyFvPatchScalarField public: //- Runtime type information - TypeName("mixedEnthalpy"); + TypeName("mixedEnergy"); // Constructors //- Construct from patch and internal field - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField& ); //- Construct from patch, internal field and dictionary - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( const fvPatch&, const DimensionedField&, const dictionary& ); - //- Construct by mapping given mixedEnthalpyFvPatchScalarField + //- Construct by mapping given mixedEnergyFvPatchScalarField // onto a new patch - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( - const mixedEnthalpyFvPatchScalarField&, + const mixedEnergyFvPatchScalarField&, const fvPatch&, const DimensionedField&, const fvPatchFieldMapper& ); //- Construct as copy - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( - const mixedEnthalpyFvPatchScalarField& + const mixedEnergyFvPatchScalarField& ); //- Construct and return a clone @@ -95,14 +95,14 @@ public: { return tmp ( - new mixedEnthalpyFvPatchScalarField(*this) + new mixedEnergyFvPatchScalarField(*this) ); } //- Construct as copy setting internal field reference - mixedEnthalpyFvPatchScalarField + mixedEnergyFvPatchScalarField ( - const mixedEnthalpyFvPatchScalarField&, + const mixedEnergyFvPatchScalarField&, const DimensionedField& ); @@ -114,7 +114,7 @@ public: { return tmp ( - new mixedEnthalpyFvPatchScalarField(*this, iF) + new mixedEnergyFvPatchScalarField(*this, iF) ); } diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C deleted file mode 100644 index dfff693fd6..0000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedEnthalpy/mixedEnthalpyFvPatchScalarField.C +++ /dev/null @@ -1,152 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "mixedEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "basicThermo.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - mixedFvPatchScalarField(p, iF) -{ - valueFraction() = 0.0; - refValue() = 0.0; - refGrad() = 0.0; -} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const mixedEnthalpyFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - mixedFvPatchScalarField(ptf, p, iF, mapper) -{} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - mixedFvPatchScalarField(p, iF, dict) -{} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const mixedEnthalpyFvPatchScalarField& tppsf -) -: - mixedFvPatchScalarField(tppsf) -{} - - -Foam::mixedEnthalpyFvPatchScalarField::mixedEnthalpyFvPatchScalarField -( - const mixedEnthalpyFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - mixedFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const basicThermo& thermo = db().lookupObject - ( - "thermophysicalProperties" - ); - - const label patchi = patch().index(); - - mixedFvPatchScalarField& Tw = refCast - ( - const_cast(thermo.T().boundaryField()[patchi]) - ); - - Tw.evaluate(); - - valueFraction() = Tw.valueFraction(); - - if (dimensionedInternalField().name() == "h") - { - refValue() = thermo.h(Tw.refValue(), patchi); - refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() - + patch().deltaCoeffs()* - ( - thermo.h(Tw, patchi) - - thermo.h(Tw, patch().faceCells()) - ); - } - else - { - refValue() = thermo.hs(Tw.refValue(), patchi); - refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() - + patch().deltaCoeffs()* - ( - thermo.hs(Tw, patchi) - - thermo.hs(Tw, patch().faceCells()) - ); - } - - mixedFvPatchScalarField::updateCoeffs(); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - mixedEnthalpyFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H b/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H deleted file mode 100644 index 5b013a1d75..0000000000 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::mixedInternalEnergyFvPatchScalarField - -Description - Mixed boundary conditions for internal energy - -SourceFiles - mixedInternalEnergyFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mixedInternalEnergyFvPatchScalarField_H -#define mixedInternalEnergyFvPatchScalarField_H - -#include "mixedFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class mixedInternalEnergyFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class mixedInternalEnergyFvPatchScalarField -: - public mixedFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("mixedInternalEnergy"); - - - // Constructors - - //- Construct from patch and internal field - mixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - mixedInternalEnergyFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given mixedInternalEnergyFvPatchScalarField - // onto a new patch - mixedInternalEnergyFvPatchScalarField - ( - const mixedInternalEnergyFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - mixedInternalEnergyFvPatchScalarField - ( - const mixedInternalEnergyFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new mixedInternalEnergyFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - mixedInternalEnergyFvPatchScalarField - ( - const mixedInternalEnergyFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new mixedInternalEnergyFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C new file mode 100644 index 0000000000..774a73e7dd --- /dev/null +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -0,0 +1,618 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 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 "heThermo.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::heThermo::heThermo(const fvMesh& mesh) +: + BasicThermo(mesh), + MixtureType(*this, mesh), + + he_ + ( + IOobject + ( + MixtureType::thermoType::heName(), + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass, + this->heBoundaryTypes() + ) +{ + scalarField& heCells = he_.internalField(); + const scalarField& TCells = this->T_.internalField(); + + forAll(heCells, celli) + { + heCells[celli] = this->cellMixture(celli).HE(TCells[celli]); + } + + forAll(he_.boundaryField(), patchi) + { + he_.boundaryField()[patchi] == + he(this->T_.boundaryField()[patchi], patchi); + } + + this->heBoundaryCorrection(he_); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::heThermo::~heThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +Foam::tmp Foam::heThermo::he +( + const scalarField& T, + const labelList& cells +) const +{ + tmp the(new scalarField(T.size())); + scalarField& he = the(); + + forAll(T, celli) + { + he[celli] = this->cellMixture(cells[celli]).HE(T[celli]); + } + + return the; +} + + +template +Foam::tmp Foam::heThermo::he +( + const scalarField& T, + const label patchi +) const +{ + tmp the(new scalarField(T.size())); + scalarField& he = the(); + + forAll(T, facei) + { + he[facei] = this->patchFaceMixture(patchi, facei).HE(T[facei]); + } + + return the; +} + + +template +Foam::tmp +Foam::heThermo::hc() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp thc + ( + new volScalarField + ( + IOobject + ( + "hc", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + he_.dimensions() + ) + ); + + volScalarField& hcf = thc(); + scalarField& hcCells = hcf.internalField(); + + forAll(hcCells, celli) + { + hcCells[celli] = this->cellMixture(celli).Hc(); + } + + forAll(hcf.boundaryField(), patchi) + { + scalarField& hcp = hcf.boundaryField()[patchi]; + + forAll(hcp, facei) + { + hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); + } + } + + return thc; +} + + +template +Foam::tmp Foam::heThermo::Cp +( + const scalarField& T, + const label patchi +) const +{ + tmp tCp(new scalarField(T.size())); + scalarField& cp = tCp(); + + forAll(T, facei) + { + cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); + } + + return tCp; +} + + +template +Foam::tmp +Foam::heThermo::Cp() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp tCp + ( + new volScalarField + ( + IOobject + ( + "Cp", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass/dimTemperature + ) + ); + + volScalarField& cp = tCp(); + + forAll(this->T_, celli) + { + cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pCp = cp.boundaryField()[patchi]; + + forAll(pT, facei) + { + pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); + } + } + + return tCp; +} + + +template +Foam::tmp +Foam::heThermo::Cv +( + const scalarField& T, + const label patchi +) const +{ + tmp tCv(new scalarField(T.size())); + scalarField& cv = tCv(); + + forAll(T, facei) + { + cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); + } + + return tCv; +} + + +template +Foam::tmp +Foam::heThermo::Cv() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp tCv + ( + new volScalarField + ( + IOobject + ( + "Cv", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass/dimTemperature + ) + ); + + volScalarField& cv = tCv(); + + forAll(this->T_, celli) + { + cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + cv.boundaryField()[patchi] = + Cv(this->T_.boundaryField()[patchi], patchi); + } + + return tCv; +} + + +template +Foam::tmp Foam::heThermo::gamma +( + const scalarField& T, + const label patchi +) const +{ + tmp tgamma(new scalarField(T.size())); + scalarField& cpv = tgamma(); + + forAll(T, facei) + { + cpv[facei] = this->patchFaceMixture(patchi, facei).gamma(T[facei]); + } + + return tgamma; +} + + +template +Foam::tmp +Foam::heThermo::gamma() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp tgamma + ( + new volScalarField + ( + IOobject + ( + "gamma", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless + ) + ); + + volScalarField& cpv = tgamma(); + + forAll(this->T_, celli) + { + cpv[celli] = this->cellMixture(celli).gamma(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pgamma = cpv.boundaryField()[patchi]; + + forAll(pT, facei) + { + pgamma[facei] = + this->patchFaceMixture(patchi, facei).gamma(pT[facei]); + } + } + + return tgamma; +} + + +template +Foam::tmp Foam::heThermo::Cpv +( + const scalarField& T, + const label patchi +) const +{ + tmp tCpv(new scalarField(T.size())); + scalarField& cpv = tCpv(); + + forAll(T, facei) + { + cpv[facei] = this->patchFaceMixture(patchi, facei).Cpv(T[facei]); + } + + return tCpv; +} + + +template +Foam::tmp +Foam::heThermo::Cpv() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp tCpv + ( + new volScalarField + ( + IOobject + ( + "Cpv", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimEnergy/dimMass/dimTemperature + ) + ); + + volScalarField& cpv = tCpv(); + + forAll(this->T_, celli) + { + cpv[celli] = this->cellMixture(celli).Cpv(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pCpv = cpv.boundaryField()[patchi]; + + forAll(pT, facei) + { + pCpv[facei] = this->patchFaceMixture(patchi, facei).Cpv(pT[facei]); + } + } + + return tCpv; +} + + +template +Foam::tmp Foam::heThermo::CpByCpv +( + const scalarField& T, + const label patchi +) const +{ + tmp tCpByCpv(new scalarField(T.size())); + scalarField& cpByCpv = tCpByCpv(); + + forAll(T, facei) + { + cpByCpv[facei] = + this->patchFaceMixture(patchi, facei).cpBycpv(T[facei]); + } + + return tCpByCpv; +} + + +template +Foam::tmp +Foam::heThermo::CpByCpv() const +{ + const fvMesh& mesh = this->T_.mesh(); + + tmp tCpByCpv + ( + new volScalarField + ( + IOobject + ( + "CpByCpv", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimless + ) + ); + + volScalarField& cpByCpv = tCpByCpv(); + + forAll(this->T_, celli) + { + cpByCpv[celli] = this->cellMixture(celli).cpBycpv(this->T_[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pCpByCpv = cpByCpv.boundaryField()[patchi]; + + forAll(pT, facei) + { + pCpByCpv[facei] = + this->patchFaceMixture(patchi, facei).cpBycpv(pT[facei]); + } + } + + return tCpByCpv; +} + + +template +Foam::tmp Foam::heThermo::THE +( + const scalarField& h, + const scalarField& T0, + const labelList& cells +) const +{ + tmp tT(new scalarField(h.size())); + scalarField& T = tT(); + + forAll(h, celli) + { + T[celli] = this->cellMixture(cells[celli]).THE(h[celli], T0[celli]); + } + + return tT; +} + + +template +Foam::tmp Foam::heThermo::THE +( + const scalarField& h, + const scalarField& T0, + const label patchi +) const +{ + tmp tT(new scalarField(h.size())); + scalarField& T = tT(); + + forAll(h, facei) + { + T[facei] = this->patchFaceMixture + ( + patchi, + facei + ).THE(h[facei], T0[facei]); + } + + return tT; +} + + +template +Foam::tmp +Foam::heThermo::kappa() const +{ + tmp kappa(Cp()*this->alpha_); + kappa().rename("kappa"); + return kappa; +} + + +template +Foam::tmp Foam::heThermo::kappa +( + const label patchi +) const +{ + return + Cp(this->T_.boundaryField()[patchi], patchi) + *this->alpha_.boundaryField()[patchi]; +} + + +template +Foam::tmp +Foam::heThermo::kappaEff +( + const volScalarField& alphat +) const +{ + tmp kappaEff(Cp()*alphaEff(alphat)); + kappaEff().rename("kappaEff"); + return kappaEff; +} + + +template +Foam::tmp +Foam::heThermo::kappaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + Cp(this->T_.boundaryField()[patchi], patchi) + *alphaEff(alphat, patchi); +} + + +template +Foam::tmp +Foam::heThermo::alphaEff +( + const volScalarField& alphat +) const +{ + tmp alphaEff(this->CpByCpv()*(this->alpha_ + alphat)); + alphaEff().rename("alphaEff"); + return alphaEff; +} + + +template +Foam::tmp +Foam::heThermo::alphaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + this->CpByCpv(this->T_.boundaryField()[patchi], patchi) + *( + this->alpha_.boundaryField()[patchi] + + alphat + ); +} + + +template +bool Foam::heThermo::read() +{ + if (BasicThermo::read()) + { + MixtureType::read(*this); + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H new file mode 100644 index 0000000000..e46d48c717 --- /dev/null +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -0,0 +1,256 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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::heThermo + +Description + Enthalpy/Internal energy for a mixture based on compressibility + +SourceFiles + heThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef heThermo_H +#define heThermo_H + +#include "basicMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class heThermo Declaration +\*---------------------------------------------------------------------------*/ + +template +class heThermo +: + public BasicThermo, + public MixtureType +{ +protected: + + // Protected data + + //- Energy field + volScalarField he_; + + +private: + + // Private Member Functions + + //- Construct as copy (not implemented) + heThermo(const heThermo&); + + +public: + + // Constructors + + //- Construct from mesh + heThermo(const fvMesh&); + + + //- Destructor + virtual ~heThermo(); + + + // Member functions + + //- Return the compostion of the mixture + virtual typename MixtureType::basicMixtureType& + composition() + { + return *this; + } + + //- Return the compostion of the mixture + virtual const typename MixtureType::basicMixtureType& + composition() const + { + return *this; + } + + + // Access to thermodynamic state variables + + //- Enthalpy/Internal energy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& he() + { + return he_; + } + + //- Enthalpy/Internal energy [J/kg] + virtual const volScalarField& he() const + { + return he_; + } + + + // Fields derived from thermodynamic state variables + + //- Enthalpy/Internal energy for cell-set [J/kg] + virtual tmp he + ( + const scalarField& T, + const labelList& cells + ) const; + + //- Enthalpy/Internal energy for patch [J/kg] + virtual tmp he + ( + const scalarField& T, + const label patchi + ) const; + + //- Chemical enthalpy [J/kg] + virtual tmp hc() const; + + //- Temperature from enthalpy/internal energy for cell-set + virtual tmp THE + ( + const scalarField& he, + const scalarField& T0, // starting temperature + const labelList& cells + ) const; + + //- Temperature from enthalpy/internal energy for patch + virtual tmp THE + ( + const scalarField& he, + const scalarField& T0, // starting temperature + const label patchi + ) const; + + //- Heat capacity at constant pressure for patch [J/kg/K] + virtual tmp Cp + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure [J/kg/K] + virtual tmp Cp() const; + + //- Heat capacity at constant volume for patch [J/kg/K] + virtual tmp Cv + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant volume [J/kg/K] + virtual tmp Cv() const; + + //- gamma = Cp/Cv [] + virtual tmp gamma() const; + + //- gamma = Cp/Cv for patch [] + virtual tmp gamma + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure/volume for patch [J/kg/K] + virtual tmp Cpv + ( + const scalarField& T, + const label patchi + ) const; + + //- Heat capacity at constant pressure/volume [J/kg/K] + virtual tmp Cpv() const; + + //- Heat capacity ratio [] + virtual tmp CpByCpv() const; + + //- Heat capacity ratio for patch [] + virtual tmp CpByCpv + ( + const scalarField& T, + const label patchi + ) const; + + + // Fields derived from transport state variables + + //- Thermal diffusivity for temperature of mixture [J/m/s/K] + virtual tmp kappa() const; + + //- Thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp kappa + ( + const label patchi + ) const; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp kappaEff(const volScalarField&) const; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp kappaEff + ( + const scalarField& alphat, + const label patchi + ) const; + + //- Effective thermal diffusivity of mixture [J/m/s/K] + virtual tmp alphaEff + ( + const volScalarField& alphat + ) const; + + //- Effective thermal diffusivity of mixture for patch [J/m/s/K] + virtual tmp alphaEff + ( + const scalarField& alphat, + const label patchi + ) const; + + + //- Read thermophysicalProperties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +#ifdef NoRepository +# include "heThermo.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H index f7a00f138f..c809ba0c3d 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixture.H @@ -54,6 +54,10 @@ class basicMixture public: + //- The base class of the mixture + typedef basicMixture basicMixtureType; + + // Runtime type information TypeName("basicMixture"); diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C index 7239d8d332..bb09e15803 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,13 +32,15 @@ Description #include "makeBasicMixture.H" #include "perfectGas.H" -#include "pressurePerfectGas.H" #include "incompressible.H" +#include "isobaricPerfectGas.H" #include "eConstThermo.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleInternalEnergy.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -63,6 +65,7 @@ makeBasicMixture ( pureMixture, constTransport, + sensibleInternalEnergy, eConstThermo, perfectGas ); @@ -71,15 +74,16 @@ makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleInternalEnergy, eConstThermo, perfectGas ); - makeBasicMixture ( pureMixture, constTransport, + sensibleInternalEnergy, hConstThermo, perfectGas ); @@ -88,6 +92,7 @@ makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleInternalEnergy, hConstThermo, perfectGas ); @@ -96,6 +101,7 @@ makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleInternalEnergy, janafThermo, perfectGas ); @@ -104,6 +110,34 @@ makeBasicMixture ( pureMixture, constTransport, + sensibleEnthalpy, + hConstThermo, + perfectGas +); + +makeBasicMixture +( + pureMixture, + sutherlandTransport, + sensibleEnthalpy, + hConstThermo, + perfectGas +); + +makeBasicMixture +( + pureMixture, + sutherlandTransport, + sensibleEnthalpy, + janafThermo, + perfectGas +); + +makeBasicMixture +( + pureMixture, + constTransport, + sensibleEnthalpy, hConstThermo, incompressible ); @@ -111,39 +145,46 @@ makeBasicMixture makeBasicPolyMixture ( pureMixture, - 3 + 3, + sensibleEnthalpy ); makeBasicPolyMixture ( pureMixture, - 8 + 8, + sensibleEnthalpy ); + makeBasicMixture ( pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); makeBasicMixture ( pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, - pressurePerfectGas + isobaricPerfectGas ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H b/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H index 3d12d63344..f21bfdea64 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/makeBasicMixture.H @@ -32,20 +32,22 @@ Description #define makeBasicMixture_H #include "basicMixture.H" +#include "sensibleEnthalpy.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeBasicMixture(Mixture,Transport,Thermo,EqnOfState) \ +#define makeBasicMixture(Mixture,Transport,Type,Thermo,EqnOfState) \ \ -typedef Mixture > > > \ - Mixture##Transport##Thermo##EqnOfState; \ +typedef \ + Mixture, Type> > > \ + Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ - (Mixture##Transport##Thermo##EqnOfState, \ - #Mixture"<"#Transport">>>", 0) + (Mixture##Transport##Type##Thermo##EqnOfState, \ + #Mixture"<"#Transport","#Type">>>", 0) -#define makeBasicPolyMixture(Mixture,Order) \ +#define makeBasicPolyMixture(Mixture,Order,Type) \ \ typedef polynomialTransport \ < \ @@ -55,17 +57,18 @@ typedef polynomialTransport \ < \ icoPolynomial, \ Order \ - > \ + >, \ + Type \ >, \ Order \ -> icoPoly##Order##ThermoPhysics; \ +> icoPoly##Order##Type##ThermoPhysics; \ \ -typedef Mixture \ - Mixture##icoPoly##Order##ThermoPhysics; \ +typedef Mixture \ + Mixture##icoPoly##Order##Type##ThermoPhysics; \ \ defineTemplateTypeNameAndDebugWithName \ - (Mixture##icoPoly##Order##ThermoPhysics, \ - #Mixture"", 0) + (Mixture##icoPoly##Order##Type##ThermoPhysics, \ + #Mixture"", 0) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H deleted file mode 100644 index d9322918d5..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/makeBasicPsiThermo.H +++ /dev/null @@ -1,72 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 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 . - -InClass - Foam::basicPsiThermo - -Description - Macros for creating 'basic' compresibility-based thermo packages - -\*---------------------------------------------------------------------------*/ - -#ifndef makeBasicPsiThermo_H -#define makeBasicPsiThermo_H - -#include "basicPsiThermo.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeBasicPsiThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \ - \ -typedef Cthermo > > > > \ - Cthermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ - #Cthermo \ - "<"#Mixture"<"#Transport">>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C deleted file mode 100644 index 3bc2351033..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C +++ /dev/null @@ -1,347 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "ePsiThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::ePsiThermo::calculate() -{ - const scalarField& eCells = e_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.TE(eCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphae(TCells[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - - fvPatchScalarField& pe = e_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pe[facei] = mixture_.E(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphae(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.TE(pe[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphae(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::ePsiThermo::ePsiThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - MixtureType(*this, mesh), - - e_ - ( - IOobject - ( - "e", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->eBoundaryTypes() - ) -{ - scalarField& eCells = e_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(eCells, celli) - { - eCells[celli] = this->cellMixture(celli).E(TCells[celli]); - } - - forAll(e_.boundaryField(), patchi) - { - e_.boundaryField()[patchi] == - e(this->T_.boundaryField()[patchi], patchi); - } - - this->eBoundaryCorrection(e_); - - calculate(); - - // Switch on saving old time - this->psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::ePsiThermo::~ePsiThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::ePsiThermo::correct() -{ - if (debug) - { - Info<< "entering ePsiThermo::correct()" << endl; - } - - // force the saving of the old-time values - this->psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting ePsiThermo::correct()" << endl; - } -} - - -template -Foam::tmp Foam::ePsiThermo::e -( - const scalarField& T, - const labelList& cells -) const -{ - tmp te(new scalarField(T.size())); - scalarField& h = te(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).E(T[celli]); - } - - return te; -} - - -template -Foam::tmp Foam::ePsiThermo::e -( - const scalarField& T, - const label patchi -) const -{ - tmp te(new scalarField(T.size())); - scalarField& h = te(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).E(T[facei]); - } - - return te; -} - - -template -Foam::tmp Foam::ePsiThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp Foam::ePsiThermo::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template -Foam::tmp Foam::ePsiThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template -Foam::tmp Foam::ePsiThermo::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template -bool Foam::ePsiThermo::read() -{ - if (basicPsiThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H deleted file mode 100644 index c1f85b2c6d..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::ePsiThermo - -Description - Internal energy for a mixture based on compressibility - -SourceFiles - ePsiThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef ePsiThermo_H -#define ePsiThermo_H - -#include "basicPsiThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class ePsiThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class ePsiThermo -: - public basicPsiThermo, - public MixtureType -{ - // Private data - - //- Internal energy field - volScalarField e_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - ePsiThermo(const ePsiThermo&); - - -public: - - //- Runtime type information - TypeName("ePsiThermo"); - - - // Constructors - - //- Construct from mese - ePsiThermo(const fvMesh&); - - - //- Destructor - virtual ~ePsiThermo(); - - - // Member functions - - //- Return the compostion of the mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Internal energy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& e() - { - return e_; - } - - //- Internal energy [J/kg] - virtual const volScalarField& e() const - { - return e_; - } - - - // Fields derived from thermodynamic state variables - - //- Internal energy for cell-set [J/kg] - virtual tmp e - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Internal energy for patch [J/kg] - virtual tmp e - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "ePsiThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C deleted file mode 100644 index 2b551a834e..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C +++ /dev/null @@ -1,99 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "makeBasicPsiThermo.H" - -#include "perfectGas.H" - -#include "eConstThermo.H" -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "ePsiThermo.H" -#include "pureMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - constTransport, - eConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - sutherlandTransport, - eConstThermo, - perfectGas -); - - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - sutherlandTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - ePsiThermo, - pureMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C deleted file mode 100644 index 7f4d0fe188..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C +++ /dev/null @@ -1,345 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hPsiThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hPsiThermo::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture_.H(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hPsiThermo::hPsiThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - MixtureType(*this, mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == - h(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); - - // Switch on saving old time - this->psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hPsiThermo::~hPsiThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hPsiThermo::correct() -{ - if (debug) - { - Info<< "entering hPsiThermo::correct()" << endl; - } - - // force the saving of the old-time values - this->psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hPsiThermo::correct()" << endl; - } -} - - -template -Foam::tmp Foam::hPsiThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template -Foam::tmp Foam::hPsiThermo::h -( - const scalarField& T, - const label patchi -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template -Foam::tmp Foam::hPsiThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp Foam::hPsiThermo::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template -Foam::tmp Foam::hPsiThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template -Foam::tmp Foam::hPsiThermo::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template -bool Foam::hPsiThermo::read() -{ - if (basicPsiThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H deleted file mode 100644 index 44cc9ca827..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hPsiThermo - -Description - Enthalpy for a mixture based on compressibility - -SourceFiles - hPsiThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hPsiThermo_H -#define hPsiThermo_H - -#include "basicPsiThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hPsiThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class hPsiThermo -: - public basicPsiThermo, - public MixtureType -{ - // Private data - - //- Enthalpy field - volScalarField h_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hPsiThermo(const hPsiThermo&); - - -public: - - //- Runtime type information - TypeName("hPsiThermo"); - - - // Constructors - - //- Construct from mesh - hPsiThermo(const fvMesh&); - - - //- Destructor - virtual ~hPsiThermo(); - - - // Member functions - - //- Return the compostion of the mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hPsiThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C deleted file mode 100644 index 0029038e6f..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.C +++ /dev/null @@ -1,79 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "makeBasicPsiThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "hPsiThermo.H" -#include "pureMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ - -makeBasicPsiThermo -( - hPsiThermo, - pureMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hPsiThermo, - pureMixture, - sutherlandTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hPsiThermo, - pureMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C new file mode 100644 index 0000000000..4d1ce938b0 --- /dev/null +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.C @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 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 "hePsiThermo.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +void Foam::hePsiThermo::calculate() +{ + const scalarField& hCells = this->he_.internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture_ = + this->cellMixture(celli); + + TCells[celli] = mixture_.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); + + muCells[celli] = mixture_.mu(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + + fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture_.HE(pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture_.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::hePsiThermo::hePsiThermo(const fvMesh& mesh) +: + heThermo(mesh) +{ + calculate(); + + // Switch on saving old time + this->psi_.oldTime(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::hePsiThermo::~hePsiThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::hePsiThermo::correct() +{ + if (debug) + { + Info<< "entering hePsiThermo::correct()" << endl; + } + + // force the saving of the old-time values + this->psi_.oldTime(); + + calculate(); + + if (debug) + { + Info<< "exiting hePsiThermo::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H new file mode 100644 index 0000000000..827ca0164c --- /dev/null +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermo.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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::hePsiThermo + +Description + Enthalpy for a mixture based on compressibility + +SourceFiles + hePsiThermo.C + +\*---------------------------------------------------------------------------*/ + +#ifndef hePsiThermo_H +#define hePsiThermo_H + +#include "psiThermo.H" +#include "heThermo.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class hePsiThermo Declaration +\*---------------------------------------------------------------------------*/ + +template +class hePsiThermo +: + public heThermo +{ + // Private Member Functions + + //- Calculate the thermo variables + void calculate(); + + //- Construct as copy (not implemented) + hePsiThermo(const hePsiThermo&); + +public: + + //- Runtime type information + TypeName("hePsiThermo"); + + + // Constructors + + //- Construct from mesh + hePsiThermo(const fvMesh&); + + + //- Destructor + virtual ~hePsiThermo(); + + + // Member functions + + //- Update properties + virtual void correct(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +#ifdef NoRepository +# include "hePsiThermo.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermos.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C similarity index 68% rename from src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermos.C rename to src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C index 260eebe8ec..1d258c409f 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C @@ -23,19 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "makeBasicRhoThermo.H" +#include "makePsiThermo.H" #include "perfectGas.H" -#include "pressurePerfectGas.H" #include "hConstThermo.H" +#include "eConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" +#include "sensibleInternalEnergy.H" #include "specieThermo.H" #include "constTransport.H" #include "sutherlandTransport.H" -#include "hsRhoThermo.H" +#include "hePsiThermo.H" #include "pureMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,62 +45,92 @@ License namespace Foam { -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ +/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */ -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeBasicRhoThermo + +/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */ + +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, constTransport, - hConstThermo, - pressurePerfectGas + sensibleInternalEnergy, + eConstThermo, + perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, pureMixture, sutherlandTransport, - hConstThermo, - pressurePerfectGas + sensibleInternalEnergy, + eConstThermo, + perfectGas ); -makeBasicRhoThermo +makePsiThermo ( - hsRhoThermo, + hePsiThermo, + pureMixture, + constTransport, + sensibleInternalEnergy, + hConstThermo, + perfectGas +); + +makePsiThermo +( + hePsiThermo, pureMixture, sutherlandTransport, + sensibleInternalEnergy, + hConstThermo, + perfectGas +); + +makePsiThermo +( + hePsiThermo, + pureMixture, + sutherlandTransport, + sensibleInternalEnergy, janafThermo, - pressurePerfectGas + perfectGas ); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C deleted file mode 100644 index a8010f8700..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C +++ /dev/null @@ -1,345 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hsPsiThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hsPsiThermo::calculate() -{ - const scalarField& hsCells = hs_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - - fvPatchScalarField& phs = hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture_.Hs(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hsPsiThermo::hsPsiThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - MixtureType(*this, mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hsCells = hs_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hsCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == - hs(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); - - // Switch on saving old time - this->psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hsPsiThermo::~hsPsiThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hsPsiThermo::correct() -{ - if (debug) - { - Info<< "entering hsPsiThermo::correct()" << endl; - } - - // force the saving of the old-time values - this->psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hsPsiThermo::correct()" << endl; - } -} - - -template -Foam::tmp Foam::hsPsiThermo::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template -Foam::tmp Foam::hsPsiThermo::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template -Foam::tmp Foam::hsPsiThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp Foam::hsPsiThermo::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template -Foam::tmp Foam::hsPsiThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template -Foam::tmp Foam::hsPsiThermo::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template -bool Foam::hsPsiThermo::read() -{ - if (basicPsiThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H deleted file mode 100644 index a72a521d8c..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hsPsiThermo - -Description - Sensible enthalpy for a mixture based on compressibility - -SourceFiles - hsPsiThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsPsiThermo_H -#define hsPsiThermo_H - -#include "basicPsiThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsPsiThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class hsPsiThermo -: - public basicPsiThermo, - public MixtureType -{ - // Private data - - //- Sensible enthalpy field [J/kg] - volScalarField hs_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hsPsiThermo(const hsPsiThermo&); - - -public: - - //- Runtime type information - TypeName("hsPsiThermo"); - - - // Constructors - - //- Construct from mesh - hsPsiThermo(const fvMesh&); - - - //- Destructor - virtual ~hsPsiThermo(); - - - // Member functions - - //- Return the compostion of the mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hsPsiThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C deleted file mode 100644 index 3c646d32bb..0000000000 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermos.C +++ /dev/null @@ -1,79 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "makeBasicPsiThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "hsPsiThermo.H" -#include "pureMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ - -makeBasicPsiThermo -( - hsPsiThermo, - pureMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hsPsiThermo, - pureMixture, - sutherlandTransport, - hConstThermo, - perfectGas -); - -makeBasicPsiThermo -( - hsPsiThermo, - pureMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H b/src/thermophysicalModels/basic/psiThermo/psiThermo/makePsiThermo.H similarity index 54% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H rename to src/thermophysicalModels/basic/psiThermo/psiThermo/makePsiThermo.H index 77a92a8fbb..8b65bd5fa5 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/makeHsReactionThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/makePsiThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,70 +22,71 @@ License along with OpenFOAM. If not, see . InClass - Foam::hReactionThermo + Foam::psiThermo + +Description + Macros for creating 'basic' compresibility-based thermo packages \*---------------------------------------------------------------------------*/ -#ifndef makeReactionThermo_H -#define makeReactionThermo_H +#ifndef makePsiThermo_H +#define makePsiThermo_H +#include "psiThermo.H" #include "addToRunTimeSelectionTable.H" -#include "basicRhoThermo.H" +#include "sensibleEnthalpy.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeHsReactionThermo(CThermo,MixtureThermo,Mixture,Transport,Thermo,EqnOfState)\ +#define makePsiThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \ \ -typedef MixtureThermo \ - > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ +typedef Cthermo \ +< \ + Mixture \ + < \ + Transport \ + < \ + specieThermo \ + < \ + Thermo \ + < \ + EqnOfState \ + >, \ + Type \ + > \ + > \ + > \ +> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - #MixtureThermo \ - "<"#Mixture"<"#Transport">>>>", \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ + #Cthermo \ + "<" \ + #Mixture \ + "<" \ + #Transport \ + "," \ + #Type \ + ">>>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + psiThermo, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ - CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -) - - -#define makeHsReactionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ - \ -typedef MixtureThermo > \ - MixtureThermo##Mixture##ThermoPhys; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##ThermoPhys, \ - #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicRhoThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ + basicThermo, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.C similarity index 86% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.C rename to src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.C index 11c6ce46a9..51754615b5 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.C @@ -23,20 +23,20 @@ License \*---------------------------------------------------------------------------*/ -#include "basicPsiThermo.H" +#include "psiThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(basicPsiThermo, 0); - defineRunTimeSelectionTable(basicPsiThermo, fvMesh); + defineTypeNameAndDebug(psiThermo, 0); + defineRunTimeSelectionTable(psiThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicPsiThermo::basicPsiThermo(const fvMesh& mesh) +Foam::psiThermo::psiThermo(const fvMesh& mesh) : basicThermo(mesh) {} @@ -44,7 +44,7 @@ Foam::basicPsiThermo::basicPsiThermo(const fvMesh& mesh) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::basicPsiThermo::~basicPsiThermo() +Foam::psiThermo::~psiThermo() {} diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.H similarity index 85% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H rename to src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.H index 24198e7de0..06c8bcc53c 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermo.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see . Class - Foam::basicPsiThermo + Foam::psiThermo Description Basic thermodynamic properties based on compressibility SourceFiles - basicPsiThermo.C - basicPsiThermoNew.C + psiThermo.C + psiThermoNew.C \*---------------------------------------------------------------------------*/ -#ifndef basicPsiThermo_H -#define basicPsiThermo_H +#ifndef psiThermo_H +#define psiThermo_H #include "basicThermo.H" #include "runTimeSelectionTables.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicPsiThermo Declaration + Class psiThermo Declaration \*---------------------------------------------------------------------------*/ -class basicPsiThermo +class psiThermo : public basicThermo { @@ -58,36 +58,38 @@ protected: // Protected Member Functions //- Construct as copy (not implemented) - basicPsiThermo(const basicPsiThermo&); + psiThermo(const psiThermo&); public: //- Runtime type information - TypeName("basicPsiThermo"); + TypeName("psiThermo"); //- Declare run-time constructor selection table declareRunTimeSelectionTable ( autoPtr, - basicPsiThermo, + psiThermo, fvMesh, (const fvMesh& mesh), (mesh) ); + // Constructors //- Construct from mesh - basicPsiThermo(const fvMesh&); + psiThermo(const fvMesh&); //- Selector - static autoPtr New(const fvMesh&); + static autoPtr New(const fvMesh&); + //- Destructor - virtual ~basicPsiThermo(); + virtual ~psiThermo(); // Member functions diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermoNew.C similarity index 86% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C rename to src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermoNew.C index 6327d4aaf7..a2407851a9 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo/psiThermoNew.C @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "basicPsiThermo.H" +#include "psiThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::basicPsiThermo::New +Foam::autoPtr Foam::psiThermo::New ( const fvMesh& mesh ) @@ -57,14 +57,14 @@ Foam::autoPtr Foam::basicPsiThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("basicPsiThermo::New(const fvMesh&)") - << "Unknown basicPsiThermo type " << modelType << nl << nl - << "Valid basicPsiThermo types are:" << nl + FatalErrorIn("psiThermo::New(const fvMesh&)") + << "Unknown psiThermo type " << modelType << nl << nl + << "Valid psiThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C deleted file mode 100644 index e2e7503cfc..0000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C +++ /dev/null @@ -1,388 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hRhoThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hRhoThermo::calculate() -{ - const scalarField& hCells = this->h_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& rhoCells = this->rho_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; - - fvPatchScalarField& ph = this->h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture_.H(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hRhoThermo::hRhoThermo(const fvMesh& mesh) -: - basicRhoThermo(mesh), - MixtureType(*this, mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == - h(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hRhoThermo::~hRhoThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hRhoThermo::correct() -{ - if (debug) - { - Info<< "entering hRhoThermo::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hRhoThermo::correct()" << endl; - } -} - - -template -Foam::tmp Foam::hRhoThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template -Foam::tmp Foam::hRhoThermo::h -( - const scalarField& T, - const label patchi -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template -Foam::tmp Foam::hRhoThermo::TH -( - const scalarField& h, - const scalarField& T0, - const labelList& cells -) const -{ - tmp tT(new scalarField(h.size())); - scalarField& T = tT(); - - forAll(h, celli) - { - T[celli] = this->cellMixture(cells[celli]).TH(h[celli], T0[celli]); - } - - return tT; -} - - -template -Foam::tmp Foam::hRhoThermo::TH -( - const scalarField& h, - const scalarField& T0, - const label patchi -) const -{ - tmp tT(new scalarField(h.size())); - scalarField& T = tT(); - - forAll(h, facei) - { - T[facei] = this->patchFaceMixture - ( - patchi, - facei - ).TH(h[facei], T0[facei]); - } - - return tT; -} - - -template -Foam::tmp Foam::hRhoThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp Foam::hRhoThermo::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template -Foam::tmp Foam::hRhoThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template -Foam::tmp Foam::hRhoThermo::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template -bool Foam::hRhoThermo::read() -{ - if (basicRhoThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H deleted file mode 100644 index 1f85793f6b..0000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.H +++ /dev/null @@ -1,193 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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::hRhoThermo - -Description - Enthalpy for a mixture based on density - -SourceFiles - hRhoThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hRhoThermo_H -#define hRhoThermo_H - -#include "basicRhoThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hRhoThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class hRhoThermo -: - public basicRhoThermo, - public MixtureType -{ - // Private data - - //- Enthalpy field - volScalarField h_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hRhoThermo(const hRhoThermo&); - - -public: - - //- Runtime type information - TypeName("hRhoThermo"); - - - // Constructors - - //- Construct from mesh - hRhoThermo(const fvMesh&); - - - //- Destructor - virtual ~hRhoThermo(); - - - // Member functions - - //- Return the compostion of the combustion mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the combustion mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp h - ( - const scalarField& T, - const label patchi - ) const; - - //- Temperature from enthalpy for cell-set - virtual tmp TH - ( - const scalarField& h, - const scalarField& T0, // starting temperature - const labelList& cells - ) const; - - //- Temperature from enthalpy for patch - virtual tmp TH - ( - const scalarField& h, - const scalarField& T0, // starting temperature - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hRhoThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C new file mode 100644 index 0000000000..044936ebae --- /dev/null +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.C @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 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 "heRhoThermo.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +void Foam::heRhoThermo::calculate() +{ + const scalarField& hCells = this->he().internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& rhoCells = this->rho_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture_ = + this->cellMixture(celli); + + TCells[celli] = mixture_.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); + rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); + + muCells[celli] = mixture_.mu(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he().boundaryField()[patchi]; + + fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture_.HE(pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + prho[facei] = mixture_.rho(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture_ = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture_.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); + prho[facei] = mixture_.rho(pp[facei], pT[facei]); + pmu[facei] = mixture_.mu(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::heRhoThermo::heRhoThermo(const fvMesh& mesh) +: + heThermo(mesh) +{ + calculate(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::heRhoThermo::~heRhoThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::heRhoThermo::correct() +{ + if (debug) + { + Info<< "entering heRhoThermo::correct()" << endl; + } + + calculate(); + + if (debug) + { + Info<< "exiting heRhoThermo::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.H similarity index 55% rename from src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H rename to src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.H index 911ab820aa..a2d62a78a2 100644 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermo.H @@ -22,28 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::speciesTransport + Foam::heRhoThermo Description - Basic species transport type based on the use of a fitting - function for nu. - - All other properties are derived from this primitive function. - - The nu function must be provided by the derived type, - e.g. SutherlandTransport. + Enthalpy for a mixture based on density SourceFiles - speciesTransportI.H - speciesTransport.C + heRhoThermo.C \*---------------------------------------------------------------------------*/ -#ifndef speciesTransport_H -#define speciesTransport_H +#ifndef heRhoThermo_H +#define heRhoThermo_H -//#include "speciesThermo.H" -#include "janafThermo.H" +#include "rhoThermo.H" +#include "heThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -51,52 +44,43 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class speciesTransport Declaration + Class heRhoThermo Declaration \*---------------------------------------------------------------------------*/ -class speciesTransport +template +class heRhoThermo : - public janafThermo + public heThermo { + // Private Member Functions + + //- Calculate the thermo variables + void calculate(); + + //- Construct as copy (not implemented) + heRhoThermo(const heRhoThermo&); + public: + //- Runtime type information + TypeName("heRhoThermo"); + + // Constructors - //- Construct from speciesThermo - inline speciesTransport(const janafThermo& sThermo); - - //- Construct from Istream - speciesTransport(Istream&); - - //- Construct from dictionary - speciesTransport(const dictionary& dict); + //- Construct from mesh + heRhoThermo(const fvMesh&); - // Member Functions - - // Dynamic viscosity [kg/ms] - //inline scalar mu(const scalar T) const - - // Thermal conductivity [W/mK] - //inline scalar kappa(const scalar T) const; - - // Thermal diffusivity for internal energy [kg/ms] - //inline scalar alphae(const scalar T) const; - - // Thermal diffusivity for enthalpy [kg/ms] - //inline scalar alphah(const scalar T) const; - - // Species diffusivity - //inline scalar D(const scalar T) const; - - //- Write to Ostream - void write(Ostream& os) const; + //- Destructor + virtual ~heRhoThermo(); - // Ostream Operator + // Member functions - friend Ostream& operator<<(Ostream&, const speciesTransport&); + //- Update properties + virtual void correct(); }; @@ -104,9 +88,11 @@ public: } // End namespace Foam -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -#include "speciesTransportI.H" +#ifdef NoRepository +# include "heRhoThermo.C" +#endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermos.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermos.C similarity index 74% rename from src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermos.C rename to src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermos.C index 7da039e267..28b80e1d4f 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermos.C +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo/heRhoThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,14 +23,16 @@ License \*---------------------------------------------------------------------------*/ -#include "makeBasicRhoThermo.H" +#include "makeRhoThermo.H" #include "perfectGas.H" -#include "pressurePerfectGas.H" +#include "isobaricPerfectGas.H" #include "incompressible.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" +#include "sensibleInternalEnergy.H" #include "specieThermo.H" #include "constTransport.H" @@ -40,7 +42,7 @@ License #include "hPolynomialThermo.H" #include "polynomialTransport.H" -#include "hRhoThermo.H" +#include "heRhoThermo.H" #include "pureMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,81 +52,90 @@ namespace Foam /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, incompressible ); -makeBasicRhoPolyThermo +makeRhoPolyThermo ( - hRhoThermo, + heRhoThermo, pureMixture, - 3 + 3, + sensibleEnthalpy ); -makeBasicRhoPolyThermo +makeRhoPolyThermo ( - hRhoThermo, + heRhoThermo, pureMixture, - 8 + 8, + sensibleEnthalpy ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, constTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, - pressurePerfectGas + isobaricPerfectGas ); -makeBasicRhoThermo +makeRhoThermo ( - hRhoThermo, + heRhoThermo, pureMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, - pressurePerfectGas + isobaricPerfectGas ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C deleted file mode 100644 index f8697bf675..0000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C +++ /dev/null @@ -1,344 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hsRhoThermo.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hsRhoThermo::calculate() -{ - const scalarField& hsCells = this->hs_.internalField(); - const scalarField& pCells = this->p_.internalField(); - - scalarField& TCells = this->T_.internalField(); - scalarField& psiCells = this->psi_.internalField(); - scalarField& rhoCells = this->rho_.internalField(); - scalarField& muCells = this->mu_.internalField(); - scalarField& alphaCells = this->alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; - fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; - - fvPatchScalarField& phs = this->hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture_.Hs(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = mixture_.rho(pp[facei], pT[facei]); - pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hsRhoThermo::hsRhoThermo(const fvMesh& mesh) -: - basicRhoThermo(mesh), - MixtureType(*this, mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{ - scalarField& hsCells = hs_.internalField(); - const scalarField& TCells = this->T_.internalField(); - - forAll(hsCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == - hs(this->T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hsRhoThermo::~hsRhoThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hsRhoThermo::correct() -{ - if (debug) - { - Info<< "entering hsRhoThermo::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hsRhoThermo::correct()" << endl; - } -} - - -template -Foam::tmp Foam::hsRhoThermo::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template -Foam::tmp Foam::hsRhoThermo::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template -Foam::tmp Foam::hsRhoThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp Foam::hsRhoThermo::Cp() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - forAll(this->T_, celli) - { - cp[celli] = this->cellMixture(celli).Cp(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; - fvPatchScalarField& pCp = cp.boundaryField()[patchi]; - - forAll(pT, facei) - { - pCp[facei] = this->patchFaceMixture(patchi, facei).Cp(pT[facei]); - } - } - - return tCp; -} - - -template -Foam::tmp Foam::hsRhoThermo::Cv -( - const scalarField& T, - const label patchi -) const -{ - tmp tCv(new scalarField(T.size())); - scalarField& cv = tCv(); - - forAll(T, facei) - { - cv[facei] = this->patchFaceMixture(patchi, facei).Cv(T[facei]); - } - - return tCv; -} - - -template -Foam::tmp Foam::hsRhoThermo::Cv() const -{ - const fvMesh& mesh = this->T_.mesh(); - - tmp tCv - ( - new volScalarField - ( - IOobject - ( - "Cv", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cv = tCv(); - - forAll(this->T_, celli) - { - cv[celli] = this->cellMixture(celli).Cv(this->T_[celli]); - } - - forAll(this->T_.boundaryField(), patchi) - { - cv.boundaryField()[patchi] = - Cv(this->T_.boundaryField()[patchi], patchi); - } - - return tCv; -} - - -template -bool Foam::hsRhoThermo::read() -{ - if (basicRhoThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H deleted file mode 100644 index 8ea8db706d..0000000000 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.H +++ /dev/null @@ -1,177 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hsRhoThermo - -Description - Sensible enthalpy for a mixture based on density - -SourceFiles - hsRhoThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsRhoThermo_H -#define hsRhoThermo_H - -#include "basicRhoThermo.H" -#include "basicMixture.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsRhoThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class hsRhoThermo -: - public basicRhoThermo, - public MixtureType -{ - // Private data - - //- Sensible enthalpy field [J/kg] - volScalarField hs_; - - - // Private Member Functions - - //- Calculate the thermo variables - void calculate(); - - //- Construct as copy (not implemented) - hsRhoThermo(const hsRhoThermo&); - - -public: - - //- Runtime type information - TypeName("hsRhoThermo"); - - - // Constructors - - //- Construct from mesh - hsRhoThermo(const fvMesh&); - - - //- Destructor - virtual ~hsRhoThermo(); - - - // Member functions - - //- Return the compostion of the combustion mixture - virtual basicMixture& composition() - { - return *this; - } - - //- Return the compostion of the combustion mixture - virtual const basicMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - // Fields derived from thermodynamic state variables - - //- Sensible enthalpy for cell-set [J/kg] - virtual tmp hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - //- Heat capacity at constant volume for patch [J/kg/K] - virtual tmp Cv - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant volume [J/kg/K] - virtual tmp Cv() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - -#ifdef NoRepository -# include "hsRhoThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/makeBasicRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/makeRhoThermo.H similarity index 62% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/makeBasicRhoThermo.H rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/makeRhoThermo.H index e7a4de187e..66869a4336 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/makeBasicRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/makeRhoThermo.H @@ -22,50 +22,75 @@ License along with OpenFOAM. If not, see . InClass - Foam::basicRhoThermo + Foam::rhoThermo Description Macros for creating 'basic' density-based thermo packages \*---------------------------------------------------------------------------*/ -#ifndef makeBasicRhoThermo_H -#define makeBasicRhoThermo_H +#ifndef makeRhoThermo_H +#define makeRhoThermo_H -#include "basicRhoThermo.H" +#include "rhoThermo.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeBasicRhoThermo(Cthermo,Mixture,Transport,Thermo,EqnOfState) \ +#define makeRhoThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \ \ -typedef Cthermo > > > > \ - Cthermo##Mixture##Transport##Thermo##EqnOfState; \ +typedef Cthermo \ +< \ + Mixture \ + < \ + Transport \ + < \ + specieThermo \ + < \ + Thermo \ + < \ + EqnOfState \ + >, \ + Type \ + > \ + > \ + > \ +> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ #Cthermo \ - "<"#Mixture"<"#Transport">>>>", \ + "<" \ + #Mixture \ + "<" \ + #Transport \ + "," \ + #Type \ + ">>>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + rhoThermo, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ basicThermo, \ - Cthermo##Mixture##Transport##Thermo##EqnOfState, \ + Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); -#define makeBasicRhoPolyThermo(Cthermo,Mixture,Order) \ +#define makeRhoPolyThermo(Cthermo,Mixture,Order,Type) \ \ typedef polynomialTransport \ < \ @@ -75,32 +100,33 @@ typedef polynomialTransport \ < \ icoPolynomial, \ Order \ - > \ + >, \ + Type \ >, \ Order \ -> icoPoly##Order##ThermoPhysics; \ +> icoPoly##Order##Type##ThermoPhysics; \ \ -typedef Cthermo > \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics; \ +typedef Cthermo > \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics, \ - #Cthermo"<"#Mixture">", \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \ + #Cthermo"<"#Mixture">", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics, \ + rhoThermo, \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ basicThermo, \ - Cthermo##Mixture##icoPoly##Order##ThermoPhysics, \ + Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \ fvMesh \ ); diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.C similarity index 84% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.C index 4d2fff1c35..fc4c9f5387 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.C @@ -23,20 +23,20 @@ License \*---------------------------------------------------------------------------*/ -#include "basicRhoThermo.H" +#include "rhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(basicRhoThermo, 0); - defineRunTimeSelectionTable(basicRhoThermo, fvMesh); + defineTypeNameAndDebug(rhoThermo, 0); + defineRunTimeSelectionTable(rhoThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::basicRhoThermo::basicRhoThermo(const fvMesh& mesh) +Foam::rhoThermo::rhoThermo(const fvMesh& mesh) : basicThermo(mesh), rho_ @@ -57,19 +57,19 @@ Foam::basicRhoThermo::basicRhoThermo(const fvMesh& mesh) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::basicRhoThermo::~basicRhoThermo() +Foam::rhoThermo::~rhoThermo() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::tmp Foam::basicRhoThermo::rho() const +Foam::tmp Foam::rhoThermo::rho() const { return rho_; } -Foam::volScalarField& Foam::basicRhoThermo::rho() +Foam::volScalarField& Foam::rhoThermo::rho() { return rho_; } diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.H similarity index 86% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.H index 59f20bc085..28616df157 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermo.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see . Class - Foam::basicRhoThermo + Foam::rhoThermo Description Basic thermodynamic properties based on density SourceFiles - basicRhoThermo.C - basicRhoThermoNew.C + rhoThermo.C + rhoThermoNew.C \*---------------------------------------------------------------------------*/ -#ifndef basicRhoThermo_H -#define basicRhoThermo_H +#ifndef rhoThermo_H +#define rhoThermo_H #include "basicThermo.H" #include "runTimeSelectionTables.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class basicRhoThermo Declaration + Class rhoThermo Declaration \*---------------------------------------------------------------------------*/ -class basicRhoThermo +class rhoThermo : public basicThermo { @@ -65,20 +65,20 @@ protected: // Protected Member Functions //- Construct as copy (not implemented) - basicRhoThermo(const basicRhoThermo&); + rhoThermo(const rhoThermo&); public: //- Runtime type information - TypeName("basicRhoThermo"); + TypeName("rhoThermo"); //- Declare run-time constructor selection table declareRunTimeSelectionTable ( autoPtr, - basicRhoThermo, + rhoThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -88,15 +88,15 @@ public: // Constructors //- Construct from mesh - basicRhoThermo(const fvMesh&); + rhoThermo(const fvMesh&); //- Selector - static autoPtr New(const fvMesh&); + static autoPtr New(const fvMesh&); //- Destructor - virtual ~basicRhoThermo(); + virtual ~rhoThermo(); // Member functions diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermoNew.C similarity index 87% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C rename to src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermoNew.C index 02e6b4932c..123f7c31f4 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo/rhoThermoNew.C @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "basicRhoThermo.H" +#include "rhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::basicRhoThermo::New +Foam::autoPtr Foam::rhoThermo::New ( const fvMesh& mesh ) @@ -57,15 +57,15 @@ Foam::autoPtr Foam::basicRhoThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("basicRhoThermo::New(const fvMesh&)") - << "Unknown basicRhoThermo type " + FatalErrorIn("rhoThermo::New(const fvMesh&)") + << "Unknown rhoThermo type " << modelType << nl << nl - << "Valid basicRhoThermo types are:" << nl + << "Valid rhoThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index f0807eb725..89e658352b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -361,7 +361,7 @@ void Foam::ODEChemistryModel::derivatives scalar dT = 0.0; for (label i = 0; i < nSpecie_; i++) { - const scalar hi = specieThermo_[i].h(T); + const scalar hi = specieThermo_[i].ha(T); dT += hi*dcdt[i]; } dT /= rho*cp; @@ -782,7 +782,7 @@ Foam::scalar Foam::ODEChemistryModel::solve forAll(rho, celli) { const scalar rhoi = rho[celli]; - const scalar hi = this->thermo().hs()[celli] + hc[celli]; + const scalar hi = this->thermo().he()[celli] + hc[celli]; const scalar pi = this->thermo().p()[celli]; scalar Ti = this->thermo().T()[celli]; @@ -815,7 +815,7 @@ Foam::scalar Foam::ODEChemistryModel::solve { mixture += (c[i]/cTot)*specieThermo_[i]; } - Ti = mixture.TH(hi, Ti); + Ti = mixture.THa(hi, Ti); timeLeft -= dt; this->deltaTChem_[celli] = tauC; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C index 81dab0cd33..5dd1f091cd 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.C @@ -44,7 +44,7 @@ Foam::psiChemistryModel::psiChemistryModel ) : basicChemistryModel(mesh), - thermo_(hsCombustionThermo::NewType(mesh, thermoTypeName)) + thermo_(psiReactionThermo::NewType(mesh, thermoTypeName)) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H index 448001153c..9381000ac3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModel.H @@ -40,7 +40,7 @@ SourceFiles #include "basicChemistryModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsCombustionThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ protected: // Protected data //- Thermo package - autoPtr thermo_; + autoPtr thermo_; public: @@ -113,10 +113,10 @@ public: // Member Functions //- Return access to the thermo package - inline hsCombustionThermo& thermo(); + inline psiReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsCombustionThermo& thermo() const; + inline const psiReactionThermo& thermo() const; }; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H index 543234e549..88bfa40c6b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsCombustionThermo& Foam::psiChemistryModel::thermo() +inline Foam::psiReactionThermo& Foam::psiChemistryModel::thermo() { return thermo_(); } -inline const Foam::hsCombustionThermo& Foam::psiChemistryModel::thermo() const +inline const Foam::psiReactionThermo& Foam::psiChemistryModel::thermo() const { return thermo_(); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C index cb13981647..569923a457 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.C @@ -44,7 +44,7 @@ Foam::rhoChemistryModel::rhoChemistryModel ) : basicChemistryModel(mesh), - thermo_(hsReactionThermo::NewType(mesh, thermoTypeName)) + thermo_(rhoReactionThermo::NewType(mesh, thermoTypeName)) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H index 8da1bd7fd9..2b3f551630 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModel.H @@ -40,7 +40,7 @@ SourceFiles #include "basicChemistryModel.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" -#include "hsReactionThermo.H" +#include "rhoReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -72,7 +72,7 @@ protected: // Protected data //- Thermo package - autoPtr thermo_; + autoPtr thermo_; public: @@ -113,10 +113,10 @@ public: // Member Functions //- Return access to the thermo package - inline hsReactionThermo& thermo(); + inline rhoReactionThermo& thermo(); //- Return const access to the thermo package - inline const hsReactionThermo& thermo() const; + inline const rhoReactionThermo& thermo() const; }; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H index 3cba5b30e5..06ac33b0b4 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelI.H @@ -25,13 +25,13 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::hsReactionThermo& Foam::rhoChemistryModel::thermo() +inline Foam::rhoReactionThermo& Foam::rhoChemistryModel::thermo() { return thermo_(); } -inline const Foam::hsReactionThermo& Foam::rhoChemistryModel::thermo() const +inline const Foam::rhoReactionThermo& Foam::rhoChemistryModel::thermo() const { return thermo_(); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C index e7d0fc9e65..ca471f6225 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C @@ -49,7 +49,7 @@ namespace laminarFlameSpeedModels Foam::laminarFlameSpeedModels::Gulders::Gulders ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -206,17 +206,17 @@ Foam::tmp Foam::laminarFlameSpeedModels::Gulders::Su0pTphi Foam::tmp Foam::laminarFlameSpeedModels::Gulders::operator()() const { - if (hhuCombustionThermo_.composition().contains("ft")) + if (psiuReactionThermo_.composition().contains("ft")) { - const volScalarField& ft = hhuCombustionThermo_.composition().Y("ft"); + const volScalarField& ft = psiuReactionThermo_.composition().Y("ft"); return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )*ft/((1 + SMALL) - ft) ); } @@ -224,8 +224,8 @@ Foam::laminarFlameSpeedModels::Gulders::operator()() const { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), equivalenceRatio_ ); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H index bd07c28312..5952224675 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.H @@ -106,11 +106,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo Gulders ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C index fec1359801..86c89e01b9 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C @@ -48,7 +48,7 @@ namespace laminarFlameSpeedModels Foam::laminarFlameSpeedModels::GuldersEGR::GuldersEGR ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -210,31 +210,31 @@ Foam::laminarFlameSpeedModels::GuldersEGR::operator()() const { if ( - hhuCombustionThermo_.composition().contains("ft") - && hhuCombustionThermo_.composition().contains("egr") + psiuReactionThermo_.composition().contains("ft") + && psiuReactionThermo_.composition().contains("egr") ) { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), dimensionedScalar ( - hhuCombustionThermo_.lookup("stoichiometricAirFuelMassRatio") + psiuReactionThermo_.lookup("stoichiometricAirFuelMassRatio") )/ ( - scalar(1)/hhuCombustionThermo_.composition().Y("ft") + scalar(1)/psiuReactionThermo_.composition().Y("ft") - scalar(1) ), - hhuCombustionThermo_.composition().Y("egr") + psiuReactionThermo_.composition().Y("egr") ); } else { return Su0pTphi ( - hhuCombustionThermo_.p(), - hhuCombustionThermo_.Tu(), + psiuReactionThermo_.p(), + psiuReactionThermo_.Tu(), equivalenceRatio_ ); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H index a7762cfb22..86dd6a2a71 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.H @@ -107,11 +107,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo GuldersEGR ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C index e74d787e63..615cc60eb2 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C +++ b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.C @@ -49,7 +49,7 @@ namespace laminarFlameSpeedModels Foam::laminarFlameSpeedModels::constant::constant ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : laminarFlameSpeed(dict, ct), @@ -76,12 +76,12 @@ Foam::laminarFlameSpeedModels::constant::operator()() const IOobject ( "Su0", - hhuCombustionThermo_.T().time().timeName(), - hhuCombustionThermo_.T().db(), + psiuReactionThermo_.T().time().timeName(), + psiuReactionThermo_.T().db(), IOobject::NO_READ, IOobject::NO_WRITE ), - hhuCombustionThermo_.T().mesh(), + psiuReactionThermo_.T().mesh(), Su_ ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H index 1ecf8a4de5..55900849c1 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H +++ b/src/thermophysicalModels/laminarFlameSpeed/constant/constant.H @@ -75,11 +75,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo constant ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C index d7e9f87235..3f6d9bf213 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.C @@ -40,14 +40,14 @@ namespace Foam Foam::laminarFlameSpeed::laminarFlameSpeed ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) : - hhuCombustionThermo_(ct), + psiuReactionThermo_(ct), fuel_(dict.lookup("fuel")), equivalenceRatio_(0) { - if (!hhuCombustionThermo_.composition().contains("ft")) + if (!psiuReactionThermo_.composition().contains("ft")) { equivalenceRatio_ = dimensionedScalar(dict.lookup("equivalenceRatio")).value(); diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H index 508195cc77..26e84e2768 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H @@ -43,7 +43,7 @@ SourceFiles #ifndef laminarFlameSpeed_H #define laminarFlameSpeed_H -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -63,7 +63,7 @@ protected: // Protected data - const hhuCombustionThermo& hhuCombustionThermo_; + const psiuReactionThermo& psiuReactionThermo_; //- Fuel word fuel_; @@ -96,7 +96,7 @@ public: dictionary, ( const dictionary& dict, - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ), (dict, ct) ); @@ -104,11 +104,11 @@ public: // Constructors - //- Construct from dictionary and hhuCombustionThermo + //- Construct from dictionary and psiuReactionThermo laminarFlameSpeed ( const dictionary&, - const hhuCombustionThermo& + const psiuReactionThermo& ); @@ -116,7 +116,7 @@ public: static autoPtr New ( - const hhuCombustionThermo& + const psiuReactionThermo& ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index 3511f7bc6a..8d18207d0b 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -29,7 +29,7 @@ License Foam::autoPtr Foam::laminarFlameSpeed::New ( - const hhuCombustionThermo& ct + const psiuReactionThermo& ct ) { // do not register the dictionary @@ -57,7 +57,7 @@ Foam::autoPtr Foam::laminarFlameSpeed::New { FatalIOErrorIn ( - "laminarFlameSpeed::New(const hhuCombustionThermo&)", + "laminarFlameSpeed::New(const psiuReactionThermo&)", propDict ) << "Unknown laminarFlameSpeed type " << corrType << nl << nl diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C index 7e780fe22f..383dbb6349 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C @@ -145,33 +145,15 @@ Foam::tmp Foam::radiation::radiationModel::Sh basicThermo& thermo ) const { - volScalarField& h = thermo.h(); - const volScalarField Cp(thermo.Cp()); + volScalarField& he = thermo.he(); + const volScalarField Cpv(thermo.Cpv()); const volScalarField T3(pow3(T_)); return ( Ru() - - fvm::Sp(4.0*Rp()*T3/Cp, h) - - Rp()*T3*(T_ - 4.0*h/Cp) - ); -} - - -Foam::tmp Foam::radiation::radiationModel::Shs -( - basicThermo& thermo -) const -{ - volScalarField& hs = thermo.hs(); - const volScalarField Cp(thermo.Cp()); - const volScalarField T3(pow3(T_)); - - return - ( - Ru() - - fvm::Sp(4.0*Rp()*T3/Cp, hs) - - Rp()*T3*(T_ - 4.0*hs/Cp) + - fvm::Sp(4.0*Rp()*T3/Cpv, he) + - Rp()*T3*(T_ - 4.0*he/Cpv) ); } diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H index f33f962784..e0eddb3972 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H @@ -176,11 +176,8 @@ public: //- Source term component (constant) virtual tmp > Ru() const = 0; - //- Enthalpy source term + //- Energy source term virtual tmp Sh(basicThermo& thermo) const; - - //- Sensible enthalpy source term - virtual tmp Shs(basicThermo& thermo) const; }; diff --git a/src/thermophysicalModels/reactionThermo/Make/files b/src/thermophysicalModels/reactionThermo/Make/files index 6f56f0ef00..d90ed39720 100644 --- a/src/thermophysicalModels/reactionThermo/Make/files +++ b/src/thermophysicalModels/reactionThermo/Make/files @@ -4,25 +4,17 @@ chemistryReaders/chemistryReader/makeChemistryReaders.C mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C -combustionThermo/hCombustionThermo/hCombustionThermo.C -combustionThermo/hCombustionThermo/hCombustionThermoNew.C -combustionThermo/hCombustionThermo/hCombustionThermos.C +psiReactionThermo/psiReactionThermo/psiReactionThermo.C +psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C +psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C -combustionThermo/hsCombustionThermo/hsCombustionThermo.C -combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C -combustionThermo/hsCombustionThermo/hsCombustionThermos.C +psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C +psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C +psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C -combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C -combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C -combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C - -reactionThermo/hReactionThermo/hReactionThermo.C -reactionThermo/hReactionThermo/hReactionThermoNew.C -reactionThermo/hReactionThermo/hReactionThermos.C - -reactionThermo/hsReactionThermo/hsReactionThermo.C -reactionThermo/hsReactionThermo/hsReactionThermoNew.C -reactionThermo/hsReactionThermo/hsReactionThermos.C +rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C +rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C +rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index ff2dadd0da..7e7fd8e07d 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "thermoPhysicsTypes.H" #include "chemistryReader.H" diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C deleted file mode 100644 index 3ff1c5938e..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "hCombustionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(hCombustionThermo, 0); - defineRunTimeSelectionTable(hCombustionThermo, fvMesh); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::hCombustionThermo::hCombustionThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::hCombustionThermo::~hCombustionThermo() -{} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H deleted file mode 100644 index 321140286c..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/makeCombustionThermo.H +++ /dev/null @@ -1,105 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 . - -InClass - Foam::hCombustionThermo - -\*---------------------------------------------------------------------------*/ - -#ifndef makeCombustionThermo_H -#define makeCombustionThermo_H - -#include "addToRunTimeSelectionTable.H" -#include "basicPsiThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeCombustionThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - Transport, \ - Thermo, \ - EqnOfState \ -) \ - \ -typedef MixtureThermo \ - > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - #MixtureThermo \ - "<"#Mixture"<"#Transport">>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -) - - -#define makeCombustionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ - \ -typedef MixtureThermo > \ - MixtureThermo##Mixture##ThermoPhys; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##ThermoPhys, \ - #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C deleted file mode 100644 index dc6a02a0ce..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "hsCombustionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(hsCombustionThermo, 0); - defineRunTimeSelectionTable(hsCombustionThermo, fvMesh); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::hsCombustionThermo::hsCombustionThermo(const fvMesh& mesh) -: - basicPsiThermo(mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::hsCombustionThermo::~hsCombustionThermo() -{} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H deleted file mode 100644 index 3727cbfb80..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermo.H +++ /dev/null @@ -1,143 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hsCombustionThermo - -Description - Sensible enthalpy variant of combustionThermo - -SourceFiles - hsCombustionThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsCombustionThermo_H -#define hsCombustionThermo_H - -#include "basicPsiThermo.H" -#include "basicMultiComponentMixture.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsCombustionThermo Declaration -\*---------------------------------------------------------------------------*/ - -class hsCombustionThermo -: - public basicPsiThermo -{ - -protected: - - // Protected data - - //- Sensible enthalpy field - volScalarField hs_; - - -public: - - //- Runtime type information - TypeName("hsCombustionThermo"); - - - //- Declare run-time constructor selection tables - declareRunTimeSelectionTable - ( - autoPtr, - hsCombustionThermo, - fvMesh, - (const fvMesh& mesh), - (mesh) - ); - - - // Constructors - - //- Construct from dictionary and mesh - hsCombustionThermo(const fvMesh&); - - - // Selectors - - //- Standard selection based on fvMesh - static autoPtr New(const fvMesh&); - - //- Select and check that package contains 'thermoType' - static autoPtr NewType - ( - const fvMesh&, - const word& thermoType - ); - - - //- Destructor - virtual ~hsCombustionThermo(); - - - // Member functions - - //- Return the composition of the multi-component mixture - virtual basicMultiComponentMixture& composition() = 0; - - //- Return the composition of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - //- Update properties - virtual void correct() = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C deleted file mode 100644 index ed9cf107a8..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "hsCombustionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::hsCombustionThermo::New -( - const fvMesh& mesh -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") - << "Unknown hsCombustionThermo type " - << modelType << nl << nl - << "Valid hsCombustionThermo types:" << nl - << fvMeshConstructorTablePtr_->toc() << nl - << exit(FatalError); - } - - return autoPtr(cstrIter()(mesh)); -} - - -Foam::autoPtr Foam::hsCombustionThermo::NewType -( - const fvMesh& mesh, - const word& thermoType -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - if (modelType.find(thermoType) == string::npos) - { - wordList allModels = fvMeshConstructorTablePtr_->toc(); - DynamicList validModels; - forAll(allModels, i) - { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } - } - - FatalErrorIn - ( - "autoPtr hsCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << modelType << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); - } - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "autoPtr hsCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Unknown hsCombustionThermo type " - << modelType << nl << nl - << "Valid hsCombustionThermo types are:" << nl - << fvMeshConstructorTablePtr_->toc() << nl - << exit(FatalError); - } - - return autoPtr(cstrIter()(mesh)); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C deleted file mode 100644 index 300e5e6245..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermos.C +++ /dev/null @@ -1,179 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "makeHsCombustionThermo.H" - -#include "hsCombustionThermo.H" -#include "hsPsiMixtureThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "dieselMixture.H" -#include "homogeneousMixture.H" -#include "inhomogeneousMixture.H" -#include "veryInhomogeneousMixture.H" -#include "singleStepReactingMixture.H" - -#include "reactingMixture.H" -#include "multiComponentMixture.H" - -#include "thermoPhysicsTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - homogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - inhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - veryInhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - homogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - inhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - veryInhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsCombustionThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - dieselMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -// Multi-component thermo - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - multiComponentMixture, - constGasThermoPhysics -); - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - multiComponentMixture, - gasThermoPhysics -); - - -// Multi-component reaction thermo - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - reactingMixture, - constGasThermoPhysics -); - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - reactingMixture, - gasThermoPhysics -); - - -makeHsCombustionMixtureThermo -( - hsCombustionThermo, - hsPsiMixtureThermo, - singleStepReactingMixture, - gasThermoPhysics -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H deleted file mode 100644 index 05f0e1dc20..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/makeHsCombustionThermo.H +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 . - -InClass - Foam::hsCombustionThermo - -\*---------------------------------------------------------------------------*/ - -#ifndef makeHsCombustionThermo_H -#define makeHsCombustionThermo_H - -#include "addToRunTimeSelectionTable.H" -#include "basicPsiThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define makeHsCombustionThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - Transport, \ - Thermo, \ - EqnOfState \ -) \ - \ -typedef MixtureThermo \ - > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - #MixtureThermo \ - "<"#Mixture"<"#Transport">>>>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ - fvMesh \ -) - - -#define makeHsCombustionMixtureThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - ThermoPhys \ -) \ - \ -typedef MixtureThermo > \ - MixtureThermo##Mixture##ThermoPhys; \ - \ -defineTemplateTypeNameAndDebugWithName \ -( \ - MixtureThermo##Mixture##ThermoPhys, \ - #MixtureThermo"<"#Mixture"<"#ThermoPhys">>", \ - 0 \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - basicPsiThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); \ - \ -addToRunTimeSelectionTable \ -( \ - CThermo, \ - MixtureThermo##Mixture##ThermoPhys, \ - fvMesh \ -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C deleted file mode 100644 index 7328d32966..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C +++ /dev/null @@ -1,320 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hPsiMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hPsiMixtureThermo::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture = - this->cellMixture(celli); - - TCells[celli] = mixture.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture.H(pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hPsiMixtureThermo::hPsiMixtureThermo(const fvMesh& mesh) -: - hCombustionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == h(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); - - // Switch on saving old time - psi_.oldTime(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hPsiMixtureThermo::~hPsiMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hPsiMixtureThermo::correct() -{ - if (debug) - { - Info<< "entering hPsiMixtureThermo::correct()" << endl; - } - - // force the saving of the old-time values - psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hPsiMixtureThermo::correct()" << endl; - } -} - - -template -Foam::tmp -Foam::hPsiMixtureThermo::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template -Foam::tmp -Foam::hPsiMixtureThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template -Foam::tmp -Foam::hPsiMixtureThermo::h -( - const scalarField& T, - const label patchi -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template -Foam::tmp -Foam::hPsiMixtureThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp -Foam::hPsiMixtureThermo::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template -bool Foam::hPsiMixtureThermo::read() -{ - if (hCombustionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C deleted file mode 100644 index 76f0a3a52f..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C +++ /dev/null @@ -1,317 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hsPsiMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hsPsiMixtureThermo::hsPsiMixtureThermo(const fvMesh& mesh) -: - hsCombustionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = hs_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == hs(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); - psi_.oldTime(); // Switch on saving old time -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hsPsiMixtureThermo::~hsPsiMixtureThermo() -{} - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hsPsiMixtureThermo::calculate() -{ - const scalarField& hsCells = hs_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture_ = - this->cellMixture(celli); - - TCells[celli] = mixture_.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - - muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - - fvPatchScalarField& phs = hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture_.Hs(pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture_ = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture_.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hsPsiMixtureThermo::correct() -{ - if (debug) - { - Info<< "entering hMixtureThermo::correct()" << endl; - } - - // force the saving of the old-time values - psi_.oldTime(); - - calculate(); - - if (debug) - { - Info<< "exiting hMixtureThermo::correct()" << endl; - } -} - -template -Foam::tmp -Foam::hsPsiMixtureThermo::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - hs_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template -Foam::tmp -Foam::hsPsiMixtureThermo::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template -Foam::tmp -Foam::hsPsiMixtureThermo::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template -Foam::tmp -Foam::hsPsiMixtureThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp -Foam::hsPsiMixtureThermo::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template -bool Foam::hsPsiMixtureThermo::read() -{ - if (hsCombustionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H deleted file mode 100644 index b645de28ab..0000000000 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.H +++ /dev/null @@ -1,146 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hsPsiMixtureThermo - -Description - Foam::hsPsiMixtureThermo - -SourceFiles - hsPsiMixtureThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsPsiMixtureThermo_H -#define hsPsiMixtureThermo_H - -#include "hsCombustionThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsPsiMixtureThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class hsPsiMixtureThermo -: - public hsCombustionThermo, - public MixtureType -{ - // Private Member Functions - - void calculate(); - - //- Construct as copy (not implemented) - hsPsiMixtureThermo(const hsPsiMixtureThermo&); - - -public: - - //- Runtime type information - TypeName("hsPsiMixtureThermo"); - - - // Constructors - - //- Construct from mesh - hsPsiMixtureThermo(const fvMesh&); - - - //- Destructor - virtual ~hsPsiMixtureThermo(); - - - // Member functions - - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Fields derived from thermodynamic state variables - - //- Chemical enthalpy [J/kg] - virtual tmp hc() const; - - //- Sensible enthalpy for cell-set [J/kg] - virtual tmp hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "hsPsiMixtureThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C index 192b32050f..60287252c7 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C @@ -27,7 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -98,7 +98,7 @@ void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() return; } - const hhuCombustionThermo& thermo = db().lookupObject + const psiuReactionThermo& thermo = db().lookupObject ( "thermophysicalProperties" ); @@ -108,7 +108,7 @@ void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() fvPatchScalarField& Tw = const_cast(thermo.Tu().boundaryField()[patchi]); Tw.evaluate(); - operator==(thermo.hu(Tw, patchi)); + operator==(thermo.heu(Tw, patchi)); fixedValueFvPatchScalarField::updateCoeffs(); } diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C index af96c16512..2a5bf0f3e1 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C @@ -27,7 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -97,7 +97,7 @@ void Foam::gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs() return; } - const hhuCombustionThermo& thermo = db().lookupObject + const psiuReactionThermo& thermo = db().lookupObject ( "thermophysicalProperties" ); @@ -112,8 +112,8 @@ void Foam::gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs() gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad() + patch().deltaCoeffs()* ( - thermo.hu(Tw, patchi) - - thermo.hu(Tw, patch().faceCells()) + thermo.heu(Tw, patchi) + - thermo.heu(Tw, patch().faceCells()) ); fixedGradientFvPatchScalarField::updateCoeffs(); diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C index cf238bb56a..986354d6e3 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C @@ -1,33 +1,33 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. + /*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 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 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. + 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 . + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . -\*---------------------------------------------------------------------------*/ + \*---------------------------------------------------------------------------*/ -#include "mixedUnburntEnthalpyFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "hhuCombustionThermo.H" + #include "mixedUnburntEnthalpyFvPatchScalarField.H" + #include "addToRunTimeSelectionTable.H" + #include "fvPatchFieldMapper.H" + #include "volFields.H" + #include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -101,7 +101,7 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() return; } - const hhuCombustionThermo& thermo = db().lookupObject + const psiuReactionThermo& thermo = db().lookupObject ( "thermophysicalProperties" ); @@ -116,12 +116,12 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() Tw.evaluate(); valueFraction() = Tw.valueFraction(); - refValue() = thermo.hu(Tw.refValue(), patchi); + refValue() = thermo.heu(Tw.refValue(), patchi); refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad() + patch().deltaCoeffs()* ( - thermo.hu(Tw, patchi) - - thermo.hu(Tw, patch().faceCells()) + thermo.heu(Tw, patchi) + - thermo.heu(Tw, patch().faceCells()) ); mixedFvPatchScalarField::updateCoeffs(); diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H index 5fbeccdb96..b6f06c0f82 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H @@ -65,6 +65,10 @@ protected: public: + //- The base class of the mixture + typedef basicMultiComponentMixture basicMixtureType; + + // Constructors //- Construct from dictionary and mesh @@ -136,8 +140,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const = 0; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const = 0; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const = 0; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const = 0; @@ -148,8 +152,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const = 0; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const = 0; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const = 0; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const = 0; @@ -166,13 +170,9 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const = 0; - //- Thermal diffusivity enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const = 0; - - //- Thermal diffusivity internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const - = 0; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C index 50ffce15d1..c1cb52de31 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C @@ -174,13 +174,13 @@ Foam::scalar Foam::dieselMixture::Cv template -Foam::scalar Foam::dieselMixture::H +Foam::scalar Foam::dieselMixture::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -217,13 +217,13 @@ Foam::scalar Foam::dieselMixture::S template -Foam::scalar Foam::dieselMixture::E +Foam::scalar Foam::dieselMixture::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -282,15 +282,4 @@ Foam::scalar Foam::dieselMixture::alphah } -template -Foam::scalar Foam::dieselMixture::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H index e62670a5ae..6a9435f75c 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H @@ -173,8 +173,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -185,8 +185,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -203,11 +203,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity for enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity for internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C index e1c992449b..69c90d40c3 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C @@ -184,13 +184,13 @@ Foam::scalar Foam::egrMixture::Cv template -Foam::scalar Foam::egrMixture::H +Foam::scalar Foam::egrMixture::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -227,13 +227,13 @@ Foam::scalar Foam::egrMixture::S template -Foam::scalar Foam::egrMixture::E +Foam::scalar Foam::egrMixture::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -292,15 +292,4 @@ Foam::scalar Foam::egrMixture::alphah } -template -Foam::scalar Foam::egrMixture::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H index 838162792d..517f038310 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H @@ -189,8 +189,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -201,8 +201,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -219,11 +219,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C index 297adb9a00..80d854f32f 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C @@ -163,13 +163,13 @@ Foam::scalar Foam::homogeneousMixture::Cv template -Foam::scalar Foam::homogeneousMixture::H +Foam::scalar Foam::homogeneousMixture::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -206,13 +206,13 @@ Foam::scalar Foam::homogeneousMixture::S template -Foam::scalar Foam::homogeneousMixture::E +Foam::scalar Foam::homogeneousMixture::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -271,15 +271,4 @@ Foam::scalar Foam::homogeneousMixture::alphah } -template -Foam::scalar Foam::homogeneousMixture::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H index bb4f19a17b..b1859797c1 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H @@ -147,8 +147,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -159,8 +159,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -177,11 +177,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C index 38f9284c9a..5144ac2646 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C @@ -179,13 +179,13 @@ Foam::scalar Foam::inhomogeneousMixture::Cv template -Foam::scalar Foam::inhomogeneousMixture::H +Foam::scalar Foam::inhomogeneousMixture::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -222,13 +222,13 @@ Foam::scalar Foam::inhomogeneousMixture::S template -Foam::scalar Foam::inhomogeneousMixture::E +Foam::scalar Foam::inhomogeneousMixture::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -287,15 +287,4 @@ Foam::scalar Foam::inhomogeneousMixture::alphah } -template -Foam::scalar Foam::inhomogeneousMixture::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H index 2a779fd382..d3277ebc58 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H @@ -178,8 +178,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -190,8 +190,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -208,11 +208,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity for enthalpy [kg/m/s] + //- Thermal diffusivity ofu enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity for internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C index 3718fc3edf..0b0cd39313 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C @@ -204,13 +204,13 @@ Foam::scalar Foam::multiComponentMixture::Cv template -Foam::scalar Foam::multiComponentMixture::H +Foam::scalar Foam::multiComponentMixture::Ha ( const label specieI, const scalar T ) const { - return speciesData_[specieI].H(T); + return speciesData_[specieI].Ha(T); } @@ -247,13 +247,13 @@ Foam::scalar Foam::multiComponentMixture::S template -Foam::scalar Foam::multiComponentMixture::E +Foam::scalar Foam::multiComponentMixture::Es ( const label specieI, const scalar T ) const { - return speciesData_[specieI].E(T); + return speciesData_[specieI].Es(T); } @@ -312,15 +312,4 @@ Foam::scalar Foam::multiComponentMixture::alphah } -template -Foam::scalar Foam::multiComponentMixture::alphae -( - const label specieI, - const scalar T -) const -{ - return speciesData_[specieI].alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H index 5838f51702..46b4a03b8a 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H @@ -137,8 +137,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -149,8 +149,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -169,9 +169,6 @@ public: //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity of internal energy[kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C index 076693aab7..c9d94a6a88 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C @@ -180,13 +180,13 @@ Foam::scalar Foam::veryInhomogeneousMixture::Cv template -Foam::scalar Foam::veryInhomogeneousMixture::H +Foam::scalar Foam::veryInhomogeneousMixture::Ha ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).H(T); + return getLocalThermo(specieI).Ha(T); } @@ -223,13 +223,13 @@ Foam::scalar Foam::veryInhomogeneousMixture::S template -Foam::scalar Foam::veryInhomogeneousMixture::E +Foam::scalar Foam::veryInhomogeneousMixture::Es ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).E(T); + return getLocalThermo(specieI).Es(T); } @@ -288,15 +288,4 @@ Foam::scalar Foam::veryInhomogeneousMixture::alphah } -template -Foam::scalar Foam::veryInhomogeneousMixture::alphae -( - const label specieI, - const scalar T -) const -{ - return getLocalThermo(specieI).alphae(T); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H index 578ace1e6c..0bf5108f63 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H @@ -179,8 +179,8 @@ public: //- Heat capacity at constant volume [J/(kg K)] virtual scalar Cv(const label specieI, const scalar T) const; - //- Enthalpy [J/kg] - virtual scalar H(const label specieI, const scalar T) const; + //- Absolute enthalpy [J/kg] + virtual scalar Ha(const label specieI, const scalar T) const; //- Sensible enthalpy [J/kg] virtual scalar Hs(const label specieI, const scalar T) const; @@ -191,8 +191,8 @@ public: //- Entropy [J/(kg K)] virtual scalar S(const label specieI, const scalar T) const; - //- Internal energy [J/kg] - virtual scalar E(const label specieI, const scalar T) const; + //- Sensible internal energy [J/kg] + virtual scalar Es(const label specieI, const scalar T) const; //- Gibbs free energy [J/kg] virtual scalar G(const label specieI, const scalar T) const; @@ -209,11 +209,8 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity for enthalpy [kg/m/s] + //- Thermal diffusivity of enthalpy [kg/m/s] virtual scalar alphah(const label specieI, const scalar T) const; - - //- Thermal diffusivity for internal energy [kg/m/s] - virtual scalar alphae(const label specieI, const scalar T) const; }; diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C new file mode 100644 index 0000000000..b418b08fa6 --- /dev/null +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.C @@ -0,0 +1,141 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 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 "hePsiReactionThermo.H" +#include "fvMesh.H" +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +void Foam::hePsiReactionThermo::calculate() +{ + const scalarField& hCells = this->he_.internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture = + this->cellMixture(celli); + + TCells[celli] = mixture.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); + + muCells[celli] = mixture.mu(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + + fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture.HE(pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::hePsiReactionThermo::hePsiReactionThermo(const fvMesh& mesh) +: + heThermo(mesh) +{ + calculate(); + + // Switch on saving old time + this->psi_.oldTime(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::hePsiReactionThermo::~hePsiReactionThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::hePsiReactionThermo::correct() +{ + if (debug) + { + Info<< "entering hePsiReactionThermo::correct()" << endl; + } + + // force the saving of the old-time values + this->psi_.oldTime(); + + calculate(); + + if (debug) + { + Info<< "exiting hePsiReactionThermo::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H similarity index 54% rename from src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H index 9aedfe7920..f8adbd9ce6 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermo.H @@ -22,20 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::hRhoMixtureThermo + Foam::hePsiReactionThermo Description - Foam::hRhoMixtureThermo + Foam::hePsiReactionThermo SourceFiles - hRhoMixtureThermo.C + hePsiReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hRhoMixtureThermo_H -#define hRhoMixtureThermo_H +#ifndef hePsiReactionThermo_H +#define hePsiReactionThermo_H -#include "hReactionThermo.H" +#include "heThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,89 +44,42 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hRhoMixtureThermo Declaration + Class hePsiReactionThermo Declaration \*---------------------------------------------------------------------------*/ template -class hRhoMixtureThermo +class hePsiReactionThermo : - public hReactionThermo, - public MixtureType + public heThermo { // Private Member Functions void calculate(); //- Construct as copy (not implemented) - hRhoMixtureThermo(const hRhoMixtureThermo&); + hePsiReactionThermo(const hePsiReactionThermo&); public: //- Runtime type information - TypeName("hRhoMixtureThermo"); + TypeName("hePsiReactionThermo"); // Constructors //- Construct from mesh - hRhoMixtureThermo(const fvMesh&); + hePsiReactionThermo(const fvMesh&); //- Destructor - virtual ~hRhoMixtureThermo(); + virtual ~hePsiReactionThermo(); // Member functions - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - //- Update properties virtual void correct(); - - //- Chemical enthalpy [J/kg] - virtual tmp hc() const; - - - // Fields derived from thermodynamic state variables - - //- Enthalpy for cell-set [J/kg] - virtual tmp h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); }; @@ -136,7 +90,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "hRhoMixtureThermo.C" +# include "hePsiReactionThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C similarity index 67% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C index c4994bbaef..0e61b1fca5 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C @@ -23,15 +23,16 @@ License \*---------------------------------------------------------------------------*/ -#include "makeCombustionThermo.H" +#include "makeReactionThermo.H" -#include "hCombustionThermo.H" -#include "hPsiMixtureThermo.H" +#include "psiReactionThermo.H" +#include "hePsiReactionThermo.H" #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -56,32 +57,38 @@ namespace Foam // constTransport, hConstThermo -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, homogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, inhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, veryInhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); @@ -89,32 +96,38 @@ makeCombustionThermo // sutherlandTransport, hConstThermo -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, homogeneousMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, inhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); @@ -122,61 +135,71 @@ makeCombustionThermo // sutherlandTransport, janafThermo -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, homogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, inhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, dieselMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); // Multi-component thermo -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, multiComponentMixture, constGasThermoPhysics ); -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, multiComponentMixture, gasThermoPhysics ); @@ -184,26 +207,29 @@ makeCombustionMixtureThermo // Multi-component reaction thermo -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, reactingMixture, constGasThermoPhysics ); -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, reactingMixture, gasThermoPhysics ); -makeCombustionMixtureThermo +makeReactionMixtureThermo ( - hCombustionThermo, - hPsiMixtureThermo, + psiThermo, + psiReactionThermo, + hePsiReactionThermo, singleStepReactingMixture, gasThermoPhysics ); diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C similarity index 51% rename from src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C index b58ca99682..e0598486b5 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.C @@ -23,99 +23,52 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuMixtureThermo.H" +#include "heheuReactionThermo.H" #include "fvMesh.H" #include "fixedValueFvPatchFields.H" -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template -Foam::hhuMixtureThermo::hhuMixtureThermo(const fvMesh& mesh) -: - hhuCombustionThermo(mesh), - MixtureType(*this, mesh) +void Foam::heheuReactionThermo::calculate() { - scalarField& hCells = h_.internalField(); - scalarField& huCells = hu_.internalField(); - const scalarField& TCells = T_.internalField(); - const scalarField& TuCells = Tu_.internalField(); + const scalarField& hCells = this->he_.internalField(); + const scalarField& heuCells = this->heu_.internalField(); + const scalarField& pCells = this->p_.internalField(); - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - huCells[celli] = this->cellReactants(celli).H(TuCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == h(T_.boundaryField()[patchi], patchi); - - fvPatchScalarField& phu = hu_.boundaryField()[patchi]; - const fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; - - forAll(phu, facei) - { - phu[facei] = this->patchFaceReactants(patchi, facei).H(pTu[facei]); - } - } - - hBoundaryCorrection(h_); - huBoundaryCorrection(hu_); - - calculate(); - psi_.oldTime(); // Switch on saving old time -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hhuMixtureThermo::~hhuMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hhuMixtureThermo::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& huCells = hu_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& TuCells = Tu_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); + scalarField& TCells = this->T_.internalField(); + scalarField& TuCells = this->Tu_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); forAll(TCells, celli) { const typename MixtureType::thermoType& mixture_ = this->cellMixture(celli); - TCells[celli] = mixture_.TH(hCells[celli], TCells[celli]); + TCells[celli] = mixture_.THE(hCells[celli], TCells[celli]); psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); alphaCells[celli] = mixture_.alphah(TCells[celli]); TuCells[celli] = - this->cellReactants(celli).TH(huCells[celli], TuCells[celli]); + this->cellReactants(celli).THE(heuCells[celli], TuCells[celli]); } - forAll(T_.boundaryField(), patchi) + forAll(this->T_.boundaryField(), patchi) { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - fvPatchScalarField& phu = hu_.boundaryField()[patchi]; + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + fvPatchScalarField& pheu = this->heu_.boundaryField()[patchi]; - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; + fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi]; if (pT.fixesValue()) { @@ -124,7 +77,7 @@ void Foam::hhuMixtureThermo::calculate() const typename MixtureType::thermoType& mixture_ = this->patchFaceMixture(patchi, facei); - ph[facei] = mixture_.H(pT[facei]); + ph[facei] = mixture_.HE(pT[facei]); ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); @@ -138,7 +91,7 @@ void Foam::hhuMixtureThermo::calculate() const typename MixtureType::thermoType& mixture_ = this->patchFaceMixture(patchi, facei); - pT[facei] = mixture_.TH(ph[facei], pT[facei]); + pT[facei] = mixture_.THE(ph[facei], pT[facei]); ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); @@ -146,220 +99,146 @@ void Foam::hhuMixtureThermo::calculate() pTu[facei] = this->patchFaceReactants(patchi, facei) - .TH(phu[facei], pTu[facei]); + .THE(pheu[facei], pTu[facei]); } } } } +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + template -void Foam::hhuMixtureThermo::correct() +Foam::heheuReactionThermo::heheuReactionThermo(const fvMesh& mesh) +: + heThermo(mesh), + Tu_ + ( + IOobject + ( + "Tu", + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + + heu_ + ( + IOobject + ( + MixtureType::thermoType::heName() + 'u', + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionSet(0, 2, -2, 0, 0), + this->heuBoundaryTypes() + ) +{ + scalarField& heuCells = this->heu_.internalField(); + const scalarField& TuCells = this->Tu_.internalField(); + + forAll(heuCells, celli) + { + heuCells[celli] = this->cellReactants(celli).HE(TuCells[celli]); + } + + forAll(this->heu_.boundaryField(), patchi) + { + fvPatchScalarField& pheu = this->heu_.boundaryField()[patchi]; + const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; + + forAll(pheu, facei) + { + pheu[facei] = + this->patchFaceReactants(patchi, facei).HE(pTu[facei]); + } + } + + heuBoundaryCorrection(this->heu_); + + calculate(); + this->psi_.oldTime(); // Switch on saving old time +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::heheuReactionThermo::~heheuReactionThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::heheuReactionThermo::correct() { if (debug) { - Info<< "entering hhuMixtureThermo::correct()" << endl; + Info<< "entering heheuReactionThermo::correct()" << endl; } // force the saving of the old-time values - psi_.oldTime(); + this->psi_.oldTime(); calculate(); if (debug) { - Info<< "exiting hhuMixtureThermo::correct()" << endl; + Info<< "exiting heheuReactionThermo::correct()" << endl; } } -template -Foam::tmp -Foam::hhuMixtureThermo::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template -Foam::tmp Foam::hhuMixtureThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template -Foam::tmp Foam::hhuMixtureThermo::h -( - const scalarField& T, - const label patchi -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template -Foam::tmp Foam::hhuMixtureThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp -Foam::hhuMixtureThermo::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - template Foam::tmp -Foam::hhuMixtureThermo::hu +Foam::heheuReactionThermo::heu ( const scalarField& Tu, const labelList& cells ) const { - tmp thu(new scalarField(Tu.size())); - scalarField& hu = thu(); + tmp theu(new scalarField(Tu.size())); + scalarField& heu = theu(); forAll(Tu, celli) { - hu[celli] = this->cellReactants(cells[celli]).H(Tu[celli]); + heu[celli] = this->cellReactants(cells[celli]).HE(Tu[celli]); } - return thu; + return theu; } template Foam::tmp -Foam::hhuMixtureThermo::hu +Foam::heheuReactionThermo::heu ( const scalarField& Tu, const label patchi ) const { - tmp thu(new scalarField(Tu.size())); - scalarField& hu = thu(); + tmp theu(new scalarField(Tu.size())); + scalarField& heu = theu(); forAll(Tu, facei) { - hu[facei] = this->patchFaceReactants(patchi, facei).H(Tu[facei]); + heu[facei] = this->patchFaceReactants(patchi, facei).HE(Tu[facei]); } - return thu; + return theu; } template Foam::tmp -Foam::hhuMixtureThermo::Tb() const +Foam::heheuReactionThermo::Tb() const { tmp tTb ( @@ -368,38 +247,38 @@ Foam::hhuMixtureThermo::Tb() const IOobject ( "Tb", - T_.time().timeName(), - T_.db(), + this->T_.time().timeName(), + this->T_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - T_ + this->T_ ) ); volScalarField& Tb_ = tTb(); scalarField& TbCells = Tb_.internalField(); - const scalarField& TCells = T_.internalField(); - const scalarField& hCells = h_.internalField(); + const scalarField& TCells = this->T_.internalField(); + const scalarField& hCells = this->he_.internalField(); forAll(TbCells, celli) { TbCells[celli] = - this->cellProducts(celli).TH(hCells[celli], TCells[celli]); + this->cellProducts(celli).THE(hCells[celli], TCells[celli]); } forAll(Tb_.boundaryField(), patchi) { fvPatchScalarField& pTb = Tb_.boundaryField()[patchi]; - const fvPatchScalarField& ph = h_.boundaryField()[patchi]; - const fvPatchScalarField& pT = T_.boundaryField()[patchi]; + const fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + const fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; forAll(pTb, facei) { pTb[facei] = this->patchFaceProducts(patchi, facei) - .TH(ph[facei], pT[facei]); + .THE(ph[facei], pT[facei]); } } @@ -409,7 +288,7 @@ Foam::hhuMixtureThermo::Tb() const template Foam::tmp -Foam::hhuMixtureThermo::psiu() const +Foam::heheuReactionThermo::psiu() const { tmp tpsiu ( @@ -418,20 +297,20 @@ Foam::hhuMixtureThermo::psiu() const IOobject ( "psiu", - psi_.time().timeName(), - psi_.db(), + this->psi_.time().timeName(), + this->psi_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - psi_.mesh(), - psi_.dimensions() + this->psi_.mesh(), + this->psi_.dimensions() ) ); volScalarField& psiu = tpsiu(); scalarField& psiuCells = psiu.internalField(); - const scalarField& TuCells = Tu_.internalField(); - const scalarField& pCells = p_.internalField(); + const scalarField& TuCells = this->Tu_.internalField(); + const scalarField& pCells = this->p_.internalField(); forAll(psiuCells, celli) { @@ -443,8 +322,8 @@ Foam::hhuMixtureThermo::psiu() const { fvPatchScalarField& ppsiu = psiu.boundaryField()[patchi]; - const fvPatchScalarField& pp = p_.boundaryField()[patchi]; - const fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; + const fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; forAll(ppsiu, facei) { @@ -460,7 +339,7 @@ Foam::hhuMixtureThermo::psiu() const template Foam::tmp -Foam::hhuMixtureThermo::psib() const +Foam::heheuReactionThermo::psib() const { tmp tpsib ( @@ -469,13 +348,13 @@ Foam::hhuMixtureThermo::psib() const IOobject ( "psib", - psi_.time().timeName(), - psi_.db(), + this->psi_.time().timeName(), + this->psi_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - psi_.mesh(), - psi_.dimensions() + this->psi_.mesh(), + this->psi_.dimensions() ) ); @@ -483,7 +362,7 @@ Foam::hhuMixtureThermo::psib() const scalarField& psibCells = psib.internalField(); const volScalarField Tb_(Tb()); const scalarField& TbCells = Tb_.internalField(); - const scalarField& pCells = p_.internalField(); + const scalarField& pCells = this->p_.internalField(); forAll(psibCells, celli) { @@ -495,7 +374,7 @@ Foam::hhuMixtureThermo::psib() const { fvPatchScalarField& ppsib = psib.boundaryField()[patchi]; - const fvPatchScalarField& pp = p_.boundaryField()[patchi]; + const fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; const fvPatchScalarField& pTb = Tb_.boundaryField()[patchi]; forAll(ppsib, facei) @@ -512,7 +391,7 @@ Foam::hhuMixtureThermo::psib() const template Foam::tmp -Foam::hhuMixtureThermo::muu() const +Foam::heheuReactionThermo::muu() const { tmp tmuu ( @@ -521,19 +400,19 @@ Foam::hhuMixtureThermo::muu() const IOobject ( "muu", - T_.time().timeName(), - T_.db(), + this->T_.time().timeName(), + this->T_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - T_.mesh(), + this->T_.mesh(), dimensionSet(1, -1, -1, 0, 0) ) ); volScalarField& muu_ = tmuu(); scalarField& muuCells = muu_.internalField(); - const scalarField& TuCells = Tu_.internalField(); + const scalarField& TuCells = this->Tu_.internalField(); forAll(muuCells, celli) { @@ -543,7 +422,7 @@ Foam::hhuMixtureThermo::muu() const forAll(muu_.boundaryField(), patchi) { fvPatchScalarField& pMuu = muu_.boundaryField()[patchi]; - const fvPatchScalarField& pTu = Tu_.boundaryField()[patchi]; + const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi]; forAll(pMuu, facei) { @@ -558,7 +437,7 @@ Foam::hhuMixtureThermo::muu() const template Foam::tmp -Foam::hhuMixtureThermo::mub() const +Foam::heheuReactionThermo::mub() const { tmp tmub ( @@ -567,12 +446,12 @@ Foam::hhuMixtureThermo::mub() const IOobject ( "mub", - T_.time().timeName(), - T_.db(), + this->T_.time().timeName(), + this->T_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), - T_.mesh(), + this->T_.mesh(), dimensionSet(1, -1, -1, 0, 0) ) ); @@ -603,19 +482,4 @@ Foam::hhuMixtureThermo::mub() const } -template -bool Foam::hhuMixtureThermo::read() -{ - if (hhuCombustionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H similarity index 63% rename from src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H index 8602e24e44..22b80cd3f5 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermo.H @@ -22,18 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::hhuMixtureThermo + Foam::heheuReactionThermo Description - Foam::hhuMixtureThermo + Foam::heheuReactionThermo SourceFiles - hhuMixtureThermo.C + heheuReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hhuMixtureThermo_H -#define hhuMixtureThermo_H +#ifndef heheuReactionThermo_H +#define heheuReactionThermo_H + +#include "heThermo.H" +#include "psiuReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -41,95 +44,82 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hhuMixtureThermo Declaration + Class heheuReactionThermo Declaration \*---------------------------------------------------------------------------*/ template -class hhuMixtureThermo +class heheuReactionThermo : - public hhuCombustionThermo, - public MixtureType + public heThermo { + // Private Member Functions + + volScalarField Tu_; + volScalarField heu_; + + // Private Member Functions void calculate(); //- Construct as copy (not implemented) - hhuMixtureThermo(const hhuMixtureThermo&); + heheuReactionThermo(const heheuReactionThermo&); public: //- Runtime type information - TypeName("hhuMixtureThermo"); + TypeName("heheuReactionThermo"); // Constructors //- Construct from mesh - hhuMixtureThermo(const fvMesh&); + heheuReactionThermo(const fvMesh&); //- Destructor - virtual ~hhuMixtureThermo(); + virtual ~heheuReactionThermo(); // Member functions - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - //- Update properties virtual void correct(); - //- Chemical enthalpy [J/kg] - virtual tmp hc() const; + // Access to thermodynamic state variables. + + //- Unburnt gas enthalpy [J/kg] + // Non-const access allowed for transport equations + virtual volScalarField& heu() + { + return heu_; + } + + //- Unburnt gas enthalpy [J/kg] + virtual const volScalarField& heu() const + { + return heu_; + } + + //- Unburnt gas temperature [K] + virtual const volScalarField& Tu() const + { + return Tu_; + } // Fields derived from thermodynamic state variables - //- Enthalpy for cell-set [J/kg] - virtual tmp h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - //- Unburnt gas enthalpy for cell-set [J/kg] - virtual tmp hu + virtual tmp heu ( const scalarField& T, const labelList& cells ) const; //- Unburnt gas enthalpy for patch [J/kg] - virtual tmp hu + virtual tmp heu ( const scalarField& T, const label patchi @@ -153,10 +143,6 @@ public: //- Dynamic viscosity of burnt gas [kg/ms] virtual tmp mub() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); }; @@ -167,7 +153,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #ifdef NoRepository -# include "hhuMixtureThermo.C" +# include "heheuReactionThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C similarity index 72% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C index 9368b04c2e..820c76c972 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C @@ -23,16 +23,17 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuCombustionThermo.H" -#include "hhuMixtureThermo.H" +#include "psiuReactionThermo.H" +#include "heheuReactionThermo.H" -#include "makeCombustionThermo.H" +#include "makeReactionThermo.H" #include "addToRunTimeSelectionTable.H" #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "absoluteEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -53,85 +54,101 @@ namespace Foam // * * * * * * * * * * * * * * * * h-hu-Thermos * * * * * * * * * * * * * * * // -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, homogeneousMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, inhomogeneousMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, veryInhomogeneousMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, homogeneousMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, inhomogeneousMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, egrMixture, constTransport, + absoluteEnthalpy, hConstThermo, perfectGas ); -makeCombustionThermo +makeReactionThermo ( - hhuCombustionThermo, - hhuMixtureThermo, + psiThermo, + psiuReactionThermo, + heheuReactionThermo, egrMixture, sutherlandTransport, + absoluteEnthalpy, janafThermo, perfectGas ); diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.C similarity index 74% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.C index 40007a4279..eedf653bb8 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.C @@ -23,43 +23,28 @@ License \*---------------------------------------------------------------------------*/ -#include "hsReactionThermo.H" +#include "psiReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(hsReactionThermo, 0); - defineRunTimeSelectionTable(hsReactionThermo, fvMesh); + defineTypeNameAndDebug(psiReactionThermo, 0); + defineRunTimeSelectionTable(psiReactionThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::hsReactionThermo::hsReactionThermo(const fvMesh& mesh) +Foam::psiReactionThermo::psiReactionThermo(const fvMesh& mesh) : - basicRhoThermo(mesh), - - hs_ - ( - IOobject - ( - "hs", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass, - this->hBoundaryTypes() - ) + psiThermo(mesh) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::hsReactionThermo::~hsReactionThermo() +Foam::psiReactionThermo::~psiReactionThermo() {} diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.H similarity index 71% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.H index e8065d4df6..8c106c861f 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermo.H @@ -22,20 +22,20 @@ License along with OpenFOAM. If not, see . Class - Foam::hReactionThermo + Foam::psiReactionThermo Description - Foam::hReactionThermo + Foam::psiReactionThermo SourceFiles - hReactionThermo.C + psiReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hReactionThermo_H -#define hReactionThermo_H +#ifndef psiReactionThermo_H +#define psiReactionThermo_H -#include "basicRhoThermo.H" +#include "psiThermo.H" #include "basicMultiComponentMixture.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -46,33 +46,25 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hReactionThermo Declaration + Class psiReactionThermo Declaration \*---------------------------------------------------------------------------*/ -class hReactionThermo +class psiReactionThermo : - public basicRhoThermo + public psiThermo { -protected: - - // Protected data - - //- Enthalpy field - volScalarField h_; - - public: //- Runtime type information - TypeName("hReactionThermo"); + TypeName("psiReactionThermo"); //- Declare run-time constructor selection tables declareRunTimeSelectionTable ( autoPtr, - hReactionThermo, + psiReactionThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -82,16 +74,16 @@ public: // Constructors //- Construct from dictionary and mesh - hReactionThermo(const fvMesh&); + psiReactionThermo(const fvMesh&); // Selectors //- Standard selection based on fvMesh - static autoPtr New(const fvMesh&); + static autoPtr New(const fvMesh&); //- Select and check that package contains 'thermoType' - static autoPtr NewType + static autoPtr NewType ( const fvMesh&, const word& thermoType @@ -99,7 +91,7 @@ public: //- Destructor - virtual ~hReactionThermo(); + virtual ~psiReactionThermo(); // Member functions @@ -109,26 +101,6 @@ public: //- Return the composition of the multi-component mixture virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - //- Update properties - virtual void correct() = 0; }; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C similarity index 85% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C index b3934076f5..3c004630c1 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "hCombustionThermo.H" +#include "psiReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hCombustionThermo::New +Foam::autoPtr Foam::psiReactionThermo::New ( const fvMesh& mesh ) @@ -58,19 +58,19 @@ Foam::autoPtr Foam::hCombustionThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hCombustionThermo::New(const fvMesh&)") - << "Unknown hCombustionThermo type " + FatalErrorIn("psiReactionThermo::New(const fvMesh&)") + << "Unknown psiReactionThermo type " << modelType << nl << nl - << "Valid hCombustionThermo types are:" << nl + << "Valid psiReactionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } -Foam::autoPtr Foam::hCombustionThermo::NewType +Foam::autoPtr Foam::psiReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType @@ -109,7 +109,7 @@ Foam::autoPtr Foam::hCombustionThermo::NewType FatalErrorIn ( - "autoPtr hCombustionThermo::NewType" + "autoPtr psiReactionThermo::NewType" "(" "const fvMesh&, " "const word&" @@ -130,19 +130,19 @@ Foam::autoPtr Foam::hCombustionThermo::NewType { FatalErrorIn ( - "autoPtr hCombustionThermo::NewType" + "autoPtr psiReactionThermo::NewType" "(" "const fvMesh&, " "const word&" ")" - ) << "Unknown hCombustionThermo type " + ) << "Unknown psiReactionThermo type " << modelType << nl << nl - << "Valid hCombustionThermo types are:" << nl + << "Valid psiReactionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C similarity index 76% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C index 483ff011cf..91306824de 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "fvMesh.H" #include "zeroGradientFvPatchFields.H" #include "fixedUnburntEnthalpyFvPatchScalarField.H" @@ -37,14 +37,15 @@ namespace Foam /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ -defineTypeNameAndDebug(hhuCombustionThermo, 0); -defineRunTimeSelectionTable(hhuCombustionThermo, fvMesh); +defineTypeNameAndDebug(psiuReactionThermo, 0); +defineRunTimeSelectionTable(psiuReactionThermo, fvMesh); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -wordList hhuCombustionThermo::huBoundaryTypes() +wordList psiuReactionThermo::heuBoundaryTypes() { - const volScalarField::GeometricBoundaryField& tbf = Tu_.boundaryField(); + const volScalarField::GeometricBoundaryField& tbf = + this->Tu().boundaryField(); wordList hbt = tbf.types(); @@ -71,9 +72,9 @@ wordList hhuCombustionThermo::huBoundaryTypes() return hbt; } -void hhuCombustionThermo::huBoundaryCorrection(volScalarField& hu) +void psiuReactionThermo::heuBoundaryCorrection(volScalarField& heu) { - volScalarField::GeometricBoundaryField& hbf = hu.boundaryField(); + volScalarField::GeometricBoundaryField& hbf = heu.boundaryField(); forAll(hbf, patchi) { @@ -99,43 +100,15 @@ void hhuCombustionThermo::huBoundaryCorrection(volScalarField& hu) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -hhuCombustionThermo::hhuCombustionThermo(const fvMesh& mesh) +psiuReactionThermo::psiuReactionThermo(const fvMesh& mesh) : - hCombustionThermo(mesh), - - Tu_ - ( - IOobject - ( - "Tu", - mesh.time().timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ), - - hu_ - ( - IOobject - ( - "hu", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionSet(0, 2, -2, 0, 0), - huBoundaryTypes() - ) + psiReactionThermo(mesh) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -hhuCombustionThermo::~hhuCombustionThermo() +psiuReactionThermo::~psiuReactionThermo() {} diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H similarity index 77% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H index 1ef53a6069..b807b934f5 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermo.H @@ -22,21 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::hhuCombustionThermo + Foam::psiuReactionThermo Description - Foam::hhuCombustionThermo + Foam::psiuReactionThermo SourceFiles - hhuCombustionThermo.C - hhuCombustionThermoNew.C + psiuReactionThermo.C + psiuReactionThermoNew.C \*---------------------------------------------------------------------------*/ -#ifndef hhuCombustionThermo_H -#define hhuCombustionThermo_H +#ifndef psiuReactionThermo_H +#define psiuReactionThermo_H -#include "hCombustionThermo.H" +#include "psiReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,32 +44,26 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hhuCombustionThermo Declaration + Class psiuReactionThermo Declaration \*---------------------------------------------------------------------------*/ -class hhuCombustionThermo +class psiuReactionThermo : - public hCombustionThermo + public psiReactionThermo { protected: - // Protected data - - volScalarField Tu_; - volScalarField hu_; - - // Protected Member Functions - wordList huBoundaryTypes(); - void huBoundaryCorrection(volScalarField& hu); + wordList heuBoundaryTypes(); + void heuBoundaryCorrection(volScalarField& heu); public: //- Runtime type information - TypeName("hhuCombustionThermo"); + TypeName("psiuReactionThermo"); // Declare run-time constructor selection tables @@ -77,7 +71,7 @@ public: declareRunTimeSelectionTable ( autoPtr, - hhuCombustionThermo, + psiuReactionThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -87,16 +81,16 @@ public: // Constructors //- Construct from dictionary and mesh - hhuCombustionThermo(const fvMesh&); + psiuReactionThermo(const fvMesh&); // Selectors - static autoPtr New(const fvMesh&); + static autoPtr New(const fvMesh&); //- Destructor - virtual ~hhuCombustionThermo(); + virtual ~psiuReactionThermo(); // Member functions @@ -109,39 +103,30 @@ public: //- Unburnt gas enthalpy [J/kg] // Non-const access allowed for transport equations - virtual volScalarField& hu() - { - return hu_; - } + virtual volScalarField& heu() = 0; //- Unburnt gas enthalpy [J/kg] - virtual const volScalarField& hu() const - { - return hu_; - } + virtual const volScalarField& heu() const = 0; // Fields derived from thermodynamic state variables //- Unburnt gas enthalpy for cell-set [J/kg] - virtual tmp hu + virtual tmp heu ( const scalarField& T, const labelList& cells ) const = 0; //- Unburnt gas enthalpy for patch [J/kg] - virtual tmp hu + virtual tmp heu ( const scalarField& T, const label patchi ) const = 0; //- Unburnt gas temperature [K] - virtual const volScalarField& Tu() const - { - return Tu_; - } + virtual const volScalarField& Tu() const = 0; //- Burnt gas temperature [K] virtual tmp Tb() const = 0; diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C similarity index 86% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C rename to src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C index 3bc2518c96..f32e0e988c 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "hhuCombustionThermo.H" +#include "psiuReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hhuCombustionThermo::New +Foam::autoPtr Foam::psiuReactionThermo::New ( const fvMesh& mesh ) @@ -58,15 +58,15 @@ Foam::autoPtr Foam::hhuCombustionThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hhuCombustionThermo::New(const fvMesh&)") - << "Unknown hhuCombustionThermo type " + FatalErrorIn("psiuReactionThermo::New(const fvMesh&)") + << "Unknown psiuReactionThermo type " << modelType << nl << nl - << "Valid hhuCombustionThermo types are :" << endl + << "Valid psiuReactionThermo types are :" << endl << fvMeshConstructorTablePtr_->sortedToc() << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H deleted file mode 100644 index 62afb6c8c9..0000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermo.H +++ /dev/null @@ -1,143 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hsReactionThermo - -Description - Sensible enthalpy variant for reactionThermo - -SourceFiles - hReactionThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsReactionThermo_H -#define hsReactionThermo_H - -#include "basicRhoThermo.H" -#include "basicMultiComponentMixture.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsReactionThermo Declaration -\*---------------------------------------------------------------------------*/ - -class hsReactionThermo -: - public basicRhoThermo -{ - -protected: - - // Protected data - - //- Sensible enthalpy [J/kg] - volScalarField hs_; - - -public: - - //- Runtime type information - TypeName("hsReactionThermo"); - - - //- Declare run-time constructor selection tables - declareRunTimeSelectionTable - ( - autoPtr, - hsReactionThermo, - fvMesh, - (const fvMesh& mesh), - (mesh) - ); - - - // Constructors - - //- Construct from dictionary and mesh - hsReactionThermo(const fvMesh&); - - - // Selectors - - //- Standard selection based on fvMesh - static autoPtr New(const fvMesh&); - - //- Select and check that package contains 'thermoType' - static autoPtr NewType - ( - const fvMesh&, - const word& thermoType - ); - - - //- Destructor - virtual ~hsReactionThermo(); - - - // Member functions - - //- Return the composition of the multi-component mixture - virtual basicMultiComponentMixture& composition() = 0; - - //- Return the composition of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Sensible enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& hs() - { - return hs_; - } - - //- Sensible enthalpy [J/kg] - virtual const volScalarField& hs() const - { - return hs_; - } - - - //- Update properties - virtual void correct() = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C deleted file mode 100644 index c41b22c964..0000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "hsReactionThermo.H" -#include "fvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::hsReactionThermo::New -( - const fvMesh& mesh -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn("hsReactionThermo::New(const fvMesh&)") - << "Unknown hsReactionThermo type " - << modelType << nl << nl - << "Valid hsReactionThermo types:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl - << exit(FatalError); - } - - return autoPtr(cstrIter()(mesh)); -} - - -Foam::autoPtr Foam::hsReactionThermo::NewType -( - const fvMesh& mesh, - const word& thermoType -) -{ - // get model name, but do not register the dictionary - // otherwise it is registered in the database twice - const word modelType - ( - IOdictionary - ( - IOobject - ( - "thermophysicalProperties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ).lookup("thermoType") - ); - - if (modelType.find(thermoType) == string::npos) - { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) - { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } - } - - FatalErrorIn - ( - "autoPtr hsReactionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << modelType << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); - } - - Info<< "Selecting thermodynamics package " << modelType << endl; - - fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(modelType); - - if (cstrIter == fvMeshConstructorTablePtr_->end()) - { - FatalErrorIn("hsReactionThermo::New(const fvMesh&)") - << "Unknown hsReactionThermo type " - << modelType << nl << nl - << "Valid hsReactionThermo types:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl - << exit(FatalError); - } - - return autoPtr(cstrIter()(mesh)); -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C deleted file mode 100644 index 826babba32..0000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermos.C +++ /dev/null @@ -1,195 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 "makeHsReactionThermo.H" - -#include "hsReactionThermo.H" -#include "hsRhoMixtureThermo.H" - -#include "perfectGas.H" - -#include "hConstThermo.H" -#include "janafThermo.H" -#include "specieThermo.H" - -#include "constTransport.H" -#include "sutherlandTransport.H" - -#include "homogeneousMixture.H" -#include "inhomogeneousMixture.H" -#include "veryInhomogeneousMixture.H" -#include "dieselMixture.H" -#include "multiComponentMixture.H" -#include "reactingMixture.H" -#include "singleStepReactingMixture.H" - -#include "thermoPhysicsTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - homogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - inhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - veryInhomogeneousMixture, - constTransport, - hConstThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - homogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - inhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - veryInhomogeneousMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -makeHsReactionThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - dieselMixture, - sutherlandTransport, - janafThermo, - perfectGas -); - - -// Multi-component thermo - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - multiComponentMixture, - constGasThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - multiComponentMixture, - icoPoly8ThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - multiComponentMixture, - gasThermoPhysics -); - - -// Multi-component reaction thermo - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - reactingMixture, - constGasThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - reactingMixture, - icoPoly8ThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - reactingMixture, - gasThermoPhysics -); - -makeHsReactionMixtureThermo -( - hsReactionThermo, - hsRhoMixtureThermo, - singleStepReactingMixture, - gasThermoPhysics -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C deleted file mode 100644 index 5229bea1e7..0000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C +++ /dev/null @@ -1,319 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hRhoMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hRhoMixtureThermo::calculate() -{ - const scalarField& hCells = h_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& rhoCells = rho_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture = - this->cellMixture(celli); - - TCells[celli] = mixture.TH(hCells[celli], TCells[celli]); - psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = rho_.boundaryField()[patchi]; - - fvPatchScalarField& ph = h_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - ph[facei] = mixture.H(pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture.TH(ph[facei], pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hRhoMixtureThermo::hRhoMixtureThermo(const fvMesh& mesh) -: - hReactionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hCells = h_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hCells, celli) - { - hCells[celli] = this->cellMixture(celli).H(TCells[celli]); - } - - forAll(h_.boundaryField(), patchi) - { - h_.boundaryField()[patchi] == h(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(h_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hRhoMixtureThermo::~hRhoMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hRhoMixtureThermo::correct() -{ - if (debug) - { - Info<< "entering hRhoMixtureThermo::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hRhoMixtureThermo::correct()" << endl; - } -} - - -template -Foam::tmp -Foam::hRhoMixtureThermo::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - h_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template -Foam::tmp -Foam::hRhoMixtureThermo::h -( - const scalarField& T, - const labelList& cells -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, celli) - { - h[celli] = this->cellMixture(cells[celli]).H(T[celli]); - } - - return th; -} - - -template -Foam::tmp -Foam::hRhoMixtureThermo::h -( - const scalarField& T, - const label patchi -) const -{ - tmp th(new scalarField(T.size())); - scalarField& h = th(); - - forAll(T, facei) - { - h[facei] = this->patchFaceMixture(patchi, facei).H(T[facei]); - } - - return th; -} - - -template -Foam::tmp -Foam::hRhoMixtureThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp -Foam::hRhoMixtureThermo::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionSet(0, 2, -2, -1, 0) - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template -bool Foam::hRhoMixtureThermo::read() -{ - if (hReactionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C deleted file mode 100644 index 6277287cbc..0000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C +++ /dev/null @@ -1,319 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 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 "hsRhoMixtureThermo.H" -#include "fvMesh.H" -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -void Foam::hsRhoMixtureThermo::calculate() -{ - const scalarField& hsCells = hs_.internalField(); - const scalarField& pCells = p_.internalField(); - - scalarField& TCells = T_.internalField(); - scalarField& psiCells = psi_.internalField(); - scalarField& rhoCells = rho_.internalField(); - scalarField& muCells = mu_.internalField(); - scalarField& alphaCells = alpha_.internalField(); - - forAll(TCells, celli) - { - const typename MixtureType::thermoType& mixture = - this->cellMixture(celli); - - TCells[celli] = mixture.THs(hsCells[celli], TCells[celli]); - psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); - - muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alphah(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - fvPatchScalarField& pp = p_.boundaryField()[patchi]; - fvPatchScalarField& pT = T_.boundaryField()[patchi]; - fvPatchScalarField& ppsi = psi_.boundaryField()[patchi]; - fvPatchScalarField& prho = rho_.boundaryField()[patchi]; - - fvPatchScalarField& phs = hs_.boundaryField()[patchi]; - - fvPatchScalarField& pmu_ = mu_.boundaryField()[patchi]; - fvPatchScalarField& palpha_ = alpha_.boundaryField()[patchi]; - - if (pT.fixesValue()) - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - phs[facei] = mixture.Hs(pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - else - { - forAll(pT, facei) - { - const typename MixtureType::thermoType& mixture = - this->patchFaceMixture(patchi, facei); - - pT[facei] = mixture.THs(phs[facei], pT[facei]); - - ppsi[facei] = mixture.psi(pp[facei], pT[facei]); - prho[facei] = mixture.rho(pp[facei], pT[facei]); - pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alphah(pT[facei]); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::hsRhoMixtureThermo::hsRhoMixtureThermo(const fvMesh& mesh) -: - hsReactionThermo(mesh), - MixtureType(*this, mesh) -{ - scalarField& hsCells = hs_.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(hsCells, celli) - { - hsCells[celli] = this->cellMixture(celli).Hs(TCells[celli]); - } - - forAll(hs_.boundaryField(), patchi) - { - hs_.boundaryField()[patchi] == hs(T_.boundaryField()[patchi], patchi); - } - - hBoundaryCorrection(hs_); - - calculate(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::hsRhoMixtureThermo::~hsRhoMixtureThermo() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -void Foam::hsRhoMixtureThermo::correct() -{ - if (debug) - { - Info<< "entering hsRhoMixtureThermo::correct()" << endl; - } - - calculate(); - - if (debug) - { - Info<< "exiting hsRhoMixtureThermo::correct()" << endl; - } -} - - -template -Foam::tmp -Foam::hsRhoMixtureThermo::hc() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp thc - ( - new volScalarField - ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - hs_.dimensions() - ) - ); - - volScalarField& hcf = thc(); - scalarField& hcCells = hcf.internalField(); - - forAll(hcCells, celli) - { - hcCells[celli] = this->cellMixture(celli).Hc(); - } - - forAll(hcf.boundaryField(), patchi) - { - scalarField& hcp = hcf.boundaryField()[patchi]; - - forAll(hcp, facei) - { - hcp[facei] = this->patchFaceMixture(patchi, facei).Hc(); - } - } - - return thc; -} - - -template -Foam::tmp -Foam::hsRhoMixtureThermo::hs -( - const scalarField& T, - const labelList& cells -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, celli) - { - hs[celli] = this->cellMixture(cells[celli]).Hs(T[celli]); - } - - return ths; -} - - -template -Foam::tmp -Foam::hsRhoMixtureThermo::hs -( - const scalarField& T, - const label patchi -) const -{ - tmp ths(new scalarField(T.size())); - scalarField& hs = ths(); - - forAll(T, facei) - { - hs[facei] = this->patchFaceMixture(patchi, facei).Hs(T[facei]); - } - - return ths; -} - - -template -Foam::tmp -Foam::hsRhoMixtureThermo::Cp -( - const scalarField& T, - const label patchi -) const -{ - tmp tCp(new scalarField(T.size())); - - scalarField& cp = tCp(); - - forAll(T, facei) - { - cp[facei] = this->patchFaceMixture(patchi, facei).Cp(T[facei]); - } - - return tCp; -} - - -template -Foam::tmp -Foam::hsRhoMixtureThermo::Cp() const -{ - const fvMesh& mesh = T_.mesh(); - - tmp tCp - ( - new volScalarField - ( - IOobject - ( - "Cp", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimEnergy/dimMass/dimTemperature - ) - ); - - volScalarField& cp = tCp(); - - scalarField& cpCells = cp.internalField(); - const scalarField& TCells = T_.internalField(); - - forAll(TCells, celli) - { - cpCells[celli] = this->cellMixture(celli).Cp(TCells[celli]); - } - - forAll(T_.boundaryField(), patchi) - { - cp.boundaryField()[patchi] = Cp(T_.boundaryField()[patchi], patchi); - } - - return tCp; -} - - -template -bool Foam::hsRhoMixtureThermo::read() -{ - if (hsReactionThermo::read()) - { - MixtureType::read(*this); - return true; - } - else - { - return false; - } -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H deleted file mode 100644 index b25f199dd5..0000000000 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.H +++ /dev/null @@ -1,147 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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::hsRhoMixtureThermo - -Description - Foam::hsRhoMixtureThermo - -SourceFiles - hsRhoMixtureThermo.C - -\*---------------------------------------------------------------------------*/ - -#ifndef hsRhoMixtureThermo_H -#define hsRhoMixtureThermo_H - -#include "hsReactionThermo.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class hsRhoMixtureThermo Declaration -\*---------------------------------------------------------------------------*/ - -template -class hsRhoMixtureThermo -: - public hsReactionThermo, - public MixtureType -{ - // Private Member Functions - - void calculate(); - - //- Construct as copy (not implemented) - hsRhoMixtureThermo(const hsRhoMixtureThermo&); - - -public: - - //- Runtime type information - TypeName("hsRhoMixtureThermo"); - - - // Constructors - - //- Construct from mesh - hsRhoMixtureThermo(const fvMesh&); - - - //- Destructor - virtual ~hsRhoMixtureThermo(); - - - // Member functions - - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - - //- Update properties - virtual void correct(); - - - // Fields derived from thermodynamic state variables - - //- Chemical enthalpy [J/kg] - virtual tmp hc() const; - - - //- Sensible nthalpy for cell-set [J/kg] - virtual tmp hs - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Sensible enthalpy for patch [J/kg] - virtual tmp hs - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "hsRhoMixtureThermo.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C new file mode 100644 index 0000000000..53cf131bc6 --- /dev/null +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.C @@ -0,0 +1,140 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 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 "heRhoReactionThermo.H" +#include "fvMesh.H" +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +void Foam::heRhoReactionThermo::calculate() +{ + const scalarField& hCells = this->he_.internalField(); + const scalarField& pCells = this->p_.internalField(); + + scalarField& TCells = this->T_.internalField(); + scalarField& psiCells = this->psi_.internalField(); + scalarField& rhoCells = this->rho_.internalField(); + scalarField& muCells = this->mu_.internalField(); + scalarField& alphaCells = this->alpha_.internalField(); + + forAll(TCells, celli) + { + const typename MixtureType::thermoType& mixture = + this->cellMixture(celli); + + TCells[celli] = mixture.THE(hCells[celli], TCells[celli]); + psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); + rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); + + muCells[celli] = mixture.mu(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); + } + + forAll(this->T_.boundaryField(), patchi) + { + fvPatchScalarField& pp = this->p_.boundaryField()[patchi]; + fvPatchScalarField& pT = this->T_.boundaryField()[patchi]; + fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi]; + fvPatchScalarField& prho = this->rho_.boundaryField()[patchi]; + + fvPatchScalarField& ph = this->he_.boundaryField()[patchi]; + + fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi]; + fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi]; + + if (pT.fixesValue()) + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + ph[facei] = mixture.HE(pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + prho[facei] = mixture.rho(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + else + { + forAll(pT, facei) + { + const typename MixtureType::thermoType& mixture = + this->patchFaceMixture(patchi, facei); + + pT[facei] = mixture.THE(ph[facei], pT[facei]); + + ppsi[facei] = mixture.psi(pp[facei], pT[facei]); + prho[facei] = mixture.rho(pp[facei], pT[facei]); + pmu_[facei] = mixture.mu(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); + } + } + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::heRhoReactionThermo::heRhoReactionThermo(const fvMesh& mesh) +: + heThermo(mesh) +{ + calculate(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template +Foam::heRhoReactionThermo::~heRhoReactionThermo() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::heRhoReactionThermo::correct() +{ + if (debug) + { + Info<< "entering heRhoReactionThermo::correct()" << endl; + } + + calculate(); + + if (debug) + { + Info<< "exiting heRhoReactionThermo::correct()" << endl; + } +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H similarity index 54% rename from src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H index 5e94083bee..e8c1302140 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.H +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermo.H @@ -22,20 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::hPsiMixtureThermo + Foam::heRhoReactionThermo Description - Foam::hPsiMixtureThermo + Foam::heRhoReactionThermo SourceFiles - hPsiMixtureThermo.C + heRhoReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hPsiMixtureThermo_H -#define hPsiMixtureThermo_H +#ifndef heRhoReactionThermo_H +#define heRhoReactionThermo_H -#include "hCombustionThermo.H" +#include "heThermo.H" +#include "rhoReactionThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,89 +44,42 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hPsiMixtureThermo Declaration + Class heRhoReactionThermo Declaration \*---------------------------------------------------------------------------*/ template -class hPsiMixtureThermo +class heRhoReactionThermo : - public hCombustionThermo, - public MixtureType + public heThermo { // Private Member Functions void calculate(); //- Construct as copy (not implemented) - hPsiMixtureThermo(const hPsiMixtureThermo&); + heRhoReactionThermo(const heRhoReactionThermo&); public: //- Runtime type information - TypeName("hPsiMixtureThermo"); + TypeName("heRhoReactionThermo"); // Constructors //- Construct from mesh - hPsiMixtureThermo(const fvMesh&); + heRhoReactionThermo(const fvMesh&); //- Destructor - virtual ~hPsiMixtureThermo(); + virtual ~heRhoReactionThermo(); // Member functions - //- Return the compostion of the multi-component mixture - virtual basicMultiComponentMixture& composition() - { - return *this; - } - - //- Return the compostion of the multi-component mixture - virtual const basicMultiComponentMixture& composition() const - { - return *this; - } - //- Update properties virtual void correct(); - - - // Fields derived from thermodynamic state variables - - //- Chemical enthalpy [J/kg] - virtual tmp hc() const; - - //- Enthalpy for cell-set [J/kg] - virtual tmp h - ( - const scalarField& T, - const labelList& cells - ) const; - - //- Enthalpy for patch [J/kg] - virtual tmp h - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure for patch [J/kg/K] - virtual tmp Cp - ( - const scalarField& T, - const label patchi - ) const; - - //- Heat capacity at constant pressure [J/kg/K] - virtual tmp Cp() const; - - - //- Read thermophysicalProperties dictionary - virtual bool read(); }; @@ -136,7 +90,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "hPsiMixtureThermo.C" +# include "heRhoReactionThermo.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C similarity index 74% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermos.C rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C index 119152bcce..6e53d8b806 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C @@ -25,13 +25,14 @@ License #include "makeReactionThermo.H" -#include "hReactionThermo.H" -#include "hRhoMixtureThermo.H" +#include "rhoReactionThermo.H" +#include "heRhoReactionThermo.H" #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "constTransport.H" @@ -56,60 +57,72 @@ namespace Foam makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, homogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, inhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, veryInhomogeneousMixture, constTransport, + sensibleEnthalpy, hConstThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, homogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, inhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, veryInhomogeneousMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); @@ -117,10 +130,12 @@ makeReactionThermo makeReactionThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, dieselMixture, sutherlandTransport, + sensibleEnthalpy, janafThermo, perfectGas ); @@ -130,24 +145,27 @@ makeReactionThermo makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, multiComponentMixture, constGasThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, multiComponentMixture, icoPoly8ThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, multiComponentMixture, gasThermoPhysics ); @@ -157,32 +175,36 @@ makeReactionMixtureThermo makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, reactingMixture, constGasThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, reactingMixture, icoPoly8ThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, reactingMixture, gasThermoPhysics ); makeReactionMixtureThermo ( - hReactionThermo, - hRhoMixtureThermo, + rhoThermo, + rhoReactionThermo, + heRhoReactionThermo, singleStepReactingMixture, gasThermoPhysics ); diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/makeReactionThermo.H b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/makeReactionThermo.H similarity index 78% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/makeReactionThermo.H rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/makeReactionThermo.H index 7d7c15ace9..c59969ddfc 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/makeReactionThermo.H +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/makeReactionThermo.H @@ -21,57 +21,55 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . -InClass - Foam::hReactionThermo - \*---------------------------------------------------------------------------*/ #ifndef makeReactionThermo_H #define makeReactionThermo_H #include "addToRunTimeSelectionTable.H" -#include "basicRhoThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeReactionThermo\ -( \ - CThermo, \ - MixtureThermo, \ - Mixture, \ - Transport, \ - Thermo, \ - EqnOfState \ -) \ +#define makeReactionThermo(BaseThermo,CThermo,MixtureThermo,Mixture,Transport,Type,Thermo,EqnOfState) \ \ typedef MixtureThermo \ - > > > > \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState; \ + ,Type> > > > \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState; \ \ defineTemplateTypeNameAndDebugWithName \ ( \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState, \ #MixtureThermo \ - "<"#Mixture"<"#Transport">>>>", \ + "<" \ + #Mixture \ + "<" \ + #Transport \ + "," \ + #Type \ + ">>>>", \ 0 \ ); \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + BaseThermo, \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ); \ \ addToRunTimeSelectionTable \ ( \ CThermo, \ - MixtureThermo##Mixture##Transport##Thermo##EqnOfState, \ + MixtureThermo##Mixture##Transport##Type##Thermo##EqnOfState, \ fvMesh \ ) -#define makeReactionMixtureThermo(CThermo,MixtureThermo,Mixture,ThermoPhys) \ +#define makeReactionMixtureThermo(BaseThermo,CThermo,MixtureThermo,Mixture,ThermoPhys) \ \ typedef MixtureThermo > \ MixtureThermo##Mixture##ThermoPhys; \ @@ -85,7 +83,7 @@ defineTemplateTypeNameAndDebugWithName \ \ addToRunTimeSelectionTable \ ( \ - basicRhoThermo, \ + BaseThermo, \ MixtureThermo##Mixture##ThermoPhys, \ fvMesh \ ); \ diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C similarity index 74% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.C rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C index dcfeb27641..41843bce56 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermo.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C @@ -23,43 +23,28 @@ License \*---------------------------------------------------------------------------*/ -#include "hReactionThermo.H" +#include "rhoReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(hReactionThermo, 0); - defineRunTimeSelectionTable(hReactionThermo, fvMesh); + defineTypeNameAndDebug(rhoReactionThermo, 0); + defineRunTimeSelectionTable(rhoReactionThermo, fvMesh); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::hReactionThermo::hReactionThermo(const fvMesh& mesh) +Foam::rhoReactionThermo::rhoReactionThermo(const fvMesh& mesh) : - basicRhoThermo(mesh), - - h_ - ( - IOobject - ( - "h", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh, - dimensionSet(0, 2, -2, 0, 0), - this->hBoundaryTypes() - ) + rhoThermo(mesh) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::hReactionThermo::~hReactionThermo() +Foam::rhoReactionThermo::~rhoReactionThermo() {} diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H similarity index 71% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H index 55922494a1..a1c055c5d6 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermo.H +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.H @@ -22,20 +22,20 @@ License along with OpenFOAM. If not, see . Class - Foam::hCombustionThermo + Foam::rhoReactionThermo Description - Foam::hCombustionThermo + Foam::rhoReactionThermo SourceFiles - hCombustionThermo.C + rhoReactionThermo.C \*---------------------------------------------------------------------------*/ -#ifndef hCombustionThermo_H -#define hCombustionThermo_H +#ifndef rhoReactionThermo_H +#define rhoReactionThermo_H -#include "basicPsiThermo.H" +#include "rhoThermo.H" #include "basicMultiComponentMixture.H" #include "autoPtr.H" #include "runTimeSelectionTables.H" @@ -46,33 +46,25 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class hCombustionThermo Declaration + Class rhoReactionThermo Declaration \*---------------------------------------------------------------------------*/ -class hCombustionThermo +class rhoReactionThermo : - public basicPsiThermo + public rhoThermo { -protected: - - // Protected data - - //- Enthalpy field - volScalarField h_; - - public: //- Runtime type information - TypeName("hCombustionThermo"); + TypeName("rhoReactionThermo"); //- Declare run-time constructor selection tables declareRunTimeSelectionTable ( autoPtr, - hCombustionThermo, + rhoReactionThermo, fvMesh, (const fvMesh& mesh), (mesh) @@ -82,16 +74,16 @@ public: // Constructors //- Construct from dictionary and mesh - hCombustionThermo(const fvMesh&); + rhoReactionThermo(const fvMesh&); // Selectors //- Standard selection based on fvMesh - static autoPtr New(const fvMesh&); + static autoPtr New(const fvMesh&); //- Select and check that package contains 'thermoType' - static autoPtr NewType + static autoPtr NewType ( const fvMesh&, const word& thermoType @@ -99,7 +91,7 @@ public: //- Destructor - virtual ~hCombustionThermo(); + virtual ~rhoReactionThermo(); // Member functions @@ -109,26 +101,6 @@ public: //- Return the composition of the multi-component mixture virtual const basicMultiComponentMixture& composition() const = 0; - - - // Access to thermodynamic state variables - - //- Enthalpy [J/kg] - // Non-const access allowed for transport equations - virtual volScalarField& h() - { - return h_; - } - - //- Enthalpy [J/kg] - virtual const volScalarField& h() const - { - return h_; - } - - - //- Update properties - virtual void correct() = 0; }; diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C similarity index 85% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C rename to src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C index aeaca42966..aaac229a0d 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermo/rhoReactionThermoNew.C @@ -23,12 +23,12 @@ License \*---------------------------------------------------------------------------*/ -#include "hReactionThermo.H" +#include "rhoReactionThermo.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hReactionThermo::New +Foam::autoPtr Foam::rhoReactionThermo::New ( const fvMesh& mesh ) @@ -58,19 +58,19 @@ Foam::autoPtr Foam::hReactionThermo::New if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hReactionThermo::New(const fvMesh&)") - << "Unknown hReactionThermo type " + FatalErrorIn("rhoReactionThermo::New(const fvMesh&)") + << "Unknown rhoReactionThermo type " << modelType << nl << nl - << "Valid hReactionThermo types:" << nl + << "Valid rhoReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } -Foam::autoPtr Foam::hReactionThermo::NewType +Foam::autoPtr Foam::rhoReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType @@ -108,7 +108,7 @@ Foam::autoPtr Foam::hReactionThermo::NewType FatalErrorIn ( - "autoPtr hReactionThermo::NewType" + "autoPtr rhoReactionThermo::NewType" "(" "const fvMesh&, " "const word&" @@ -129,19 +129,19 @@ Foam::autoPtr Foam::hReactionThermo::NewType { FatalErrorIn ( - "autoPtr hReactionThermo::NewType" + "autoPtr rhoReactionThermo::NewType" "(" "const fvMesh&, " "const word&" ")" - ) << "Unknown hReactionThermo type " + ) << "Unknown rhoReactionThermo type " << modelType << nl << nl - << "Valid hReactionThermo types:" << nl + << "Valid rhoReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } - return autoPtr(cstrIter()(mesh)); + return autoPtr(cstrIter()(mesh)); } diff --git a/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H b/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H index 33a5b15f03..40ffd2c637 100644 --- a/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H +++ b/src/thermophysicalModels/solid/reaction/reactions/makeSolidReactionThermo.H @@ -29,8 +29,8 @@ Description \*---------------------------------------------------------------------------*/ -#ifndef makeReactionThermo_H -#define makeReactionThermo_H +#ifndef makeSolidReactionThermo_H +#define makeSolidReactionThermo_H #include "solidReaction.H" #include "IrreversibleSolidReaction.H" diff --git a/src/thermophysicalModels/specie/Make/files b/src/thermophysicalModels/specie/Make/files index 29d3c029ef..87d6a0380f 100644 --- a/src/thermophysicalModels/specie/Make/files +++ b/src/thermophysicalModels/specie/Make/files @@ -7,7 +7,7 @@ $(atomicWeights)/atomicWeights.C $(specie)/specie.C $(equationOfState)/perfectGas/perfectGas.C $(equationOfState)/incompressible/incompressible.C -$(equationOfState)/pressurePerfectGas/pressurePerfectGas.C +$(equationOfState)/isobaricPerfectGas/isobaricPerfectGas.C $(reactions)/makeChemkinReactions.C $(reactions)/makeReactionThermoReactions.C $(reactions)/makeLangmuirHinshelwoodReactions.C diff --git a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.C b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.C similarity index 82% rename from src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.C rename to src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.C index 4a58751472..314dafd86c 100644 --- a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.C +++ b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.C @@ -23,21 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "pressurePerfectGas.H" +#include "isobaricPerfectGas.H" #include "IOstreams.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::pressurePerfectGas::pressurePerfectGas(Istream& is) +Foam::isobaricPerfectGas::isobaricPerfectGas(Istream& is) : specie(is), pRef_(readScalar(is)) { - is.check("pressurePerfectGas::pressurePerfectGas(Istream& is)"); + is.check("isobaricPerfectGas::isobaricPerfectGas(Istream& is)"); } -Foam::pressurePerfectGas::pressurePerfectGas(const dictionary& dict) +Foam::isobaricPerfectGas::isobaricPerfectGas(const dictionary& dict) : specie(dict), pRef_(readScalar(dict.subDict("equationOfState").lookup("pRef"))) @@ -46,7 +46,7 @@ Foam::pressurePerfectGas::pressurePerfectGas(const dictionary& dict) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::pressurePerfectGas::write(Ostream& os) const +void Foam::isobaricPerfectGas::write(Ostream& os) const { specie::write(os); dictionary dict("equationOfState"); @@ -58,12 +58,12 @@ void Foam::pressurePerfectGas::write(Ostream& os) const // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // -Foam::Ostream& Foam::operator<<(Ostream& os, const pressurePerfectGas& pg) +Foam::Ostream& Foam::operator<<(Ostream& os, const isobaricPerfectGas& pg) { os << static_cast(pg) << token::SPACE << pg.pRef_; - os.check("Ostream& operator<<(Ostream& os, const pressurePerfectGas& st)"); + os.check("Ostream& operator<<(Ostream& os, const isobaricPerfectGas& st)"); return os; } diff --git a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.H similarity index 67% rename from src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.H rename to src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.H index 40f4938568..310d72f0ab 100644 --- a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGas.H @@ -22,19 +22,20 @@ License along with OpenFOAM. If not, see . Class - Foam::pressurePerfectGas + Foam::isobaricPerfectGas Description - Perfect gas equation of state usign a reference pressure + Perfect gas equation of state using a reference pressure + rather than the local pressure. SourceFiles - pressurePerfectGasI.H - pressurePerfectGas.C + isobaricPerfectGasI.H + isobaricPerfectGas.C \*---------------------------------------------------------------------------*/ -#ifndef pressurePerfectGas_H -#define pressurePerfectGas_H +#ifndef isobaricPerfectGas_H +#define isobaricPerfectGas_H #include "specie.H" #include "autoPtr.H" @@ -45,10 +46,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class pressurePerfectGas Declaration + Class isobaricPerfectGas Declaration \*---------------------------------------------------------------------------*/ -class pressurePerfectGas +class isobaricPerfectGas : public specie { @@ -63,25 +64,25 @@ public: // Constructors //- Construct from components - inline pressurePerfectGas(const specie& sp); + inline isobaricPerfectGas(const specie& sp); //- Construct from Istream - pressurePerfectGas(Istream&); + isobaricPerfectGas(Istream&); //- Construct from dictionary - pressurePerfectGas(const dictionary& dict); + isobaricPerfectGas(const dictionary& dict); //- Construct as named copy - inline pressurePerfectGas(const word& name, const pressurePerfectGas&); + inline isobaricPerfectGas(const word& name, const isobaricPerfectGas&); //- Construct and return a clone - inline autoPtr clone() const; + inline autoPtr clone() const; // Selector from Istream - inline static autoPtr New(Istream& is); + inline static autoPtr New(Istream& is); // Selector from dictionary - inline static autoPtr New(const dictionary& dict); + inline static autoPtr New(const dictionary& dict); // Member functions @@ -106,42 +107,42 @@ public: // Member operators - inline void operator+=(const pressurePerfectGas&); - inline void operator-=(const pressurePerfectGas&); + inline void operator+=(const isobaricPerfectGas&); + inline void operator-=(const isobaricPerfectGas&); inline void operator*=(const scalar); // Friend operators - inline friend pressurePerfectGas operator+ + inline friend isobaricPerfectGas operator+ ( - const pressurePerfectGas&, - const pressurePerfectGas& + const isobaricPerfectGas&, + const isobaricPerfectGas& ); - inline friend pressurePerfectGas operator- + inline friend isobaricPerfectGas operator- ( - const pressurePerfectGas&, - const pressurePerfectGas& + const isobaricPerfectGas&, + const isobaricPerfectGas& ); - inline friend pressurePerfectGas operator* + inline friend isobaricPerfectGas operator* ( const scalar s, - const pressurePerfectGas& + const isobaricPerfectGas& ); - inline friend pressurePerfectGas operator== + inline friend isobaricPerfectGas operator== ( - const pressurePerfectGas&, - const pressurePerfectGas& + const isobaricPerfectGas&, + const isobaricPerfectGas& ); // Ostream Operator - friend Ostream& operator<<(Ostream&, const pressurePerfectGas&); + friend Ostream& operator<<(Ostream&, const isobaricPerfectGas&); }; @@ -151,7 +152,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "pressurePerfectGasI.H" +#include "isobaricPerfectGasI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGasI.H similarity index 61% rename from src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGasI.H rename to src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGasI.H index 99512ecaee..915ef8ab30 100644 --- a/src/thermophysicalModels/specie/equationOfState/pressurePerfectGas/pressurePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/isobaricPerfectGas/isobaricPerfectGasI.H @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "pressurePerfectGas.H" +#include "isobaricPerfectGas.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -inline Foam::pressurePerfectGas::pressurePerfectGas(const specie& sp) +inline Foam::isobaricPerfectGas::isobaricPerfectGas(const specie& sp) : specie(sp) {} @@ -35,56 +35,56 @@ inline Foam::pressurePerfectGas::pressurePerfectGas(const specie& sp) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -inline Foam::pressurePerfectGas::pressurePerfectGas +inline Foam::isobaricPerfectGas::isobaricPerfectGas ( const word& name, - const pressurePerfectGas& pg + const isobaricPerfectGas& pg ) : specie(name, pg) {} -inline Foam::autoPtr Foam::pressurePerfectGas:: +inline Foam::autoPtr Foam::isobaricPerfectGas:: clone() const { - return autoPtr(new pressurePerfectGas(*this)); + return autoPtr(new isobaricPerfectGas(*this)); } -inline Foam::autoPtr Foam::pressurePerfectGas::New +inline Foam::autoPtr Foam::isobaricPerfectGas::New ( Istream& is ) { - return autoPtr(new pressurePerfectGas(is)); + return autoPtr(new isobaricPerfectGas(is)); } -inline Foam::autoPtr Foam::pressurePerfectGas::New +inline Foam::autoPtr Foam::isobaricPerfectGas::New ( const dictionary& dict ) { - return autoPtr(new pressurePerfectGas(dict)); + return autoPtr(new isobaricPerfectGas(dict)); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::scalar Foam::pressurePerfectGas::rho(scalar p, scalar T) const +inline Foam::scalar Foam::isobaricPerfectGas::rho(scalar p, scalar T) const { return pRef_/(R()*T); } -inline Foam::scalar Foam::pressurePerfectGas::psi(scalar, scalar T) const +inline Foam::scalar Foam::isobaricPerfectGas::psi(scalar, scalar T) const { return 0.0; } -inline Foam::scalar Foam::pressurePerfectGas::Z(scalar, scalar) const +inline Foam::scalar Foam::isobaricPerfectGas::Z(scalar, scalar) const { return 0.0; } @@ -92,19 +92,19 @@ inline Foam::scalar Foam::pressurePerfectGas::Z(scalar, scalar) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -inline void Foam::pressurePerfectGas::operator+=(const pressurePerfectGas& pg) +inline void Foam::isobaricPerfectGas::operator+=(const isobaricPerfectGas& pg) { specie::operator+=(pg); } -inline void Foam::pressurePerfectGas::operator-=(const pressurePerfectGas& pg) +inline void Foam::isobaricPerfectGas::operator-=(const isobaricPerfectGas& pg) { specie::operator-=(pg); } -inline void Foam::pressurePerfectGas::operator*=(const scalar s) +inline void Foam::isobaricPerfectGas::operator*=(const scalar s) { specie::operator*=(s); } @@ -112,13 +112,13 @@ inline void Foam::pressurePerfectGas::operator*=(const scalar s) // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // -inline Foam::pressurePerfectGas Foam::operator+ +inline Foam::isobaricPerfectGas Foam::operator+ ( - const pressurePerfectGas& pg1, - const pressurePerfectGas& pg2 + const isobaricPerfectGas& pg1, + const isobaricPerfectGas& pg2 ) { - return pressurePerfectGas + return isobaricPerfectGas ( static_cast(pg1) + static_cast(pg2) @@ -126,13 +126,13 @@ inline Foam::pressurePerfectGas Foam::operator+ } -inline Foam::pressurePerfectGas Foam::operator- +inline Foam::isobaricPerfectGas Foam::operator- ( - const pressurePerfectGas& pg1, - const pressurePerfectGas& pg2 + const isobaricPerfectGas& pg1, + const isobaricPerfectGas& pg2 ) { - return pressurePerfectGas + return isobaricPerfectGas ( static_cast(pg1) - static_cast(pg2) @@ -140,20 +140,20 @@ inline Foam::pressurePerfectGas Foam::operator- } -inline Foam::pressurePerfectGas Foam::operator* +inline Foam::isobaricPerfectGas Foam::operator* ( const scalar s, - const pressurePerfectGas& pg + const isobaricPerfectGas& pg ) { - return pressurePerfectGas(s*static_cast(pg)); + return isobaricPerfectGas(s*static_cast(pg)); } -inline Foam::pressurePerfectGas Foam::operator== +inline Foam::isobaricPerfectGas Foam::operator== ( - const pressurePerfectGas& pg1, - const pressurePerfectGas& pg2 + const isobaricPerfectGas& pg1, + const isobaricPerfectGas& pg2 ) { return pg2 - pg1; diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index 40133fda71..6fd8c75c82 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H @@ -35,6 +35,7 @@ Description #include "perfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" +#include "sensibleEnthalpy.H" #include "specieThermo.H" #include "sutherlandTransport.H" #include "constTransport.H" @@ -47,13 +48,36 @@ Description namespace Foam { - typedef sutherlandTransport > > + typedef + sutherlandTransport + < + specieThermo + < + janafThermo + < + perfectGas + >, + sensibleEnthalpy + > + > gasThermoPhysics; - typedef constTransport > > + typedef + constTransport + < + specieThermo + < + hConstThermo + < + perfectGas + >, + sensibleEnthalpy + > + > constGasThermoPhysics; - typedef polynomialTransport + typedef + polynomialTransport < specieThermo < @@ -61,7 +85,8 @@ namespace Foam < icoPolynomial<8>, 8 - > + >, + sensibleEnthalpy >, 8 > @@ -73,4 +98,3 @@ namespace Foam #endif // ************************************************************************* // - diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C index d9ccc0f786..8275d3e556 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeChemkinReactions.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "reactionTypes.H" -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "ArrheniusReactionRate.H" #include "infiniteReactionRate.H" diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C index 00b6f14f24..4f185bda17 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "reactionTypes.H" #include "LangmuirHinshelwoodReactionRate.H" diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermo.H b/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H similarity index 99% rename from src/thermophysicalModels/specie/reaction/reactions/makeReactionThermo.H rename to src/thermophysicalModels/specie/reaction/reactions/makeReaction.H index 5f318a8b44..de0f747f76 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermo.H +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReaction.H @@ -22,15 +22,15 @@ License along with OpenFOAM. If not, see . InClass - Foam::makeReactionThermo + Foam::makeReaction Description Macros for instantiating reactions on given thermo packages \*---------------------------------------------------------------------------*/ -#ifndef makeReactionThermo_H -#define makeReactionThermo_H +#ifndef makeReaction_H +#define makeReaction_H #include "Reaction.H" diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C index 690f53592e..bd8930bad0 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactionThermoReactions.C @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "reactionTypes.H" -#include "makeReactionThermo.H" +#include "makeReaction.H" #include "ArrheniusReactionRate.H" #include "infiniteReactionRate.H" diff --git a/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H b/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H new file mode 100644 index 0000000000..87da23398f --- /dev/null +++ b/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 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::absoluteEnthalpy + +Description + Thermodynamics mapping class to expose the absolute enthalpy function + as the standard enthalpy function h(T). + +\*---------------------------------------------------------------------------*/ + +#ifndef absoluteEnthalpy_H +#define absoluteEnthalpy_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class absoluteEnthalpy Declaration +\*---------------------------------------------------------------------------*/ + +template +class absoluteEnthalpy +{ + +public: + + // Constructors + + //- Construct + absoluteEnthalpy() + {} + + + // Member Functions + + // Fundamental properties + + static word name() + { + return "ha"; + } + + // Absolute enthalpy [J/kmol] + scalar he(const Thermo& thermo, const scalar T) const + { + return thermo.ha(T); + } + + // Heat capacity at constant pressure [J/(kmol K)] + scalar cpv(const Thermo& thermo, const scalar T) const + { + return thermo.cp(T); + } + + //- cp/cp [] + scalar cpBycpv(const Thermo& thermo, const scalar T) const + { + return 1; + } + + // Absolute enthalpy [J/kg] + scalar HE(const Thermo& thermo, const scalar T) const + { + return thermo.Ha(T); + } + + //- Temperature from absolute enthalpy + // given an initial temperature T0 + scalar THE(const Thermo& thermo, const scalar h, const scalar T0) + const + { + return thermo.THa(h, T0); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H index bd8bdb4573..60c818c293 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H @@ -143,8 +143,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible Enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H index 31bd392b5d..f897d72c7f 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H @@ -110,7 +110,7 @@ inline Foam::scalar Foam::eConstThermo::cp template -inline Foam::scalar Foam::eConstThermo::h +inline Foam::scalar Foam::eConstThermo::ha ( const scalar T ) const diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H index 9a8352a064..986a52822f 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H @@ -141,8 +141,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H index 0a4a35358c..6b76f93fb5 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H @@ -110,7 +110,7 @@ inline Foam::scalar Foam::hConstThermo::cp template -inline Foam::scalar Foam::hConstThermo::h +inline Foam::scalar Foam::hConstThermo::ha ( const scalar T ) const diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index 31954a4a56..fec38b8a89 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -159,8 +159,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index a164392c61..c1eeff998e 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -103,7 +103,7 @@ inline Foam::scalar Foam::hPolynomialThermo::cp template -inline Foam::scalar Foam::hPolynomialThermo::h +inline Foam::scalar Foam::hPolynomialThermo::ha ( const scalar T ) const @@ -118,7 +118,7 @@ inline Foam::scalar Foam::hPolynomialThermo::hs const scalar T ) const { - return h(T) - hc(); + return ha(T) - hc(); } diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H index 784a31baa8..30597fdeb7 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H @@ -177,8 +177,8 @@ public: //- Heat capacity at constant pressure [J/(kmol K)] inline scalar cp(const scalar T) const; - //- Enthalpy [J/kmol] - inline scalar h(const scalar T) const; + //- Absolute Enthalpy [J/kmol] + inline scalar ha(const scalar T) const; //- Sensible enthalpy [J/kmol] inline scalar hs(const scalar T) const; diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H index 4e0a5b4ff2..f8ef91fdb3 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H @@ -168,7 +168,7 @@ inline Foam::scalar Foam::janafThermo::cp template -inline Foam::scalar Foam::janafThermo::h +inline Foam::scalar Foam::janafThermo::ha ( const scalar T ) const @@ -188,7 +188,7 @@ inline Foam::scalar Foam::janafThermo::hs const scalar T ) const { - return h(T) - hc(); + return ha(T) - hc(); } diff --git a/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H b/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H new file mode 100644 index 0000000000..88c2e486ec --- /dev/null +++ b/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 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::sensibleEnthalpy + +Description + Thermodynamics mapping class to expose the sensible enthalpy function + as the standard enthalpy function h(T). + +\*---------------------------------------------------------------------------*/ + +#ifndef sensibleEnthalpy_H +#define sensibleEnthalpy_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class sensibleEnthalpy Declaration +\*---------------------------------------------------------------------------*/ + +template +class sensibleEnthalpy +{ + +public: + + // Constructors + + //- Construct + sensibleEnthalpy() + {} + + + // Member Functions + + // Fundamental properties + + static word name() + { + return "h"; + } + + // Sensible enthalpy [J/kmol] + scalar he(const Thermo& thermo, const scalar T) const + { + return thermo.hs(T); + } + + // Heat capacity at constant pressure [J/(kmol K)] + scalar cpv(const Thermo& thermo, const scalar T) const + { + return thermo.cp(T); + } + + //- cp/cp [] + scalar cpBycpv(const Thermo& thermo, const scalar T) const + { + return 1; + } + + // Sensible enthalpy [J/kg] + scalar HE(const Thermo& thermo, const scalar T) const + { + return thermo.Hs(T); + } + + //- Temperature from sensible enthalpy + // given an initial temperature T0 + scalar THE(const Thermo& thermo, const scalar h, const scalar T0) + const + { + return thermo.THs(h, T0); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H b/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H new file mode 100644 index 0000000000..2f33244b44 --- /dev/null +++ b/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 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::sensibleInternalEnergy + +Description + Thermodynamics mapping class to expose the sensible internal energy function + as the standard internal energy function e(T). + +\*---------------------------------------------------------------------------*/ + +#ifndef sensibleInternalEnergy_H +#define sensibleInternalEnergy_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class sensibleInternalEnergy Declaration +\*---------------------------------------------------------------------------*/ + +template +class sensibleInternalEnergy +{ + +public: + + // Constructors + + //- Construct + sensibleInternalEnergy() + {} + + + // Member Functions + + // Fundamental properties + + static word name() + { + return "e"; + } + + //- Sensible Internal energy [J/kmol] + scalar he(const Thermo& thermo, const scalar T) const + { + return thermo.es(T); + } + + //- Heat capacity at constant volume [J/(kmol K)] + scalar cpv(const Thermo& thermo, const scalar T) const + { + return thermo.cv(T); + } + + //- cp/cv [] + scalar cpBycpv(const Thermo& thermo, const scalar T) const + { + return thermo.gamma(T); + } + + //- Sensible enthalpy [J/kg] + scalar HE(const Thermo& thermo, const scalar T) const + { + return thermo.Es(T); + } + + //- Temperature from sensible internal energy + // given an initial temperature T0 + scalar THE(const Thermo& thermo, const scalar e, const scalar T0) + const + { + return thermo.TEs(e, T0); + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C index 6b958a6ceb..a348bc09d5 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.C @@ -28,26 +28,26 @@ License /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ -template -const Foam::scalar Foam::specieThermo::tol_ = 1.0e-4; +template class Type> +const Foam::scalar Foam::specieThermo::tol_ = 1.0e-4; -template -const int Foam::specieThermo::maxIter_ = 100; +template class Type> +const int Foam::specieThermo::maxIter_ = 100; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -Foam::specieThermo::specieThermo(Istream& is) +template class Type> +Foam::specieThermo::specieThermo(Istream& is) : Thermo(is) { - is.check("specieThermo::specieThermo(Istream&)"); + is.check("specieThermo::specieThermo(Istream&)"); } -template -Foam::specieThermo::specieThermo(const dictionary& dict) +template class Type> +Foam::specieThermo::specieThermo(const dictionary& dict) : Thermo(dict) {} @@ -55,8 +55,8 @@ Foam::specieThermo::specieThermo(const dictionary& dict) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -void Foam::specieThermo::write(Ostream& os) const +template class Type> +void Foam::specieThermo::write(Ostream& os) const { Thermo::write(os); } @@ -64,8 +64,11 @@ void Foam::specieThermo::write(Ostream& os) const // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // -template -Foam::Ostream& Foam::operator<<(Ostream& os, const specieThermo& st) +template class Type> +Foam::Ostream& Foam::operator<< +( + Ostream& os, const specieThermo& st +) { os << static_cast(st); diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H index 93268b9e6b..5a3eb6f747 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H @@ -45,41 +45,41 @@ namespace Foam // Forward declaration of friend functions and operators -template class specieThermo; +template class Type> class specieThermo; -template -inline specieThermo operator+ +template class Type> +inline specieThermo operator+ ( - const specieThermo&, - const specieThermo& + const specieThermo&, + const specieThermo& ); -template -inline specieThermo operator- +template class Type> +inline specieThermo operator- ( - const specieThermo&, - const specieThermo& + const specieThermo&, + const specieThermo& ); -template -inline specieThermo operator* +template class Type> +inline specieThermo operator* ( const scalar, - const specieThermo& + const specieThermo& ); -template -inline specieThermo operator== +template class Type> +inline specieThermo operator== ( - const specieThermo&, - const specieThermo& + const specieThermo&, + const specieThermo& ); -template +template class Type> Ostream& operator<< ( Ostream&, - const specieThermo& + const specieThermo& ); @@ -87,10 +87,11 @@ Ostream& operator<< Class specieThermo Declaration \*---------------------------------------------------------------------------*/ -template +template class Type> class specieThermo : - public Thermo + public Thermo, + public Type > { // Private data @@ -140,8 +141,8 @@ public: // Heat capacity at constant pressure [J/(kmol K)] // scalar cp(const scalar) const; - // Enthalpy [J/kmol] - // scalar h(const scalar) const; + // Absolute Enthalpy [J/kmol] + // scalar ha(const scalar) const; // Sensible enthalpy [J/kmol] // scalar hs(const scalar) const; @@ -158,18 +159,31 @@ public: // Mole specific properties + //- Name of Enthalpy/Internal energy + static inline word heName(); + + //- Enthalpy/Internal energy [J/kmol] + inline scalar he(const scalar T) const; + //- Heat capacity at constant volume [J/(kmol K)] inline scalar cv(const scalar T) const; + //- Heat capacity at constant pressure/volume [J/(kmol K)] + inline scalar cpv(const scalar T) const; + //- gamma = cp/cv [] inline scalar gamma(const scalar T) const; - //- Internal energy [J/kmol] - inline scalar e(const scalar T) const; + //- Ratio of heat capacity at constant pressure to that at + // constant pressure/volume [] + inline scalar cpBycpv(const scalar T) const; //- Sensible internal energy [J/kmol] inline scalar es(const scalar T) const; + //- Absolute internal energy [J/kmol] + inline scalar ea(const scalar T) const; + //- Gibbs free energy [J/kmol] inline scalar g(const scalar T) const; @@ -185,6 +199,12 @@ public: //- Heat capacity at constant volume [J/(kg K)] inline scalar Cv(const scalar T) const; + //- Heat capacity at constant pressure/volume [J/(kg K)] + inline scalar Cpv(const scalar T) const; + + //- Enthalpy/Internal energy [J/kg] + inline scalar HE(const scalar T) const; + //- Enthalpy [J/kg] inline scalar H(const scalar T) const; @@ -194,12 +214,21 @@ public: //- Chemical enthalpy [J/kg] inline scalar Hc() const; + //- Absolute Enthalpy [J/kg] + inline scalar Ha(const scalar T) const; + //- Entropy [J/(kg K)] inline scalar S(const scalar T) const; //- Internal energy [J/kg] inline scalar E(const scalar T) const; + //- Sensible internal energy [J/kg] + inline scalar Es(const scalar T) const; + + //- Absolute internal energy [J/kg] + inline scalar Ea(const scalar T) const; + //- Gibbs free energy [J/kg] inline scalar G(const scalar T) const; @@ -242,14 +271,24 @@ public: // Energy->temperature inversion functions - //- Temperature from Enthalpy given an initial temperature T0 - inline scalar TH(const scalar H, const scalar T0) const; + //- Temperature from enthalpy or internal energy + // given an initial temperature T0 + inline scalar THE(const scalar H, const scalar T0) const; - //- Temperature from sensible Enthalpy given an initial T0 + //- Temperature from sensible enthalpy given an initial T0 inline scalar THs(const scalar Hs, const scalar T0) const; - //- Temperature from internal energy given an initial temperature T0 - inline scalar TE(const scalar E, const scalar T0) const; + //- Temperature from absolute enthalpy + // given an initial temperature T0 + inline scalar THa(const scalar H, const scalar T0) const; + + //- Temperature from sensible internal energy + // given an initial temperature T0 + inline scalar TEs(const scalar E, const scalar T0) const; + + //- Temperature from absolute internal energy + // given an initial temperature T0 + inline scalar TEa(const scalar E, const scalar T0) const; // I-O @@ -268,25 +307,25 @@ public: // Friend operators - friend specieThermo operator+ + friend specieThermo operator+ ( const specieThermo&, const specieThermo& ); - friend specieThermo operator- + friend specieThermo operator- ( const specieThermo&, const specieThermo& ); - friend specieThermo operator* + friend specieThermo operator* ( const scalar s, const specieThermo& ); - friend specieThermo operator== + friend specieThermo operator== ( const specieThermo&, const specieThermo& @@ -295,7 +334,7 @@ public: // Ostream Operator - friend Ostream& operator<< + friend Ostream& operator<< ( Ostream&, const specieThermo& diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H index b2d2edd5c1..b9f95aa7b2 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermoI.H @@ -27,8 +27,8 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -template -inline Foam::specieThermo::specieThermo +template class Type> +inline Foam::specieThermo::specieThermo ( const Thermo& sp ) @@ -37,14 +37,14 @@ inline Foam::specieThermo::specieThermo {} -template -inline Foam::scalar Foam::specieThermo::T +template class Type> +inline Foam::scalar Foam::specieThermo::T ( scalar f, scalar T0, - scalar (specieThermo::*F)(const scalar) const, - scalar (specieThermo::*dFdT)(const scalar) const, - scalar (specieThermo::*limit)(const scalar) const + scalar (specieThermo::*F)(const scalar) const, + scalar (specieThermo::*dFdT)(const scalar) const, + scalar (specieThermo::*limit)(const scalar) const ) const { scalar Test = T0; @@ -62,9 +62,11 @@ inline Foam::scalar Foam::specieThermo::T { FatalErrorIn ( - "specieThermo::T(scalar f, scalar T0, " - "scalar (specieThermo::*F)(const scalar) const, " - "scalar (specieThermo::*dFdT)(const scalar) const" + "specieThermo::T(scalar f, scalar T0, " + "scalar (specieThermo::*F)" + "(const scalar) const, " + "scalar (specieThermo::*dFdT)" + "(const scalar) const" ") const" ) << "Maximum number of iterations exceeded" << abort(FatalError); @@ -78,8 +80,8 @@ inline Foam::scalar Foam::specieThermo::T // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template -inline Foam::specieThermo::specieThermo +template class Type> +inline Foam::specieThermo::specieThermo ( const word& name, const specieThermo& st @@ -91,114 +93,201 @@ inline Foam::specieThermo::specieThermo // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -inline Foam::scalar Foam::specieThermo::cv(const scalar T) const +template class Type> +inline Foam::word +Foam::specieThermo::heName() +{ + return Type >::name(); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::he(const scalar T) const +{ + return Type >::he(*this, T); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::cv(const scalar T) const { return this->cp(T) - this->RR; } -template -inline Foam::scalar Foam::specieThermo::gamma(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::cpv(const scalar T) const +{ + return Type >::cpv(*this, T); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::gamma(const scalar T) const { scalar CP = this->cp(T); return CP/(CP - this->RR); } -template -inline Foam::scalar Foam::specieThermo::e(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::cpBycpv(const scalar T) const { - return this->h(T) - this->RR*(T - this->Tstd); + return Type >::cpBycpv(*this, T); } -template -inline Foam::scalar Foam::specieThermo::es(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::es(const scalar T) const { return this->hs(T) - this->RR*(T - this->Tstd); } -template -inline Foam::scalar Foam::specieThermo::g(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::ea(const scalar T) const { - return this->h(T) - T*this->s(T); + return this->ha(T) - this->RR*(T - this->Tstd); } -template -inline Foam::scalar Foam::specieThermo::a(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::g(const scalar T) const { - return this->e(T) - T*this->s(T); + return this->ha(T) - T*this->s(T); } -template -inline Foam::scalar Foam::specieThermo::Cp(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::a(const scalar T) const +{ + return this->ea(T) - T*this->s(T); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::Cpv(const scalar T) const +{ + return this->cpv(T)/this->W(); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::Cp(const scalar T) const { return this->cp(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::Cv(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::Cv(const scalar T) const { return this->cv(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::H(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::HE(const scalar T) const +{ + return Type >::HE(*this, T); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::H(const scalar T) const { return this->h(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::Hs(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::Hs(const scalar T) const { return this->hs(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::Hc() const +template class Type> +inline Foam::scalar +Foam::specieThermo::Hc() const { return this->hc()/this->W(); } -template -inline Foam::scalar Foam::specieThermo::S(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::Ha(const scalar T) const +{ + return this->ha(T)/this->W(); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::S(const scalar T) const { return this->s(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::E(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::E(const scalar T) const { return this->e(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::G(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::Es(const scalar T) const +{ + return this->es(T)/this->W(); +} + +template class Type> +inline Foam::scalar +Foam::specieThermo::Ea(const scalar T) const +{ + return this->ea(T)/this->W(); +} + + +template class Type> +inline Foam::scalar +Foam::specieThermo::G(const scalar T) const { return this->g(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::A(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::A(const scalar T) const { return this->a(T)/this->W(); } -template -inline Foam::scalar Foam::specieThermo::K(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::K(const scalar T) const { scalar arg = -this->nMoles()*this->g(T)/(this->RR*T); @@ -213,15 +302,17 @@ inline Foam::scalar Foam::specieThermo::K(const scalar T) const } -template -inline Foam::scalar Foam::specieThermo::Kp(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::Kp(const scalar T) const { return K(T); } -template -inline Foam::scalar Foam::specieThermo::Kc(const scalar T) const +template class Type> +inline Foam::scalar +Foam::specieThermo::Kc(const scalar T) const { if (equal(this->nMoles(), SMALL)) { @@ -234,8 +325,8 @@ inline Foam::scalar Foam::specieThermo::Kc(const scalar T) const } -template -inline Foam::scalar Foam::specieThermo::Kx +template class Type> +inline Foam::scalar Foam::specieThermo::Kx ( const scalar T, const scalar p @@ -252,8 +343,8 @@ inline Foam::scalar Foam::specieThermo::Kx } -template -inline Foam::scalar Foam::specieThermo::Kn +template class Type> +inline Foam::scalar Foam::specieThermo::Kn ( const scalar T, const scalar p, @@ -271,26 +362,19 @@ inline Foam::scalar Foam::specieThermo::Kn } -template -inline Foam::scalar Foam::specieThermo::TH +template class Type> +inline Foam::scalar Foam::specieThermo::THE ( - const scalar h, + const scalar he, const scalar T0 ) const { - return T - ( - h, - T0, - &specieThermo::H, - &specieThermo::Cp, - &specieThermo::limit - ); + return Type >::THE(*this, he, T0); } -template -inline Foam::scalar Foam::specieThermo::THs +template class Type> +inline Foam::scalar Foam::specieThermo::THs ( const scalar hs, const scalar T0 @@ -300,15 +384,51 @@ inline Foam::scalar Foam::specieThermo::THs ( hs, T0, - &specieThermo::Hs, - &specieThermo::Cp, - &specieThermo::limit + &specieThermo::Hs, + &specieThermo::Cp, + &specieThermo::limit ); } -template -inline Foam::scalar Foam::specieThermo::TE +template class Type> +inline Foam::scalar Foam::specieThermo::THa +( + const scalar ht, + const scalar T0 +) const +{ + return T + ( + ht, + T0, + &specieThermo::Ha, + &specieThermo::Cp, + &specieThermo::limit + ); +} + + +template class Type> +inline Foam::scalar Foam::specieThermo::TEs +( + const scalar es, + const scalar T0 +) const +{ + return T + ( + es, + T0, + &specieThermo::Es, + &specieThermo::Cv, + &specieThermo::limit + ); +} + + +template class Type> +inline Foam::scalar Foam::specieThermo::TEa ( const scalar e, const scalar T0 @@ -316,39 +436,39 @@ inline Foam::scalar Foam::specieThermo::TE { return T ( - e, + ea, T0, - &specieThermo::E, - &specieThermo::Cv, - &specieThermo::limit + &specieThermo::Ea, + &specieThermo::Cv, + &specieThermo::limit ); } // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template -inline void Foam::specieThermo::operator+= +template class Type> +inline void Foam::specieThermo::operator+= ( - const specieThermo& st + const specieThermo& st ) { Thermo::operator+=(st); } -template -inline void Foam::specieThermo::operator-= +template class Type> +inline void Foam::specieThermo::operator-= ( - const specieThermo& st + const specieThermo& st ) { Thermo::operator-=(st); } -template -inline void Foam::specieThermo::operator*=(const scalar s) +template class Type> +inline void Foam::specieThermo::operator*=(const scalar s) { Thermo::operator*=(s); } @@ -356,53 +476,53 @@ inline void Foam::specieThermo::operator*=(const scalar s) // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // -template -inline Foam::specieThermo Foam::operator+ +template class Type> +inline Foam::specieThermo Foam::operator+ ( - const specieThermo& st1, - const specieThermo& st2 + const specieThermo& st1, + const specieThermo& st2 ) { - return specieThermo + return specieThermo ( static_cast(st1) + static_cast(st2) ); } -template -inline Foam::specieThermo Foam::operator- +template class Type> +inline Foam::specieThermo Foam::operator- ( - const specieThermo& st1, - const specieThermo& st2 + const specieThermo& st1, + const specieThermo& st2 ) { - return specieThermo + return specieThermo ( static_cast(st1) - static_cast(st2) ); } -template -inline Foam::specieThermo Foam::operator* +template class Type> +inline Foam::specieThermo Foam::operator* ( const scalar s, - const specieThermo& st + const specieThermo& st ) { - return specieThermo + return specieThermo ( s*static_cast(st) ); } -template -inline Foam::specieThermo Foam::operator== +template class Type> +inline Foam::specieThermo Foam::operator== ( - const specieThermo& st1, - const specieThermo& st2 + const specieThermo& st1, + const specieThermo& st2 ) { return st2 - st1; diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 2259a83365..aab02fb827 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -134,10 +134,7 @@ public: //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; - //- Thermal diffusivity for internal energy [kg/ms] - inline scalar alphae(const scalar T) const; - - //- Thermal diffusivity for enthalpy [kg/ms] + //- Thermal diffusivity of enthalpy [kg/ms] inline scalar alphah(const scalar T) const; // Species diffusivity diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index e6ae9bce1f..a087429121 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -68,13 +68,6 @@ inline Foam::scalar Foam::constTransport::kappa(const scalar T) const } -template -inline Foam::scalar Foam::constTransport::alphae(const scalar T) const -{ - return this->kappa(T)/this->Cv(T); -} - - template inline Foam::scalar Foam::constTransport::alphah(const scalar T) const { diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index 67c71b1b93..a4ffbde2b7 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -148,10 +148,7 @@ public: //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; - //- Thermal diffusivity for internal energy [kg/ms] - inline scalar alphae(const scalar T) const; - - //- Thermal diffusivity for enthalpy [kg/ms] + //- Thermal diffusivity of enthalpy [kg/ms] inline scalar alphah(const scalar T) const; // Species diffusivity diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index 8d0d4f4e61..57f546bd0d 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -121,16 +121,6 @@ inline Foam::scalar Foam::polynomialTransport::kappa } -template -inline Foam::scalar Foam::polynomialTransport::alphae -( - const scalar T -) const -{ - return kappa(T)/this->Cv(T); -} - - template inline Foam::scalar Foam::polynomialTransport::alphah ( diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C b/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C deleted file mode 100644 index 7a5c921c94..0000000000 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.C +++ /dev/null @@ -1,71 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 . - - function for nu. All other properties are derived from - this primitive function. - -\*---------------------------------------------------------------------------*/ - -#include "speciesTransport.H" -#include "IOstreams.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::speciesTransport::speciesTransport(Istream& is) -: - janafThermo(is) -{ - is.check("speciesTransport::speciesTransport(Istream& is)"); -} - - -Foam::speciesTransport::speciesTransport(const dictionary& dict) -: - janafThermo(dict) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::speciesTransport::write(Ostream& os) const -{ - os << this->name() << endl; - os << token::BEGIN_BLOCK << incrIndent << nl; - janafThermo::write(os); - os << decrIndent << token::END_BLOCK << nl; -} - - -// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // - -Foam::Ostream& Foam::operator<<(Ostream& os, const speciesTransport& sTranport) -{ - os << (const janafThermo&)sTranport; - - os.check("Ostream& operator<<(Ostream&, const speciesTransport)"); - - return os; -} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H b/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H deleted file mode 100644 index 5b0ddf9041..0000000000 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransportI.H +++ /dev/null @@ -1,34 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 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 . - -\*---------------------------------------------------------------------------*/ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -inline Foam::speciesTransport::speciesTransport(const janafThermo& sThermo) -: - janafThermo(sThermo) -{} - - -// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C index e56f61959e..55f6b48ab1 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C @@ -53,7 +53,7 @@ Foam::sutherlandTransport::sutherlandTransport(const dictionary& dict) template void Foam::sutherlandTransport::write(Ostream& os) const { - os << this->name() << endl; + os << this->specie::name() << endl; os << token::BEGIN_BLOCK << incrIndent << nl; Thermo::write(os); diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 99b943b823..bb45f6bb13 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -162,10 +162,7 @@ public: //- Thermal conductivity [W/mK] inline scalar kappa(const scalar T) const; - //- Thermal diffusivity for internal energy [kg/ms] - inline scalar alphae(const scalar T) const; - - //- Thermal diffusivity for enthalpy [kg/ms] + //- Thermal diffusivity of enthalpy [kg/ms] inline scalar alphah(const scalar T) const; // Species diffusivity diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 65e0a227bd..2a718682ab 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -146,16 +146,6 @@ inline Foam::scalar Foam::sutherlandTransport::kappa } -template -inline Foam::scalar Foam::sutherlandTransport::alphae -( - const scalar T -) const -{ - return mu(T)*(1.32 + 1.77*this->R()/this->Cv(T)); -} - - template inline Foam::scalar Foam::sutherlandTransport::alphah ( diff --git a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C index 509c7d70cc..b50d494a36 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalModel/fixedTemperature/fixedTemperature.C @@ -89,13 +89,13 @@ void Foam::porousMedia::fixedTemperature::addEnthalpySource forAll(zones, zoneI) { const labelList& cells = mesh.cellZones()[zones[zoneI]]; - tmp h = thermo.h(T, cells); + tmp he = thermo.he(T, cells); forAll(cells, i) { hDiag[cells[i]] += rate*V[cells[i]]*rho[cells[i]]; hSource[cells[i]] += - rate*V[cells[i]]*rho[cells[i]]*h()[cells[i]]; + rate*V[cells[i]]*rho[cells[i]]*he()[cells[i]]; } } } diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 73515d920c..152857e045 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -206,21 +206,30 @@ public: //- Return the SGS turbulent thermal diffusivity virtual tmp alphaSgs() const = 0; + //- Return the effective turbulent temperature diffusivity + virtual tmp kappaEff() const + { + return thermo().kappaEff(alphaSgs()); + } + + //- Return the effective turbulent temperature diffusivity for a patch + virtual tmp kappaEff(const label patchI) const + { + return + thermo().kappaEff(alphaSgs()().boundaryField()[patchI], patchI); + } + //- Return the effective thermal diffusivity virtual tmp alphaEff() const { - return tmp - ( - new volScalarField("alphaEff", alphaSgs() + alpha()) - ); + return thermo().alphaEff(alphaSgs()); } //- Return the effective turbulence thermal diffusivity for a patch virtual tmp alphaEff(const label patchI) const { return - alphaSgs()().boundaryField()[patchI] - + alpha().boundaryField()[patchI]; + thermo().alphaEff(alphaSgs()().boundaryField()[patchI], patchI); } //- Return the sub-grid stress tensor. diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 752caac4e6..e316ac28f0 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -116,7 +116,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(0.85), kappa_(0.41), E_(9.8), - hsName_("hs") + heName_("he") { checkType(); @@ -136,7 +136,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(ptf.Prt_), kappa_(ptf.kappa_), E_(ptf.E_), - hsName_(ptf.hsName_) + heName_(ptf.heName_) {} @@ -153,7 +153,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(dict.lookupOrDefault("Prt", 0.85)), kappa_(dict.lookupOrDefault("kappa", 0.41)), E_(dict.lookupOrDefault("E", 9.8)), - hsName_(dict.lookupOrDefault("hs", "hs")) + heName_(dict.lookupOrDefault("he", "he")) { checkType(); } @@ -169,7 +169,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(awfpsf.Prt_), kappa_(awfpsf.kappa_), E_(awfpsf.E_), - hsName_(awfpsf.hsName_) + heName_(awfpsf.heName_) { checkType(); } @@ -186,7 +186,7 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField Prt_(awfpsf.Prt_), kappa_(awfpsf.kappa_), E_(awfpsf.E_), - hsName_(awfpsf.hsName_) + heName_(awfpsf.heName_) { checkType(); } @@ -216,7 +216,7 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::evaluate const scalarField& rhow = lesModel.rho().boundaryField()[patchI]; const fvPatchScalarField& hw = - patch().lookupPatchField(hsName_); + patch().lookupPatchField(heName_); const scalarField& ry = patch().deltaCoeffs(); @@ -319,7 +319,7 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; - os.writeKeyword("hs") << hsName_ << token::END_STATEMENT << nl; + os.writeKeyword("he") << heName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H index 91a43d06c2..36ac84da60 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H @@ -67,7 +67,7 @@ class alphaSgsJayatillekeWallFunctionFvPatchScalarField scalar E_; //- Name of (sensible/total) enthalpy field - word hsName_; + word heName_; // Solution parameters diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index bc3b716c62..e1420667d8 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -238,21 +238,30 @@ public: ); } + //- Return the effective turbulent temperature diffusivity + virtual tmp kappaEff() const + { + return thermo().kappaEff(alphat()); + } + + //- Return the effective turbulent temperature diffusivity for a patch + virtual tmp kappaEff(const label patchI) const + { + return + thermo().kappaEff(alphat()().boundaryField()[patchI], patchI); + } + //- Return the effective turbulent thermal diffusivity virtual tmp alphaEff() const { - return tmp - ( - new volScalarField("alphaEff", alphat() + alpha()) - ); + return thermo().alphaEff(alphat()); } //- Return the effective turbulent thermal diffusivity for a patch virtual tmp alphaEff(const label patchI) const { return - alphat()().boundaryField()[patchI] - + alpha().boundaryField()[patchI]; + thermo().alphaEff(alphat()().boundaryField()[patchI], patchI); } //- Return yPlus for the given patch diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C index 958abf0b77..92498e9299 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C @@ -108,7 +108,7 @@ void htcConvFvPatchScalarField::updateCoeffs() const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField alphaEffw = rasModel.alphaEff()().boundaryField()[patchI]; + const scalarField alphaEffw = rasModel.alphaEff(patchI); const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const vectorField& Uc = rasModel.U(); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index de9ae883a6..4b8eea7a3c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -220,11 +220,14 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() const scalarField magGradUw(mag(Uw.snGrad())); const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; - const fvPatchScalarField& hw = - rasModel.thermo().h().boundaryField()[patchI]; + const fvPatchScalarField& hew = + rasModel.thermo().he().boundaryField()[patchI]; // Heat flux [W/m2] - lagging alphatw - const scalarField qDot((alphaw + alphatw)*hw.snGrad()); + const scalarField qDot + ( + rasModel.thermo().alphaEff(alphatw, patchI)*hew.snGrad() + ); // Populate boundary values forAll(alphatw, faceI) diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index 44e43d3c67..150d11bff4 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C @@ -99,8 +99,7 @@ Foam::tmp Foam::temperatureCoupledBase::kappa ); return - model.alphaEff()().boundaryField()[patch_.index()] - *model.thermo().Cp(Tp, patch_.index()); + model.kappaEff(patch_.index()); } break; diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C index d9e3e6d40b..4601528d4d 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C @@ -222,10 +222,10 @@ void temperatureThermoBaffle1DFvPatchScalarField::updateCoeffs() // local properties const scalarField alphaw = model.alphaEff()().boundaryField()[patchI]; - const fvPatchScalarField& hw = - model.thermo().h().boundaryField()[patchI]; + const fvPatchScalarField& hew = + model.thermo().he().boundaryField()[patchI]; - const scalarField qDot(alphaw*hw.snGrad()); + const scalarField qDot(alphaw*hew.snGrad()); const scalarField& Tp = patch().template lookupPatchField(TName_); @@ -245,7 +245,7 @@ void temperatureThermoBaffle1DFvPatchScalarField::updateCoeffs() mpp.map().distribute(nbrAlphaw); const fvPatchScalarField& nbrHw = - model.thermo().h().boundaryField()[nbrPatchI]; + model.thermo().he().boundaryField()[nbrPatchI]; scalarField nbrQDot ( diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index 25f3389ed0..b7eeadbd48 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -139,9 +139,9 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::rmap mixedFvPatchField::rmap(ptf, addr); } + void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() { - if (this->updated()) { return; @@ -158,7 +158,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() const fvsPatchField& phip = patch().lookupPatchField(phiName_); - const scalarField alphap = turbulence.alphaEff()().boundaryField()[patchI]; + const scalarField alphap = turbulence.alphaEff(patchI); refValue() = 1.0; refGrad() = 0.0; diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index f7cb6bec8f..017d342241 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -103,6 +103,27 @@ public: //- Return the turbulence thermal diffusivity, i.e. 0 for laminar flow virtual tmp alphat() const; + //- Return the effective turbulent temperature diffusivity, + // i.e. the laminar thermal diffusivity + virtual tmp kappaEff() const + { + return tmp + ( + new volScalarField + ( + "kappaEff", + thermo().kappa() + ) + ); + } + + //- Return the effective turbulent temperature diffusivity for a patch, + // i.e. the laminar thermal diffusivity + virtual tmp kappaEff(const label patchI) const + { + return thermo().kappa(patchI); + } + //- Return the effective turbulent thermal diffusivity, // i.e. the laminar thermal diffusivity virtual tmp alphaEff() const diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index afb8312ee7..f5e2cc9019 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -199,6 +199,12 @@ public: //- Return the turbulence thermal diffusivity virtual tmp alphat() const = 0; + //- Return the effective turbulence temperature diffusivity + virtual tmp kappaEff() const = 0; + + //- Return the effective turbulence temperature diffusivity for a patch + virtual tmp kappaEff(const label patchI) const = 0; + //- Return the effective turbulence thermal diffusivity virtual tmp alphaEff() const = 0; diff --git a/tutorials/Alltest b/tutorials/Alltest index 63a70167c6..7a76efb4f0 100755 --- a/tutorials/Alltest +++ b/tutorials/Alltest @@ -88,13 +88,13 @@ gradSchemes { default Gauss linear; } divSchemes { default Gauss linear; - div(phi,fu_ft_h) Gauss multivariateSelection + div(phi,fu_ft_ha) Gauss multivariateSelection { fu upwind; ft upwind; h upwind; }; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { fu upwind; ft upwind; diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties index 95c7a2c91d..54e0f6603c 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType heheuReactionThermo,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.5776; diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes index e56807d8a1..2d46eb050d 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSchemes @@ -39,13 +39,13 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear 1; div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { ft limitedLinear01 1; b limitedLinear01 1; Xi limitedLinear 1; - h limitedLinear 1; - hu limitedLinear 1; + ha limitedLinear 1; + hau limitedLinear 1; }; div((Su*grad(b))) Gauss linear; @@ -63,8 +63,8 @@ laplacianSchemes laplacian((rho*inv((((1)*A(U))+tDragDcu))),p) Gauss linear limited 0.333; laplacian(Db,b) Gauss linear limited 0.333; laplacian(Db,ft) Gauss linear limited 0.333; - laplacian(Db,h) Gauss linear limited 0.333; - laplacian(Db,hu) Gauss linear limited 0.333; + laplacian(Db,ha) Gauss linear limited 0.333; + laplacian(Db,hau) Gauss linear limited 0.333; } interpolationSchemes diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution index 852f63cd31..58314bd626 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/system/fvSolution @@ -47,7 +47,7 @@ solvers relTol 0; }; - "(b|Xi|ft|h|hu|k|epsilon)" + "(b|Xi|ft|ha|hau|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0.1; } - "(b|Xi|ft|h|hu|k|epsilon)Final" + "(b|Xi|ft|ha|hau|k|epsilon)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs index 51a2df3911..16b4384a8e 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs @@ -33,14 +33,14 @@ boundaryField upperWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } lowerWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties index ac0c126b4a..7c51f8a404 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType heheuReactionThermo,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes index 303b193a01..52ad2a1abd 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes @@ -34,12 +34,12 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear01 0.1; div(phiXi,Su) Gauss limitedLinear01 0.1; div(phiSt,b) Gauss limitedLinear01 0.1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - ft limitedLinear01 0.1; - b limitedLinear01 0.1; - h limitedLinear 0.1; - hu limitedLinear 0.1; + ft limitedLinear01 0.1; + b limitedLinear01 0.1; + ha limitedLinear 0.1; + hau limitedLinear 0.1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -56,8 +56,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,b) Gauss linear corrected; laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(alphaEff,hu) Gauss linear corrected; + laplacian(alphaEff,ha) Gauss linear corrected; + laplacian(alphaEff,hau) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution index 951ae7bf9f..9496a2a249 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|b|Su|Xi|h|hu|k)" + "(U|b|Su|Xi|ha|hau|k)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|b|Su|Xi|h|hu|k)Final" + "(U|b|Su|Xi|ha|hau|k)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs index c84a947e44..1a913f8b78 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs @@ -32,13 +32,13 @@ boundaryField upperWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } lowerWall { type alphaSgsJayatillekeWallFunction; - hs h; + he ha; value uniform 0; } front diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties index ac0c126b4a..7c51f8a404 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType heheuReactionThermo,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes index 303b193a01..52ad2a1abd 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes @@ -34,12 +34,12 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear01 0.1; div(phiXi,Su) Gauss limitedLinear01 0.1; div(phiSt,b) Gauss limitedLinear01 0.1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - ft limitedLinear01 0.1; - b limitedLinear01 0.1; - h limitedLinear 0.1; - hu limitedLinear 0.1; + ft limitedLinear01 0.1; + b limitedLinear01 0.1; + ha limitedLinear 0.1; + hau limitedLinear 0.1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -56,8 +56,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,b) Gauss linear corrected; laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(alphaEff,hu) Gauss linear corrected; + laplacian(alphaEff,ha) Gauss linear corrected; + laplacian(alphaEff,hau) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution index bacb583b37..a7597acd35 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|b|Su|Xi|h|hu|k)" + "(U|b|Su|Xi|ha|hau|k)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|b|Su|Xi|h|hu|k)Final" + "(U|b|Su|Xi|ha|hau|k)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties index b8f4172d71..0d6480a485 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType heheuReactionThermo,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes index 39ac527206..07e007d275 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSchemes @@ -38,13 +38,13 @@ divSchemes div(phiXi,Xi) Gauss limitedLinear 1; div(phiXi,Su) Gauss limitedLinear 1; div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - fu limitedLinear01 1; - ft limitedLinear01 1; - b limitedLinear01 1; - h limitedLinear 1; - hu limitedLinear 1; + fu limitedLinear01 1; + ft limitedLinear01 1; + b limitedLinear01 1; + ha limitedLinear 1; + hau limitedLinear 1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -62,8 +62,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian(alphaEff,b) Gauss linear corrected; laplacian(alphaEff,ft) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(alphaEff,hu) Gauss linear corrected; + laplacian(alphaEff,ha) Gauss linear corrected; + laplacian(alphaEff,hau) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution index b2af0d7b7e..706044c8b1 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|b|Su|Xi|h|hu|k|epsilon)" + "(U|b|Su|Xi|ha|hau|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|b|Su|Xi|h|hu|k|epsilon)Final" + "(U|b|Su|Xi|ha|hau|k|epsilon)Final" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties index db2a106a8a..3c5e475229 100644 --- a/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/gri/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties index db2a106a8a..3c5e475229 100644 --- a/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/h2/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties index db2a106a8a..3c5e475229 100644 --- a/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/ic8h18/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties b/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties index db2a106a8a..3c5e475229 100644 --- a/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties +++ b/tutorials/combustion/chemFoam/nc7h16/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties b/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties index 55513dde32..531e298a20 100644 --- a/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties +++ b/tutorials/combustion/engineFoam/kivaTest/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType heheuReactionThermo,absoluteEnthalpy>>>>; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.0336; diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes b/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes index 62b296f3ed..3c1bc03aee 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSchemes @@ -38,13 +38,13 @@ divSchemes div(phiXi,Xi) Gauss upwind; div(phiXi,Su) Gauss upwind; div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection + div(phi,ft_b_ha_hau) Gauss multivariateSelection { - fu limitedLinear01 1; - ft limitedLinear01 1; - b limitedLinear01 1; - h limitedLinear 1; - hu limitedLinear 1; + fu limitedLinear01 1; + ft limitedLinear01 1; + b limitedLinear01 1; + ha limitedLinear 1; + hau limitedLinear 1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; @@ -62,8 +62,8 @@ laplacianSchemes laplacian((rho*(1|A(U))),p) Gauss linear limited 0.5; laplacian(alphaEff,b) Gauss linear limited 0.5; laplacian(muEff,ft) Gauss linear limited 0.5; - laplacian(alphaEff,h) Gauss linear limited 0.5; - laplacian(alphaEff,hu) Gauss linear limited 0.5; + laplacian(alphaEff,ha) Gauss linear limited 0.5; + laplacian(alphaEff,hau) Gauss linear limited 0.5; laplacian(alphaEff,ft) Gauss linear limited 0.5; } diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution index ac60660881..f020df3d4e 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution @@ -47,14 +47,14 @@ solvers relTol 0; } - "(U|Xi|hu|ft|b|h|k|epsilon)" + "(U|Xi|hau|ft|b|ha|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } - "(U|ft|Xi|hu|b|h|k|epsilon)Final" + "(U|ft|Xi|hau|b|ha|k|epsilon)Final" { $U; tolerance 1e-05; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties index dab393728a..fb38fc764b 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties index 6372ed8ac7..633ba62491 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/thermophysicalProperties @@ -16,7 +16,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; inertSpecie N2; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes index 2883377ba9..9911bbedb3 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSchemes @@ -30,14 +30,14 @@ divSchemes default none; div(phi,U) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div(phi,Yi_hs) Gauss multivariateSelection + div(phi,Yi_h) Gauss multivariateSelection { O2 linearUpwind grad(O2); N2 linearUpwind grad(N2); C3H8 linearUpwind grad(C3H8); H2O linearUpwind grad(H2O); CO2 linearUpwind grad(CO2); - hs linearUpwind grad(hs); + h linearUpwind grad(h); }; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,K) Gauss limitedLinear 1; @@ -50,7 +50,7 @@ laplacianSchemes default Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; - laplacian(alphaEff,hs) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; laplacian((((rho*(1|A(U)))*rho)*gh)) Gauss linear corrected; laplacian(interpolate((rho*(1|A(U)))),p) Gauss linear corrected; laplacian(gammaRad,G) Gauss linear corrected; diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution index 859d4a6dd9..3a3bd03c73 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/fvSolution @@ -71,7 +71,7 @@ solvers }; - "(hs|hsFinal|Yi)" + "(h|hFinal|Yi)" { solver PBiCG; preconditioner DILU; @@ -117,7 +117,7 @@ relaxationFactors equations { "(U|k).*" 1; - "(C3H8|O2|H2O|CO2|hs).*" 1; + "(C3H8|O2|H2O|CO2|h).*" 1; } } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes index dbd1f38ac2..a7f802048f 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes @@ -32,7 +32,7 @@ divSchemes laplacianSchemes { default none; - laplacian(K,T) Gauss linear uncorrected; + laplacian(kappa,T) Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties index dab393728a..fb38fc764b 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties index dcb95a13d1..7e40fa1835 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; inertSpecie N2; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes index 775f4cb396..efa1275f2b 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSchemes @@ -30,14 +30,14 @@ divSchemes default none; div(phi,U) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1; - div(phi,Yi_hs) Gauss multivariateSelection + div(phi,Yi_h) Gauss multivariateSelection { O2 limitedLinear01 1; CH4 limitedLinear01 1; N2 limitedLinear01 1; H2O limitedLinear01 1; CO2 limitedLinear01 1; - hs limitedLinear 1; + h limitedLinear 1; }; div((muEff*dev2(T(grad(U))))) Gauss linear; div(phi,omega) Gauss limitedLinear 1; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution index 5685f010f1..d7bebcf0bb 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/system/fvSolution @@ -53,7 +53,7 @@ solvers }; - "(U|Yi|k|hs|omega)" + "(U|Yi|k|h|omega)" { solver PBiCG; preconditioner DILU; @@ -62,7 +62,7 @@ solvers nSweeps 1; }; - "(U|Yi|k|hs|omega)Final" + "(U|Yi|k|h|omega)Final" { $U; tolerance 1e-7; @@ -108,7 +108,7 @@ relaxationFactors equations { "(U|k).*" 1; - "(C3H8|O2|H2O|CO2|hs).*" 0.9; + "(C3H8|O2|H2O|CO2|h).*" 0.9; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties index dab393728a..fb38fc764b 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties index dcb95a13d1..7e40fa1835 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; inertSpecie N2; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes index 0a76845c6f..97a9f76e72 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSchemes @@ -31,14 +31,14 @@ divSchemes div(phi,U) Gauss linear; div(phi,K) Gauss linear; div(phi,k) Gauss limitedLinear 0.1; - div(phi,Yi_hs) Gauss multivariateSelection + div(phi,Yi_h) Gauss multivariateSelection { O2 limitedLinear01 1; CH4 limitedLinear01 1; N2 limitedLinear01 1; H2O limitedLinear01 1; CO2 limitedLinear01 1; - hs limitedLinear 1; + h limitedLinear 1; }; div((muEff*dev2(T(grad(U))))) Gauss linear; div(Ji,Ii_h) Gauss upwind; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution index 3835a468dd..6c64887a86 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/system/fvSolution @@ -45,7 +45,7 @@ solvers }; - "(U|Yi|k|hs)" + "(U|Yi|k|h)" { solver PBiCG; preconditioner DILU; @@ -54,7 +54,7 @@ solvers nSweeps 1; }; - "(U|Yi|k|hs)Final" + "(U|Yi|k|h)Final" { $U; tolerance 1e-8; @@ -100,7 +100,7 @@ relaxationFactors equations { "(U|k).*" 1; - "(CH4|O2|H2O|CO2|hs).*" 0.9; + "(CH4|O2|H2O|CO2|h).*" 0.9; } } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties index 6f27fa1514..397c9bec8d 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; inertSpecie N2; diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution index 2f922268d3..fe09f9434a 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/system/fvSolution @@ -47,7 +47,7 @@ solvers relTol 0.0; } - "(U|hs||k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0.1; } - "(U|hs||k|epsilon)Final" + "(U|h|k|epsilon)Final" { solver PBiCG; preconditioner DILU; @@ -65,7 +65,7 @@ solvers Yi { - $hsFinal; + $hFinal; } } diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties index 2ff1fabbda..3d2695dfcd 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties index 1e8492f320..89b923d01f 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties index f0ecbfd8e6..c61c83d6bd 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; // Note: these are the properties for a "normalised" inviscid gas // for which the speed of sound is 1 m/s at a temperature of 1K diff --git a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties index a4e71b7001..a228ce4a4f 100644 --- a/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/obliqueShock/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties index 661aa6c085..7518beeead 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/shockTube/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties index a4e71b7001..a228ce4a4f 100644 --- a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties index 22ef307073..b2540e3d91 100644 --- a/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties index d6d597d433..fa673b9a4d 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties index 6cb4a48d62..58aeb4d4fd 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties index d6d597d433..fa673b9a4d 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties index d6d597d433..fa673b9a4d 100644 --- a/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPorousMRFLTSPimpleFoam/angledDuct/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties index f68807ca39..a95c522360 100644 --- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties index cbe2156297..dd688c1b3f 100644 --- a/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoPorousMRFSimpleFoam/angledDuctImplicit/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties index cbe2156297..dd688c1b3f 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties index f0ecbfd8e6..c61c83d6bd 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; // Note: these are the properties for a "normalised" inviscid gas // for which the speed of sound is 1 m/s at a temperature of 1K diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties index 1a3dddb3d7..76fd63c9b7 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties index 75f2432290..b302f7e040 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties index 75f2432290..b302f7e040 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/ras/prism/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType hePsiThermo,sensibleInternalEnergy>>>>; mixture { diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties index 615765276a..05bbb78407 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties index 84be4f4c75..75386e7394 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties index 84be4f4c75..75386e7394 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties index 678ae10f10..521cf3b421 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties index 678ae10f10..521cf3b421 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties index 678ae10f10..521cf3b421 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hPsiThermo>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties index a5d6b47a1c..75cf8a4016 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties index 5a263cadcd..18f002136a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties index 8e5932c033..128f32aaf0 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/bottomWater/thermophysicalProperties @@ -14,8 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType -hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties index 5a263cadcd..18f002136a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties index a5d6b47a1c..75cf8a4016 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties index 5a263cadcd..18f002136a 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties index a5d6b47a1c..75cf8a4016 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties index 5a263cadcd..18f002136a 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties index a5d6b47a1c..75cf8a4016 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties index 5a263cadcd..18f002136a 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hRhoThermo>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; mixture { diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties index d681095298..e7748f52bc 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo>; +thermoType heRhoReactionThermo>; inertSpecie N2; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution index e2d4fcfdee..5582aee049 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution +++ b/tutorials/lagrangian/LTSReactingParcelFoam/counterFlowFlame2D/system/fvSolution @@ -59,7 +59,7 @@ solvers relTol 0; }; - "(U|Yi|hs|k|epsilon)" + "(U|Yi|h|k|epsilon)" { solver smoothSolver; smoother GaussSeidel; @@ -67,7 +67,7 @@ solvers relTol 0.1; } - "(U|Yi|hs|k|epsilon)Final" + "(U|Yi|h|k|epsilon)Final" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties index 8ee12eae98..17a27436a7 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties @@ -35,7 +35,7 @@ solution rho semiImplicit 1; U semiImplicit 1; Yi semiImplicit 1; - hs semiImplicit 1; + h semiImplicit 1; } } diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties index 52c55104b8..5d715a7857 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo>; +thermoType heRhoReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes index f0c610dcbf..5b1a94bbec 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution index 82179b044e..1bdc5b6260 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/fvSolution @@ -52,7 +52,7 @@ solvers tolerance 1e-4; } - "(U|Yi|hs|k|omega|.*Final)" + "(U|Yi|h|k|omega|.*Final)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties index 60fa4fb298..50e652d6b1 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/coalCloud1Properties @@ -26,10 +26,10 @@ solution { schemes { - rho explicit 1; - U explicit 1; - Yi explicit 1; - hs explicit 1; + rho semiImplicit 1; + U semiImplicit 1; + Yi semiImplicit 1; + h semiImplicit 1; } } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties index e35910a540..0ae0ea6ada 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/limestoneCloud1Properties @@ -27,7 +27,7 @@ solution schemes { U explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties index 31175f402b..bcbbcceba0 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/sourcesProperties @@ -29,7 +29,7 @@ source1 volumeMode absolute; injectionRate { - hs 12000; + h 12000; } } } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties index 63e7e7175b..1c62457dd6 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes index 99d8f6e1c3..1dcd78d42c 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; laplacian(DREff,R) Gauss linear orthogonal; laplacian((rho*(1|A(U))),p) Gauss linear orthogonal; - laplacian(alphaEff,hs) Gauss linear orthogonal; + laplacian(alphaEff,h) Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution index a6992031b3..8294bbda04 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution @@ -54,7 +54,7 @@ solvers relTol 0; } - "(U|hs|R|k|epsilon)" + "(U|h|R|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -62,7 +62,7 @@ solvers relTol 0.1; } - "(U|hs|R|k|epsilon)Final" + "(U|h|R|k|epsilon)Final" { $U; tolerance 1e-05; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties index 4823654b9a..6c3b76d656 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties index ab2601c34c..7f40e5d032 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/sourcesProperties @@ -79,7 +79,7 @@ energySource1 volumeMode absolute; injectionRate { - hs 10; + h 10; } } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties index f5879b64a4..402f445906 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo>; +thermoType heRhoReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes index f2abd9112f..dc13503bc6 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(alphaEff,hs) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution index 672f614cf5..2baec5e7c3 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|epsilon)Final" + "(U|h|k|epsilon)Final" { $U; tolerance 1e-06; @@ -70,7 +70,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties index 7356b7134d..26d5e517be 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties index ed3725758e..70ff6cdd50 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo>; +thermoType heRhoReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes index f7d8cb9e59..e7d730d2f8 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss upwind; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution index b4db5d1593..979cac593c 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|epsilon)Final" + "(U|h|k|epsilon)Final" { $U; tolerance 1e-05; @@ -71,7 +71,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties index aea506a90d..a4bf2e07e7 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties index 52c55104b8..5d715a7857 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsRhoMixtureThermo>; +thermoType heRhoReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes index 15fb830b80..c32fa27d27 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSchemes @@ -34,7 +34,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss upwind; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution index 5b2f1ca871..8e76e79670 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|omega)" + "(U|h|k|omega)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|omega)Final" + "(U|h|k|omega)Final" { $U; tolerance 1e-06; @@ -71,7 +71,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties index 36786661bf..83033b60de 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties index a12807251c..5938ce87a3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes index 57fb0a2e12..560f65db18 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution index 5cc362f928..b05dd58db6 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs)Final" + "(U|h)Final" { $U; relTol 0; @@ -69,7 +69,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes index 4c4e4e9fec..cab4ed8a5b 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; div(nHat) Gauss linear; div(grad(nHat)) Gauss linear; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution index 1f7ef7077d..381a5c4f27 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties index f3167d9cc0..b6974ed32f 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties index a12807251c..5938ce87a3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes index 729ed886a0..906c819b45 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution index ccf9d4a524..fcce5dd225 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs|k|epsilon)" + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs|k|epsilon)Final" + "(U|h|k|epsilon)Final" { $U; relTol 0; @@ -71,7 +71,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes index 313931a5e4..d93ea9bbbd 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; div(nHat) Gauss linear; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution index fccf5fcd99..cfae8b06ce 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties index a12807251c..5938ce87a3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes index da2e0b5250..7cb2760736 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution index 5cc362f928..b05dd58db6 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs)Final" + "(U|h)Final" { $U; relTol 0; @@ -69,7 +69,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes index 970936568e..05a7bee966 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; } gradSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution index 0c910f668d..645d42a456 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties index 0159c5ee7e..fb970e5e16 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties index a12807251c..5938ce87a3 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes index 729ed886a0..906c819b45 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,epsilon) Gauss upwind; div(U) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; - div(phi,Yi_hs) Gauss upwind; + div(phi,Yi_h) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution index 5cc362f928..b05dd58db6 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -40,7 +40,7 @@ solvers relTol 0.1; } - "(U|hs)Final" + "(U|h)Final" { $U; relTol 0; @@ -69,7 +69,7 @@ solvers "(Yi|O2|N2|H2O)" { - $hsFinal; + $hFinal; } } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes index d297eaf01f..5ede0210d6 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes @@ -21,7 +21,7 @@ ddtSchemes ddt(deltaf*rhof) Euler; ddt(rhof,deltaf) Euler; ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hsf) Euler; + ddt(deltaf*rhof,hf) Euler; } divSchemes @@ -29,7 +29,7 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hsf) Gauss upwind; + div(phi,hf) Gauss upwind; } gradSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution index 1f7ef7077d..381a5c4f27 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(Uf|hsf|deltaf\*rhof)" + "(Uf|hf|deltaf\*rhof)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties index c5ea248073..23003334a5 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/reactingCloud1Properties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties index 8236d34685..c8234a7827 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; chemistryReader foamChemistryReader; diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes index f2abd9112f..dc13503bc6 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(alphaEff,hs) Gauss linear corrected; + laplacian(alphaEff,h) Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution index da8532734c..32bfc5346c 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0; } - "(U|hs)Final" + "(U|h)Final" { $U; tolerance 1e-05; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties index 27e6772ec8..22ca68f1f5 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties @@ -29,7 +29,7 @@ solution rho explicit 1; U explicit 1; Yi explicit 1; - hs explicit 1; + h explicit 1; } } diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties index 655ee3aebb..655c9f51d1 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hsPsiMixtureThermo>; +thermoType hePsiReactionThermo>; CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes index 99d8f6e1c3..74c85361d1 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phi,K) Gauss linear; - div(phi,hs) Gauss upwind; + div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; @@ -49,7 +49,7 @@ laplacianSchemes laplacian(DepsilonEff,epsilon) Gauss linear orthogonal; laplacian(DREff,R) Gauss linear orthogonal; laplacian((rho*(1|A(U))),p) Gauss linear orthogonal; - laplacian(alphaEff,hs) Gauss linear orthogonal; + laplacian(alphaEff,h) Gauss linear orthogonal; } interpolationSchemes diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution index 1766415070..9cff5583eb 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/fvSolution @@ -32,7 +32,7 @@ solvers relTol 0; } - "(U|hs)" + "(U|h)" { solver PBiCG; preconditioner DILU; @@ -55,7 +55,7 @@ solvers relTol 0; } - "(U|hs)Final" + "(U|h)Final" { $U; tolerance 1e-05;