1 // List<polyMeshModifier*> tm(3*nValves() + 2);
2 // DynamicList<polyMeshModifier*> tm;
6 for (label valveI = 0; valveI < nValves(); valveI++)
8 // Add valve curtain sliding interface
11 valves_[valveI].curtainInCylinderPatchID().active()
12 && valves_[valveI].curtainInPortPatchID().active()
15 Info << "Adding a sliding interface mesh modifier to the valve " <<
18 topoChanger_.setSize(nMods+1);
25 "valveSlider" + Foam::name(valveI + 1),
28 "curtainPortZoneV" + Foam::name(valveI + 1),
29 "curtainCylZoneV" + Foam::name(valveI + 1),
30 "cutPointsV" + Foam::name(valveI + 1),
31 "cutFaceZoneV" + Foam::name(valveI + 1),
32 valves_[valveI].curtainInPortPatchID().name(),
33 valves_[valveI].curtainInCylinderPatchID().name(),
34 slidingInterface::INTEGRAL, // always integral
35 true, // attach-detach action
41 Info<< "valveSlider" + Foam::name(valveI + 1) << nl
45 // Add valve poppet layer addition
46 if (valves_[valveI].poppetPatchID().active())
49 Info<< "Adding a layer addition/removal mesh modifier "
50 << "to the poppet of the valve " << valveI + 1 << endl;
52 topoChanger_.setSize(nMods+1);
57 new layerAdditionRemoval
59 "valvePoppetLayer" + Foam::name(valveI + 1),
62 "layeringFacesTopZoneV" + Foam::name(valveI + 1),
63 valves_[valveI].minTopLayer(),
64 valves_[valveI].maxTopLayer()
69 Info<< "valvePoppetLayer" + Foam::name(valveI + 1) << nl
73 // Add valve bottom layer addition
74 if (valves_[valveI].bottomPatchID().active())
76 Info<< "Adding a layer addition/removal mesh modifier "
77 << "to the bottom of the valve " << valveI + 1 << endl;
79 topoChanger_.setSize(nMods+1);
84 new layerAdditionRemoval
86 "valveBottomLayer" + Foam::name(valveI + 1),
89 "layeringFacesBottomZoneV" + Foam::name(valveI + 1),
90 valves_[valveI].minBottomLayer(),
91 valves_[valveI].maxBottomLayer()
96 Info<< "valveBottomLayer" + Foam::name(valveI + 1) << nl
101 Info<< "Adding a layer addition/removal mesh modifier
102 << "to the piston-valve " << valveI + 1 << endl;
104 topoChanger_.setSize(nMods+1);
108 new layerAdditionRemoval
110 "valvePistonLayer" + Foam::name(valveI + 1),
113 "pistonLayerFacesV" + Foam::name(valveI + 1),
119 Info << "valvePistonLayer" + Foam::name(valveI + 1) << endl;
120 Info << nMods << endl;
123 // Add attach-detach for valve
126 valves_[valveI].detachInCylinderPatchID().active()
127 && valves_[valveI].detachInPortPatchID().active()
131 Info<< "Adding a attach/detach boundary mesh modifier :
132 << "to the valve " << valveI + 1 << endl;
134 topoChanger_.setSize(nMods+1);
140 "valveAttachDetach" + Foam::name(valveI + 1),
143 "detachFaceZoneV" + Foam::name(valveI + 1),
144 valves_[valveI].detachInCylinderPatchID().name(),
145 valves_[valveI].detachInPortPatchID().name(),
147 true // Manual triggering
152 Info << "Attach detach" << endl;
156 // Add piston layer addition
157 if (piston().patchID().active())
160 Info<< "Adding a layer addition/removal mesh modifier "
161 << "to the piston" << endl;
163 topoChanger_.setSize(nMods+1);
167 new layerAdditionRemoval
179 Info<< "pistonLayer" << nl
185 Info << "Adding " << nMods << " topology modifiers" << endl;