fluidThermo: Moved kappaEff and alphaEff into ThermophysicalTransportModels
This completes the separation between thermodynamics and thermophysical transport modelling and all models and boundary conditions involving heat transfer now obtain the transport coefficients from the appropriate ThermophysicalTransportModels rather than from fluidThermo.
This commit is contained in:
@ -138,44 +138,37 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::compressibleInterPhaseTransportModel::alphaEff() const
|
||||
{
|
||||
/* ***HGW
|
||||
if (twoPhaseTransport_)
|
||||
{
|
||||
return
|
||||
mixture_.alpha1()*mixture_.thermo1().alphaEff
|
||||
(
|
||||
turbulence1_->alphat()
|
||||
)
|
||||
+ mixture_.alpha2()*mixture_.thermo2().alphaEff
|
||||
(
|
||||
turbulence2_->alphat()
|
||||
);
|
||||
mixture_.alpha1()
|
||||
*(
|
||||
mixture_.thermo1().kappa()
|
||||
+ mixture_.thermo1().rho()*mixture_.thermo1().Cp()
|
||||
*turbulence1_->nut()
|
||||
)/mixture_.thermo1().Cv()
|
||||
+ mixture_.alpha2()
|
||||
*(
|
||||
mixture_.thermo2().kappa()
|
||||
+ mixture_.thermo2().rho()*mixture_.thermo2().Cp()
|
||||
*turbulence2_->nut()
|
||||
)/mixture_.thermo2().Cv();
|
||||
}
|
||||
else
|
||||
{
|
||||
return mixture_.alphaEff(turbulence_->alphat());
|
||||
}
|
||||
*/
|
||||
|
||||
if (twoPhaseTransport_)
|
||||
{
|
||||
return
|
||||
mixture_.alpha1()*mixture_.thermo1().alphaEff
|
||||
(
|
||||
mixture_.thermo1().rho()*turbulence1_->nut()
|
||||
)
|
||||
+ mixture_.alpha2()*mixture_.thermo2().alphaEff
|
||||
(
|
||||
mixture_.thermo2().rho()*turbulence2_->nut()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
const volScalarField alphat(mixture_.rho()*turbulence_->nut());
|
||||
|
||||
return
|
||||
mixture_.alpha1()*mixture_.thermo1().alphaEff(alphat)
|
||||
+ mixture_.alpha2()*mixture_.thermo2().alphaEff(alphat);
|
||||
mixture_.alpha1()
|
||||
*(
|
||||
mixture_.thermo1().kappa()
|
||||
+ mixture_.thermo1().rho()*mixture_.thermo1().Cp()
|
||||
*turbulence_->nut()
|
||||
)/mixture_.thermo1().Cv()
|
||||
+ mixture_.alpha2()
|
||||
*(
|
||||
mixture_.thermo2().kappa()
|
||||
+ mixture_.thermo2().rho()*mixture_.thermo2().Cp()
|
||||
*turbulence_->nut()
|
||||
)/mixture_.thermo2().Cv();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -115,6 +115,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return the effective temperature transport coefficient
|
||||
// derived from the phase internal energy equations i.e. <kappa/Cv>
|
||||
tmp<volScalarField> alphaEff() const;
|
||||
|
||||
//- Return the effective momentum stress divergence
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(rho, T) + fvm::div(mixture.rhoPhi(), T) - fvm::Sp(contErr, T)
|
||||
- fvm::laplacian(mixture.alphaEff(rho*turbulence->nut()), T)
|
||||
- fvm::laplacian(mixture.alphaEff(turbulence->nut()), T)
|
||||
+ (
|
||||
fvc::div(fvc::absolute(phi, U), p)()() // - contErr/rho*p
|
||||
+ (fvc::ddt(rho, K) + fvc::div(mixture.rhoPhi(), K))()()
|
||||
|
||||
@ -247,16 +247,28 @@ Foam::tmp<Foam::scalarField> Foam::compressibleMultiphaseMixture::nu
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::compressibleMultiphaseMixture::alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
const volScalarField& nut
|
||||
) const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator phasei = phases_.begin();
|
||||
|
||||
tmp<volScalarField> talphaEff(phasei()*phasei().thermo().alphaEff(alphat));
|
||||
tmp<volScalarField> talphaEff
|
||||
(
|
||||
phasei()
|
||||
*(
|
||||
phasei().thermo().kappa()
|
||||
+ phasei().thermo().rho()*phasei().thermo().Cp()*nut
|
||||
)/phasei().thermo().Cv()
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
talphaEff.ref() += phasei()*phasei().thermo().alphaEff(alphat);
|
||||
talphaEff.ref() +=
|
||||
phasei()
|
||||
*(
|
||||
phasei().thermo().kappa()
|
||||
+ phasei().thermo().rho()*phasei().thermo().Cp()*nut
|
||||
)/phasei().thermo().Cv();
|
||||
}
|
||||
|
||||
return talphaEff;
|
||||
|
||||
@ -263,10 +263,11 @@ public:
|
||||
//- Kinematic viscosity of mixture for patch [m^2/s]
|
||||
virtual tmp<scalarField> nu(const label patchi) const;
|
||||
|
||||
//- Effective thermal diffusivity of mixture [W/m/K]
|
||||
//- Return the effective temperature transport coefficient
|
||||
// derived from the phase internal energy equations i.e. <kappa/Cv>
|
||||
virtual tmp<volScalarField> alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
const volScalarField& nut
|
||||
) const;
|
||||
|
||||
//- Return the phase-averaged reciprocal Cv
|
||||
|
||||
@ -191,7 +191,7 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
const fvPatchScalarField& hew = ttm.thermo().he().boundaryField()[patchi];
|
||||
|
||||
// Heat flux [W/m^2] - lagging alphatw
|
||||
const scalarField qDot(ttm.thermo().alphaEff(alphatw, patchi)*hew.snGrad());
|
||||
const scalarField qDot(ttm.alphaEff(patchi)*hew.snGrad());
|
||||
|
||||
// Populate boundary values
|
||||
forAll(alphatw, facei)
|
||||
|
||||
@ -71,14 +71,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
|
||||
const word& phase(Tp.internalField().group());
|
||||
|
||||
const word fluidThermoName
|
||||
(
|
||||
IOobject::groupName(physicalProperties::typeName, phase)
|
||||
);
|
||||
|
||||
if (mesh.foundObject<fluidThermo>(fluidThermoName))
|
||||
{
|
||||
static word ttmName
|
||||
const word ttmName
|
||||
(
|
||||
IOobject::groupName
|
||||
(
|
||||
@ -94,14 +87,6 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
|
||||
return ttm.kappaEff(patchi);
|
||||
}
|
||||
else
|
||||
{
|
||||
const fluidThermo& thermo =
|
||||
mesh.lookupObject<fluidThermo>(fluidThermoName);
|
||||
|
||||
return thermo.kappa().boundaryField()[patchi];
|
||||
}
|
||||
}
|
||||
else if (mesh.foundObject<solidThermo>(physicalProperties::typeName))
|
||||
{
|
||||
const solidThermo& thermo =
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -139,35 +139,29 @@ public:
|
||||
// of mixture [W/m/K]
|
||||
virtual tmp<volScalarField> kappaEff() const
|
||||
{
|
||||
return this->thermo().kappaEff(alphat());
|
||||
return this->thermo().kappa() + this->thermo().Cp()*alphat();
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity for temperature
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const
|
||||
{
|
||||
return this->thermo().kappaEff
|
||||
(
|
||||
alphat(patchi),
|
||||
patchi
|
||||
);
|
||||
return
|
||||
this->thermo().kappa().boundaryField()[patchi]
|
||||
+ this->thermo().Cp().boundaryField()[patchi]*alphat(patchi);
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return this->thermo().alphaEff(alphat());
|
||||
return this->thermo().alphahe() + alphat();
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture
|
||||
// for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff(const label patchi) const
|
||||
{
|
||||
return this->thermo().alphaEff
|
||||
(
|
||||
alphat(patchi),
|
||||
patchi
|
||||
);
|
||||
return this->thermo().alphahe(patchi) + alphat(patchi);
|
||||
}
|
||||
|
||||
//- Effective mass diffusion coefficient
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -129,7 +129,10 @@ nonUnityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::q() const
|
||||
fvc::interpolate
|
||||
(
|
||||
this->alpha()
|
||||
*this->thermo().alphaEff((this->Prt_/Sct_)*this->alphat())
|
||||
*(
|
||||
this->thermo().kappa()/this->thermo().Cp()
|
||||
+ (this->Prt_/Sct_)*this->alphat()
|
||||
)
|
||||
)*hGradY;
|
||||
}
|
||||
|
||||
@ -185,7 +188,10 @@ nonUnityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::divq
|
||||
fvc::interpolate
|
||||
(
|
||||
this->alpha()
|
||||
*this->thermo().alphaEff((this->Prt_/Sct_)*this->alphat())
|
||||
*(
|
||||
this->thermo().kappa()/this->thermo().Cp()
|
||||
+ (this->Prt_/Sct_)*this->alphat()
|
||||
)
|
||||
)*hGradY*he.mesh().magSf()
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -125,7 +125,8 @@ public:
|
||||
return volScalarField::New
|
||||
(
|
||||
"DEff",
|
||||
this->thermo().alphaEff((this->Prt_/Sct_)*this->alphat())
|
||||
this->thermo().kappa()/this->thermo().Cp()
|
||||
+ (this->Prt_/Sct_)*this->alphat()
|
||||
);
|
||||
}
|
||||
|
||||
@ -137,11 +138,10 @@ public:
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return this->thermo().alphaEff
|
||||
(
|
||||
this->Prt_.value()/Sct_.value()*this->alphat(patchi),
|
||||
patchi
|
||||
);
|
||||
return
|
||||
this->thermo().kappa().boundaryField()[patchi]
|
||||
/this->thermo().Cp().boundaryField()[patchi]
|
||||
+ this->Prt_.value()/Sct_.value()*this->alphat(patchi);
|
||||
}
|
||||
|
||||
//- Return the heat flux [W/m^2]
|
||||
|
||||
@ -147,35 +147,29 @@ public:
|
||||
// of mixture [W/m/K]
|
||||
virtual tmp<volScalarField> kappaEff() const
|
||||
{
|
||||
return this->thermo().kappaEff(alphat());
|
||||
return this->thermo().kappa() + this->thermo().Cp()*alphat();
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity for temperature
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const
|
||||
{
|
||||
return this->thermo().kappaEff
|
||||
(
|
||||
alphat(patchi),
|
||||
patchi
|
||||
);
|
||||
return
|
||||
this->thermo().kappa().boundaryField()[patchi]
|
||||
+ this->thermo().Cp().boundaryField()[patchi]*alphat(patchi);
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return this->thermo().alphaEff(alphat());
|
||||
return this->thermo().alphahe() + alphat();
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture
|
||||
// for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff(const label patchi) const
|
||||
{
|
||||
return this->thermo().alphaEff
|
||||
(
|
||||
alphat(patchi),
|
||||
patchi
|
||||
);
|
||||
return this->thermo().alphahe(patchi) + alphat(patchi);
|
||||
}
|
||||
|
||||
//- Effective mass diffusion coefficient
|
||||
|
||||
@ -144,39 +144,6 @@ public:
|
||||
|
||||
//- Kinematic viscosity of mixture for patch [m^2/s]
|
||||
virtual tmp<scalarField> nu(const label patchi) const;
|
||||
|
||||
|
||||
// Fields derived from transport state variables
|
||||
|
||||
//- Effective thermal turbulent conductivity of mixture
|
||||
// for patch [W/m/K]
|
||||
virtual tmp<volScalarField> kappaEff
|
||||
(
|
||||
const volScalarField&
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent conductivity of mixture
|
||||
// for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Effective turbulent thermal diffusivity of energy
|
||||
// of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const = 0;
|
||||
|
||||
//- Effective turbulent thermal diffusivity of energy
|
||||
// of mixture for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -700,78 +700,6 @@ Foam::heThermo<BasicThermo, MixtureType>::alphahe(const label patchi) const
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heThermo<BasicThermo, MixtureType>::kappaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const
|
||||
{
|
||||
return volScalarField::New("kappaEff", this->kappa_ + Cp_*alphat);
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heThermo<BasicThermo, MixtureType>::kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
this->kappa_.boundaryField()[patchi]
|
||||
+ Cp(this->T_.boundaryField()[patchi], patchi)*alphat;
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heThermo<BasicThermo, MixtureType>::alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const
|
||||
{
|
||||
if (MixtureType::thermoType::enthalpy())
|
||||
{
|
||||
return volScalarField::New("alphaEff", this->kappa_/Cp_ + alphat);
|
||||
}
|
||||
else
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
"alphaEff",
|
||||
(this->kappa_ + Cp_*alphat)/Cv_
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heThermo<BasicThermo, MixtureType>::alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
if (MixtureType::thermoType::enthalpy())
|
||||
{
|
||||
return
|
||||
this->kappa_.boundaryField()[patchi]/Cp_.boundaryField()[patchi]
|
||||
+ alphat;
|
||||
}
|
||||
else
|
||||
{
|
||||
return
|
||||
(
|
||||
this->kappa_.boundaryField()[patchi]
|
||||
+ Cp_.boundaryField()[patchi]*alphat
|
||||
)/Cv_.boundaryField()[patchi];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class BasicThermo, class MixtureType>
|
||||
bool Foam::heThermo<BasicThermo, MixtureType>::read()
|
||||
{
|
||||
|
||||
@ -360,35 +360,6 @@ public:
|
||||
//- Thermal diffusivity of energy of mixture for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphahe(const label patchi) const;
|
||||
|
||||
//- Effective thermal turbulent conductivity of mixture [W/m/K]
|
||||
virtual tmp<volScalarField> kappaEff
|
||||
(
|
||||
const volScalarField&
|
||||
) const;
|
||||
|
||||
//- Effective thermal turbulent conductivity of mixture
|
||||
// for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Effective turbulent thermal diffusivity of energy
|
||||
// of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const;
|
||||
|
||||
//- Effective turbulent thermal diffusivity of energy
|
||||
// of mixture for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
|
||||
//- Read thermophysical properties dictionary
|
||||
virtual bool read();
|
||||
|
||||
Reference in New Issue
Block a user