COMP: avoid ambiguous construct from tmp - thermophysicalModels

This commit is contained in:
Mark Olesen
2010-12-17 17:15:42 +01:00
parent 329294b3cf
commit fd9fd2c9cb
12 changed files with 26 additions and 21 deletions

View File

@ -65,10 +65,13 @@ Foam::compressibilityModels::Chung::Chung
void Foam::compressibilityModels::Chung::correct() void Foam::compressibilityModels::Chung::correct()
{ {
volScalarField sfa = sqrt volScalarField sfa
( (
(rhovSat_/psiv_) sqrt
/((scalar(1) - gamma_)*rhovSat_/psiv_ + gamma_*rholSat_/psil_) (
(rhovSat_/psiv_)
/((scalar(1) - gamma_)*rhovSat_/psiv_ + gamma_*rholSat_/psil_)
)
); );
psi_ = sqr psi_ = sqr

View File

@ -157,7 +157,7 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
const label patchi = patch().index(); const label patchi = patch().index();
const scalarField& Tw = thermo.T().boundaryField()[patchi]; const scalarField& Tw = thermo.T().boundaryField()[patchi];
scalarField Cpw = thermo.Cp(Tw, patchi); const scalarField Cpw(thermo.Cp(Tw, patchi));
valueFraction() = valueFraction() =
1.0/ 1.0/

View File

@ -435,8 +435,8 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
// calculate the dcdT elements numerically // calculate the dcdT elements numerically
const scalar delta = 1.0e-8; const scalar delta = 1.0e-8;
const scalarField dcdT0 = omega(c2, T - delta, p); const scalarField dcdT0(omega(c2, T - delta, p));
const scalarField dcdT1 = omega(c2, T + delta, p); const scalarField dcdT1(omega(c2, T + delta, p));
for (label i = 0; i < nEqns(); i++) for (label i = 0; i < nEqns(); i++)
{ {
@ -653,7 +653,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
c[i] = rhoi*Yi/specieThermo_[i].W(); 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++) for (label i=0; i<nSpecie_; i++)
{ {

View File

@ -197,7 +197,8 @@ Foam::scalarField Foam::liquidMixture::X(const scalarField& Y) const
X[i] = Y[i]/properties_[i].W(); X[i] = Y[i]/properties_[i].W();
} }
return X/Winv; tmp<scalarField> tfld = X/Winv;
return tfld();
} }

View File

@ -167,7 +167,7 @@ updateCoeffs()
} }
scalarField& Iw = *this; scalarField& Iw = *this;
vectorField n = patch().Sf()/patch().magSf(); const vectorField n(patch().Sf()/patch().magSf());
radiativeIntensityRay& ray = radiativeIntensityRay& ray =
const_cast<radiativeIntensityRay&>(dom.IRay(rayId)); const_cast<radiativeIntensityRay&>(dom.IRay(rayId));

View File

@ -162,7 +162,7 @@ updateCoeffs()
} }
scalarField& Iw = *this; scalarField& Iw = *this;
vectorField n = patch().Sf()/patch().magSf(); const vectorField n(patch().Sf()/patch().magSf());
radiativeIntensityRay& ray = radiativeIntensityRay& ray =
const_cast<radiativeIntensityRay&>(dom.IRay(rayId)); const_cast<radiativeIntensityRay&>(dom.IRay(rayId));

View File

@ -151,7 +151,7 @@ void Foam::radiation::P1::calculate()
a_ = absorptionEmission_->a(); a_ = absorptionEmission_->a();
e_ = absorptionEmission_->e(); e_ = absorptionEmission_->e();
E_ = absorptionEmission_->E(); E_ = absorptionEmission_->E();
const volScalarField sigmaEff = scatter_->sigmaEff(); const volScalarField sigmaEff(scatter_->sigmaEff());
// Construct diffusion // Construct diffusion
const volScalarField gamma const volScalarField gamma

View File

@ -191,7 +191,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
{ {
const volScalarField& k = dom_.aLambda(lambdaI); const volScalarField& k = dom_.aLambda(lambdaI);
surfaceScalarField Ji = dAve_ & mesh_.Sf(); const surfaceScalarField Ji(dAve_ & mesh_.Sf());
fvScalarMatrix IiEq fvScalarMatrix IiEq
( (

View File

@ -143,8 +143,8 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh
) const ) const
{ {
volScalarField& h = thermo.h(); volScalarField& h = thermo.h();
const volScalarField cp = thermo.Cp(); const volScalarField cp(thermo.Cp());
const volScalarField T3 = pow3(T_); const volScalarField T3(pow3(T_));
return return
( (
@ -161,8 +161,8 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Shs
) const ) const
{ {
volScalarField& hs = thermo.hs(); volScalarField& hs = thermo.hs();
const volScalarField cp = thermo.Cp(); const volScalarField cp(thermo.Cp());
const volScalarField T3 = pow3(T_); const volScalarField T3(pow3(T_));
return return
( (

View File

@ -37,7 +37,7 @@ Description
The emission constant proportionality is specified per band (EhrrCoeff). 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). 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 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 //- Proportion of the heat released rate emitted
FixedList<scalar, maxBands_> iEhrrCoeffs_; FixedList<scalar, maxBands_> iEhrrCoeffs_;
//- Look-up table of species related to ft //- Lookup table of species related to ft
mutable interpolationLookUpTable<scalar> lookUpTable_; mutable interpolationLookUpTable<scalar> lookUpTable_;
//- Thermo package //- Thermo package

View File

@ -481,7 +481,7 @@ Foam::hhuMixtureThermo<MixtureType>::psib() const
volScalarField& psib = tpsib(); volScalarField& psib = tpsib();
scalarField& psibCells = psib.internalField(); scalarField& psibCells = psib.internalField();
volScalarField Tb_ = Tb(); const volScalarField Tb_(Tb());
const scalarField& TbCells = Tb_.internalField(); const scalarField& TbCells = Tb_.internalField();
const scalarField& pCells = p_.internalField(); const scalarField& pCells = p_.internalField();
@ -579,7 +579,7 @@ Foam::hhuMixtureThermo<MixtureType>::mub() const
volScalarField& mub_ = tmub(); volScalarField& mub_ = tmub();
scalarField& mubCells = mub_.internalField(); scalarField& mubCells = mub_.internalField();
volScalarField Tb_ = Tb(); const volScalarField Tb_(Tb());
const scalarField& TbCells = Tb_.internalField(); const scalarField& TbCells = Tb_.internalField();
forAll(mubCells, celli) forAll(mubCells, celli)

View File

@ -92,7 +92,8 @@ Foam::scalarField Foam::solidMixture::X
X[i] = Y[i]/properties_[i].rho(); X[i] = Y[i]/properties_[i].rho();
} }
return X/rhoInv; tmp<scalarField> tfld = X/rhoInv;
return tfld();
} }