Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / verticalValves / addMeshModifiers.H
blob7a9ca6c5f7ea4c7696a44df0dae8924ee878362e
2     label nMods = 0;
4     for (label valveI = 0; valveI < nValves(); valveI++)
5     {
6         // Add valve curtain sliding interface
7         if
8         (
9             valves_[valveI].curtainInCylinderPatchID().active()
10          && valves_[valveI].curtainInPortPatchID().active()
11         )
12         {
13             
14             Info << "Adding a sliding interface mesh modifier to the valve " <<
15             valveI + 1 << endl;
16             
17             topoChanger_.setSize(nMods+1);
18             
19             topoChanger_.set
20             (
21                 nMods,
22                 new slidingInterface
23                 (
24                     "valveSlider" + Foam::name(valveI + 1),
25                     nMods,
26                     topoChanger_,
27                     "curtainPortZoneV" + Foam::name(valveI + 1),
28                     "curtainCylZoneV" + Foam::name(valveI + 1),
29                     "cutPointsV" + Foam::name(valveI + 1),
30                     "cutFaceZoneV" + Foam::name(valveI + 1),
31                     valves_[valveI].curtainInPortPatchID().name(),
32                     valves_[valveI].curtainInCylinderPatchID().name(),
33                     slidingInterface::INTEGRAL, // always integral
34                     true,  // attach-detach action
35                     intersection::VISIBLE
36                 )    
37             );
38             nMods++;
39             
40             Info << "valveSlider" + Foam::name(valveI + 1) << endl;
41             Info << nMods << endl;            
42         }
43         
44         // Add valve poppet layer addition
45         if (valves_[valveI].poppetPatchID().active())
46         {
48             Info << "Adding a layer addition/removal mesh modifier to the poppet of the valve " <<
49             valveI + 1 << endl;
50         
51             topoChanger_.setSize(nMods+1);
52             
53             topoChanger_.set
54             (
55                 nMods,
56                 new layerAdditionRemoval
57                 (
58                     "valvePoppetLayer" + Foam::name(valveI + 1),
59                     nMods,
60                     topoChanger_,
61                     "poppetZoneV" + Foam::name(valveI + 1),
62                     valves_[valveI].minTopLayer(),
63                     valves_[valveI].maxTopLayer()
64                 )    
65             );
66             nMods++;
67             Info << "valvePoppetLayer" + Foam::name(valveI + 1) << endl;
68             Info << nMods << endl;            
69             
70         }
72         // Add valve bottom layer addition
73         if (valves_[valveI].bottomPatchID().active())
74         {
75         
76             Info << "Adding a layer addition/removal mesh modifier to the bottom of the valve " <<
77             valveI + 1 << endl;
78         
79             topoChanger_.setSize(nMods+1);
80             
81             topoChanger_.set
82             (
83                 nMods,
84                 new layerAdditionRemoval
85                 (
86                     "valveBottomLayer" + Foam::name(valveI + 1),
87                     nMods,
88                     topoChanger_,
89                     "bottomZoneV" + Foam::name(valveI + 1),
90                     valves_[valveI].minBottomLayer(),
91                     valves_[valveI].maxBottomLayer()
92                 )    
93             );
94             nMods++;
95             Info << "valveBottomLayer" + Foam::name(valveI + 1) << endl;
96             Info << nMods << endl;            
97             
98         }
99         
100         {
102             Info << "Adding a layer addition/removal mesh modifier to the piston-valve " <<
103             valveI + 1 << endl;
104         
105             topoChanger_.setSize(nMods+1);
106             
107             topoChanger_.set
108             (
109                 nMods,
110                 new layerAdditionRemoval
111                 (
112                     "valvePistonLayer" + Foam::name(valveI + 1),
113                     nMods,
114                     topoChanger_,
115                     "pistonLayerFacesV" + Foam::name(valveI + 1),
116                     piston().minLayer(),
117                     piston().maxLayer()
118                 )    
119             );
120             nMods++;
121             Info << "valvePistonLayer" + Foam::name(valveI + 1) << endl;
122             Info << nMods << endl; 
123         }   
124         
125         // Add attach-detach for valve
126         if
127         (
128             valves_[valveI].detachInCylinderPatchID().active()
129          && valves_[valveI].detachInPortPatchID().active()
130         )
131         {
133             Info << "Adding a attach/detach boundary mesh modifier to the valve " <<
134             valveI + 1 << endl;
135         
136             topoChanger_.setSize(nMods+1);
137             
138             topoChanger_.set
139             (
140                 nMods,
141                 new attachDetach
142                 (
143                     "valveAttachDetach" + Foam::name(valveI + 1),
144                     nMods,
145                     topoChanger_,
146                     "detachFaceZoneV" + Foam::name(valveI + 1),
147                     valves_[valveI].detachInCylinderPatchID().name(),
148                     valves_[valveI].detachInPortPatchID().name(),
149                     scalarField(0),
150                     true                // Manual triggering
151                 )    
152             );
153             nMods++;
154             Info << "Attach detach" << endl;
155         }
156                 
157             
158         
159     }
161     // Add piston layer addition
162     if (piston().patchID().active())
163     {
165         Info << "Adding a layer addition/removal mesh modifier to the piston" << endl;
166     
167         topoChanger_.setSize(nMods+1);
168          
169         topoChanger_.set
170         (
171             nMods,
172             new layerAdditionRemoval
173             (
174                 "pistonLayer",
175                 nMods,
176                 topoChanger_,
177                 "pistonLayerFaces",
178                 piston().minLayer(),
179                 piston().maxLayer()
180             )    
181         );
182         nMods++;
183         Info << "pistonLayer" << endl;
184         Info << nMods << endl;            
185     }
188     Info << "Adding " << nMods << " topology modifiers" << endl;