Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_3.1_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Modelica_3.1_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks") translateModel(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Modelica_3.1_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00129/0.00129, allocations: 109.1 kB / 16.42 MB, free: 6.48 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001176/0.001176, allocations: 187.2 kB / 17.35 MB, free: 5.707 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.351/1.351, allocations: 205.1 MB / 223.2 MB, free: 12.23 MB / 190.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.137e-05/2.138e-05, allocations: 3.547 kB / 327.2 MB, free: 3.336 MB / 270.1 MB Notification: Performance of NFInst.instantiate(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks): time 0.02575/0.02578, allocations: 27.7 MB / 354.9 MB, free: 7.52 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.01184/0.03766, allocations: 7.346 MB / 362.2 MB, free: 152 kB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.002225/0.03992, allocations: 51.69 kB / 362.3 MB, free: 100 kB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.002504/0.04243, allocations: 1.002 MB / 363.3 MB, free: 15.09 MB / 318.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Utilities/Strings.mo:139:3-175:14:writable] Warning: Pure function 'Modelica.Utilities.Strings.isEmpty' contains a call to impure function 'Modelica.Utilities.Strings.Advanced.skipWhiteSpace'. Notification: Performance of NFTyping.typeBindings: time 0.003795/0.04624, allocations: 1.535 MB / 364.8 MB, free: 13.54 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.004992/0.05124, allocations: 2.206 MB / 367 MB, free: 11.33 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.005915/0.05717, allocations: 4.966 MB / 372 MB, free: 6.359 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.003055/0.06024, allocations: 2.084 MB / 374.1 MB, free: 4.242 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.003175/0.06342, allocations: 2.014 MB / 376.1 MB, free: 2.223 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001905/0.06534, allocations: 1.646 MB / 377.7 MB, free: 0.5703 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0003863/0.06574, allocations: 312 kB / 378 MB, free: 272 kB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.193/0.2588, allocations: 0.9389 MB / 379 MB, free: 16.81 MB / 318.1 MB Notification: Performance of combineBinaries: time 0.004944/0.2637, allocations: 4.122 MB / 383.1 MB, free: 15.23 MB / 318.1 MB Notification: Performance of replaceArrayConstructors: time 0.002022/0.2658, allocations: 2.481 MB / 385.6 MB, free: 13.71 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001015/0.2668, allocations: 422.5 kB / 386 MB, free: 13.63 MB / 318.1 MB Notification: Performance of FrontEnd: time 0.0006396/0.2675, allocations: 168.3 kB / 386.2 MB, free: 13.59 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 541 (492) * Number of variables: 521 (470) Notification: Performance of Bindings: time 0.01347/0.281, allocations: 11.83 MB / 398 MB, free: 9.938 MB / 318.1 MB Notification: Performance of FunctionAlias: time 0.001696/0.2827, allocations: 1.482 MB / 399.5 MB, free: 9.645 MB / 318.1 MB Notification: Performance of Early Inline: time 0.009481/0.2922, allocations: 9.004 MB / 408.5 MB, free: 5.242 MB / 318.1 MB Notification: Performance of simplify1: time 0.0005964/0.2928, allocations: 454.1 kB / 408.9 MB, free: 5.039 MB / 318.1 MB Notification: Performance of Alias: time 0.01054/0.3033, allocations: 9.944 MB / 418.9 MB, free: 14.86 MB / 334.1 MB Notification: Performance of simplify2: time 0.0008566/0.3042, allocations: 376.5 kB / 419.2 MB, free: 14.7 MB / 334.1 MB Notification: Performance of Events: time 0.003001/0.3072, allocations: 2.454 MB / 421.7 MB, free: 13.22 MB / 334.1 MB Notification: Performance of Detect States: time 0.002393/0.3096, allocations: 2.592 MB / 424.3 MB, free: 11.54 MB / 334.1 MB Notification: Performance of Partitioning: time 0.003319/0.313, allocations: 2.858 MB / 427.1 MB, free: 8.645 MB / 334.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency shut.on could not be divided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) start.reset = {stop.on, shut.on} ($RES_BND_554) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (406/482) **************************** (1) [ALGB] (1) protected Real shut.table.realToBoolean.u (2) [ALGB] (1) protected Real valve1.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (3) [ALGB] (2) protected Real[2] tank1.portsData_zeta_out (4) [DISC] (1) Boolean[1] tankController.normal.emptyTank2.outPort.reset (5) [DISC] (1) Boolean tankController.normal.T1.outPort.occupied (6) [DISC] (2) Boolean[2] tankController.s2.outPort.reset (7) [ALGB] (1) Real[1] tank2.heatTransfer.surfaceAreas = {sqrt(3.141592653589793 * tank2.crossArea) * 2.0 * tank2.fluidLevel + tank2.crossArea} (8) [ALGB] (1) Real valve1.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (9) [ALGB] (1) protected flow Real tankController.normal.emptyTank2.outerStatePort.subgraphStatePort.activeSteps (10) [ALGB] (1) final input Real[1, 1] tank1.heatTransfer.states.p = {tank1.medium.state.p} (start = {1e5 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (11) [ALGB] (1) protected Real valve3.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (12) [DISC] (1) Boolean[1] tankController.s1.outPort.reset (13) [ALGB] (1) protected Real valve1.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (14) [DISC] (1) Boolean tankController.T5.outPort.occupied (15) [ALGB] (1) Real valve2.V_flow = (995.586 * valve2.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * valve2.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.density(valve2.state_a), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.density(valve2.state_b), valve2.m_flow_small) (16) [DISC] (1) Boolean[1] tankController.normal.wait1.outPort.available (17) [DISC] (2) Boolean[2] $SEV_32[$i1] (18) [ALGB] (2) stream Real[2] tank2.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (19) [ALGB] (2) Real[2] tank2.portAreas = {0.7853981633974483 * tank2.portsData_diameter[i] ^ 2.0 for i in 1:2} (20) [DISC] (1) Boolean[1] tankController.emptyTanks.inPort.set (21) [DISS] (1) protected Boolean tankController.normal.emptyTank2.oldActive (22) [ALGB] (1) protected Real valve1.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (23) [ALGB] (1) final input Real[1, 1] tank1.heatTransfer.states.T = {tank1.medium.state.T} (start = {288.15 for $i1 in 1:1}, min = {1.0 for $i1 in 1:1}, max = {1e4 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (24) [DISC] (1) Boolean[1] tankController.emptyTanks.inPort.occupied (25) [DISC] (2) Boolean[2] $SEV_73[$i1] (26) [DISC] (2) Boolean[2] start.reset = {stop.on, shut.on} (27) [DISC] (1) Boolean[1] tankController.s2.inPort.occupied (28) [DISC] (2) Boolean[2] tankController.s1.inPort.occupied (29) [DISC] (1) Boolean tankController.normal.stateGraphRoot.suspend = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.suspend.reset) or false (30) [DISC] (2) Boolean[2] tankController.s1.inPort.set (31) [ALGB] (2) protected Real[2] tank2.portsData_diameter_internal = tank2.portsData.diameter (32) [DISC] (1) Boolean[1] tankController.emptyTanks.outPort.available (33) [ALGB] (1) protected final Real tank1.fluidLevel = tank1.fluidLevel (min = 0.0) (34) [ALGB] (1) stream Real valve3.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (35) [DISC] (1) protected Boolean tankController.normal.fillTank2.outerStatePort.localActive = tankController.normal.fillTank2.outerStatePort.localActive (36) [DISC] (1) Boolean tankController.normal.outerState.active = tankController.normal.outerState.active (37) [ALGB] (1) protected Real valve1.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (38) [ALGB] (2) Real[2] tank1.ports.p (start = {1e5 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (39) [DISC] (2) Boolean[2] $SEV_31[$i1] (40) [DISC] (1) protected Boolean tankController.emptyTanks.newActive (41) [ALGB] (2) Real[2] tank2.ports.p (start = {1e5 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (42) [ALGB] (2) Real[2] tank1.portInDensities (start = {1.0 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}, nominal = {1.0 for $i1 in 1:2}) (43) [ALGB] (2) Real[2] tank2.ports_H_flow (min = {-1e8 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1000.0 for $i1 in 1:2}) (44) [DISC] (1) Boolean tankController.T5.outPort.set (45) [DISC] (1) Boolean[1] tankController.normal.resume.occupied (46) [ALGB] (1) Real valve1.V_flow = (995.586 * valve1.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * valve1.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.density(valve1.state_a), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.density(valve1.state_b), valve1.m_flow_small) (47) [ALGB] (2) protected Real[2] tank1.portsData_diameter (48) [DISC] (2) Boolean[2] $SEV_16[$i1] (49) [ALGB] (1) Real tank2.medium.state.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (50) [ALGB] (1) Real tank1.medium.state.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (51) [ALGB] (1) stream Real valve2.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (52) [DISC] (1) protected Boolean tankController.normal.emptyTank2.outerStatePort.localActive = tankController.normal.emptyTank2.outerStatePort.localActive (53) [DISC] (1) protected Boolean tankController.normal.fillTank2.newActive (54) [DISC] (1) Boolean tankController.T2.outPort.set (55) [ALGB] (1) final Real tank1.fluidVolume = tank1.fluidVolume (56) [DISC] (1) protected Boolean tankController.s2.newActive (57) [ALGB] (1) Real valve2.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * valve2.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.temperature(valve2.state_b), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.temperature(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.setState_phX(valve2.port_b.p, valve2.port_b.h_outflow, {})), valve2.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (58) [DISC] (2) Boolean[2] $SEV_29[$i1] (59) [ALGB] (1) flow Real tankController.stateGraphRoot.subgraphStatePort.activeSteps (60) [DISC] (1) Boolean[1] tankController.normal.wait2.outPort.reset (61) [DISC] (1) Boolean[1] tankController.s2.inPort.set (62) [DISS] (1) protected Boolean tankController.normal.fillTank1.oldActive (63) [DISC] (2) Boolean[2] $SEV_30[$i1] (64) [ALGB] (2) protected Real[2] tank1.portsData_height (65) [DISC] (1) Boolean tankController.normal.T3.outPort.occupied (66) [ALGB] (1) Real tank2.medium.state.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (67) [ALGB] (1) protected final Real tank2.fluidLevel = tank2.fluidLevel (min = 0.0) (68) [ALGB] (1) Real tank1.medium.state.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (69) [DISS] (1) protected Boolean tankController.s1.oldActive (70) [DISC] (1) Boolean $TEV_9 (71) [DISC] (1) Boolean $TEV_8 (72) [DISC] (1) Boolean $TEV_7 (73) [DISC] (1) protected Boolean shut.table.y (fixed = true, start = false) (74) [DISC] (1) Boolean $TEV_6 (75) [DISC] (1) final Boolean tankController.T6.localCondition = tankController.T6.localCondition (76) [DISC] (1) Boolean $TEV_5 (77) [DISC] (1) protected Boolean tankController.normal.wait1.outerStatePort.localActive = tankController.normal.wait1.outerStatePort.localActive (78) [DISC] (1) Boolean $TEV_4 (79) [ALGB] (1) Real valve2.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (80) [DISC] (1) Boolean $TEV_3 (81) [DISC] (1) Boolean tankController.T4.outPort.occupied (82) [DISC] (1) Boolean $TEV_2 (83) [ALGB] (1) flow Real tankController.normal.outerState.subgraphStatePort.activeSteps (84) [DISC] (1) Boolean $TEV_1 (85) [ALGB] (2) protected Real[2] tank2.portsData_zeta_in (86) [DISC] (1) Boolean $TEV_0 (87) [DISC] (2) Boolean[2] $SEV_15[$i1] (88) [DISC] (1) Boolean[1] tankController.normal.fillTank1.outPort.available (89) [ALGB] (2) protected Real[2] tank1.portsData_zeta_in_internal = tank1.portsData.zeta_in (90) [DISC] (1) protected Boolean tankController.normal.newActive (91) [DISC] (2) Boolean[2] $SEV_56[$i1] (92) [DISC] (2) Boolean[2] $SEV_28[$i1] (93) [ALGB] (1) Real valve2.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * valve2.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.temperature(valve2.state_a), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.temperature(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve2.Medium.setState_phX(valve2.port_a.p, valve2.port_a.h_outflow, {})), valve2.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (94) [DISC] (1) Boolean[1] tankController.normal.fillTank2.outPort.available (95) [ALGB] (2) Real[2] tank2.portInDensities (start = {1.0 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}, nominal = {1.0 for $i1 in 1:2}) (96) [DISC] (1) Boolean tankController.T1.inPort.reset (97) [DISC] (1) Boolean[1] tankController.normal.wait2.inPort.set (98) [DISC] (1) Boolean tankController.T1.inPort.available (99) [DISC] (1) Boolean shut.on (fixed = true, start = false) (100) [ALGB] (1) Real[1] tank1.heatTransfer.Ts = {Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.tank1.heatTransfer.Medium.temperature(tank1.heatTransfer.states[1])} (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (101) [DISC] (1) Boolean[1] tankController.normal.wait2.inPort.occupied (102) [ALGB] (1) flow Real tankController.normal.stateGraphRoot.subgraphStatePort.activeSteps (103) [ALGB] (2) protected Real[2] tank1.portsData_diameter_internal = tank1.portsData.diameter (104) [DISC] (2) protected Boolean[2] tank2.regularFlow (start = {true for $i1 in 1:2}) (105) [ALGB] (2) protected Real[2] tank1.portsData_height_internal = tank1.portsData.height (106) [ALGB] (1) Real tankController.normal.T2.t (107) [ALGB] (1) Real[1] tank2.heatTransfer.Q_flows (108) [DISS] (1) protected Boolean tankController.normal.wait1.oldActive (109) [DISC] (1) Boolean[1] tankController.normal.fillTank1.inPort.occupied (110) [ALGB] (1) Real valve2.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (111) [ALGB] (2) protected Real[2] tank2.portsData_zeta_out (112) [ALGB] (2) protected Real[2] tank2.portsData_zeta_out_internal = tank2.portsData.zeta_out (113) [DISC] (2) Boolean[2] $SEV_14[$i1] (114) [DISC] (1) Boolean $SEV_95 (115) [DISC] (1) Boolean $SEV_94 (116) [DISC] (1) Boolean $SEV_93 (117) [DISC] (1) Boolean $SEV_92 (118) [DISC] (1) Boolean $SEV_91 (119) [DISC] (1) Boolean $SEV_90 (120) [ALGB] (1) protected Real start.table.realToBoolean.u (121) [ALGB] (1) protected flow Real tankController.emptyTanks.outerStatePort.subgraphStatePort.activeSteps (122) [DISC] (2) Boolean[2] $SEV_55[$i1] (123) [DISC] (1) protected Boolean tankController.normal.wait2.newActive (124) [ALGB] (1) Real tank1.Qb_flow (125) [DISC] (1) Boolean tankController.T4.outPort.set (126) [DISC] (2) Boolean[2] $SEV_27[$i1] (127) [ALGB] (1) Real tank2.Qb_flow (128) [DISC] (1) Boolean tankController.T3.outPort.set (129) [DISC] (1) protected Boolean tankController.s2.outerStatePort.localActive = tankController.s2.outerStatePort.localActive (130) [ALGB] (1) Real tank1.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - tank1.medium.T_degC)) (131) [DISC] (1) Boolean $SEV_89 (132) [DISC] (1) Boolean $SEV_88 (133) [DISC] (1) Boolean $SEV_87 (134) [DISC] (1) Boolean $SEV_86 (135) [DISC] (1) Boolean tankController.normal.T4.outPort.set (136) [ALGB] (2) Real[2] tank2.ports_E_flow (137) [DISC] (1) Boolean $SEV_85 (138) [ALGB] (2) Real[2] tank1.ports_penetration (139) [DISC] (1) Boolean $SEV_84 (140) [DISC] (1) Boolean $SEV_83 (141) [DISC] (1) Boolean $SEV_82 (142) [DISC] (1) Boolean $SEV_81 (143) [DISC] (1) Boolean[1] tankController.normal.wait1.inPort.set (144) [DISC] (1) Boolean $SEV_80 (145) [DISC] (1) Boolean tankController.normal.T1.inPort.available (146) [DISC] (2) Boolean[2] $SEV_13[$i1] (147) [ALGB] (1) stream Real valve1.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (148) [ALGB] (1) protected Real[1] start.table.combiTimeTable.y (149) [ALGB] (2) Real[2] tank2.vessel_ps_static (start = {1e5 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (150) [ALGB] (1) protected Real valve2.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (151) [DISS] (1) protected discrete Real shut.table.combiTimeTable.nextTimeEvent (fixed = true, start = 0.0) (152) [DISC] (1) Boolean tankController.normal.outPort.available (153) [DISC] (1) Boolean tankController.normal.T2.outPort.set (154) [DISC] (1) Boolean[1] tankController.normal.emptyTank2.inPort.set (155) [DISC] (2) Boolean[2] $SEV_26[$i1] (156) [DISC] (1) Boolean[1] tankController.normal.wait2.outPort.available (157) [DISC] (1) Boolean[1] tankController.normal.wait1.outPort.reset (158) [ALGB] (1) Real[1] tank2.heatTransfer.Ts = {Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.tank2.heatTransfer.Medium.temperature(tank2.heatTransfer.states[1])} (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (159) [DISC] (1) Boolean[1] tankController.normal.wait1.inPort.occupied (160) [DISC] (1) Boolean $SEV_79 (161) [DISC] (1) Boolean $SEV_78 (162) [ALGB] (1) flow Real[1] tank1.heatTransfer.heatPorts.Q_flow (163) [DISC] (1) Boolean $SEV_77 (164) [DISC] (1) Boolean $SEV_76 (165) [DISC] (1) Boolean $SEV_75 (166) [DISC] (1) Boolean $SEV_74 (167) [DISC] (1) Boolean tankController.T6.outPort.occupied (168) [DISC] (1) Boolean $SEV_72 (169) [DISC] (1) Boolean $SEV_71 (170) [DISS] (1) protected discrete Real start.table.combiTimeTable.nextTimeEvent (fixed = true, start = 0.0) (171) [DISC] (1) Boolean $SEV_70 (172) [DISC] (1) protected Boolean tankController.normal.emptyTank2.newActive (173) [ALGB] (1) protected Real valve2.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (174) [DISC] (1) Boolean tankController.T5.inPort.available (175) [ALGB] (1) flow Real[1] source.ports.m_flow (min = {-1e60}, max = {1e60}) (176) [DISC] (1) Boolean tankController.T3.outPort.occupied (177) [ALGB] (1) Real[1] tank1.heatTransfer.Q_flows (178) [ALGB] (1) Real tankController.normal.T4.t (179) [DISC] (2) Boolean[2] $SEV_12[$i1] (180) [DISC] (1) Boolean tankController.normal.T4.inPort.available (181) [ALGB] (1) flow Real[1] tank2.heatTransfer.heatPorts.Q_flow (182) [ALGB] (1) Real valve3.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * valve3.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.temperature(valve3.state_b), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.temperature(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.setState_phX(valve3.port_b.p, valve3.port_b.h_outflow, {})), valve3.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (183) [ALGB] (1) protected flow Real tankController.s2.outerStatePort.subgraphStatePort.activeSteps (184) [ALGB] (1) protected Real valve2.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (185) [ALGB] (2) protected Real[2] tank2.portsData_diameter (186) [DISC] (1) Boolean $SEV_69 (187) [DISS] (1) protected discrete Real shut.table.combiTimeTable.nextTimeEventScaled (fixed = true, start = 0.0) (188) [DISC] (1) Boolean $SEV_68 (189) [DISC] (1) Boolean $SEV_67 (190) [DISC] (1) Boolean $SEV_66 (191) [DISC] (1) Boolean[1] tankController.normal.fillTank2.inPort.set (192) [DISC] (1) Boolean $SEV_65 (193) [DISC] (2) Boolean[2] $SEV_25[$i1] (194) [DISC] (1) Boolean[1] tankController.normal.resume.set (195) [DISS] (1) protected discrete Real stop.table.combiTimeTable.nextTimeEventScaled (fixed = true, start = 0.0) (196) [DISC] (1) Boolean $SEV_64 (197) [ALGB] (1) Real[1] tank1.heatTransfer.surfaceAreas = {sqrt(3.141592653589793 * tank1.crossArea) * 2.0 * tank1.fluidLevel + tank1.crossArea} (198) [DISC] (1) Boolean $SEV_63 (199) [DISC] (1) Boolean $SEV_62 (200) [DISC] (1) Boolean $SEV_61 (201) [ALGB] (2) protected Real[2] tank2.portsData_zeta_in_internal = tank2.portsData.zeta_in (202) [DISC] (1) Boolean $SEV_60 (203) [DISC] (1) Boolean[1] tankController.normal.fillTank2.inPort.occupied (204) [ALGB] (2) flow Real[2] tank2.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (205) [ALGB] (1) Real valve3.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (206) [ALGB] (1) stream Real[1] ambient1.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (207) [ALGB] (1) stream Real valve3.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (208) [ALGB] (2) Real[2] tank1.ports_H_flow (min = {-1e8 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1000.0 for $i1 in 1:2}) (209) [DISS] (1) protected discrete Real stop.table.combiTimeTable.nextTimeEvent (fixed = true, start = 0.0) (210) [ALGB] (1) protected Real valve2.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (211) [DISC] (1) Boolean start.on (fixed = true, start = false) (212) [DISC] (2) Boolean[2] $SEV_11[$i1] (213) [DISC] (1) Boolean $SEV_59 (214) [DISC] (1) Boolean $SEV_58 (215) [DISC] (1) Boolean $SEV_57 (216) [ALGB] (1) protected flow Real tankController.normal.wait2.outerStatePort.subgraphStatePort.activeSteps (217) [ALGB] (1) final input Real[1, 1] tank2.heatTransfer.states.T = {tank2.medium.state.T} (start = {288.15 for $i1 in 1:1}, min = {1.0 for $i1 in 1:1}, max = {1e4 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (218) [DISC] (1) Boolean $SEV_54 (219) [DISC] (1) Boolean tankController.normal.T4.enableFire (220) [DISC] (1) Boolean $SEV_53 (221) [DISC] (1) Boolean[1] tankController.normal.fillTank2.outPort.reset (222) [DISC] (1) Boolean $SEV_52 (223) [ALGB] (1) Real valve3.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * valve3.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.temperature(valve3.state_a), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.temperature(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.setState_phX(valve3.port_a.p, valve3.port_a.h_outflow, {})), valve3.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (224) [ALGB] (2) Real[2] tank1.m_flow_turbulent (225) [DISC] (1) Boolean $SEV_51 (226) [DISC] (1) Boolean tankController.normal.T3.outPort.set (227) [DISC] (1) Boolean $SEV_50 (228) [ALGB] (2) Real[2] tank1.portAreas = {0.7853981633974483 * tank1.portsData_diameter[i] ^ 2.0 for i in 1:2} (229) [DISC] (2) Boolean[2] $SEV_24[$i1] (230) [ALGB] (1) Real valve1.dp (start = valve1.dp_start) (231) [ALGB] (1) Real tank1.mb_flow (232) [ALGB] (1) stream Real valve2.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (233) [DISC] (1) protected Boolean tankController.normal.fillTank1.newActive (234) [ALGB] (1) Real tank2.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - tank2.medium.T_degC)) (235) [ALGB] (1) Real tank2.mb_flow (236) [DISC] (1) Boolean tankController.normal.T1.outPort.set (237) [DISC] (1) Boolean stop.on (fixed = true, start = false) (238) [ALGB] (1) Real valve2.dp (start = valve2.dp_start) (239) [DISC] (1) protected Boolean tankController.s1.newActive (240) [DISC] (1) Boolean[1] tankController.normal.fillTank1.inPort.set (241) [DISC] (1) Integer tankController.stateGraphRoot.activeSteps (242) [ALGB] (1) final input Real[1, 1] tank2.heatTransfer.states.p = {tank2.medium.state.p} (start = {1e5 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (243) [DISC] (1) Boolean $SEV_49 (244) [ALGB] (1) Real valve3.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (245) [DISC] (1) Boolean $SEV_47 (246) [ALGB] (2) protected Real[2] tank1.portsData_zeta_in (247) [DISC] (1) Boolean $SEV_46 (248) [DISC] (1) Boolean $SEV_44 (249) [DISC] (1) Boolean $SEV_43 (250) [DISC] (1) Boolean tankController.T4.inPort.available (251) [ALGB] (1) Real valve3.dp (start = valve3.dp_start) (252) [DISC] (2) Boolean[2] $SEV_10[$i1] (253) [DISC] (2) protected Boolean[2] tank1.inFlow (start = {false for $i1 in 1:2}) (254) [ALGB] (2) Real[2] tank2.s (start = {tank2.fluidLevel_max for $i1 in 1:2}) (255) [DISC] (1) protected Boolean tankController.s1.outerStatePort.localActive = tankController.s1.outerStatePort.localActive (256) [DISC] (2) Boolean[2] stop.reset = {start.on, shut.on} (257) [ALGB] (1) protected flow Real tankController.s1.outerStatePort.subgraphStatePort.activeSteps (258) [DISC] (1) Boolean[1] tankController.normal.fillTank1.outPort.reset (259) [DISC] (1) Boolean $FUN_9 (260) [DISC] (1) final Boolean tankController.normal.T1.localCondition = tankController.normal.T1.localCondition (261) [DISC] (1) Boolean $FUN_8 (262) [ALGB] (1) Real $FUN_26 (263) [DISC] (1) Boolean $FUN_7 (264) [DER-] (1) Real $DER.tank1.U (265) [ALGB] (1) Real $FUN_25 (266) [DISC] (1) Boolean $FUN_6 (267) [ALGB] (1) Real $FUN_24 (268) [DISC] (1) Boolean $FUN_5 (269) [ALGB] (1) Real $FUN_23 (270) [DISC] (1) Boolean $FUN_4 (271) [DISC] (1) Boolean tankController.T6.inPort.available (272) [DISC] (1) Boolean $FUN_3 (273) [ALGB] (1) Real $FUN_21 (274) [DISC] (1) Boolean $FUN_2 (275) [ALGB] (1) Real $FUN_20 (276) [DISC] (1) Boolean $FUN_1 (277) [DISC] (1) protected Integer tankController.normal.activeSteps (278) [DISC] (2) Boolean[2] $SEV_9[$i1] (279) [DISC] (1) Boolean $SEV_38 (280) [DISC] (1) Boolean $SEV_37 (281) [DISC] (1) Boolean $SEV_36 (282) [DISC] (1) Boolean $SEV_35 (283) [DISC] (1) Boolean tankController.T1.outPort.occupied (284) [ALGB] (2) Real[2] tank1.vessel_ps_static (start = {1e5 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (285) [DISS] (1) protected Boolean tankController.emptyTanks.oldActive (286) [ALGB] (1) Real[1] ambient1.ports.p (start = {1e5 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (287) [DISC] (2) Boolean[2] shut.reset = {start.on, stop.on} (288) [DER-] (1) Real $DER.tank1.m (289) [DISC] (1) Boolean tankController.normal.T2.inPort.available (290) [DISC] (1) Boolean valve3.open (291) [DISC] (1) Boolean[1] tankController.s1.outPort.available (292) [ALGB] (1) protected flow Real tankController.normal.fillTank1.outerStatePort.subgraphStatePort.activeSteps (293) [DISC] (1) Boolean[1] tankController.normal.emptyTank2.inPort.occupied (294) [DISC] (1) protected Boolean start.table.y (fixed = true, start = false) (295) [DISC] (1) Boolean $FUN_18 (296) [ALGB] (1) protected flow Real tankController.normal.wait1.outerStatePort.subgraphStatePort.activeSteps (297) [DISC] (1) Boolean $FUN_17 (298) [DISC] (1) Boolean $FUN_16 (299) [DISC] (1) Boolean $TEV_40 (300) [DISC] (1) Boolean $FUN_15 (301) [DISC] (1) Boolean $FUN_14 (302) [DISC] (1) Boolean $FUN_13 (303) [DISC] (1) Boolean $FUN_12 (304) [DISC] (1) Boolean[1] tankController.emptyTanks.outPort.reset (305) [ALGB] (2) Real[2] tank1.s (start = {tank1.fluidLevel_max for $i1 in 1:2}) (306) [DISC] (1) Boolean $FUN_11 (307) [DISC] (1) Boolean $FUN_10 (308) [DISS] (1) protected Boolean tankController.normal.fillTank2.oldActive (309) [DISC] (1) protected Boolean stop.table.y (fixed = true, start = false) (310) [DISS] (1) protected discrete Real start.table.combiTimeTable.nextTimeEventScaled (fixed = true, start = 0.0) (311) [DISS] (1) protected Boolean tankController.normal.wait2.oldActive (312) [DER-] (1) Real $DER.tank2.U (313) [DISS] (1) protected Boolean tankController.s2.oldActive (314) [DISC] (1) protected Boolean tankController.emptyTanks.outerStatePort.localActive = tankController.emptyTanks.outerStatePort.localActive (315) [DISC] (2) protected Boolean[2] tank2.inFlow (start = {false for $i1 in 1:2}) (316) [DISC] (1) Boolean tankController.normal.T2.outPort.occupied (317) [DISC] (1) Boolean $SEV_20 (318) [DISC] (2) Boolean[2] $SEV_8[$i1] (319) [DISC] (1) Boolean[1] tankController.normal.emptyTank2.outPort.available (320) [DISC] (1) Boolean $TEV_39 (321) [DISC] (1) Boolean $TEV_38 (322) [ALGB] (1) protected Real stop.table.realToBoolean.u (323) [DISC] (1) Boolean $TEV_37 (324) [DISC] (1) Boolean $TEV_36 (325) [DISC] (1) Boolean $TEV_35 (326) [DISC] (2) Boolean[2] tankController.s2.outPort.available (327) [DISC] (1) Boolean $TEV_34 (328) [ALGB] (2) Real[2] tank2.m_flow_turbulent (329) [DISC] (1) Boolean $TEV_33 (330) [DISC] (1) Boolean $TEV_32 (331) [ALGB] (1) flow Real[1] ambient1.ports.m_flow (min = {-1e60}, max = {1e60}) (332) [DISC] (1) Boolean $TEV_31 (333) [DISC] (1) Boolean $TEV_30 (334) [ALGB] (2) Real[2] tank1.ports_E_flow (335) [DISC] (1) Boolean valve2.open (336) [ALGB] (1) Real[1] tank2.heatTransfer.heatPorts.T (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (337) [DER-] (1) Real $DER.tank2.m (338) [ALGB] (2) protected Real[2] tank1.portsData_zeta_out_internal = tank1.portsData.zeta_out (339) [DISC] (1) Boolean tankController.normal.T2.enableFire (340) [DISC] (2) protected Boolean[2] tank1.regularFlow (start = {true for $i1 in 1:2}) (341) [DISC] (1) protected Boolean tankController.normal.fillTank1.outerStatePort.localActive = tankController.normal.fillTank1.outerStatePort.localActive (342) [ALGB] (2) Real[2] tank2.portVelocities (343) [ALGB] (2) Real[2] tank1.portVelocities (344) [DISC] (1) Boolean $SEV_19 (345) [DISC] (1) Boolean $SEV_18 (346) [DISC] (1) Boolean $SEV_17 (347) [ALGB] (1) Real tank1.Hb_flow (348) [DISC] (1) Boolean $TEV_29 (349) [ALGB] (2) protected Real[2] tank2.portsData_height_internal = tank2.portsData.height (350) [DISC] (1) Boolean $TEV_28 (351) [DISC] (1) Boolean tankController.normal.stateGraphRoot.resume = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.resume.set) or false (352) [ALGB] (1) Real tank2.Hb_flow (353) [DISC] (1) Boolean $TEV_27 (354) [DISC] (1) Boolean $TEV_26 (355) [DISC] (1) Boolean $TEV_25 (356) [DISC] (1) Boolean $TEV_24 (357) [ALGB] (1) protected Real[1] shut.table.combiTimeTable.y (358) [DISC] (1) Boolean tankController.T3.inPort.available (359) [DISC] (1) Boolean $TEV_23 (360) [DISC] (1) Boolean $TEV_22 (361) [DISC] (1) Boolean $TEV_21 (362) [DISC] (2) Boolean[2] $SEV_7[$i1] (363) [DISC] (1) Boolean $TEV_20 (364) [ALGB] (1) Real valve1.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * valve1.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.temperature(valve1.state_b), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.temperature(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.setState_phX(valve1.port_b.p, valve1.port_b.h_outflow, {})), valve1.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (365) [ALGB] (1) protected Real valve3.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (366) [ALGB] (1) stream Real[1] source.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (367) [DISC] (1) Boolean[1] tankController.normal.suspend.reset (368) [DISC] (2) Boolean[2] $SEV_34[$i1] (369) [DISC] (1) final Boolean tankController.normal.T3.localCondition = tankController.normal.T3.localCondition (370) [ALGB] (1) protected Real tankController.normal.T2.t_dummy (371) [DISC] (1) protected Boolean tankController.normal.wait1.newActive (372) [ALGB] (2) stream Real[2] tank1.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (373) [DISC] (1) Boolean[1] tankController.normal.suspend.available (374) [DISC] (1) Boolean $TEV_19 (375) [ALGB] (1) Real valve3.V_flow = (995.586 * valve3.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * valve3.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.density(valve3.state_a), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve3.Medium.density(valve3.state_b), valve3.m_flow_small) (376) [DISC] (1) Boolean $TEV_18 (377) [ALGB] (1) Real[1] tank1.heatTransfer.heatPorts.T (start = {288.15 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, nominal = {300.0 for $i1 in 1:1}) (378) [ALGB] (1) protected Real tankController.normal.T4.t_dummy (379) [DISC] (1) Boolean $TEV_17 (380) [ALGB] (1) Real valve1.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (381) [DISC] (1) Boolean tankController.T2.outPort.occupied (382) [DISC] (1) Boolean tankController.normal.T4.outPort.occupied (383) [ALGB] (1) Real[1] source.ports.p (start = {1e5 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (384) [DISC] (1) Boolean $TEV_16 (385) [ALGB] (2) protected Real[2] tank2.portsData_height (386) [DISC] (1) Boolean $TEV_15 (387) [DISC] (1) Boolean $TEV_14 (388) [DISC] (1) Boolean $TEV_13 (389) [ALGB] (1) protected Real valve3.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (390) [DISC] (1) Boolean $TEV_12 (391) [DISC] (1) Boolean $TEV_11 (392) [DISC] (1) Boolean $TEV_10 (393) [DISC] (1) Boolean tankController.normal.T3.inPort.available (394) [ALGB] (2) Real[2] tank2.ports_penetration (395) [ALGB] (1) protected Real[1] stop.table.combiTimeTable.y (396) [ALGB] (1) final Real tank2.fluidVolume = tank2.fluidVolume (397) [DISC] (2) Boolean[2] $SEV_6[$i1] (398) [DISC] (1) protected Boolean tankController.normal.wait2.outerStatePort.localActive = tankController.normal.wait2.outerStatePort.localActive (399) [ALGB] (1) protected flow Real tankController.normal.fillTank2.outerStatePort.subgraphStatePort.activeSteps (400) [DISC] (1) Boolean tankController.T6.outPort.set (401) [ALGB] (1) Real valve1.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * valve1.V_flow, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.temperature(valve1.state_a), Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.temperature(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.valve1.Medium.setState_phX(valve1.port_a.p, valve1.port_a.h_outflow, {})), valve1.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (402) [ALGB] (2) flow Real[2] tank1.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (403) [ALGB] (1) protected Real valve3.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (404) [ALGB] (1) stream Real valve1.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (405) [DISC] (2) Boolean[2] $SEV_33[$i1] (406) [DISC] (1) final Boolean tankController.T2.localCondition = tankController.T2.localCondition System Equations (434/502) **************************** (1) [ARRY] (2) tank2.portsData_zeta_out = tank2.portsData_zeta_out_internal ($RES_SIM_429) (2) [ARRY] (2) start.reset = {stop.on, shut.on} ($RES_BND_554) (3) [SCAL] (1) $FUN_18 = Modelica.StateGraph.Temporary.anyTrue(tankController.emptyTanks.outPort.reset) ($RES_$AUX_606) (4) [SCAL] (1) $SEV_20 = tank2.fluidLevel <= tank2.fluidLevel_max ($RES_EVT_725) (5) [SCAL] (1) tankController.emptyTanks.outPort[1].reset = false ($RES_SIM_255) (6) [ARRY] (2) stop.reset = {start.on, shut.on} ($RES_BND_555) (7) [SCAL] (1) tank1.mb_flow = sum(tank1.ports.m_flow) ($RES_$AUX_605) (8) [SCAL] (1) tankController.emptyTanks.inPort[1].set = false ($RES_SIM_256) (9) [ARRY] (2) shut.reset = {start.on, stop.on} ($RES_BND_556) (10) [SCAL] (1) $FUN_20 = sum(tank1.ports_H_flow) ($RES_$AUX_604) (11) [SCAL] (1) tankController.emptyTanks.outPort[1].available = tankController.emptyTanks.outerStatePort.localActive ($RES_SIM_257) (12) [SCAL] (1) $FUN_21 = sum(tank1.ports_E_flow) ($RES_$AUX_603) (13) [SCAL] (1) tankController.emptyTanks.inPort[1].occupied = tankController.emptyTanks.outerStatePort.localActive ($RES_SIM_258) (14) [SCAL] (1) valve1.port_a_T = smooth(1, if $SEV_88 then valve1.state_a.T else if $SEV_89 then 273.15 + 2.390057361376673e-4 * valve1.port_a.h_outflow else if $SEV_87 then 0.25 * ((273.15 + 2.390057361376673e-4 * valve1.port_a.h_outflow) - valve1.state_a.T) * ((-3.0) + (995.586 * valve1.V_flow / valve1.m_flow_small) ^ 2.0) * ((995.586 * valve1.V_flow) / valve1.m_flow_small) + 0.5 * (273.15 + valve1.state_a.T + 2.390057361376673e-4 * valve1.port_a.h_outflow) else 0.5 * (273.15 + valve1.state_a.T + 2.390057361376673e-4 * valve1.port_a.h_outflow)) ($RES_BND_558) (15) [SCAL] (1) tank2.mb_flow = sum(tank2.ports.m_flow) ($RES_$AUX_602) (16) [FOR-] (2) ($RES_EVT_729) (16) [----] for $i1 in 1:2 loop (16) [----] [SCAL] (1) $SEV_24[$i1] = tank1.fluidLevel - (tank1.portsData_height[$i1] + 0.1 * tank1.portsData_diameter[$i1]) > 0.1 * tank1.portsData_diameter[$i1] ($RES_EVT_730) (16) [----] end for; (17) [WHEN] (1)when false then (17) [----] tankController.emptyTanks.oldActive := tankController.emptyTanks.outerStatePort.localActive (17) [----] end when; (18) [SCAL] (1) valve1.port_b_T = smooth(1, if $SEV_85 then valve1.state_b.T else if $SEV_86 then 273.15 + 2.390057361376673e-4 * valve1.port_b.h_outflow else if $SEV_87 then 0.5 * (273.15 + valve1.state_b.T + 2.390057361376673e-4 * valve1.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * valve1.port_b.h_outflow) - valve1.state_b.T) * ((-3.0) + (995.586 * valve1.V_flow / (-valve1.m_flow_small)) ^ 2.0) * ((995.586 * valve1.V_flow) / valve1.m_flow_small) else 0.5 * (273.15 + valve1.state_b.T + 2.390057361376673e-4 * valve1.port_b.h_outflow)) ($RES_BND_559) (19) [SCAL] (1) $FUN_23 = sum(tank2.ports_H_flow) ($RES_$AUX_601) (20) [SCAL] (1) $FUN_24 = sum(tank2.ports_E_flow) ($RES_$AUX_600) (21) [SCAL] (1) $SEV_91 = tankController.normal.fillTank2.outerStatePort.localActive or tankController.emptyTanks.outerStatePort.localActive and tank1.fluidLevel > tankController.minLevel ($RES_EVT_810) (22) [SCAL] (1) tankController.normal.wait1.outPort[1].reset = false ($RES_SIM_340) (23) [SCAL] (1) $SEV_92 = tank1.fluidLevel < tankController.minLevel and tank2.fluidLevel < tankController.minLevel ($RES_EVT_811) (24) [SCAL] (1) tankController.normal.wait1.inPort[1].set = false ($RES_SIM_341) (25) [SCAL] (1) $SEV_93 = tank2.fluidLevel < tankController.minLevel ($RES_EVT_812) (26) [SCAL] (1) tankController.normal.wait1.outPort[1].available = tankController.normal.wait1.outerStatePort.localActive ($RES_SIM_342) (27) [SCAL] (1) $SEV_94 = tank1.fluidLevel < tankController.normal.minLevel ($RES_EVT_813) (28) [SCAL] (1) tankController.normal.wait1.inPort[1].occupied = tankController.normal.wait1.outerStatePort.localActive ($RES_SIM_343) (29) [SCAL] (1) $SEV_95 = tank1.fluidLevel > tankController.normal.maxLevel ($RES_EVT_814) (30) [WHEN] (1)when tankController.normal.stateGraphRoot.suspend then (30) [----] tankController.normal.wait1.oldActive := tankController.normal.wait1.outerStatePort.localActive (30) [----] end when; (31) [SCAL] (1) tankController.normal.wait1.newActive = if tankController.normal.stateGraphRoot.resume then tankController.normal.wait1.oldActive else $SEV_67 ($RES_SIM_345) (32) [FOR-] (2) ($RES_SIM_170) (32) [----] for $i1 in 1:2 loop (32) [----] [SCAL] (1) tank1.inFlow[$i1] = $SEV_31[$i1] ($RES_SIM_171) (32) [----] end for; (33) [SCAL] (1) tankController.normal.wait1.outerStatePort.localActive = $TEV_23 ($RES_SIM_346) (34) [FOR-] (2) ($RES_SIM_172) (34) [----] for $i1 in 1:2 loop (34) [----] [-IF-] (1)if tank1.regularFlow[$i1] then (34) [----] [----] [SCAL] (1) tank1.ports[$i1].p = tank1.vessel_ps_static[$i1] + (0.5 / tank1.portAreas[$i1] ^ 2.0) * smooth(2, if $SEV_32[$i1] then (tank1.ports_penetration[$i1] * ((-1.0) + tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0 + tank1.portsData_zeta_in[$i1]) * tank1.ports[$i1].m_flow ^ 2.0) / tank1.portInDensities[$i1] else if $SEV_33[$i1] then -(((1.0 + tank1.portsData_zeta_out[$i1]) - tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0) * tank1.ports[$i1].m_flow ^ 2.0) / (tank1.ports_penetration[$i1] * 995.586) else if $SEV_34[$i1] then Modelica.Fluid.Utilities.regSquare2.regSquare2_utility(tank1.ports[$i1].m_flow, tank1.m_flow_turbulent[$i1], (tank1.ports_penetration[$i1] * ((-1.0) + tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0 + tank1.portsData_zeta_in[$i1])) / tank1.portInDensities[$i1], ((1.0 + tank1.portsData_zeta_out[$i1]) - tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0) / (tank1.ports_penetration[$i1] * 995.586), false, 1.0) else -Modelica.Fluid.Utilities.regSquare2.regSquare2_utility(-tank1.ports[$i1].m_flow, tank1.m_flow_turbulent[$i1], ((1.0 + tank1.portsData_zeta_out[$i1]) - tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0) / (tank1.ports_penetration[$i1] * 995.586), (tank1.ports_penetration[$i1] * ((-1.0) + tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0 + tank1.portsData_zeta_in[$i1])) / tank1.portInDensities[$i1], false, 1.0)) ($RES_SIM_174) (34) [----] [----] elseif tank1.inFlow[$i1] then (34) [----] [----] [SCAL] (1) tank1.ports[$i1].p = tank1.vessel_ps_static[$i1] ($RES_SIM_175) (34) [----] [----] else (34) [----] [----] [SCAL] (1) tank1.ports[$i1].m_flow = 0.0 ($RES_SIM_176) (34) [----] [----] end if; (34) [----] end for; (35) [SCAL] (1) tankController.normal.wait1.outerStatePort.subgraphStatePort.activeSteps = if tankController.normal.wait1.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_348) (36) [SCAL] (1) tankController.normal.emptyTank2.outPort[1].reset = false ($RES_SIM_349) (37) [FOR-] (2) ($RES_SIM_177) (37) [----] for $i1 in 1:2 loop (37) [----] [-IF-] (1)if tank1.regularFlow[$i1] then (37) [----] [----] [SCAL] (1) tank1.s[$i1] = tank1.fluidLevel - tank1.portsData_height[$i1] ($RES_SIM_179) (37) [----] [----] elseif tank1.inFlow[$i1] then (37) [----] [----] [SCAL] (1) tank1.s[$i1] = tank1.ports[$i1].m_flow ($RES_SIM_180) (37) [----] [----] else (37) [----] [----] [SCAL] (1) tank1.s[$i1] = ((tank1.ports[$i1].p - tank1.vessel_ps_static[$i1]) / 101325.0) * (tank1.portsData_height[$i1] - tank1.fluidLevel) ($RES_SIM_181) (37) [----] [----] end if; (37) [----] end for; (38) [ARRY] (2) tank2.portsData_zeta_in = tank2.portsData_zeta_in_internal ($RES_SIM_430) (39) [ARRY] (2) tank2.portsData_height = tank2.portsData_height_internal ($RES_SIM_431) (40) [ARRY] (2) tank2.portsData_diameter = tank2.portsData_diameter_internal ($RES_SIM_432) (41) [ARRY] (2) tank1.portsData_zeta_out = tank1.portsData_zeta_out_internal ($RES_SIM_433) (42) [ARRY] (2) tank1.portsData_zeta_in = tank1.portsData_zeta_in_internal ($RES_SIM_434) (43) [ARRY] (2) tank1.portsData_height = tank1.portsData_height_internal ($RES_SIM_435) (44) [SCAL] (1) tankController.emptyTanks.newActive = $SEV_52 ($RES_SIM_260) (45) [FOR-] (2) ($RES_EVT_731) (45) [----] for $i1 in 1:2 loop (45) [----] [SCAL] (1) $SEV_25[$i1] = tank1.fluidLevel - (tank1.portsData_height[$i1] + 0.1 * tank1.portsData_diameter[$i1]) < (-0.1 * tank1.portsData_diameter[$i1]) ($RES_EVT_732) (45) [----] end for; (46) [ARRY] (2) tank1.portsData_diameter = tank1.portsData_diameter_internal ($RES_SIM_436) (47) [SCAL] (1) tankController.emptyTanks.outerStatePort.localActive = $TEV_6 ($RES_SIM_261) (48) [FOR-] (2) ($RES_EVT_733) (48) [----] for $i1 in 1:2 loop (48) [----] [SCAL] (1) $SEV_26[$i1] = 0.1 * tank1.portsData_diameter[$i1] > 0.0 ($RES_EVT_734) (48) [----] end for; (49) [SCAL] (1) shut.table.combiTimeTable.y[1] = shut.table.realToBoolean.u ($RES_SIM_438) (50) [SCAL] (1) tankController.emptyTanks.outerStatePort.subgraphStatePort.activeSteps = if tankController.emptyTanks.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_263) (51) [ARRY] (1) tank1.heatTransfer.surfaceAreas = {2.0 * $FUN_26 * tank1.fluidLevel + tank1.crossArea} ($RES_BND_563) (52) [ARRY] (1) tank1.heatTransfer.Ts = {tank1.heatTransfer.states.p} ($RES_BND_564) (53) [FOR-] (2) ($RES_EVT_735) (53) [----] for $i1 in 1:2 loop (53) [----] [SCAL] (1) $SEV_27[$i1] = tank1.fluidLevel >= tank1.portsData_height[$i1] ($RES_EVT_736) (53) [----] end for; (54) [FOR-] (2) ($RES_BND_565) (54) [----] for $i1 in 1:2 loop (54) [----] [SCAL] (1) tank1.portAreas[$i1] = 0.7853981633974483 * tank1.portsData_diameter[$i1] ^ 2.0 ($RES_BND_566) (54) [----] end for; (55) [SCAL] (1) tankController.T5.outPort.set = $SEV_53 ($RES_SIM_266) (56) [FOR-] (2) ($RES_EVT_737) (56) [----] for $i1 in 1:2 loop (56) [----] [SCAL] (1) $SEV_28[$i1] = tank1.s[$i1] > 0.0 ($RES_EVT_738) (56) [----] end for; (57) [ARRY] (2) tank1.portsData_diameter_internal = tank1.portsData.diameter ($RES_BND_568) (58) [FOR-] (2) ($RES_EVT_739) (58) [----] for $i1 in 1:2 loop (58) [----] [SCAL] (1) $SEV_29[$i1] = tank1.portsData_height[$i1] >= tank1.fluidLevel_max ($RES_EVT_740) (58) [----] end for; (59) [ARRY] (2) tank1.portsData_height_internal = tank1.portsData.height ($RES_BND_569) (60) [SCAL] (1) tankController.normal.emptyTank2.inPort[1].set = false ($RES_SIM_350) (61) [SCAL] (1) tankController.normal.emptyTank2.outPort[1].available = tankController.normal.emptyTank2.outerStatePort.localActive ($RES_SIM_351) (62) [SCAL] (1) tankController.normal.emptyTank2.inPort[1].occupied = tankController.normal.emptyTank2.outerStatePort.localActive ($RES_SIM_352) (63) [WHEN] (1)when tankController.normal.stateGraphRoot.suspend then (63) [----] tankController.normal.emptyTank2.oldActive := tankController.normal.emptyTank2.outerStatePort.localActive (63) [----] end when; (64) [SCAL] (1) tankController.normal.emptyTank2.newActive = if tankController.normal.stateGraphRoot.resume then tankController.normal.emptyTank2.oldActive else $SEV_68 ($RES_SIM_354) (65) [SCAL] (1) tankController.normal.emptyTank2.outerStatePort.localActive = $TEV_26 ($RES_SIM_355) (66) [SCAL] (1) tankController.normal.emptyTank2.outerStatePort.subgraphStatePort.activeSteps = if tankController.normal.emptyTank2.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_357) (67) [FOR-] (2) ($RES_SIM_182) (67) [----] for $i1 in 1:2 loop (67) [----] [SCAL] (1) tank1.ports[$i1].h_outflow = 4184.0 * ((-273.15) - ((-273.15) - tank1.medium.T_degC)) ($RES_SIM_183) (67) [----] end for; (68) [SCAL] (1) $TEV_0 = $PRE.shut.reset ($RES_EVT_653) (69) [SCAL] (1) $TEV_1 = $PRE.stop.reset ($RES_EVT_654) (70) [FOR-] (2) ($RES_SIM_184) (70) [----] for $i1 in 1:2 loop (70) [----] [SCAL] (1) tank1.ports_E_flow[$i1] = tank1.ports[$i1].m_flow * (tank1.portVelocities[$i1] * 0.5 * tank1.portVelocities[$i1] + system.g * tank1.portsData_height[$i1]) ($RES_SIM_185) (70) [----] end for; (71) [SCAL] (1) $TEV_2 = $PRE.start.reset ($RES_EVT_655) (72) [SCAL] (1) $TEV_3 = $PRE.tankController.T6.outPort.set ($RES_EVT_656) (73) [SCAL] (1) tank1.ports_H_flow[2] = smooth(0, tank1.ports[2].m_flow * (if $SEV_35 then valve2.port_a.h_outflow else tank1.ports[2].h_outflow)) ($RES_SIM_186) (74) [SCAL] (1) $TEV_4 = $PRE.tankController.emptyTanks.oldActive ($RES_EVT_657) (75) [SCAL] (1) tank1.m_flow_turbulent[2] = tank1.m_flow_small ($RES_SIM_187) (76) [SCAL] (1) $TEV_5 = $PRE.tankController.emptyTanks.outerStatePort.localActive ($RES_EVT_658) (77) [SCAL] (1) tank1.portVelocities[2] = smooth(0, 0.0010044335697769957 * (tank1.ports[2].m_flow / tank1.portAreas[2])) ($RES_SIM_188) (78) [SCAL] (1) $TEV_6 = $PRE.tankController.emptyTanks.newActive ($RES_EVT_659) (79) [SCAL] (1) stop.table.combiTimeTable.y[1] = stop.table.realToBoolean.u ($RES_SIM_440) (80) [SCAL] (1) tank1.portInDensities[2] = 995.586 ($RES_SIM_189) (81) [SCAL] (1) start.table.combiTimeTable.y[1] = start.table.realToBoolean.u ($RES_SIM_442) (82) [SCAL] (1) tankController.T4.outPort.set = tankController.normal.resume[1].set ($RES_SIM_443) (83) [SCAL] (1) tankController.T4.outPort.occupied = tankController.normal.resume[1].occupied ($RES_SIM_444) (84) [SCAL] (1) tankController.T6.outPort.set = tankController.s1.inPort[2].set ($RES_SIM_445) (85) [ARRY] (2) tank1.portsData_zeta_in_internal = tank1.portsData.zeta_in ($RES_BND_570) (86) [FOR-] (2) ($RES_EVT_741) (86) [----] for $i1 in 1:2 loop (86) [----] [SCAL] (1) $SEV_30[$i1] = $SEV_28[$i1] or $SEV_29[$i1] ($RES_EVT_742) (86) [----] end for; (87) [SCAL] (1) tankController.T6.outPort.occupied = tankController.s1.inPort[2].occupied ($RES_SIM_446) (88) [ARRY] (2) tank1.portsData_zeta_out_internal = tank1.portsData.zeta_out ($RES_BND_571) (89) [SCAL] (1) tankController.T2.outPort.set = tankController.s1.inPort[1].set ($RES_SIM_447) (90) [FOR-] (2) ($RES_EVT_743) (90) [----] for $i1 in 1:2 loop (90) [----] [SCAL] (1) $SEV_31[$i1] = not tank1.regularFlow[$i1] and $SEV_30[$i1] ($RES_EVT_744) (90) [----] end for; (91) [SCAL] (1) tankController.T4.outPort.set = $SEV_54 ($RES_SIM_273) (92) [SCAL] (1) tankController.T2.outPort.occupied = tankController.s1.inPort[1].occupied ($RES_SIM_448) (93) [SCAL] (1) valve2.port_a_T = smooth(1, if $SEV_83 then valve2.state_a.T else if $SEV_84 then 273.15 + 2.390057361376673e-4 * valve2.port_a.h_outflow else if $SEV_82 then 0.25 * ((273.15 + 2.390057361376673e-4 * valve2.port_a.h_outflow) - valve2.state_a.T) * ((-3.0) + (995.586 * valve2.V_flow / valve2.m_flow_small) ^ 2.0) * ((995.586 * valve2.V_flow) / valve2.m_flow_small) + 0.5 * (273.15 + valve2.state_a.T + 2.390057361376673e-4 * valve2.port_a.h_outflow) else 0.5 * (273.15 + valve2.state_a.T + 2.390057361376673e-4 * valve2.port_a.h_outflow)) ($RES_BND_574) (94) [SCAL] (1) tankController.s2.outPort[2].reset = tankController.T4.outPort.set ($RES_SIM_449) (95) [FOR-] (2) ($RES_EVT_745) (95) [----] for $i1 in 1:2 loop (95) [----] [SCAL] (1) $SEV_32[$i1] = tank1.ports[$i1].m_flow >= tank1.m_flow_turbulent[$i1] ($RES_EVT_746) (95) [----] end for; (96) [SCAL] (1) valve2.port_b_T = smooth(1, if $SEV_80 then valve2.state_b.T else if $SEV_81 then 273.15 + 2.390057361376673e-4 * valve2.port_b.h_outflow else if $SEV_82 then 0.5 * (273.15 + valve2.state_b.T + 2.390057361376673e-4 * valve2.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * valve2.port_b.h_outflow) - valve2.state_b.T) * ((-3.0) + (995.586 * valve2.V_flow / (-valve2.m_flow_small)) ^ 2.0) * ((995.586 * valve2.V_flow) / valve2.m_flow_small) else 0.5 * (273.15 + valve2.state_b.T + 2.390057361376673e-4 * valve2.port_b.h_outflow)) ($RES_BND_575) (97) [FOR-] (2) ($RES_EVT_747) (97) [----] for $i1 in 1:2 loop (97) [----] [SCAL] (1) $SEV_33[$i1] = tank1.ports[$i1].m_flow <= (-tank1.m_flow_turbulent[$i1]) ($RES_EVT_748) (97) [----] end for; (98) [SCAL] (1) valve3.port_a_T = smooth(1, if $SEV_78 then valve3.state_a.T else if $SEV_79 then 273.15 + 2.390057361376673e-4 * valve3.port_a.h_outflow else if $SEV_77 then 0.25 * ((273.15 + 2.390057361376673e-4 * valve3.port_a.h_outflow) - valve3.state_a.T) * ((-3.0) + (995.586 * valve3.V_flow / valve3.m_flow_small) ^ 2.0) * ((995.586 * valve3.V_flow) / valve3.m_flow_small) + 0.5 * (273.15 + valve3.state_a.T + 2.390057361376673e-4 * valve3.port_a.h_outflow) else 0.5 * (273.15 + valve3.state_a.T + 2.390057361376673e-4 * valve3.port_a.h_outflow)) ($RES_BND_577) (99) [SCAL] (1) valve3.port_b_T = smooth(1, if $SEV_75 then valve3.state_b.T else if $SEV_76 then 273.15 + 2.390057361376673e-4 * valve3.port_b.h_outflow else if $SEV_77 then 0.5 * (273.15 + valve3.state_b.T + 2.390057361376673e-4 * valve3.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * valve3.port_b.h_outflow) - valve3.state_b.T) * ((-3.0) + (995.586 * valve3.V_flow / (-valve3.m_flow_small)) ^ 2.0) * ((995.586 * valve3.V_flow) / valve3.m_flow_small) else 0.5 * (273.15 + valve3.state_b.T + 2.390057361376673e-4 * valve3.port_b.h_outflow)) ($RES_BND_578) (100) [FOR-] (2) ($RES_SIM_278) (100) [----] for $i1 in 1:2 loop (100) [----] [SCAL] (1) tankController.s2.outPort[$i1].reset = false ($RES_SIM_279) (100) [----] end for; (101) [FOR-] (2) ($RES_EVT_749) (101) [----] for $i1 in 1:2 loop (101) [----] [SCAL] (1) $SEV_34[$i1] = (tank1.ports_penetration[$i1] * ((-1.0) + tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0 + tank1.portsData_zeta_in[$i1])) / tank1.portInDensities[$i1] >= ((1.0 + tank1.portsData_zeta_out[$i1]) - tank1.portAreas[$i1] ^ 2.0 / tank1.vesselArea ^ 2.0) / (tank1.ports_penetration[$i1] * 995.586) ($RES_EVT_750) (101) [----] end for; (102) [SCAL] (1) tankController.normal.T3.outPort.set = $SEV_69 ($RES_SIM_360) (103) [SCAL] (1) $TEV_7 = $PRE.tankController.T5.outPort.set ($RES_EVT_660) (104) [SCAL] (1) tank1.ports_H_flow[1] = smooth(0, tank1.ports[1].m_flow * (if $SEV_36 then valve1.port_b.h_outflow else tank1.ports[1].h_outflow)) ($RES_SIM_190) (105) [SCAL] (1) tankController.normal.fillTank2.outPort[1].reset = false ($RES_SIM_365) (106) [SCAL] (1) $TEV_8 = $PRE.tankController.T4.outPort.set ($RES_EVT_661) (107) [SCAL] (1) tank1.m_flow_turbulent[1] = tank1.m_flow_small ($RES_SIM_191) (108) [SCAL] (1) tankController.normal.fillTank2.inPort[1].set = false ($RES_SIM_366) (109) [SCAL] (1) $TEV_9 = $PRE.tankController.s2.oldActive ($RES_EVT_662) (110) [SCAL] (1) tank1.portVelocities[1] = smooth(0, 0.0010044335697769957 * (tank1.ports[1].m_flow / tank1.portAreas[1])) ($RES_SIM_192) (111) [SCAL] (1) tankController.normal.fillTank2.outPort[1].available = tankController.normal.fillTank2.outerStatePort.localActive ($RES_SIM_367) (112) [SCAL] (1) $TEV_10 = $PRE.tankController.s2.outerStatePort.localActive ($RES_EVT_663) (113) [SCAL] (1) tank1.portInDensities[1] = 995.586 ($RES_SIM_193) (114) [SCAL] (1) tankController.normal.fillTank2.inPort[1].occupied = tankController.normal.fillTank2.outerStatePort.localActive ($RES_SIM_368) (115) [SCAL] (1) $TEV_11 = $PRE.tankController.s2.newActive ($RES_EVT_664) (116) [WHEN] (1)when tankController.normal.stateGraphRoot.suspend then (116) [----] tankController.normal.fillTank2.oldActive := tankController.normal.fillTank2.outerStatePort.localActive (116) [----] end when; (117) [SCAL] (1) $TEV_12 = $PRE.tankController.T3.outPort.set ($RES_EVT_665) (118) [SCAL] (1) $TEV_13 = $PRE.tankController.T2.outPort.set ($RES_EVT_666) (119) [SCAL] (1) tank1.Qb_flow = tank1.heatTransfer.Q_flows[1] ($RES_SIM_196) (120) [SCAL] (1) $TEV_14 = $PRE.tankController.T1.inPort.reset ($RES_EVT_667) (121) [SCAL] (1) tank1.Hb_flow = $FUN_20 + $FUN_21 ($RES_SIM_197) (122) [SCAL] (1) $TEV_15 = $PRE.tankController.normal.newActive ($RES_EVT_668) (123) [SCAL] (1) valve1.state_a.p = valve1.port_a.p ($RES_SIM_624) (124) [SCAL] (1) $TEV_16 = $PRE.tankController.normal.T4.enableFire ($RES_EVT_669) (125) [FOR-] (2) ($RES_SIM_199) (125) [----] for $i1 in 1:2 loop (125) [----] [SCAL] (1) tank1.vessel_ps_static[$i1] = system.g * max(0.0, tank1.fluidLevel - tank1.portsData_height[$i1]) * 995.586 + tank1.p_ambient ($RES_SIM_200) (125) [----] end for; (126) [SCAL] (1) tankController.s2.outPort[2].available = tankController.T4.inPort.available ($RES_SIM_450) (127) [SCAL] (1) valve1.state_a.T = 273.15 + 2.390057361376673e-4 * source.ports[1].h_outflow ($RES_SIM_625) (128) [SCAL] (1) tankController.s2.outPort[1].reset = tankController.T5.outPort.set ($RES_SIM_451) (129) [SCAL] (1) valve1.state_b.p = valve1.port_b.p ($RES_SIM_626) (130) [SCAL] (1) tankController.s2.outPort[1].available = tankController.T5.inPort.available ($RES_SIM_452) (131) [SCAL] (1) valve1.state_b.T = 273.15 + 2.390057361376673e-4 * tank1.ports[1].h_outflow ($RES_SIM_627) (132) [SCAL] (1) valve2.state_a.p = valve2.port_a.p ($RES_SIM_628) (133) [SCAL] (1) tankController.T3.outPort.set = tankController.s2.inPort[1].set ($RES_SIM_454) (134) [SCAL] (1) valve2.state_a.T = 273.15 + 2.390057361376673e-4 * tank1.ports[2].h_outflow ($RES_SIM_629) (135) [SCAL] (1) tankController.T3.outPort.occupied = tankController.s2.inPort[1].occupied ($RES_SIM_455) (136) [SCAL] (1) tankController.s2.inPort[1].set = false ($RES_SIM_280) (137) [SCAL] (1) $SEV_35 = tank1.ports[2].m_flow > 0.0 ($RES_EVT_751) (138) [SCAL] (1) tankController.normal.suspend[1].reset = tankController.T3.outPort.set ($RES_SIM_456) (139) [FOR-] (2) ($RES_SIM_281) (139) [----] for $i1 in 1:2 loop (139) [----] [SCAL] (1) tankController.s2.outPort[$i1].available = if $SEV_55[$i1] then tankController.s2.outerStatePort.localActive else $SEV_56[$i1] ($RES_SIM_282) (139) [----] end for; (140) [SCAL] (1) $SEV_36 = tank1.ports[1].m_flow > 0.0 ($RES_EVT_752) (141) [SCAL] (1) tankController.normal.suspend[1].available = tankController.T3.inPort.available ($RES_SIM_457) (142) [ARRY] (1) tank2.heatTransfer.surfaceAreas = {2.0 * $FUN_25 * tank2.fluidLevel + tank2.crossArea} ($RES_BND_582) (143) [SCAL] (1) $SEV_37 = tank1.fluidLevel > (-1e-6 * tank1.fluidLevel_max) ($RES_EVT_753) (144) [ARRY] (1) tank2.heatTransfer.Ts = {tank2.heatTransfer.states.p} ($RES_BND_583) (145) [SCAL] (1) tankController.s2.inPort[1].occupied = tankController.s2.outerStatePort.localActive ($RES_SIM_283) (146) [SCAL] (1) $SEV_38 = tank1.fluidLevel <= tank1.fluidLevel_max ($RES_EVT_754) (147) [FOR-] (2) ($RES_BND_584) (147) [----] for $i1 in 1:2 loop (147) [----] [SCAL] (1) tank2.portAreas[$i1] = 0.7853981633974483 * tank2.portsData_diameter[$i1] ^ 2.0 ($RES_BND_585) (147) [----] end for; (148) [WHEN] (1)when false then (148) [----] tankController.s2.oldActive := tankController.s2.outerStatePort.localActive (148) [----] end when; (149) [SCAL] (1) tankController.s2.newActive = $SEV_57 ($RES_SIM_285) (150) [SCAL] (1) tankController.s2.outerStatePort.localActive = $TEV_11 ($RES_SIM_286) (151) [ARRY] (2) tank2.portsData_diameter_internal = tank2.portsData.diameter ($RES_BND_587) (152) [ARRY] (2) tank2.portsData_height_internal = tank2.portsData.height ($RES_BND_588) (153) [SCAL] (1) tankController.s2.outerStatePort.subgraphStatePort.activeSteps = if tankController.s2.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_288) (154) [SCAL] (1) $SEV_43 = shut.table.realToBoolean.u >= shut.table.realToBoolean.threshold ($RES_EVT_759) (155) [ARRY] (2) tank2.portsData_zeta_in_internal = tank2.portsData.zeta_in ($RES_BND_589) (156) [SCAL] (1) tankController.normal.fillTank2.newActive = if tankController.normal.stateGraphRoot.resume then tankController.normal.fillTank2.oldActive else $SEV_70 ($RES_SIM_370) (157) [SCAL] (1) tankController.normal.fillTank2.outerStatePort.localActive = $TEV_30 ($RES_SIM_371) (158) [SCAL] (1) tankController.normal.fillTank2.outerStatePort.subgraphStatePort.activeSteps = if tankController.normal.fillTank2.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_373) (159) [SCAL] (1) $TEV_17 = $PRE.tankController.normal.wait2.oldActive ($RES_EVT_670) (160) [SCAL] (1) $TEV_18 = $PRE.tankController.normal.wait2.outerStatePort.localActive ($RES_EVT_671) (161) [SCAL] (1) tankController.normal.T1.outPort.set = $SEV_71 ($RES_SIM_376) (162) [SCAL] (1) $TEV_19 = $PRE.tankController.normal.wait2.newActive ($RES_EVT_672) (163) [SCAL] (1) $TEV_20 = $PRE.tankController.normal.T2.enableFire ($RES_EVT_673) (164) [SCAL] (1) $TEV_21 = $PRE.tankController.normal.wait1.oldActive ($RES_EVT_674) (165) [SCAL] (1) valve2.state_b.p = valve2.port_b.p ($RES_SIM_630) (166) [SCAL] (1) $TEV_22 = $PRE.tankController.normal.wait1.outerStatePort.localActive ($RES_EVT_675) (167) [SCAL] (1) valve2.state_b.T = 273.15 + 2.390057361376673e-4 * tank2.ports[1].h_outflow ($RES_SIM_631) (168) [SCAL] (1) $TEV_23 = $PRE.tankController.normal.wait1.newActive ($RES_EVT_676) (169) [SCAL] (1) valve3.state_a.p = valve3.port_a.p ($RES_SIM_632) (170) [SCAL] (1) $TEV_24 = $PRE.tankController.normal.emptyTank2.oldActive ($RES_EVT_677) (171) [SCAL] (1) valve3.state_a.T = 273.15 + 2.390057361376673e-4 * tank2.ports[2].h_outflow ($RES_SIM_633) (172) [SCAL] (1) $TEV_25 = $PRE.tankController.normal.emptyTank2.outerStatePort.localActive ($RES_EVT_678) (173) [SCAL] (1) valve3.state_b.p = valve3.port_b.p ($RES_SIM_634) (174) [SCAL] (1) $TEV_26 = $PRE.tankController.normal.emptyTank2.newActive ($RES_EVT_679) (175) [SCAL] (1) valve3.state_b.T = 273.15 + 2.390057361376673e-4 * ambient1.ports[1].h_outflow ($RES_SIM_635) (176) [SCAL] (1) tankController.emptyTanks.outPort[1].reset = tankController.T6.outPort.set ($RES_SIM_461) (177) [SCAL] (1) tankController.emptyTanks.outPort[1].available = tankController.T6.inPort.available ($RES_SIM_462) (178) [SCAL] (1) tankController.T5.outPort.set = tankController.emptyTanks.inPort[1].set ($RES_SIM_463) (179) [SCAL] (1) tankController.T5.outPort.occupied = tankController.emptyTanks.inPort[1].occupied ($RES_SIM_464) (180) [SCAL] (1) $SEV_44 = time >= $PRE.shut.table.combiTimeTable.nextTimeEvent ($RES_EVT_760) (181) [ARRY] (2) tank2.portsData_zeta_out_internal = tank2.portsData.zeta_out ($RES_BND_590) (182) [SCAL] (1) tankController.T3.outPort.set = $SEV_58 ($RES_SIM_291) (183) [SCAL] (1) $SEV_46 = stop.table.realToBoolean.u >= stop.table.realToBoolean.threshold ($RES_EVT_762) (184) [SCAL] (1) $SEV_47 = time >= $PRE.stop.table.combiTimeTable.nextTimeEvent ($RES_EVT_763) (185) [SCAL] (1) tankController.s1.outPort[1].reset = tankController.T1.inPort.reset ($RES_SIM_469) (186) [SCAL] (1) $SEV_49 = start.table.realToBoolean.u >= start.table.realToBoolean.threshold ($RES_EVT_765) (187) [SCAL] (1) $SEV_50 = time >= $PRE.start.table.combiTimeTable.nextTimeEvent ($RES_EVT_766) (188) [ARRY] (2) tank1.heatTransfer.states = {tank1.medium.state} ($RES_BND_596) (189) [SCAL] (1) $SEV_51 = (tankController.T6.localCondition and tankController.T6.inPort.available) and not tankController.T6.outPort.occupied ($RES_EVT_767) (190) [ARRY] (2) tank2.heatTransfer.states = {tank2.medium.state} ($RES_BND_597) (191) [SCAL] (1) $SEV_52 = $FUN_17 or tankController.emptyTanks.outerStatePort.localActive and not $FUN_18 ($RES_EVT_768) (192) [SCAL] (1) tankController.T2.outPort.set = $SEV_59 ($RES_SIM_298) (193) [SCAL] (1) $SEV_53 = (shut.on and tankController.T5.inPort.available) and not tankController.T5.outPort.occupied ($RES_EVT_769) (194) [SCAL] (1) tankController.normal.fillTank1.outPort[1].reset = false ($RES_SIM_381) (195) [SCAL] (1) tankController.normal.fillTank1.inPort[1].set = false ($RES_SIM_382) (196) [SCAL] (1) tankController.normal.fillTank1.outPort[1].available = tankController.normal.fillTank1.outerStatePort.localActive ($RES_SIM_383) (197) [SCAL] (1) tankController.normal.fillTank1.inPort[1].occupied = tankController.normal.fillTank1.outerStatePort.localActive ($RES_SIM_384) (198) [SCAL] (1) $TEV_27 = $PRE.tankController.normal.T3.outPort.set ($RES_EVT_680) (199) [WHEN] (1)when tankController.normal.stateGraphRoot.suspend then (199) [----] tankController.normal.fillTank1.oldActive := tankController.normal.fillTank1.outerStatePort.localActive (199) [----] end when; (200) [SCAL] (1) $TEV_28 = $PRE.tankController.normal.fillTank2.oldActive ($RES_EVT_681) (201) [SCAL] (1) tankController.normal.fillTank1.newActive = if tankController.normal.stateGraphRoot.resume then tankController.normal.fillTank1.oldActive else $SEV_72 ($RES_SIM_386) (202) [SCAL] (1) $TEV_29 = $PRE.tankController.normal.fillTank2.outerStatePort.localActive ($RES_EVT_682) (203) [SCAL] (1) tankController.normal.fillTank1.outerStatePort.localActive = $TEV_34 ($RES_SIM_387) (204) [SCAL] (1) $TEV_30 = $PRE.tankController.normal.fillTank2.newActive ($RES_EVT_683) (205) [SCAL] (1) $TEV_31 = $PRE.tankController.normal.T1.outPort.set ($RES_EVT_684) (206) [SCAL] (1) tankController.normal.fillTank1.outerStatePort.subgraphStatePort.activeSteps = if tankController.normal.fillTank1.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_389) (207) [SCAL] (1) $TEV_32 = $PRE.tankController.normal.fillTank1.oldActive ($RES_EVT_685) (208) [SCAL] (1) $TEV_33 = $PRE.tankController.normal.fillTank1.outerStatePort.localActive ($RES_EVT_686) (209) [SCAL] (1) $TEV_34 = $PRE.tankController.normal.fillTank1.newActive ($RES_EVT_687) (210) [SCAL] (1) $TEV_35 = $PRE.tankController.s1.oldActive ($RES_EVT_688) (211) [SCAL] (1) $TEV_36 = $PRE.tankController.s1.outerStatePort.localActive ($RES_EVT_689) (212) [SCAL] (1) tankController.s1.outPort[1].available = tankController.T1.inPort.available ($RES_SIM_470) (213) [SCAL] (1) tankController.normal.T4.outPort.set = tankController.normal.emptyTank2.inPort[1].set ($RES_SIM_471) (214) [SCAL] (1) tankController.normal.T4.outPort.occupied = tankController.normal.emptyTank2.inPort[1].occupied ($RES_SIM_472) (215) [SCAL] (1) tankController.normal.T3.outPort.set = tankController.normal.wait2.inPort[1].set ($RES_SIM_473) (216) [SCAL] (1) tankController.normal.T3.outPort.occupied = tankController.normal.wait2.inPort[1].occupied ($RES_SIM_474) (217) [SCAL] (1) $SEV_54 = (start.on and tankController.T4.inPort.available) and not tankController.T4.outPort.occupied ($RES_EVT_770) (218) [SCAL] (1) tankController.normal.wait2.outPort[1].reset = tankController.normal.T4.outPort.set ($RES_SIM_475) (219) [FOR-] (2) ($RES_EVT_771) (219) [----] for $i1 in 1:2 loop (219) [----] [SCAL] (1) $SEV_55[$i1] = $i1 == 1 ($RES_EVT_772) (219) [----] end for; (220) [SCAL] (1) tankController.normal.wait2.outPort[1].available = tankController.normal.T4.inPort.available ($RES_SIM_476) (221) [SCAL] (1) tankController.normal.T1.outPort.set = tankController.normal.wait1.inPort[1].set ($RES_SIM_477) (222) [FOR-] (2) ($RES_EVT_773) (222) [----] for $i1 in 1:2 loop (222) [----] [SCAL] (1) $SEV_56[$i1] = tankController.s2.outPort[$i1 - 1].available and not tankController.s2.outPort[$i1 - 1].reset ($RES_EVT_774) (222) [----] end for; (223) [SCAL] (1) tankController.normal.T1.outPort.occupied = tankController.normal.wait1.inPort[1].occupied ($RES_SIM_478) (224) [SCAL] (1) tankController.normal.T2.outPort.set = tankController.normal.fillTank2.inPort[1].set ($RES_SIM_479) (225) [SCAL] (1) $SEV_57 = $FUN_15 or tankController.s2.outerStatePort.localActive and not $FUN_16 ($RES_EVT_775) (226) [SCAL] (1) $SEV_58 = (stop.on and tankController.T3.inPort.available) and not tankController.T3.outPort.occupied ($RES_EVT_776) (227) [SCAL] (1) $SEV_59 = (tankController.T2.localCondition and tankController.normal.outPort.available) and not tankController.T2.outPort.occupied ($RES_EVT_777) (228) [SCAL] (1) $SEV_60 = (start.on and tankController.T1.inPort.available) and not tankController.T1.outPort.occupied ($RES_EVT_778) (229) [SCAL] (1) $SEV_61 = tankController.normal.activeSteps > 0 and not $FUN_13 or $FUN_14 ($RES_EVT_779) (230) [SCAL] (1) tankController.normal.outerState.subgraphStatePort.activeSteps = if tankController.normal.outerState.active then 1.0 else 0.0 ($RES_SIM_390) (231) [SCAL] (1) tankController.s1.outPort[1].reset = false ($RES_SIM_394) (232) [SCAL] (1) $TEV_37 = $PRE.tankController.s1.newActive ($RES_EVT_690) (233) [FOR-] (2) ($RES_SIM_395) (233) [----] for $i1 in 1:2 loop (233) [----] [SCAL] (1) tankController.s1.inPort[$i1].set = false ($RES_SIM_396) (233) [----] end for; (234) [SCAL] (1) $TEV_38 = $PRE.shut.table.combiTimeTable.nextTimeEventScaled ($RES_EVT_691) (235) [SCAL] (1) $TEV_39 = $PRE.stop.table.combiTimeTable.nextTimeEventScaled ($RES_EVT_692) (236) [SCAL] (1) tankController.s1.outPort[1].available = tankController.s1.outerStatePort.localActive ($RES_SIM_397) (237) [SCAL] (1) $TEV_40 = $PRE.start.table.combiTimeTable.nextTimeEventScaled ($RES_EVT_693) (238) [FOR-] (2) ($RES_SIM_398) (238) [----] for $i1 in 1:2 loop (238) [----] [SCAL] (1) tankController.s1.inPort[$i1].occupied = if $SEV_55[$i1] then tankController.s1.outerStatePort.localActive else $SEV_73[$i1] ($RES_SIM_399) (238) [----] end for; (239) [SCAL] (1) tankController.normal.T2.outPort.occupied = tankController.normal.fillTank2.inPort[1].occupied ($RES_SIM_480) (240) [SCAL] (1) tankController.normal.wait1.outPort[1].reset = tankController.normal.T2.outPort.set ($RES_SIM_481) (241) [SCAL] (1) tankController.normal.wait1.outPort[1].available = tankController.normal.T2.inPort.available ($RES_SIM_482) (242) [SCAL] (1) tankController.normal.emptyTank2.outPort[1].reset = tankController.T2.outPort.set ($RES_SIM_483) (243) [SCAL] (1) tankController.normal.emptyTank2.outPort[1].available = tankController.normal.outPort.available ($RES_SIM_484) (244) [SCAL] (1) $SEV_62 = tankController.normal.T4.inPort.available and not tankController.normal.T4.outPort.occupied ($RES_EVT_780) (245) [SCAL] (1) tankController.normal.fillTank2.outPort[1].reset = tankController.normal.T3.outPort.set ($RES_SIM_485) (246) [SCAL] (1) $SEV_63 = tankController.normal.T4.enableFire and time >= ((time - tankController.normal.T4.t_dummy) + tankController.normal.T4.waitTime) ($RES_EVT_781) (247) [SCAL] (1) tankController.normal.fillTank2.outPort[1].available = tankController.normal.T3.inPort.available ($RES_SIM_486) (248) [SCAL] (1) $SEV_64 = ($FUN_11 or tankController.normal.wait2.outerStatePort.localActive and not $FUN_12) and not tankController.normal.stateGraphRoot.suspend ($RES_EVT_782) (249) [SCAL] (1) tankController.normal.fillTank1.outPort[1].reset = tankController.normal.T1.outPort.set ($RES_SIM_487) (250) [SCAL] (1) $SEV_65 = tankController.normal.T2.inPort.available and not tankController.normal.T2.outPort.occupied ($RES_EVT_783) (251) [SCAL] (1) tankController.normal.fillTank1.outPort[1].available = tankController.normal.T1.inPort.available ($RES_SIM_488) (252) [SCAL] (1) $SEV_66 = tankController.normal.T2.enableFire and time >= ((time - tankController.normal.T2.t_dummy) + tankController.normal.T2.waitTime) ($RES_EVT_784) (253) [SCAL] (1) tankController.normal.fillTank1.inPort[1].set = tankController.T1.inPort.reset ($RES_SIM_489) (254) [SCAL] (1) $SEV_67 = ($FUN_9 or tankController.normal.wait1.outerStatePort.localActive and not $FUN_10) and not tankController.normal.stateGraphRoot.suspend ($RES_EVT_785) (255) [SCAL] (1) $SEV_68 = ($FUN_7 or tankController.normal.emptyTank2.outerStatePort.localActive and not $FUN_8) and not tankController.normal.stateGraphRoot.suspend ($RES_EVT_786) (256) [SCAL] (1) $SEV_69 = (tankController.normal.T3.localCondition and tankController.normal.T3.inPort.available) and not tankController.normal.T3.outPort.occupied ($RES_EVT_787) (257) [SCAL] (1) $SEV_70 = ($FUN_5 or tankController.normal.fillTank2.outerStatePort.localActive and not $FUN_6) and not tankController.normal.stateGraphRoot.suspend ($RES_EVT_788) (258) [SCAL] (1) $SEV_71 = (tankController.normal.T1.localCondition and tankController.normal.T1.inPort.available) and not tankController.normal.T1.outPort.occupied ($RES_EVT_789) (259) [SCAL] (1) tankController.normal.fillTank1.inPort[1].occupied = tankController.T1.outPort.occupied ($RES_SIM_490) (260) [SCAL] (1) $SEV_72 = ($FUN_3 or tankController.normal.fillTank1.outerStatePort.localActive and not $FUN_4) and not tankController.normal.stateGraphRoot.suspend ($RES_EVT_790) (261) [FOR-] (2) ($RES_EVT_791) (261) [----] for $i1 in 1:2 loop (261) [----] [SCAL] (1) $SEV_73[$i1] = tankController.s1.inPort[$i1 - 1].occupied or tankController.s1.inPort[$i1 - 1].set ($RES_EVT_792) (261) [----] end for; (262) [SCAL] (1) $SEV_74 = $FUN_1 or tankController.s1.outerStatePort.localActive and not $FUN_2 ($RES_EVT_793) (263) [SCAL] (1) $SEV_75 = (-995.586 * valve3.V_flow) > valve3.m_flow_small ($RES_EVT_794) (264) [SCAL] (1) $SEV_76 = (-995.586 * valve3.V_flow) < (-valve3.m_flow_small) ($RES_EVT_795) (265) [SCAL] (1) $SEV_77 = valve3.m_flow_small > 0.0 ($RES_EVT_796) (266) [SCAL] (1) $SEV_78 = 995.586 * valve3.V_flow > valve3.m_flow_small ($RES_EVT_797) (267) [SCAL] (1) $SEV_79 = 995.586 * valve3.V_flow < (-valve3.m_flow_small) ($RES_EVT_798) (268) [SCAL] (1) $SEV_80 = (-995.586 * valve2.V_flow) > valve2.m_flow_small ($RES_EVT_799) (269) [ALGO] (1) ($RES_SIM_47) (269) [----] when $PRE.shut.reset then (269) [----] shut.on := false; (269) [----] end when; (269) [----] when change(shut.table.y) then (269) [----] shut.on := true; (269) [----] end when; (270) [ALGO] (1) ($RES_SIM_48) (270) [----] when $PRE.stop.reset then (270) [----] stop.on := false; (270) [----] end when; (270) [----] when change(stop.table.y) then (270) [----] stop.on := true; (270) [----] end when; (271) [ALGO] (1) ($RES_SIM_49) (271) [----] when $PRE.start.reset then (271) [----] start.on := false; (271) [----] end when; (271) [----] when change(start.table.y) then (271) [----] start.on := true; (271) [----] end when; (272) [SCAL] (1) $FUN_25 = sqrt(3.141592653589793 * tank2.crossArea) ($RES_$AUX_599) (273) [SCAL] (1) $FUN_26 = sqrt(3.141592653589793 * tank1.crossArea) ($RES_$AUX_598) (274) [SCAL] (1) source.ports[1].p = source.p ($RES_SIM_50) (275) [SCAL] (1) source.ports[1].h_outflow = 4184.0 * ((-273.15) + source.T) ($RES_SIM_51) (276) [FOR-] (2) ($RES_SIM_100) (276) [----] for $i1 in 1:2 loop (276) [----] [-IF-] (1)if tank2.regularFlow[$i1] then (276) [----] [----] [SCAL] (1) tank2.ports[$i1].p = tank2.vessel_ps_static[$i1] + (0.5 / tank2.portAreas[$i1] ^ 2.0) * smooth(2, if $SEV_14[$i1] then (tank2.ports_penetration[$i1] * ((-1.0) + tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0 + tank2.portsData_zeta_in[$i1]) * tank2.ports[$i1].m_flow ^ 2.0) / tank2.portInDensities[$i1] else if $SEV_15[$i1] then -(((1.0 + tank2.portsData_zeta_out[$i1]) - tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0) * tank2.ports[$i1].m_flow ^ 2.0) / (tank2.ports_penetration[$i1] * 995.586) else if $SEV_16[$i1] then Modelica.Fluid.Utilities.regSquare2.regSquare2_utility(tank2.ports[$i1].m_flow, tank2.m_flow_turbulent[$i1], (tank2.ports_penetration[$i1] * ((-1.0) + tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0 + tank2.portsData_zeta_in[$i1])) / tank2.portInDensities[$i1], ((1.0 + tank2.portsData_zeta_out[$i1]) - tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0) / (tank2.ports_penetration[$i1] * 995.586), false, 1.0) else -Modelica.Fluid.Utilities.regSquare2.regSquare2_utility(-tank2.ports[$i1].m_flow, tank2.m_flow_turbulent[$i1], ((1.0 + tank2.portsData_zeta_out[$i1]) - tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0) / (tank2.ports_penetration[$i1] * 995.586), (tank2.ports_penetration[$i1] * ((-1.0) + tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0 + tank2.portsData_zeta_in[$i1])) / tank2.portInDensities[$i1], false, 1.0)) ($RES_SIM_102) (276) [----] [----] elseif tank2.inFlow[$i1] then (276) [----] [----] [SCAL] (1) tank2.ports[$i1].p = tank2.vessel_ps_static[$i1] ($RES_SIM_103) (276) [----] [----] else (276) [----] [----] [SCAL] (1) tank2.ports[$i1].m_flow = 0.0 ($RES_SIM_104) (276) [----] [----] end if; (276) [----] end for; (277) [FOR-] (2) ($RES_SIM_105) (277) [----] for $i1 in 1:2 loop (277) [----] [-IF-] (1)if tank2.regularFlow[$i1] then (277) [----] [----] [SCAL] (1) tank2.s[$i1] = tank2.fluidLevel - tank2.portsData_height[$i1] ($RES_SIM_107) (277) [----] [----] elseif tank2.inFlow[$i1] then (277) [----] [----] [SCAL] (1) tank2.s[$i1] = tank2.ports[$i1].m_flow ($RES_SIM_108) (277) [----] [----] else (277) [----] [----] [SCAL] (1) tank2.s[$i1] = ((tank2.ports[$i1].p - tank2.vessel_ps_static[$i1]) / 101325.0) * (tank2.portsData_height[$i1] - tank2.fluidLevel) ($RES_SIM_109) (277) [----] [----] end if; (277) [----] end for; (278) [FOR-] (2) ($RES_SIM_110) (278) [----] for $i1 in 1:2 loop (278) [----] [SCAL] (1) tank2.ports[$i1].h_outflow = 4184.0 * ((-273.15) - ((-273.15) - tank2.medium.T_degC)) ($RES_SIM_111) (278) [----] end for; (279) [FOR-] (2) ($RES_SIM_112) (279) [----] for $i1 in 1:2 loop (279) [----] [SCAL] (1) tank2.ports_E_flow[$i1] = tank2.ports[$i1].m_flow * (tank2.portVelocities[$i1] * 0.5 * tank2.portVelocities[$i1] + system.g * tank2.portsData_height[$i1]) ($RES_SIM_113) (279) [----] end for; (280) [SCAL] (1) tank2.ports_H_flow[2] = smooth(0, tank2.ports[2].m_flow * (if $SEV_17 then valve3.port_a.h_outflow else tank2.ports[2].h_outflow)) ($RES_SIM_114) (281) [SCAL] (1) tank2.m_flow_turbulent[2] = tank2.m_flow_small ($RES_SIM_115) (282) [SCAL] (1) tank2.portVelocities[2] = smooth(0, 0.0010044335697769957 * (tank2.ports[2].m_flow / tank2.portAreas[2])) ($RES_SIM_116) (283) [SCAL] (1) tank2.portInDensities[2] = 995.586 ($RES_SIM_117) (284) [SCAL] (1) tank2.ports_H_flow[1] = smooth(0, tank2.ports[1].m_flow * (if $SEV_18 then valve2.port_b.h_outflow else tank2.ports[1].h_outflow)) ($RES_SIM_118) (285) [SCAL] (1) tank2.m_flow_turbulent[1] = tank2.m_flow_small ($RES_SIM_119) (286) [SCAL] (1) ambient1.ports[1].p = ambient1.p ($RES_SIM_70) (287) [SCAL] (1) ambient1.ports[1].h_outflow = 4184.0 * ((-273.15) + ambient1.T) ($RES_SIM_71) (288) [SCAL] (1) tank1.fluidVolume = tank1.crossArea * tank1.fluidLevel ($RES_SIM_203) (289) [ARRY] (1) tank1.heatTransfer.Q_flows = tank1.heatTransfer.heatPorts.Q_flow ($RES_SIM_204) (290) [ARRY] (1) tank1.heatTransfer.Ts = tank1.heatTransfer.heatPorts.T ($RES_SIM_205) (291) [SCAL] (1) tank2.portVelocities[1] = smooth(0, 0.0010044335697769957 * (tank2.ports[1].m_flow / tank2.portAreas[1])) ($RES_SIM_120) (292) [SCAL] (1) tank2.portInDensities[1] = 995.586 ($RES_SIM_121) (293) [SCAL] (1) tank2.Qb_flow = tank2.heatTransfer.Q_flows[1] ($RES_SIM_124) (294) [SCAL] (1) tank2.Hb_flow = $FUN_23 + $FUN_24 ($RES_SIM_125) (295) [FOR-] (2) ($RES_SIM_127) (295) [----] for $i1 in 1:2 loop (295) [----] [SCAL] (1) tank2.vessel_ps_static[$i1] = system.g * max(0.0, tank2.fluidLevel - tank2.portsData_height[$i1]) * 995.586 + tank2.p_ambient ($RES_SIM_128) (295) [----] end for; (296) [SCAL] (1) tank1.medium.state.p = tank1.p_ambient ($RES_SIM_210) (297) [SCAL] (1) tank1.medium.state.T = -((-273.15) - tank1.medium.T_degC) ($RES_SIM_211) (298) [SCAL] (1) tankController.normal.stateGraphRoot.suspend = $FUN_13 ($RES_BND_519) (299) [SCAL] (1) tankController.T1.inPort.reset = $SEV_60 ($RES_SIM_305) (300) [SCAL] (1) tank2.fluidVolume = tank2.crossArea * tank2.fluidLevel ($RES_SIM_131) (301) [ARRY] (1) tank2.heatTransfer.Q_flows = tank2.heatTransfer.heatPorts.Q_flow ($RES_SIM_132) (302) [ARRY] (1) tank2.heatTransfer.Ts = tank2.heatTransfer.heatPorts.T ($RES_SIM_133) (303) [SCAL] (1) tank2.medium.state.p = tank2.p_ambient ($RES_SIM_138) (304) [SCAL] (1) tank2.medium.state.T = -((-273.15) - tank2.medium.T_degC) ($RES_SIM_139) (305) [SCAL] (1) $DER.tank2.m = tank2.mb_flow ($RES_SIM_90) (306) [SCAL] (1) $DER.tank2.U = tank2.Qb_flow + tank2.Hb_flow ($RES_SIM_91) (307) [SCAL] (1) valve1.dp = valve1.port_a.p - valve1.port_b.p ($RES_SIM_220) (308) [SCAL] (1) tank2.U = tank2.m * (4184.0 * ((-273.15) - ((-273.15) - tank2.medium.T_degC))) ($RES_SIM_92) (309) [SCAL] (1) tankController.normal.stateGraphRoot.resume = $FUN_14 ($RES_BND_520) (310) [SCAL] (1) tank2.m = 995.586 * tank2.fluidVolume ($RES_SIM_93) (311) [FOR-] (2) ($RES_SIM_94) (311) [----] for $i1 in 1:2 loop (311) [----] [SCAL] (1) tank2.ports_penetration[$i1] = smooth(1, if $SEV_6[$i1] then 1.0 else if $SEV_7[$i1] then 0.001 else if $SEV_8[$i1] then 0.5005 - 0.24975 * ((-3.0) + ((tank2.fluidLevel - (0.1 * tank2.portsData_diameter[$i1] + tank2.portsData_height[$i1])) / (0.1 * tank2.portsData_diameter[$i1])) ^ 2.0) * ((10.0 * (tank2.fluidLevel - (tank2.portsData_height[$i1] + 0.1 * tank2.portsData_diameter[$i1]))) / tank2.portsData_diameter[$i1]) else 0.5005) ($RES_SIM_95) (311) [----] end for; (312) [SCAL] (1) valve1.port_b.h_outflow = source.ports[1].h_outflow ($RES_SIM_223) (313) [SCAL] (1) tankController.normal.T1.localCondition = $SEV_95 ($RES_BND_523) (314) [SCAL] (1) valve1.port_a.h_outflow = tank1.ports[1].h_outflow ($RES_SIM_224) (315) [FOR-] (2) ($RES_SIM_96) (315) [----] for $i1 in 1:2 loop (315) [----] [SCAL] (1) tank2.regularFlow[$i1] = $SEV_9[$i1] ($RES_SIM_97) (315) [----] end for; (316) [SCAL] (1) 995.586 * valve1.V_flow = if tankController.normal.fillTank1.outerStatePort.localActive then valve1.k * valve1.dp else valve1.k * valve1.opening_min * valve1.dp ($RES_SIM_225) (317) [FOR-] (2) ($RES_SIM_98) (317) [----] for $i1 in 1:2 loop (317) [----] [SCAL] (1) tank2.inFlow[$i1] = $SEV_13[$i1] ($RES_SIM_99) (317) [----] end for; (318) [SCAL] (1) tankController.normal.T3.localCondition = $SEV_94 ($RES_BND_526) (319) [SCAL] (1) shut.table.y = $SEV_43 ($RES_SIM_227) (320) [SCAL] (1) shut.table.combiTimeTable.y[1] = shut.table.combiTimeTable.p_offset[1] + Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(shut.table.combiTimeTable.tableID, 1, time, shut.table.combiTimeTable.nextTimeEventScaled, $TEV_38) ($RES_SIM_228) (321) [WHEN] (1)when {$SEV_44, initial()} then (321) [----] shut.table.combiTimeTable.nextTimeEventScaled := Modelica.Blocks.Tables.Internal.getNextTimeEvent(shut.table.combiTimeTable.tableID, time) (321) [----] end when; (322) [SCAL] (1) tankController.normal.resume[1].set = false ($RES_SIM_310) (323) [SCAL] (1) tankController.normal.suspend[1].reset = false ($RES_SIM_311) (324) [SCAL] (1) tankController.normal.suspend[1].available = tankController.normal.outerState.active ($RES_SIM_312) (325) [SCAL] (1) tankController.normal.resume[1].occupied = tankController.normal.outerState.active ($RES_SIM_313) (326) [SCAL] (1) tankController.normal.newActive = $SEV_61 ($RES_SIM_314) (327) [SCAL] (1) tankController.normal.outerState.active = $TEV_15 ($RES_SIM_315) (328) [SCAL] (1) tankController.normal.activeSteps = -integer(tankController.normal.stateGraphRoot.subgraphStatePort.activeSteps) ($RES_SIM_316) (329) [SCAL] (1) tankController.normal.T4.enableFire = $SEV_62 ($RES_SIM_319) (330) [SCAL] (1) valve3.dp = valve3.port_a.p - valve3.port_b.p ($RES_SIM_148) (331) [WHEN] (1)when false then (331) [----] tankController.s1.oldActive := tankController.s1.outerStatePort.localActive (331) [----] end when; (332) [SCAL] (1) tankController.s1.newActive = $SEV_74 ($RES_SIM_401) (333) [SCAL] (1) tankController.s1.outerStatePort.localActive = $TEV_37 ($RES_SIM_402) (334) [SCAL] (1) tankController.s1.outerStatePort.subgraphStatePort.activeSteps = if tankController.s1.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_404) (335) [FOR-] (2) ($RES_EVT_700) (335) [----] for $i1 in 1:2 loop (335) [----] [SCAL] (1) $SEV_6[$i1] = tank2.fluidLevel - (tank2.portsData_height[$i1] + 0.1 * tank2.portsData_diameter[$i1]) > 0.1 * tank2.portsData_diameter[$i1] ($RES_EVT_701) (335) [----] end for; (336) [SCAL] (1) tank2.heatTransfer.heatPorts[1].Q_flow = 0.0 ($RES_SIM_405) (337) [WHEN] (1)when {$SEV_44, initial()} then (337) [----] shut.table.combiTimeTable.nextTimeEvent := if shut.table.combiTimeTable.nextTimeEventScaled < 1e60 then shut.table.combiTimeTable.nextTimeEventScaled else 1e60 (337) [----] end when; (338) [SCAL] (1) tank2.ports[2].m_flow + 995.586 * valve3.V_flow = 0.0 ($RES_SIM_406) (339) [FOR-] (2) ($RES_EVT_702) (339) [----] for $i1 in 1:2 loop (339) [----] [SCAL] (1) $SEV_7[$i1] = tank2.fluidLevel - (tank2.portsData_height[$i1] + 0.1 * tank2.portsData_diameter[$i1]) < (-0.1 * tank2.portsData_diameter[$i1]) ($RES_EVT_703) (339) [----] end for; (340) [SCAL] (1) ambient1.ports[1].m_flow - 995.586 * valve3.V_flow = 0.0 ($RES_SIM_407) (341) [SCAL] (1) tank2.ports[1].m_flow - 995.586 * valve2.V_flow = 0.0 ($RES_SIM_408) (342) [SCAL] (1) stop.table.y = $SEV_46 ($RES_SIM_233) (343) [FOR-] (2) ($RES_EVT_704) (343) [----] for $i1 in 1:2 loop (343) [----] [SCAL] (1) $SEV_8[$i1] = 0.1 * tank2.portsData_diameter[$i1] > 0.0 ($RES_EVT_705) (343) [----] end for; (344) [SCAL] (1) tank1.heatTransfer.heatPorts[1].Q_flow = 0.0 ($RES_SIM_409) (345) [SCAL] (1) stop.table.combiTimeTable.y[1] = stop.table.combiTimeTable.p_offset[1] + Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(stop.table.combiTimeTable.tableID, 1, time, stop.table.combiTimeTable.nextTimeEventScaled, $TEV_39) ($RES_SIM_234) (346) [WHEN] (1)when {$SEV_47, initial()} then (346) [----] stop.table.combiTimeTable.nextTimeEvent := if stop.table.combiTimeTable.nextTimeEventScaled < 1e60 then stop.table.combiTimeTable.nextTimeEventScaled else 1e60 (346) [----] end when; (347) [FOR-] (2) ($RES_EVT_706) (347) [----] for $i1 in 1:2 loop (347) [----] [SCAL] (1) $SEV_9[$i1] = tank2.fluidLevel >= tank2.portsData_height[$i1] ($RES_EVT_707) (347) [----] end for; (348) [WHEN] (1)when {$SEV_47, initial()} then (348) [----] stop.table.combiTimeTable.nextTimeEventScaled := Modelica.Blocks.Tables.Internal.getNextTimeEvent(stop.table.combiTimeTable.tableID, time) (348) [----] end when; (349) [SCAL] (1) tankController.T2.localCondition = $SEV_93 ($RES_BND_537) (350) [SCAL] (1) $FUN_1 = Modelica.StateGraph.Temporary.anyTrue(tankController.s1.inPort.set) ($RES_$AUX_623) (351) [FOR-] (2) ($RES_EVT_708) (351) [----] for $i1 in 1:2 loop (351) [----] [SCAL] (1) $SEV_10[$i1] = tank2.s[$i1] > 0.0 ($RES_EVT_709) (351) [----] end for; (352) [SCAL] (1) $FUN_2 = Modelica.StateGraph.Temporary.anyTrue(tankController.s1.outPort.reset) ($RES_$AUX_622) (353) [SCAL] (1) start.table.y = $SEV_49 ($RES_SIM_239) (354) [SCAL] (1) $FUN_3 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.fillTank1.inPort.set) ($RES_$AUX_621) (355) [SCAL] (1) $FUN_4 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.fillTank1.outPort.reset) ($RES_$AUX_620) (356) [SCAL] (1) tankController.normal.T4.outPort.set = $SEV_63 ($RES_SIM_320) (357) [SCAL] (1) tankController.normal.T4.t = if tankController.normal.T4.enableFire then tankController.normal.T4.t_dummy else 0.0 ($RES_SIM_321) (358) [WHEN] (1)when tankController.normal.T4.enableFire then (358) [----] time - tankController.normal.T4.t_dummy := time (358) [----] end when; (359) [SCAL] (1) tankController.normal.wait2.outPort[1].reset = false ($RES_SIM_324) (360) [SCAL] (1) tankController.normal.wait2.inPort[1].set = false ($RES_SIM_325) (361) [SCAL] (1) tankController.normal.wait2.outPort[1].available = tankController.normal.wait2.outerStatePort.localActive ($RES_SIM_326) (362) [SCAL] (1) valve3.port_b.h_outflow = tank2.ports[2].h_outflow ($RES_SIM_151) (363) [SCAL] (1) tankController.normal.wait2.inPort[1].occupied = tankController.normal.wait2.outerStatePort.localActive ($RES_SIM_327) (364) [SCAL] (1) valve3.port_a.h_outflow = ambient1.ports[1].h_outflow ($RES_SIM_152) (365) [WHEN] (1)when tankController.normal.stateGraphRoot.suspend then (365) [----] tankController.normal.wait2.oldActive := tankController.normal.wait2.outerStatePort.localActive (365) [----] end when; (366) [SCAL] (1) 995.586 * valve3.V_flow = if valve3.open then valve3.k * valve3.dp else valve3.k * valve3.opening_min * valve3.dp ($RES_SIM_153) (367) [SCAL] (1) tankController.normal.wait2.newActive = if tankController.normal.stateGraphRoot.resume then tankController.normal.wait2.oldActive else $SEV_64 ($RES_SIM_329) (368) [SCAL] (1) valve2.dp = valve2.port_a.p - valve2.port_b.p ($RES_SIM_156) (369) [SCAL] (1) 995.586 * valve2.V_flow + tank1.ports[2].m_flow = 0.0 ($RES_SIM_410) (370) [SCAL] (1) valve2.port_b.h_outflow = tank1.ports[2].h_outflow ($RES_SIM_159) (371) [SCAL] (1) tank1.ports[1].m_flow - 995.586 * valve1.V_flow = 0.0 ($RES_SIM_411) (372) [SCAL] (1) tankController.normal.fillTank1.outerStatePort.subgraphStatePort.activeSteps + tankController.normal.fillTank2.outerStatePort.subgraphStatePort.activeSteps + tankController.normal.emptyTank2.outerStatePort.subgraphStatePort.activeSteps + tankController.normal.wait1.outerStatePort.subgraphStatePort.activeSteps + tankController.normal.wait2.outerStatePort.subgraphStatePort.activeSteps + tankController.normal.stateGraphRoot.subgraphStatePort.activeSteps = 0.0 ($RES_SIM_412) (373) [SCAL] (1) tankController.normal.outerState.subgraphStatePort.activeSteps + tankController.s2.outerStatePort.subgraphStatePort.activeSteps + tankController.emptyTanks.outerStatePort.subgraphStatePort.activeSteps + tankController.stateGraphRoot.subgraphStatePort.activeSteps + tankController.s1.outerStatePort.subgraphStatePort.activeSteps = 0.0 ($RES_SIM_413) (374) [SCAL] (1) tank1.ports[2].p = valve2.port_a.p ($RES_SIM_414) (375) [FOR-] (2) ($RES_EVT_710) (375) [----] for $i1 in 1:2 loop (375) [----] [SCAL] (1) $SEV_11[$i1] = tank2.portsData_height[$i1] >= tank2.fluidLevel_max ($RES_EVT_711) (375) [----] end for; (376) [SCAL] (1) valve1.port_b.p = tank1.ports[1].p ($RES_SIM_415) (377) [SCAL] (1) start.table.combiTimeTable.y[1] = start.table.combiTimeTable.p_offset[1] + Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(start.table.combiTimeTable.tableID, 1, time, start.table.combiTimeTable.nextTimeEventScaled, $TEV_40) ($RES_SIM_240) (378) [SCAL] (1) valve2.port_b.p = tank2.ports[1].p ($RES_SIM_416) (379) [WHEN] (1)when {$SEV_50, initial()} then (379) [----] start.table.combiTimeTable.nextTimeEventScaled := Modelica.Blocks.Tables.Internal.getNextTimeEvent(start.table.combiTimeTable.tableID, time) (379) [----] end when; (380) [SCAL] (1) $FUN_5 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.fillTank2.inPort.set) ($RES_$AUX_619) (381) [FOR-] (2) ($RES_EVT_712) (381) [----] for $i1 in 1:2 loop (381) [----] [SCAL] (1) $SEV_12[$i1] = $SEV_10[$i1] or $SEV_11[$i1] ($RES_EVT_713) (381) [----] end for; (382) [SCAL] (1) tank2.ports[2].p = valve3.port_a.p ($RES_SIM_417) (383) [WHEN] (1)when {$SEV_50, initial()} then (383) [----] start.table.combiTimeTable.nextTimeEvent := if start.table.combiTimeTable.nextTimeEventScaled < 1e60 then start.table.combiTimeTable.nextTimeEventScaled else 1e60 (383) [----] end when; (384) [SCAL] (1) $FUN_6 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.fillTank2.outPort.reset) ($RES_$AUX_618) (385) [SCAL] (1) valve3.port_b.p = ambient1.ports[1].p ($RES_SIM_418) (386) [SCAL] (1) $FUN_7 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.emptyTank2.inPort.set) ($RES_$AUX_617) (387) [FOR-] (2) ($RES_EVT_714) (387) [----] for $i1 in 1:2 loop (387) [----] [SCAL] (1) $SEV_13[$i1] = not tank2.regularFlow[$i1] and $SEV_12[$i1] ($RES_EVT_715) (387) [----] end for; (388) [SCAL] (1) 995.586 * valve1.V_flow + source.ports[1].m_flow = 0.0 ($RES_SIM_419) (389) [SCAL] (1) $FUN_8 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.emptyTank2.outPort.reset) ($RES_$AUX_616) (390) [SCAL] (1) $FUN_9 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.wait1.inPort.set) ($RES_$AUX_615) (391) [FOR-] (2) ($RES_EVT_716) (391) [----] for $i1 in 1:2 loop (391) [----] [SCAL] (1) $SEV_14[$i1] = tank2.ports[$i1].m_flow >= tank2.m_flow_turbulent[$i1] ($RES_EVT_717) (391) [----] end for; (392) [SCAL] (1) $FUN_10 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.wait1.outPort.reset) ($RES_$AUX_614) (393) [SCAL] (1) tankController.stateGraphRoot.activeSteps = -integer(tankController.stateGraphRoot.subgraphStatePort.activeSteps) ($RES_SIM_247) (394) [SCAL] (1) tankController.T6.localCondition = $SEV_92 ($RES_BND_547) (395) [SCAL] (1) $FUN_11 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.wait2.inPort.set) ($RES_$AUX_613) (396) [FOR-] (2) ($RES_EVT_718) (396) [----] for $i1 in 1:2 loop (396) [----] [SCAL] (1) $SEV_15[$i1] = tank2.ports[$i1].m_flow <= (-tank2.m_flow_turbulent[$i1]) ($RES_EVT_719) (396) [----] end for; (397) [SCAL] (1) $FUN_12 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.wait2.outPort.reset) ($RES_$AUX_612) (398) [SCAL] (1) $FUN_13 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.suspend.reset) ($RES_$AUX_611) (399) [SCAL] (1) $FUN_14 = Modelica.StateGraph.Temporary.anyTrue(tankController.normal.resume.set) ($RES_$AUX_610) (400) [SCAL] (1) $SEV_81 = (-995.586 * valve2.V_flow) < (-valve2.m_flow_small) ($RES_EVT_800) (401) [SCAL] (1) tankController.normal.wait2.outerStatePort.localActive = $TEV_19 ($RES_SIM_330) (402) [SCAL] (1) $SEV_82 = valve2.m_flow_small > 0.0 ($RES_EVT_801) (403) [SCAL] (1) $SEV_83 = 995.586 * valve2.V_flow > valve2.m_flow_small ($RES_EVT_802) (404) [SCAL] (1) tankController.normal.wait2.outerStatePort.subgraphStatePort.activeSteps = if tankController.normal.wait2.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_332) (405) [SCAL] (1) $SEV_84 = 995.586 * valve2.V_flow < (-valve2.m_flow_small) ($RES_EVT_803) (406) [SCAL] (1) $SEV_85 = (-995.586 * valve1.V_flow) > valve1.m_flow_small ($RES_EVT_804) (407) [SCAL] (1) $SEV_86 = (-995.586 * valve1.V_flow) < (-valve1.m_flow_small) ($RES_EVT_805) (408) [SCAL] (1) tankController.normal.T2.enableFire = $SEV_65 ($RES_SIM_335) (409) [SCAL] (1) valve2.port_a.h_outflow = tank2.ports[1].h_outflow ($RES_SIM_160) (410) [SCAL] (1) $SEV_87 = valve1.m_flow_small > 0.0 ($RES_EVT_806) (411) [SCAL] (1) tankController.normal.T2.outPort.set = $SEV_66 ($RES_SIM_336) (412) [SCAL] (1) 995.586 * valve2.V_flow = if valve2.open then valve2.k * valve2.dp else valve2.k * valve2.opening_min * valve2.dp ($RES_SIM_161) (413) [SCAL] (1) $SEV_88 = 995.586 * valve1.V_flow > valve1.m_flow_small ($RES_EVT_807) (414) [SCAL] (1) tankController.normal.T2.t = if tankController.normal.T2.enableFire then tankController.normal.T2.t_dummy else 0.0 ($RES_SIM_337) (415) [SCAL] (1) $DER.tank1.m = tank1.mb_flow ($RES_SIM_162) (416) [SCAL] (1) $SEV_89 = 995.586 * valve1.V_flow < (-valve1.m_flow_small) ($RES_EVT_808) (417) [SCAL] (1) $DER.tank1.U = tank1.Qb_flow + tank1.Hb_flow ($RES_SIM_163) (418) [SCAL] (1) $SEV_90 = tankController.normal.emptyTank2.outerStatePort.localActive or tankController.emptyTanks.outerStatePort.localActive and tank2.fluidLevel > tankController.minLevel ($RES_EVT_809) (419) [WHEN] (1)when tankController.normal.T2.enableFire then (419) [----] time - tankController.normal.T2.t_dummy := time (419) [----] end when; (420) [SCAL] (1) tank1.U = tank1.m * (4184.0 * ((-273.15) - ((-273.15) - tank1.medium.T_degC))) ($RES_SIM_164) (421) [SCAL] (1) tank1.m = 995.586 * tank1.fluidVolume ($RES_SIM_165) (422) [FOR-] (2) ($RES_SIM_166) (422) [----] for $i1 in 1:2 loop (422) [----] [SCAL] (1) tank1.ports_penetration[$i1] = smooth(1, if $SEV_24[$i1] then 1.0 else if $SEV_25[$i1] then 0.001 else if $SEV_26[$i1] then 0.5005 - 0.24975 * ((-3.0) + ((tank1.fluidLevel - (0.1 * tank1.portsData_diameter[$i1] + tank1.portsData_height[$i1])) / (0.1 * tank1.portsData_diameter[$i1])) ^ 2.0) * ((10.0 * (tank1.fluidLevel - (tank1.portsData_height[$i1] + 0.1 * tank1.portsData_diameter[$i1]))) / tank1.portsData_diameter[$i1]) else 0.5005) ($RES_SIM_167) (422) [----] end for; (423) [FOR-] (2) ($RES_SIM_168) (423) [----] for $i1 in 1:2 loop (423) [----] [SCAL] (1) tank1.regularFlow[$i1] = $SEV_27[$i1] ($RES_SIM_169) (423) [----] end for; (424) [SCAL] (1) source.ports[1].p = valve1.port_a.p ($RES_SIM_420) (425) [FOR-] (2) ($RES_EVT_720) (425) [----] for $i1 in 1:2 loop (425) [----] [SCAL] (1) $SEV_16[$i1] = (tank2.ports_penetration[$i1] * ((-1.0) + tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0 + tank2.portsData_zeta_in[$i1])) / tank2.portInDensities[$i1] >= ((1.0 + tank2.portsData_zeta_out[$i1]) - tank2.portAreas[$i1] ^ 2.0 / tank2.vesselArea ^ 2.0) / (tank2.ports_penetration[$i1] * 995.586) ($RES_EVT_721) (425) [----] end for; (426) [SCAL] (1) tankController.T6.outPort.set = $SEV_51 ($RES_SIM_250) (427) [SCAL] (1) valve2.open = $SEV_91 ($RES_BND_550) (428) [SCAL] (1) valve3.open = $SEV_90 ($RES_BND_551) (429) [SCAL] (1) $FUN_15 = Modelica.StateGraph.Temporary.anyTrue(tankController.s2.inPort.set) ($RES_$AUX_609) (430) [SCAL] (1) $SEV_17 = tank2.ports[2].m_flow > 0.0 ($RES_EVT_722) (431) [SCAL] (1) $FUN_16 = Modelica.StateGraph.Temporary.anyTrue(tankController.s2.outPort.reset) ($RES_$AUX_608) (432) [SCAL] (1) $SEV_18 = tank2.ports[1].m_flow > 0.0 ($RES_EVT_723) (433) [SCAL] (1) $FUN_17 = Modelica.StateGraph.Temporary.anyTrue(tankController.emptyTanks.inPort.set) ($RES_$AUX_607) (434) [SCAL] (1) $SEV_19 = tank2.fluidLevel > (-1e-6 * tank2.fluidLevel_max) ($RES_EVT_724)