Corrected the handling of reverse-flow and forced-flow.
This commit is contained in:
parent
6832ad28b0
commit
464ac32ab8
@ -29,19 +29,18 @@ License
|
|||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
makePatchTypeField(fvPatchScalarField, fanFvPatchScalarField);
|
makePatchTypeField(fvPatchScalarField, fanFvPatchScalarField);
|
||||||
|
}
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Specialisation of the jump-condition for the pressure
|
//- Specialisation of the jump-condition for the pressure
|
||||||
template<>
|
template<>
|
||||||
void fanFvPatchField<scalar>::updateCoeffs()
|
void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
|
||||||
{
|
{
|
||||||
if (updated())
|
if (updated())
|
||||||
{
|
{
|
||||||
@ -58,27 +57,33 @@ void fanFvPatchField<scalar>::updateCoeffs()
|
|||||||
const fvsPatchField<scalar>& phip =
|
const fvsPatchField<scalar>& phip =
|
||||||
patch().patchField<surfaceScalarField, scalar>(phi);
|
patch().patchField<surfaceScalarField, scalar>(phi);
|
||||||
|
|
||||||
scalarField Un =
|
scalarField Un = max
|
||||||
|
(
|
||||||
scalarField::subField(phip, size()/2)
|
scalarField::subField(phip, size()/2)
|
||||||
/scalarField::subField(patch().magSf(), size()/2);
|
/scalarField::subField(patch().magSf(), size()/2),
|
||||||
|
0.0
|
||||||
|
);
|
||||||
|
|
||||||
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
|
||||||
{
|
{
|
||||||
Un /= patch().lookupPatchField<volScalarField, scalar>("rho");
|
Un /=
|
||||||
|
scalarField::subField
|
||||||
|
(
|
||||||
|
patch().lookupPatchField<volScalarField, scalar>("rho"),
|
||||||
|
size()/2
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(label i=1; i<f_.size(); i++)
|
for(label i=1; i<f_.size(); i++)
|
||||||
{
|
{
|
||||||
jump_ += f_[i]*pow(Un, i);
|
jump_ += f_[i]*pow(Un, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jump_ = max(jump_, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
jumpCyclicFvPatchField<scalar>::updateCoeffs();
|
jumpCyclicFvPatchField<scalar>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
Loading…
Reference in New Issue
Block a user