fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / thoboisSliding / addValvesFacesPointZonesThoboisSliding.H
blob53ec6d98dd5e4eee838dba13076108cfcde86ba9
1     
2     // adding face zones for the vertical valves
3     
4     for (label valveI = 0; valveI < nValves(); valveI++)
5     {
6         // If both sides of the interface exist, add sliding interface
7         // for a valve
8         if
9         (
10             valves_[valveI].curtainInCylinderPatchID().active()
11          && valves_[valveI].curtainInPortPatchID().active()
12         )
13         {
14             Info<< "Adding sliding interface zones for curtain of valve "
15                 << valveI + 1 << endl;
17             pz.append
18             (
19                 new pointZone
20                 (
21                     "cutPointsV" + Foam::name(valveI + 1),
22                     labelList(0),
23                     nPointZones,
24                     pointZones()
25                 )            
26             );
27                             
28             nPointZones++;
30             const polyPatch& cylCurtain =
31                 boundaryMesh()
32                     [valves_[valveI].curtainInCylinderPatchID().index()];
34             labelList cylCurtainLabels(cylCurtain.size(), cylCurtain.start());
36             forAll (cylCurtainLabels, i)
37             {
38                 cylCurtainLabels[i] += i;
39             }
41             fz.append
42             (
43                 new faceZone
44                 (
45                     "curtainCylZoneV" + Foam::name(valveI + 1),
46                     cylCurtainLabels,
47                     boolList(cylCurtainLabels.size(), false),
48                     nFaceZones,
49                     faceZones()
50                 )
51             );
52                 
53             nFaceZones++;
55             const polyPatch& portCurtain =
56                 boundaryMesh()
57                     [valves_[valveI].curtainInPortPatchID().index()];
59             labelList portCurtainLabels
60             (
61                 portCurtain.size(),
62                 portCurtain.start()
63             );
65             forAll (portCurtainLabels, i)
66             {
67                 portCurtainLabels[i] += i;
68             }
70             fz.append
71             (                
72                 new faceZone
73                 (
74                     "curtainPortZoneV" + Foam::name(valveI + 1),
75                     portCurtainLabels,
76                     boolList(portCurtainLabels.size(), false),
77                     nFaceZones,
78                     faceZones()
79                 )
80             );
81                 
82             nFaceZones++;
84             // Add empty zone for cut faces
86             fz.append
87             (
88                 new faceZone
89                 (
90                     "cutFaceZoneV" + Foam::name(valveI + 1),
91                     labelList(0),
92                     boolList(0, false),
93                     nFaceZones,
94                     faceZones()
95                 )    
96             );
98             nFaceZones++;
100         }
101         else
102         {
103             Info << "No valve curtain for valve " << valveI + 1 << endl;
104         }
105         
106      
108         // for each valve the following zones have to be created:
109         //
110         //  - movingFaceZone 
111         //  - movingPointZone
112         //  - staticFaceZone
113         //  - staticPointZone
114         
116         faceSet layeringFacesTop(*this, valves_[valveI].layeringFacesTopName());
118             fz.append
119         (
120             new faceZone
121             (
122                 "layeringFacesTopZoneV" + Foam::name(valveI + 1),
123                 layeringFacesTop.toc(),
124                 boolList(layeringFacesTop.size(), true),
125                 nFaceZones,
126                 faceZones()
127             )
128         );
129         
130         nFaceZones++;
132         faceSet layeringFacesBottom(*this, valves_[valveI].layeringFacesBottomName());
134         fz.append
135         (
136             new faceZone
137             (
138                 "layeringFacesBottomZoneV" + Foam::name(valveI + 1),
139                 layeringFacesBottom.toc(),
140                 boolList(layeringFacesBottom.size(), true),
141                 nFaceZones,
142                 faceZones()
143             )
144         );
145         
146         nFaceZones++;
148         cellSet movingCellsTop(*this, valves_[valveI].movingCellsTopName());
149         
150         cz.append
151         (
152             new cellZone
153             (
154                 "movingCellsTopZoneV" + Foam::name(valveI + 1),
155                 movingCellsTop.toc(),
156                 nCellZones,
157                 cellZones()
158             )
159         );
160         
161         nCellZones++;
163         cellSet movingCellsBottom(*this, valves_[valveI].movingCellsBottomName());
164         
165         cz.append
166         (
167             new cellZone
168             (
169                 "movingCellsBottomZoneV" + Foam::name(valveI + 1),
170                 movingCellsBottom.toc(),
171                 nCellZones,
172                 cellZones()
173             )
174         );
175         
176         nCellZones++;
177         cellSet movingCells(*this, valves_[valveI].movingCellsName());
178         
179         cz.append
180         (
181             new cellZone
182             (
183                 "movingCellsZoneV" + Foam::name(valveI + 1),
184                 movingCells.toc(),
185                 nCellZones,
186                 cellZones()
187             )
188         );
189         
190         nCellZones++;
191         
192         cellSet staticCells(*this, valves_[valveI].staticCellsName());
193         
194         cz.append
195         (
196             new cellZone
197             (
198                 "staticCellsZoneV" + Foam::name(valveI + 1),
199                 staticCells.toc(),
200                 nCellZones,
201                 cellZones()
202             )
203         );
204         
205         nCellZones++;
206             
207  }