@@ -102,6 +102,8 @@ M1Pipe::populate(const FuncDataBase& Control)
102
102
FixedRotate::populate (Control);
103
103
104
104
pipeRadius=Control.EvalVar <double >(keyName+" PipeRadius" );
105
+ pipeThick=Control.EvalVar <double >(keyName+" PipeThick" );
106
+ pipeOuter=Control.EvalVar <double >(keyName+" PipeOuter" );
105
107
106
108
connectRadius=Control.EvalVar <double >(keyName+" ConnectRadius" );
107
109
connectLength=Control.EvalVar <double >(keyName+" ConnectLength" );
@@ -120,9 +122,9 @@ M1Pipe::populate(const FuncDataBase& Control)
120
122
exitAngle=Control.EvalVar <double >(keyName+" ExitAngle" );
121
123
exitRadius=Control.EvalVar <double >(keyName+" ExitRadius" );
122
124
exitFullLength=Control.EvalVar <double >(keyName+" ExitFullLength" );
123
-
124
- pipeMat=ModelSupport::EvalMat<int >(Control,keyName+" PipeMat" );
125
+
125
126
innerMat=ModelSupport::EvalMat<int >(Control,keyName+" InnerMat" );
127
+ pipeMat=ModelSupport::EvalMat<int >(Control,keyName+" PipeMat" );
126
128
voidMat=ModelSupport::EvalMat<int >(Control,keyName+" VoidMat" );
127
129
128
130
return ;
@@ -138,7 +140,9 @@ M1Pipe::createSurfaces()
138
140
139
141
// Origin is pipe connection point:
140
142
141
- ModelSupport::buildCylinder (SMap,buildIndex+7 ,Origin,Z,connectRadius);
143
+ ModelSupport::buildCylinder (SMap,buildIndex+7 ,Origin,Z,pipeRadius);
144
+ ModelSupport::buildCylinder (SMap,buildIndex+17 ,Origin,Z,connectRadius);
145
+
142
146
ModelSupport::buildPlane (SMap,buildIndex+5 ,Origin-Z*connectLength,Z);
143
147
144
148
ModelSupport::buildPlane (SMap,buildIndex+101 ,Origin-Y*(cubeDepth/2.0 ),Y);
@@ -149,8 +153,13 @@ M1Pipe::createSurfaces()
149
153
Origin-Z*(connectLength+cubeHeight),Z);
150
154
151
155
// pipe exit
152
- const Geometry::Vec3D exitOrg=
153
- Origin+Y*(cubeDepth/2.0 )-Z*(connectLength+cubeHeight/2.0 );
156
+ const Geometry::Vec3D turnOrg=Origin-Z*(connectLength+cubeHeight/2.0 );
157
+ const Geometry::Vec3D exitOrg=turnOrg+Y*(cubeDepth/2.0 );
158
+
159
+ ELog::EM<<" Turn == " <<turnOrg<<ELog::endDiag;
160
+ // 45 deg divider:
161
+ ModelSupport::buildPlane (SMap,buildIndex+2005 ,turnOrg,(Z-Y));
162
+ ModelSupport::buildCylinder (SMap,buildIndex+2007 ,turnOrg,Y,pipeRadius);
154
163
ModelSupport::buildCylinder (SMap,buildIndex+2017 ,exitOrg,Y,outRadius);
155
164
ModelSupport::buildCylinder (SMap,buildIndex+2027 ,exitOrg,Y,flangeRadius);
156
165
@@ -166,7 +175,13 @@ M1Pipe::createSurfaces()
166
175
const Geometry::Vec3D PY=Qxy.rotate (Y);
167
176
ModelSupport::buildPlane (SMap,buildIndex+3001 ,bendPt,Y);
168
177
ModelSupport::buildPlane (SMap,buildIndex+3002 ,bendPt+Y*exitFullLength,PY);
169
- ModelSupport::buildCylinder (SMap,buildIndex+3007 ,bendPt,PY,exitRadius);
178
+
179
+ ModelSupport::buildCylinder (SMap,buildIndex+3007 ,bendPt,PY,pipeRadius);
180
+ ModelSupport::buildCylinder
181
+ (SMap,buildIndex+3017 ,bendPt,PY,pipeRadius+pipeThick);
182
+ ModelSupport::buildCylinder
183
+ (SMap,buildIndex+3027 ,bendPt,PY,exitRadius-pipeOuter);
184
+ ModelSupport::buildCylinder (SMap,buildIndex+3037 ,bendPt,PY,exitRadius);
170
185
171
186
return ;
172
187
}
@@ -185,20 +200,28 @@ M1Pipe::createObjects(Simulation& System)
185
200
const HeadRule baseHR=getRule (" MirrorBase" );
186
201
187
202
HeadRule HR;
188
- HR=ModelSupport::getHeadRule (SMap,buildIndex," 5 -7" );
203
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 2005 -7" );
204
+ makeCell (" Inner" ,System,cellIndex++,innerMat,0.0 ,HR*baseHR);
205
+
206
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 5 -17 7" );
189
207
makeCell (" Connect" ,System,cellIndex++,pipeMat,0.0 ,HR*baseHR);
190
208
191
- HR=ModelSupport::getHeadRule (SMap,buildIndex," 101 -102 103 -104 7 5" );
209
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 101 -102 103 -104 17 5" );
192
210
makeCell (" Connect" ,System,cellIndex++,voidMat,0.0 ,HR*baseHR);
193
211
194
- HR=ModelSupport::getHeadRule (SMap,buildIndex," 101 -102 103 -104 -5 105" );
212
+ // inner for all segments
213
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," -2005 -2007 -3001" );
214
+ makeCell (" Inner" ,System,cellIndex++,innerMat,0.0 ,HR);
215
+
216
+ HR=ModelSupport::getHeadRule
217
+ (SMap,buildIndex," 101 -102 103 -104 -5 105 (7:-2005) (2007:2005)" );
195
218
makeCell (" Cube" ,System,cellIndex++,pipeMat,0.0 ,HR);
196
219
197
220
HR=ModelSupport::getHeadRule (SMap,buildIndex," 101 -102 103 -104 105" );
198
221
addOuterSurf (" Join" ,HR*baseHR);
199
222
200
223
// exit pipe
201
- HR=ModelSupport::getHeadRule (SMap,buildIndex," 102 -2017 -2012" );
224
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 102 -2017 -2012 2007 " );
202
225
makeCell (" Outer" ,System,cellIndex++,pipeMat,0.0 ,HR);
203
226
// flange
204
227
HR=ModelSupport::getHeadRule (SMap,buildIndex," 2002 -2012 2017 -2027" );
@@ -207,10 +230,19 @@ M1Pipe::createObjects(Simulation& System)
207
230
HR=ModelSupport::getHeadRule (SMap,buildIndex," 102 -2002 2017 -2027" );
208
231
makeCell (" OuterVoid" ,System,cellIndex++,voidMat,0.0 ,HR);
209
232
210
- HR=ModelSupport::getHeadRule (SMap,buildIndex," 2012 -2017 -3001" );
233
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 2012 -2017 -3001 2007 " );
211
234
makeCell (" ExitStr" ,System,cellIndex++,pipeMat,0.0 ,HR);
212
235
213
236
HR=ModelSupport::getHeadRule (SMap,buildIndex," 3001 -3007 -3002" );
237
+ makeCell (" ExitPipe" ,System,cellIndex++,innerMat,0.0 ,HR);
238
+
239
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 3001 3007 -3017 -3002" );
240
+ makeCell (" ExitPipe" ,System,cellIndex++,pipeMat,0.0 ,HR);
241
+
242
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 3001 3017 -3027 -3002" );
243
+ makeCell (" ExitPipe" ,System,cellIndex++,voidMat,0.0 ,HR);
244
+
245
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 3001 3027 -3037 -3002" );
214
246
makeCell (" ExitPipe" ,System,cellIndex++,pipeMat,0.0 ,HR);
215
247
216
248
HR=ModelSupport::getHeadRule (SMap,buildIndex," 2012 -3001 2017 -2027" );
@@ -219,7 +251,7 @@ M1Pipe::createObjects(Simulation& System)
219
251
HR=ModelSupport::getHeadRule (SMap,buildIndex," 102 -3001 -2027" );
220
252
addOuterSurf (" Main" ,HR);
221
253
222
- HR=ModelSupport::getHeadRule (SMap,buildIndex," 3001 -3002 -3007 " );
254
+ HR=ModelSupport::getHeadRule (SMap,buildIndex," 3001 -3002 -3037 " );
223
255
addOuterSurf (" Out" ,HR);
224
256
225
257
// outbound piper
0 commit comments