ENH: Updated basic source framework to include MRF hooks

This commit is contained in:
andy
2012-12-05 15:52:56 +00:00
parent 285c99ec90
commit c0f3339c0d
4 changed files with 122 additions and 0 deletions

View File

@ -481,4 +481,36 @@ void Foam::basicSource::setValue(fvMatrix<tensor>& eqn, const label fieldI)
}
void Foam::basicSource::relativeFlux(surfaceScalarField& phi) const
{
// do nothing
}
void Foam::basicSource::relativeFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
// do nothing
}
void Foam::basicSource::absoluteFlux(surfaceScalarField& phi) const
{
// do nothing
}
void Foam::basicSource::absoluteFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
// do nothing
}
// ************************************************************************* //

View File

@ -427,6 +427,29 @@ public:
);
// Flux manipulations
//- Make the given absolute flux relative
virtual void relativeFlux(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
virtual void relativeFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
virtual void absoluteFlux(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
virtual void absoluteFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
// I-O
//- Write the source header information

View File

@ -108,6 +108,50 @@ void Foam::basicSourceList::reset(const dictionary& dict)
}
void Foam::basicSourceList::relativeFlux(surfaceScalarField& phi) const
{
forAll(*this, i)
{
this->operator[](i).relativeFlux(phi);
}
}
void Foam::basicSourceList::relativeFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
forAll(*this, i)
{
this->operator[](i).relativeFlux(rho, phi);
}
}
void Foam::basicSourceList::absoluteFlux(surfaceScalarField& phi) const
{
forAll(*this, i)
{
this->operator[](i).absoluteFlux(phi);
}
}
void Foam::basicSourceList::absoluteFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
forAll(*this, i)
{
this->operator[](i).absoluteFlux(rho, phi);
}
}
bool Foam::basicSourceList::read(const dictionary& dict)
{
checkTimeIndex_ = mesh_.time().timeIndex() + 2;

View File

@ -152,6 +152,29 @@ public:
void constrain(fvMatrix<Type>& eqn, const word& fieldName);
// Flux manipulations
//- Make the given absolute flux relative
void relativeFlux(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
void relativeFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
void absoluteFlux(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
void absoluteFlux
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
// I-O
//- Read dictionary