thermophysicalModels: Removed the unnecessary pressure argument to patch and cellSet property evaluation functions
The pressure provided to the patch and cellSet property evaluation functions is always that stored by the thermodynamics package as is the composition which is provided internally; given that these functions are used in boundary conditions to estimate changes in heat flux corresponding to changes in temperature only there is no need for another pressure to be provided. In order that the pressure and composition treatment are consistent and to maintain that during future rationalisation of the handling of composition it makes sense to remove this unnecessary pressure argument.
This commit is contained in:
@ -154,27 +154,25 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::he
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
return
|
||||
scalarField(alpha1(), cells)*thermo1_->he(p, T, cells)
|
||||
+ scalarField(alpha2(), cells)*thermo2_->he(p, T, cells);
|
||||
scalarField(alpha1(), cells)*thermo1_->he(T, cells)
|
||||
+ scalarField(alpha2(), cells)*thermo2_->he(T, cells);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->he(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->he(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->he(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->he(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
@ -196,27 +194,25 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::ha
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
return
|
||||
scalarField(alpha1(), cells)*thermo1_->ha(p, T, cells)
|
||||
+ scalarField(alpha2(), cells)*thermo2_->ha(p, T, cells);
|
||||
scalarField(alpha1(), cells)*thermo1_->ha(T, cells)
|
||||
+ scalarField(alpha2(), cells)*thermo2_->ha(T, cells);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->ha(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->ha(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->ha(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->ha(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
@ -229,7 +225,6 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::hc() const
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -242,7 +237,6 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::THE
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const label patchi
|
||||
) const
|
||||
@ -260,14 +254,13 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::Cp() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->Cp(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->Cp(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->Cp(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->Cp(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
@ -279,14 +272,13 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::Cv() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->Cv(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->Cv(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->Cv(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->Cv(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
@ -298,14 +290,13 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::gamma() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->gamma(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->gamma(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->gamma(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->gamma(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
@ -317,14 +308,13 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::Cpv() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->Cpv(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->Cpv(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->Cpv(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->Cpv(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
@ -338,14 +328,13 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureThermo::CpByCpv() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return
|
||||
alpha1().boundaryField()[patchi]*thermo1_->CpByCpv(p, T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->CpByCpv(p, T, patchi);
|
||||
alpha1().boundaryField()[patchi]*thermo1_->CpByCpv(T, patchi)
|
||||
+ alpha2().boundaryField()[patchi]*thermo2_->CpByCpv(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -153,7 +153,6 @@ public:
|
||||
//- Enthalpy/Internal energy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -161,7 +160,6 @@ public:
|
||||
//- Enthalpy/Internal energy for patch [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -180,7 +178,6 @@ public:
|
||||
//- Absolute enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -188,7 +185,6 @@ public:
|
||||
//- Absolute enthalpy for patch [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -200,7 +196,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -209,7 +204,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const label patchi
|
||||
) const;
|
||||
@ -223,7 +217,6 @@ public:
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -234,7 +227,6 @@ public:
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -245,7 +237,6 @@ public:
|
||||
//- Gamma = Cp/Cv for patch []
|
||||
virtual tmp<scalarField> gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -256,7 +247,6 @@ public:
|
||||
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -267,7 +257,6 @@ public:
|
||||
//- Heat capacity ratio for patch []
|
||||
virtual tmp<scalarField> CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
@ -214,7 +214,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::he
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -223,13 +222,13 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
|
||||
|
||||
tmp<scalarField> the
|
||||
(
|
||||
scalarField(phasei(), cells)*phasei().thermo().he(p, T, cells)
|
||||
scalarField(phasei(), cells)*phasei().thermo().he(T, cells)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
the.ref() +=
|
||||
scalarField(phasei(), cells)*phasei().thermo().he(p, T, cells);
|
||||
scalarField(phasei(), cells)*phasei().thermo().he(T, cells);
|
||||
}
|
||||
|
||||
return the;
|
||||
@ -238,7 +237,6 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -247,13 +245,13 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::he
|
||||
|
||||
tmp<scalarField> the
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().he(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().he(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
the.ref() +=
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().he(p, T, patchi);
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().he(T, patchi);
|
||||
}
|
||||
|
||||
return the;
|
||||
@ -296,7 +294,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::ha
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -305,13 +302,13 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::ha
|
||||
|
||||
tmp<scalarField> the
|
||||
(
|
||||
scalarField(phasei(), cells)*phasei().thermo().ha(p, T, cells)
|
||||
scalarField(phasei(), cells)*phasei().thermo().ha(T, cells)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
the.ref() +=
|
||||
scalarField(phasei(), cells)*phasei().thermo().ha(p, T, cells);
|
||||
scalarField(phasei(), cells)*phasei().thermo().ha(T, cells);
|
||||
}
|
||||
|
||||
return the;
|
||||
@ -320,7 +317,6 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::ha
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -329,13 +325,13 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::ha
|
||||
|
||||
tmp<scalarField> the
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().ha(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().ha(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
the.ref() +=
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().ha(p, T, patchi);
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().ha(T, patchi);
|
||||
}
|
||||
|
||||
return the;
|
||||
@ -360,7 +356,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::hc() const
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -373,7 +368,6 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::THE
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const label patchi
|
||||
) const
|
||||
@ -437,7 +431,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cp() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -446,13 +439,13 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cp
|
||||
|
||||
tmp<scalarField> tCp
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cp(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cp(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
tCp.ref() +=
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cp(p, T, patchi);
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cp(T, patchi);
|
||||
}
|
||||
|
||||
return tCp;
|
||||
@ -476,7 +469,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cv() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -485,13 +477,13 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cv
|
||||
|
||||
tmp<scalarField> tCv
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cv(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cv(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
tCv.ref() +=
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cv(p, T, patchi);
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cv(T, patchi);
|
||||
}
|
||||
|
||||
return tCv;
|
||||
@ -515,7 +507,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::gamma() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -524,14 +515,14 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::gamma
|
||||
|
||||
tmp<scalarField> tgamma
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().gamma(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().gamma(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
tgamma.ref() +=
|
||||
phasei().boundaryField()[patchi]
|
||||
*phasei().thermo().gamma(p, T, patchi);
|
||||
*phasei().thermo().gamma(T, patchi);
|
||||
}
|
||||
|
||||
return tgamma;
|
||||
@ -555,7 +546,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::Cpv() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -564,14 +554,14 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::Cpv
|
||||
|
||||
tmp<scalarField> tCpv
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cpv(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().Cpv(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
tCpv.ref() +=
|
||||
phasei().boundaryField()[patchi]
|
||||
*phasei().thermo().Cpv(p, T, patchi);
|
||||
*phasei().thermo().Cpv(T, patchi);
|
||||
}
|
||||
|
||||
return tCpv;
|
||||
@ -595,7 +585,6 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::CpByCpv() const
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -604,14 +593,14 @@ Foam::tmp<Foam::scalarField> Foam::multiphaseMixtureThermo::CpByCpv
|
||||
|
||||
tmp<scalarField> tCpByCpv
|
||||
(
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().CpByCpv(p, T, patchi)
|
||||
phasei().boundaryField()[patchi]*phasei().thermo().CpByCpv(T, patchi)
|
||||
);
|
||||
|
||||
for (++phasei; phasei != phases_.end(); ++phasei)
|
||||
{
|
||||
tCpByCpv.ref() +=
|
||||
phasei().boundaryField()[patchi]
|
||||
*phasei().thermo().CpByCpv(p, T, patchi);
|
||||
*phasei().thermo().CpByCpv(T, patchi);
|
||||
}
|
||||
|
||||
return tCpByCpv;
|
||||
|
||||
@ -278,7 +278,6 @@ public:
|
||||
//- Enthalpy/Internal energy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -286,7 +285,6 @@ public:
|
||||
//- Enthalpy/Internal energy for patch [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -305,7 +303,6 @@ public:
|
||||
//- Absolute enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -313,7 +310,6 @@ public:
|
||||
//- Absolute enthalpy for patch [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -325,7 +321,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -334,7 +329,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const label patchi
|
||||
) const;
|
||||
@ -354,7 +348,6 @@ public:
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -365,7 +358,6 @@ public:
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -376,7 +368,6 @@ public:
|
||||
//- Gamma = Cp/Cv for patch []
|
||||
virtual tmp<scalarField> gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -387,7 +378,6 @@ public:
|
||||
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -398,7 +388,6 @@ public:
|
||||
//- Heat capacity ratio for patch []
|
||||
virtual tmp<scalarField> CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
@ -428,8 +428,8 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
const scalarField L
|
||||
(
|
||||
vapor.thermo().he().member() == "e"
|
||||
? vapor.thermo().he(pw, Tsatc, patchi) + pw/rhoVaporw - hw
|
||||
: vapor.thermo().he(pw, Tsatc, patchi) - hw
|
||||
? vapor.thermo().he(Tsatc, patchi) + pw/rhoVaporw - hw
|
||||
: vapor.thermo().he(Tsatc, patchi) - hw
|
||||
);
|
||||
|
||||
// Liquid phase fraction at the wall
|
||||
|
||||
@ -129,8 +129,7 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
|
||||
const vectorField& Uc = turbModel.U();
|
||||
const vectorField& Uw = turbModel.U().boundaryField()[patchi];
|
||||
const scalarField& Tw = turbModel.transport().T().boundaryField()[patchi];
|
||||
const scalarField& pw = turbModel.transport().p().boundaryField()[patchi];
|
||||
const scalarField Cpw(turbModel.transport().Cp(pw, Tw, patchi));
|
||||
const scalarField Cpw(turbModel.transport().Cp(Tw, patchi));
|
||||
|
||||
const scalarField kappaw(Cpw*alphaEffw);
|
||||
const scalarField Pr(muw*Cpw/kappaw);
|
||||
|
||||
@ -108,8 +108,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
|
||||
alphaAniName_
|
||||
);
|
||||
|
||||
const scalarField& pp = thermo.p().boundaryField()[patchi];
|
||||
const symmTensorField kappa(alphaAni*thermo.Cp(pp, Tp, patchi));
|
||||
const symmTensorField kappa(alphaAni*thermo.Cp(Tp, patchi));
|
||||
const vectorField n(patch_.nf());
|
||||
|
||||
return n & kappa & n;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -123,7 +123,7 @@ void Foam::fv::fixedTemperatureConstraint::constrain
|
||||
{
|
||||
const scalar t = mesh_.time().value();
|
||||
scalarField Tuni(cells_.size(), Tuniform_->value(t));
|
||||
eqn.setValues(cells_, thermo.he(thermo.p(), Tuni, cells_));
|
||||
eqn.setValues(cells_, thermo.he(Tuni, cells_));
|
||||
|
||||
break;
|
||||
}
|
||||
@ -133,7 +133,7 @@ void Foam::fv::fixedTemperatureConstraint::constrain
|
||||
mesh().lookupObject<volScalarField>(TName_);
|
||||
|
||||
scalarField Tlkp(T, cells_);
|
||||
eqn.setValues(cells_, thermo.he(thermo.p(), Tlkp, cells_));
|
||||
eqn.setValues(cells_, thermo.he(Tlkp, cells_));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -103,8 +103,8 @@ void Foam::fv::limitTemperature::correct(volScalarField& he)
|
||||
scalarField Tmin(cells_.size(), Tmin_);
|
||||
scalarField Tmax(cells_.size(), Tmax_);
|
||||
|
||||
scalarField heMin(thermo.he(thermo.p(), Tmin, cells_));
|
||||
scalarField heMax(thermo.he(thermo.p(), Tmax, cells_));
|
||||
scalarField heMin(thermo.he(Tmin, cells_));
|
||||
scalarField heMax(thermo.he(Tmax, cells_));
|
||||
|
||||
scalarField& hec = he.primitiveFieldRef();
|
||||
|
||||
@ -125,13 +125,11 @@ void Foam::fv::limitTemperature::correct(volScalarField& he)
|
||||
|
||||
if (!hep.fixesValue())
|
||||
{
|
||||
const scalarField& pp = thermo.p().boundaryField()[patchi];
|
||||
scalarField Tminp(hep.size(), Tmin_);
|
||||
scalarField Tmaxp(hep.size(), Tmax_);
|
||||
|
||||
scalarField Tminp(pp.size(), Tmin_);
|
||||
scalarField Tmaxp(pp.size(), Tmax_);
|
||||
|
||||
scalarField heMinp(thermo.he(pp, Tminp, patchi));
|
||||
scalarField heMaxp(thermo.he(pp, Tmaxp, patchi));
|
||||
scalarField heMinp(thermo.he(Tminp, patchi));
|
||||
scalarField heMaxp(thermo.he(Tmaxp, patchi));
|
||||
|
||||
forAll(hep, facei)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,7 +44,7 @@ inline tmp<scalarField> thermalBaffle::he
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return thermo_->he(p, T, patchi);
|
||||
return thermo_->he(T, patchi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ Foam::semiPermeableBaffleMassFractionFvPatchScalarField::composition
|
||||
const objectRegistry& db
|
||||
)
|
||||
{
|
||||
const word& name = basicThermo::dictName;
|
||||
const word& name = fluidThermo::dictName;
|
||||
|
||||
if (db.foundObject<psiReactionThermo>(name))
|
||||
{
|
||||
@ -239,8 +239,8 @@ Foam::semiPermeableBaffleMassFractionFvPatchScalarField::phiY() const
|
||||
{
|
||||
const basicSpecieMixture& mixture = composition(db());
|
||||
const scalar Wi(mixture.Wi(mixture.species()[YName]));
|
||||
const basicThermo& thermo =
|
||||
db().lookupObject<basicThermo>(basicThermo::dictName);
|
||||
const fluidThermo& thermo =
|
||||
db().lookupObject<fluidThermo>(fluidThermo::dictName);
|
||||
|
||||
psic *= thermo.W(patch().index())/Wi;
|
||||
|
||||
|
||||
@ -172,8 +172,6 @@ Foam::basicThermo::basicThermo
|
||||
|
||||
phaseName_(phaseName),
|
||||
|
||||
p_(lookupOrConstruct(mesh, "p")),
|
||||
|
||||
T_
|
||||
(
|
||||
IOobject
|
||||
@ -227,8 +225,6 @@ Foam::basicThermo::basicThermo
|
||||
|
||||
phaseName_(phaseName),
|
||||
|
||||
p_(lookupOrConstruct(mesh, "p")),
|
||||
|
||||
T_
|
||||
(
|
||||
IOobject
|
||||
@ -470,18 +466,6 @@ Foam::wordList Foam::basicThermo::splitThermoName
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::basicThermo::p()
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::basicThermo::T() const
|
||||
{
|
||||
return T_;
|
||||
|
||||
@ -65,15 +65,13 @@ protected:
|
||||
|
||||
// Fields
|
||||
|
||||
//- Pressure [Pa]
|
||||
volScalarField& p_;
|
||||
|
||||
//- Temperature [K]
|
||||
volScalarField T_;
|
||||
|
||||
//- Laminar thermal diffusivity [kg/m/s]
|
||||
volScalarField alpha_;
|
||||
|
||||
|
||||
//- Should the dpdt term be included in the enthalpy equation
|
||||
Switch dpdt_;
|
||||
|
||||
@ -271,13 +269,6 @@ public:
|
||||
|
||||
// Access to thermodynamic state variables
|
||||
|
||||
//- Pressure [Pa]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& p();
|
||||
|
||||
//- Pressure [Pa]
|
||||
virtual const volScalarField& p() const;
|
||||
|
||||
//- Density [kg/m^3]
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
@ -302,7 +293,6 @@ public:
|
||||
//- Enthalpy/Internal energy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const = 0;
|
||||
@ -310,7 +300,6 @@ public:
|
||||
//- Enthalpy/Internal energy for patch [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -329,7 +318,6 @@ public:
|
||||
//- Absolute enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const = 0;
|
||||
@ -337,7 +325,6 @@ public:
|
||||
//- Absolute enthalpy for patch [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -349,7 +336,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const = 0;
|
||||
@ -358,7 +344,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -379,7 +364,6 @@ public:
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -390,18 +374,6 @@ public:
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Gamma = Cp/Cv []
|
||||
virtual tmp<volScalarField> gamma() const = 0;
|
||||
|
||||
//- Gamma = Cp/Cv for patch []
|
||||
virtual tmp<scalarField> gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -412,7 +384,6 @@ public:
|
||||
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -423,17 +394,10 @@ public:
|
||||
//- Heat capacity ratio for patch []
|
||||
virtual tmp<scalarField> CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Molecular weight [kg/kmol]
|
||||
virtual tmp<volScalarField> W() const = 0;
|
||||
|
||||
//- Molecular weight for patch [kg/kmol]
|
||||
virtual tmp<scalarField> W(const label patchi) const = 0;
|
||||
|
||||
|
||||
// Access to transport state variables
|
||||
|
||||
@ -465,35 +429,6 @@ public:
|
||||
//- 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 [W/m/K]
|
||||
virtual tmp<volScalarField> kappaEff
|
||||
(
|
||||
const volScalarField&
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity for temperature
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture
|
||||
// for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
|
||||
//- Read thermophysical properties dictionary
|
||||
virtual bool read();
|
||||
|
||||
@ -108,7 +108,6 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
|
||||
const basicThermo& thermo = basicThermo::lookupThermo(*this);
|
||||
label patchID = patch().index();
|
||||
|
||||
const scalarField& pp = thermo.p().boundaryField()[patchID];
|
||||
const fixedJumpFvPatchScalarField& TbPatch =
|
||||
refCast<const fixedJumpFvPatchScalarField>
|
||||
(
|
||||
@ -123,7 +122,7 @@ void Foam::energyJumpFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const labelUList& faceCells = this->patch().faceCells();
|
||||
|
||||
jump_ = thermo.he(pp, Tbp.jump(), faceCells);
|
||||
jump_ = thermo.he(Tbp.jump(), faceCells);
|
||||
}
|
||||
|
||||
fixedJumpFvPatchField<scalar>::updateCoeffs();
|
||||
|
||||
@ -108,7 +108,6 @@ void Foam::energyJumpAMIFvPatchScalarField::updateCoeffs()
|
||||
const basicThermo& thermo = basicThermo::lookupThermo(*this);
|
||||
label patchID = patch().index();
|
||||
|
||||
const scalarField& pp = thermo.p().boundaryField()[patchID];
|
||||
const fixedJumpAMIFvPatchScalarField& TbPatch =
|
||||
refCast<const fixedJumpAMIFvPatchScalarField>
|
||||
(
|
||||
@ -123,7 +122,7 @@ void Foam::energyJumpAMIFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const labelUList& faceCells = this->patch().faceCells();
|
||||
|
||||
jump_ = thermo.he(pp, Tbp.jump(), faceCells);
|
||||
jump_ = thermo.he(Tbp.jump(), faceCells);
|
||||
}
|
||||
|
||||
fixedJumpAMIFvPatchField<scalar>::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -100,11 +100,10 @@ void Foam::fixedEnergyFvPatchScalarField::updateCoeffs()
|
||||
const basicThermo& thermo = basicThermo::lookupThermo(*this);
|
||||
const label patchi = patch().index();
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
fvPatchScalarField& Tw =
|
||||
const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]);
|
||||
Tw.evaluate();
|
||||
operator==(thermo.he(pw, Tw, patchi));
|
||||
operator==(thermo.he(Tw, patchi));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -100,17 +100,16 @@ void Foam::gradientEnergyFvPatchScalarField::updateCoeffs()
|
||||
const basicThermo& thermo = basicThermo::lookupThermo(*this);
|
||||
const label patchi = patch().index();
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
fvPatchScalarField& Tw =
|
||||
const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi]);
|
||||
|
||||
Tw.evaluate();
|
||||
|
||||
gradient() = thermo.Cpv(pw, Tw, patchi)*Tw.snGrad()
|
||||
gradient() = thermo.Cpv(Tw, patchi)*Tw.snGrad()
|
||||
+ patch().deltaCoeffs()*
|
||||
(
|
||||
thermo.he(pw, Tw, patchi)
|
||||
- thermo.he(pw, Tw, patch().faceCells())
|
||||
thermo.he(Tw, patchi)
|
||||
- thermo.he(Tw, patch().faceCells())
|
||||
);
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,7 +105,6 @@ void Foam::mixedEnergyFvPatchScalarField::updateCoeffs()
|
||||
const basicThermo& thermo = basicThermo::lookupThermo(*this);
|
||||
const label patchi = patch().index();
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField>
|
||||
(
|
||||
const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi])
|
||||
@ -114,13 +113,13 @@ void Foam::mixedEnergyFvPatchScalarField::updateCoeffs()
|
||||
Tw.evaluate();
|
||||
|
||||
valueFraction() = Tw.valueFraction();
|
||||
refValue() = thermo.he(pw, Tw.refValue(), patchi);
|
||||
refValue() = thermo.he(Tw.refValue(), patchi);
|
||||
refGrad() =
|
||||
thermo.Cpv(pw, Tw, patchi)*Tw.refGrad()
|
||||
thermo.Cpv(Tw, patchi)*Tw.refGrad()
|
||||
+ patch().deltaCoeffs()*
|
||||
(
|
||||
thermo.he(pw, Tw, patchi)
|
||||
- thermo.he(pw, Tw, patch().faceCells())
|
||||
thermo.he(Tw, patchi)
|
||||
- thermo.he(Tw, patch().faceCells())
|
||||
);
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,7 +38,8 @@ namespace Foam
|
||||
|
||||
Foam::fluidThermo::fluidThermo(const fvMesh& mesh, const word& phaseName)
|
||||
:
|
||||
basicThermo(mesh, phaseName)
|
||||
basicThermo(mesh, phaseName),
|
||||
p_(lookupOrConstruct(mesh, "p"))
|
||||
{}
|
||||
|
||||
|
||||
@ -50,7 +51,8 @@ Foam::fluidThermo::fluidThermo
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
basicThermo(mesh, dict, phaseName)
|
||||
basicThermo(mesh, dict, phaseName),
|
||||
p_(lookupOrConstruct(mesh, "p"))
|
||||
{}
|
||||
|
||||
|
||||
@ -74,6 +76,18 @@ Foam::fluidThermo::~fluidThermo()
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::volScalarField& Foam::fluidThermo::p()
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
const Foam::volScalarField& Foam::fluidThermo::p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::fluidThermo::nu() const
|
||||
{
|
||||
return mu()/rho();
|
||||
|
||||
@ -53,6 +53,14 @@ class fluidThermo
|
||||
public compressibleTransportModel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Fields
|
||||
|
||||
//- Pressure [Pa]
|
||||
volScalarField& p_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -103,6 +111,13 @@ public:
|
||||
|
||||
// Access to thermodynamic state variables
|
||||
|
||||
//- Pressure [Pa]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& p();
|
||||
|
||||
//- Pressure [Pa]
|
||||
virtual const volScalarField& p() const;
|
||||
|
||||
//- Add the given density correction to the density field.
|
||||
// Used to update the density field following pressure solution
|
||||
virtual void correctRho(const volScalarField& deltaRho) = 0;
|
||||
@ -111,6 +126,25 @@ public:
|
||||
virtual const volScalarField& psi() const = 0;
|
||||
|
||||
|
||||
// Fields derived from thermodynamic state variables
|
||||
|
||||
//- Gamma = Cp/Cv []
|
||||
virtual tmp<volScalarField> gamma() const = 0;
|
||||
|
||||
//- Gamma = Cp/Cv for patch []
|
||||
virtual tmp<scalarField> gamma
|
||||
(
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Molecular weight [kg/kmol]
|
||||
virtual tmp<volScalarField> W() const = 0;
|
||||
|
||||
//- Molecular weight for patch [kg/kmol]
|
||||
virtual tmp<scalarField> W(const label patchi) const = 0;
|
||||
|
||||
|
||||
// Access to transport state variables
|
||||
|
||||
//- Dynamic viscosity of mixture [kg/m/s]
|
||||
@ -124,6 +158,38 @@ 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 diffusivity for temperature
|
||||
// of mixture [W/m/K]
|
||||
virtual tmp<volScalarField> kappaEff
|
||||
(
|
||||
const volScalarField&
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity for temperature
|
||||
// of mixture for patch [W/m/K]
|
||||
virtual tmp<scalarField> kappaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
|
||||
virtual tmp<volScalarField> alphaEff
|
||||
(
|
||||
const volScalarField& alphat
|
||||
) const = 0;
|
||||
|
||||
//- Effective thermal turbulent diffusivity of mixture
|
||||
// for patch [kg/m/s]
|
||||
virtual tmp<scalarField> alphaEff
|
||||
(
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ template<class BasicThermo, class MixtureType>
|
||||
void Foam::heThermo<BasicThermo, MixtureType>::init()
|
||||
{
|
||||
scalarField& heCells = he_.primitiveFieldRef();
|
||||
const scalarField& pCells = this->p_;
|
||||
const scalarField& pCells = this->p();
|
||||
const scalarField& TCells = this->T_;
|
||||
|
||||
forAll(heCells, celli)
|
||||
@ -48,7 +48,6 @@ void Foam::heThermo<BasicThermo, MixtureType>::init()
|
||||
{
|
||||
heBf[patchi] == he
|
||||
(
|
||||
this->p_.boundaryField()[patchi],
|
||||
this->T_.boundaryField()[patchi],
|
||||
patchi
|
||||
);
|
||||
@ -74,14 +73,14 @@ Foam::heThermo<BasicThermo, MixtureType>::volScalarFieldProperty
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject::groupName(psiName, this->group()),
|
||||
this->p_.mesh(),
|
||||
this->T_.mesh(),
|
||||
psiDim
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& psi = tPsi.ref();
|
||||
|
||||
forAll(this->p_, celli)
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
psi[celli] = (this->cellMixture(celli).*psiMethod)(args[celli] ...);
|
||||
}
|
||||
@ -92,7 +91,7 @@ Foam::heThermo<BasicThermo, MixtureType>::volScalarFieldProperty
|
||||
{
|
||||
fvPatchScalarField& pPsi = psiBf[patchi];
|
||||
|
||||
forAll(this->p_.boundaryField()[patchi], facei)
|
||||
forAll(this->T_.boundaryField()[patchi], facei)
|
||||
{
|
||||
pPsi[facei] =
|
||||
(this->patchFaceMixture(patchi, facei).*psiMethod)
|
||||
@ -144,11 +143,11 @@ Foam::heThermo<BasicThermo, MixtureType>::patchFieldProperty
|
||||
{
|
||||
tmp<scalarField> tPsi
|
||||
(
|
||||
new scalarField(this->p_.boundaryField()[patchi].size())
|
||||
new scalarField(this->T_.boundaryField()[patchi].size())
|
||||
);
|
||||
scalarField& psi = tPsi.ref();
|
||||
|
||||
forAll(this->p_.boundaryField()[patchi], facei)
|
||||
forAll(this->T_.boundaryField()[patchi], facei)
|
||||
{
|
||||
psi[facei] =
|
||||
(this->patchFaceMixture(patchi, facei).*psiMethod)(args[facei] ...);
|
||||
@ -281,7 +280,6 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -290,7 +288,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
(
|
||||
&MixtureType::thermoType::HE,
|
||||
cells,
|
||||
p,
|
||||
UIndirectList<scalar>(this->p(), cells),
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -299,7 +297,6 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -308,7 +305,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
(
|
||||
&MixtureType::thermoType::HE,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -323,7 +320,7 @@ Foam::heThermo<BasicThermo, MixtureType>::ha() const
|
||||
"ha",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoType::Ha,
|
||||
this->p_,
|
||||
this->p(),
|
||||
this->T_
|
||||
);
|
||||
}
|
||||
@ -350,7 +347,6 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -359,7 +355,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
||||
(
|
||||
&MixtureType::thermoType::Ha,
|
||||
cells,
|
||||
p,
|
||||
UIndirectList<scalar>(this->p(), cells),
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -368,7 +364,6 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -377,7 +372,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::ha
|
||||
(
|
||||
&MixtureType::thermoType::Ha,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -399,7 +394,6 @@ Foam::heThermo<BasicThermo, MixtureType>::hc() const
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -408,7 +402,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp
|
||||
(
|
||||
&MixtureType::thermoType::Cp,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -423,7 +417,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cp() const
|
||||
"Cp",
|
||||
dimEnergy/dimMass/dimTemperature,
|
||||
&MixtureType::thermoType::Cp,
|
||||
this->p_,
|
||||
this->p(),
|
||||
this->T_
|
||||
);
|
||||
}
|
||||
@ -433,7 +427,6 @@ template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heThermo<BasicThermo, MixtureType>::Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -442,7 +435,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv
|
||||
(
|
||||
&MixtureType::thermoType::Cv,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -457,7 +450,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
|
||||
"Cv",
|
||||
dimEnergy/dimMass/dimTemperature,
|
||||
&MixtureType::thermoType::Cv,
|
||||
this->p_,
|
||||
this->p(),
|
||||
this->T_
|
||||
);
|
||||
}
|
||||
@ -466,7 +459,6 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -475,7 +467,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::gamma
|
||||
(
|
||||
&MixtureType::thermoType::gamma,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -490,7 +482,7 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
|
||||
"gamma",
|
||||
dimless,
|
||||
&MixtureType::thermoType::gamma,
|
||||
this->p_,
|
||||
this->p(),
|
||||
this->T_
|
||||
);
|
||||
}
|
||||
@ -499,7 +491,6 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -508,7 +499,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cpv
|
||||
(
|
||||
&MixtureType::thermoType::Cpv,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -523,7 +514,7 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
|
||||
"Cpv",
|
||||
dimEnergy/dimMass/dimTemperature,
|
||||
&MixtureType::thermoType::Cpv,
|
||||
this->p_,
|
||||
this->p(),
|
||||
this->T_
|
||||
);
|
||||
}
|
||||
@ -532,7 +523,6 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
|
||||
template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const
|
||||
@ -541,7 +531,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::CpByCpv
|
||||
(
|
||||
&MixtureType::thermoType::CpByCpv,
|
||||
patchi,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T
|
||||
);
|
||||
}
|
||||
@ -556,7 +546,7 @@ Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const
|
||||
"CpByCpv",
|
||||
dimless,
|
||||
&MixtureType::thermoType::CpByCpv,
|
||||
this->p_,
|
||||
this->p(),
|
||||
this->T_
|
||||
);
|
||||
}
|
||||
@ -566,7 +556,6 @@ template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const labelList& cells
|
||||
) const
|
||||
@ -576,7 +565,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
||||
&MixtureType::thermoType::THE,
|
||||
cells,
|
||||
h,
|
||||
p,
|
||||
UIndirectList<scalar>(this->p(), cells),
|
||||
T0
|
||||
);
|
||||
}
|
||||
@ -586,7 +575,6 @@ template<class BasicThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& p,
|
||||
const scalarField& T0,
|
||||
const label patchi
|
||||
) const
|
||||
@ -596,7 +584,7 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
||||
&MixtureType::thermoType::THE,
|
||||
patchi,
|
||||
h,
|
||||
p,
|
||||
this->p().boundaryField()[patchi],
|
||||
T0
|
||||
);
|
||||
}
|
||||
@ -650,7 +638,6 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::kappa
|
||||
return
|
||||
Cp
|
||||
(
|
||||
this->p_.boundaryField()[patchi],
|
||||
this->T_.boundaryField()[patchi],
|
||||
patchi
|
||||
)*this->alpha_.boundaryField()[patchi];
|
||||
@ -676,7 +663,6 @@ Foam::heThermo<BasicThermo, MixtureType>::alphahe(const label patchi) const
|
||||
return
|
||||
this->CpByCpv
|
||||
(
|
||||
this->p_.boundaryField()[patchi],
|
||||
this->T_.boundaryField()[patchi],
|
||||
patchi
|
||||
)
|
||||
@ -710,7 +696,6 @@ Foam::heThermo<BasicThermo, MixtureType>::kappaEff
|
||||
return
|
||||
Cp
|
||||
(
|
||||
this->p_.boundaryField()[patchi],
|
||||
this->T_.boundaryField()[patchi],
|
||||
patchi
|
||||
)
|
||||
@ -744,7 +729,6 @@ Foam::heThermo<BasicThermo, MixtureType>::alphaEff
|
||||
return
|
||||
this->CpByCpv
|
||||
(
|
||||
this->p_.boundaryField()[patchi],
|
||||
this->T_.boundaryField()[patchi],
|
||||
patchi
|
||||
)
|
||||
|
||||
@ -195,7 +195,6 @@ public:
|
||||
//- Enthalpy/Internal energy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -203,7 +202,6 @@ public:
|
||||
//- Enthalpy/Internal energy for patch [J/kg]
|
||||
virtual tmp<scalarField> he
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -222,7 +220,6 @@ public:
|
||||
//- Absolute enthalpy for patch [J/kg/K]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -230,7 +227,6 @@ public:
|
||||
//- Absolute enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> ha
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -242,7 +238,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -251,7 +246,6 @@ public:
|
||||
virtual tmp<scalarField> THE
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& p,
|
||||
const scalarField& T0, // starting temperature
|
||||
const label patchi
|
||||
) const;
|
||||
@ -259,7 +253,6 @@ public:
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -270,7 +263,6 @@ public:
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -284,7 +276,6 @@ public:
|
||||
//- Gamma = Cp/Cv for patch []
|
||||
virtual tmp<scalarField> gamma
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -292,7 +283,6 @@ public:
|
||||
//- Heat capacity at constant pressure/volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
@ -306,7 +296,6 @@ public:
|
||||
//- Heat capacity ratio for patch []
|
||||
virtual tmp<scalarField> CpByCpv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -105,11 +105,10 @@ void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const label patchi = patch().index();
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
fvPatchScalarField& Tw =
|
||||
const_cast<fvPatchScalarField&>(thermo.Tu().boundaryField()[patchi]);
|
||||
Tw.evaluate();
|
||||
operator==(thermo.heu(pw, Tw, patchi));
|
||||
operator==(thermo.heu(Tw, patchi));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,17 +104,16 @@ void Foam::gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const label patchi = patch().index();
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
fvPatchScalarField& Tw =
|
||||
const_cast<fvPatchScalarField&>(thermo.Tu().boundaryField()[patchi]);
|
||||
|
||||
Tw.evaluate();
|
||||
|
||||
gradient() = thermo.Cp(pw, Tw, patchi)*Tw.snGrad()
|
||||
gradient() = thermo.Cp(Tw, patchi)*Tw.snGrad()
|
||||
+ patch().deltaCoeffs()*
|
||||
(
|
||||
thermo.heu(pw, Tw, patchi)
|
||||
- thermo.heu(pw, Tw, patch().faceCells())
|
||||
thermo.heu(Tw, patchi)
|
||||
- thermo.heu(Tw, patch().faceCells())
|
||||
);
|
||||
|
||||
fixedGradientFvPatchScalarField::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -108,7 +108,6 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const label patchi = patch().index();
|
||||
|
||||
const scalarField& pw = thermo.p().boundaryField()[patchi];
|
||||
mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField>
|
||||
(
|
||||
const_cast<fvPatchScalarField&>(thermo.Tu().boundaryField()[patchi])
|
||||
@ -117,12 +116,12 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs()
|
||||
Tw.evaluate();
|
||||
|
||||
valueFraction() = Tw.valueFraction();
|
||||
refValue() = thermo.heu(pw, Tw.refValue(), patchi);
|
||||
refGrad() = thermo.Cp(pw, Tw, patchi)*Tw.refGrad()
|
||||
refValue() = thermo.heu(Tw.refValue(), patchi);
|
||||
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
|
||||
+ patch().deltaCoeffs()*
|
||||
(
|
||||
thermo.heu(pw, Tw, patchi)
|
||||
- thermo.heu(pw, Tw, patch().faceCells())
|
||||
thermo.heu(Tw, patchi)
|
||||
- thermo.heu(Tw, patch().faceCells())
|
||||
);
|
||||
|
||||
mixedFvPatchScalarField::updateCoeffs();
|
||||
|
||||
@ -243,7 +243,6 @@ public:
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
@ -254,7 +253,6 @@ public:
|
||||
//- Heat capacity at constant volume for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cv
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -247,12 +247,12 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& Tu,
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> theu(new scalarField(Tu.size()));
|
||||
const scalarField& p = this->p();
|
||||
scalarField& heu = theu.ref();
|
||||
|
||||
forAll(Tu, celli)
|
||||
@ -268,12 +268,12 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& Tu,
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> theu(new scalarField(Tu.size()));
|
||||
const scalarField& p = this->p().boundaryField()[patchi];
|
||||
scalarField& heu = theu.ref();
|
||||
|
||||
forAll(Tu, facei)
|
||||
|
||||
@ -120,7 +120,6 @@ public:
|
||||
//- Unburnt gas enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> heu
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const;
|
||||
@ -128,7 +127,6 @@ public:
|
||||
//- Unburnt gas enthalpy for patch [J/kg]
|
||||
virtual tmp<scalarField> heu
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
@ -122,7 +122,6 @@ public:
|
||||
//- Unburnt gas enthalpy for cell-set [J/kg]
|
||||
virtual tmp<scalarField> heu
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const labelList& cells
|
||||
) const = 0;
|
||||
@ -130,7 +129,6 @@ public:
|
||||
//- Unburnt gas enthalpy for patch [J/kg]
|
||||
virtual tmp<scalarField> heu
|
||||
(
|
||||
const scalarField& p,
|
||||
const scalarField& T,
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
solidThermo/solidThermo.C
|
||||
solidThermo/solidThermos.C
|
||||
solidPressureThermo/solidPressureThermo.C
|
||||
heSolidThermo/heSolidThermos.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libsolidThermo
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,8 +23,8 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeSolidThermo.H"
|
||||
#include "solidThermo.H"
|
||||
#include "makeHeSolidThermo.H"
|
||||
#include "solidPressureThermo.H"
|
||||
#include "heSolidThermo.H"
|
||||
|
||||
#include "specie.H"
|
||||
@ -52,7 +52,7 @@ namespace Foam
|
||||
|
||||
makeSolidThermo
|
||||
(
|
||||
solidThermo,
|
||||
solidPressureThermo,
|
||||
heSolidThermo,
|
||||
pureMixture,
|
||||
constIsoSolidTransport,
|
||||
@ -64,7 +64,7 @@ makeSolidThermo
|
||||
|
||||
makeSolidThermo
|
||||
(
|
||||
solidThermo,
|
||||
solidPressureThermo,
|
||||
heSolidThermo,
|
||||
pureMixture,
|
||||
constAnIsoSolidTransport,
|
||||
@ -76,7 +76,7 @@ makeSolidThermo
|
||||
|
||||
makeSolidThermo
|
||||
(
|
||||
solidThermo,
|
||||
solidPressureThermo,
|
||||
heSolidThermo,
|
||||
pureMixture,
|
||||
exponentialSolidTransport,
|
||||
@ -88,7 +88,7 @@ makeSolidThermo
|
||||
|
||||
makeSolidThermoPhysicsType
|
||||
(
|
||||
solidThermo,
|
||||
solidPressureThermo,
|
||||
heSolidThermo,
|
||||
pureMixture,
|
||||
hTransportThermoPoly8SolidThermoPhysics
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,8 +29,8 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef makeSolidThermo_H
|
||||
#define makeSolidThermo_H
|
||||
#ifndef makeHeSolidThermo_H
|
||||
#define makeHeSolidThermo_H
|
||||
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "solidPressureThermo.H"
|
||||
#include "fvMesh.H"
|
||||
|
||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(solidPressureThermo, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidPressureThermo::solidPressureThermo
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
solidThermo(mesh, phaseName),
|
||||
p_(lookupOrConstruct(mesh, "p"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::solidPressureThermo::solidPressureThermo
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
solidThermo(mesh, dict, phaseName),
|
||||
p_(lookupOrConstruct(mesh, "p"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::solidPressureThermo::~solidPressureThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::volScalarField& Foam::solidPressureThermo::p() const
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
Foam::volScalarField& Foam::solidPressureThermo::p()
|
||||
{
|
||||
return p_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,110 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::solidPressureThermo
|
||||
|
||||
Description
|
||||
Fundamental solid thermodynamic properties including pressure.
|
||||
|
||||
SourceFiles
|
||||
solidPressureThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef solidPressureThermo_H
|
||||
#define solidPressureThermo_H
|
||||
|
||||
#include "solidThermo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class solidPressureThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class solidPressureThermo
|
||||
:
|
||||
public solidThermo
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Fields
|
||||
|
||||
//- Pressure [Pa]
|
||||
volScalarField& p_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("solidPressureThermo");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from mesh and phase name
|
||||
solidPressureThermo
|
||||
(
|
||||
const fvMesh&,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
//- Construct from mesh, dictionary and phase name
|
||||
solidPressureThermo
|
||||
(
|
||||
const fvMesh&,
|
||||
const dictionary& dict,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~solidPressureThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access to thermodynamic state variables
|
||||
|
||||
//- Pressure [Pa]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& p();
|
||||
|
||||
//- Pressure [Pa]
|
||||
virtual const volScalarField& p() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -108,7 +108,7 @@ public:
|
||||
static autoPtr<solidThermo> New
|
||||
(
|
||||
const fvMesh&,
|
||||
const word& phaseName=word::null
|
||||
const word& phaseName = word::null
|
||||
);
|
||||
|
||||
//- Return a pointer to a new solidThermo created from
|
||||
@ -117,7 +117,7 @@ public:
|
||||
(
|
||||
const fvMesh&,
|
||||
const dictionary&,
|
||||
const word& phaseName=word::null
|
||||
const word& phaseName = word::null
|
||||
);
|
||||
|
||||
|
||||
@ -127,6 +127,16 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access to thermodynamic state variables
|
||||
|
||||
//- Pressure [Pa]
|
||||
// Non-const access allowed for transport equations
|
||||
virtual volScalarField& p() = 0;
|
||||
|
||||
//- Pressure [Pa]
|
||||
virtual const volScalarField& p() const = 0;
|
||||
|
||||
|
||||
// Fields derived from thermodynamic state variables
|
||||
|
||||
//- Density [kg/m^3]
|
||||
|
||||
Reference in New Issue
Block a user