mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
fvOptions: Add support for boundary field relative flux function
This commit is contained in:
@ -461,6 +461,28 @@ void Foam::MRFZone::makeRelative(volVectorField& U) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::MRFZone::makeRelative(surfaceScalarField& phi) const
|
||||||
|
{
|
||||||
|
makeRelativeRhoFlux(geometricOneField(), phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::MRFZone::makeRelative(FieldField<fvsPatchField, scalar>& phi) const
|
||||||
|
{
|
||||||
|
makeRelativeRhoFlux(oneFieldField(), phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::MRFZone::makeRelative
|
||||||
|
(
|
||||||
|
const surfaceScalarField& rho,
|
||||||
|
surfaceScalarField& phi
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
makeRelativeRhoFlux(rho, phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZone::makeAbsolute(volVectorField& U) const
|
void Foam::MRFZone::makeAbsolute(volVectorField& U) const
|
||||||
{
|
{
|
||||||
const volVectorField& C = mesh_.C();
|
const volVectorField& C = mesh_.C();
|
||||||
@ -499,28 +521,6 @@ void Foam::MRFZone::makeAbsolute(volVectorField& U) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZone::makeRelative(surfaceScalarField& phi) const
|
|
||||||
{
|
|
||||||
makeRelativeRhoFlux(geometricOneField(), phi);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZone::makeRelative(FieldField<fvsPatchField, scalar>& phi) const
|
|
||||||
{
|
|
||||||
return makeRelativeRhoFlux(oneFieldField(), phi);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZone::makeRelative
|
|
||||||
(
|
|
||||||
const surfaceScalarField& rho,
|
|
||||||
surfaceScalarField& phi
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
makeRelativeRhoFlux(rho, phi);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZone::makeAbsolute(surfaceScalarField& phi) const
|
void Foam::MRFZone::makeAbsolute(surfaceScalarField& phi) const
|
||||||
{
|
{
|
||||||
makeAbsoluteRhoFlux(geometricOneField(), phi);
|
makeAbsoluteRhoFlux(geometricOneField(), phi);
|
||||||
|
|||||||
@ -218,9 +218,6 @@ public:
|
|||||||
//- Make the given absolute velocity relative within the MRF region
|
//- Make the given absolute velocity relative within the MRF region
|
||||||
void makeRelative(volVectorField& U) const;
|
void makeRelative(volVectorField& U) const;
|
||||||
|
|
||||||
//- Make the given relative velocity absolute within the MRF region
|
|
||||||
void makeAbsolute(volVectorField& U) const;
|
|
||||||
|
|
||||||
//- Make the given absolute flux relative within the MRF region
|
//- Make the given absolute flux relative within the MRF region
|
||||||
void makeRelative(surfaceScalarField& phi) const;
|
void makeRelative(surfaceScalarField& phi) const;
|
||||||
|
|
||||||
@ -235,6 +232,9 @@ public:
|
|||||||
surfaceScalarField& phi
|
surfaceScalarField& phi
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Make the given relative velocity absolute within the MRF region
|
||||||
|
void makeAbsolute(volVectorField& U) const;
|
||||||
|
|
||||||
//- Make the given relative flux absolute within the MRF region
|
//- Make the given relative flux absolute within the MRF region
|
||||||
void makeAbsolute(surfaceScalarField& phi) const;
|
void makeAbsolute(surfaceScalarField& phi) const;
|
||||||
|
|
||||||
|
|||||||
@ -169,15 +169,6 @@ void Foam::MRFZoneList::makeRelative(volVectorField& U) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZoneList::makeAbsolute(volVectorField& U) const
|
|
||||||
{
|
|
||||||
forAll(*this, i)
|
|
||||||
{
|
|
||||||
operator[](i).makeAbsolute(U);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const
|
void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
@ -193,7 +184,7 @@ Foam::MRFZoneList::relative
|
|||||||
const tmp<FieldField<fvsPatchField, scalar> >& phi
|
const tmp<FieldField<fvsPatchField, scalar> >& phi
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<FieldField<fvsPatchField, scalar> > rphi(phi);
|
tmp<FieldField<fvsPatchField, scalar> > rphi(phi.ptr());
|
||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
@ -217,6 +208,15 @@ void Foam::MRFZoneList::makeRelative
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::MRFZoneList::makeAbsolute(volVectorField& U) const
|
||||||
|
{
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
operator[](i).makeAbsolute(U);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const
|
void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
|
|||||||
@ -27,6 +27,7 @@ License
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
#include "fvsPatchFields.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
@ -480,6 +481,15 @@ void Foam::fv::option::makeRelative(surfaceScalarField& phi) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::option::makeRelative
|
||||||
|
(
|
||||||
|
FieldField<fvsPatchField, scalar>& phi
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::makeRelative
|
void Foam::fv::option::makeRelative
|
||||||
(
|
(
|
||||||
const surfaceScalarField& rho,
|
const surfaceScalarField& rho,
|
||||||
|
|||||||
@ -427,6 +427,12 @@ public:
|
|||||||
//- Make the given absolute flux relative
|
//- Make the given absolute flux relative
|
||||||
virtual void makeRelative(surfaceScalarField& phi) const;
|
virtual void makeRelative(surfaceScalarField& phi) const;
|
||||||
|
|
||||||
|
//- Make the given absolute boundary flux relative
|
||||||
|
virtual void makeRelative
|
||||||
|
(
|
||||||
|
FieldField<fvsPatchField, scalar>& phi
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Make the given absolute mass-flux relative
|
//- Make the given absolute mass-flux relative
|
||||||
virtual void makeRelative
|
virtual void makeRelative
|
||||||
(
|
(
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
#include "fvOptionList.H"
|
#include "fvOptionList.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
@ -129,6 +130,23 @@ void Foam::fv::optionList::makeRelative
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Foam::scalar> >
|
||||||
|
Foam::fv::optionList::relative
|
||||||
|
(
|
||||||
|
const tmp<FieldField<fvsPatchField, scalar> >& phi
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<FieldField<fvsPatchField, scalar> > rphi(phi.ptr());
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
operator[](i).makeRelative(rphi());
|
||||||
|
}
|
||||||
|
|
||||||
|
return rphi;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::optionList::makeAbsolute(surfaceScalarField& phi) const
|
void Foam::fv::optionList::makeAbsolute(surfaceScalarField& phi) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
|
|||||||
@ -166,6 +166,12 @@ public:
|
|||||||
surfaceScalarField& phi
|
surfaceScalarField& phi
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Return the given absolute boundary flux relative
|
||||||
|
tmp<FieldField<fvsPatchField, scalar> > relative
|
||||||
|
(
|
||||||
|
const tmp<FieldField<fvsPatchField, scalar> >& tphi
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Make the given relative flux absolute
|
//- Make the given relative flux absolute
|
||||||
void makeAbsolute(surfaceScalarField& phi) const;
|
void makeAbsolute(surfaceScalarField& phi) const;
|
||||||
|
|
||||||
|
|||||||
@ -126,6 +126,15 @@ void Foam::fv::MRFSource::makeRelative(surfaceScalarField& phi) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::fv::MRFSource::makeRelative
|
||||||
|
(
|
||||||
|
FieldField<fvsPatchField, scalar>& phi
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
mrfPtr_->makeRelative(phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::MRFSource::makeRelative
|
void Foam::fv::MRFSource::makeRelative
|
||||||
(
|
(
|
||||||
const surfaceScalarField& rho,
|
const surfaceScalarField& rho,
|
||||||
|
|||||||
@ -140,6 +140,12 @@ public:
|
|||||||
//- Make the given absolute flux relative
|
//- Make the given absolute flux relative
|
||||||
virtual void makeRelative(surfaceScalarField& phi) const;
|
virtual void makeRelative(surfaceScalarField& phi) const;
|
||||||
|
|
||||||
|
//- Make the given absolute boundary flux relative
|
||||||
|
virtual void makeRelative
|
||||||
|
(
|
||||||
|
FieldField<fvsPatchField, scalar>& phi
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Make the given absolute mass-flux relative
|
//- Make the given absolute mass-flux relative
|
||||||
virtual void makeRelative
|
virtual void makeRelative
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user