mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Fan boundary condition - write phiName and rhoName if required
This commit is contained in:
@ -46,7 +46,9 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
|||||||
const DimensionedField<Type, volMesh>& iF
|
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
|
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
|
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
|
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
|
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
|
//- Update the coefficients associated with the patch field
|
||||||
virtual void updateCoeffs();
|
virtual void updateCoeffs();
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user