ENH: basicThermo: add T from h calculation for cell-set or patch
This commit is contained in:
parent
806bdec178
commit
2fb7b6cfcc
@ -350,6 +350,38 @@ Foam::tmp<Foam::volScalarField> Foam::basicThermo::hc() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> 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<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> 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<scalarField>(NULL);
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::basicThermo::e()
|
||||
{
|
||||
notImplemented("basicThermo::e()");
|
||||
|
@ -198,6 +198,22 @@ public:
|
||||
//- Chemical enthalpy [J/kg]
|
||||
virtual tmp<volScalarField> hc() const;
|
||||
|
||||
//- Temperature from enthalpy for cell-set
|
||||
virtual tmp<scalarField> TH
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy for patch
|
||||
virtual tmp<scalarField> TH
|
||||
(
|
||||
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();
|
||||
|
@ -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
|
||||
@ -205,6 +205,50 @@ Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::h
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::TH
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> 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<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::TH
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> 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<class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::hRhoThermo<MixtureType>::Cp
|
||||
(
|
||||
|
@ -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
|
||||
@ -134,6 +134,22 @@ public:
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy for cell-set
|
||||
virtual tmp<scalarField> TH
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy for patch
|
||||
virtual tmp<scalarField> 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<scalarField> Cp
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user