Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr ModelicaTest_3.2.3_ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.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.3+maint.om/package.mo", uses=false) Using package ModelicaTest with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest 3.2.3+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.Fittings.TestWallFriction,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|p_table.a|p_table.b|p_table.last|p_table.nextEvent",fileNamePrefix="ModelicaTest_3.2.3_ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction") translateModel(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction,tolerance=1e-06,outputFormat="mat",numberOfIntervals=20000,variableFilter="time|p_table.a|p_table.b|p_table.last|p_table.nextEvent",fileNamePrefix="ModelicaTest_3.2.3_ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001092/0.001092, allocations: 106.2 kB / 17.04 MB, free: 6.156 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.001073/0.001073, allocations: 191.5 kB / 17.97 MB, free: 5.25 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.147/1.147, allocations: 205.1 MB / 223.8 MB, free: 12.28 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaTest 3.2.3+maint.om/package.mo): time 0.1783/0.1783, allocations: 43.53 MB / 314.7 MB, free: 492 kB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.067e-05/2.07e-05, allocations: 3.266 kB / 384.1 MB, free: 56.43 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction): time 0.02299/0.02302, allocations: 35.39 MB / 419.5 MB, free: 28.32 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.01323/0.03629, allocations: 16.19 MB / 435.7 MB, free: 12.12 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001343/0.03767, allocations: 39.75 kB / 435.7 MB, free: 12.08 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 0.00128/0.03895, allocations: 0.6634 MB / 436.4 MB, free: 11.41 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 0.003971/0.04293, allocations: 2.266 MB / 438.7 MB, free: 9.137 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.006163/0.04911, allocations: 3.588 MB / 442.3 MB, free: 5.574 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.002624/0.05174, allocations: 3.805 MB / 446.1 MB, free: 1.758 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0008162/0.05257, allocations: 1.08 MB / 447.1 MB, free: 0.6758 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001432/0.05401, allocations: 1.479 MB / 448.6 MB, free: 15.19 MB / 334.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001303/0.05532, allocations: 1.214 MB / 449.8 MB, free: 13.97 MB / 334.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001747/0.05551, allocations: 124 kB / 450 MB, free: 13.85 MB / 334.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.00388/0.05939, allocations: 3.019 MB / 453 MB, free: 10.83 MB / 334.1 MB Notification: Performance of combineBinaries: time 0.001869/0.06128, allocations: 2.794 MB / 455.8 MB, free: 8.008 MB / 334.1 MB Notification: Performance of replaceArrayConstructors: time 0.0009252/0.06221, allocations: 1.698 MB / 457.5 MB, free: 6.297 MB / 334.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002457/0.06246, allocations: 267.2 kB / 457.7 MB, free: 6.035 MB / 334.1 MB Notification: Performance of FrontEnd: time 0.0001381/0.06261, allocations: 47.81 kB / 457.8 MB, free: 5.988 MB / 334.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 254 (225) * Number of variables: 258 (234) Notification: Performance of Bindings: time 0.005526/0.06814, allocations: 7.295 MB / 465.1 MB, free: 14.54 MB / 350.1 MB Notification: Performance of FunctionAlias: time 0.0005147/0.06866, allocations: 0.5315 MB / 465.6 MB, free: 14.04 MB / 350.1 MB Notification: Performance of Early Inline: time 0.003547/0.07222, allocations: 3.978 MB / 469.6 MB, free: 10.04 MB / 350.1 MB Notification: Performance of simplify1: time 0.0002668/0.0725, allocations: 317.1 kB / 469.9 MB, free: 9.727 MB / 350.1 MB Notification: Performance of Alias: time 0.004294/0.0768, allocations: 4.604 MB / 474.5 MB, free: 4.656 MB / 350.1 MB Notification: Performance of simplify2: time 0.0002416/0.07706, allocations: 283.6 kB / 474.8 MB, free: 4.379 MB / 350.1 MB Notification: Performance of Events: time 0.000812/0.07787, allocations: 0.7918 MB / 475.6 MB, free: 3.594 MB / 350.1 MB Notification: Performance of Detect States: time 0.0006998/0.07858, allocations: 0.8484 MB / 476.4 MB, free: 2.727 MB / 350.1 MB Notification: Performance of Partitioning: time 0.001308/0.0799, allocations: 1.443 MB / 477.9 MB, free: 0.9531 MB / 350.1 MB Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (140/164) **************************** (1) [DISC] (1) Boolean $SEV_29 (2) [ALGB] (1) Real pipe3.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * pipe3.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.temperature(pipe3.state_b), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.setState_phX(pipe3.port_b.p, pipe3.port_b.h_outflow, {})), pipe3.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (3) [DISC] (1) Boolean $SEV_28 (4) [DISC] (1) Boolean $SEV_27 (5) [DISC] (1) Boolean $SEV_26 (6) [DISC] (1) Boolean $SEV_25 (7) [DISC] (1) Boolean $SEV_24 (8) [ALGB] (1) stream Real[1] ambient_p3.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (9) [ALGB] (2) Real[2] pressureLossPipe.flowModel.mus = {ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.flowModel.Medium.dynamicViscosity(pressureLossPipe.flowModel.states[$i1]) for $i1 in 1:2} (start = {0.001 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {0.001 for $i1 in 1:2}) (10) [ALGB] (1) flow Real[1] ambient_p3.ports.m_flow (min = {-1e60}, max = {1e60}) (11) [ALGB] (1) flow Real[1] ambient_p5.ports.m_flow (min = {-1e60}, max = {1e60}) (12) [ALGB] (1) flow Real[1] ambient_p2.ports.m_flow (min = {-1e60}, max = {1e60}) (13) [ALGB] (1) flow Real[1] ambient_p4.ports.m_flow (min = {-1e60}, max = {1e60}) (14) [ALGB] (1) Real pipe2.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (15) [ALGB] (1) Real ambient_a.medium.state.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (16) [DISC] (1) Boolean $TEV_0 (17) [ALGB] (1) Real pipe4.dp_fg (18) [ALGB] (1) Real[1] ambient_p4.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}) (19) [ALGB] (1) Real pipe1.dp (start = pipe1.dp_start) (20) [ALGB] (1) stream Real pipe4.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (21) [ALGB] (1) Real[1] pressureLossPipe.flowModel.dps_fg (start = {pressureLossPipe.flowModel.p_a_start - pressureLossPipe.flowModel.p_b_start for $i1 in 1:1}) (22) [ALGB] (1) Real pipe3.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (23) [ALGB] (5) Real[5] ambient_a.ports.p (start = {1e5 for $i1 in 1:5}, min = {0.0 for $i1 in 1:5}, max = {1e8 for $i1 in 1:5}, nominal = {1e5 for $i1 in 1:5}) (24) [ALGB] (1) Real pressureLossPipe.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (25) [ALGB] (1) Real[1] ambient_p3.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}) (26) [DISC] (1) protected Integer p_table.last (start = 1) (27) [ALGB] (1) Real[1] pressureLossPipe.flowModel.Fs_fg (28) [ALGB] (1) stream Real pipe4.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (29) [ALGB] (1) Real pipe3.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * pipe3.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.temperature(pipe3.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.setState_phX(pipe3.port_a.p, pipe3.port_a.h_outflow, {})), pipe3.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (30) [DISC] (1) protected discrete Real p_table.nextEvent (fixed = true, start = 0.0) (31) [ALGB] (1) Real pipe1.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * pipe1.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.temperature(pipe1.state_b), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.setState_phX(pipe1.port_b.p, pipe1.port_b.h_outflow, {})), pipe1.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (32) [ALGB] (1) stream Real pipe1.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (33) [ALGB] (1) protected Real pipe1.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (34) [ALGB] (1) Real pipe3.V_flow = (995.586 * pipe3.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * pipe3.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.density(pipe3.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe3.Medium.density(pipe3.state_b), pipe3.m_flow_small) (35) [ALGB] (1) Real pipe2.dp (start = pipe2.dp_start) (36) [DISC] (1) Integer $FUN_9 (37) [ALGB] (1) Real $FUN_8 (38) [ALGB] (1) Real $FUN_7 (39) [ALGB] (1) Real $FUN_6 (40) [ALGB] (1) Real[1] pressureLossPipe.flowModel.Fs_p (41) [ALGB] (1) Real $FUN_5 (42) [ALGB] (1) Real $FUN_4 (43) [ALGB] (1) Real $FUN_3 (44) [ALGB] (1) Real[1] ambient_p2.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}) (45) [ALGB] (1) stream Real pipe1.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (46) [ALGB] (1) protected Real pipe2.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (47) [ALGB] (1) Real pipe4.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * pipe4.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.temperature(pipe4.state_b), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.setState_phX(pipe4.port_b.p, pipe4.port_b.h_outflow, {})), pipe4.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (48) [DISC] (1) protected Real p_table.b (49) [ALGB] (2) final Real[2] pressureLossPipe.flowModel.dimensions = {(4.0 * pressureLossPipe.crossArea) / pressureLossPipe.perimeter, (4.0 * pressureLossPipe.crossArea) / pressureLossPipe.perimeter} (50) [ALGB] (1) Real[1] pressureLossPipe.flowModel.rhos_act (start = {1.0 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, nominal = {1.0 for $i1 in 1:1}) (51) [ALGB] (5) stream Real[5] ambient_a.ports.h_outflow (min = {-1e10 for $i1 in 1:5}, max = {1e10 for $i1 in 1:5}, nominal = {1e6 for $i1 in 1:5}) (52) [DISC] (1) protected Real p_table.a (53) [ALGB] (1) Real pipe4.A_mean = ((pipe4.data.diameter_a ^ 2.0 + pipe4.data.diameter_b ^ 2.0) * 0.7853981633974483) / 2.0 (54) [ALGB] (1) protected Real pipe1.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (55) [ALGB] (1) flow Real pressureLossPipe.port_b.m_flow (min = -1e5, max = 1e60) (56) [ALGB] (1) final Real[1] pressureLossPipe.flowModel.pathLengths = {pressureLossPipe.length} (57) [ALGB] (2) Real[2] pressureLossPipe.flowModel.rhos = {ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.flowModel.Medium.density(pressureLossPipe.flowModel.states[$i1]) for $i1 in 1:2} (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}) (58) [ALGB] (1) Real pipe3.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (59) [ALGB] (1) Real pipe4.F_p (60) [ALGB] (1) protected Real pipe3.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (61) [ALGB] (5) flow Real[5] ambient_a.ports.m_flow (min = {-1e60 for $ports1 in 1:5}, max = {1e60 for $ports1 in 1:5}) (62) [ALGB] (1) Real pipe1.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (63) [ALGB] (1) Real pipe1.V_flow = (995.586 * pipe1.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * pipe1.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.density(pipe1.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.density(pipe1.state_b), pipe1.m_flow_small) (64) [ALGB] (1) Real pipe3.dp (start = pipe3.dp_start) (65) [ALGB] (1) protected Real pipe2.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (66) [ALGB] (1) Real[1] ambient_p1.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}) (67) [ALGB] (1) stream Real[1] ambient_p5.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (68) [ALGB] (1) final Real[1] pressureLossPipe.flowModel.dheights = {pressureLossPipe.height_ab} (69) [ALGB] (1) Real[1] pressureLossPipe.flowModel.Is (70) [ALGB] (1) Real $FUN_10 (71) [ALGB] (1) Real pipe1.Re = Modelica.Fluid.Pipes.BaseClasses.CharacteristicNumbers.ReynoldsNumber_m_flow(995.586 * pipe1.V_flow, noEvent(if 995.586 * pipe1.V_flow > 0.0 then 0.001 else 0.001), pipe1.diameter, pipe1.diameter * 0.7853981633974483 * pipe1.diameter) (72) [ALGB] (1) protected Real pipe4.state_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (73) [ALGB] (1) Real pipe1.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * pipe1.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.temperature(pipe1.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.Medium.setState_phX(pipe1.port_a.p, pipe1.port_a.h_outflow, {})), pipe1.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (74) [DISC] (1) Boolean $SEV_8 (75) [ALGB] (1) protected Real pipe1.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (76) [ALGB] (1) protected Real pipe3.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (77) [ALGB] (1) Real pipe4.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (78) [ALGB] (2) final Real[2] pressureLossPipe.flowModel.roughnesses = {pressureLossPipe.roughness, pressureLossPipe.roughness} (min = {0.0 for $i1 in 1:2}) (79) [ALGB] (1) protected Real pipe2.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (80) [ALGB] (2) final Real[2] pressureLossPipe.flowModel.crossAreas = {pressureLossPipe.crossArea, pressureLossPipe.crossArea} (81) [ALGB] (1) Real pipe4.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * pipe4.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.temperature(pipe4.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.setState_phX(pipe4.port_a.p, pipe4.port_a.h_outflow, {})), pipe4.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (82) [ALGB] (1) protected Real pipe4.state_b.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (83) [ALGB] (1) Real[1] pressureLossPipe.flowModel.Res_turbulent_internal = pressureLossPipe.flowModel.Re_turbulent * {1.0 for $i1 in 1:1} (84) [ALGB] (1) Real pipe2.port_b_T = Modelica.Fluid.Utilities.regStep(-995.586 * pipe2.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.temperature(pipe2.state_b), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.setState_phX(pipe2.port_b.p, pipe2.port_b.h_outflow, {})), pipe2.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (85) [ALGB] (1) stream Real pipe2.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (86) [ALGB] (1) Real pipe4.dp (start = pipe4.dp_start) (87) [ALGB] (1) protected Real pipe1.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (88) [ALGB] (1) stream Real pipe3.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (89) [ALGB] (1) Real pipe2.Re = Modelica.Fluid.Pipes.BaseClasses.CharacteristicNumbers.ReynoldsNumber_m_flow(995.586 * pipe2.V_flow, noEvent(if 995.586 * pipe2.V_flow > 0.0 then 0.001 else 0.001), pipe2.diameter, pipe2.diameter * 0.7853981633974483 * pipe2.diameter) (90) [ALGB] (1) protected Real pipe3.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (91) [ALGB] (1) Real pipe3.F_fg (92) [DISC] (1) protected discrete Real p_table.nextEventScaled (fixed = true, start = 0.0) (93) [ALGB] (1) Real pipe1.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (94) [ALGB] (2) Real[2] pressureLossPipe.flowModel.vs = {(-pressureLossPipe.port_b.m_flow) / (pressureLossPipe.flowModel.crossAreas[1] * ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.Medium.density(pressureLossPipe.flowModel.states[1])), -pressureLossPipe.port_b.m_flow / (ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.Medium.density(pressureLossPipe.flowModel.states[2]) * pressureLossPipe.flowModel.crossAreas[2])} / pressureLossPipe.nParallel (95) [ALGB] (1) stream Real pipe2.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (96) [ALGB] (1) protected Real pipe2.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (97) [ALGB] (1) Real pipe4.V_flow = (995.586 * pipe4.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * pipe4.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.density(pipe4.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe4.Medium.density(pipe4.state_b), pipe4.m_flow_small) (98) [ALGB] (1) stream Real pipe3.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (99) [ALGB] (1) protected Real pipe4.state_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (100) [DISC] (1) Boolean $SEV_43 (101) [ALGB] (1) stream Real[1] ambient_p4.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (102) [DISC] (1) Boolean $SEV_42 (103) [ALGB] (1) protected Real[1] pressureLossPipe.flowModel.diameters = 0.5 * (pressureLossPipe.flowModel.dimensions[2:2] + pressureLossPipe.flowModel.dimensions[1:1]) (104) [DISC] (1) Boolean $SEV_41 (105) [DISC] (1) Boolean $SEV_40 (106) [ALGB] (1) protected Real pipe3.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (107) [ALGB] (1) Real pipe4.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (108) [ALGB] (1) Real[1] pressureLossPipe.flowModel.m_flows (start = {0.0 for $i1 in 1:1}, min = {-1e60 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, StateSelect = default) (109) [ALGB] (4) input Real[2, 2] pressureLossPipe.flowModel.states.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}) (110) [ALGB] (1) stream Real[1] ambient_p2.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (111) [ALGB] (1) Real[1] pressureLossPipe.flowModel.mus_act (start = {0.001 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {0.001 for $i1 in 1:1}) (112) [ALGB] (1) Real pipe2.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (113) [ALGB] (1) protected Real pressureLossPipe.flowModel.dp_fric_nominal = sum({ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.flowModel.WallFriction.pressureLoss_m_flow(pressureLossPipe.flowModel.m_flow_nominal / pressureLossPipe.flowModel.nParallel, pressureLossPipe.flowModel.rho_nominal, pressureLossPipe.flowModel.rho_nominal, pressureLossPipe.flowModel.mu_nominal, pressureLossPipe.flowModel.mu_nominal, pressureLossPipe.flowModel.pathLengths_internal[1], pressureLossPipe.flowModel.diameters[1], ((pressureLossPipe.flowModel.crossAreas[2:2] + pressureLossPipe.flowModel.crossAreas[1:1]) / 2.0)[1], ((pressureLossPipe.flowModel.roughnesses[2:2] + pressureLossPipe.flowModel.roughnesses[1:1]) / 2.0)[1], pressureLossPipe.flowModel.m_flow_small / pressureLossPipe.flowModel.nParallel, pressureLossPipe.flowModel.Res_turbulent_internal[1])}) (min = 0.0, nominal = 1e5) (114) [ALGB] (1) protected Real pipe4.state_a.T (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (115) [ALGB] (1) stream Real pressureLossPipe.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (116) [ALGB] (1) Real ambient_a.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * ambient_a.medium.p_bar) (117) [DISC] (1) Boolean $SEV_39 (118) [ALGB] (1) Real pipe2.port_a_T = Modelica.Fluid.Utilities.regStep(995.586 * pipe2.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.temperature(pipe2.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.temperature(ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.setState_phX(pipe2.port_a.p, pipe2.port_a.h_outflow, {})), pipe2.m_flow_small) (start = 288.15, min = 1.0, max = 1e4, nominal = 300.0) (119) [DISC] (1) Boolean $SEV_38 (120) [DISC] (1) Boolean $SEV_37 (121) [ALGB] (1) Real[1] pressureLossPipe.flowModel.pathLengths_internal = pressureLossPipe.flowModel.pathLengths (122) [ALGB] (1) Real pipe4.F_fg (123) [DISC] (1) Boolean $SEV_36 (124) [ALGB] (1) Real pipe2.V_flow = (995.586 * pipe2.V_flow) / Modelica.Fluid.Utilities.regStep(995.586 * pipe2.V_flow, ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.density(pipe2.state_a), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.Medium.density(pipe2.state_b), pipe2.m_flow_small) (125) [DISC] (1) Boolean $SEV_35 (126) [ALGB] (1) stream Real[1] ambient_p1.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (127) [ALGB] (1) Real pipe3.dp_fg (128) [DISC] (1) Boolean $SEV_34 (129) [DISC] (1) Boolean $SEV_33 (130) [DISC] (1) Boolean $SEV_32 (131) [DISC] (1) Boolean $SEV_31 (132) [ALGB] (1) Real pipe3.F_p (133) [DISC] (1) Boolean $SEV_30 (134) [ALGB] (4) input Real[2, 2] pressureLossPipe.flowModel.states.T (start = {288.15 for $i1 in 1:2}, min = {1.0 for $i1 in 1:2}, max = {1e4 for $i1 in 1:2}, nominal = {300.0 for $i1 in 1:2}) (135) [ALGB] (1) flow Real[1] ambient_p1.ports.m_flow (min = {-1e60}, max = {1e60}) (136) [ALGB] (1) stream Real pressureLossPipe.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (137) [ALGB] (1) Real[1] ambient_p5.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}) (138) [ALGB] (1) Real pipe3.A_mean = ((pipe3.data.diameter_a ^ 2.0 + pipe3.data.diameter_b ^ 2.0) * 0.7853981633974483) / 2.0 (139) [ALGB] (1) Real pressureLossPipe.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (140) [ALGB] (1) Real[1] pressureLossPipe.flowModel.Ib_flows System Equations (136/160) **************************** (1) [ARRY] (1) pressureLossPipe.flowModel.pathLengths_internal = pressureLossPipe.flowModel.pathLengths ($RES_BND_255) (2) [SCAL] (1) pressureLossPipe.flowModel.Res_turbulent_internal[1] = pressureLossPipe.flowModel.Re_turbulent ($RES_BND_256) (3) [ARRY] (1) pressureLossPipe.flowModel.diameters = 0.5 * (pressureLossPipe.flowModel.dimensions[2:2] + pressureLossPipe.flowModel.dimensions[1:1]) ($RES_BND_257) (4) [SCAL] (1) pipe2.state_b.T = 273.15 + 2.390057361376673e-4 * ambient_p2.ports[1].h_outflow ($RES_SIM_280) (5) [SCAL] (1) ambient_p3.ports[1].p = ambient_p3.p ($RES_SIM_82) (6) [SCAL] (1) pipe3.state_a.p = pipe3.port_a.p ($RES_SIM_281) (7) [SCAL] (1) ambient_p3.ports[1].h_outflow = 4184.0 * ((-273.15) + ambient_p3.T) ($RES_SIM_83) (8) [SCAL] (1) pipe3.state_a.T = 273.15 + 2.390057361376673e-4 * ambient_a.ports[3].h_outflow ($RES_SIM_282) (9) [SCAL] (1) pipe3.state_b.p = pipe3.port_b.p ($RES_SIM_283) (10) [SCAL] (1) pipe3.state_b.T = 273.15 + 2.390057361376673e-4 * ambient_p3.ports[1].h_outflow ($RES_SIM_284) (11) [SCAL] (1) pipe4.state_a.p = pipe4.port_a.p ($RES_SIM_285) (12) [SCAL] (1) pipe4.state_a.T = 273.15 + 2.390057361376673e-4 * ambient_a.ports[4].h_outflow ($RES_SIM_286) (13) [SCAL] (1) pipe4.state_b.p = pipe4.port_b.p ($RES_SIM_287) (14) [SCAL] (1) pipe4.state_b.T = 273.15 + 2.390057361376673e-4 * ambient_p4.ports[1].h_outflow ($RES_SIM_288) (15) [ARRY] (4) pressureLossPipe.flowModel.states = {ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.Medium.ThermodynamicState(pressureLossPipe.port_a.p, 273.15 + 2.390057361376673e-4 * ambient_a.ports[5].h_outflow), ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.Medium.ThermodynamicState(pressureLossPipe.port_b.p, 273.15 + 2.390057361376673e-4 * ambient_p5.ports[1].h_outflow)} ($RES_BND_261) (16) [SCAL] (1) ambient_p1.ports[1].p = ambient_p1.p ($RES_SIM_138) (17) [SCAL] (1) ambient_p1.ports[1].h_outflow = 4184.0 * ((-273.15) + ambient_p1.T) ($RES_SIM_139) (18) [SCAL] (1) 995.586 * pipe1.V_flow = ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe1.WallFriction.massFlowRate_dp_staticHead(pipe1.dp, 995.586, 995.586, 0.001, 0.001, pipe1.length, pipe1.diameter, 0.0, pipe1.crossArea, pipe1.roughness, pipe1.dp_small, 4000.0) ($RES_$AUX_271) (19) [SCAL] (1) pipe2.dp = ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pipe2.WallFriction.pressureLoss_m_flow_staticHead(995.586 * pipe2.V_flow, 995.586, 995.586, 0.001, 0.001, pipe2.length, pipe2.diameter, 0.0, pipe2.crossArea, pipe2.roughness, pipe2.m_flow_small, 4000.0) ($RES_$AUX_270) (20) [SCAL] (1) $TEV_0 = $PRE.p_table.nextEvent ($RES_EVT_306) (21) [SCAL] (1) pressureLossPipe.port_a.h_outflow = ambient_p5.ports[1].h_outflow + system.g * pressureLossPipe.height_ab ($RES_SIM_24) (22) [SCAL] (1) pressureLossPipe.port_b.h_outflow = ambient_a.ports[5].h_outflow - system.g * pressureLossPipe.height_ab ($RES_SIM_25) (23) [SCAL] (1) -pressureLossPipe.port_b.m_flow = pressureLossPipe.flowModel.m_flows[1] ($RES_SIM_27) (24) [ARRY] (1) {0.0} = pressureLossPipe.flowModel.Ib_flows - (pressureLossPipe.flowModel.Fs_fg + pressureLossPipe.flowModel.Fs_p) ($RES_SIM_28) (25) [SCAL] (1) $FUN_3 = Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.massFlowRate_dp_and_Re(pipe3.dp_fg, 995.586, 995.586, 0.001, 0.001, pipe3.data) ($RES_$AUX_269) (26) [ARRY] (1) pressureLossPipe.flowModel.Is = {pressureLossPipe.flowModel.m_flows[1] * pressureLossPipe.flowModel.pathLengths[1]} ($RES_SIM_29) (27) [SCAL] (1) $FUN_4 = Modelica.Fluid.Fittings.BaseClasses.QuadraticTurbulent.pressureLoss_m_flow_and_Re(995.586 * pipe4.V_flow, 995.586, 995.586, 0.001, 0.001, pipe4.data) ($RES_$AUX_268) (28) [SCAL] (1) $FUN_5 = ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.flowModel.WallFriction.massFlowRate_dp_staticHead(pressureLossPipe.flowModel.dps_fg[1], pressureLossPipe.flowModel.rhos[1], pressureLossPipe.flowModel.rhos[2], pressureLossPipe.flowModel.mus[1], pressureLossPipe.flowModel.mus[2], pressureLossPipe.flowModel.pathLengths_internal[1], pressureLossPipe.flowModel.diameters[1], (pressureLossPipe.flowModel.g * pressureLossPipe.flowModel.dheights)[1], (0.5 .* (pressureLossPipe.flowModel.crossAreas[1:1] + pressureLossPipe.flowModel.crossAreas[2:2]))[1], (0.5 .* (pressureLossPipe.flowModel.roughnesses[1:1] + pressureLossPipe.flowModel.roughnesses[2:2]))[1], pressureLossPipe.flowModel.dp_small, pressureLossPipe.flowModel.Res_turbulent_internal[1]) ($RES_$AUX_267) (29) [TUPL] (4) ($FUN_6, $FUN_7, $FUN_8, $FUN_9) = ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.p_table.getInterpolationCoefficients(p_table.table, p_table.offset, p_table.startTime, time, p_table.last, 1e-13, p_table.shiftTime) ($RES_$AUX_266) (30) [SCAL] (1) $FUN_10 = ModelicaTest.Fluid.TestComponents.Fittings.TestWallFriction.pressureLossPipe.flowModel.WallFriction.pressureLoss_m_flow(pressureLossPipe.flowModel.m_flow_nominal / pressureLossPipe.flowModel.nParallel, pressureLossPipe.flowModel.rho_nominal, pressureLossPipe.flowModel.rho_nominal, pressureLossPipe.flowModel.mu_nominal, pressureLossPipe.flowModel.mu_nominal, pressureLossPipe.flowModel.pathLengths_internal[1], pressureLossPipe.flowModel.diameters[1], (0.5 .* (pressureLossPipe.flowModel.crossAreas[2:2] + pressureLossPipe.flowModel.crossAreas[1:1]))[1], (0.5 .* (pressureLossPipe.flowModel.roughnesses[2:2] + pressureLossPipe.flowModel.roughnesses[1:1]))[1], pressureLossPipe.flowModel.m_flow_small / pressureLossPipe.flowModel.nParallel, pressureLossPipe.flowModel.Res_turbulent_internal[1]) ($RES_$AUX_265) (31) [SCAL] (1) pressureLossPipe.flowModel.dp_fric_nominal = sum({$FUN_10}) ($RES_$AUX_264) (32) [SCAL] (1) $SEV_8 = pressureLossPipe.flowModel.m_flows[1] > 0.0 ($RES_EVT_311) (33) [ARRY] (1) pressureLossPipe.flowModel.dps_fg = {(2.0 * (pressureLossPipe.flowModel.Fs_fg[1] / pressureLossPipe.flowModel.nParallel)) / (pressureLossPipe.flowModel.crossAreas[1] + pressureLossPipe.flowModel.crossAreas[2])} ($RES_SIM_30) (34) [ARRY] (1) pressureLossPipe.flowModel.Fs_p = pressureLossPipe.flowModel.nParallel * {0.5 * (pressureLossPipe.flowModel.crossAreas[1] + pressureLossPipe.flowModel.crossAreas[2]) * (pressureLossPipe.flowModel.states.T - pressureLossPipe.flowModel.states.T)} ($RES_SIM_31) (35) [ARRY] (1) pressureLossPipe.flowModel.Ib_flows = {0.0} ($RES_SIM_32) (36) [SCAL] (1) pressureLossPipe.flowModel.rhos_act[1] = noEvent(if $SEV_8 then pressureLossPipe.flowModel.rhos[1] else pressureLossPipe.flowModel.rhos[2]) ($RES_SIM_33) (37) [SCAL] (1) pressureLossPipe.flowModel.mus_act[1] = noEvent(if $SEV_8 then pressureLossPipe.flowModel.mus[1] else pressureLossPipe.flowModel.mus[2]) ($RES_SIM_34) (38) [ARRY] (1) pressureLossPipe.flowModel.m_flows = {homotopy(({$FUN_5} .* pressureLossPipe.flowModel.nParallel)[1], (pressureLossPipe.flowModel.m_flow_nominal / pressureLossPipe.flowModel.dp_nominal * (pressureLossPipe.flowModel.dps_fg - (pressureLossPipe.flowModel.g * pressureLossPipe.flowModel.dheights) .* pressureLossPipe.flowModel.rho_nominal))[1])} ($RES_SIM_35) (39) [SCAL] (1) pipe4.dp = pipe4.port_a.p - pipe4.port_b.p ($RES_SIM_38) (40) [SCAL] (1) 99999.99999999999 * ambient_a.medium.p_bar = p_table.a * time + p_table.b ($RES_SIM_158) (41) [SCAL] (1) $SEV_24 = (-995.586 * pipe4.V_flow) > pipe4.m_flow_small ($RES_EVT_327) (42) [SCAL] (1) $SEV_25 = (-995.586 * pipe4.V_flow) < (-pipe4.m_flow_small) ($RES_EVT_328) (43) [SCAL] (1) $SEV_26 = pipe4.m_flow_small > 0.0 ($RES_EVT_329) (44) [SCAL] (1) pipe1.port_a_T = smooth(1, if $SEV_42 then pipe1.state_a.T else if $SEV_43 then 273.15 + 2.390057361376673e-4 * pipe1.port_a.h_outflow else if $SEV_41 then 0.25 * ((273.15 + 2.390057361376673e-4 * pipe1.port_a.h_outflow) - pipe1.state_a.T) * ((-3.0) + (995.586 * pipe1.V_flow / pipe1.m_flow_small) ^ 2.0) * ((995.586 * pipe1.V_flow) / pipe1.m_flow_small) + 0.5 * (273.15 + pipe1.state_a.T + 2.390057361376673e-4 * pipe1.port_a.h_outflow) else 0.5 * (273.15 + pipe1.state_a.T + 2.390057361376673e-4 * pipe1.port_a.h_outflow)) ($RES_BND_210) (45) [SCAL] (1) pipe1.port_b_T = smooth(1, if $SEV_39 then pipe1.state_b.T else if $SEV_40 then 273.15 + 2.390057361376673e-4 * pipe1.port_b.h_outflow else if $SEV_41 then 0.5 * (273.15 + pipe1.state_b.T + 2.390057361376673e-4 * pipe1.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * pipe1.port_b.h_outflow) - pipe1.state_b.T) * ((-3.0) + (995.586 * pipe1.V_flow / (-pipe1.m_flow_small)) ^ 2.0) * ((995.586 * pipe1.V_flow) / pipe1.m_flow_small) else 0.5 * (273.15 + pipe1.state_b.T + 2.390057361376673e-4 * pipe1.port_b.h_outflow)) ($RES_BND_211) (46) [SCAL] (1) pipe1.Re = 1000.0 * ((1.2732395447351628 * pipe1.diameter * abs(995.586 * pipe1.V_flow)) / (pipe1.diameter * pipe1.diameter)) ($RES_BND_212) (47) [SCAL] (1) 0.0 = -(pipe4.F_fg + pipe4.F_p) ($RES_SIM_41) (48) [SCAL] (1) pipe4.port_b.h_outflow = ambient_a.ports[4].h_outflow ($RES_SIM_43) (49) [SCAL] (1) pipe4.port_a.h_outflow = ambient_p4.ports[1].h_outflow ($RES_SIM_44) (50) [SCAL] (1) pipe4.dp_fg = homotopy($FUN_4, ((995.586 * pipe4.V_flow) * pipe4.dp_nominal) / pipe4.m_flow_nominal) ($RES_SIM_45) (51) [SCAL] (1) pipe4.F_fg = pipe4.A_mean * pipe4.dp_fg ($RES_SIM_46) (52) [SCAL] (1) pipe4.F_p = pipe4.A_mean * (pipe4.state_b.p - pipe4.state_a.p) ($RES_SIM_47) (53) [FOR-] (5) ($RES_SIM_160) (53) [----] for $i1 in 1:5 loop (53) [----] [SCAL] (1) ambient_a.ports[$i1].p = 99999.99999999999 * ambient_a.medium.p_bar ($RES_SIM_161) (53) [----] end for; (54) [FOR-] (5) ($RES_SIM_162) (54) [----] for $i1 in 1:5 loop (54) [----] [SCAL] (1) ambient_a.ports[$i1].h_outflow = 4184.0 * ((-273.15) + ambient_a.T) ($RES_SIM_163) (54) [----] end for; (55) [SCAL] (1) $SEV_27 = 995.586 * pipe4.V_flow > pipe4.m_flow_small ($RES_EVT_330) (56) [SCAL] (1) $SEV_28 = 995.586 * pipe4.V_flow < (-pipe4.m_flow_small) ($RES_EVT_331) (57) [SCAL] (1) $SEV_29 = (-995.586 * pipe3.V_flow) > pipe3.m_flow_small ($RES_EVT_332) (58) [SCAL] (1) $SEV_30 = (-995.586 * pipe3.V_flow) < (-pipe3.m_flow_small) ($RES_EVT_333) (59) [SCAL] (1) $SEV_31 = pipe3.m_flow_small > 0.0 ($RES_EVT_334) (60) [SCAL] (1) $SEV_32 = 995.586 * pipe3.V_flow > pipe3.m_flow_small ($RES_EVT_335) (61) [SCAL] (1) $SEV_33 = 995.586 * pipe3.V_flow < (-pipe3.m_flow_small) ($RES_EVT_336) (62) [SCAL] (1) $SEV_34 = (-995.586 * pipe2.V_flow) > pipe2.m_flow_small ($RES_EVT_337) (63) [SCAL] (1) $SEV_35 = (-995.586 * pipe2.V_flow) < (-pipe2.m_flow_small) ($RES_EVT_338) (64) [SCAL] (1) $SEV_36 = pipe2.m_flow_small > 0.0 ($RES_EVT_339) (65) [SCAL] (1) pipe2.port_a_T = smooth(1, if $SEV_37 then pipe2.state_a.T else if $SEV_38 then 273.15 + 2.390057361376673e-4 * pipe2.port_a.h_outflow else if $SEV_36 then 0.25 * ((273.15 + 2.390057361376673e-4 * pipe2.port_a.h_outflow) - pipe2.state_a.T) * ((-3.0) + (995.586 * pipe2.V_flow / pipe2.m_flow_small) ^ 2.0) * ((995.586 * pipe2.V_flow) / pipe2.m_flow_small) + 0.5 * (273.15 + pipe2.state_a.T + 2.390057361376673e-4 * pipe2.port_a.h_outflow) else 0.5 * (273.15 + pipe2.state_a.T + 2.390057361376673e-4 * pipe2.port_a.h_outflow)) ($RES_BND_221) (66) [SCAL] (1) pipe2.port_b_T = smooth(1, if $SEV_34 then pipe2.state_b.T else if $SEV_35 then 273.15 + 2.390057361376673e-4 * pipe2.port_b.h_outflow else if $SEV_36 then 0.5 * (273.15 + pipe2.state_b.T + 2.390057361376673e-4 * pipe2.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * pipe2.port_b.h_outflow) - pipe2.state_b.T) * ((-3.0) + (995.586 * pipe2.V_flow / (-pipe2.m_flow_small)) ^ 2.0) * ((995.586 * pipe2.V_flow) / pipe2.m_flow_small) else 0.5 * (273.15 + pipe2.state_b.T + 2.390057361376673e-4 * pipe2.port_b.h_outflow)) ($RES_BND_222) (67) [SCAL] (1) pipe2.Re = 1000.0 * ((1.2732395447351628 * pipe2.diameter * abs(995.586 * pipe2.V_flow)) / (pipe2.diameter * pipe2.diameter)) ($RES_BND_223) (68) [SCAL] (1) pipe3.dp = pipe3.port_a.p - pipe3.port_b.p ($RES_SIM_51) (69) [SCAL] (1) 0.0 = -(pipe3.F_fg + pipe3.F_p) ($RES_SIM_54) (70) [SCAL] (1) pipe3.port_b.h_outflow = ambient_a.ports[3].h_outflow ($RES_SIM_56) (71) [SCAL] (1) pipe3.port_a.h_outflow = ambient_p3.ports[1].h_outflow ($RES_SIM_57) (72) [SCAL] (1) 995.586 * pipe3.V_flow = homotopy($FUN_3, (pipe3.dp_fg * pipe3.m_flow_nominal) / pipe3.dp_nominal) ($RES_SIM_58) (73) [SCAL] (1) ambient_p5.ports[1].h_outflow = 4184.0 * ((-273.15) + ambient_p5.T) ($RES_SIM_4) (74) [SCAL] (1) pipe3.F_fg = pipe3.A_mean * pipe3.dp_fg ($RES_SIM_59) (75) [SCAL] (1) ambient_p5.ports[1].p = ambient_p5.p ($RES_SIM_3) (76) [SCAL] (1) ambient_a.medium.state.p = 99999.99999999999 * ambient_a.medium.p_bar ($RES_SIM_173) (77) [ALGO] (5) ($RES_SIM_2) (77) [----] assert(not (p_table.table[1, 1] > 0.0 or p_table.table[1, 1] < 0.0), "The first point in time has to be set to 0, but is table[1,1] = " + String(p_table.table[1, 1], 6, 0, true), AssertionLevel.error); (77) [----] when {time >= $PRE.p_table.nextEvent, initial()} then (77) [----] (p_table.a, p_table.b, p_table.nextEventScaled, p_table.last) := ($FUN_6, $FUN_7, $FUN_8, $FUN_9); (77) [----] p_table.nextEvent := p_table.nextEventScaled; (77) [----] end when; (78) [SCAL] (1) $SEV_37 = 995.586 * pipe2.V_flow > pipe2.m_flow_small ($RES_EVT_340) (79) [SCAL] (1) $SEV_38 = 995.586 * pipe2.V_flow < (-pipe2.m_flow_small) ($RES_EVT_341) (80) [SCAL] (1) $SEV_39 = (-995.586 * pipe1.V_flow) > pipe1.m_flow_small ($RES_EVT_342) (81) [SCAL] (1) $SEV_40 = (-995.586 * pipe1.V_flow) < (-pipe1.m_flow_small) ($RES_EVT_343) (82) [SCAL] (1) $SEV_41 = pipe1.m_flow_small > 0.0 ($RES_EVT_344) (83) [SCAL] (1) $SEV_42 = 995.586 * pipe1.V_flow > pipe1.m_flow_small ($RES_EVT_345) (84) [SCAL] (1) $SEV_43 = 995.586 * pipe1.V_flow < (-pipe1.m_flow_small) ($RES_EVT_346) (85) [SCAL] (1) pipe3.port_a_T = smooth(1, if $SEV_32 then pipe3.state_a.T else if $SEV_33 then 273.15 + 2.390057361376673e-4 * pipe3.port_a.h_outflow else if $SEV_31 then 0.25 * ((273.15 + 2.390057361376673e-4 * pipe3.port_a.h_outflow) - pipe3.state_a.T) * ((-3.0) + (995.586 * pipe3.V_flow / pipe3.m_flow_small) ^ 2.0) * ((995.586 * pipe3.V_flow) / pipe3.m_flow_small) + 0.5 * (273.15 + pipe3.state_a.T + 2.390057361376673e-4 * pipe3.port_a.h_outflow) else 0.5 * (273.15 + pipe3.state_a.T + 2.390057361376673e-4 * pipe3.port_a.h_outflow)) ($RES_BND_236) (86) [SCAL] (1) pipe3.F_p = pipe3.A_mean * (pipe3.state_b.p - pipe3.state_a.p) ($RES_SIM_60) (87) [SCAL] (1) pipe3.port_b_T = smooth(1, if $SEV_29 then pipe3.state_b.T else if $SEV_30 then 273.15 + 2.390057361376673e-4 * pipe3.port_b.h_outflow else if $SEV_31 then 0.5 * (273.15 + pipe3.state_b.T + 2.390057361376673e-4 * pipe3.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * pipe3.port_b.h_outflow) - pipe3.state_b.T) * ((-3.0) + (995.586 * pipe3.V_flow / (-pipe3.m_flow_small)) ^ 2.0) * ((995.586 * pipe3.V_flow) / pipe3.m_flow_small) else 0.5 * (273.15 + pipe3.state_b.T + 2.390057361376673e-4 * pipe3.port_b.h_outflow)) ($RES_BND_237) (88) [SCAL] (1) ambient_p4.ports[1].p = ambient_p4.p ($RES_SIM_62) (89) [SCAL] (1) pipe3.A_mean = 0.39269908169872414 * (pipe3.data.diameter_a ^ 2.0 + pipe3.data.diameter_b ^ 2.0) ($RES_BND_239) (90) [SCAL] (1) ambient_p4.ports[1].h_outflow = 4184.0 * ((-273.15) + ambient_p4.T) ($RES_SIM_63) (91) [SCAL] (1) pipe2.dp = pipe2.port_a.p - pipe2.port_b.p ($RES_SIM_104) (92) [SCAL] (1) pipe2.port_b.h_outflow = ambient_a.ports[2].h_outflow ($RES_SIM_107) (93) [SCAL] (1) pressureLossPipe.port_b.m_flow + ambient_p5.ports[1].m_flow = 0.0 ($RES_SIM_181) (94) [SCAL] (1) pipe2.port_a.h_outflow = ambient_p2.ports[1].h_outflow ($RES_SIM_108) (95) [SCAL] (1) ambient_p4.ports[1].m_flow - 995.586 * pipe4.V_flow = 0.0 ($RES_SIM_182) (96) [SCAL] (1) ambient_p3.ports[1].m_flow - 995.586 * pipe3.V_flow = 0.0 ($RES_SIM_183) (97) [SCAL] (1) ambient_p2.ports[1].m_flow - 995.586 * pipe2.V_flow = 0.0 ($RES_SIM_184) (98) [SCAL] (1) ambient_p1.ports[1].m_flow - 995.586 * pipe1.V_flow = 0.0 ($RES_SIM_185) (99) [SCAL] (1) ambient_a.ports[5].m_flow - pressureLossPipe.port_b.m_flow = 0.0 ($RES_SIM_186) (100) [SCAL] (1) 995.586 * pipe4.V_flow + ambient_a.ports[4].m_flow = 0.0 ($RES_SIM_187) (101) [SCAL] (1) 995.586 * pipe3.V_flow + ambient_a.ports[3].m_flow = 0.0 ($RES_SIM_188) (102) [SCAL] (1) 995.586 * pipe2.V_flow + ambient_a.ports[2].m_flow = 0.0 ($RES_SIM_189) (103) [SCAL] (1) pipe4.port_a_T = smooth(1, if $SEV_27 then pipe4.state_a.T else if $SEV_28 then 273.15 + 2.390057361376673e-4 * pipe4.port_a.h_outflow else if $SEV_26 then 0.25 * ((273.15 + 2.390057361376673e-4 * pipe4.port_a.h_outflow) - pipe4.state_a.T) * ((-3.0) + (995.586 * pipe4.V_flow / pipe4.m_flow_small) ^ 2.0) * ((995.586 * pipe4.V_flow) / pipe4.m_flow_small) + 0.5 * (273.15 + pipe4.state_a.T + 2.390057361376673e-4 * pipe4.port_a.h_outflow) else 0.5 * (273.15 + pipe4.state_a.T + 2.390057361376673e-4 * pipe4.port_a.h_outflow)) ($RES_BND_241) (104) [SCAL] (1) pipe4.port_b_T = smooth(1, if $SEV_24 then pipe4.state_b.T else if $SEV_25 then 273.15 + 2.390057361376673e-4 * pipe4.port_b.h_outflow else if $SEV_26 then 0.5 * (273.15 + pipe4.state_b.T + 2.390057361376673e-4 * pipe4.port_b.h_outflow) - 0.25 * ((273.15 + 2.390057361376673e-4 * pipe4.port_b.h_outflow) - pipe4.state_b.T) * ((-3.0) + (995.586 * pipe4.V_flow / (-pipe4.m_flow_small)) ^ 2.0) * ((995.586 * pipe4.V_flow) / pipe4.m_flow_small) else 0.5 * (273.15 + pipe4.state_b.T + 2.390057361376673e-4 * pipe4.port_b.h_outflow)) ($RES_BND_242) (105) [SCAL] (1) pipe4.A_mean = 0.39269908169872414 * (pipe4.data.diameter_a ^ 2.0 + pipe4.data.diameter_b ^ 2.0) ($RES_BND_244) (106) [ARRY] (2) pressureLossPipe.flowModel.vs = {-(0.0010044335697769957 * pressureLossPipe.port_b.m_flow) / pressureLossPipe.flowModel.crossAreas[1], -(0.0010044335697769957 * pressureLossPipe.port_b.m_flow) / pressureLossPipe.flowModel.crossAreas[2]} / pressureLossPipe.nParallel ($RES_BND_245) (107) [ARRY] (2) pressureLossPipe.flowModel.crossAreas = {pressureLossPipe.crossArea, pressureLossPipe.crossArea} ($RES_BND_246) (108) [ARRY] (2) pressureLossPipe.flowModel.dimensions = {(4.0 * pressureLossPipe.crossArea) / pressureLossPipe.perimeter, (4.0 * pressureLossPipe.crossArea) / pressureLossPipe.perimeter} ($RES_BND_247) (109) [ARRY] (2) pressureLossPipe.flowModel.roughnesses = {pressureLossPipe.roughness, pressureLossPipe.roughness} ($RES_BND_248) (110) [SCAL] (1) pipe1.dp = pipe1.port_a.p - pipe1.port_b.p ($RES_SIM_112) (111) [ARRY] (1) pressureLossPipe.flowModel.dheights = {pressureLossPipe.height_ab} ($RES_BND_249) (112) [SCAL] (1) pipe1.state_a.p = pipe1.port_a.p ($RES_SIM_273) (113) [SCAL] (1) pipe1.port_b.h_outflow = ambient_a.ports[1].h_outflow ($RES_SIM_115) (114) [SCAL] (1) pipe1.state_a.T = 273.15 + 2.390057361376673e-4 * ambient_a.ports[1].h_outflow ($RES_SIM_274) (115) [SCAL] (1) pipe1.port_a.h_outflow = ambient_p1.ports[1].h_outflow ($RES_SIM_116) (116) [SCAL] (1) pipe1.state_b.p = pipe1.port_b.p ($RES_SIM_275) (117) [SCAL] (1) 995.586 * pipe1.V_flow + ambient_a.ports[1].m_flow = 0.0 ($RES_SIM_190) (118) [SCAL] (1) pipe1.state_b.T = 273.15 + 2.390057361376673e-4 * ambient_p1.ports[1].h_outflow ($RES_SIM_276) (119) [SCAL] (1) ambient_a.ports[5].p = pressureLossPipe.port_a.p ($RES_SIM_191) (120) [SCAL] (1) ambient_p2.ports[1].p = ambient_p2.p ($RES_SIM_118) (121) [SCAL] (1) pipe2.state_a.p = pipe2.port_a.p ($RES_SIM_277) (122) [SCAL] (1) pressureLossPipe.port_b.p = ambient_p5.ports[1].p ($RES_SIM_192) (123) [SCAL] (1) ambient_p2.ports[1].h_outflow = 4184.0 * ((-273.15) + ambient_p2.T) ($RES_SIM_119) (124) [SCAL] (1) pipe2.state_a.T = 273.15 + 2.390057361376673e-4 * ambient_a.ports[2].h_outflow ($RES_SIM_278) (125) [SCAL] (1) ambient_a.ports[4].p = pipe4.port_a.p ($RES_SIM_193) (126) [SCAL] (1) pipe2.state_b.p = pipe2.port_b.p ($RES_SIM_279) (127) [SCAL] (1) ambient_a.ports[3].p = pipe3.port_a.p ($RES_SIM_194) (128) [SCAL] (1) pipe4.port_b.p = ambient_p4.ports[1].p ($RES_SIM_195) (129) [SCAL] (1) pipe3.port_b.p = ambient_p3.ports[1].p ($RES_SIM_196) (130) [SCAL] (1) ambient_a.ports[2].p = pipe2.port_a.p ($RES_SIM_197) (131) [SCAL] (1) pipe2.port_b.p = ambient_p2.ports[1].p ($RES_SIM_198) (132) [SCAL] (1) pipe1.port_b.p = ambient_p1.ports[1].p ($RES_SIM_199) (133) [ARRY] (1) pressureLossPipe.flowModel.pathLengths = {pressureLossPipe.length} ($RES_BND_250) (134) [FOR-] (2) ($RES_BND_251) (134) [----] for $i1 in 1:2 loop (134) [----] [SCAL] (1) pressureLossPipe.flowModel.rhos[$i1] = 995.586 ($RES_BND_252) (134) [----] end for; (135) [SCAL] (1) ambient_a.ports[1].p = pipe1.port_a.p ($RES_SIM_200) (136) [FOR-] (2) ($RES_BND_253) (136) [----] for $i1 in 1:2 loop (136) [----] [SCAL] (1) pressureLossPipe.flowModel.mus[$i1] = 0.001 ($RES_BND_254) (136) [----] end for;