Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ModelicaTest_3.2.1_ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest 3.2.1+maint.om/package.mo", uses=false) Using package ModelicaTest with version 3.2.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest 3.2.1+maint.om/package.mo) 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(ModelicaTest.Fluid.TestComponents.Vessels.TestVolume,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ModelicaTest_3.2.1_ModelicaTest.Fluid.TestComponents.Vessels.TestVolume") translateModel(ModelicaTest.Fluid.TestComponents.Vessels.TestVolume,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ModelicaTest_3.2.1_ModelicaTest.Fluid.TestComponents.Vessels.TestVolume") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001144/0.001144, allocations: 108.8 kB / 16.42 MB, free: 6.461 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.001133/0.001133, allocations: 189.5 kB / 17.36 MB, free: 5.73 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.206/1.206, allocations: 205.1 MB / 223.2 MB, free: 12.24 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest 3.2.1+maint.om/package.mo): time 0.1591/0.1591, allocations: 38 MB / 308.6 MB, free: 5.996 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.138e-05/2.14e-05, allocations: 2.281 kB / 433.6 MB, free: 14.5 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaTest.Fluid.TestComponents.Vessels.TestVolume): time 0.02924/0.02927, allocations: 36.32 MB / 469.9 MB, free: 10.04 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.01743/0.04675, allocations: 16.77 MB / 486.7 MB, free: 9.211 MB / 366.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000591/0.04739, allocations: 15.88 kB / 486.7 MB, free: 9.195 MB / 366.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001023/0.04842, allocations: 429.4 kB / 487.1 MB, free: 8.773 MB / 366.1 MB Notification: Performance of NFTyping.typeBindings: time 0.008963/0.05748, allocations: 4.011 MB / 491.1 MB, free: 4.762 MB / 366.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.007147/0.06464, allocations: 3.14 MB / 494.3 MB, free: 1.613 MB / 366.1 MB Notification: Performance of NFFlatten.flatten: time 0.001943/0.06659, allocations: 1.903 MB / 496.2 MB, free: 15.71 MB / 382.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0006188/0.06722, allocations: 0.5098 MB / 496.7 MB, free: 15.2 MB / 382.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.00102/0.06825, allocations: 0.8448 MB / 497.5 MB, free: 14.35 MB / 382.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0005919/0.06885, allocations: 0.5722 MB / 498.1 MB, free: 13.78 MB / 382.1 MB Notification: Performance of NFPackage.collectConstants: time 8.901e-05/0.06895, allocations: 64 kB / 498.2 MB, free: 13.71 MB / 382.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.01012/0.07908, allocations: 6.95 MB / 0.4933 GB, free: 6.758 MB / 382.1 MB Notification: Performance of combineBinaries: time 0.001057/0.08015, allocations: 1.288 MB / 0.4945 GB, free: 5.457 MB / 382.1 MB Notification: Performance of replaceArrayConstructors: time 0.0005113/0.08068, allocations: 0.818 MB / 0.4953 GB, free: 4.629 MB / 382.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001858/0.08087, allocations: 119.7 kB / 0.4955 GB, free: 4.512 MB / 382.1 MB Notification: Performance of FrontEnd: time 0.0001464/0.08102, allocations: 19.88 kB / 0.4955 GB, free: 4.492 MB / 382.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 151 (122) * Number of variables: 151 (129) Notification: Performance of Bindings: time 0.003468/0.0845, allocations: 3.893 MB / 0.4993 GB, free: 468 kB / 382.1 MB Notification: Performance of FunctionAlias: time 0.0001989/0.0847, allocations: 187.6 kB / 0.4995 GB, free: 280 kB / 382.1 MB Notification: Performance of Early Inline: time 0.002951/0.08766, allocations: 3.014 MB / 0.5024 GB, free: 13.22 MB / 398.1 MB Notification: Performance of simplify1: time 0.0001302/0.0878, allocations: 127.8 kB / 0.5025 GB, free: 13.09 MB / 398.1 MB Notification: Performance of Alias: time 0.002246/0.09006, allocations: 2.115 MB / 0.5046 GB, free: 10.78 MB / 398.1 MB Notification: Performance of simplify2: time 0.0001261/0.0902, allocations: 127.8 kB / 0.5047 GB, free: 10.65 MB / 398.1 MB Notification: Performance of Events: time 0.0008011/0.091, allocations: 0.672 MB / 0.5054 GB, free: 9.977 MB / 398.1 MB Notification: Performance of Detect States: time 0.000648/0.09166, allocations: 0.7005 MB / 0.5061 GB, free: 9.258 MB / 398.1 MB Notification: Performance of Partitioning: time 0.001039/0.09271, allocations: 1.029 MB / 0.5071 GB, free: 8.098 MB / 398.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency Volume.heatTransfer.states.T could not be divided by the body size 5 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (5) Volume.heatTransfer.states = {Volume.medium.state} ($RES_BND_150) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (118/151) **************************** (1) [ALGB] (1) final input Real[1, 1] Volume.heatTransfer.states.T = {Volume.medium.state.T} (start = {500.0 for $i1 in 1:1}, min = {273.15 for $i1 in 1:1}, max = {2273.15 for $i1 in 1:1}, nominal = {500.0 for $i1 in 1:1}) (2) [ALGB] (2) Real[2] Volume.portVelocities (3) [ALGB] (1) Real FlowSource.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (4) [ALGB] (1) Real FlowSource.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * FlowSource.medium.p_bar) (5) [DISC] (1) final input Integer[1, 1] Volume.heatTransfer.states.phase = {Volume.medium.state.phase} (min = {0 for $i1 in 1:1}, max = {2 for $i1 in 1:1}) (6) [ALGB] (1) Real Sink.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (7) [ALGB] (1) protected Real Valve.state_b.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (8) [ALGB] (1) Real FlowSource.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - FlowSource.medium.T_degC)) (9) [ALGB] (1) Real Sink.medium.state.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (10) [DISC] (2) protected Boolean[2] Volume.regularFlow (start = {true for $i1 in 1:2}) (11) [ALGB] (1) Real Valve.port_a_T = Modelica.Fluid.Utilities.regStep(-Valve.port_b.m_flow, ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.temperature(Valve.state_a), ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.temperature(ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.setState_phX(Valve.port_a.p, Valve.port_a.h_outflow, {}, 0, 0)), Valve.m_flow_small) (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (12) [ALGB] (1) Real FlowSource.medium.sat.Tsat (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (13) [DISC] (1) Integer Volume.medium.state.phase (min = 0, max = 2) (14) [ALGB] (1) protected Real Valve.state_b.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (15) [ALGB] (1) final input Real[1, 1] Volume.heatTransfer.states.d = {Volume.medium.state.d} (start = {150.0 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, nominal = {500.0 for $i1 in 1:1}) (16) [ALGB] (2) flow Real[2] Volume.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (17) [ALGB] (1) Real[1] Sink.ports.p (start = {5e6 for $i1 in 1:1}, min = {611.657 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (18) [ALGB] (1) Real FlowSource.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (19) [ALGB] (1) Real Valve.port_b.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (20) [ALGB] (1) stream Real Valve.port_b.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (21) [ALGB] (1) protected Real Valve.state_b.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (22) [ALGB] (1) final input Real[1, 1] Volume.heatTransfer.states.h = {Volume.medium.state.h} (start = {1e5 for $i1 in 1:1}, min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {5e5 for $i1 in 1:1}) (23) [ALGB] (2) Real[2] Volume.m_flow_turbulent (24) [DISC] (2) Boolean[2] $SEV_11[$i1] (25) [ALGB] (1) Real FlowSource.medium.sat.psat (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (26) [ALGB] (1) Real Volume.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - Volume.medium.T_degC)) (27) [ALGB] (1) final input Real[1, 1] Volume.heatTransfer.states.p = {Volume.medium.state.p} (start = {5e6 for $i1 in 1:1}, min = {611.657 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (28) [ALGB] (1) flow Real Valve.port_b.m_flow (min = -1e5, max = 1e60) (29) [ALGB] (2) Real[2] Volume.portAreas = {0.7853981633974483 * Volume.portsData_diameter[i] ^ 2.0 for i in 1:2} (30) [ALGB] (1) Real[1] Volume.heatTransfer.Q_flows (31) [DISC] (1) Boolean $SEV_29 (32) [ALGB] (2) Real[2] Volume.ports_E_flow (33) [ALGB] (1) Real Volume.medium.state.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (34) [ALGB] (1) Real Step1.y (35) [DISC] (1) Boolean $SEV_28 (36) [DISC] (2) Boolean[2] $SEV_14[$i1] (37) [ALGB] (1) protected Real Valve.state_b.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (38) [DISC] (1) Boolean $SEV_27 (39) [ALGB] (1) Real Volume.Qb_flow (40) [DISC] (1) Boolean $SEV_26 (41) [DISC] (1) Boolean $SEV_25 (42) [DISC] (1) Boolean $SEV_24 (43) [DISC] (1) Integer FlowSource.medium.phase (fixed = false, start = 1, min = 0, max = 2) (44) [ALGB] (1) Real Volume.medium.state.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (45) [ALGB] (2) Real[2] Volume.vessel_ps_static (start = {5e6 for $i1 in 1:2}, min = {611.657 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (46) [ALGB] (1) Real $FUN_3 (47) [ALGB] (1) Real $FUN_2 (48) [ALGB] (1) Real Volume.medium.sat.psat (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (49) [ALGB] (1) Real Volume.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (50) [ALGB] (1) stream Real[1] Sink.ports.h_outflow (start = {1e5 for $i1 in 1:1}, min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {5e5 for $i1 in 1:1}) (51) [ALGB] (2) Real[2] Volume.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}) (52) [DISC] (2) Boolean[2] $SEV_17[$i1] (53) [ALGB] (2) Real[2] Volume.ports.p (start = {5e6 for $i1 in 1:2}, min = {611.657 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (54) [ALGB] (1) Real Sink.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (55) [DISC] (2) Boolean[2] $SEV_9[$i1] (56) [ALGB] (2) protected Real[2] Volume.portsData_diameter_internal = Volume.portsData.diameter (57) [DISC] (1) Integer Sink.medium.phase (fixed = false, start = 1, min = 0, max = 2) (58) [ALGB] (1) Real Volume.Hb_flow (59) [ALGB] (2) protected Real[2] Volume.portsData_zeta_in (60) [ALGB] (2) protected Real[2] Volume.portsData_height (61) [DISC] (2) protected Boolean[2] Volume.inFlow (start = {false for $i1 in 1:2}) (62) [DISC] (2) Boolean[2] $SEV_10[$i1] (63) [ALGB] (1) Real Volume.medium.sat.Tsat (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (64) [ALGB] (1) Real Sink.medium.h (StateSelect = default) (65) [ALGB] (1) Real Volume.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (66) [ALGB] (1) Real Sink.medium.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0, StateSelect = default) (67) [ALGB] (1) stream Real Valve.port_a.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (68) [DISC] (1) Boolean $SEV_19 (69) [DISC] (1) Boolean $SEV_18 (70) [ALGB] (2) protected Real[2] Volume.portsData_zeta_out (71) [ALGB] (1) Real Volume.medium.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0, StateSelect = default) (72) [ALGB] (1) Real Sink.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - Sink.medium.T_degC)) (73) [ALGB] (1) Real FlowSource.medium.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0, StateSelect = default) (74) [ALGB] (2) protected Real[2] Volume.portsData_height_internal = Volume.portsData.height (75) [ALGB] (1) Real Valve.port_a.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (76) [DISC] (2) Boolean[2] $SEV_13[$i1] (77) [ALGB] (1) Real Volume.medium.h (start = Volume.h_start, StateSelect = default) (78) [ALGB] (2) Real[2] Volume.ports_penetration (79) [DISC] (1) Integer FlowSource.medium.state.phase (min = 0, max = 2) (80) [ALGB] (2) stream Real[2] Volume.ports.h_outflow (start = {1e5 for $i1 in 1:2}, min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {5e5 for $i1 in 1:2}) (81) [ALGB] (1) Real[1] Volume.heatTransfer.Ts = {ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Volume.heatTransfer.Medium.temperature(Volume.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}) (82) [ALGB] (1) Real Sink.medium.sat.psat (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (83) [DISC] (1) Integer Volume.medium.phase (fixed = false, start = 1, min = 0, max = 2) (84) [ALGB] (1) protected Real Valve.state_a.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (85) [ALGB] (2) protected Real[2] Volume.portsData_zeta_out_internal = Volume.portsData.zeta_out (86) [ALGB] (2) Real[2] Volume.s (start = {Volume.fluidLevel_max for $i1 in 1:2}) (87) [ALGB] (1) Real Valve.port_b_T = Modelica.Fluid.Utilities.regStep(Valve.port_b.m_flow, ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.temperature(Valve.state_b), ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.temperature(ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.setState_phX(Valve.port_b.p, Valve.port_b.h_outflow, {}, 0, 0)), Valve.m_flow_small) (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (88) [DISC] (2) Boolean[2] $SEV_16[$i1] (89) [ALGB] (1) Real Volume.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (90) [DISC] (2) Boolean[2] $SEV_8[$i1] (91) [ALGB] (1) Real Volume.m (min = 0.0) (92) [ALGB] (1) Real FlowSource.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (93) [ALGB] (1) protected Real Valve.state_a.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (94) [ALGB] (1) protected Real Valve.state_a.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (95) [DISC] (1) Boolean $SEV_6 (96) [DISC] (1) Boolean $SEV_3 (97) [ALGB] (1) stream Real[1] FlowSource.ports.h_outflow (start = {1e5 for $i1 in 1:1}, min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {5e5 for $i1 in 1:1}) (98) [DISC] (1) Boolean $SEV_2 (99) [ALGB] (2) protected Real[2] Volume.portsData_diameter (100) [ALGB] (2) Real[2] Volume.portInDensities (start = {150.0 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}, nominal = {500.0 for $i1 in 1:2}) (101) [ALGB] (1) flow Real[1] FlowSource.ports.m_flow (min = {-1e60}, max = {1e60}) (102) [DISC] (1) Integer Sink.medium.state.phase (min = 0, max = 2) (103) [ALGB] (1) Real Valve.dp (start = Valve.dp_start) (104) [DISC] (1) Boolean $TEV_0 (105) [ALGB] (1) protected Real Valve.state_a.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (106) [DISC] (2) Boolean[2] $SEV_12[$i1] (107) [ALGB] (1) Real[1] Volume.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}) (108) [ALGB] (1) Real Volume.U (109) [ALGB] (1) Real Volume.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * Volume.medium.p_bar) (110) [ALGB] (1) Real Sink.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (111) [ALGB] (1) flow Real[1] Sink.ports.m_flow (min = {-1e60}, max = {1e60}) (112) [ALGB] (1) Real FlowSource.medium.state.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (113) [ALGB] (1) Real Valve.V_flow = (-Valve.port_b.m_flow) / Modelica.Fluid.Utilities.regStep(-Valve.port_b.m_flow, ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.density(Valve.state_a), ModelicaTest.Fluid.TestComponents.Vessels.TestVolume.Valve.Medium.density(Valve.state_b), Valve.m_flow_small) (114) [ALGB] (1) Real[1] FlowSource.ports.p (start = {5e6 for $i1 in 1:1}, min = {611.657 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (115) [ALGB] (1) flow Real[1] Volume.heatTransfer.heatPorts.Q_flow (116) [ALGB] (2) protected Real[2] Volume.portsData_zeta_in_internal = Volume.portsData.zeta_in (117) [DISC] (2) Boolean[2] $SEV_15[$i1] (118) [DISC] (2) Boolean[2] $SEV_7[$i1] System Equations (119/151) **************************** (1) [SCAL] (1) 99999.99999999999 * FlowSource.medium.p_bar = FlowSource.medium.state.p ($RES_SIM_50) (2) [SCAL] (1) Valve.V_flow = -Valve.port_b.m_flow / smooth(1, if $SEV_28 then Valve.state_a.d else if $SEV_29 then Valve.state_b.d else if $SEV_27 then 0.5 * (Valve.state_a.d + Valve.state_b.d) - 0.25 * (Valve.state_b.d - Valve.state_a.d) * ((-3.0) + (Valve.port_b.m_flow / (-Valve.m_flow_small)) ^ 2.0) * (Valve.port_b.m_flow / Valve.m_flow_small) else 0.5 * (Valve.state_a.d + Valve.state_b.d)) ($RES_BND_147) (3) [SCAL] (1) FlowSource.medium.u = FlowSource.h - (99999.99999999999 * FlowSource.medium.p_bar) / FlowSource.medium.d ($RES_SIM_53) (4) [SCAL] (1) Valve.port_a_T = smooth(1, if $SEV_28 then Valve.state_a.T else if $SEV_29 then Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_a.p, Valve.port_a.h_outflow, 0, 0) else if $SEV_27 then 0.5 * (Valve.state_a.T + Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_a.p, Valve.port_a.h_outflow, 0, 0)) - 0.25 * (Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_a.p, Valve.port_a.h_outflow, 0, 0) - Valve.state_a.T) * ((-3.0) + (Valve.port_b.m_flow / (-Valve.m_flow_small)) ^ 2.0) * (Valve.port_b.m_flow / Valve.m_flow_small) else 0.5 * (Valve.state_a.T + Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_a.p, Valve.port_a.h_outflow, 0, 0))) ($RES_BND_148) (5) [SCAL] (1) FlowSource.medium.sat.psat = 99999.99999999999 * FlowSource.medium.p_bar ($RES_SIM_54) (6) [SCAL] (1) Valve.port_b_T = smooth(1, if $SEV_25 then Valve.state_b.T else if $SEV_26 then Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_b.p, Valve.port_b.h_outflow, 0, 0) else if $SEV_27 then 0.25 * (Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_b.p, Valve.port_b.h_outflow, 0, 0) - Valve.state_b.T) * ((-3.0) + (Valve.port_b.m_flow / Valve.m_flow_small) ^ 2.0) * (Valve.port_b.m_flow / Valve.m_flow_small) + 0.5 * (Valve.state_b.T + Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_b.p, Valve.port_b.h_outflow, 0, 0)) else 0.5 * (Valve.state_b.T + Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_b.p, Valve.port_b.h_outflow, 0, 0))) ($RES_BND_149) (7) [SCAL] (1) Volume.portVelocities[1] = smooth(0, (Volume.ports[1].m_flow / Volume.portAreas[1]) / Modelica.Media.Water.IF97_Utilities.rho_ph(Volume.vessel_ps_static[1], if $SEV_19 then FlowSource.ports[1].h_outflow else Volume.ports[1].h_outflow, 0, 0)) ($RES_SIM_90) (8) [SCAL] (1) FlowSource.medium.sat.Tsat = Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(99999.99999999999 * FlowSource.medium.p_bar) ($RES_SIM_55) (9) [SCAL] (1) Volume.portInDensities[1] = Modelica.Media.Water.IF97_Utilities.rho_ph(Volume.vessel_ps_static[1], FlowSource.ports[1].h_outflow, 0, 0) ($RES_SIM_91) (10) [SCAL] (1) -((-273.15) - FlowSource.medium.T_degC) = Modelica.Media.Water.IF97_Utilities.T_props_ph(99999.99999999999 * FlowSource.medium.p_bar, FlowSource.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * FlowSource.medium.p_bar, FlowSource.h, FlowSource.medium.phase, 0)) ($RES_SIM_56) (11) [SCAL] (1) FlowSource.medium.d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(99999.99999999999 * FlowSource.medium.p_bar, FlowSource.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * FlowSource.medium.p_bar, FlowSource.h, FlowSource.medium.phase, 0)) ($RES_SIM_57) (12) [SCAL] (1) FlowSource.medium.phase = if $SEV_6 then 1 else 2 ($RES_SIM_58) (13) [SCAL] (1) Volume.Qb_flow = Volume.heatTransfer.Q_flows[1] ($RES_SIM_94) (14) [SCAL] (1) Volume.Hb_flow = $FUN_2 + $FUN_3 ($RES_SIM_95) (15) [FOR-] (2) ($RES_SIM_97) (15) [----] for $i1 in 1:2 loop (15) [----] [SCAL] (1) Volume.vessel_ps_static[$i1] = 99999.99999999999 * Volume.medium.p_bar ($RES_SIM_98) (15) [----] end for; (16) [SCAL] (1) $TEV_0 = time < Step1.startTime ($RES_EVT_170) (17) [SCAL] (1) $SEV_28 = (-Valve.port_b.m_flow) > Valve.m_flow_small ($RES_EVT_210) (18) [SCAL] (1) $SEV_29 = (-Valve.port_b.m_flow) < (-Valve.m_flow_small) ($RES_EVT_211) (19) [SCAL] (1) $SEV_2 = (Sink.medium.h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(Sink.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(Sink.medium.sat.psat)) or Sink.medium.h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(Sink.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(Sink.medium.sat.psat))) or Sink.p > 2.2064e7 ($RES_EVT_173) (20) [SCAL] (1) $SEV_3 = abs(sum({abs(FlowSource.ports[1].m_flow)}) - abs(FlowSource.ports[1].m_flow)) <= 1e-60 ($RES_EVT_174) (21) [SCAL] (1) $SEV_6 = (FlowSource.h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(FlowSource.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(FlowSource.medium.sat.psat)) or FlowSource.h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(FlowSource.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(FlowSource.medium.sat.psat))) or 99999.99999999999 * FlowSource.medium.p_bar > 2.2064e7 ($RES_EVT_177) (22) [FOR-] (2) ($RES_EVT_178) (22) [----] for $i1 in 1:2 loop (22) [----] [SCAL] (1) $SEV_7[$i1] = 0.0 - (Volume.portsData_height[$i1] + 0.1 * Volume.portsData_diameter[$i1]) > 0.1 * Volume.portsData_diameter[$i1] ($RES_EVT_179) (22) [----] end for; (23) [ARRY] (1) Volume.heatTransfer.Q_flows = Volume.heatTransfer.heatPorts.Q_flow ($RES_SIM_100) (24) [ARRY] (1) Volume.heatTransfer.Ts = Volume.heatTransfer.heatPorts.T ($RES_SIM_101) (25) [ARRY] (5) Volume.heatTransfer.states = {Volume.medium.state} ($RES_BND_150) (26) [SCAL] (1) Sink.medium.phase = Sink.medium.state.phase ($RES_SIM_21) (27) [SCAL] (1) Sink.medium.d = Sink.medium.state.d ($RES_SIM_22) (28) [SCAL] (1) -((-273.15) - Sink.medium.T_degC) = Sink.medium.state.T ($RES_SIM_23) (29) [SCAL] (1) Volume.medium.phase = Volume.medium.state.phase ($RES_SIM_106) (30) [SCAL] (1) Volume.medium.d = Volume.medium.state.d ($RES_SIM_107) (31) [SCAL] (1) Sink.medium.h = Sink.medium.state.h ($RES_SIM_25) (32) [SCAL] (1) 0.0 = Volume.Qb_flow + Volume.Hb_flow ($RES_SIM_61) (33) [SCAL] (1) -((-273.15) - Volume.medium.T_degC) = Volume.medium.state.T ($RES_SIM_108) (34) [SCAL] (1) Volume.U = Volume.m * Volume.medium.u ($RES_SIM_62) (35) [SCAL] (1) Sink.medium.u = Sink.medium.h - Sink.p / Sink.medium.d ($RES_SIM_27) (36) [SCAL] (1) 99999.99999999999 * Volume.medium.p_bar = Volume.medium.state.p ($RES_SIM_109) (37) [SCAL] (1) Volume.m = Volume.V * Volume.medium.d ($RES_SIM_63) (38) [SCAL] (1) Sink.medium.sat.psat = Sink.p ($RES_SIM_28) (39) [FOR-] (2) ($RES_SIM_64) (39) [----] for $i1 in 1:2 loop (39) [----] [SCAL] (1) Volume.ports_penetration[$i1] = smooth(1, if $SEV_7[$i1] then 1.0 else if $SEV_8[$i1] then 0.001 else if $SEV_9[$i1] then 0.5005 - 0.24975 * ((-3.0) + ((0.0 - (0.1 * Volume.portsData_diameter[$i1] + Volume.portsData_height[$i1])) / (0.1 * Volume.portsData_diameter[$i1])) ^ 2.0) * ((10.0 * (0.0 - (Volume.portsData_height[$i1] + 0.1 * Volume.portsData_diameter[$i1]))) / Volume.portsData_diameter[$i1]) else 0.5005) ($RES_SIM_65) (39) [----] end for; (40) [FOR-] (2) ($RES_SIM_66) (40) [----] for $i1 in 1:2 loop (40) [----] [SCAL] (1) Volume.regularFlow[$i1] = $SEV_10[$i1] ($RES_SIM_67) (40) [----] end for; (41) [FOR-] (2) ($RES_SIM_68) (41) [----] for $i1 in 1:2 loop (41) [----] [SCAL] (1) Volume.inFlow[$i1] = $SEV_14[$i1] ($RES_SIM_69) (41) [----] end for; (42) [FOR-] (2) ($RES_EVT_180) (42) [----] for $i1 in 1:2 loop (42) [----] [SCAL] (1) $SEV_8[$i1] = 0.0 - (Volume.portsData_height[$i1] + 0.1 * Volume.portsData_diameter[$i1]) < (-0.1 * Volume.portsData_diameter[$i1]) ($RES_EVT_181) (42) [----] end for; (43) [FOR-] (2) ($RES_EVT_182) (43) [----] for $i1 in 1:2 loop (43) [----] [SCAL] (1) $SEV_9[$i1] = 0.1 * Volume.portsData_diameter[$i1] > 0.0 ($RES_EVT_183) (43) [----] end for; (44) [FOR-] (2) ($RES_EVT_184) (44) [----] for $i1 in 1:2 loop (44) [----] [SCAL] (1) $SEV_10[$i1] = 0.0 >= Volume.portsData_height[$i1] ($RES_EVT_185) (44) [----] end for; (45) [FOR-] (2) ($RES_EVT_186) (45) [----] for $i1 in 1:2 loop (45) [----] [SCAL] (1) $SEV_11[$i1] = Volume.s[$i1] > 0.0 ($RES_EVT_187) (45) [----] end for; (46) [FOR-] (2) ($RES_EVT_188) (46) [----] for $i1 in 1:2 loop (46) [----] [SCAL] (1) $SEV_12[$i1] = Volume.portsData_height[$i1] >= Volume.fluidLevel_max ($RES_EVT_189) (46) [----] end for; (47) [SCAL] (1) Volume.medium.h = Volume.medium.state.h ($RES_SIM_110) (48) [SCAL] (1) Volume.medium.u = Volume.medium.h - (99999.99999999999 * Volume.medium.p_bar) / Volume.medium.d ($RES_SIM_112) (49) [SCAL] (1) -((-273.15) - Sink.medium.T_degC) = Modelica.Media.Water.IF97_Utilities.T_props_ph(Sink.p, Sink.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(Sink.p, Sink.medium.h, Sink.medium.phase, 0)) ($RES_SIM_30) (50) [SCAL] (1) Volume.medium.sat.psat = 99999.99999999999 * Volume.medium.p_bar ($RES_SIM_113) (51) [SCAL] (1) Sink.medium.d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(Sink.p, Sink.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(Sink.p, Sink.medium.h, Sink.medium.phase, 0)) ($RES_SIM_31) (52) [SCAL] (1) Volume.medium.sat.Tsat = Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(99999.99999999999 * Volume.medium.p_bar) ($RES_SIM_114) (53) [SCAL] (1) Sink.medium.phase = if $SEV_2 then 1 else 2 ($RES_SIM_32) (54) [SCAL] (1) -((-273.15) - Volume.medium.T_degC) = Modelica.Media.Water.IF97_Utilities.T_props_ph(99999.99999999999 * Volume.medium.p_bar, Volume.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * Volume.medium.p_bar, Volume.medium.h, Volume.medium.phase, 0)) ($RES_SIM_115) (55) [SCAL] (1) Volume.medium.d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(99999.99999999999 * Volume.medium.p_bar, Volume.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * Volume.medium.p_bar, Volume.medium.h, Volume.medium.phase, 0)) ($RES_SIM_116) (56) [SCAL] (1) FlowSource.ports[1].p = 99999.99999999999 * FlowSource.medium.p_bar ($RES_SIM_34) (57) [SCAL] (1) Volume.medium.phase = if $SEV_24 then 1 else 2 ($RES_SIM_117) (58) [FOR-] (2) ($RES_SIM_70) (58) [----] for $i1 in 1:2 loop (58) [----] [-IF-] (1)if Volume.regularFlow[$i1] then (58) [----] [----] [SCAL] (1) Volume.ports[$i1].p = Volume.vessel_ps_static[$i1] + (0.5 / Volume.portAreas[$i1] ^ 2.0) * smooth(2, if $SEV_15[$i1] then (Volume.ports_penetration[$i1] * ((-1.0) + Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0 + Volume.portsData_zeta_in[$i1]) * Volume.ports[$i1].m_flow ^ 2.0) / Volume.portInDensities[$i1] else if $SEV_16[$i1] then -(((1.0 + Volume.portsData_zeta_out[$i1]) - Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0) * Volume.ports[$i1].m_flow ^ 2.0) / (Volume.ports_penetration[$i1] * Volume.medium.d) else if $SEV_17[$i1] then Modelica.Fluid.Utilities.regSquare2.regSquare2_utility(Volume.ports[$i1].m_flow, Volume.m_flow_turbulent[$i1], (Volume.ports_penetration[$i1] * ((-1.0) + Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0 + Volume.portsData_zeta_in[$i1])) / Volume.portInDensities[$i1], ((1.0 + Volume.portsData_zeta_out[$i1]) - Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0) / (Volume.ports_penetration[$i1] * Volume.medium.d), false, 1.0) else -Modelica.Fluid.Utilities.regSquare2.regSquare2_utility(-Volume.ports[$i1].m_flow, Volume.m_flow_turbulent[$i1], ((1.0 + Volume.portsData_zeta_out[$i1]) - Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0) / (Volume.ports_penetration[$i1] * Volume.medium.d), (Volume.ports_penetration[$i1] * ((-1.0) + Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0 + Volume.portsData_zeta_in[$i1])) / Volume.portInDensities[$i1], false, 1.0)) ($RES_SIM_72) (58) [----] [----] elseif Volume.inFlow[$i1] then (58) [----] [----] [SCAL] (1) Volume.ports[$i1].p = Volume.vessel_ps_static[$i1] ($RES_SIM_73) (58) [----] [----] else (58) [----] [----] [SCAL] (1) Volume.ports[$i1].m_flow = 0.0 ($RES_SIM_74) (58) [----] [----] end if; (58) [----] end for; (59) [SCAL] (1) FlowSource.ports[1].h_outflow = FlowSource.h ($RES_SIM_35) (60) [SCAL] (1) Valve.port_b.m_flow + Sink.ports[1].m_flow = 0.0 ($RES_SIM_119) (61) [SCAL] (1) Valve.state_a.h = Volume.ports[2].h_outflow ($RES_SIM_156) (62) [FOR-] (2) ($RES_SIM_75) (62) [----] for $i1 in 1:2 loop (62) [----] [-IF-] (1)if Volume.regularFlow[$i1] then (62) [----] [----] [SCAL] (1) Volume.s[$i1] = 0.0 - Volume.portsData_height[$i1] ($RES_SIM_77) (62) [----] [----] elseif Volume.inFlow[$i1] then (62) [----] [----] [SCAL] (1) Volume.s[$i1] = Volume.ports[$i1].m_flow ($RES_SIM_78) (62) [----] [----] else (62) [----] [----] [SCAL] (1) Volume.s[$i1] = ((Volume.ports[$i1].p - Volume.vessel_ps_static[$i1]) / 101325.0) * (Volume.portsData_height[$i1] - 0.0) ($RES_SIM_79) (62) [----] [----] end if; (62) [----] end for; (63) [SCAL] (1) Valve.state_a.d = Modelica.Media.Water.IF97_Utilities.rho_ph(Valve.port_a.p, Volume.ports[2].h_outflow, 0, 0) ($RES_SIM_157) (64) [SCAL] (1) Valve.state_a.T = Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_a.p, Volume.ports[2].h_outflow, 0, 0) ($RES_SIM_158) (65) [SCAL] (1) Valve.state_a.p = Valve.port_a.p ($RES_SIM_159) (66) [FOR-] (2) ($RES_EVT_190) (66) [----] for $i1 in 1:2 loop (66) [----] [SCAL] (1) $SEV_13[$i1] = $SEV_11[$i1] or $SEV_12[$i1] ($RES_EVT_191) (66) [----] end for; (67) [FOR-] (2) ($RES_EVT_192) (67) [----] for $i1 in 1:2 loop (67) [----] [SCAL] (1) $SEV_14[$i1] = not Volume.regularFlow[$i1] and $SEV_13[$i1] ($RES_EVT_193) (67) [----] end for; (68) [FOR-] (2) ($RES_EVT_194) (68) [----] for $i1 in 1:2 loop (68) [----] [SCAL] (1) $SEV_15[$i1] = Volume.ports[$i1].m_flow >= Volume.m_flow_turbulent[$i1] ($RES_EVT_195) (68) [----] end for; (69) [FOR-] (2) ($RES_EVT_196) (69) [----] for $i1 in 1:2 loop (69) [----] [SCAL] (1) $SEV_16[$i1] = Volume.ports[$i1].m_flow <= (-Volume.m_flow_turbulent[$i1]) ($RES_EVT_197) (69) [----] end for; (70) [FOR-] (2) ($RES_EVT_198) (70) [----] for $i1 in 1:2 loop (70) [----] [SCAL] (1) $SEV_17[$i1] = (Volume.ports_penetration[$i1] * ((-1.0) + Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0 + Volume.portsData_zeta_in[$i1])) / Volume.portInDensities[$i1] >= ((1.0 + Volume.portsData_zeta_out[$i1]) - Volume.portAreas[$i1] ^ 2.0 / Volume.vesselArea ^ 2.0) / (Volume.ports_penetration[$i1] * Volume.medium.d) ($RES_EVT_199) (70) [----] end for; (71) [SCAL] (1) Volume.heatTransfer.heatPorts[1].Q_flow = 0.0 ($RES_SIM_120) (72) [SCAL] (1) Volume.ports[2].m_flow - Valve.port_b.m_flow = 0.0 ($RES_SIM_121) (73) [SCAL] (1) Volume.ports[2].p = Valve.port_a.p ($RES_SIM_122) (74) [ARRY] (1) Volume.heatTransfer.Ts = {Volume.heatTransfer.states.h} ($RES_BND_135) (75) [SCAL] (1) 0.0 = sum(Volume.ports.m_flow) ($RES_$AUX_154) (76) [SCAL] (1) Volume.ports[1].m_flow + FlowSource.ports[1].m_flow = 0.0 ($RES_SIM_123) (77) [FOR-] (2) ($RES_BND_136) (77) [----] for $i1 in 1:2 loop (77) [----] [SCAL] (1) Volume.portAreas[$i1] = 0.7853981633974483 * Volume.portsData_diameter[$i1] ^ 2.0 ($RES_BND_137) (77) [----] end for; (78) [SCAL] (1) $FUN_2 = sum(Volume.ports_H_flow) ($RES_$AUX_153) (79) [SCAL] (1) FlowSource.ports[1].p = Volume.ports[1].p ($RES_SIM_124) (80) [SCAL] (1) $FUN_3 = sum(Volume.ports_E_flow) ($RES_$AUX_152) (81) [SCAL] (1) -FlowSource.m_flow = sum(FlowSource.ports.m_flow) ($RES_$AUX_151) (82) [SCAL] (1) Valve.port_b.p = Sink.ports[1].p ($RES_SIM_126) (83) [ARRY] (2) Volume.portsData_diameter_internal = Volume.portsData.diameter ($RES_BND_139) (84) [SCAL] (1) Valve.state_b.h = Sink.ports[1].h_outflow ($RES_SIM_161) (85) [FOR-] (2) ($RES_SIM_80) (85) [----] for $i1 in 1:2 loop (85) [----] [SCAL] (1) Volume.ports[$i1].h_outflow = Volume.medium.h ($RES_SIM_81) (85) [----] end for; (86) [ARRY] (2) Volume.portsData_zeta_out = Volume.portsData_zeta_out_internal ($RES_SIM_127) (87) [SCAL] (1) Valve.state_b.d = Modelica.Media.Water.IF97_Utilities.rho_ph(Valve.port_b.p, Sink.ports[1].h_outflow, 0, 0) ($RES_SIM_162) (88) [ARRY] (2) Volume.portsData_zeta_in = Volume.portsData_zeta_in_internal ($RES_SIM_128) (89) [SCAL] (1) Valve.state_b.T = Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_b.p, Sink.ports[1].h_outflow, 0, 0) ($RES_SIM_163) (90) [FOR-] (2) ($RES_SIM_82) (90) [----] for $i1 in 1:2 loop (90) [----] [SCAL] (1) Volume.ports_E_flow[$i1] = Volume.ports[$i1].m_flow * (Volume.portVelocities[$i1] * 0.5 * Volume.portVelocities[$i1] + system.g * Volume.portsData_height[$i1]) ($RES_SIM_83) (90) [----] end for; (91) [SCAL] (1) FlowSource.medium.phase = FlowSource.medium.state.phase ($RES_SIM_47) (92) [ARRY] (2) Volume.portsData_height = Volume.portsData_height_internal ($RES_SIM_129) (93) [SCAL] (1) Valve.state_b.p = Valve.port_b.p ($RES_SIM_164) (94) [SCAL] (1) FlowSource.medium.d = FlowSource.medium.state.d ($RES_SIM_48) (95) [SCAL] (1) Volume.ports_H_flow[2] = smooth(0, Volume.ports[2].m_flow * (if $SEV_18 then Valve.port_a.h_outflow else Volume.ports[2].h_outflow)) ($RES_SIM_84) (96) [SCAL] (1) -((-273.15) - FlowSource.medium.T_degC) = FlowSource.medium.state.T ($RES_SIM_49) (97) [SCAL] (1) Volume.m_flow_turbulent[2] = Volume.m_flow_small ($RES_SIM_85) (98) [SCAL] (1) Volume.portVelocities[2] = smooth(0, (Volume.ports[2].m_flow / Volume.portAreas[2]) / Modelica.Media.Water.IF97_Utilities.rho_ph(Volume.vessel_ps_static[2], if $SEV_18 then Valve.port_a.h_outflow else Volume.ports[2].h_outflow, 0, 0)) ($RES_SIM_86) (99) [SCAL] (1) Volume.portInDensities[2] = Modelica.Media.Water.IF97_Utilities.rho_ph(Volume.vessel_ps_static[2], Valve.port_a.h_outflow, 0, 0) ($RES_SIM_87) (100) [SCAL] (1) Volume.ports_H_flow[1] = smooth(0, Volume.ports[1].m_flow * (if $SEV_19 then FlowSource.ports[1].h_outflow else Volume.ports[1].h_outflow)) ($RES_SIM_88) (101) [SCAL] (1) Volume.m_flow_turbulent[1] = Volume.m_flow_small ($RES_SIM_89) (102) [SCAL] (1) $SEV_18 = Volume.ports[2].m_flow > 0.0 ($RES_EVT_200) (103) [SCAL] (1) $SEV_19 = Volume.ports[1].m_flow > 0.0 ($RES_EVT_201) (104) [SCAL] (1) Sink.ports[1].p = Sink.p ($RES_SIM_9) (105) [SCAL] (1) -Valve.port_b.m_flow = Valve.k * Step1.y * Valve.dp ($RES_SIM_8) (106) [SCAL] (1) Valve.port_a.h_outflow = Sink.ports[1].h_outflow ($RES_SIM_7) (107) [SCAL] (1) $SEV_24 = (Volume.medium.h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(Volume.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(Volume.medium.sat.psat)) or Volume.medium.h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(Volume.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(Volume.medium.sat.psat))) or 99999.99999999999 * Volume.medium.p_bar > 2.2064e7 ($RES_EVT_206) (108) [SCAL] (1) Valve.port_b.h_outflow = Volume.ports[2].h_outflow ($RES_SIM_6) (109) [SCAL] (1) $SEV_25 = Valve.port_b.m_flow > Valve.m_flow_small ($RES_EVT_207) (110) [SCAL] (1) $SEV_26 = Valve.port_b.m_flow < (-Valve.m_flow_small) ($RES_EVT_208) (111) [SCAL] (1) $SEV_27 = Valve.m_flow_small > 0.0 ($RES_EVT_209) (112) [SCAL] (1) Valve.dp = Valve.port_a.p - Valve.port_b.p ($RES_SIM_3) (113) [SCAL] (1) Step1.y = Step1.offset + (if $TEV_0 then 0.0 else Step1.height) ($RES_SIM_0) (114) [SCAL] (1) Sink.ports[1].h_outflow = Sink.medium.h ($RES_SIM_10) (115) [ARRY] (2) Volume.portsData_height_internal = Volume.portsData.height ($RES_BND_140) (116) [SCAL] (1) Sink.medium.h = Modelica.Media.Water.IF97_Utilities.h_pT(Sink.p, Sink.T, 0) ($RES_SIM_11) (117) [ARRY] (2) Volume.portsData_zeta_in_internal = Volume.portsData.zeta_in ($RES_BND_141) (118) [ARRY] (2) Volume.portsData_zeta_out_internal = Volume.portsData.zeta_out ($RES_BND_142) (119) [ARRY] (2) Volume.portsData_diameter = Volume.portsData_diameter_internal ($RES_SIM_130)