diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/Chung/Chung.C b/src/thermophysicalModels/barotropicCompressibilityModel/Chung/Chung.C index a93fbfb8b0d0d7fa66ab073d42bf5298f99e2602..2764c4ce5ff3ab9db5f55766c7ef565a36fcdf4d 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/Chung/Chung.C +++ b/src/thermophysicalModels/barotropicCompressibilityModel/Chung/Chung.C @@ -65,10 +65,13 @@ Foam::compressibilityModels::Chung::Chung void Foam::compressibilityModels::Chung::correct() { - volScalarField sfa = sqrt + volScalarField sfa ( - (rhovSat_/psiv_) - /((scalar(1) - gamma_)*rhovSat_/psiv_ + gamma_*rholSat_/psil_) + sqrt + ( + (rhovSat_/psiv_) + /((scalar(1) - gamma_)*rhovSat_/psiv_ + gamma_*rholSat_/psil_) + ) ); psi_ = sqr diff --git a/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C index 3d9d7ac28ebadbd9dd7f2395dfff2edcd5156f58..967a8e30746097ec00ad3c7c2839b719a3be4999 100644 --- a/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +++ b/src/thermophysicalModels/basic/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C @@ -157,7 +157,7 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs() const label patchi = patch().index(); const scalarField& Tw = thermo.T().boundaryField()[patchi]; - scalarField Cpw = thermo.Cp(Tw, patchi); + const scalarField Cpw(thermo.Cp(Tw, patchi)); valueFraction() = 1.0/ diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index 1480fc228d430c0841d3ecde9e65f83e7bcf7be9..6b06924cb36c94f891cd75ba4aa1bc22591336a7 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -435,8 +435,8 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian // calculate the dcdT elements numerically const scalar delta = 1.0e-8; - const scalarField dcdT0 = omega(c2, T - delta, p); - const scalarField dcdT1 = omega(c2, T + delta, p); + const scalarField dcdT0(omega(c2, T - delta, p)); + const scalarField dcdT1(omega(c2, T + delta, p)); for (label i = 0; i < nEqns(); i++) { @@ -653,7 +653,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate() c[i] = rhoi*Yi/specieThermo_[i].W(); } - const scalarField dcdt = omega(c, Ti, pi); + const scalarField dcdt(omega(c, Ti, pi)); for (label i=0; i<nSpecie_; i++) { diff --git a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C index 05660e55f1361ac06d589bd9411d0a61eda8cc18..d42a978d712f54c98e3aef5fd39491d2bb95f20f 100644 --- a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C +++ b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C @@ -197,7 +197,8 @@ Foam::scalarField Foam::liquidMixture::X(const scalarField& Y) const X[i] = Y[i]/properties_[i].W(); } - return X/Winv; + tmp<scalarField> tfld = X/Winv; + return tfld(); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index 7792f76351050f2ba30dfe3acfe9f4dd2b127d64..59871e8dba30677c3a80255727e9117e9bcd994a 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -167,7 +167,7 @@ updateCoeffs() } scalarField& Iw = *this; - vectorField n = patch().Sf()/patch().magSf(); + const vectorField n(patch().Sf()/patch().magSf()); radiativeIntensityRay& ray = const_cast<radiativeIntensityRay&>(dom.IRay(rayId)); diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index 0446cdea7938d56682507987cf3acbb8903e4fe7..e18684d9f40cf8d1bf24f2e64f79fef7fa4de313 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -162,7 +162,7 @@ updateCoeffs() } scalarField& Iw = *this; - vectorField n = patch().Sf()/patch().magSf(); + const vectorField n(patch().Sf()/patch().magSf()); radiativeIntensityRay& ray = const_cast<radiativeIntensityRay&>(dom.IRay(rayId)); diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C index 478512e2f88345f369c07db4c603012abe50a051..4b78c93731c063d680a96be08058e77798ee64b2 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C @@ -151,7 +151,7 @@ void Foam::radiation::P1::calculate() a_ = absorptionEmission_->a(); e_ = absorptionEmission_->e(); E_ = absorptionEmission_->E(); - const volScalarField sigmaEff = scatter_->sigmaEff(); + const volScalarField sigmaEff(scatter_->sigmaEff()); // Construct diffusion const volScalarField gamma diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C index 155956a0d9d250f53a949312c19179b773792d95..89b8e5725cfc960d238594cf0651a50f22e1f151 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C @@ -191,7 +191,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct() { const volScalarField& k = dom_.aLambda(lambdaI); - surfaceScalarField Ji = dAve_ & mesh_.Sf(); + const surfaceScalarField Ji(dAve_ & mesh_.Sf()); fvScalarMatrix IiEq ( diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C index cfbb2b614552e0ae7055dc2738f39705982f9bfb..7cea2cb14da5abd795f811e1157c268f740ee0ec 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C @@ -143,8 +143,8 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh ) const { volScalarField& h = thermo.h(); - const volScalarField cp = thermo.Cp(); - const volScalarField T3 = pow3(T_); + const volScalarField cp(thermo.Cp()); + const volScalarField T3(pow3(T_)); return ( @@ -161,8 +161,8 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Shs ) const { volScalarField& hs = thermo.hs(); - const volScalarField cp = thermo.Cp(); - const volScalarField T3 = pow3(T_); + const volScalarField cp(thermo.Cp()); + const volScalarField T3(pow3(T_)); return ( diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H index 4b93da89de9a4f2a8bea7f12ed2e0f2cfe5c1b6d..1283eb8b5c2b2f389d024f7363edab2bd24210de 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.H @@ -37,7 +37,7 @@ Description The emission constant proportionality is specified per band (EhrrCoeff). - The coefficients for the species in the LookUpTable have to be specified + The coefficients for the species in the lookup table have to be specified for use in moles x P [atm].i.e. (k[i] = species[i]*p*9.869231e-6). The coefficients for CO and soot or any other added are multiplied by the @@ -156,7 +156,7 @@ private: //- Proportion of the heat released rate emitted FixedList<scalar, maxBands_> iEhrrCoeffs_; - //- Look-up table of species related to ft + //- Lookup table of species related to ft mutable interpolationLookUpTable<scalar> lookUpTable_; //- Thermo package diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C index 6dfcab939cbdce7206e25f5edb39468a6aff4657..26d70d5f31a44c8cb692c2990bb6ab3c1452d104 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C @@ -481,7 +481,7 @@ Foam::hhuMixtureThermo<MixtureType>::psib() const volScalarField& psib = tpsib(); scalarField& psibCells = psib.internalField(); - volScalarField Tb_ = Tb(); + const volScalarField Tb_(Tb()); const scalarField& TbCells = Tb_.internalField(); const scalarField& pCells = p_.internalField(); @@ -579,7 +579,7 @@ Foam::hhuMixtureThermo<MixtureType>::mub() const volScalarField& mub_ = tmub(); scalarField& mubCells = mub_.internalField(); - volScalarField Tb_ = Tb(); + const volScalarField Tb_(Tb()); const scalarField& TbCells = Tb_.internalField(); forAll(mubCells, celli) diff --git a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C index bacc517e0e1d1c949d486cf72861a2ed292f2a2d..246b7884f5eb8ef62ad5966fc355c18e480fd994 100644 --- a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C +++ b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C @@ -92,7 +92,8 @@ Foam::scalarField Foam::solidMixture::X X[i] = Y[i]/properties_[i].rho(); } - return X/rhoInv; + tmp<scalarField> tfld = X/rhoInv; + return tfld(); }