From 4be6e5f3e61a64afa5e0ee3d54a0fff491cd7e23 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 8 Mar 2011 10:23:19 +0000 Subject: [PATCH] ENH: corrected ambiguous construct from temp --- .../PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C | 4 ++-- .../PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C | 5 ++--- .../XiEqModels/instabilityXiEq/instabilityXiEq.C | 2 +- ...xternalWallHeatFluxTemperatureFvPatchScalarField.H | 11 +++++++++-- ...lentTemperatureRadCoupledMixedFvPatchScalarField.C | 8 ++++---- ...ivePressureForceBaffleVelocityFvPatchVectorField.C | 2 +- .../MarshakRadiationMixedFvPatchScalarField.C | 2 +- .../MarshakRadiationFixedTMixedFvPatchScalarField.C | 2 +- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 06aa68b228..0b5c3e4ac9 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -135,8 +135,8 @@ void PDRkEpsilon::correct() volScalarField GR(drag.Gk()); - volScalarField LI = - C4_*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL)); + volScalarField LI + (C4_*(Lobs + dimensionedScalar("minLength", dimLength, VSMALL))); // Dissipation equation tmp epsEqn diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index 7f4aa91722..f7a69ce406 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -142,11 +142,10 @@ Foam::tmp Foam::XiEqModels::Gulder::XiEq() const volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)))); - volScalarField Reta = + volScalarField Reta ( up - / - ( + / ( sqrt(epsilon*tauEta) + dimensionedScalar("1e-8", up.dimensions(), 1e-8) ) diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index e5f04b7483..bd58072489 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -64,7 +64,7 @@ Foam::XiEqModels::instability::~instability() Foam::tmp Foam::XiEqModels::instability::XiEq() const { - volScalarField turbXiEq = XiEqModel_->XiEq(); + volScalarField turbXiEq(XiEqModel_->XiEq()); return XiEqIn/turbXiEq + turbXiEq; } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H index e98c940f12..4156f784d6 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H @@ -73,9 +73,11 @@ class externalWallHeatFluxTemperatureFvPatchScalarField public mixedFvPatchScalarField, public temperatureCoupledBase { - // Private data +public: - //- how to operate the BC + // Public data + + //- Operation mode enumeration enum operationMode { fixedHeatFlux, @@ -84,6 +86,11 @@ class externalWallHeatFluxTemperatureFvPatchScalarField }; static const NamedEnum operationModeNames; + +private: + + // Private data + //- Operation mode operationMode oldMode_; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index a137719a44..a0b356578b 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -159,7 +159,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs() const fvPatch& nbrPatch = refCast(nbrMesh).boundary()[samplePatchI]; - scalarField Tc = patchInternalField(); + scalarField Tc(patchInternalField()); scalarField& Tp = *this; const turbulentTemperatureRadCoupledMixedFvPatchScalarField& @@ -170,16 +170,16 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs() ); // Swap to obtain full local values of neighbour internal field - scalarField TcNbr = nbrField.patchInternalField(); + scalarField TcNbr(nbrField.patchInternalField()); mpp.map().distribute(TcNbr); // Swap to obtain full local values of neighbour K*delta - scalarField KDeltaNbr = nbrField.K(TcNbr)*nbrPatch.deltaCoeffs(); + scalarField KDeltaNbr(nbrField.K(TcNbr)*nbrPatch.deltaCoeffs()); mpp.map().distribute(KDeltaNbr); - scalarField KDelta = K(*this)*patch().deltaCoeffs(); + scalarField KDelta(K(*this)*patch().deltaCoeffs()); scalarField Qr(Tp.size(), 0.0); if (QrName_ != "none") diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C index 245bf5662d..976a704476 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C @@ -319,7 +319,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs() Info<< "Pressure difference = " << valueDiff << endl; vectorField::subField Sfw = patch().patch().faceAreas(); - vectorField newSfw = (1 - openFraction_)*initWallSf_; + vectorField newSfw((1 - openFraction_)*initWallSf_); forAll(Sfw, facei) { Sfw[facei] = newSfw[facei]; diff --git a/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C index ff6337ebc1..5e6fe645d3 100644 --- a/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationMixedFvPatchScalarField.C @@ -170,7 +170,7 @@ void Foam::MarshakRadiationFvPatchScalarField::updateCoeffs() const scalarField& gamma = patch().lookupPatchField("gammaRad"); - const scalarField Ep = emissivity()/(2.0*(2.0 - emissivity())); + const scalarField Ep(emissivity()/(2.0*(2.0 - emissivity()))); // Set value fraction valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep); diff --git a/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C b/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C index 120e699b93..903be3cf72 100644 --- a/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiationModels/derivedFvPatchFields/MarshakRadiationFixedT/MarshakRadiationFixedTMixedFvPatchScalarField.C @@ -171,7 +171,7 @@ void Foam::MarshakRadiationFixedTMixedFvPatchScalarField::updateCoeffs() const scalarField& gamma = patch().lookupPatchField("gammaRad"); - const scalarField Ep = emissivity()/(2.0*(scalar(2.0) - emissivity())); + const scalarField Ep(emissivity()/(2.0*(scalar(2.0) - emissivity()))); // Set value fraction valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);