FreeFOAM The Cross-Platform CFD Toolkit
MRFZones.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "MRFZones.H"
27 #include <OpenFOAM/Time.H>
28 #include <finiteVolume/fvMesh.H>
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34  defineTemplateTypeNameAndDebug(IOPtrList<MRFZone>, 0);
35 }
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
39 Foam::MRFZones::MRFZones(const fvMesh& mesh)
40 :
42  (
43  IOobject
44  (
45  "MRFZones",
46  mesh.time().constant(),
47  mesh,
48  IOobject::MUST_READ,
49  IOobject::NO_WRITE
50  ),
51  MRFZone::iNew(mesh)
52  )
53 {}
54 
55 
56 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
57 
59 {
60  forAll(*this, i)
61  {
62  operator[](i).addCoriolis(UEqn);
63  }
64 }
65 
66 
68 (
69  const volScalarField& rho,
71 ) const
72 {
73  forAll(*this, i)
74  {
75  operator[](i).addCoriolis(rho, UEqn);
76  }
77 }
78 
79 
81 {
82  forAll(*this, i)
83  {
84  operator[](i).relativeVelocity(U);
85  }
86 }
87 
88 
90 {
91  forAll(*this, i)
92  {
93  operator[](i).absoluteVelocity(U);
94  }
95 }
96 
97 
99 {
100  forAll(*this, i)
101  {
102  operator[](i).relativeFlux(phi);
103  }
104 }
105 
106 
108 (
109  const surfaceScalarField& rho,
111 ) const
112 {
113  forAll(*this, i)
114  {
115  operator[](i).relativeFlux(rho, phi);
116  }
117 }
118 
119 
121 {
122  forAll(*this, i)
123  {
124  operator[](i).absoluteFlux(phi);
125  }
126 }
127 
128 
130 (
131  const surfaceScalarField& rho,
132  surfaceScalarField& phi
133 ) const
134 {
135  forAll(*this, i)
136  {
137  operator[](i).absoluteFlux(rho, phi);
138  }
139 }
140 
141 
143 {
144  forAll(*this, i)
145  {
146  operator[](i).correctBoundaryVelocity(U);
147  }
148 }
149 
150 
151 // ************************ vim: set sw=4 sts=4 et: ************************ //