diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/Chung/Chung.C b/src/thermophysicalModels/barotropicCompressibilityModel/Chung/Chung.C index a93fbfb8b0..2764c4ce5f 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 3d9d7ac28e..967a8e3074 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 1480fc228d..6b06924cb3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -435,8 +435,8 @@ void Foam::ODEChemistryModel::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::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 tfld = X/Winv; + return tfld(); } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index 7792f76351..59871e8dba 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(dom.IRay(rayId)); diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index 0446cdea79..e18684d9f4 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(dom.IRay(rayId)); diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C index 478512e2f8..4b78c93731 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 155956a0d9..89b8e5725c 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 cfbb2b6145..7cea2cb14d 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C @@ -143,8 +143,8 @@ Foam::tmp 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::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 4b93da89de..1283eb8b5c 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 iEhrrCoeffs_; - //- Look-up table of species related to ft + //- Lookup table of species related to ft mutable interpolationLookUpTable lookUpTable_; //- Thermo package diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/mixtureThermos/hhuMixtureThermo/hhuMixtureThermo.C index 6dfcab939c..26d70d5f31 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::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::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 bacc517e0e..246b7884f5 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 tfld = X/rhoInv; + return tfld(); }