BUG: removed phiName from BCs which inherit from inletOutletFvPatchField

This commit is contained in:
william
2013-11-14 14:42:21 +00:00
parent 19ae0c6da7
commit baf63df379
18 changed files with 40 additions and 87 deletions

View File

@ -46,7 +46,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(0.0), mixingLength_(0.0),
phiName_("phi"),
kName_("k") kName_("k")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
@ -66,7 +65,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -81,9 +79,10 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(readScalar(dict.lookup("mixingLength"))), mixingLength_(readScalar(dict.lookup("mixingLength"))),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k")) kName_(dict.lookupOrDefault<word>("k", "k"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->refValue() = 0.0; this->refValue() = 0.0;
@ -100,7 +99,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -114,7 +112,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -147,7 +144,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(kName_); patch().lookupPatchField<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -164,7 +161,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << 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; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -98,9 +98,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField
//- turbulent length scale //- turbulent length scale
scalar mixingLength_; scalar mixingLength_;
//- Name of the flux field
word phiName_;
//- Name of the turbulent kinetic energy field //- Name of the turbulent kinetic energy field
word kName_; word kName_;

View File

@ -46,7 +46,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(0.0), mixingLength_(0.0),
phiName_("undefined-phi"),
kName_("undefined-k") kName_("undefined-k")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
@ -65,7 +64,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -79,9 +77,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(readScalar(dict.lookup("mixingLength"))), mixingLength_(readScalar(dict.lookup("mixingLength"))),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k")) kName_(dict.lookupOrDefault<word>("k", "k"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->refValue() = 0.0; this->refValue() = 0.0;
@ -97,7 +96,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -110,7 +108,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -143,7 +140,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(kName_); patch().lookupPatchField<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -160,7 +157,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << 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; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -99,9 +99,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField
//- Turbulent length scale //- Turbulent length scale
scalar mixingLength_; scalar mixingLength_;
//- Name of the flux field
word phiName_;
//- Name of the turbulent kinetic energy field //- Name of the turbulent kinetic energy field
word kName_; word kName_;

View File

@ -73,6 +73,8 @@ SRFFreestreamVelocityFvPatchVectorField
relative_(dict.lookupOrDefault("relative", false)), relative_(dict.lookupOrDefault("relative", false)),
UInf_(dict.lookup("UInf")) UInf_(dict.lookup("UInf"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi","phi");
fvPatchVectorField::operator=(vectorField("value", dict, p.size())); fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
} }
@ -158,6 +160,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::write(Ostream& os) const
fvPatchVectorField::write(os); fvPatchVectorField::write(os);
os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl; os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl;
os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl; os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl;
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -66,6 +66,8 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
: :
inletOutletFvPatchField<Type>(p, iF) inletOutletFvPatchField<Type>(p, iF)
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi","phi");
freestreamValue() = Field<Type>("freestreamValue", dict, p.size()); freestreamValue() = Field<Type>("freestreamValue", dict, p.size());
if (dict.found("value")) if (dict.found("value"))
@ -79,8 +81,6 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
{ {
fvPatchField<Type>::operator=(freestreamValue()); fvPatchField<Type>::operator=(freestreamValue());
} }
dict.readIfPresent("phi", this->phiName_);
} }

View File

@ -40,7 +40,6 @@ inletOutletTotalTemperatureFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
UName_("U"), UName_("U"),
phiName_("phi"),
psiName_("psi"), psiName_("psi"),
gamma_(0.0), gamma_(0.0),
T0_(p.size(), 0.0) T0_(p.size(), 0.0)
@ -62,7 +61,6 @@ inletOutletTotalTemperatureFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
UName_(ptf.UName_), UName_(ptf.UName_),
phiName_(ptf.phiName_),
psiName_(ptf.psiName_), psiName_(ptf.psiName_),
gamma_(ptf.gamma_), gamma_(ptf.gamma_),
T0_(ptf.T0_, mapper) T0_(ptf.T0_, mapper)
@ -79,11 +77,12 @@ inletOutletTotalTemperatureFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
UName_(dict.lookupOrDefault<word>("U", "U")), UName_(dict.lookupOrDefault<word>("U", "U")),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
psiName_(dict.lookupOrDefault<word>("psi", "psi")), psiName_(dict.lookupOrDefault<word>("psi", "psi")),
gamma_(readScalar(dict.lookup("gamma"))), gamma_(readScalar(dict.lookup("gamma"))),
T0_("T0", dict, p.size()) T0_("T0", dict, p.size())
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
this->refValue() = pTraits<scalar>::zero; this->refValue() = pTraits<scalar>::zero;
if (dict.found("value")) if (dict.found("value"))
{ {
@ -110,7 +109,6 @@ inletOutletTotalTemperatureFvPatchScalarField
: :
inletOutletFvPatchScalarField(tppsf), inletOutletFvPatchScalarField(tppsf),
UName_(tppsf.UName_), UName_(tppsf.UName_),
phiName_(tppsf.phiName_),
psiName_(tppsf.psiName_), psiName_(tppsf.psiName_),
gamma_(tppsf.gamma_), gamma_(tppsf.gamma_),
T0_(tppsf.T0_) T0_(tppsf.T0_)
@ -126,7 +124,6 @@ inletOutletTotalTemperatureFvPatchScalarField
: :
inletOutletFvPatchScalarField(tppsf, iF), inletOutletFvPatchScalarField(tppsf, iF),
UName_(tppsf.UName_), UName_(tppsf.UName_),
phiName_(tppsf.phiName_),
psiName_(tppsf.psiName_), psiName_(tppsf.psiName_),
gamma_(tppsf.gamma_), gamma_(tppsf.gamma_),
T0_(tppsf.T0_) T0_(tppsf.T0_)
@ -171,7 +168,7 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volVectorField, vector>(UName_); patch().lookupPatchField<volVectorField, vector>(UName_);
const fvsPatchField<scalar>& phip = const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
const fvPatchField<scalar>& psip = const fvPatchField<scalar>& psip =
patch().lookupPatchField<volScalarField, scalar>(psiName_); patch().lookupPatchField<volScalarField, scalar>(psiName_);
@ -191,7 +188,7 @@ const
{ {
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
writeEntryIfDifferent<word>(os, "U", "U", UName_); writeEntryIfDifferent<word>(os, "U", "U", UName_);
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
writeEntryIfDifferent<word>(os, "psi", "psi", psiName_); writeEntryIfDifferent<word>(os, "psi", "psi", psiName_);
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl; os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
T0_.writeEntry("T0", os); T0_.writeEntry("T0", os);

View File

@ -90,9 +90,6 @@ class inletOutletTotalTemperatureFvPatchScalarField
//- Name of the velocity field //- Name of the velocity field
word UName_; word UName_;
//- Name of the flux transporting the field
word phiName_;
//- Name of the compressibility field used to calculate the wave speed //- Name of the compressibility field used to calculate the wave speed
word psiName_; word psiName_;

View File

@ -40,8 +40,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
intensity_(0.0), intensity_(0.0),
UName_("U"), UName_("U")
phiName_("phi")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
this->refGrad() = 0.0; this->refGrad() = 0.0;
@ -59,8 +58,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
intensity_(ptf.intensity_), intensity_(ptf.intensity_),
UName_(ptf.UName_), UName_(ptf.UName_)
phiName_(ptf.phiName_)
{} {}
Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField:: Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
@ -73,9 +71,10 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
intensity_(readScalar(dict.lookup("intensity"))), intensity_(readScalar(dict.lookup("intensity"))),
UName_(dict.lookupOrDefault<word>("U", "U")), UName_(dict.lookupOrDefault<word>("U", "U"))
phiName_(dict.lookupOrDefault<word>("phi", "phi"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
if (intensity_ < 0 || intensity_ > 1) if (intensity_ < 0 || intensity_ > 1)
{ {
FatalErrorIn FatalErrorIn
@ -111,8 +110,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
intensity_(ptf.intensity_), intensity_(ptf.intensity_),
UName_(ptf.UName_), UName_(ptf.UName_)
phiName_(ptf.phiName_)
{} {}
@ -125,8 +123,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
intensity_(ptf.intensity_), intensity_(ptf.intensity_),
UName_(ptf.UName_), UName_(ptf.UName_)
phiName_(ptf.phiName_)
{} {}
@ -144,7 +141,7 @@ updateCoeffs()
patch().lookupPatchField<volVectorField, vector>(UName_); patch().lookupPatchField<volVectorField, vector>(UName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = 1.5*sqr(intensity_)*magSqr(Up); this->refValue() = 1.5*sqr(intensity_)*magSqr(Up);
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -161,7 +158,7 @@ void Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl; os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl;
writeEntryIfDifferent<word>(os, "U", "U", UName_); writeEntryIfDifferent<word>(os, "U", "U", UName_);
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -99,9 +99,6 @@ class turbulentIntensityKineticEnergyInletFvPatchScalarField
//- Name of the velocity field //- Name of the velocity field
word UName_; word UName_;
//- Name of the flux field
word phiName_;
public: public:

View File

@ -48,7 +48,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(0.0), mixingLength_(0.0),
phiName_("phi"),
kName_("k") kName_("k")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
@ -68,7 +67,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -83,9 +81,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(readScalar(dict.lookup("mixingLength"))), mixingLength_(readScalar(dict.lookup("mixingLength"))),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k")) kName_(dict.lookupOrDefault<word>("k", "k"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->refValue() = 0.0; this->refValue() = 0.0;
@ -102,7 +100,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -116,7 +113,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -143,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(kName_); patch().lookupPatchField<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -160,7 +156,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << 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; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -101,9 +101,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField
//- turbulent length scale //- turbulent length scale
scalar mixingLength_; scalar mixingLength_;
//- Name of the flux field
word phiName_;
//- Name of the turbulent kinetic energy field //- Name of the turbulent kinetic energy field
word kName_; word kName_;

View File

@ -48,7 +48,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(0.0), mixingLength_(0.0),
phiName_("phi"),
kName_("k") kName_("k")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
@ -68,7 +67,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -83,9 +81,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(readScalar(dict.lookup("mixingLength"))), mixingLength_(readScalar(dict.lookup("mixingLength"))),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k")) kName_(dict.lookupOrDefault<word>("k", "k"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->refValue() = 0.0; this->refValue() = 0.0;
@ -102,7 +101,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -116,7 +114,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -143,7 +140,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(kName_); patch().lookupPatchField<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -160,7 +157,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << 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; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -100,9 +100,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField
//- Turbulent length scale //- Turbulent length scale
scalar mixingLength_; scalar mixingLength_;
//- Name of the flux field
word phiName_;
//- Name of the turbulent kinetic energy field //- Name of the turbulent kinetic energy field
word kName_; word kName_;

View File

@ -48,7 +48,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(0.0), mixingLength_(0.0),
phiName_("phi"),
kName_("k") kName_("k")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
@ -68,7 +67,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -83,9 +81,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(readScalar(dict.lookup("mixingLength"))), mixingLength_(readScalar(dict.lookup("mixingLength"))),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k")) kName_(dict.lookupOrDefault<word>("k", "k"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->refValue() = 0.0; this->refValue() = 0.0;
@ -102,7 +100,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -116,7 +113,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -143,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(kName_); patch().lookupPatchField<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -160,7 +156,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << 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; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -101,9 +101,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField
//- turbulent length scale //- turbulent length scale
scalar mixingLength_; scalar mixingLength_;
//- Name of the flux field
word phiName_;
//- Name of the turbulent kinetic energy field //- Name of the turbulent kinetic energy field
word kName_; word kName_;

View File

@ -48,7 +48,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(0.0), mixingLength_(0.0),
phiName_("undefined-phi"),
kName_("undefined-k") kName_("undefined-k")
{ {
this->refValue() = 0.0; this->refValue() = 0.0;
@ -67,7 +66,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, p, iF, mapper), inletOutletFvPatchScalarField(ptf, p, iF, mapper),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -81,9 +79,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(p, iF), inletOutletFvPatchScalarField(p, iF),
mixingLength_(readScalar(dict.lookup("mixingLength"))), mixingLength_(readScalar(dict.lookup("mixingLength"))),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k")) kName_(dict.lookupOrDefault<word>("k", "k"))
{ {
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
fvPatchScalarField::operator=(scalarField("value", dict, p.size())); fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
this->refValue() = 0.0; this->refValue() = 0.0;
@ -99,7 +98,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf), inletOutletFvPatchScalarField(ptf),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -112,7 +110,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
: :
inletOutletFvPatchScalarField(ptf, iF), inletOutletFvPatchScalarField(ptf, iF),
mixingLength_(ptf.mixingLength_), mixingLength_(ptf.mixingLength_),
phiName_(ptf.phiName_),
kName_(ptf.kName_) kName_(ptf.kName_)
{} {}
@ -139,7 +136,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
patch().lookupPatchField<volScalarField, scalar>(kName_); patch().lookupPatchField<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip = const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
this->valueFraction() = 1.0 - pos(phip); this->valueFraction() = 1.0 - pos(phip);
@ -156,7 +153,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("mixingLength") os.writeKeyword("mixingLength")
<< mixingLength_ << token::END_STATEMENT << nl; << 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; os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -101,9 +101,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField
//- Turbulent length scale //- Turbulent length scale
scalar mixingLength_; scalar mixingLength_;
//- Name of the flux field
word phiName_;
//- Name of the turbulent kinetic energy field //- Name of the turbulent kinetic energy field
word kName_; word kName_;