Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_DB.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/ThermoPower 3.1.0-master/package.mo", uses=false) Using package ThermoPower with version 3.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermoPower 3.1.0-master/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(ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_DB,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_DB") translateModel(ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_DB,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_DB") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001233/0.001233, allocations: 98.69 kB / 17.63 MB, free: 5.527 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.001191/0.001191, allocations: 193.9 kB / 18.56 MB, free: 4.602 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.444/1.444, allocations: 205.1 MB / 224.4 MB, free: 12.31 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermoPower 3.1.0-master/package.mo): time 0.2832/0.2832, allocations: 48.86 MB / 320.6 MB, free: 11.08 MB / 270.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.555e-05/2.557e-05, allocations: 4.359 kB / 390.8 MB, free: 48.86 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_DB): time 0.0344/0.03444, allocations: 51.99 MB / 442.8 MB, free: 0.6602 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.01638/0.05087, allocations: 14.65 MB / 457.4 MB, free: 1.988 MB / 334.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000551/0.05146, allocations: 11.94 kB / 457.4 MB, free: 1.977 MB / 334.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0009187/0.05239, allocations: 333.9 kB / 457.7 MB, free: 1.648 MB / 334.1 MB Notification: Performance of NFTyping.typeBindings: time 0.00105/0.05354, allocations: 0.509 MB / 458.3 MB, free: 1.137 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.01623/0.06978, allocations: 6.056 MB / 464.3 MB, free: 11.1 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.002494/0.07229, allocations: 1.886 MB / 466.2 MB, free: 9.207 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0006333/0.07293, allocations: 416.3 kB / 466.6 MB, free: 8.797 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0008018/0.07374, allocations: 0.5921 MB / 467.2 MB, free: 8.203 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0006127/0.07437, allocations: 0.5433 MB / 467.7 MB, free: 7.66 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 9.115e-05/0.07447, allocations: 52 kB / 467.8 MB, free: 7.609 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.01105/0.08553, allocations: 6.2 MB / 474 MB, free: 1.402 MB / 350.1 MB Notification: Performance of combineBinaries: time 0.001239/0.0868, allocations: 1.285 MB / 475.3 MB, free: 108 kB / 350.1 MB Notification: Performance of replaceArrayConstructors: time 0.0005449/0.08736, allocations: 0.8183 MB / 476.1 MB, free: 15.28 MB / 366.1 MB Notification: Performance of NFVerifyModel.verify: time 0.000186/0.08755, allocations: 119.6 kB / 476.2 MB, free: 15.16 MB / 366.1 MB Notification: Performance of FrontEnd: time 0.000169/0.08773, allocations: 19.94 kB / 476.2 MB, free: 15.14 MB / 366.1 MB Notification: Could not parse annotation "Evaluate" in the backend. Notification: Could not parse annotation "choices" in the backend. Notification: Could not parse annotation "Evaluate" in the backend. Notification: Could not parse annotation "choices" in the backend. Notification: Could not parse annotation "Evaluate" in the backend. Notification: Could not parse annotation "choices" in the backend. Notification: Could not parse annotation "Evaluate" in the backend. Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 515 (109) * Number of variables: 505 (119) Notification: Performance of Bindings: time 0.003103/0.09084, allocations: 3.648 MB / 479.9 MB, free: 11.37 MB / 366.1 MB Notification: Performance of FunctionAlias: time 0.0003275/0.09117, allocations: 254.6 kB / 480.1 MB, free: 11.14 MB / 366.1 MB Notification: Performance of Early Inline: time 0.000942/0.09212, allocations: 0.6844 MB / 480.8 MB, free: 10.41 MB / 366.1 MB Notification: Performance of simplify1: time 9.632e-05/0.09223, allocations: 95.88 kB / 480.9 MB, free: 10.31 MB / 366.1 MB Notification: Performance of Alias: time 0.002471/0.09471, allocations: 2.214 MB / 483.1 MB, free: 7.871 MB / 366.1 MB Notification: Performance of simplify2: time 7.013e-05/0.09479, allocations: 67.89 kB / 483.2 MB, free: 7.805 MB / 366.1 MB Notification: Performance of Events: time 0.0003394/0.09513, allocations: 268.8 kB / 483.4 MB, free: 7.547 MB / 366.1 MB Notification: Performance of Detect States: time 0.0004858/0.09563, allocations: 482.5 kB / 483.9 MB, free: 7.066 MB / 366.1 MB Notification: Performance of Partitioning: time 0.0007276/0.09637, allocations: 0.6418 MB / 484.6 MB, free: 6.387 MB / 366.1 MB Error: Internal error NBAdjacency.Matrix.createPseudo failed for [FOR-] (9) ($RES_$AUX_147) [----] for j in 1:9 loop [----] [SCAL] (1) $FUN_6[integer(1.0 + ((-1.0) + j))] = sum(hexFV.dMdt[1:j - 1]) ($RES_$AUX_148) [----] end for; Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (82/611) *************************** (1) [ALGB] (1) Real T_out.fluidState.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (2) [ALGB] (9) flow Real[9] hexFV.wall.Q (3) [ALGB] (1) Real T_out.fluidState.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (4) [ALGB] (9) Real[9] hexFV.wall.T (start = {288.15 for $i1 in 1:9}, min = {0.0 for $i1 in 1:9}, nominal = {300.0 for $i1 in 1:9}) (5) [DISC] (10) Integer[10] hexFV.fluidState.phase (min = {0 for $i1 in 1:10}, max = {2 for $i1 in 1:10}) (6) [ALGB] (10) Real[10] hexFV.heatTransfer.T (start = {500.0 for $i1 in 1:10}, min = {273.15 for $i1 in 1:10}, max = {2273.15 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (7) [ALGB] (10) Real[10] hexFV.heatTransfer.cp (start = {1000.0 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e7 for $i1 in 1:10}, nominal = {1000.0 for $i1 in 1:10}) (8) [ALGB] (1) stream Real T_in.inlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (9) [ALGB] (1) stream Real T_out.outlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (10) [ALGB] (10) final input Real[10] hexFV.heatTransfer.fluidState.p = {hexFV.fluidState[1].p, hexFV.fluidState[2].p, hexFV.fluidState[3].p, hexFV.fluidState[4].p, hexFV.fluidState[5].p, hexFV.fluidState[6].p, hexFV.fluidState[7].p, hexFV.fluidState[8].p, hexFV.fluidState[9].p, hexFV.fluidState[10].p} (start = {5e6 for $i1 in 1:10}, min = {611.657 for $i1 in 1:10}, max = {1e8 for $i1 in 1:10}, nominal = {1e6 for $i1 in 1:10}) (11) [ALGB] (1) Real T_out.T (12) [ALGB] (1) Real hexFV.Dpfric1 (13) [ALGB] (10) Real[10] hexFV.heatTransfer.Pr (14) [ALGB] (9) protected Real[9] hexFV.vbar (min = {0.0 for $i1 in 1:9}) (15) [ALGB] (9) Real[9] hexFV.Q_single (16) [ALGB] (10) final input Real[10] hexFV.heatTransfer.fluidState.h = {hexFV.fluidState[1].h, hexFV.fluidState[2].h, hexFV.fluidState[3].h, hexFV.fluidState[4].h, hexFV.fluidState[5].h, hexFV.fluidState[6].h, hexFV.fluidState[7].h, hexFV.fluidState[8].h, hexFV.fluidState[9].h, hexFV.fluidState[10].h} (start = {1e5 for $i1 in 1:10}, min = {-1e10 for $i1 in 1:10}, max = {1e10 for $i1 in 1:10}, nominal = {5e5 for $i1 in 1:10}) (17) [ALGB] (1) Real hexFV.Kf (18) [ALGB] (9) Real[9] hexFV.wbar (start = {hexFV.wnom / hexFV.Nt for $wbar1 in 1:9}, min = {-1e5 for $i1 in 1:9}, max = {1e5 for $i1 in 1:9}) (19) [ALGB] (9) Real[9] hexFV.heatTransfer.gamma_vol (20) [ALGB] (10) final input Real[10] hexFV.heatTransfer.fluidState.d = {hexFV.fluidState[1].d, hexFV.fluidState[2].d, hexFV.fluidState[3].d, hexFV.fluidState[4].d, hexFV.fluidState[5].d, hexFV.fluidState[6].d, hexFV.fluidState[7].d, hexFV.fluidState[8].d, hexFV.fluidState[9].d, hexFV.fluidState[10].d} (start = {150.0 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e5 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (21) [ALGB] (9) Real[9] hexFV.heatTransfer.Tw (start = {500.0 for $i1 in 1:9}, min = {273.15 for $i1 in 1:9}, max = {2273.15 for $i1 in 1:9}, nominal = {500.0 for $i1 in 1:9}) (22) [ALGB] (1) Real hexFV.w (start = hexFV.wnom / hexFV.Nt, min = -1e5, max = 1e5) (23) [ALGB] (1) Real $FUN_7 (24) [ALGB] (10) Real[10] hexFV.u (25) [ALGB] (9) Real[9] $FUN_6 (26) [ALGB] (9) Real[9] TempSource.wall.T (start = {288.15 for $i1 in 1:9}, min = {0.0 for $i1 in 1:9}, nominal = {300.0 for $i1 in 1:9}) (27) [ALGB] (1) Real $FUN_4 (28) [ALGB] (1) Real hexFV.Cf (29) [ALGB] (1) Real $FUN_3 (30) [ALGB] (9) flow Real[9] TempSource.wall.Q (31) [ALGB] (100) Real[10, 10] $FUN_1 (32) [DISC] (10) Boolean[10] $SEV_5[j] (33) [ALGB] (1) Real T_in.T (34) [ALGB] (10) final input Real[10] hexFV.heatTransfer.fluidState.T = {hexFV.fluidState[1].T, hexFV.fluidState[2].T, hexFV.fluidState[3].T, hexFV.fluidState[4].T, hexFV.fluidState[5].T, hexFV.fluidState[6].T, hexFV.fluidState[7].T, hexFV.fluidState[8].T, hexFV.fluidState[9].T, hexFV.fluidState[10].T} (start = {500.0 for $i1 in 1:10}, min = {273.15 for $i1 in 1:10}, max = {2273.15 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (35) [DISC] (10) Boolean[10] $SEV_6[j] (36) [ALGB] (10) Real[10] hexFV.h (start = {hexFV.hstart[$h1] for $h1 in 1:10}, min = {-1e10 for $i1 in 1:10}, max = {1e10 for $i1 in 1:10}, nominal = {5e5 for $i1 in 1:10}) (37) [DISC] (10) Boolean[10] $SEV_7[j] (38) [ALGB] (1) Real hexFV.omega_hyd (39) [ALGB] (10) Real[10] hexFV.heatTransfer.Re_l (40) [DISC] (10) Boolean[10] $SEV_8[j] (41) [ALGB] (9) Real[9] hexFV.heatTransfer.wall.T (start = {288.15 for $i1 in 1:9}, min = {0.0 for $i1 in 1:9}, nominal = {300.0 for $i1 in 1:9}) (42) [ALGB] (9) Real[9] hexFV.heatTransfer.Qvol (43) [ALGB] (9) flow Real[9] hexFV.heatTransfer.wall.Q (44) [ALGB] (9) Real[9] hexFV.heatTransfer.Qw (45) [ALGB] (10) Real[10] hexFV.rho (start = {150.0 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e5 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (46) [ALGB] (1) Real hexFV.wout (min = -1e5, max = 1e5) (47) [ALGB] (10) Real[10] hexFV.T (start = {500.0 for $i1 in 1:10}, min = {273.15 for $i1 in 1:10}, max = {2273.15 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (48) [DISC] (1) Boolean $SEV_10 (49) [ALGB] (1) Real hexFV.Q (50) [ALGB] (9) Real[9] hexFV.heatTransfer.Tvol (start = {500.0 for $i1 in 1:9}, min = {273.15 for $i1 in 1:9}, max = {2273.15 for $i1 in 1:9}, nominal = {500.0 for $i1 in 1:9}) (51) [ALGB] (10) Real[10] hexFV.heatTransfer.Re (52) [ALGB] (1) Real hexFV.M (min = 0.0) (53) [ALGB] (9) protected Real[9] hexFV.drbdh (54) [ALGB] (10) Real[10] hexFV.fluidState.p (start = {5e6 for $i1 in 1:10}, min = {611.657 for $i1 in 1:10}, max = {1e8 for $i1 in 1:10}, nominal = {1e6 for $i1 in 1:10}) (55) [ALGB] (10) protected Real[10] hexFV.drdp (56) [DISC] (1) Boolean $SEV_9 (57) [ALGB] (9) protected Real[9] hexFV.drbdp (58) [DER-] (9) Real[9] $DER.hexFV.htilde (59) [DER-] (1) Real $DER.hexFV.p (60) [ALGB] (1) Real Temperature.y (61) [DISC] (10) final input Integer[10] hexFV.heatTransfer.fluidState.phase = {hexFV.fluidState[1].phase, hexFV.fluidState[2].phase, hexFV.fluidState[3].phase, hexFV.fluidState[4].phase, hexFV.fluidState[5].phase, hexFV.fluidState[6].phase, hexFV.fluidState[7].phase, hexFV.fluidState[8].phase, hexFV.fluidState[9].phase, hexFV.fluidState[10].phase} (min = {0 for $i1 in 1:10}, max = {2 for $i1 in 1:10}) (62) [ALGB] (10) Real[10] hexFV.fluidState.h (start = {1e5 for $i1 in 1:10}, min = {-1e10 for $i1 in 1:10}, max = {1e10 for $i1 in 1:10}, nominal = {5e5 for $i1 in 1:10}) (63) [DISC] (1) Boolean $SEV_4 (64) [DISC] (1) Boolean $SEV_3 (65) [ALGB] (1) Real valve.w (min = -1e5, max = 1e5) (66) [ALGB] (10) protected Real[10] hexFV.drdh (67) [ALGB] (10) Real[10] hexFV.fluidState.d (start = {150.0 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e5 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (68) [ALGB] (10) Real[10] hexFV.heatTransfer.mu (start = {0.001 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e8 for $i1 in 1:10}, nominal = {0.001 for $i1 in 1:10}) (69) [ALGB] (1) Real hexFV.Dpfric (70) [DISC] (1) Boolean $TEV_0 (71) [ALGB] (1) Real hexFV.Tr (72) [ALGB] (1) Real T_in.fluidState.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (73) [ALGB] (10) Real[10] hexFV.heatTransfer.gamma (74) [ALGB] (10) final Real[10] hexFV.heatTransfer.w (min = {-1e5 for $i1 in 1:10}, max = {1e5 for $i1 in 1:10}) (75) [ALGB] (1) Real T_in.fluidState.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (76) [ALGB] (10) Real[10] hexFV.fluidState.T (start = {500.0 for $i1 in 1:10}, min = {273.15 for $i1 in 1:10}, max = {2273.15 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (77) [ALGB] (9) protected Real[9] hexFV.rhobar (start = {150.0 for $i1 in 1:9}, min = {0.0 for $i1 in 1:9}, max = {1e5 for $i1 in 1:9}, nominal = {500.0 for $i1 in 1:9}) (78) [ALGB] (1) Real T_in.fluidState.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (79) [ALGB] (10) Real[10] hexFV.heatTransfer.Pr_l (80) [ALGB] (10) Real[10] hexFV.heatTransfer.k (start = {1.0 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {500.0 for $i1 in 1:10}, nominal = {1.0 for $i1 in 1:10}) (81) [ALGB] (9) Real[9] hexFV.dMdt (82) [ALGB] (1) Real hexFV.Mtot (min = 0.0) System Equations (84/576) *************************** (1) [SCAL] (1) T_out.fluidState.h = homotopy(if $SEV_10 then T_out.outlet.h_outflow else FluidSink.h, T_out.outlet.h_outflow) ($RES_$AUX_144) (2) [SCAL] (1) hexFV.wout = valve.w / hexFV.Nt ($RES_SIM_51) (3) [SCAL] (1) hexFV.w = FluidSource.w0 / hexFV.Nt ($RES_SIM_52) (4) [FOR-] (9) ($RES_SIM_136) (4) [----] for $i1 in 1:9 loop (4) [----] [SCAL] (1) (-hexFV.wall.Q[$i1]) + hexFV.heatTransfer.wall.Q[$i1] = 0.0 ($RES_SIM_137) (4) [----] end for; (5) [FOR-] (10) ($RES_SIM_55) (5) [----] for j in 1:10 loop (5) [----] [SCAL] (1) hexFV.T[j] = hexFV.fluidState.h ($RES_SIM_56) (5) [----] end for; (6) [SCAL] (1) hexFV.wall.T = hexFV.heatTransfer.wall.T ($RES_SIM_138) (7) [SCAL] (1) hexFV.heatTransfer.Qw = hexFV.heatTransfer.wall.Q ($RES_SIM_91) (8) [SCAL] (1) hexFV.heatTransfer.Tw = hexFV.heatTransfer.wall.T ($RES_SIM_92) (9) [FOR-] (10) ($RES_SIM_57) (9) [----] for j in 1:10 loop (9) [----] [SCAL] (1) hexFV.rho[j] = hexFV.fluidState.d ($RES_SIM_58) (9) [----] end for; (10) [FOR-] (10) ($RES_SIM_93) (10) [----] for j in 1:10 loop (10) [----] [SCAL] (1) hexFV.heatTransfer.T[j] = hexFV.heatTransfer.fluidState.h ($RES_SIM_94) (10) [----] end for; (11) [FOR-] (10) ($RES_SIM_59) (11) [----] for j in 1:10 loop (11) [----] [SCAL] (1) hexFV.drdp[j] = Modelica.Media.Water.IF97_Utilities.ddph_props(hexFV.fluidState.phase, hexFV.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFV.fluidState.phase, hexFV.fluidState.T, hexFV.fluidState.p, 0)) ($RES_SIM_60) (11) [----] end for; (12) [FOR-] (9) ($RES_SIM_95) (12) [----] for j in 1:9 loop (12) [----] [SCAL] (1) hexFV.heatTransfer.Tvol[j] = if hexFV.heatTransfer.useAverageTemperature then (hexFV.heatTransfer.T[j] + hexFV.heatTransfer.T[j + 1]) / 2.0 else hexFV.heatTransfer.T[j + 1] ($RES_SIM_96) (12) [----] end for; (13) [FOR-] (9) ($RES_SIM_97) (13) [----] for j in 1:9 loop (13) [----] [SCAL] (1) hexFV.heatTransfer.gamma_vol[j] = if hexFV.heatTransfer.useAverageTemperature then (hexFV.heatTransfer.gamma[j] + hexFV.heatTransfer.gamma[j + 1]) / 2.0 else hexFV.heatTransfer.gamma[j + 1] ($RES_SIM_98) (13) [----] end for; (14) [SCAL] (1) $TEV_0 = time < Temperature.startTime ($RES_EVT_170) (15) [FOR-] (9) ($RES_SIM_99) (15) [----] for j in 1:9 loop (15) [----] [SCAL] (1) hexFV.heatTransfer.Qw[j] = hexFV.heatTransfer.gamma_vol[j] * hexFV.heatTransfer.l * hexFV.heatTransfer.omega * hexFV.heatTransfer.kc * (hexFV.heatTransfer.Tw[j] - hexFV.heatTransfer.Tvol[j]) * hexFV.heatTransfer.Nt ($RES_SIM_100) (15) [----] end for; (16) [SCAL] (1) $SEV_3 = hexFV.w > (-hexFV.wnom * hexFV.wnm) ($RES_EVT_174) (17) [SCAL] (1) $SEV_4 = hexFV.Kf >= 0.0 ($RES_EVT_175) (18) [FOR-] (10) ($RES_EVT_176) (18) [----] for j in 1:10 loop (18) [----] [SCAL] (1) $SEV_5[j] = hexFV.heatTransfer.Re[j] < hexFV.heatTransfer.Re_min + 0.5 * hexFV.heatTransfer.Re_min ($RES_EVT_177) (18) [----] end for; (19) [FOR-] (10) ($RES_EVT_178) (19) [----] for j in 1:10 loop (19) [----] [SCAL] (1) $SEV_6[j] = hexFV.heatTransfer.Re[j] > 1e9 - 0.5 * hexFV.heatTransfer.Re_min ($RES_EVT_179) (19) [----] end for; (20) [FOR-] (10) ($RES_SIM_101) (20) [----] for j in 1:10 loop (20) [----] [SCAL] (1) hexFV.heatTransfer.mu[j] = Modelica.Media.Water.IF97_Utilities.dynamicViscosity(hexFV.heatTransfer.fluidState.d, hexFV.heatTransfer.fluidState.h, hexFV.heatTransfer.fluidState.phase, hexFV.heatTransfer.fluidState.p) ($RES_SIM_102) (20) [----] end for; (21) [SCAL] (1) Temperature.y = Temperature.offset + (if $TEV_0 then 0.0 else Temperature.height) ($RES_SIM_20) (22) [FOR-] (10) ($RES_SIM_103) (22) [----] for j in 1:10 loop (22) [----] [SCAL] (1) hexFV.heatTransfer.k[j] = Modelica.Media.Water.IF97_Utilities.thermalConductivity(hexFV.heatTransfer.fluidState.d, hexFV.heatTransfer.fluidState.h, hexFV.heatTransfer.fluidState.phase, hexFV.heatTransfer.fluidState.p, true) ($RES_SIM_104) (22) [----] end for; (23) [FOR-] (10) ($RES_SIM_105) (23) [----] for j in 1:10 loop (23) [----] [SCAL] (1) hexFV.heatTransfer.cp[j] = Modelica.Media.Water.IF97_Utilities.cp_props_ph(hexFV.heatTransfer.fluidState.phase, hexFV.heatTransfer.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFV.heatTransfer.fluidState.phase, hexFV.heatTransfer.fluidState.T, 0, 0)) ($RES_SIM_106) (23) [----] end for; (24) [FOR-] (10) ($RES_SIM_107) (24) [----] for j in 1:10 loop (24) [----] [SCAL] (1) hexFV.heatTransfer.Re[j] = $FUN_1[integer(1.0 + ((-1.0) + j)), integer(1.0 + ((-1.0) + j))] ($RES_SIM_108) (24) [----] end for; (25) [FOR-] (10) ($RES_SIM_61) (25) [----] for j in 1:10 loop (25) [----] [SCAL] (1) hexFV.drdh[j] = Modelica.Media.Water.IF97_Utilities.ddhp_props(hexFV.fluidState.phase, hexFV.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFV.fluidState.phase, hexFV.fluidState.T, hexFV.fluidState.p, 0)) ($RES_SIM_62) (25) [----] end for; (26) [FOR-] (10) ($RES_SIM_109) (26) [----] for j in 1:10 loop (26) [----] [SCAL] (1) hexFV.heatTransfer.Pr[j] = (hexFV.heatTransfer.mu[j] * hexFV.heatTransfer.cp[j]) / hexFV.heatTransfer.k[j] ($RES_SIM_110) (26) [----] end for; (27) [FOR-] (10) ($RES_SIM_63) (27) [----] for j in 1:10 loop (27) [----] [SCAL] (1) hexFV.u[j] = hexFV.w / (hexFV.A * hexFV.rho[j]) ($RES_SIM_64) (27) [----] end for; (28) [FOR-] (9) ($RES_SIM_65) (28) [----] for j in 1:9 loop (28) [----] [SCAL] (1) (hexFV.wbar[j] * (hexFV.h[j + 1] - hexFV.h[j]) + hexFV.rhobar[j] * hexFV.l * hexFV.A * $DER.hexFV.htilde[j]) - hexFV.l * hexFV.A * $DER.hexFV.p = hexFV.Q_single[j] ($RES_SIM_66) (28) [----] end for; (29) [FOR-] (9) ($RES_SIM_67) (29) [----] for j in 1:9 loop (29) [----] [SCAL] (1) hexFV.dMdt[j] = hexFV.l * hexFV.A * (hexFV.drbdh[j] * $DER.hexFV.htilde[j] + hexFV.drbdp[j] * $DER.hexFV.p) ($RES_SIM_68) (29) [----] end for; (30) [FOR-] (9) ($RES_SIM_69) (30) [----] for j in 1:9 loop (30) [----] [SCAL] (1) hexFV.rhobar[j] = (hexFV.rho[j] + hexFV.rho[j + 1]) / 2.0 ($RES_SIM_70) (30) [----] end for; (31) [FOR-] (10) ($RES_EVT_180) (31) [----] for j in 1:10 loop (31) [----] [SCAL] (1) $SEV_7[j] = hexFV.heatTransfer.Pr[j] < hexFV.heatTransfer.Pr_min + 0.5 * hexFV.heatTransfer.Pr_min ($RES_EVT_181) (31) [----] end for; (32) [FOR-] (10) ($RES_EVT_182) (32) [----] for j in 1:10 loop (32) [----] [SCAL] (1) $SEV_8[j] = hexFV.heatTransfer.Pr[j] > hexFV.heatTransfer.Pr_max - 0.1 * hexFV.heatTransfer.Pr_max ($RES_EVT_183) (32) [----] end for; (33) [SCAL] (1) $SEV_9 = FluidSource.w0 > 0.0 ($RES_EVT_184) (34) [SCAL] (1) $SEV_10 = valve.w > 0.0 ($RES_EVT_185) (35) [FOR-] (10) ($RES_SIM_111) (35) [----] for j in 1:10 loop (35) [----] [SCAL] (1) hexFV.heatTransfer.Re_l[j] = if $SEV_5[j] then hexFV.heatTransfer.Re_min + 0.5 * hexFV.heatTransfer.Re_min - 0.5 * hexFV.heatTransfer.Re_min * (hexFV.heatTransfer.Re_min + 0.5 * hexFV.heatTransfer.Re_min - hexFV.heatTransfer.Re[j]) / ((0.5 * hexFV.heatTransfer.Re_min) ^ 4.0 + (hexFV.heatTransfer.Re_min + 0.5 * hexFV.heatTransfer.Re_min - hexFV.heatTransfer.Re[j]) ^ 4.0) ^ 0.25 else if $SEV_6[j] then 1e9 - 0.5 * hexFV.heatTransfer.Re_min + 0.5 * hexFV.heatTransfer.Re_min * (hexFV.heatTransfer.Re[j] - 1e9 + 0.5 * hexFV.heatTransfer.Re_min) / ((0.5 * hexFV.heatTransfer.Re_min) ^ 4.0 + (hexFV.heatTransfer.Re[j] - 1e9 + 0.5 * hexFV.heatTransfer.Re_min) ^ 4.0) ^ 0.25 else hexFV.heatTransfer.Re[j] ($RES_SIM_112) (35) [----] end for; (36) [FOR-] (10) ($RES_SIM_113) (36) [----] for j in 1:10 loop (36) [----] [SCAL] (1) hexFV.heatTransfer.Pr_l[j] = if $SEV_7[j] then hexFV.heatTransfer.Pr_min + 0.5 * hexFV.heatTransfer.Pr_min - 0.5 * hexFV.heatTransfer.Pr_min * (hexFV.heatTransfer.Pr_min + 0.5 * hexFV.heatTransfer.Pr_min - hexFV.heatTransfer.Pr[j]) / ((0.5 * hexFV.heatTransfer.Pr_min) ^ 4.0 + (hexFV.heatTransfer.Pr_min + 0.5 * hexFV.heatTransfer.Pr_min - hexFV.heatTransfer.Pr[j]) ^ 4.0) ^ 0.25 else if $SEV_8[j] then hexFV.heatTransfer.Pr_max - 0.1 * hexFV.heatTransfer.Pr_max + 0.1 * hexFV.heatTransfer.Pr_max * (hexFV.heatTransfer.Pr[j] - hexFV.heatTransfer.Pr_max + 0.1 * hexFV.heatTransfer.Pr_max) / ((0.1 * hexFV.heatTransfer.Pr_max) ^ 4.0 + (hexFV.heatTransfer.Pr[j] - hexFV.heatTransfer.Pr_max + 0.1 * hexFV.heatTransfer.Pr_max) ^ 4.0) ^ 0.25 else hexFV.heatTransfer.Pr[j] ($RES_SIM_114) (36) [----] end for; (37) [FOR-] (10) ($RES_SIM_115) (37) [----] for j in 1:10 loop (37) [----] [SCAL] (1) hexFV.heatTransfer.gamma[j] = hexFV.heatTransfer.Re_l[j] ^ 0.8 * ((hexFV.heatTransfer.k[j] * 0.023) / hexFV.heatTransfer.Dhyd) * hexFV.heatTransfer.Pr_l[j] ^ 0.4 ($RES_SIM_116) (37) [----] end for; (38) [ARRY] (9) hexFV.heatTransfer.Qvol = hexFV.heatTransfer.Qw ($RES_SIM_117) (39) [ARRY] (10) hexFV.heatTransfer.w = hexFV.w * fill(1.0, 10) ($RES_SIM_118) (40) [FOR-] (9) ($RES_SIM_71) (40) [----] for j in 1:9 loop (40) [----] [SCAL] (1) hexFV.drbdp[j] = (hexFV.drdp[j] + hexFV.drdp[j + 1]) / 2.0 ($RES_SIM_72) (40) [----] end for; (41) [SCAL] (1) valve.w = Constant1.k * valve.Kv * (hexFV.p - FluidSink.p0) ($RES_SIM_36) (42) [ARRY] (50) hexFV.heatTransfer.fluidState = hexFV.fluidState ($RES_SIM_119) (43) [FOR-] (9) ($RES_SIM_73) (43) [----] for j in 1:9 loop (43) [----] [SCAL] (1) hexFV.drbdh[j] = (hexFV.drdh[j] + hexFV.drdh[j + 1]) / 2.0 ($RES_SIM_74) (43) [----] end for; (44) [FOR-] (9) ($RES_SIM_38) (44) [----] for i in 1:9 loop (44) [----] [SCAL] (1) TempSource.wall.T[i] = Temperature.y ($RES_SIM_39) (44) [----] end for; (45) [SCAL] (1) hexFV.fluidState[j].phase = 0 ($RES_SIM_155) (46) [SCAL] (1) hexFV.fluidState[j].h = hexFV.h[j] ($RES_SIM_156) (47) [FOR-] (9) ($RES_SIM_75) (47) [----] for j in 1:9 loop (47) [----] [SCAL] (1) hexFV.vbar[j] = 1.0 / hexFV.rhobar[j] ($RES_SIM_76) (47) [----] end for; (48) [SCAL] (1) hexFV.fluidState[j].d = Modelica.Media.Water.IF97_Utilities.rho_ph(hexFV.p, hexFV.h[j], 0, 0) ($RES_SIM_157) (49) [SCAL] (1) hexFV.fluidState[j].T = Modelica.Media.Water.IF97_Utilities.T_ph(hexFV.p, hexFV.h[j], 0, 0) ($RES_SIM_158) (50) [FOR-] (9) ($RES_SIM_77) (50) [----] for j in 1:9 loop (50) [----] [SCAL] (1) hexFV.wbar[j] = FluidSource.w0 / hexFV.Nt - (hexFV.dMdt[j] / 2.0 + $FUN_6[integer(1.0 + ((-1.0) + j))]) ($RES_SIM_78) (50) [----] end for; (51) [SCAL] (1) hexFV.fluidState[j].p = hexFV.p ($RES_SIM_159) (52) [ARRY] (9) hexFV.Q_single = hexFV.heatTransfer.Qvol / hexFV.Nt ($RES_SIM_120) (53) [SCAL] (1) hexFV.Tr = noEvent(hexFV.M / max(hexFV.w, 1e-15)) ($RES_SIM_41) (54) [FOR-] (100) ($RES_$AUX_153) (54) [----] for {j in 1:10, j in 1:10} loop (54) [----] [SCAL] (1) $FUN_1[integer(1.0 + ((-1.0) + j)), integer(1.0 + ((-1.0) + j))] = abs((hexFV.heatTransfer.Dhyd * hexFV.heatTransfer.w[j]) / (hexFV.heatTransfer.mu[j] * hexFV.heatTransfer.A)) ($RES_$AUX_154) (54) [----] end for; (55) [SCAL] (1) hexFV.Mtot = hexFV.M * hexFV.Nt ($RES_SIM_42) (56) [SCAL] (1) hexFV.Q = sum(hexFV.heatTransfer.wall.Q) ($RES_$AUX_152) (57) [SCAL] (1) hexFV.M = hexFV.A * $FUN_7 * hexFV.l ($RES_SIM_43) (58) [SCAL] (1) $FUN_3 = sum(hexFV.dMdt) ($RES_$AUX_151) (59) [SCAL] (1) $FUN_4 = sum(hexFV.vbar) ($RES_$AUX_150) (60) [FOR-] (9) ($RES_SIM_126) (60) [----] for $i1 in 1:9 loop (60) [----] [SCAL] (1) TempSource.wall.Q[$i1] + hexFV.wall.Q[$i1] = 0.0 ($RES_SIM_127) (60) [----] end for; (61) [ARRY] (10) hexFV.heatTransfer.fluidState.phase = {hexFV.fluidState[1].phase, hexFV.fluidState[2].phase, hexFV.fluidState[3].phase, hexFV.fluidState[4].phase, hexFV.fluidState[5].phase, hexFV.fluidState[6].phase, hexFV.fluidState[7].phase, hexFV.fluidState[8].phase, hexFV.fluidState[9].phase, hexFV.fluidState[10].phase} ($RES_BND_139) (62) [SCAL] (1) hexFV.h[2:10] = hexFV.htilde ($RES_SIM_45) (63) [SCAL] (1) T_in.fluidState.d = Modelica.Media.Water.IF97_Utilities.rho_ph(T_in.fluidState.p, T_in.fluidState.h, 0, 0) ($RES_SIM_162) (64) [SCAL] (1) hexFV.h[1] = FluidSource.h ($RES_SIM_46) (65) [SCAL] (1) TempSource.wall.T = hexFV.wall.T ($RES_SIM_128) (66) [SCAL] (1) T_in.T = Modelica.Media.Water.IF97_Utilities.T_ph(T_in.fluidState.p, T_in.fluidState.h, 0, 0) ($RES_SIM_163) (67) [SCAL] (1) hexFV.Dpfric = hexFV.Dpfric1 ($RES_SIM_82) (68) [SCAL] (1) T_out.outlet.h_outflow = hexFV.htilde[9] ($RES_SIM_47) (69) [SCAL] (1) (hexFV.p + hexFV.Dpfric) - T_in.fluidState.p = 0.0 ($RES_SIM_83) (70) [SCAL] (1) T_in.inlet.h_outflow = hexFV.h[1] ($RES_SIM_48) (71) [SCAL] (1) $FUN_3 = (FluidSource.w0 - valve.w) / hexFV.Nt ($RES_SIM_84) (72) [SCAL] (1) T_out.fluidState.d = Modelica.Media.Water.IF97_Utilities.rho_ph(FluidSink.p0, T_out.fluidState.h, 0, 0) ($RES_SIM_167) (73) [SCAL] (1) T_out.T = Modelica.Media.Water.IF97_Utilities.T_ph(FluidSink.p0, T_out.fluidState.h, 0, 0) ($RES_SIM_168) (74) [SCAL] (1) hexFV.Kf = (5.0 * hexFV.omega_hyd * hexFV.Cf) / hexFV.A ^ 3.0 ($RES_SIM_87) (75) [SCAL] (1) hexFV.Cf = hexFV.Cfnom * hexFV.Kfc ($RES_SIM_88) (76) [SCAL] (1) hexFV.omega_hyd = (4.0 * hexFV.A) / hexFV.Dhyd ($RES_SIM_89) (77) [ARRY] (10) hexFV.heatTransfer.fluidState.h = {hexFV.fluidState[1].h, hexFV.fluidState[2].h, hexFV.fluidState[3].h, hexFV.fluidState[4].h, hexFV.fluidState[5].h, hexFV.fluidState[6].h, hexFV.fluidState[7].h, hexFV.fluidState[8].h, hexFV.fluidState[9].h, hexFV.fluidState[10].h} ($RES_BND_140) (78) [SCAL] (1) hexFV.Dpfric1 = homotopy(0.1111111111111111 * $FUN_4 * (hexFV.w * sqrt(hexFV.w * hexFV.w + (hexFV.wnom / hexFV.Nt) * hexFV.wnf * ((hexFV.wnom / hexFV.Nt) * hexFV.wnf))) * hexFV.Kf, (hexFV.dpnom / (hexFV.wnom / hexFV.Nt)) * hexFV.w) ($RES_$AUX_149) (79) [ARRY] (10) hexFV.heatTransfer.fluidState.d = {hexFV.fluidState[1].d, hexFV.fluidState[2].d, hexFV.fluidState[3].d, hexFV.fluidState[4].d, hexFV.fluidState[5].d, hexFV.fluidState[6].d, hexFV.fluidState[7].d, hexFV.fluidState[8].d, hexFV.fluidState[9].d, hexFV.fluidState[10].d} ($RES_BND_141) (80) [ARRY] (10) hexFV.heatTransfer.fluidState.T = {hexFV.fluidState[1].T, hexFV.fluidState[2].T, hexFV.fluidState[3].T, hexFV.fluidState[4].T, hexFV.fluidState[5].T, hexFV.fluidState[6].T, hexFV.fluidState[7].T, hexFV.fluidState[8].T, hexFV.fluidState[9].T, hexFV.fluidState[10].T} ($RES_BND_142) (81) [FOR-] (9) ($RES_$AUX_147) (81) [----] for j in 1:9 loop (81) [----] [SCAL] (1) $FUN_6[integer(1.0 + ((-1.0) + j))] = sum(hexFV.dMdt[1:j - 1]) ($RES_$AUX_148) (81) [----] end for; (82) [ARRY] (10) hexFV.heatTransfer.fluidState.p = {hexFV.fluidState[1].p, hexFV.fluidState[2].p, hexFV.fluidState[3].p, hexFV.fluidState[4].p, hexFV.fluidState[5].p, hexFV.fluidState[6].p, hexFV.fluidState[7].p, hexFV.fluidState[8].p, hexFV.fluidState[9].p, hexFV.fluidState[10].p} ($RES_BND_143) (83) [SCAL] (1) $FUN_7 = sum(hexFV.rhobar) ($RES_$AUX_146) (84) [SCAL] (1) T_in.fluidState.h = homotopy(if $SEV_9 then FluidSource.h else T_in.inlet.h_outflow, FluidSource.h) ($RES_$AUX_145)