Use basicThermo::dictName rather than hard-coding "thermophysicalProperties"

This commit is contained in:
Henry Weller
2015-06-24 10:44:57 +01:00
parent 7a624425cb
commit 61ba5f0268
22 changed files with 34 additions and 33 deletions

View File

@ -98,7 +98,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint
// is obtained
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
fieldNames_.setSize(1, thermo.he().name());
@ -115,7 +115,7 @@ void Foam::fv::fixedTemperatureConstraint::constrain
)
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
switch (mode_)
{

View File

@ -63,7 +63,7 @@ Foam::fv::limitTemperature::limitTemperature
// is obtained
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
fieldNames_.setSize(1, thermo.he().name());
@ -76,7 +76,7 @@ Foam::fv::limitTemperature::limitTemperature
void Foam::fv::limitTemperature::correct(volScalarField& he)
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
scalarField Tmin(cells_.size(), Tmin_);
scalarField Tmax(cells_.size(), Tmax_);

View File

@ -188,7 +188,7 @@ Foam::fv::effectivenessHeatExchangerSource::effectivenessHeatExchangerSource
// is obtained
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
fieldNames_.setSize(1, thermo.he().name());
@ -210,7 +210,7 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
)
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
const surfaceScalarField Cpf(fvc::interpolate(thermo.Cp()));

View File

@ -73,7 +73,7 @@ Foam::fv::solidificationMeltingSource::Cp() const
case mdThermo:
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
return thermo.Cp();
break;
@ -228,7 +228,7 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource
case mdThermo:
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
fieldNames_[1] = thermo.he().name();
break;

View File

@ -220,10 +220,10 @@ void Foam::fv::interRegionHeatTransferModel::addSup
{
if (he.dimensions() == dimEnergy/dimMass)
{
if (mesh_.foundObject<basicThermo>("thermophysicalProperties"))
if (mesh_.foundObject<basicThermo>(basicThermo::dictName))
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
volScalarField htcByCpv(htc_/thermo.Cpv());

View File

@ -109,7 +109,7 @@ void Foam::fv::variableHeatTransfer::calculateHtc()
);
const fluidThermo& nbrThermo =
nbrMesh.lookupObject<fluidThermo>("thermophysicalProperties");
nbrMesh.lookupObject<fluidThermo>(basicThermo::dictName);
const volVectorField& UNbr =
nbrMesh.lookupObject<volVectorField>(UNbrName_);