Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2013-08-23 10:56:44 +01:00
151 changed files with 1191 additions and 10472 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,7 +35,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(MRFZone, 0);
defineTypeNameAndDebug(MRFZone, 0);
}
@ -423,7 +423,7 @@ void Foam::MRFZone::addCoriolis
}
void Foam::MRFZone::relativeVelocity(volVectorField& U) const
void Foam::MRFZone::makeRelative(volVectorField& U) const
{
const volVectorField& C = mesh_.C();
@ -461,7 +461,7 @@ void Foam::MRFZone::relativeVelocity(volVectorField& U) const
}
void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
void Foam::MRFZone::makeAbsolute(volVectorField& U) const
{
const volVectorField& C = mesh_.C();
@ -499,35 +499,41 @@ void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
}
void Foam::MRFZone::relativeFlux(surfaceScalarField& phi) const
void Foam::MRFZone::makeRelative(surfaceScalarField& phi) const
{
relativeRhoFlux(geometricOneField(), phi);
makeRelativeRhoFlux(geometricOneField(), phi);
}
void Foam::MRFZone::relativeFlux
void Foam::MRFZone::makeRelative(FieldField<fvsPatchField, scalar>& phi) const
{
return makeRelativeRhoFlux(oneFieldField(), phi);
}
void Foam::MRFZone::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
relativeRhoFlux(rho, phi);
makeRelativeRhoFlux(rho, phi);
}
void Foam::MRFZone::absoluteFlux(surfaceScalarField& phi) const
void Foam::MRFZone::makeAbsolute(surfaceScalarField& phi) const
{
absoluteRhoFlux(geometricOneField(), phi);
makeAbsoluteRhoFlux(geometricOneField(), phi);
}
void Foam::MRFZone::absoluteFlux
void Foam::MRFZone::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
absoluteRhoFlux(rho, phi);
makeAbsoluteRhoFlux(rho, phi);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ SourceFiles
#include "dimensionedScalar.H"
#include "dimensionedVector.H"
#include "volFieldsFwd.H"
#include "surfaceFieldsFwd.H"
#include "surfaceFields.H"
#include "fvMatricesFwd.H"
#include "mapPolyMesh.H"
#include "DataEntry.H"
@ -114,15 +114,23 @@ class MRFZone
//- Make the given absolute mass/vol flux relative within the MRF region
template<class RhoFieldType>
void relativeRhoFlux
void makeRelativeRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
) const;
//- Make the given absolute mass/vol flux relative within the MRF region
template<class RhoFieldType>
void makeRelativeRhoFlux
(
const RhoFieldType& rho,
FieldField<fvsPatchField, scalar>& phi
) const;
//- Make the given relative mass/vol flux absolute within the MRF region
template<class RhoFieldType>
void absoluteRhoFlux
void makeAbsoluteRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
@ -208,26 +216,30 @@ public:
) const;
//- Make the given absolute velocity relative within the MRF region
void relativeVelocity(volVectorField& U) const;
void makeRelative(volVectorField& U) const;
//- Make the given relative velocity absolute within the MRF region
void absoluteVelocity(volVectorField& U) const;
void makeAbsolute(volVectorField& U) const;
//- Make the given absolute flux relative within the MRF region
void relativeFlux(surfaceScalarField& phi) const;
void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute boundary flux relative
// within the MRF region
void makeRelative(FieldField<fvsPatchField, scalar>& phi) const;
//- Make the given absolute mass-flux relative within the MRF region
void relativeFlux
void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute within the MRF region
void absoluteFlux(surfaceScalarField& phi) const;
void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute within the MRF region
void absoluteFlux
void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -160,34 +160,51 @@ void Foam::MRFZoneList::addCoriolis
}
void Foam::MRFZoneList::relativeVelocity(volVectorField& U) const
void Foam::MRFZoneList::makeRelative(volVectorField& U) const
{
forAll(*this, i)
{
operator[](i).relativeVelocity(U);
operator[](i).makeRelative(U);
}
}
void Foam::MRFZoneList::absoluteVelocity(volVectorField& U) const
void Foam::MRFZoneList::makeAbsolute(volVectorField& U) const
{
forAll(*this, i)
{
operator[](i).absoluteVelocity(U);
operator[](i).makeAbsolute(U);
}
}
void Foam::MRFZoneList::relativeFlux(surfaceScalarField& phi) const
void Foam::MRFZoneList::makeRelative(surfaceScalarField& phi) const
{
forAll(*this, i)
{
operator[](i).relativeFlux(phi);
operator[](i).makeRelative(phi);
}
}
void Foam::MRFZoneList::relativeFlux
Foam::tmp<Foam::FieldField<Foam::fvsPatchField, Foam::scalar> >
Foam::MRFZoneList::relative
(
const tmp<FieldField<fvsPatchField, scalar> >& phi
) const
{
tmp<FieldField<fvsPatchField, scalar> > rphi(phi);
forAll(*this, i)
{
operator[](i).makeRelative(rphi());
}
return rphi;
}
void Foam::MRFZoneList::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -195,21 +212,21 @@ void Foam::MRFZoneList::relativeFlux
{
forAll(*this, i)
{
operator[](i).relativeFlux(rho, phi);
operator[](i).makeRelative(rho, phi);
}
}
void Foam::MRFZoneList::absoluteFlux(surfaceScalarField& phi) const
void Foam::MRFZoneList::makeAbsolute(surfaceScalarField& phi) const
{
forAll(*this, i)
{
operator[](i).absoluteFlux(phi);
operator[](i).makeAbsolute(phi);
}
}
void Foam::MRFZoneList::absoluteFlux
void Foam::MRFZoneList::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -217,7 +234,7 @@ void Foam::MRFZoneList::absoluteFlux
{
forAll(*this, i)
{
operator[](i).absoluteFlux(rho, phi);
operator[](i).makeAbsolute(rho, phi);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -103,26 +103,33 @@ public:
void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const;
//- Make the given absolute velocity relative within the MRF region
void relativeVelocity(volVectorField& U) const;
void makeRelative(volVectorField& U) const;
//- Make the given relative velocity absolute within the MRF region
void absoluteVelocity(volVectorField& U) const;
void makeAbsolute(volVectorField& U) const;
//- Make the given absolute flux relative within the MRF region
void relativeFlux(surfaceScalarField& phi) const;
void makeRelative(surfaceScalarField& phi) const;
//- Return the given absolute boundary flux relative within
// the MRF region
tmp<FieldField<fvsPatchField, scalar> > relative
(
const tmp<FieldField<fvsPatchField, scalar> >& tphi
) const;
//- Make the given absolute mass-flux relative within the MRF region
void relativeFlux
void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute within the MRF region
void absoluteFlux(surfaceScalarField& phi) const;
void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute within the MRF region
void absoluteFlux
void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class RhoFieldType>
void Foam::MRFZone::relativeRhoFlux
void Foam::MRFZone::makeRelativeRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi
@ -54,6 +54,22 @@ void Foam::MRFZone::relativeRhoFlux
phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
}
makeRelativeRhoFlux(rho.boundaryField(), phi.boundaryField());
}
template<class RhoFieldType>
void Foam::MRFZone::makeRelativeRhoFlux
(
const RhoFieldType& rho,
FieldField<fvsPatchField, scalar>& phi
) const
{
const surfaceVectorField& Cf = mesh_.Cf();
const surfaceVectorField& Sf = mesh_.Sf();
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
// Included patches
forAll(includedFaces_, patchi)
{
@ -61,7 +77,7 @@ void Foam::MRFZone::relativeRhoFlux
{
label patchFacei = includedFaces_[patchi][i];
phi.boundaryField()[patchi][patchFacei] = 0.0;
phi[patchi][patchFacei] = 0.0;
}
}
@ -72,8 +88,8 @@ void Foam::MRFZone::relativeRhoFlux
{
label patchFacei = excludedFaces_[patchi][i];
phi.boundaryField()[patchi][patchFacei] -=
rho.boundaryField()[patchi][patchFacei]
phi[patchi][patchFacei] -=
rho[patchi][patchFacei]
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
& Sf.boundaryField()[patchi][patchFacei];
}
@ -82,7 +98,7 @@ void Foam::MRFZone::relativeRhoFlux
template<class RhoFieldType>
void Foam::MRFZone::absoluteRhoFlux
void Foam::MRFZone::makeAbsoluteRhoFlux
(
const RhoFieldType& rho,
surfaceScalarField& phi

View File

@ -474,13 +474,13 @@ void Foam::fv::option::setValue(fvMatrix<tensor>& eqn, const label fieldI)
}
void Foam::fv::option::relativeFlux(surfaceScalarField& phi) const
void Foam::fv::option::makeRelative(surfaceScalarField& phi) const
{
// do nothing
}
void Foam::fv::option::relativeFlux
void Foam::fv::option::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -490,13 +490,13 @@ void Foam::fv::option::relativeFlux
}
void Foam::fv::option::absoluteFlux(surfaceScalarField& phi) const
void Foam::fv::option::makeAbsolute(surfaceScalarField& phi) const
{
// do nothing
}
void Foam::fv::option::absoluteFlux
void Foam::fv::option::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -425,20 +425,20 @@ public:
// Flux manipulations
//- Make the given absolute flux relative
virtual void relativeFlux(surfaceScalarField& phi) const;
virtual void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
virtual void relativeFlux
virtual void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
virtual void absoluteFlux(surfaceScalarField& phi) const;
virtual void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
virtual void absoluteFlux
virtual void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -107,16 +107,16 @@ void Foam::fv::optionList::reset(const dictionary& dict)
}
void Foam::fv::optionList::relativeFlux(surfaceScalarField& phi) const
void Foam::fv::optionList::makeRelative(surfaceScalarField& phi) const
{
forAll(*this, i)
{
this->operator[](i).relativeFlux(phi);
this->operator[](i).makeRelative(phi);
}
}
void Foam::fv::optionList::relativeFlux
void Foam::fv::optionList::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -124,21 +124,21 @@ void Foam::fv::optionList::relativeFlux
{
forAll(*this, i)
{
this->operator[](i).relativeFlux(rho, phi);
this->operator[](i).makeRelative(rho, phi);
}
}
void Foam::fv::optionList::absoluteFlux(surfaceScalarField& phi) const
void Foam::fv::optionList::makeAbsolute(surfaceScalarField& phi) const
{
forAll(*this, i)
{
this->operator[](i).absoluteFlux(phi);
this->operator[](i).makeAbsolute(phi);
}
}
void Foam::fv::optionList::absoluteFlux
void Foam::fv::optionList::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
@ -146,7 +146,7 @@ void Foam::fv::optionList::absoluteFlux
{
forAll(*this, i)
{
this->operator[](i).absoluteFlux(rho, phi);
this->operator[](i).makeAbsolute(rho, phi);
}
}

View File

@ -157,20 +157,20 @@ public:
// Flux manipulations
//- Make the given absolute flux relative
void relativeFlux(surfaceScalarField& phi) const;
void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
void relativeFlux
void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
void absoluteFlux(surfaceScalarField& phi) const;
void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
void absoluteFlux
void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi

View File

@ -120,35 +120,35 @@ void Foam::fv::MRFSource::addSup
}
void Foam::fv::MRFSource::relativeFlux(surfaceScalarField& phi) const
void Foam::fv::MRFSource::makeRelative(surfaceScalarField& phi) const
{
mrfPtr_->relativeFlux(phi);
mrfPtr_->makeRelative(phi);
}
void Foam::fv::MRFSource::relativeFlux
void Foam::fv::MRFSource::makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
mrfPtr_->relativeFlux(rho, phi);
mrfPtr_->makeRelative(rho, phi);
}
void Foam::fv::MRFSource::absoluteFlux(surfaceScalarField& phi) const
void Foam::fv::MRFSource::makeAbsolute(surfaceScalarField& phi) const
{
mrfPtr_->absoluteFlux(phi);
mrfPtr_->makeAbsolute(phi);
}
void Foam::fv::MRFSource::absoluteFlux
void Foam::fv::MRFSource::makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const
{
mrfPtr_->absoluteFlux(rho, phi);
mrfPtr_->makeAbsolute(rho, phi);
}

View File

@ -138,20 +138,20 @@ public:
// Flux manipulations
//- Make the given absolute flux relative
virtual void relativeFlux(surfaceScalarField& phi) const;
virtual void makeRelative(surfaceScalarField& phi) const;
//- Make the given absolute mass-flux relative
virtual void relativeFlux
virtual void makeRelative
(
const surfaceScalarField& rho,
surfaceScalarField& phi
) const;
//- Make the given relative flux absolute
virtual void absoluteFlux(surfaceScalarField& phi) const;
virtual void makeAbsolute(surfaceScalarField& phi) const;
//- Make the given relative mass-flux absolute
virtual void absoluteFlux
virtual void makeAbsolute
(
const surfaceScalarField& rho,
surfaceScalarField& phi