1 <?xml version='1.0' encoding='iso-8859-1' ?>
2 <proc name="newSchema_1">
3 <property name="DefaultStudyID" value="1"/>
4 <type name="string" kind="string"/>
5 <struct name="Engines/dataref">
6 <member name="ref" type="string"/>
8 <type name="bool" kind="bool"/>
9 <sequence name="boolvec" content="bool"/>
10 <type name="double" kind="double"/>
11 <sequence name="dblevec" content="double"/>
12 <objref name="file" id="file"/>
13 <type name="int" kind="int"/>
14 <sequence name="intvec" content="int"/>
15 <struct name="stringpair">
16 <member name="name" type="string"/>
17 <member name="value" type="string"/>
19 <sequence name="propvec" content="stringpair"/>
20 <objref name="pyobj" id="python:obj:1.0"/>
21 <sequence name="seqboolvec" content="boolvec"/>
22 <sequence name="seqdblevec" content="dblevec"/>
23 <sequence name="seqintvec" content="intvec"/>
24 <sequence name="stringvec" content="string"/>
25 <sequence name="seqstringvec" content="stringvec"/>
26 <container name="DefaultContainer">
27 <property name="container_name" value="FactoryServer"/>
28 <property name="name" value="localhost"/>
30 <container name="mascaret_container">
31 <property name="container_name" value=""/>
32 <property name="name" value="localhost"/>
34 <container name="telemac_container">
35 <property name="name" value="localhost"/>
37 <while name="TimeLoop">
38 <bloc name="TimeBloc">
39 <inline name="TimeController">
40 <script><code><![CDATA[time += timestep
41 cont = (time + timestep/2 < endtime) # Add half timestep to avoid rounding issues
43 timeData["start_time"] = time
44 timeData["end_time"] = time + timestep
45 timeData["time_step"] = timestep
48 log.write("time: %f\n" % timeData["end_time"])
53 <inport name="time" type="double"/>
54 <inport name="endtime" type="double"/>
55 <inport name="timestep" type="double"/>
56 <inport name="log" type="pyobj"/>
57 <inport name="graph" type="pyobj"/>
58 <outport name="cont" type="bool"/>
59 <outport name="time" type="double"/>
60 <outport name="timeData" type="pyobj"/>
62 <while name="ConvergenceLoop">
63 <bloc name="ConvergenceBloc">
64 <inline name="ConvergenceController">
65 <script><code><![CDATA[telborders = set(telemacData.keys())
66 mascborders = set(mascData.keys())
67 border_names = telborders | mascborders
71 for name in border_names:
73 nbvar = len(mascData[name])
74 formatlen = nbvar * 10 - 5
75 log.write("MASC %-*s" % (formatlen, name))
76 if name in telemacData:
77 nbvar = len(telemacData[name])
78 formatlen = nbvar * 10 - 5
79 log.write("T2D %-*s" % (formatlen, name))
82 for name in border_names:
84 keys = sorted(mascData[name].iterkeys())
86 log.write("%9s " % key)
87 if name in telemacData:
88 keys = sorted(telemacData[name].iterkeys())
90 log.write("%9s " % key)
93 log.write("%4d " % iter)
94 for name in border_names:
96 keys = sorted(mascData[name].iterkeys())
98 log.write("%9.3f " % mascData[name][key])
99 if name in telemacData:
100 keys = sorted(telemacData[name].iterkeys())
102 log.write("%9.3f " % telemacData[name][key])
107 for name in border_names:
108 if name in mascData and name in telemacData:
109 if abs(mascData[name]["Z"] - telemacData[name]["Z"]) > Z_tol:
111 if abs(mascData[name]["Q"] - telemacData[name]["Q"]) > Q_tol:
116 log.write("Convergence reached\n")
121 log.write("Max iterations reached\n")
127 if timeData["start_time"] == 0.0:
129 for name in border_names:
131 keys = sorted(mascData[name].iterkeys())
133 graph.write("MASC %s %s," % (name, key))
134 if name in telemacData:
135 keys = sorted(telemacData[name].iterkeys())
137 graph.write("T2D %s %s," % (name, key))
140 graph.write("%f," % timeData["end_time"])
141 for name in border_names:
143 keys = sorted(mascData[name].iterkeys())
145 graph.write("%f," % mascData[name][key])
146 if name in telemacData:
147 keys = sorted(telemacData[name].iterkeys())
149 graph.write("%f," % telemacData[name][key])
153 <inport name="mascData" type="pyobj"/>
154 <inport name="telemacData" type="pyobj"/>
155 <inport name="Z_tol" type="double"/>
156 <inport name="Q_tol" type="double"/>
157 <inport name="iter" type="int"/>
158 <inport name="borders" type="pyobj"/>
159 <inport name="log" type="pyobj"/>
160 <inport name="maxiter" type="int"/>
161 <inport name="timeData" type="pyobj"/>
162 <inport name="graph" type="pyobj"/>
163 <outport name="cont" type="bool"/>
164 <outport name="iter" type="int"/>
165 <outport name="timeData" type="pyobj"/>
166 <outport name="mascData" type="pyobj"/>
167 <outport name="telemacData" type="pyobj"/>
169 <service name="MascExecStep">
170 <component>MASCARET</component>
171 <load container="mascaret_container"/>
172 <method>ExecStep</method>
173 <inport name="timeData" type="pyobj"/>
174 <inport name="inputData" type="pyobj"/>
175 <outport name="outputData" type="pyobj"/>
177 <service name="TelExecStep">
178 <component>TELEMAC2D</component>
179 <load container="telemac_container"/>
180 <method>ExecStep</method>
181 <inport name="timeData" type="pyobj"/>
182 <inport name="inputData" type="pyobj"/>
183 <outport name="outputData" type="pyobj"/>
185 <control> <fromnode>MascExecStep</fromnode> <tonode>ConvergenceController</tonode> </control>
186 <control> <fromnode>MascExecStep</fromnode> <tonode>TelExecStep</tonode> </control>
187 <control> <fromnode>TelExecStep</fromnode> <tonode>ConvergenceController</tonode> </control>
188 <datalink control="false">
189 <fromnode>ConvergenceController</fromnode> <fromport>timeData</fromport>
190 <tonode>MascExecStep</tonode> <toport>timeData</toport>
192 <datalink control="false">
193 <fromnode>ConvergenceController</fromnode> <fromport>timeData</fromport>
194 <tonode>TelExecStep</tonode> <toport>timeData</toport>
196 <datalink control="false">
197 <fromnode>ConvergenceController</fromnode> <fromport>telemacData</fromport>
198 <tonode>MascExecStep</tonode> <toport>inputData</toport>
200 <datalink control="false">
201 <fromnode>MascExecStep</fromnode> <fromport>outputData</fromport>
202 <tonode>ConvergenceController</tonode> <toport>mascData</toport>
204 <datalink control="false">
205 <fromnode>MascExecStep</fromnode> <fromport>outputData</fromport>
206 <tonode>TelExecStep</tonode> <toport>inputData</toport>
208 <datalink control="false">
209 <fromnode>TelExecStep</fromnode> <fromport>outputData</fromport>
210 <tonode>ConvergenceController</tonode> <toport>telemacData</toport>
213 <datalink control="false">
214 <fromnode>ConvergenceBloc.ConvergenceController</fromnode> <fromport>iter</fromport>
215 <tonode>ConvergenceBloc.ConvergenceController</tonode> <toport>iter</toport>
217 <datalink control="false">
218 <fromnode>ConvergenceBloc.ConvergenceController</fromnode> <fromport>timeData</fromport>
219 <tonode>ConvergenceBloc.ConvergenceController</tonode> <toport>timeData</toport>
222 <control> <fromnode>ConvergenceLoop</fromnode> <tonode>TimeController</tonode> </control>
223 <datalink control="false">
224 <fromnode>TimeController</fromnode> <fromport>cont</fromport>
225 <tonode>ConvergenceLoop</tonode> <toport>condition</toport>
227 <datalink control="false">
228 <fromnode>TimeController</fromnode> <fromport>timeData</fromport>
229 <tonode>ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>timeData</toport>
231 <datalink control="false">
232 <fromnode>TimeController</fromnode> <fromport>timeData</fromport>
233 <tonode>ConvergenceLoop.ConvergenceBloc.MascExecStep</tonode> <toport>timeData</toport>
235 <datalink control="false">
236 <fromnode>TimeController</fromnode> <fromport>timeData</fromport>
237 <tonode>ConvergenceLoop.ConvergenceBloc.TelExecStep</tonode> <toport>timeData</toport>
239 <datalink control="false">
240 <fromnode>ConvergenceLoop.ConvergenceBloc.ConvergenceController</fromnode> <fromport>cont</fromport>
241 <tonode>ConvergenceLoop</tonode> <toport>condition</toport>
244 <datalink control="false">
245 <fromnode>TimeBloc.TimeController</fromnode> <fromport>time</fromport>
246 <tonode>TimeBloc.TimeController</tonode> <toport>time</toport>
249 <service name="InitMascaret">
250 <node>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.MascExecStep</node>
251 <method>Init</method>
252 <inport name="studyID" type="int"/>
253 <inport name="detCaseEntry" type="string"/>
255 <inline name="InitCoupling">
256 <script><code><![CDATA[execfile(couplingFile)
259 timeData["start_time"] = starttime
260 timeData["end_time"] = starttime + timestep
261 timeData["time_step"] = timestep
262 timeData["save_state_flag"] = True
264 log = open(logFile, "w")
265 graph = open(graphFile, "w")
267 <inport name="couplingFile" type="string"/>
268 <inport name="logFile" type="string"/>
269 <inport name="graphFile" type="string"/>
270 <outport name="starttime" type="double"/>
271 <outport name="endtime" type="double"/>
272 <outport name="timestep" type="double"/>
273 <outport name="eps_Z" type="double"/>
274 <outport name="eps_Q" type="double"/>
275 <outport name="borders" type="pyobj"/>
276 <outport name="timeData" type="pyobj"/>
277 <outport name="log" type="pyobj"/>
278 <outport name="maxiter" type="int"/>
279 <outport name="graph" type="pyobj"/>
281 <service name="FinalizeMascaret">
282 <node>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.MascExecStep</node>
283 <method>Finalize</method>
285 <service name="InitTelemac">
286 <node>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.TelExecStep</node>
287 <method>Init</method>
288 <inport name="studyID" type="int"/>
289 <inport name="detCaseEntry" type="string"/>
291 <service name="FinalizeTelemac">
292 <node>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.TelExecStep</node>
293 <method>Finalize</method>
295 <service name="InitMascBorders">
296 <node>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.MascExecStep</node>
297 <method>InitBorders</method>
298 <inport name="borders" type="pyobj"/>
300 <service name="InitTelBorders">
301 <node>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.TelExecStep</node>
302 <method>InitBorders</method>
303 <inport name="borders" type="pyobj"/>
305 <control> <fromnode>TimeLoop</fromnode> <tonode>FinalizeMascaret</tonode> </control>
306 <control> <fromnode>TimeLoop</fromnode> <tonode>FinalizeTelemac</tonode> </control>
307 <control> <fromnode>InitMascaret</fromnode> <tonode>TimeLoop</tonode> </control>
308 <control> <fromnode>InitCoupling</fromnode> <tonode>TimeLoop</tonode> </control>
309 <control> <fromnode>InitCoupling</fromnode> <tonode>InitMascBorders</tonode> </control>
310 <control> <fromnode>InitCoupling</fromnode> <tonode>InitTelBorders</tonode> </control>
311 <control> <fromnode>InitTelemac</fromnode> <tonode>TimeLoop</tonode> </control>
312 <control> <fromnode>InitTelemac</fromnode> <tonode>InitTelBorders</tonode> </control>
313 <control> <fromnode>InitMascBorders</fromnode> <tonode>TimeLoop</tonode> </control>
314 <control> <fromnode>InitTelBorders</fromnode> <tonode>TimeLoop</tonode> </control>
315 <datalink control="false">
316 <fromnode>InitCoupling</fromnode> <fromport>starttime</fromport>
317 <tonode>TimeLoop.TimeBloc.TimeController</tonode> <toport>time</toport>
319 <datalink control="false">
320 <fromnode>InitCoupling</fromnode> <fromport>endtime</fromport>
321 <tonode>TimeLoop.TimeBloc.TimeController</tonode> <toport>endtime</toport>
323 <datalink control="false">
324 <fromnode>InitCoupling</fromnode> <fromport>timestep</fromport>
325 <tonode>TimeLoop.TimeBloc.TimeController</tonode> <toport>timestep</toport>
327 <datalink control="false">
328 <fromnode>InitCoupling</fromnode> <fromport>eps_Z</fromport>
329 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>Z_tol</toport>
331 <datalink control="false">
332 <fromnode>InitCoupling</fromnode> <fromport>eps_Q</fromport>
333 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>Q_tol</toport>
335 <datalink control="false">
336 <fromnode>InitCoupling</fromnode> <fromport>borders</fromport>
337 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>borders</toport>
339 <datalink control="false">
340 <fromnode>InitCoupling</fromnode> <fromport>borders</fromport>
341 <tonode>InitMascBorders</tonode> <toport>borders</toport>
343 <datalink control="false">
344 <fromnode>InitCoupling</fromnode> <fromport>borders</fromport>
345 <tonode>InitTelBorders</tonode> <toport>borders</toport>
347 <datalink control="false">
348 <fromnode>InitCoupling</fromnode> <fromport>timeData</fromport>
349 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>timeData</toport>
351 <datalink control="false">
352 <fromnode>InitCoupling</fromnode> <fromport>timeData</fromport>
353 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.MascExecStep</tonode> <toport>timeData</toport>
355 <datalink control="false">
356 <fromnode>InitCoupling</fromnode> <fromport>timeData</fromport>
357 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.TelExecStep</tonode> <toport>timeData</toport>
359 <datalink control="false">
360 <fromnode>InitCoupling</fromnode> <fromport>log</fromport>
361 <tonode>TimeLoop.TimeBloc.TimeController</tonode> <toport>log</toport>
363 <datalink control="false">
364 <fromnode>InitCoupling</fromnode> <fromport>log</fromport>
365 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>log</toport>
367 <datalink control="false">
368 <fromnode>InitCoupling</fromnode> <fromport>maxiter</fromport>
369 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>maxiter</toport>
371 <datalink control="false">
372 <fromnode>InitCoupling</fromnode> <fromport>graph</fromport>
373 <tonode>TimeLoop.TimeBloc.TimeController</tonode> <toport>graph</toport>
375 <datalink control="false">
376 <fromnode>InitCoupling</fromnode> <fromport>graph</fromport>
377 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode> <toport>graph</toport>
379 <datalink control="false">
380 <fromnode>TimeLoop.TimeBloc.TimeController</fromnode> <fromport>cont</fromport>
381 <tonode>TimeLoop</tonode> <toport>condition</toport>
384 <tonode>InitMascaret</tonode><toport>studyID</toport>
385 <value><int>1</int></value>
388 <tonode>InitMascaret</tonode><toport>detCaseEntry</toport>
389 <value><string>%parse_entry(CAS_MASCARET)%</string></value>
392 <tonode>InitCoupling</tonode><toport>couplingFile</toport>
393 <value><string>%FICHIER_COUPLAGE%</string></value>
396 <tonode>InitCoupling</tonode><toport>logFile</toport>
397 <value><string>%FICHIER_LOG%</string></value>
400 <tonode>InitCoupling</tonode><toport>graphFile</toport>
401 <value><string>%FICHIER_GRAPHIQUE%</string></value>
404 <tonode>TimeLoop</tonode><toport>condition</toport>
405 <value><boolean>true</boolean></value>
408 <tonode>TimeLoop.TimeBloc.ConvergenceLoop</tonode><toport>condition</toport>
409 <value><boolean>true</boolean></value>
412 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController</tonode><toport>iter</toport>
413 <value><int>1</int></value>
416 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.MascExecStep</tonode><toport>inputData</toport>
417 <value><objref>N.</objref></value>
420 <tonode>TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.TelExecStep</tonode><toport>inputData</toport>
421 <value><objref>N.</objref></value>
424 <tonode>InitTelemac</tonode><toport>studyID</toport>
425 <value><int>1</int></value>
428 <tonode>InitTelemac</tonode><toport>detCaseEntry</toport>
429 <value><string>%parse_entry(CAS_TELEMAC2D)%</string></value>
431 <presentation name="InitMascaret" x="166" y="32" width="158" height="90" expanded="1" expx="166" expy="32" expWidth="158" expHeight="90" shownState="0"/>
432 <presentation name="TimeLoop" x="450.5" y="32" width="760" height="764.5" expanded="1" expx="450.5" expy="32" expWidth="760" expHeight="764.5" shownState="0"/>
433 <presentation name="TimeLoop.TimeBloc" x="4" y="60" width="752" height="700.5" expanded="1" expx="4" expy="60" expWidth="752" expHeight="700.5" shownState="0"/>
434 <presentation name="TimeLoop.TimeBloc.TimeController" x="590" y="56" width="158" height="171" expanded="1" expx="590" expy="56" expWidth="158" expHeight="171" shownState="0"/>
435 <presentation name="TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.ConvergenceController" x="330.5" y="32" width="158" height="306" expanded="1" expx="330.5" expy="32" expWidth="158" expHeight="306" shownState="0"/>
436 <presentation name="TimeLoop.TimeBloc.ConvergenceLoop" x="4" y="291.5" width="503" height="405" expanded="1" expx="4" expy="291.5" expWidth="503" expHeight="405" shownState="0"/>
437 <presentation name="TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc" x="6.5" y="59" width="492.5" height="342" expanded="1" expx="6.5" expy="59" expWidth="492.5" expHeight="342" shownState="0"/>
438 <presentation name="TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.MascExecStep" x="42" y="32" width="158" height="90" expanded="1" expx="42" expy="32" expWidth="158" expHeight="90" shownState="0"/>
439 <presentation name="InitCoupling" x="3.5" y="355.5" width="158" height="306" expanded="1" expx="3.5" expy="355.5" expWidth="158" expHeight="306" shownState="0"/>
440 <presentation name="TimeLoop.TimeBloc.ConvergenceLoop.ConvergenceBloc.TelExecStep" x="86" y="168.5" width="158" height="90" expanded="1" expx="86" expy="168.5" expWidth="158" expHeight="90" shownState="0"/>
441 <presentation name="FinalizeMascaret" x="1308" y="32" width="158" height="36" expanded="1" expx="1308" expy="32" expWidth="158" expHeight="36" shownState="0"/>
442 <presentation name="InitTelemac" x="4" y="138.5" width="158" height="90" expanded="1" expx="4" expy="138.5" expWidth="158" expHeight="90" shownState="0"/>
443 <presentation name="FinalizeTelemac" x="1308" y="89" width="158" height="36" expanded="1" expx="1308" expy="89" expWidth="158" expHeight="36" shownState="0"/>
444 <presentation name="InitMascBorders" x="184" y="273.5" width="158" height="63" expanded="1" expx="184" expy="273.5" expWidth="158" expHeight="63" shownState="0"/>
445 <presentation name="InitTelBorders" x="185" y="169" width="158" height="63" expanded="1" expx="185" expy="169" expWidth="158" expHeight="63" shownState="0"/>
446 <presentation name="__ROOT__" x="0" y="0" width="1470" height="800.5" expanded="1" expx="0" expy="0" expWidth="1470" expHeight="800.5" shownState="0"/>