From baf63df3792b0e1a1b93947aeb3456b3497b4955 Mon Sep 17 00:00:00 2001 From: william Date: Thu, 14 Nov 2013 14:42:21 +0000 Subject: [PATCH] BUG: removed phiName from BCs which inherit from inletOutletFvPatchField --- ...thDissipationRateInletFvPatchScalarField.C | 11 ++++------ ...thDissipationRateInletFvPatchScalarField.H | 3 --- ...ngLengthFrequencyInletFvPatchScalarField.C | 11 ++++------ ...ngLengthFrequencyInletFvPatchScalarField.H | 3 --- .../SRFFreestreamVelocityFvPatchVectorField.C | 3 +++ .../freestream/freestreamFvPatchField.C | 4 ++-- ...OutletTotalTemperatureFvPatchScalarField.C | 11 ++++------ ...OutletTotalTemperatureFvPatchScalarField.H | 3 --- ...sityKineticEnergyInletFvPatchScalarField.C | 21 ++++++++----------- ...sityKineticEnergyInletFvPatchScalarField.H | 3 --- ...thDissipationRateInletFvPatchScalarField.C | 10 +++------ ...thDissipationRateInletFvPatchScalarField.H | 3 --- ...ngLengthFrequencyInletFvPatchScalarField.C | 11 ++++------ ...ngLengthFrequencyInletFvPatchScalarField.H | 3 --- ...thDissipationRateInletFvPatchScalarField.C | 10 +++------ ...thDissipationRateInletFvPatchScalarField.H | 3 --- ...ngLengthFrequencyInletFvPatchScalarField.C | 11 ++++------ ...ngLengthFrequencyInletFvPatchScalarField.H | 3 --- 18 files changed, 40 insertions(+), 87 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index 4714ec09ed..666a6fca7c 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -46,7 +46,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(0.0), - phiName_("phi"), kName_("k") { this->refValue() = 0.0; @@ -66,7 +65,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -81,9 +79,10 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(readScalar(dict.lookup("mixingLength"))), - phiName_(dict.lookupOrDefault("phi", "phi")), kName_(dict.lookupOrDefault("k", "k")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); + fvPatchScalarField::operator=(scalarField("value", dict, p.size())); this->refValue() = 0.0; @@ -100,7 +99,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -114,7 +112,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -147,7 +144,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(kName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; this->valueFraction() = 1.0 - pos(phip); @@ -164,7 +161,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H index d9b5e481c0..75032e2068 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H @@ -98,9 +98,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField //- turbulent length scale scalar mixingLength_; - //- Name of the flux field - word phiName_; - //- Name of the turbulent kinetic energy field word kName_; diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 0ce1cd6763..7db0599d11 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -46,7 +46,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(0.0), - phiName_("undefined-phi"), kName_("undefined-k") { this->refValue() = 0.0; @@ -65,7 +64,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -79,9 +77,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(readScalar(dict.lookup("mixingLength"))), - phiName_(dict.lookupOrDefault("phi", "phi")), kName_(dict.lookupOrDefault("k", "k")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); + fvPatchScalarField::operator=(scalarField("value", dict, p.size())); this->refValue() = 0.0; @@ -97,7 +96,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -110,7 +108,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -143,7 +140,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(kName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); this->valueFraction() = 1.0 - pos(phip); @@ -160,7 +157,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H index f16d5a4648..9276bc93ec 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H @@ -99,9 +99,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField //- Turbulent length scale scalar mixingLength_; - //- Name of the flux field - word phiName_; - //- Name of the turbulent kinetic energy field word kName_; diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C index c44d237123..b463e79d80 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C @@ -73,6 +73,8 @@ SRFFreestreamVelocityFvPatchVectorField relative_(dict.lookupOrDefault("relative", false)), UInf_(dict.lookup("UInf")) { + this->phiName_ = dict.lookupOrDefault("phi","phi"); + fvPatchVectorField::operator=(vectorField("value", dict, p.size())); } @@ -158,6 +160,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::write(Ostream& os) const fvPatchVectorField::write(os); os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl; os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C index 6472260192..00396a7090 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C @@ -66,6 +66,8 @@ freestreamFvPatchField::freestreamFvPatchField : inletOutletFvPatchField(p, iF) { + this->phiName_ = dict.lookupOrDefault("phi","phi"); + freestreamValue() = Field("freestreamValue", dict, p.size()); if (dict.found("value")) @@ -79,8 +81,6 @@ freestreamFvPatchField::freestreamFvPatchField { fvPatchField::operator=(freestreamValue()); } - - dict.readIfPresent("phi", this->phiName_); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 8b0b842f38..a1c7e2ad2e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -40,7 +40,6 @@ inletOutletTotalTemperatureFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), UName_("U"), - phiName_("phi"), psiName_("psi"), gamma_(0.0), T0_(p.size(), 0.0) @@ -62,7 +61,6 @@ inletOutletTotalTemperatureFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), UName_(ptf.UName_), - phiName_(ptf.phiName_), psiName_(ptf.psiName_), gamma_(ptf.gamma_), T0_(ptf.T0_, mapper) @@ -79,11 +77,12 @@ inletOutletTotalTemperatureFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), UName_(dict.lookupOrDefault("U", "U")), - phiName_(dict.lookupOrDefault("phi", "phi")), psiName_(dict.lookupOrDefault("psi", "psi")), gamma_(readScalar(dict.lookup("gamma"))), T0_("T0", dict, p.size()) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); + this->refValue() = pTraits::zero; if (dict.found("value")) { @@ -110,7 +109,6 @@ inletOutletTotalTemperatureFvPatchScalarField : inletOutletFvPatchScalarField(tppsf), UName_(tppsf.UName_), - phiName_(tppsf.phiName_), psiName_(tppsf.psiName_), gamma_(tppsf.gamma_), T0_(tppsf.T0_) @@ -126,7 +124,6 @@ inletOutletTotalTemperatureFvPatchScalarField : inletOutletFvPatchScalarField(tppsf, iF), UName_(tppsf.UName_), - phiName_(tppsf.phiName_), psiName_(tppsf.psiName_), gamma_(tppsf.gamma_), T0_(tppsf.T0_) @@ -171,7 +168,7 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::updateCoeffs() patch().lookupPatchField(UName_); const fvsPatchField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); const fvPatchField& psip = patch().lookupPatchField(psiName_); @@ -191,7 +188,7 @@ const { fvPatchScalarField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "phi", "phi", phiName_); + writeEntryIfDifferent(os, "phi", "phi", this->phiName_); writeEntryIfDifferent(os, "psi", "psi", psiName_); os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl; T0_.writeEntry("T0", os); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H index 430ee1e51f..39b87eb1d7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.H @@ -90,9 +90,6 @@ class inletOutletTotalTemperatureFvPatchScalarField //- Name of the velocity field word UName_; - //- Name of the flux transporting the field - word phiName_; - //- Name of the compressibility field used to calculate the wave speed word psiName_; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C index 7689d3d763..a506694147 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C @@ -40,8 +40,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), intensity_(0.0), - UName_("U"), - phiName_("phi") + UName_("U") { this->refValue() = 0.0; this->refGrad() = 0.0; @@ -59,8 +58,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), intensity_(ptf.intensity_), - UName_(ptf.UName_), - phiName_(ptf.phiName_) + UName_(ptf.UName_) {} Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField:: @@ -73,9 +71,10 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), intensity_(readScalar(dict.lookup("intensity"))), - UName_(dict.lookupOrDefault("U", "U")), - phiName_(dict.lookupOrDefault("phi", "phi")) + UName_(dict.lookupOrDefault("U", "U")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); + if (intensity_ < 0 || intensity_ > 1) { FatalErrorIn @@ -111,8 +110,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), intensity_(ptf.intensity_), - UName_(ptf.UName_), - phiName_(ptf.phiName_) + UName_(ptf.UName_) {} @@ -125,8 +123,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), intensity_(ptf.intensity_), - UName_(ptf.UName_), - phiName_(ptf.phiName_) + UName_(ptf.UName_) {} @@ -144,7 +141,7 @@ updateCoeffs() patch().lookupPatchField(UName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = 1.5*sqr(intensity_)*magSqr(Up); this->valueFraction() = 1.0 - pos(phip); @@ -161,7 +158,7 @@ void Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl; writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "phi", "phi", phiName_); + writeEntryIfDifferent(os, "phi", "phi", this->phiName_); writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H index 3534d888a3..b6aec0caad 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.H @@ -99,9 +99,6 @@ class turbulentIntensityKineticEnergyInletFvPatchScalarField //- Name of the velocity field word UName_; - //- Name of the flux field - word phiName_; - public: diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index e7003426be..0d6694fa3b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -48,7 +48,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(0.0), - phiName_("phi"), kName_("k") { this->refValue() = 0.0; @@ -68,7 +67,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -83,9 +81,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(readScalar(dict.lookup("mixingLength"))), - phiName_(dict.lookupOrDefault("phi", "phi")), kName_(dict.lookupOrDefault("k", "k")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); fvPatchScalarField::operator=(scalarField("value", dict, p.size())); this->refValue() = 0.0; @@ -102,7 +100,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -116,7 +113,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -143,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(kName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; this->valueFraction() = 1.0 - pos(phip); @@ -160,7 +156,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H index 2031e2a808..63aa24b8eb 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H @@ -101,9 +101,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField //- turbulent length scale scalar mixingLength_; - //- Name of the flux field - word phiName_; - //- Name of the turbulent kinetic energy field word kName_; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index de7c947a9f..70017d5250 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -48,7 +48,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(0.0), - phiName_("phi"), kName_("k") { this->refValue() = 0.0; @@ -68,7 +67,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -83,9 +81,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(readScalar(dict.lookup("mixingLength"))), - phiName_(dict.lookupOrDefault("phi", "phi")), kName_(dict.lookupOrDefault("k", "k")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); + fvPatchScalarField::operator=(scalarField("value", dict, p.size())); this->refValue() = 0.0; @@ -102,7 +101,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -116,7 +114,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -143,7 +140,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(kName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); this->valueFraction() = 1.0 - pos(phip); @@ -160,7 +157,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H index 9aaeb71db0..cafd2d9d10 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H @@ -100,9 +100,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField //- Turbulent length scale scalar mixingLength_; - //- Name of the flux field - word phiName_; - //- Name of the turbulent kinetic energy field word kName_; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index a756341744..e0d6c9a8e9 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -48,7 +48,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(0.0), - phiName_("phi"), kName_("k") { this->refValue() = 0.0; @@ -68,7 +67,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -83,9 +81,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(readScalar(dict.lookup("mixingLength"))), - phiName_(dict.lookupOrDefault("phi", "phi")), kName_(dict.lookupOrDefault("k", "k")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); fvPatchScalarField::operator=(scalarField("value", dict, p.size())); this->refValue() = 0.0; @@ -102,7 +100,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -116,7 +113,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -143,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(kName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; this->valueFraction() = 1.0 - pos(phip); @@ -160,7 +156,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H index 7a74a83849..13496315d7 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H @@ -101,9 +101,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField //- turbulent length scale scalar mixingLength_; - //- Name of the flux field - word phiName_; - //- Name of the turbulent kinetic energy field word kName_; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index bf9f904f7a..95bdac20f4 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -48,7 +48,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(0.0), - phiName_("undefined-phi"), kName_("undefined-k") { this->refValue() = 0.0; @@ -67,7 +66,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, p, iF, mapper), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -81,9 +79,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(p, iF), mixingLength_(readScalar(dict.lookup("mixingLength"))), - phiName_(dict.lookupOrDefault("phi", "phi")), kName_(dict.lookupOrDefault("k", "k")) { + this->phiName_ = dict.lookupOrDefault("phi", "phi"); + fvPatchScalarField::operator=(scalarField("value", dict, p.size())); this->refValue() = 0.0; @@ -99,7 +98,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -112,7 +110,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : inletOutletFvPatchScalarField(ptf, iF), mixingLength_(ptf.mixingLength_), - phiName_(ptf.phiName_), kName_(ptf.kName_) {} @@ -139,7 +136,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(kName_); const fvsPatchScalarField& phip = - patch().lookupPatchField(phiName_); + patch().lookupPatchField(this->phiName_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); this->valueFraction() = 1.0 - pos(phip); @@ -156,7 +153,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write fvPatchScalarField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl; + os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H index e39e13845f..9fdff8d950 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H @@ -101,9 +101,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField //- Turbulent length scale scalar mixingLength_; - //- Name of the flux field - word phiName_; - //- Name of the turbulent kinetic energy field word kName_;