From 5e05479e2a8b55bf345041307b528ef77e15d879 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 24 Jun 2015 10:44:57 +0100 Subject: [PATCH] Use basicThermo::dictName rather than hard-coding "thermophysicalProperties" --- .../BCs/T/smoluchowskiJumpTFvPatchScalarField.C | 2 +- .../utilities/postProcessing/velocityField/Mach/Mach.C | 2 +- .../externalCoupledTemperatureMixedFvPatchScalarField.C | 2 +- .../temperatureCoupledBase/temperatureCoupledBase.C | 8 ++++---- .../fixedTemperatureConstraint.C | 4 ++-- .../corrections/limitTemperature/limitTemperature.C | 4 ++-- .../effectivenessHeatExchangerSource.C | 4 ++-- .../solidificationMeltingSource.C | 4 ++-- .../interRegionHeatTransferModel.C | 4 ++-- .../variableHeatTransfer/variableHeatTransfer.C | 2 +- src/postProcessing/functionObjects/forces/forces/forces.C | 4 ++-- .../energyRegionCoupledFvPatchScalarField.C | 6 +++--- .../basicChemistryModel/basicChemistryModelTemplates.C | 2 +- .../greyMeanAbsorptionEmission.C | 2 +- .../greyMeanSolidAbsorptionEmission.C | 2 +- .../wideBandAbsorptionEmission.C | 2 +- .../sootModel/mixtureFractionSoot/mixtureFractionSoot.C | 2 +- .../fixedUnburntEnthalpyFvPatchScalarField.C | 2 +- .../gradientUnburntEnthalpyFvPatchScalarField.C | 2 +- .../mixedUnburntEnthalpyFvPatchScalarField.C | 2 +- .../basicSolidChemistryModelNew.C | 2 +- .../pyrolysisChemistryModel/pyrolysisChemistryModel.C | 3 ++- 22 files changed, 34 insertions(+), 33 deletions(-) diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index 71662dec34..949ed75cbf 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -181,7 +181,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs() // Prandtl number reading consistent with rhoCentralFoam const dictionary& thermophysicalProperties = - db().lookupObject("thermophysicalProperties"); + db().lookupObject(basicThermo::dictName); dimensionedScalar Pr ( diff --git a/applications/utilities/postProcessing/velocityField/Mach/Mach.C b/applications/utilities/postProcessing/velocityField/Mach/Mach.C index aeb7c7c7d7..ed1ffa6e0a 100644 --- a/applications/utilities/postProcessing/velocityField/Mach/Mach.C +++ b/applications/utilities/postProcessing/velocityField/Mach/Mach.C @@ -68,7 +68,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) ( IOobject ( - "thermophysicalProperties", + basicThermo::dictName, runTime.constant(), mesh ).headerOk() diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C index 36b6ce8796..9791087190 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C @@ -137,7 +137,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData ) ); - static word thermoName("thermophysicalProperties"); + static word thermoName(basicThermo::dictName); if (db().foundObject(turbName)) { diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index ff6c5e9f26..52aabee0b3 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C @@ -123,10 +123,10 @@ Foam::tmp Foam::temperatureCoupledBase::kappa return turbModel.kappaEff(patchI); } - else if (mesh.foundObject("thermophysicalProperties")) + else if (mesh.foundObject(basicThermo::dictName)) { const fluidThermo& thermo = - mesh.lookupObject("thermophysicalProperties"); + mesh.lookupObject(basicThermo::dictName); return thermo.kappa(patchI); } @@ -147,7 +147,7 @@ Foam::tmp Foam::temperatureCoupledBase::kappa case mtSolidThermo: { const solidThermo& thermo = - mesh.lookupObject("thermophysicalProperties"); + mesh.lookupObject(basicThermo::dictName); return thermo.kappa(patchI); break; @@ -156,7 +156,7 @@ Foam::tmp Foam::temperatureCoupledBase::kappa case mtDirectionalSolidThermo: { const solidThermo& thermo = - mesh.lookupObject("thermophysicalProperties"); + mesh.lookupObject(basicThermo::dictName); const symmTensorField& alphaAni = patch_.lookupPatchField diff --git a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C index 7a10e2f844..f982abbb40 100644 --- a/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C +++ b/src/fvOptions/constraints/derived/fixedTemperatureConstraint/fixedTemperatureConstraint.C @@ -98,7 +98,7 @@ Foam::fv::fixedTemperatureConstraint::fixedTemperatureConstraint // is obtained const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); fieldNames_.setSize(1, thermo.he().name()); @@ -115,7 +115,7 @@ void Foam::fv::fixedTemperatureConstraint::constrain ) { const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); switch (mode_) { diff --git a/src/fvOptions/corrections/limitTemperature/limitTemperature.C b/src/fvOptions/corrections/limitTemperature/limitTemperature.C index 8b5fa67d99..033f2f4f69 100644 --- a/src/fvOptions/corrections/limitTemperature/limitTemperature.C +++ b/src/fvOptions/corrections/limitTemperature/limitTemperature.C @@ -63,7 +63,7 @@ Foam::fv::limitTemperature::limitTemperature // is obtained const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(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("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); scalarField Tmin(cells_.size(), Tmin_); scalarField Tmax(cells_.size(), Tmax_); diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C index dfb6d77b95..106db47075 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C @@ -188,7 +188,7 @@ Foam::fv::effectivenessHeatExchangerSource::effectivenessHeatExchangerSource // is obtained const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); fieldNames_.setSize(1, thermo.he().name()); @@ -210,7 +210,7 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup ) { const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); const surfaceScalarField Cpf(fvc::interpolate(thermo.Cp())); diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index f5adc54af4..b4120b984a 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -73,7 +73,7 @@ Foam::fv::solidificationMeltingSource::Cp() const case mdThermo: { const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); return thermo.Cp(); break; @@ -228,7 +228,7 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource case mdThermo: { const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); fieldNames_[1] = thermo.he().name(); break; diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C index 42f57d6685..213f96a24e 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C @@ -220,10 +220,10 @@ void Foam::fv::interRegionHeatTransferModel::addSup { if (he.dimensions() == dimEnergy/dimMass) { - if (mesh_.foundObject("thermophysicalProperties")) + if (mesh_.foundObject(basicThermo::dictName)) { const basicThermo& thermo = - mesh_.lookupObject("thermophysicalProperties"); + mesh_.lookupObject(basicThermo::dictName); volScalarField htcByCpv(htc_/thermo.Cpv()); diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C index f3852e82a8..6b04ed17e7 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/variableHeatTransfer/variableHeatTransfer.C @@ -109,7 +109,7 @@ void Foam::fv::variableHeatTransfer::calculateHtc() ); const fluidThermo& nbrThermo = - nbrMesh.lookupObject("thermophysicalProperties"); + nbrMesh.lookupObject(basicThermo::dictName); const volVectorField& UNbr = nbrMesh.lookupObject(UNbrName_); diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index 749731567d..dfb4a1cb42 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -266,10 +266,10 @@ Foam::tmp Foam::forces::devRhoReff() const Foam::tmp Foam::forces::mu() const { - if (obr_.foundObject("thermophysicalProperties")) + if (obr_.foundObject(basicThermo::dictName)) { const fluidThermo& thermo = - obr_.lookupObject("thermophysicalProperties"); + obr_.lookupObject(basicThermo::dictName); return thermo.mu(); } diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C index fd01b64975..4be6eb0649 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C @@ -81,7 +81,7 @@ void Foam::energyRegionCoupledFvPatchScalarField::setMethod() const ( ®ionCoupledPatch_.nbrMesh().lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ) ); } @@ -92,7 +92,7 @@ void Foam::energyRegionCoupledFvPatchScalarField::setMethod() const ( &this->db().lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ) ); } @@ -121,7 +121,7 @@ kappa() const const basicThermo& thermo = this->db().lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ); return thermo.kappa(patch().index()); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C index bbabc14421..7232e9f807 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModelTemplates.C @@ -75,7 +75,7 @@ Foam::autoPtr Foam::basicChemistryModel::New ( IOobject ( - IOobject::groupName("thermophysicalProperties", phaseName), + IOobject::groupName(basicThermo::dictName, phaseName), mesh.time().constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index 21bf3194d1..29cbf3241f 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -60,7 +60,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission speciesNames_(0), specieIndex_(label(0)), lookUpTablePtr_(), - thermo_(mesh.lookupObject("thermophysicalProperties")), + thermo_(mesh.lookupObject(basicThermo::dictName)), EhrrCoeff_(readScalar(coeffsDict_.lookup("EhrrCoeff"))), Yj_(nSpecies_) { diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C index f691bb4fc0..b2775f3149 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C @@ -91,7 +91,7 @@ greyMeanSolidAbsorptionEmission : absorptionEmissionModel(dict, mesh), coeffsDict_((dict.subDict(typeName + "Coeffs"))), - thermo_(mesh.lookupObject("thermophysicalProperties")), + thermo_(mesh.lookupObject(basicThermo::dictName)), speciesNames_(0), mixture_(dynamic_cast(thermo_)), solidData_(mixture_.Y().size()) diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index 068a4c8d0b..afca1f9d53 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -62,7 +62,7 @@ Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission mesh.time().constant(), mesh ), - thermo_(mesh.lookupObject("thermophysicalProperties")), + thermo_(mesh.lookupObject(basicThermo::dictName)), Yj_(nSpecies_), totalWaveLength_(0) { diff --git a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C index 065f347091..9df8ce99d1 100644 --- a/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C +++ b/src/thermophysicalModels/radiation/submodels/sootModel/mixtureFractionSoot/mixtureFractionSoot.C @@ -99,7 +99,7 @@ Foam::radiation::mixtureFractionSoot::mixtureFractionSoot coeffsDict_.lookupOrDefault("mappingFieldName", "none") ), mapFieldMax_(1), - thermo_(mesh.lookupObject("thermophysicalProperties")), + thermo_(mesh.lookupObject(basicThermo::dictName)), mixture_(checkThermo(thermo_)) { const Reaction& reaction = mixture_.operator[](0); diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C index 4f0bc06f52..f44980f161 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C @@ -100,7 +100,7 @@ void Foam::fixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() const psiuReactionThermo& thermo = db().lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ); const label patchi = patch().index(); diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C index 1c13f7a0dd..1126475730 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C @@ -99,7 +99,7 @@ void Foam::gradientUnburntEnthalpyFvPatchScalarField::updateCoeffs() const psiuReactionThermo& thermo = db().lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ); const label patchi = patch().index(); diff --git a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C index 3ab1424dc0..d1c989cae1 100644 --- a/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C +++ b/src/thermophysicalModels/reactionThermo/derivedFvPatchFields/mixedUnburntEnthalpy/mixedUnburntEnthalpyFvPatchScalarField.C @@ -103,7 +103,7 @@ void Foam::mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs() const psiuReactionThermo& thermo = db().lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ); const label patchi = patch().index(); diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C index 928972766e..19f585e026 100644 --- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C +++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModelNew.C @@ -76,7 +76,7 @@ New ( IOobject ( - "thermophysicalProperties", + basicThermo::dictName, mesh.time().constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 73293dde0b..342f4f2686 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -25,6 +25,7 @@ License #include "pyrolysisChemistryModel.H" #include "solidReaction.H" +#include "basicThermo.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -141,7 +142,7 @@ pyrolysisChemistryModel dictionary thermoDict = mesh.lookupObject ( - "thermophysicalProperties" + basicThermo::dictName ).subDict(pyrolisisGases_[gasI]); gasThermo_.set