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 "surfaceFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField(fvPatchScalarField, fanFvPatchScalarField);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField(fvPatchScalarField, fanFvPatchScalarField);
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
//- Specialisation of the jump-condition for the pressure
|
||||
template<>
|
||||
void fanFvPatchField<scalar>::updateCoeffs()
|
||||
void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
@ -58,27 +57,33 @@ void fanFvPatchField<scalar>::updateCoeffs()
|
||||
const fvsPatchField<scalar>& phip =
|
||||
patch().patchField<surfaceScalarField, scalar>(phi);
|
||||
|
||||
scalarField Un =
|
||||
scalarField Un = max
|
||||
(
|
||||
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)
|
||||
{
|
||||
Un /= patch().lookupPatchField<volScalarField, scalar>("rho");
|
||||
Un /=
|
||||
scalarField::subField
|
||||
(
|
||||
patch().lookupPatchField<volScalarField, scalar>("rho"),
|
||||
size()/2
|
||||
);
|
||||
}
|
||||
|
||||
for(label i=1; i<f_.size(); i++)
|
||||
{
|
||||
jump_ += f_[i]*pow(Un, i);
|
||||
}
|
||||
|
||||
jump_ = max(jump_, 0.0);
|
||||
}
|
||||
|
||||
jumpCyclicFvPatchField<scalar>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
Loading…
Reference in New Issue
Block a user