fluidThermophysicalTransportModel: Removed alphaEff from the public interface
alphaEff is now an internal field used only for the implicit energy correction term, kappaEff, q and divq are the general and rational interface to thermal transport. XiFoam and PDRFoam now explicitly instantiate a unityLewisEddyDiffusivity fluidThermophysicalTransportModel as the the unity Lewis number approximation is hard-coded into the formulation of the energy/composition system.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
? mvConvection->fvcDiv(fvc::absolute(phi, rho, U), p/rho)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(thermophysicalTransport->alphaEff(), hea)
|
||||
+ thermophysicalTransport.divq(hea)
|
||||
+ fvModels.source(rho, hea)
|
||||
);
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ if (ign.ignited())
|
||||
*rho/thermo.rhou()
|
||||
: -dpdt*rho/thermo.rhou()
|
||||
)
|
||||
- fvm::laplacian(thermophysicalTransport->alphaEff(), heau)
|
||||
+ thermophysicalTransport.divq(heau)
|
||||
|
||||
// These terms cannot be used in partially-premixed combustion due to
|
||||
// the resultant inconsistency between ft and heau transport.
|
||||
|
||||
@ -70,7 +70,8 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "psiuMulticomponentThermo.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermoThermophysicalTransportModel.H"
|
||||
#include "RASThermophysicalTransportModel.H"
|
||||
#include "unityLewisEddyDiffusivity.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "XiModel.H"
|
||||
#include "PDRDragModel.H"
|
||||
@ -144,7 +145,7 @@ int main(int argc, char *argv[])
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
thermophysicalTransport->correct();
|
||||
thermophysicalTransport.correct();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -58,15 +58,17 @@ autoPtr<compressible::RASModel> turbulence
|
||||
);
|
||||
|
||||
Info<< "Creating thermophysical transport model\n" << endl;
|
||||
autoPtr<RASFluidThermophysicalTransportModel>
|
||||
thermophysicalTransport
|
||||
(
|
||||
RASFluidThermophysicalTransportModel::New
|
||||
(
|
||||
turbulence(),
|
||||
thermo
|
||||
)
|
||||
);
|
||||
turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity
|
||||
<
|
||||
RASThermophysicalTransportModel
|
||||
<
|
||||
ThermophysicalTransportModel
|
||||
<
|
||||
compressibleMomentumTransportModel,
|
||||
fluidThermo
|
||||
>
|
||||
>
|
||||
> thermophysicalTransport(turbulence(), thermo, true);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
||||
@ -52,7 +52,8 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "psiuMulticomponentThermo.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermoThermophysicalTransportModel.H"
|
||||
#include "RASThermophysicalTransportModel.H"
|
||||
#include "unityLewisEddyDiffusivity.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
@ -177,7 +178,7 @@ int main(int argc, char *argv[])
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
thermophysicalTransport->correct();
|
||||
thermophysicalTransport.correct();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ if (ign.ignited())
|
||||
+ mvConvection->fvmDiv(phi, b)
|
||||
+ fvm::div(phiSt, b)
|
||||
- fvm::Sp(fvc::div(phiSt), b)
|
||||
- fvm::laplacian(thermophysicalTransport->alphaEff(), b)
|
||||
- fvm::laplacian(thermophysicalTransport.DEff(b), b)
|
||||
==
|
||||
fvModels.source(rho, b)
|
||||
);
|
||||
@ -105,7 +105,7 @@ if (ign.ignited())
|
||||
phiSt
|
||||
- fvc::interpolate
|
||||
(
|
||||
fvc::laplacian(thermophysicalTransport->alphaEff(), b)/mgb
|
||||
fvc::laplacian(thermophysicalTransport.DEff(b), b)/mgb
|
||||
)*nf
|
||||
+ fvc::interpolate(rho)*fvc::interpolate(Su*(1.0/Xi - Xi))*nf
|
||||
);
|
||||
|
||||
@ -59,10 +59,17 @@ autoPtr<compressible::momentumTransportModel> turbulence
|
||||
);
|
||||
|
||||
Info<< "Creating thermophysical transport model\n" << endl;
|
||||
autoPtr<fluidThermoThermophysicalTransportModel> thermophysicalTransport
|
||||
(
|
||||
fluidThermoThermophysicalTransportModel::New(turbulence(), thermo)
|
||||
);
|
||||
turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity
|
||||
<
|
||||
RASThermophysicalTransportModel
|
||||
<
|
||||
ThermophysicalTransportModel
|
||||
<
|
||||
compressibleMomentumTransportModel,
|
||||
fluidThermo
|
||||
>
|
||||
>
|
||||
> thermophysicalTransport(turbulence(), thermo, true);
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
|
||||
@ -17,7 +17,7 @@ if (composition.contains("ft"))
|
||||
(
|
||||
fvm::ddt(rho, ft)
|
||||
+ mvConvection->fvmDiv(phi, ft)
|
||||
- fvm::laplacian(thermophysicalTransport->alphaEff(), ft)
|
||||
- fvm::laplacian(thermophysicalTransport.DEff(ft), ft)
|
||||
==
|
||||
fvModels.source(rho, ft)
|
||||
);
|
||||
|
||||
@ -87,9 +87,6 @@ public:
|
||||
//- Access function to fluid thermophysical properties
|
||||
virtual const fluidThermo& thermo() const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const = 0;
|
||||
|
||||
//- Effective mass diffusion coefficient
|
||||
// for a given specie mass-fraction [kg/m/s]
|
||||
virtual tmp<volScalarField> DEff(const volScalarField& Yi) const = 0;
|
||||
|
||||
@ -154,9 +154,6 @@ public:
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const = 0;
|
||||
|
||||
//- Correct the LES transport
|
||||
virtual void correct();
|
||||
|
||||
|
||||
@ -154,9 +154,6 @@ public:
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const = 0;
|
||||
|
||||
//- Correct the RAS transport
|
||||
virtual void correct();
|
||||
|
||||
|
||||
@ -85,6 +85,13 @@ protected:
|
||||
|
||||
virtual void correctAlphat();
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
// Used for the implicit energy correction on the temperature laplacian
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return this->thermo().kappa()/this->thermo().Cpv() + alphat();
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -151,12 +158,6 @@ public:
|
||||
+ this->thermo().Cp().boundaryField()[patchi]*alphat(patchi);
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return this->thermo().kappa()/this->thermo().Cpv() + alphat();
|
||||
}
|
||||
|
||||
//- Effective mass diffusion coefficient
|
||||
// for a given specie mass-fraction [kg/m/s]
|
||||
virtual tmp<volScalarField> DEff(const volScalarField& Yi) const;
|
||||
|
||||
@ -53,7 +53,8 @@ unityLewisEddyDiffusivity<TurbulenceThermophysicalTransportModel>::
|
||||
unityLewisEddyDiffusivity
|
||||
(
|
||||
const momentumTransportModel& momentumTransport,
|
||||
const thermoModel& thermo
|
||||
const thermoModel& thermo,
|
||||
const bool allowDefaultPrt
|
||||
)
|
||||
:
|
||||
unityLewisEddyDiffusivity
|
||||
@ -61,7 +62,7 @@ unityLewisEddyDiffusivity
|
||||
typeName,
|
||||
momentumTransport,
|
||||
thermo,
|
||||
false
|
||||
allowDefaultPrt
|
||||
)
|
||||
{
|
||||
this->printCoeffs(typeName);
|
||||
|
||||
@ -82,6 +82,13 @@ protected:
|
||||
|
||||
virtual void correctAlphat();
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
// Used for the implicit energy correction on the temperature laplacian
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return this->thermo().kappa()/this->thermo().Cpv() + alphat();
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -106,7 +113,8 @@ public:
|
||||
unityLewisEddyDiffusivity
|
||||
(
|
||||
const momentumTransportModel& momentumTransport,
|
||||
const thermoModel& thermo
|
||||
const thermoModel& thermo,
|
||||
const bool allowDefaultPrt = false
|
||||
);
|
||||
|
||||
//- Construct from a type name, a momentum transport model and a thermo
|
||||
@ -159,12 +167,6 @@ public:
|
||||
+ this->thermo().Cp().boundaryField()[patchi]*alphat(patchi);
|
||||
}
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff() const
|
||||
{
|
||||
return this->thermo().kappa()/this->thermo().Cpv() + alphat();
|
||||
}
|
||||
|
||||
//- Effective mass diffusion coefficient
|
||||
// for a given specie mass-fraction [kg/m/s]
|
||||
virtual tmp<volScalarField> DEff(const volScalarField& Yi) const
|
||||
|
||||
@ -113,7 +113,7 @@ Foam::tmp<Foam::volScalarField> Foam::fv::volumeFractionSource::D
|
||||
fieldName == ttm.thermo().T().name()
|
||||
? ttm.kappaEff()
|
||||
: fieldName == ttm.thermo().he().name()
|
||||
? ttm.alphaEff()
|
||||
? ttm.kappaEff()/ttm.thermo().Cpv()
|
||||
: ttm.momentumTransport().rho()*ttm.momentumTransport().nuEff();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user