mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated fan BC - now derived from uniformJump BC
This commit is contained in:
@ -34,8 +34,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedJumpFvPatchField<Type>(p, iF),
|
||||
jumpTable_(0)
|
||||
uniformJumpFvPatchField<Type>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
@ -48,8 +47,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedJumpFvPatchField<Type>(ptf, p, iF, mapper),
|
||||
jumpTable_(ptf.jumpTable_().clone().ptr())
|
||||
uniformJumpFvPatchField<Type>(ptf, p, iF, mapper)
|
||||
{}
|
||||
|
||||
|
||||
@ -61,8 +59,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedJumpFvPatchField<Type>(p, iF),
|
||||
jumpTable_(DataEntry<Type>::New("jumpTable", dict))
|
||||
uniformJumpFvPatchField<Type>(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
@ -72,9 +69,7 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
||||
const fanFvPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
cyclicLduInterfaceField(),
|
||||
fixedJumpFvPatchField<Type>(ptf),
|
||||
jumpTable_(ptf.jumpTable_().clone().ptr())
|
||||
uniformJumpFvPatchField<Type>(ptf)
|
||||
{}
|
||||
|
||||
|
||||
@ -85,23 +80,8 @@ Foam::fanFvPatchField<Type>::fanFvPatchField
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedJumpFvPatchField<Type>(ptf, iF),
|
||||
jumpTable_(ptf.jumpTable_().clone().ptr())
|
||||
uniformJumpFvPatchField<Type>(ptf, iF)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::fanFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
fixedJumpFvPatchField<Type>::write(os);
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
jumpTable_->writeData(os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -83,7 +83,7 @@ SourceFiles
|
||||
#ifndef fanFvPatchField_H
|
||||
#define fanFvPatchField_H
|
||||
|
||||
#include "fixedJumpFvPatchField.H"
|
||||
#include "uniformJumpFvPatchField.H"
|
||||
#include "DataEntry.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -98,13 +98,8 @@ namespace Foam
|
||||
template<class Type>
|
||||
class fanFvPatchField
|
||||
:
|
||||
public fixedJumpFvPatchField<Type>
|
||||
public uniformJumpFvPatchField<Type>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Interpolation table
|
||||
autoPtr<DataEntry<Type> > jumpTable_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -179,10 +174,6 @@ public:
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -53,8 +53,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedJumpFvPatchField<scalar>(p, iF),
|
||||
jumpTable_(new DataEntry<scalar>("jumpTable"))
|
||||
uniformJumpFvPatchField<scalar>(p, iF)
|
||||
{
|
||||
if (this->cyclicPatch().owner())
|
||||
{
|
||||
@ -83,7 +82,7 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
||||
}
|
||||
}
|
||||
|
||||
jumpTable_.reset
|
||||
this->jumpTable_.reset
|
||||
(
|
||||
new polynomial("jumpTable", coeffs)
|
||||
);
|
||||
@ -91,9 +90,14 @@ Foam::fanFvPatchField<Foam::scalar>::fanFvPatchField
|
||||
else
|
||||
{
|
||||
// Generic input constructed from dictionary
|
||||
jumpTable_ = DataEntry<scalar>::New("jumpTable", dict);
|
||||
this->jumpTable_ = DataEntry<scalar>::New("jumpTable", dict);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Generic input constructed from dictionary
|
||||
this->jumpTable_.reset(new DataEntry<scalar>("jumpTable"));
|
||||
}
|
||||
|
||||
|
||||
if (dict.found("value"))
|
||||
@ -136,10 +140,10 @@ void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
|
||||
Un /= patch().lookupPatchField<volScalarField, scalar>("rho");
|
||||
}
|
||||
|
||||
jump_ = jumpTable_->value(Un);
|
||||
this->jump_ = this->jumpTable_->value(Un);
|
||||
}
|
||||
|
||||
fixedJumpFvPatchField<scalar>::updateCoeffs();
|
||||
uniformJumpFvPatchField<scalar>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user