Commit baf63df3 authored by william's avatar william
Browse files

BUG: removed phiName from BCs which inherit from inletOutletFvPatchField

parent 19ae0c6d
......@@ -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<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k"))
{
this->phiName_ = dict.lookupOrDefault<word>("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<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(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);
}
......
......@@ -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_;
......
......@@ -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<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k"))
{
this->phiName_ = dict.lookupOrDefault<word>("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<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(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);
}
......
......@@ -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_;
......
......@@ -73,6 +73,8 @@ SRFFreestreamVelocityFvPatchVectorField
relative_(dict.lookupOrDefault("relative", false)),
UInf_(dict.lookup("UInf"))
{
this->phiName_ = dict.lookupOrDefault<word>("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);
}
......
......@@ -66,6 +66,8 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
:
inletOutletFvPatchField<Type>(p, iF)
{
this->phiName_ = dict.lookupOrDefault<word>("phi","phi");
freestreamValue() = Field<Type>("freestreamValue", dict, p.size());
if (dict.found("value"))
......@@ -79,8 +81,6 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
{
fvPatchField<Type>::operator=(freestreamValue());
}
dict.readIfPresent("phi", this->phiName_);
}
......
......@@ -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<word>("U", "U")),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
psiName_(dict.lookupOrDefault<word>("psi", "psi")),
gamma_(readScalar(dict.lookup("gamma"))),
T0_("T0", dict, p.size())
{
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
this->refValue() = pTraits<scalar>::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<volVectorField, vector>(UName_);
const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
const fvPatchField<scalar>& psip =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
......@@ -191,7 +188,7 @@ const
{
fvPatchScalarField::write(os);
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_);
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
T0_.writeEntry("T0", os);
......
......@@ -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_;
......
......@@ -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<word>("U", "U")),
phiName_(dict.lookupOrDefault<word>("phi", "phi"))
UName_(dict.lookupOrDefault<word>("U", "U"))
{
this->phiName_ = dict.lookupOrDefault<word>("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<volVectorField, vector>(UName_);
const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(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<word>(os, "U", "U", UName_);
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
writeEntry("value", os);
}
......
......@@ -99,9 +99,6 @@ class turbulentIntensityKineticEnergyInletFvPatchScalarField
//- Name of the velocity field
word UName_;
//- Name of the flux field
word phiName_;
public:
......
......@@ -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<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k"))
{
this->phiName_ = dict.lookupOrDefault<word>("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<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(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);
}
......
......@@ -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_;
......
......@@ -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<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k"))
{
this->phiName_ = dict.lookupOrDefault<word>("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<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(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);
}
......
......@@ -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_;
......
......@@ -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<word>("phi", "phi")),
kName_(dict.lookupOrDefault<word>("k", "k"))
{
this->phiName_ = dict.lookupOrDefault<word>("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<volScalarField, scalar>(kName_);
const fvsPatchScalarField& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
patch().lookupPatchField<surfaceScalarField, scalar>(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);
}
......
......@@ -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_;