Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ModelicaTest_3.2.1_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.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.Machines.TestWaterPumpDefaultCV,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ModelicaTest_3.2.1_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV") translateModel(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ModelicaTest_3.2.1_ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001216/0.001216, allocations: 107.3 kB / 16.42 MB, free: 6.477 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.001196/0.001196, 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.243/1.243, allocations: 205.1 MB / 223.2 MB, free: 12.23 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.1587/0.1587, allocations: 38.01 MB / 308.6 MB, free: 5.984 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 1.616e-05/1.617e-05, allocations: 2.281 kB / 433.6 MB, free: 14.48 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV): time 0.03386/0.03389, allocations: 41.74 MB / 475.4 MB, free: 4.59 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.02343/0.05736, allocations: 19.91 MB / 495.3 MB, free: 0.6211 MB / 366.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0009219/0.05833, allocations: 23.81 kB / 495.3 MB, free: 0.5977 MB / 366.1 MB Notification: Performance of NFTyping.typeComponents: time 0.00117/0.05951, allocations: 441.1 kB / 495.7 MB, free: 168 kB / 366.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Math/package.mo:1125:3-1182:12:writable] Warning: Pure function 'Modelica.Math.Matrices.solve' contains a call to impure function 'Modelica.Math.Matrices.LAPACK.dgesv_vec'. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest 3.2.1+maint.om/Fluid/TestComponents/Machines/TestWaterPumpDefaultCV.mo:19:15-21:68:writable] Warning: Pure function 'ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.pump.flowCharacteristic' contains a call to impure function 'Modelica.Math.Matrices.solve'. Notification: Performance of NFTyping.typeBindings: time 0.01302/0.07259, allocations: 5.17 MB / 0.4891 GB, free: 10.99 MB / 382.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Fluid/Machines.mo:335:17-340:42:writable] Warning: Pure function 'ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.pump.powerCharacteristic' contains a call to impure function 'Modelica.Math.Matrices.solve'. Notification: Performance of NFTyping.typeClassSections: time 0.005622/0.07823, allocations: 2.424 MB / 0.4915 GB, free: 8.555 MB / 382.1 MB Notification: Performance of NFFlatten.flatten: time 0.002056/0.08029, allocations: 1.906 MB / 0.4934 GB, free: 6.645 MB / 382.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0005739/0.08088, allocations: 481.4 kB / 0.4938 GB, free: 6.168 MB / 382.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001115/0.082, allocations: 0.8212 MB / 0.4946 GB, free: 5.344 MB / 382.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.007149/0.08916, allocations: 3.705 MB / 0.4983 GB, free: 1.586 MB / 382.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001653/0.08934, allocations: 68 kB / 0.4983 GB, free: 1.52 MB / 382.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.01181/0.1012, allocations: 7.32 MB / 0.5055 GB, free: 10.19 MB / 398.1 MB Notification: Performance of combineBinaries: time 0.001267/0.1025, allocations: 1.434 MB / 0.5069 GB, free: 8.742 MB / 398.1 MB Notification: Performance of replaceArrayConstructors: time 0.0005809/0.1031, allocations: 0.9253 MB / 0.5078 GB, free: 7.805 MB / 398.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002183/0.1033, allocations: 139.6 kB / 0.5079 GB, free: 7.668 MB / 398.1 MB Notification: Performance of FrontEnd: time 0.0001779/0.1035, allocations: 27.86 kB / 0.5079 GB, free: 7.641 MB / 398.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 146 (126) * Number of variables: 146 (146) Notification: Performance of Bindings: time 0.003548/0.107, allocations: 4.109 MB / 0.5119 GB, free: 3.375 MB / 398.1 MB Notification: Performance of FunctionAlias: time 0.000303/0.1073, allocations: 296.3 kB / 0.5122 GB, free: 3.078 MB / 398.1 MB Notification: Performance of Early Inline: time 0.002594/0.1099, allocations: 2.609 MB / 0.5148 GB, free: 432 kB / 398.1 MB Notification: Performance of simplify1: time 0.000175/0.1101, allocations: 175.8 kB / 0.5149 GB, free: 256 kB / 398.1 MB Notification: Performance of Alias: time 0.002539/0.1127, allocations: 2.353 MB / 0.5172 GB, free: 13.66 MB / 414.1 MB Notification: Performance of simplify2: time 0.0002032/0.1129, allocations: 175.8 kB / 0.5174 GB, free: 13.48 MB / 414.1 MB Notification: Performance of Events: time 0.0006374/0.1135, allocations: 0.5279 MB / 0.5179 GB, free: 12.93 MB / 414.1 MB Notification: Performance of Detect States: time 0.0005813/0.1141, allocations: 0.6108 MB / 0.5185 GB, free: 12.3 MB / 414.1 MB Notification: Performance of Partitioning: time 0.000881/0.115, allocations: 0.9196 MB / 0.5194 GB, free: 11.25 MB / 414.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency pump.heatTransfer.states.T could not be divided by the body size 5 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (5) pump.heatTransfer.states = {pump.medium.state} ($RES_BND_139) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (114/114) **************************** (1) [ALGB] (1) Real pump.head = pump.dp_pump / (pump.g * pump.rho) (2) [ALGB] (1) Real Sink.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (3) [DISC] (1) final input Integer pump.monitoring.state.phase = pump.medium.state.phase (min = 0, max = 2) (4) [ALGB] (1) Real Valve.Y (5) [ALGB] (1) Real Source.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - Source.medium.T_degC)) (6) [ALGB] (1) Real Source.medium.sat.psat (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (7) [ALGB] (1) protected Real Valve.state_b.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (8) [ALGB] (1) Real Sink.medium.state.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (9) [ALGB] (1) Real pump.Wb_flow (10) [ALGB] (1) Real Valve.port_a_T = Modelica.Fluid.Utilities.regStep(-Valve.port_b.m_flow, ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.temperature(Valve.state_a), ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.temperature(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.setState_phX(99999.99999999999 * pump.medium.p_bar, Valve.port_a.h_outflow, {}, 0, 0)), Valve.m_flow_small) (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (11) [ALGB] (1) protected Real Valve.state_b.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (12) [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}) (13) [ALGB] (1) Real Sink.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * Sink.medium.p_bar) (14) [ALGB] (1) Real Sink.medium.state.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (15) [ALGB] (1) Real Valve.port_b.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (16) [ALGB] (1) stream Real Valve.port_b.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (17) [ALGB] (1) protected Real Valve.state_b.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (18) [ALGB] (1) Real pump.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * pump.medium.p_bar) (19) [ALGB] (1) Real pump.medium.state.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (20) [ALGB] (1) Real pump.Hb_flow (21) [DISC] (1) Integer pump.medium.state.phase (min = 0, max = 2) (22) [DISC] (1) Integer Source.medium.phase (fixed = false, start = 1, min = 0, max = 2) (23) [ALGB] (1) flow Real Valve.port_b.m_flow (min = -1e5, max = 1e60) (24) [ALGB] (1) Real pump.medium.state.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (25) [ALGB] (1) Real pump.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (26) [ALGB] (1) Real pump.medium.sat.Tsat (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (27) [ALGB] (1) protected Real Valve.state_b.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (28) [ALGB] (1) Real pump.V_flow (29) [ALGB] (1) Real Source.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (30) [DISC] (1) Boolean $SEV_23 (31) [ALGB] (1) Real pump.Qb_flow (32) [DISC] (1) Boolean $SEV_22 (33) [DISC] (1) Boolean $SEV_21 (34) [DISC] (1) Boolean $SEV_20 (35) [ALGB] (1) Real $FUN_2 (36) [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}) (37) [ALGB] (1) Real $FUN_1 (38) [ALGB] (1) Real Sink.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (39) [ALGB] (1) Real[1] pump.heatTransfer.Ts = {ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.pump.heatTransfer.Medium.temperature(pump.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}) (40) [ALGB] (1) Real pump.medium.sat.psat (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (41) [ALGB] (1) Real pump.rho = pump.rho (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (42) [ALGB] (1) Real Source.medium.h (StateSelect = default) (43) [ALGB] (1) Real pump.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (44) [ALGB] (1) Real pump.m_flow = pump.m_flow (45) [DISC] (1) Integer Sink.medium.phase (fixed = false, start = 1, min = 0, max = 2) (46) [ALGB] (1) Real pump.m (min = 0.0) (47) [ALGB] (1) Real pump.V_flow_single (start = pump.m_flow_start / (pump.nParallel * pump.rho_nominal)) (48) [ALGB] (1) Real Source.medium.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0, StateSelect = default) (49) [ALGB] (1) flow Real[1] pump.heatTransfer.heatPorts.Q_flow (50) [DISC] (1) Integer pump.medium.phase (fixed = false, start = 1, min = 0, max = 2) (51) [ALGB] (1) Real Source.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (52) [ALGB] (1) Real Sink.medium.h (StateSelect = default) (53) [ALGB] (1) Real Sink.medium.sat.Tsat (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (54) [ALGB] (1) Real pump.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - pump.medium.T_degC)) (55) [ALGB] (1) Real Sink.medium.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0, StateSelect = default) (56) [ALGB] (1) stream Real Valve.port_a.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (57) [DISC] (1) Boolean $SEV_19 (58) [DISC] (1) Boolean $SEV_18 (59) [ALGB] (1) Real pump.port_a.p (start = pump.p_a_start, min = 611.657, max = 1e8, nominal = 1e6) (60) [ALGB] (1) final input Real[1, 1] pump.heatTransfer.states.T = {pump.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}) (61) [ALGB] (1) Real Sink.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - Sink.medium.T_degC)) (62) [DISC] (1) Boolean $SEV_15 (63) [DISC] (1) Boolean $SEV_12 (64) [ALGB] (1) Real Source.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (65) [ALGB] (1) Real Valve.xs (66) [ALGB] (1) Real Sink.medium.sat.psat (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (67) [ALGB] (1) Real Source.medium.state.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (68) [ALGB] (1) Real pump.U (69) [ALGB] (1) protected Real Valve.state_a.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (70) [DISC] (1) final input Integer[1, 1] pump.heatTransfer.states.phase = {pump.medium.state.phase} (min = {0 for $i1 in 1:1}, max = {2 for $i1 in 1:1}) (71) [ALGB] (1) Real Valve.port_b_T = Modelica.Fluid.Utilities.regStep(Valve.port_b.m_flow, ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.temperature(Valve.state_b), ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.temperature(ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.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) (72) [ALGB] (1) Real pump.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (73) [ALGB] (1) final input Real[1, 1] pump.heatTransfer.states.d = {pump.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}) (74) [ALGB] (1) Real pump.N (start = pump.N_nominal) (75) [ALGB] (1) protected Real Valve.state_a.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (76) [ALGB] (1) final input Real[1, 1] pump.heatTransfer.states.h = {pump.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}) (77) [ALGB] (1) flow Real[1] Source.ports.m_flow (min = {-1e60}, max = {1e60}) (78) [DISC] (1) Boolean $SEV_9 (79) [ALGB] (1) Real pump.W_single (80) [ALGB] (1) final input Real pump.monitoring.state.T = pump.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (81) [DISC] (1) Boolean $SEV_8 (82) [ALGB] (1) protected Real Valve.state_a.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (83) [DISC] (1) Boolean $SEV_7 (84) [DISC] (1) Boolean $SEV_5 (85) [ALGB] (1) final input Real pump.monitoring.state_in.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (86) [DISC] (1) Boolean $SEV_4 (87) [ALGB] (1) Real pump.m_flow_single = pump.m_flow / pump.nParallel (88) [DISC] (1) Boolean $SEV_3 (89) [ALGB] (1) final input Real[1, 1] pump.heatTransfer.states.p = {pump.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}) (90) [DISC] (1) Boolean $SEV_2 (91) [DISC] (1) Boolean $SEV_1 (92) [ALGB] (1) Real Valve.x (93) [ALGB] (1) Real pump.dp_pump = 99999.99999999999 * pump.medium.p_bar - pump.port_a.p (94) [DISC] (1) Integer Sink.medium.state.phase (min = 0, max = 2) (95) [ALGB] (1) Real Valve.dp (start = Valve.dp_start) (96) [DISC] (1) Boolean $TEV_1 (97) [ALGB] (1) Real[1] pump.heatTransfer.Q_flows (98) [DISC] (1) Boolean $TEV_0 (99) [ALGB] (1) final input Real pump.monitoring.state.d = pump.medium.state.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (100) [ALGB] (1) protected Real Valve.state_a.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (101) [ALGB] (1) Real Valve.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (102) [ALGB] (1) Real pump.eta (103) [ALGB] (1) final input Real pump.monitoring.state_in.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (104) [ALGB] (1) final input Real pump.monitoring.state.h = pump.medium.state.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (105) [DISC] (1) Integer Source.medium.state.phase (min = 0, max = 2) (106) [ALGB] (1) Real Sink.medium.state.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (107) [ALGB] (1) flow Real[1] Sink.ports.m_flow (min = {-1e60}, max = {1e60}) (108) [ALGB] (1) final input Real pump.monitoring.state_in.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (109) [ALGB] (1) stream Real[1] Source.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}) (110) [ALGB] (1) Real Valve.V_flow = (-Valve.port_b.m_flow) / Modelica.Fluid.Utilities.regStep(-Valve.port_b.m_flow, ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.density(Valve.state_a), ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.Valve.Medium.density(Valve.state_b), Valve.m_flow_small) (111) [ALGB] (1) Real[1] pump.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}) (112) [ALGB] (1) final input Real pump.monitoring.state.p = pump.medium.state.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (113) [ALGB] (1) Real[1] Source.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}) (114) [ALGB] (1) final input Real pump.monitoring.state_in.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) System Equations (106/114) **************************** (1) [SCAL] (1) Valve.port_b.h_outflow = pump.medium.state.h ($RES_SIM_50) (2) [SCAL] (1) Valve.xs = max(-Valve.Fxt_full, min(Valve.x, Valve.Fxt_full)) ($RES_SIM_15) (3) [SCAL] (1) Valve.x = Valve.dp / Valve.p ($RES_SIM_16) (4) [SCAL] (1) $FUN_1 = abs(pump.V_flow_single_init) ($RES_$AUX_143) (5) [SCAL] (1) pump.medium.u = Valve.port_b.h_outflow - (99999.99999999999 * pump.medium.p_bar) / pump.rho ($RES_SIM_52) (6) [SCAL] (1) $FUN_2 = abs(Valve.xs) ($RES_$AUX_142) (7) [SCAL] (1) pump.medium.sat.psat = 99999.99999999999 * pump.medium.p_bar ($RES_SIM_53) (8) [SCAL] (1) Valve.p = max(99999.99999999999 * pump.medium.p_bar, Valve.port_b.p) ($RES_SIM_18) (9) [SCAL] (1) pump.medium.sat.Tsat = Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(99999.99999999999 * pump.medium.p_bar) ($RES_SIM_54) (10) [SCAL] (1) -((-273.15) - pump.medium.T_degC) = Modelica.Media.Water.IF97_Utilities.T_props_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_b.h_outflow, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_b.h_outflow, pump.medium.phase, 0)) ($RES_SIM_55) (11) [SCAL] (1) pump.rho = Modelica.Media.Water.IF97_Utilities.rho_props_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_b.h_outflow, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_b.h_outflow, pump.medium.phase, 0)) ($RES_SIM_56) (12) [SCAL] (1) pump.medium.phase = if $SEV_12 then 1 else 2 ($RES_SIM_57) (13) [SCAL] (1) Sink.ports[1].p = 99999.99999999999 * Sink.medium.p_bar ($RES_SIM_59) (14) [SCAL] (1) Source.medium.phase = Source.medium.state.phase ($RES_SIM_95) (15) [SCAL] (1) Source.medium.d = Source.medium.state.d ($RES_SIM_96) (16) [SCAL] (1) -((-273.15) - Source.medium.T_degC) = Source.medium.state.T ($RES_SIM_97) (17) [SCAL] (1) $TEV_0 = time < downstreamPressure.startTime ($RES_EVT_171) (18) [SCAL] (1) Source.medium.h = Source.medium.state.h ($RES_SIM_99) (19) [SCAL] (1) $TEV_1 = time < (downstreamPressure.startTime + downstreamPressure.duration) ($RES_EVT_172) (20) [SCAL] (1) $SEV_1 = Valve.xs * Valve.p >= Valve.dp_small ($RES_EVT_174) (21) [SCAL] (1) $SEV_2 = Valve.state_a.d > 0.0 ($RES_EVT_175) (22) [SCAL] (1) $SEV_3 = Valve.xs * Valve.p <= (-Valve.dp_small) ($RES_EVT_176) (23) [SCAL] (1) $SEV_4 = Valve.state_b.d > 0.0 ($RES_EVT_177) (24) [SCAL] (1) $SEV_5 = Valve.state_a.d >= Valve.state_b.d ($RES_EVT_178) (25) [SCAL] (1) Source.medium.u = Source.medium.h - Source.p / Source.medium.d ($RES_SIM_101) (26) [SCAL] (1) Source.medium.sat.psat = Source.p ($RES_SIM_102) (27) [SCAL] (1) 0.0 = pump.Qb_flow + pump.Hb_flow + pump.Wb_flow ($RES_SIM_22) (28) [SCAL] (1) -((-273.15) - Source.medium.T_degC) = Modelica.Media.Water.IF97_Utilities.T_props_ph(Source.p, Source.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(Source.p, Source.medium.h, Source.medium.phase, 0)) ($RES_SIM_104) (29) [SCAL] (1) pump.U = pump.m * pump.medium.u ($RES_SIM_23) (30) [SCAL] (1) Source.medium.d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(Source.p, Source.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(Source.p, Source.medium.h, Source.medium.phase, 0)) ($RES_SIM_105) (31) [SCAL] (1) pump.m = 0.0 ($RES_SIM_24) (32) [SCAL] (1) Source.medium.phase = if $SEV_18 then 1 else 2 ($RES_SIM_106) (33) [SCAL] (1) Sink.ports[1].h_outflow = Sink.medium.h ($RES_SIM_60) (34) [SCAL] (1) 0.0 = pump.m_flow + Valve.port_b.m_flow ($RES_SIM_25) (35) [SCAL] (1) Sink.medium.h = Modelica.Media.Water.IF97_Utilities.h_pT(99999.99999999999 * Sink.medium.p_bar, Sink.T, 0) ($RES_SIM_61) (36) [SCAL] (1) Valve.port_b.m_flow + Sink.ports[1].m_flow = 0.0 ($RES_SIM_108) (37) [SCAL] (1) pump.Hb_flow = smooth(0, pump.m_flow * (if $SEV_7 then Source.ports[1].h_outflow else Valve.port_b.h_outflow)) + smooth(0, Valve.port_b.m_flow * (if $SEV_8 then Valve.port_a.h_outflow else Valve.port_b.h_outflow)) ($RES_SIM_29) (38) [SCAL] (1) Valve.state_a.h = Valve.port_b.h_outflow ($RES_SIM_147) (39) [SCAL] (1) Valve.state_a.d = Modelica.Media.Water.IF97_Utilities.rho_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_b.h_outflow, 0, 0) ($RES_SIM_148) (40) [SCAL] (1) Valve.state_a.T = Modelica.Media.Water.IF97_Utilities.T_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_b.h_outflow, 0, 0) ($RES_SIM_149) (41) [SCAL] (1) $SEV_7 = pump.m_flow > 0.0 ($RES_EVT_180) (42) [SCAL] (1) $SEV_8 = Valve.port_b.m_flow > 0.0 ($RES_EVT_181) (43) [SCAL] (1) $SEV_9 = $FUN_1 > 0.0 ($RES_EVT_182) (44) [SCAL] (1) $SEV_12 = (Valve.port_b.h_outflow < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(pump.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(pump.medium.sat.psat)) or Valve.port_b.h_outflow > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(pump.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(pump.medium.sat.psat))) or 99999.99999999999 * pump.medium.p_bar > 2.2064e7 ($RES_EVT_185) (45) [SCAL] (1) $SEV_15 = (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 99999.99999999999 * Sink.medium.p_bar > 2.2064e7 ($RES_EVT_188) (46) [SCAL] (1) pump.heatTransfer.heatPorts[1].Q_flow = 0.0 ($RES_SIM_110) (47) [SCAL] (1) pump.m_flow + Source.ports[1].m_flow = 0.0 ($RES_SIM_111) (48) [SCAL] (1) pump.Qb_flow = pump.heatTransfer.Q_flows[1] ($RES_SIM_30) (49) [SCAL] (1) pump.port_a.p = Source.ports[1].p ($RES_SIM_114) (50) [SCAL] (1) pump.W_single = homotopy((pump.V_flow_single * pump.dp_pump) / pump.eta, (pump.V_flow_single_init * pump.dp_pump) / pump.eta) ($RES_SIM_32) (51) [SCAL] (1) pump.eta = homotopy(0.8, 0.8) ($RES_SIM_33) (52) [ARRY] (1) pump.heatTransfer.Ts = {pump.heatTransfer.states.h} ($RES_BND_128) (53) [SCAL] (1) Valve.state_a.p = 99999.99999999999 * pump.medium.p_bar ($RES_SIM_150) (54) [SCAL] (1) Valve.port_b.p = Sink.ports[1].p ($RES_SIM_116) (55) [SCAL] (1) Sink.medium.phase = Sink.medium.state.phase ($RES_SIM_70) (56) [SCAL] (1) pump.head = homotopy((pump.N / pump.N_nominal) ^ 2.0 * ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.pump.flowCharacteristic((pump.N_nominal * pump.V_flow_single) / pump.N, {0.0, 0.001, 0.0015}, {100.0, 50.0, 0.0}), (pump.N / pump.N_nominal) * (ModelicaTest.Fluid.TestComponents.Machines.TestWaterPumpDefaultCV.pump.flowCharacteristic(pump.V_flow_single_init, {0.0, 0.001, 0.0015}, {100.0, 50.0, 0.0}) + (pump.V_flow_single - pump.V_flow_single_init) * noEvent(if $SEV_9 then (10.0 * pump.delta_head_init) / pump.V_flow_single_init else 0.0))) ($RES_SIM_35) (57) [SCAL] (1) Valve.state_b.h = Sink.ports[1].h_outflow ($RES_SIM_152) (58) [SCAL] (1) Sink.medium.d = Sink.medium.state.d ($RES_SIM_71) (59) [SCAL] (1) pump.V_flow_single = pump.V_flow / pump.nParallel ($RES_SIM_36) (60) [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_153) (61) [SCAL] (1) -((-273.15) - Sink.medium.T_degC) = Sink.medium.state.T ($RES_SIM_72) (62) [SCAL] (1) pump.V_flow = homotopy(pump.m_flow / pump.rho, pump.m_flow / pump.rho_nominal) ($RES_SIM_37) (63) [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_154) (64) [SCAL] (1) 99999.99999999999 * Sink.medium.p_bar = Sink.medium.state.p ($RES_SIM_73) (65) [SCAL] (1) pump.N = max(pump.N_const, 0.001) ($RES_SIM_38) (66) [SCAL] (1) Valve.state_b.p = Valve.port_b.p ($RES_SIM_155) (67) [SCAL] (1) Sink.medium.h = Sink.medium.state.h ($RES_SIM_74) (68) [SCAL] (1) pump.monitoring.state_in.h = Source.ports[1].h_outflow ($RES_SIM_157) (69) [SCAL] (1) Sink.medium.u = Sink.medium.h - (99999.99999999999 * Sink.medium.p_bar) / Sink.medium.d ($RES_SIM_76) (70) [SCAL] (1) pump.monitoring.state_in.d = Modelica.Media.Water.IF97_Utilities.rho_ph(pump.port_a.p, Source.ports[1].h_outflow, 0, 0) ($RES_SIM_158) (71) [SCAL] (1) Sink.medium.sat.psat = 99999.99999999999 * Sink.medium.p_bar ($RES_SIM_77) (72) [SCAL] (1) pump.monitoring.state_in.T = Modelica.Media.Water.IF97_Utilities.T_ph(pump.port_a.p, Source.ports[1].h_outflow, 0, 0) ($RES_SIM_159) (73) [SCAL] (1) Sink.medium.sat.Tsat = Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(99999.99999999999 * Sink.medium.p_bar) ($RES_SIM_78) (74) [SCAL] (1) -((-273.15) - Sink.medium.T_degC) = Modelica.Media.Water.IF97_Utilities.T_props_ph(99999.99999999999 * Sink.medium.p_bar, Sink.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * Sink.medium.p_bar, Sink.medium.h, Sink.medium.phase, 0)) ($RES_SIM_79) (75) [SCAL] (1) $SEV_18 = (Source.medium.h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(Source.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(Source.medium.sat.psat)) or Source.medium.h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(Source.medium.sat.psat, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(Source.medium.sat.psat))) or Source.p > 2.2064e7 ($RES_EVT_191) (76) [SCAL] (1) $SEV_19 = Valve.port_b.m_flow > Valve.m_flow_small ($RES_EVT_192) (77) [SCAL] (1) $SEV_20 = Valve.port_b.m_flow < (-Valve.m_flow_small) ($RES_EVT_193) (78) [SCAL] (1) $SEV_21 = Valve.m_flow_small > 0.0 ($RES_EVT_194) (79) [SCAL] (1) $SEV_22 = (-Valve.port_b.m_flow) > Valve.m_flow_small ($RES_EVT_195) (80) [SCAL] (1) $SEV_23 = (-Valve.port_b.m_flow) < (-Valve.m_flow_small) ($RES_EVT_196) (81) [SCAL] (1) pump.dp_pump = 99999.99999999999 * pump.medium.p_bar - pump.port_a.p ($RES_BND_130) (82) [SCAL] (1) pump.head = pump.dp_pump / (pump.g * pump.rho) ($RES_BND_131) (83) [SCAL] (1) pump.m_flow_single = pump.m_flow / pump.nParallel ($RES_BND_133) (84) [SCAL] (1) pump.Wb_flow = pump.W_single * pump.nParallel ($RES_BND_134) (85) [ARRY] (1) pump.heatTransfer.Q_flows = pump.heatTransfer.heatPorts.Q_flow ($RES_SIM_40) (86) [SCAL] (1) Valve.V_flow = -Valve.port_b.m_flow / smooth(1, if $SEV_22 then Valve.state_a.d else if $SEV_23 then Valve.state_b.d else if $SEV_21 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_135) (87) [ARRY] (1) pump.heatTransfer.Ts = pump.heatTransfer.heatPorts.T ($RES_SIM_41) (88) [SCAL] (1) Valve.port_a_T = smooth(1, if $SEV_22 then Valve.state_a.T else if $SEV_23 then Modelica.Media.Water.IF97_Utilities.T_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_a.h_outflow, 0, 0) else if $SEV_21 then 0.5 * (Valve.state_a.T + Modelica.Media.Water.IF97_Utilities.T_ph(99999.99999999999 * pump.medium.p_bar, Valve.port_a.h_outflow, 0, 0)) - 0.25 * (Modelica.Media.Water.IF97_Utilities.T_ph(99999.99999999999 * pump.medium.p_bar, 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(99999.99999999999 * pump.medium.p_bar, Valve.port_a.h_outflow, 0, 0))) ($RES_BND_136) (89) [SCAL] (1) Valve.port_b_T = smooth(1, if $SEV_19 then Valve.state_b.T else if $SEV_20 then Modelica.Media.Water.IF97_Utilities.T_ph(Valve.port_b.p, Valve.port_b.h_outflow, 0, 0) else if $SEV_21 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_137) (90) [SCAL] (1) pump.monitoring.state_in.p = pump.port_a.p ($RES_SIM_160) (91) [ARRY] (5) pump.heatTransfer.states = {pump.medium.state} ($RES_BND_139) (92) [SCAL] (1) Sink.medium.d = Modelica.Media.Water.IF97_Utilities.rho_props_ph(99999.99999999999 * Sink.medium.p_bar, Sink.medium.h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(99999.99999999999 * Sink.medium.p_bar, Sink.medium.h, Sink.medium.phase, 0)) ($RES_SIM_80) (93) [SCAL] (1) Sink.medium.phase = if $SEV_15 then 1 else 2 ($RES_SIM_81) (94) [SCAL] (1) pump.medium.phase = pump.medium.state.phase ($RES_SIM_46) (95) [SCAL] (1) pump.rho = pump.medium.state.d ($RES_SIM_47) (96) [SCAL] (1) Source.ports[1].p = Source.p ($RES_SIM_83) (97) [SCAL] (1) -((-273.15) - pump.medium.T_degC) = pump.medium.state.T ($RES_SIM_48) (98) [SCAL] (1) Source.ports[1].h_outflow = Source.medium.h ($RES_SIM_84) (99) [SCAL] (1) 99999.99999999999 * pump.medium.p_bar = pump.medium.state.p ($RES_SIM_49) (100) [SCAL] (1) Source.medium.h = Modelica.Media.Water.IF97_Utilities.h_pT(Source.p, Source.T, 0) ($RES_SIM_85) (101) [SCAL] (1) Valve.dp = 99999.99999999999 * pump.medium.p_bar - Valve.port_b.p ($RES_SIM_8) (102) [SCAL] (1) 99999.99999999999 * Sink.medium.p_bar = downstreamPressure.offset + (if $TEV_0 then 0.0 else if $TEV_1 then (downstreamPressure.height * (time - downstreamPressure.startTime)) / downstreamPressure.duration else downstreamPressure.height) ($RES_SIM_5) (103) [RECD] (5) pump.monitoring.state = pump.medium.state ($RES_BND_141) (104) [SCAL] (1) Valve.port_a.h_outflow = Sink.ports[1].h_outflow ($RES_SIM_12) (105) [SCAL] (1) -Valve.port_b.m_flow = homotopy(Valve.Y * Valve.Av * valveOpening.k * smooth(2, if $SEV_1 then (if $SEV_2 then sqrt(Valve.state_a.d) else 0.0) * sqrt(Valve.xs * Valve.p) else if $SEV_3 then -(if $SEV_4 then sqrt(Valve.state_b.d) else 0.0) * sqrt(abs(Valve.xs * Valve.p)) else if $SEV_5 then Modelica.Fluid.Utilities.regRoot2.regRoot2_utility(Valve.xs * Valve.p, Valve.dp_small, Valve.state_a.d, Valve.state_b.d, false, 1.0) else -Modelica.Fluid.Utilities.regRoot2.regRoot2_utility(-Valve.xs * Valve.p, Valve.dp_small, Valve.state_b.d, Valve.state_a.d, false, 1.0)), (Valve.dp * Valve.m_flow_nominal * valveOpening.k) / Valve.dp_nominal) ($RES_SIM_13) (106) [SCAL] (1) Valve.Y = 1.0 - (0.3333333333333333 * $FUN_2) / Valve.Fxt_full ($RES_SIM_14)