diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index 6201e8f42ca640b417e65d0e06b403e96d7f2fd6..4e905b85817c680dfb759a09683f43f3b66ef2eb 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C index c56106f40c0a14aa5ec43782355d8d736110222a..1d35530ae0d34292c529318603372e35d472d3a1 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -160,6 +160,46 @@ void Foam::MRFZoneList::addCoriolis } +Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::operator() +( + const volVectorField& U +) +{ + tmp<volVectorField> tacceleration + ( + new volVectorField + ( + IOobject + ( + "MRFZoneList:acceleration", + U.mesh().time().timeName(), + U.mesh() + ), + U.mesh(), + dimensionedVector("0", U.dimensions()/dimTime, vector::zero) + ) + ); + volVectorField& acceleration = tacceleration(); + + forAll(*this, i) + { + operator[](i).addCoriolis(U, acceleration); + } + + return tacceleration; +} + + +Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::operator() +( + const volScalarField& rho, + const volVectorField& U +) +{ + return rho*operator()(U); +} + + void Foam::MRFZoneList::makeRelative(volVectorField& U) const { forAll(*this, i) diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H index 4965d85e39e8b21a3d80b62def4a117aa85283cc..2cf759c3e94b1353efc086dbac4e5341cb38f2c7 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,6 +102,19 @@ public: //- Add the Coriolis force contribution to the momentum equation void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const; + //- Return the frame acceleration + tmp<volVectorField> operator() + ( + const volVectorField& U + ); + + //- Return the frame acceleration force + tmp<volVectorField> operator() + ( + const volScalarField& rho, + const volVectorField& U + ); + //- Make the given absolute velocity relative within the MRF region void makeRelative(volVectorField& U) const;