Skip to content
Snippets Groups Projects
Commit 34bd3b59 authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: Fan boundary condition - write phiName and rhoName if required

parent 14aee791
Branches
Tags
No related merge requests found
......@@ -46,7 +46,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const DimensionedField<Type, volMesh>& iF
)
:
uniformJumpFvPatchField<Type>(p, iF)
uniformJumpFvPatchField<Type>(p, iF),
phiName_("phi"),
rhoName_("none")
{}
......@@ -59,7 +61,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const fvPatchFieldMapper& mapper
)
:
uniformJumpFvPatchField<Type>(ptf, p, iF, mapper)
uniformJumpFvPatchField<Type>(ptf, p, iF, mapper),
phiName_(ptf.phiName_),
rhoName_(ptf.rhoName_)
{}
......@@ -71,7 +75,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const dictionary& dict
)
:
uniformJumpFvPatchField<Type>(p, iF, dict)
uniformJumpFvPatchField<Type>(p, iF, dict),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
rhoName_(dict.lookupOrDefault<word>("rho", "none"))
{}
......@@ -81,7 +87,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const fanFvPatchField<Type>& ptf
)
:
uniformJumpFvPatchField<Type>(ptf)
uniformJumpFvPatchField<Type>(ptf),
phiName_(ptf.phiName_),
rhoName_(ptf.rhoName_)
{}
......@@ -92,7 +100,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
const DimensionedField<Type, volMesh>& iF
)
:
uniformJumpFvPatchField<Type>(ptf, iF)
uniformJumpFvPatchField<Type>(ptf, iF),
phiName_(ptf.phiName_),
rhoName_(ptf.rhoName_)
{}
......@@ -113,4 +123,13 @@ void Foam::fanFvPatchField<Type>::updateCoeffs()
}
template<class Type>
void Foam::fanFvPatchField<Type>::write(Ostream& os) const
{
this->template writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
this->template writeEntryIfDifferent<word>(os, "rho", "none", rhoName_);
uniformJumpFvPatchField<Type>::write(os);
}
// ************************************************************************* //
......@@ -187,6 +187,9 @@ public:
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment