Skip to content
Permalink
Browse files

thermophysicalModels: Added laminar thermal diffusivity for energy, a…

…lphahe

Needed for laminar transport of he (h or e)

Resolves bug-report https://bugs.openfoam.org/view.php?id=3025
  • Loading branch information...
Henry Weller
Henry Weller committed Aug 5, 2018
1 parent d049c1b commit f7100178e4c2d916da550071aa96447eefaff45c
Showing with 289 additions and 138 deletions.
  1. +19 −0 applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C
  2. +6 −0 applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H
  3. +39 −0 ...vers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
  4. +6 −0 ...vers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.H
  5. +9 −12 .../solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H
  6. +9 −12 .../multiphase/reactingEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.H
  7. +19 −0 .../solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.C
  8. +31 −24 .../solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ThermoPhaseModel/ThermoPhaseModel.H
  9. +29 −21 applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H
  10. +34 −18 applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H
  11. +9 −11 src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.H
  12. +24 −27 src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.H
  13. +13 −6 src/thermophysicalModels/basic/basicThermo/basicThermo.H
  14. +25 −0 src/thermophysicalModels/basic/heThermo/heThermo.C
  15. +17 −7 src/thermophysicalModels/basic/heThermo/heThermo.H
@@ -361,6 +361,25 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::kappa
}


Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::alphahe() const
{
return
alpha1()*thermo1_->alphahe()
+ alpha2()*thermo2_->alphahe();
}


Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::alphahe
(
const label patchi
) const
{
return
alpha1().boundaryField()[patchi]*thermo1_->alphahe(patchi)
+ alpha2().boundaryField()[patchi]*thermo2_->alphahe(patchi);
}


Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::kappaEff
(
const volScalarField& alphat
@@ -269,6 +269,12 @@ public:
const label patchi
) const;

//- Thermal diffusivity for energy of mixture [kg/m/s]
virtual tmp<volScalarField> alphahe() const;

//- Thermal diffusivity for energy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alphahe(const label patchi) const;

//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
@@ -625,6 +625,45 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::kappa
}


Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::alphahe() const
{
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();

tmp<volScalarField> talphaEff(phasei()*phasei().thermo().alphahe());

for (++phasei; phasei != phases_.end(); ++phasei)
{
talphaEff.ref() += phasei()*phasei().thermo().alphahe();
}

return talphaEff;
}


Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::alphahe
(
const label patchi
) const
{
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();

tmp<scalarField> talphaEff
(
phasei().boundaryField()[patchi]
*phasei().thermo().alphahe(patchi)
);

for (++phasei; phasei != phases_.end(); ++phasei)
{
talphaEff.ref() +=
phasei().boundaryField()[patchi]
*phasei().thermo().alphahe(patchi);
}

return talphaEff;
}


Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::kappaEff
(
const volScalarField& alphat
@@ -400,6 +400,12 @@ public:
const label patchi
) const;

//- Thermal diffusivity for energy of mixture [kg/m/s]
virtual tmp<volScalarField> alphahe() const;

//- Thermal diffusivity for energy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alphahe(const label patchi) const;

//- Effective thermal diffusivity of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
@@ -201,15 +201,6 @@ public:
virtual void divU(tmp<volScalarField> divU);


// Transport (prevents compiler warnings)

//- Return the effective thermal conductivity
using BasePhaseModel::kappaEff;

//- Return the effective thermal conductivity for enthalpy
using BasePhaseModel::alphaEff;


// Turbulence

//- Return the turbulent dynamic viscosity
@@ -224,17 +215,23 @@ public:
//- Return the effective kinematic viscosity
virtual tmp<volScalarField> nuEff() const;

//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [J/m/s/K]
using BasePhaseModel::kappaEff;

//- Return the effective thermal conductivity
virtual tmp<volScalarField> kappaEff() const;

//- Return the effective thermal conductivity on a patch
virtual tmp<scalarField> kappaEff(const label patchi) const;

//- Return the effective thermal diffusivity for enthalpy
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
using BasePhaseModel::alphaEff;

//- Return the effective thermal diffusivity
virtual tmp<volScalarField> alphaEff() const;

//- Return the effective thermal conductivity for enthalpy on a
// patch
//- Return the effective thermal conductivity on a patch
virtual tmp<scalarField> alphaEff(const label patchi) const;

//- Return the turbulent kinetic energy
@@ -171,15 +171,6 @@ public:
virtual void divU(tmp<volScalarField> divU);


// Transport (prevents compiler warnings)

//- Return the effective thermal conductivity
using BasePhaseModel::kappaEff;

//- Return the effective thermal conductivity for enthalpy
using BasePhaseModel::alphaEff;


// Turbulence

//- Return the turbulent dynamic viscosity
@@ -194,17 +185,23 @@ public:
//- Return the effective kinematic viscosity
virtual tmp<volScalarField> nuEff() const;

//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [J/m/s/K]
using BasePhaseModel::kappaEff;

//- Return the effective thermal conductivity
virtual tmp<volScalarField> kappaEff() const;

//- Return the effective thermal conductivity on a patch
virtual tmp<scalarField> kappaEff(const label patchi) const;

//- Return the effective thermal diffusivity for enthalpy
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
using BasePhaseModel::alphaEff;

//- Return the effective thermal diffusivity
virtual tmp<volScalarField> alphaEff() const;

//- Return the effective thermal conductivity for enthalpy on a
// patch
//- Return the effective thermal conductivity on a patch
virtual tmp<scalarField> alphaEff(const label patchi) const;

//- Return the turbulent kinetic energy
@@ -153,6 +153,25 @@ Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::kappa
}


template<class BasePhaseModel, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::alphahe() const
{
return thermo_->alphahe();
}


template<class BasePhaseModel, class ThermoType>
Foam::tmp<Foam::scalarField>
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::alphahe
(
const label patchi
) const
{
return thermo_->alphahe(patchi);
}


template<class BasePhaseModel, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ThermoPhaseModel<BasePhaseModel, ThermoType>::kappaEff
@@ -112,56 +112,63 @@ public:
//- Return the laminar kinematic viscosity on a patch
virtual tmp<scalarField> nu(const label patchi) const;

//- Return the laminar thermal conductivity
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
virtual tmp<volScalarField> alpha() const;

//- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alpha(const label patchi) const;

//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const;

//- Return the laminar thermal conductivity on a patch
//- Thermal diffusivity for temperature of mixture
// for patch [J/m/s/K]
virtual tmp<scalarField> kappa(const label patchi) const;

//- Return the laminar thermal conductivity, given the turbulent
// thermal diffusivity
//- Thermal diffusivity for energy of mixture [kg/m/s]
virtual tmp<volScalarField> alphahe() const;

//- Thermal diffusivity for energy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alphahe(const label patchi) const;


// Turbulence

//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [J/m/s/K]
using BasePhaseModel::kappaEff;

//- Effective thermal turbulent diffusivity for temperature
// of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
const volScalarField& alphat
) const;

//- Return the laminar thermal conductivity on a patch, given the
// turbulent thermal diffusivity
//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappaEff
(
const scalarField& alphat,
const label patchi
) const;

//- Return the thermal diffusivity for enthalpy
virtual tmp<volScalarField> alpha() const;

//- Return the thermal diffusivity for enthalpy on a patch
virtual tmp<scalarField> alpha(const label patchi) const;
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
using BasePhaseModel::alphaEff;

//- Return the effective thermal diffusivity for enthalpy, given the
// turbulent thermal diffusivity
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff
(
const volScalarField& alphat
) const;

//- Return the effective thermal diffusivity for enthalpy on a
// patch, given the turbulent thermal diffusivity
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff
(
const scalarField& alphat,
const label patchi
) const;


// Turbulence (prevents compiler warnings)

//- Return the effective thermal conductivity
using BasePhaseModel::kappaEff;

//- Return the effective thermal conductivity for enthalpy
using BasePhaseModel::alphaEff;
};


@@ -327,42 +327,48 @@ public:
//- Return the laminar kinematic viscosity on a patch
virtual tmp<scalarField> nu(const label patchi) const = 0;

//- Return the laminar thermal conductivity
//- Thermal diffusivity for enthalpy of mixture [kg/m/s]
virtual tmp<volScalarField> alpha() const = 0;

//- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alpha(const label patchi) const = 0;

//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const = 0;

//- Return the laminar thermal conductivity on a patch
//- Thermal diffusivity for temperature of mixture
// for patch [J/m/s/K]
virtual tmp<scalarField> kappa(const label patchi) const = 0;

//- Return the effective thermal conductivity, given the turbulent
// thermal diffusivity
//- Thermal diffusivity for energy of mixture [kg/m/s]
virtual tmp<volScalarField> alphahe() const = 0;

//- Thermal diffusivity for energy of mixture for patch [kg/m/s]
virtual tmp<scalarField> alphahe(const label patchi) const = 0;

//- Effective thermal turbulent diffusivity for temperature
// of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff
(
const volScalarField& alphat
) const = 0;

//- Return the effective thermal conductivity on a patch, given the
// turbulent thermal diffusivity
//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappaEff
(
const scalarField& alphat,
const label patchi
) const = 0;

//- Return the laminar thermal diffusivity for enthalpy
virtual tmp<volScalarField> alpha() const = 0;

//- Return the laminar thermal diffusivity for enthalpy on a patch
virtual tmp<scalarField> alpha(const label patchi) const = 0;

//- Return the effective thermal diffusivity for enthalpy, given the
// turbulent thermal diffusivity
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff
(
const volScalarField& alphat
) const = 0;

//- Return the effective thermal diffusivity for enthalpy on a
// patch, given the turbulent thermal diffusivity
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff
(
const scalarField& alphat,
@@ -384,17 +390,19 @@ public:
//- Return the effective kinematic viscosity
virtual tmp<volScalarField> nuEff() const = 0;

//- Return the effective thermal conductivity
//- Effective thermal turbulent diffusivity for temperature
// of mixture [J/m/s/K]
virtual tmp<volScalarField> kappaEff() const = 0;

//- Return the effective thermal conductivity on a patch
//- Effective thermal turbulent diffusivity for temperature
// of mixture for patch [J/m/s/K]
virtual tmp<scalarField> kappaEff(const label patchi) const = 0;

//- Return the effective thermal diffusivity for enthalpy
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff() const = 0;

//- Return the effective thermal conductivity for enthalpy on a
// patch
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff(const label patchi) const = 0;

//- Return the turbulent kinetic energy

0 comments on commit f710017

Please sign in to comment.
You can’t perform that action at this time.