Added support for compressible and multiphase momentum equations.
[OpenFOAM-1.5.x.git] / src / finiteVolume / cfdTools / general / MRF / MRFZones.C
blob5ef8b3ee83ffbac7bdb843f8873d842aedd5208d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "MRFZones.H"
28 #include "Time.H"
29 #include "fvMesh.H"
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 namespace Foam
35     defineTemplateTypeNameAndDebug(IOPtrList<MRFZone>, 0);
38 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
40 Foam::MRFZones::MRFZones(const fvMesh& mesh)
42     IOPtrList<MRFZone>
43     (
44         IOobject
45         (
46             "MRFZones",
47             mesh.time().constant(),
48             mesh,
49             IOobject::MUST_READ,
50             IOobject::NO_WRITE
51         ),
52         MRFZone::iNew(mesh)
53     )
57 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
59 void Foam::MRFZones::addCoriolis(fvVectorMatrix& UEqn) const
61     forAll(*this, i)
62     {
63         operator[](i).addCoriolis(UEqn);
64     }
68 void Foam::MRFZones::addCoriolis
70     const volScalarField& rho,
71     fvVectorMatrix& UEqn
72 ) const
74     forAll(*this, i)
75     {
76         operator[](i).addCoriolis(rho, UEqn);
77     }
81 void Foam::MRFZones::relativeVelocity(volVectorField& U) const
83     forAll(*this, i)
84     {
85         operator[](i).relativeVelocity(U);
86     }
90 void Foam::MRFZones::relativeFlux(surfaceScalarField& phi) const
92     forAll(*this, i)
93     {
94         operator[](i).relativeFlux(phi);
95     }
99 void Foam::MRFZones::absoluteFlux(surfaceScalarField& phi) const
101     forAll(*this, i)
102     {
103         operator[](i).absoluteFlux(phi);
104     }
108 void Foam::MRFZones::correctBoundaryVelocity(volVectorField& U) const
110     forAll(*this, i)
111     {
112         operator[](i).correctBoundaryVelocity(U);
113     }
117 // ************************************************************************* //