2 // adding face zones for the vertical valves
4 for (label valveI = 0; valveI < nValves(); valveI++)
6 // If both sides of the interface exist, add sliding interface
10 valves_[valveI].curtainInCylinderPatchID().active()
11 && valves_[valveI].curtainInPortPatchID().active()
14 Info<< "Adding sliding interface zones for curtain of valve "
15 << valveI + 1 << endl;
21 "cutPointsV" + Foam::name(valveI + 1),
30 const polyPatch& cylCurtain =
32 [valves_[valveI].curtainInCylinderPatchID().index()];
34 labelList cylCurtainLabels(cylCurtain.size(), cylCurtain.start());
36 forAll (cylCurtainLabels, i)
38 cylCurtainLabels[i] += i;
45 "curtainCylZoneV" + Foam::name(valveI + 1),
47 boolList(cylCurtainLabels.size(), false),
55 const polyPatch& portCurtain =
57 [valves_[valveI].curtainInPortPatchID().index()];
59 labelList portCurtainLabels
65 forAll (portCurtainLabels, i)
67 portCurtainLabels[i] += i;
74 "curtainPortZoneV" + Foam::name(valveI + 1),
76 boolList(portCurtainLabels.size(), false),
84 // Add empty zone for cut faces
90 "cutFaceZoneV" + Foam::name(valveI + 1),
103 Info << "No valve curtain for valve " << valveI + 1 << endl;
108 // for each valve the following zones have to be created:
116 faceSet layeringFacesTop(*this, valves_[valveI].layeringFacesTopName());
118 // if (valves_[valveI].poppetPatchID().active())
120 Info << "Adding face zone for valve top patch layer addition/removal" << endl;
122 // label valvePatchID = valves_[valveI].poppetPatchID().index();
124 // const polyPatch& valveTopPatch = boundaryMesh()[valvePatchID];
126 // labelList valveTopLayerFaces(0);
127 // boolList flipZone1(0);
128 boolList flipZone1(layeringFacesTop.size(), false);
130 forAll(layeringFacesTop.toc(), faceI)
133 vector n = faceAreas()[faceI]/mag(faceAreas()[faceI]);
135 scalar dd = n & vector(0,0,1);
140 if ((faceAreas()[faceI] & vector(0,0,1)) > 0)
142 flipZone1[faceI] = true;
146 flipZone1[faceI] = false;
159 "layeringFacesTopZoneV" + Foam::name(valveI + 1),
160 layeringFacesTop.toc(),
161 boolList(layeringFacesTop.size(), true),
169 faceSet layeringFacesBottom(*this, valves_[valveI].layeringFacesBottomName());
175 "layeringFacesBottomZoneV" + Foam::name(valveI + 1),
176 layeringFacesBottom.toc(),
177 boolList(layeringFacesBottom.size(), true),
185 cellSet movingCellsTop(*this, valves_[valveI].movingCellsTopName());
191 "movingCellsTopZoneV" + Foam::name(valveI + 1),
192 movingCellsTop.toc(),
200 cellSet movingCellsBottom(*this, valves_[valveI].movingCellsBottomName());
206 "movingCellsBottomZoneV" + Foam::name(valveI + 1),
207 movingCellsBottom.toc(),
215 pointSet movingPointsTop(*this, valves_[valveI].movingPointsTopName());
221 "movingPointsTopZoneV" + Foam::name(valveI + 1),
222 movingPointsTop.toc(),
230 pointSet movingPointsBottom(*this, valves_[valveI].movingPointsBottomName());
236 "movingPointsBottomZoneV" + Foam::name(valveI + 1),
237 movingPointsBottom.toc(),
245 cellSet movingCells(*this, valves_[valveI].movingCellsName());
251 "movingCellsZoneV" + Foam::name(valveI + 1),
260 cellSet staticCells(*this, valves_[valveI].staticCellsName());
266 "staticCellsZoneV" + Foam::name(valveI + 1),
276 pointSet movingPoints(*this, valves_[valveI].movingPointsName());
282 "movingPointsV" + Foam::name(valveI + 1),
291 pointSet staticPoints(*this, valves_[valveI].staticPointsName());
297 "staticPointsV" + Foam::name(valveI + 1),
306 pointSet movingInternalPoints(*this, valves_[valveI].movingInternalPointsName());
312 "movingInternalPointsV" + Foam::name(valveI + 1),
313 movingInternalPoints.toc(),