From 5e60c99c4ac5a1c46e1f4d0433e943b5c9f5d38d Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 4 May 2012 14:47:07 +0100 Subject: [PATCH] Thermodynamics: split the thermal diffusivity alpha into alphah and alphae for enthalpy and internal energy respectively Change the implementation of alphah and alphae to use the local heat capacity rather than attempting to compensate for the variation in an ad hoc manner. For correctness a heat capacity gradient term should be added to the energy equations. --- .../basic/psiThermo/ePsiThermo/ePsiThermo.C | 6 +++--- .../basic/psiThermo/hPsiThermo/hPsiThermo.C | 6 +++--- .../basic/psiThermo/hsPsiThermo/hsPsiThermo.C | 6 +++--- .../basic/rhoThermo/hRhoThermo/hRhoThermo.C | 6 +++--- .../basic/rhoThermo/hsRhoThermo/hsRhoThermo.C | 6 +++--- .../hPsiMixtureThermo/hPsiMixtureThermo.C | 6 +++--- .../hhuMixtureThermo/hhuMixtureThermo.C | 6 +++--- .../hsPsiMixtureThermo/hsPsiMixtureThermo.C | 6 +++--- .../basicMultiComponentMixture.H | 9 +++++++-- .../mixtures/dieselMixture/dieselMixture.C | 15 +++++++++++++-- .../mixtures/dieselMixture/dieselMixture.H | 7 +++++-- .../mixtures/egrMixture/egrMixture.C | 15 +++++++++++++-- .../mixtures/egrMixture/egrMixture.H | 7 +++++-- .../homogeneousMixture/homogeneousMixture.C | 15 +++++++++++++-- .../homogeneousMixture/homogeneousMixture.H | 7 +++++-- .../inhomogeneousMixture.C | 15 +++++++++++++-- .../inhomogeneousMixture.H | 7 +++++-- .../multiComponentMixture.C | 15 +++++++++++++-- .../multiComponentMixture.H | 7 +++++-- .../veryInhomogeneousMixture.C | 15 +++++++++++++-- .../veryInhomogeneousMixture.H | 7 +++++-- .../hRhoMixtureThermo/hRhoMixtureThermo.C | 6 +++--- .../hsRhoMixtureThermo/hsRhoMixtureThermo.C | 6 +++--- .../transport/const/constSolidTransport.H | 3 --- .../transport/const/constSolidTransportI.H | 14 -------------- .../exponential/exponentialSolidTransport.H | 3 --- .../exponential/exponentialSolidTransportI.H | 13 ------------- .../specie/transport/const/constTransport.H | 5 ++++- .../specie/transport/const/constTransportI.H | 13 +++++++------ .../polynomial/polynomialTransport.H | 5 ++++- .../polynomial/polynomialTransportI.H | 17 +++++++++++------ .../speciesTransport/speciesTransport.H | 5 ++++- .../sutherland/sutherlandTransport.H | 5 ++++- .../sutherland/sutherlandTransportI.H | 19 +++++++++++-------- 34 files changed, 190 insertions(+), 113 deletions(-) diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C index b883fb85bd..f5779997c1 100644 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.C @@ -49,7 +49,7 @@ void Foam::ePsiThermo::calculate() psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphae(TCells[celli]); } forAll(this->T_.boundaryField(), patchi) @@ -74,7 +74,7 @@ void Foam::ePsiThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alpha(pT[facei]); + palpha[facei] = mixture_.alphae(pT[facei]); } } else @@ -88,7 +88,7 @@ void Foam::ePsiThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alpha(pT[facei]); + palpha[facei] = mixture_.alphae(pT[facei]); } } } diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C index 991e3d11a4..013d786e6c 100644 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.C @@ -47,7 +47,7 @@ void Foam::hPsiThermo::calculate() psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); } forAll(T_.boundaryField(), patchi) @@ -72,7 +72,7 @@ void Foam::hPsiThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } else @@ -86,7 +86,7 @@ void Foam::hPsiThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C index 28ce2749d2..7d81f60680 100644 --- a/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/hsPsiThermo/hsPsiThermo.C @@ -47,7 +47,7 @@ void Foam::hsPsiThermo::calculate() psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); } forAll(T_.boundaryField(), patchi) @@ -72,7 +72,7 @@ void Foam::hsPsiThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } else @@ -86,7 +86,7 @@ void Foam::hsPsiThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pT[facei]); - palpha[facei] = mixture_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C index 9d3f3c2ba7..e2e7503cfc 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C @@ -49,7 +49,7 @@ void Foam::hRhoThermo::calculate() rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); } forAll(this->T_.boundaryField(), patchi) @@ -76,7 +76,7 @@ void Foam::hRhoThermo::calculate() 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_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } else @@ -91,7 +91,7 @@ void Foam::hRhoThermo::calculate() 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_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C index 8b395ad337..3febfaf30f 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/hsRhoThermo/hsRhoThermo.C @@ -49,7 +49,7 @@ void Foam::hsRhoThermo::calculate() rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); } forAll(this->T_.boundaryField(), patchi) @@ -76,7 +76,7 @@ void Foam::hsRhoThermo::calculate() 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_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } else @@ -91,7 +91,7 @@ void Foam::hsRhoThermo::calculate() 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_.alpha(pT[facei]); + palpha[facei] = mixture_.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C index d604d13c17..36b51d598b 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hPsiMixtureThermo/hPsiMixtureThermo.C @@ -49,7 +49,7 @@ void Foam::hPsiMixtureThermo::calculate() psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alpha(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); } forAll(T_.boundaryField(), patchi) @@ -74,7 +74,7 @@ void Foam::hPsiMixtureThermo::calculate() ppsi[facei] = mixture.psi(pp[facei], pT[facei]); pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alpha(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); } } else @@ -88,7 +88,7 @@ void Foam::hPsiMixtureThermo::calculate() ppsi[facei] = mixture.psi(pp[facei], pT[facei]); pmu_[facei] = mixture.mu(pT[facei]); - palpha_[facei] = mixture.alpha(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C index 79d153245c..ae87580cae 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C @@ -98,7 +98,7 @@ void Foam::hhuMixtureThermo::calculate() psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); TuCells[celli] = this->cellReactants(celli).TH(huCells[celli], TuCells[celli]); @@ -128,7 +128,7 @@ void Foam::hhuMixtureThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alpha(pT[facei]); + palpha_[facei] = mixture_.alphah(pT[facei]); } } else @@ -142,7 +142,7 @@ void Foam::hhuMixtureThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alpha(pT[facei]); + palpha_[facei] = mixture_.alphah(pT[facei]); pTu[facei] = this->patchFaceReactants(patchi, facei) diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C index 08814a64fc..f46721186a 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hsPsiMixtureThermo/hsPsiMixtureThermo.C @@ -84,7 +84,7 @@ void Foam::hsPsiMixtureThermo::calculate() psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(TCells[celli]); - alphaCells[celli] = mixture_.alpha(TCells[celli]); + alphaCells[celli] = mixture_.alphah(TCells[celli]); } forAll(T_.boundaryField(), patchi) @@ -109,7 +109,7 @@ void Foam::hsPsiMixtureThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alpha(pT[facei]); + palpha_[facei] = mixture_.alphah(pT[facei]); } } else @@ -123,7 +123,7 @@ void Foam::hsPsiMixtureThermo::calculate() ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); pmu_[facei] = mixture_.mu(pT[facei]); - palpha_[facei] = mixture_.alpha(pT[facei]); + palpha_[facei] = mixture_.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H index 6d93e5cc0e..6c3534d39e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/basicMultiComponentMixture/basicMultiComponentMixture.H @@ -166,8 +166,13 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const = 0; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const = 0; + //- Thermal diffusivity 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 c6b9126408..c526d8a43e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.C @@ -272,13 +272,24 @@ Foam::scalar Foam::dieselMixture::kappa template -Foam::scalar Foam::dieselMixture::alpha +Foam::scalar Foam::dieselMixture::alphah ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).alpha(T); + return getLocalThermo(specieI).alphah(T); +} + + +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 67c43c626d..ddab8831dc 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/dieselMixture/dieselMixture.H @@ -203,8 +203,11 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const; + //- Thermal diffusivity for 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 8bb9e5584b..4c90dc350b 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.C @@ -282,13 +282,24 @@ Foam::scalar Foam::egrMixture::kappa template -Foam::scalar Foam::egrMixture::alpha +Foam::scalar Foam::egrMixture::alphah ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).alpha(T); + return getLocalThermo(specieI).alphah(T); +} + + +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 cabe6057f6..62b5adfa08 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/egrMixture/egrMixture.H @@ -219,8 +219,11 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const; + //- Thermal diffusivity 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 a44261324a..2a0190cabe 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.C @@ -261,13 +261,24 @@ Foam::scalar Foam::homogeneousMixture::kappa template -Foam::scalar Foam::homogeneousMixture::alpha +Foam::scalar Foam::homogeneousMixture::alphah ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).alpha(T); + return getLocalThermo(specieI).alphah(T); +} + + +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 9b5f9f0802..9eb1d6721e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/homogeneousMixture/homogeneousMixture.H @@ -177,8 +177,11 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const; + //- Thermal diffusivity 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 2b6c5fc73f..a4b1ae6f0e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C @@ -277,13 +277,24 @@ Foam::scalar Foam::inhomogeneousMixture::kappa template -Foam::scalar Foam::inhomogeneousMixture::alpha +Foam::scalar Foam::inhomogeneousMixture::alphah ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).alpha(T); + return getLocalThermo(specieI).alphah(T); +} + + +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 9a4544b084..ff28aa5072 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.H @@ -208,8 +208,11 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const; + //- Thermal diffusivity for 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 3d78443860..7575c84c52 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C @@ -302,13 +302,24 @@ Foam::scalar Foam::multiComponentMixture::kappa template -Foam::scalar Foam::multiComponentMixture::alpha +Foam::scalar Foam::multiComponentMixture::alphah ( const label specieI, const scalar T ) const { - return speciesData_[specieI].alpha(T); + return speciesData_[specieI].alphah(T); +} + + +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 f699b354bb..7442af516e 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.H @@ -167,8 +167,11 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const; + //- 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 d8ac45ca02..f85f5d55e3 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C @@ -278,13 +278,24 @@ Foam::scalar Foam::veryInhomogeneousMixture::kappa template -Foam::scalar Foam::veryInhomogeneousMixture::alpha +Foam::scalar Foam::veryInhomogeneousMixture::alphah ( const label specieI, const scalar T ) const { - return getLocalThermo(specieI).alpha(T); + return getLocalThermo(specieI).alphah(T); +} + + +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 0e3bfde7b9..e0410c8651 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.H @@ -209,8 +209,11 @@ public: //- Thermal conductivity [W/m/K] virtual scalar kappa(const label specieI, const scalar T) const; - //- Thermal diffusivity [kg/m/s] - virtual scalar alpha(const label specieI, const scalar T) const; + //- Thermal diffusivity for 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/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C index ddad4dba51..f9547ba212 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hRhoMixtureThermo/hRhoMixtureThermo.C @@ -51,7 +51,7 @@ void Foam::hRhoMixtureThermo::calculate() rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alpha(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); } forAll(T_.boundaryField(), patchi) @@ -78,7 +78,7 @@ void Foam::hRhoMixtureThermo::calculate() 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.alpha(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); } } else @@ -93,7 +93,7 @@ void Foam::hRhoMixtureThermo::calculate() 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.alpha(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C index bd1095f46f..460067051a 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/mixtureThermos/hsRhoMixtureThermo/hsRhoMixtureThermo.C @@ -51,7 +51,7 @@ void Foam::hsRhoMixtureThermo::calculate() rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]); muCells[celli] = mixture.mu(TCells[celli]); - alphaCells[celli] = mixture.alpha(TCells[celli]); + alphaCells[celli] = mixture.alphah(TCells[celli]); } forAll(T_.boundaryField(), patchi) @@ -78,7 +78,7 @@ void Foam::hsRhoMixtureThermo::calculate() 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.alpha(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); } } else @@ -93,7 +93,7 @@ void Foam::hsRhoMixtureThermo::calculate() 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.alpha(pT[facei]); + palpha_[facei] = mixture.alphah(pT[facei]); } } } diff --git a/src/thermophysicalModels/solid/transport/const/constSolidTransport.H b/src/thermophysicalModels/solid/transport/const/constSolidTransport.H index be7b0241f8..dcf43353d8 100644 --- a/src/thermophysicalModels/solid/transport/const/constSolidTransport.H +++ b/src/thermophysicalModels/solid/transport/const/constSolidTransport.H @@ -95,9 +95,6 @@ public: //- Thermal conductivity [W/mK] inline scalar K(const scalar T) const; - //- Thermal diffusivity [kg/ms] - inline scalar alpha(const scalar T) const; - // Ostream Operator diff --git a/src/thermophysicalModels/solid/transport/const/constSolidTransportI.H b/src/thermophysicalModels/solid/transport/const/constSolidTransportI.H index 52a031b8c9..1cab5b05d0 100644 --- a/src/thermophysicalModels/solid/transport/const/constSolidTransportI.H +++ b/src/thermophysicalModels/solid/transport/const/constSolidTransportI.H @@ -58,18 +58,4 @@ inline Foam::scalar Foam::constSolidTransport::K(const scalar T) const } -template -inline Foam::scalar Foam::constSolidTransport::alpha -( - const scalar T -) const -{ - scalar Cp = this->Cp(T); - - scalar rho = this->rho(T); - - return K_/(rho*Cp); -} - - // ************************************************************************* // diff --git a/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransport.H index 397b2a3ee9..de48132bc2 100644 --- a/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransport.H @@ -106,9 +106,6 @@ public: //- Thermal conductivity [W/mK] inline scalar K(const scalar T) const; - //- Thermal diffusivity [kg/ms] - inline scalar alpha(const scalar T) const; - // Ostream Operator diff --git a/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransportI.H index 3df0e70416..ad7ccf7ae7 100644 --- a/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransportI.H +++ b/src/thermophysicalModels/solid/transport/exponential/exponentialSolidTransportI.H @@ -67,18 +67,5 @@ inline Foam::scalar Foam::exponentialSolidTransport::K } -template -inline Foam::scalar Foam::exponentialSolidTransport::alpha -( - const scalar T -) const -{ - scalar Cp = this->Cp(T); - - scalar rho = this->rho(T); - - return (K(T)/(rho*Cp)); -} - // ************************************************************************* // diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index ca3fbef829..aa24ba4738 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -134,8 +134,11 @@ 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] - inline scalar alpha(const scalar T) const; + inline scalar alphah(const scalar T) const; // Species diffusivity //inline scalar D(const scalar T) const; diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index 77e4087e45..5d72594715 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -69,15 +69,16 @@ inline Foam::scalar Foam::constTransport::kappa(const scalar T) const template -inline Foam::scalar Foam::constTransport::alpha(const scalar T) const +inline Foam::scalar Foam::constTransport::alphae(const scalar T) const { - scalar Cp_ = this->Cp(T); + return this->kappa(T)/this->Cv(T); +} - scalar deltaT = T - specie::Tstd; - scalar CpBar = - (deltaT*(this->H(T) - this->H(specie::Tstd)) + Cp_)/(sqr(deltaT) + 1); - return Cp_*mu(T)*rPr_/CpBar; +template +inline Foam::scalar Foam::constTransport::alphah(const scalar T) const +{ + return mu(T)*rPr_; } diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index 57f8557d87..6ac59be75f 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -148,8 +148,11 @@ 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] - inline scalar alpha(const scalar T) const; + inline scalar alphah(const scalar T) const; // Species diffusivity //inline scalar D(const scalar T) const; diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index 5482ef5648..faf6008989 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -122,17 +122,22 @@ inline Foam::scalar Foam::polynomialTransport::kappa template -inline Foam::scalar Foam::polynomialTransport::alpha +inline Foam::scalar Foam::polynomialTransport::alphae ( const scalar T ) const { - scalar deltaT = T - specie::Tstd; - scalar CpBar = - (deltaT*(this->H(T) - this->H(specie::Tstd)) + this->Cp(T)) - /(sqr(deltaT) + 1); + return kappa(T)/this->Cv(T); +} - return kappa(T)/CpBar; + +template +inline Foam::scalar Foam::polynomialTransport::alphah +( + const scalar T +) const +{ + return kappa(T)/this->Cp(T); } diff --git a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H b/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H index def83e43bb..24b9bb7d67 100644 --- a/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H +++ b/src/thermophysicalModels/specie/transport/speciesTransport/speciesTransport.H @@ -81,8 +81,11 @@ 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] - //inline scalar alpha(const scalar T) const; + //inline scalar alphah(const scalar T) const; // Species diffusivity //inline scalar D(const scalar T) const; diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 9d0cddc493..da07227fdd 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -162,8 +162,11 @@ 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] - inline scalar alpha(const scalar T) const; + inline scalar alphah(const scalar T) const; // Species diffusivity //inline scalar D(const scalar T) const; diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 2839cc5167..b3ec1efbd5 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -147,20 +147,23 @@ inline Foam::scalar Foam::sutherlandTransport::kappa template -inline Foam::scalar Foam::sutherlandTransport::alpha +inline Foam::scalar Foam::sutherlandTransport::alphae ( const scalar T ) const { - scalar Cv_ = this->Cv(T); - scalar R_ = this->R(); - scalar Cp_ = Cv_ + R_; + return mu(T)*(1.32 + 1.77*this->R()/this->Cv(T)); +} - scalar deltaT = T - specie::Tstd; - scalar CpBar = - (deltaT*(this->H(T) - this->H(specie::Tstd)) + Cp_)/(sqr(deltaT) + 1); - return mu(T)*Cv_*(1.32 + 1.77*this->R()/Cv_)/CpBar; +template +inline Foam::scalar Foam::sutherlandTransport::alphah +( + const scalar T +) const +{ + + return kappa(T)/this->Cp(T); }