Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_E.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_E,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_E") translateModel(ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_E,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_E") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001333/0.001333, allocations: 109.5 kB / 17.7 MB, free: 5.395 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.00134/0.00134, allocations: 188.7 kB / 18.63 MB, free: 4.469 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.123/1.123, allocations: 205.1 MB / 224.5 MB, free: 12.27 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermoPower 3.1.0-master/package.mo): time 0.2375/0.2375, allocations: 48.85 MB / 320.7 MB, free: 11.04 MB / 270.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 1.897e-05/1.9e-05, allocations: 2.984 kB / 391.5 MB, free: 48.59 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFV_E): time 0.06146/0.06149, allocations: 92.92 MB / 484.4 MB, free: 6.93 MB / 366.1 MB Notification: Performance of NFInst.instExpressions: time 0.01529/0.07683, allocations: 14.44 MB / 498.8 MB, free: 8.449 MB / 382.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0008396/0.07771, allocations: 27.88 kB / 498.9 MB, free: 8.422 MB / 382.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001428/0.07915, allocations: 0.6288 MB / 499.5 MB, free: 7.789 MB / 382.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001424/0.08058, allocations: 0.9208 MB / 0.4887 GB, free: 6.863 MB / 382.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0143/0.09492, allocations: 5.99 MB / 0.4945 GB, free: 0.8828 MB / 382.1 MB Notification: Performance of NFFlatten.flatten: time 0.003302/0.09824, allocations: 2.891 MB / 0.4974 GB, free: 13.98 MB / 398.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0009987/0.09926, allocations: 0.7429 MB / 0.4981 GB, free: 13.23 MB / 398.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001465/0.1007, allocations: 1.141 MB / 0.4992 GB, free: 12.09 MB / 398.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0009925/0.1017, allocations: 1.051 MB / 0.5002 GB, free: 11.03 MB / 398.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001256/0.1019, allocations: 92 kB / 0.5003 GB, free: 10.94 MB / 398.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.009459/0.1113, allocations: 6.201 MB / 0.5064 GB, free: 4.734 MB / 398.1 MB Notification: Performance of combineBinaries: time 0.002186/0.1135, allocations: 2.434 MB / 0.5087 GB, free: 2.277 MB / 398.1 MB Notification: Performance of replaceArrayConstructors: time 0.0009414/0.1145, allocations: 1.529 MB / 0.5102 GB, free: 0.7305 MB / 398.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002936/0.1148, allocations: 219.3 kB / 0.5104 GB, free: 0.5156 MB / 398.1 MB Notification: Performance of FrontEnd: time 0.0002106/0.115, allocations: 27.94 kB / 0.5105 GB, free: 500 kB / 398.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1552 (190) * Number of variables: 9152 (220) Notification: Performance of Bindings: time 0.0058/0.1208, allocations: 7.148 MB / 0.5174 GB, free: 9.176 MB / 414.1 MB Notification: Performance of FunctionAlias: time 0.0005181/0.1214, allocations: 487.7 kB / 0.5179 GB, free: 8.703 MB / 414.1 MB Notification: Performance of Early Inline: time 0.003363/0.1247, allocations: 3.634 MB / 0.5215 GB, free: 5.031 MB / 414.1 MB Notification: Performance of simplify1: time 0.0001533/0.1249, allocations: 151.8 kB / 0.5216 GB, free: 4.883 MB / 414.1 MB Notification: Performance of Alias: time 0.003842/0.1287, allocations: 3.753 MB / 0.5253 GB, free: 0.8242 MB / 414.1 MB Notification: Performance of simplify2: time 8.801e-05/0.1288, allocations: 87.86 kB / 0.5254 GB, free: 0.7383 MB / 414.1 MB Notification: Performance of Events: time 0.0003736/0.1292, allocations: 399.1 kB / 0.5257 GB, free: 352 kB / 414.1 MB Notification: Performance of Detect States: time 0.1557/0.2849, allocations: 0.647 MB / 0.5264 GB, free: 29.94 MB / 414.1 MB Notification: Performance of Partitioning: time 0.001009/0.286, allocations: 1.018 MB / 0.5274 GB, free: 29.71 MB / 414.1 MB Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [FOR-] (19) ($RES_$AUX_251) [----] for $i1 in 1:19 loop [----] [SCAL] (1) $FUN_5[$i1] = sum(hexFVb.dMdt[1:$i1 - 1]) ($RES_$AUX_252) [----] end for; Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (144/9112) ***************************** (1) [ALGB] (400) Real[20, 20] hexFVb.fluidState.T (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (2) [ALGB] (400) Real[20, 20] hexFVa.fluidState.T (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (3) [ALGB] (1) stream Real SensT_A_in.outlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (4) [ALGB] (19) Real[19] hexFVb.wbar (start = {hexFVb.wnom / hexFVb.Nt for $i1 in 1:19}, min = {-1e5 for $i1 in 1:19}, max = {1e5 for $i1 in 1:19}) (5) [ALGB] (1) Real hexFVa.heatTransfer.w_wnom (6) [ALGB] (19) Real[19] hexFVb.wall.T (start = {288.15 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, nominal = {300.0 for $i1 in 1:19}) (7) [ALGB] (20) Real[20] hexFVb.heatTransfer.T (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (8) [ALGB] (19) flow Real[19] hexFVb.wall.Q (9) [ALGB] (19) Real[19] counterCurrentFV.side2.T (start = {288.15 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, nominal = {300.0 for $i1 in 1:19}) (10) [DISC] (1) Boolean $TEV_0 (11) [ALGB] (1) Real SensT_B_in.fluidState.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (12) [ALGB] (19) flow Real[19] counterCurrentFV.side2.Q (13) [ALGB] (1) stream Real SensT_B_out.outlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (14) [ALGB] (1) Real hexFVb.Mtot (min = 0.0) (15) [ALGB] (19) Real[19] hexFVa.heatTransfer.Qw (16) [ALGB] (1) Real SensT_A_out.fluidState.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (17) [ALGB] (1) Real SensT_A_out.fluidState.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (18) [ALGB] (1) Real SensT_B_in.fluidState.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (19) [ALGB] (1) Real SensT_B_in.fluidState.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (20) [DISC] (1) Boolean $SEV_11 (21) [DISC] (1) Boolean $SEV_10 (22) [ALGB] (20) final Real[20] hexFVb.heatTransfer.w = hexFVb.w * {1.0 for $i1 in 1:20} (min = {-1e5 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}) (23) [ALGB] (19) protected Real[19] hexFVb.vbar (min = {0.0 for $i1 in 1:19}) (24) [ALGB] (1) Real SensT_B_in.fluidState.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (25) [DISC] (400) Integer[20, 20] hexFVa.fluidState.phase (min = {0 for $i1 in 1:20}, max = {2 for $i1 in 1:20}) (26) [ALGB] (1) Real SensT_A_out.fluidState.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (27) [DISC] (400) Integer[20, 20] hexFVb.fluidState.phase (min = {0 for $i1 in 1:20}, max = {2 for $i1 in 1:20}) (28) [ALGB] (19) Real[19] hexFVa.wbar (start = {hexFVa.wnom / hexFVa.Nt for $i1 in 1:19}, min = {-1e5 for $i1 in 1:19}, max = {1e5 for $i1 in 1:19}) (29) [ALGB] (400) final input Real[20, 20] hexFVb.heatTransfer.fluidState.p = {hexFVb.fluidState[1].p, hexFVb.fluidState[2].p, hexFVb.fluidState[3].p, hexFVb.fluidState[4].p, hexFVb.fluidState[5].p, hexFVb.fluidState[6].p, hexFVb.fluidState[7].p, hexFVb.fluidState[8].p, hexFVb.fluidState[9].p, hexFVb.fluidState[10].p, hexFVb.fluidState[11].p, hexFVb.fluidState[12].p, hexFVb.fluidState[13].p, hexFVb.fluidState[14].p, hexFVb.fluidState[15].p, hexFVb.fluidState[16].p, hexFVb.fluidState[17].p, hexFVb.fluidState[18].p, hexFVb.fluidState[19].p, hexFVb.fluidState[20].p} (start = {5e6 for $i1 in 1:20}, min = {611.657 for $i1 in 1:20}, max = {1e8 for $i1 in 1:20}, nominal = {1e6 for $i1 in 1:20}) (30) [ALGB] (1) Real hexFVb.Dpfric (31) [ALGB] (19) protected Real[19] hexFVa.rhobar (start = {150.0 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, max = {1e5 for $i1 in 1:19}, nominal = {500.0 for $i1 in 1:19}) (32) [ALGB] (400) final input Real[20, 20] hexFVb.heatTransfer.fluidState.h = {hexFVb.fluidState[1].h, hexFVb.fluidState[2].h, hexFVb.fluidState[3].h, hexFVb.fluidState[4].h, hexFVb.fluidState[5].h, hexFVb.fluidState[6].h, hexFVb.fluidState[7].h, hexFVb.fluidState[8].h, hexFVb.fluidState[9].h, hexFVb.fluidState[10].h, hexFVb.fluidState[11].h, hexFVb.fluidState[12].h, hexFVb.fluidState[13].h, hexFVb.fluidState[14].h, hexFVb.fluidState[15].h, hexFVb.fluidState[16].h, hexFVb.fluidState[17].h, hexFVb.fluidState[18].h, hexFVb.fluidState[19].h, hexFVb.fluidState[20].h} (start = {1e5 for $i1 in 1:20}, min = {-1e10 for $i1 in 1:20}, max = {1e10 for $i1 in 1:20}, nominal = {5e5 for $i1 in 1:20}) (33) [ALGB] (400) final input Real[20, 20] hexFVb.heatTransfer.fluidState.d = {hexFVb.fluidState[1].d, hexFVb.fluidState[2].d, hexFVb.fluidState[3].d, hexFVb.fluidState[4].d, hexFVb.fluidState[5].d, hexFVb.fluidState[6].d, hexFVb.fluidState[7].d, hexFVb.fluidState[8].d, hexFVb.fluidState[9].d, hexFVb.fluidState[10].d, hexFVb.fluidState[11].d, hexFVb.fluidState[12].d, hexFVb.fluidState[13].d, hexFVb.fluidState[14].d, hexFVb.fluidState[15].d, hexFVb.fluidState[16].d, hexFVb.fluidState[17].d, hexFVb.fluidState[18].d, hexFVb.fluidState[19].d, hexFVb.fluidState[20].d} (start = {150.0 for $i1 in 1:20}, min = {0.0 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (34) [ALGB] (19) Real[19] counterCurrentFV.side1.T (start = {288.15 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, nominal = {300.0 for $i1 in 1:19}) (35) [ALGB] (1) Real $FUN_8 (36) [ALGB] (19) flow Real[19] counterCurrentFV.side1.Q (37) [ALGB] (1) Real $FUN_7 (38) [ALGB] (1) Real hexFVa.Mtot (min = 0.0) (39) [ALGB] (1) Real $FUN_6 (40) [ALGB] (19) Real[19] $FUN_5 (41) [ALGB] (1) Real $FUN_4 (42) [ALGB] (20) protected Real[20] hexFVb.drdh (43) [ALGB] (1) Real $FUN_2 (44) [ALGB] (19) Real[19] hexFVb.heatTransfer.Qw (45) [ALGB] (19) Real[19] hexFVa.Q_single = hexFVa.heatTransfer.Qvol / hexFVa.Nt (46) [ALGB] (1) Real $FUN_1 (47) [ALGB] (20) protected Real[20] hexFVb.drdp (48) [ALGB] (400) final input Real[20, 20] hexFVb.heatTransfer.fluidState.T = {hexFVb.fluidState[1].T, hexFVb.fluidState[2].T, hexFVb.fluidState[3].T, hexFVb.fluidState[4].T, hexFVb.fluidState[5].T, hexFVb.fluidState[6].T, hexFVb.fluidState[7].T, hexFVb.fluidState[8].T, hexFVb.fluidState[9].T, hexFVb.fluidState[10].T, hexFVb.fluidState[11].T, hexFVb.fluidState[12].T, hexFVb.fluidState[13].T, hexFVb.fluidState[14].T, hexFVb.fluidState[15].T, hexFVb.fluidState[16].T, hexFVb.fluidState[17].T, hexFVb.fluidState[18].T, hexFVb.fluidState[19].T, hexFVb.fluidState[20].T} (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (49) [ALGB] (20) final Real[20] hexFVa.heatTransfer.w = hexFVa.w * {1.0 for $i1 in 1:20} (min = {-1e5 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}) (50) [ALGB] (19) protected Real[19] hexFVa.vbar (min = {0.0 for $i1 in 1:19}) (51) [DER-] (19) Real[19] $DER.hexFVa.htilde (52) [ALGB] (20) Real[20] hexFVb.rho (start = {150.0 for $i1 in 1:20}, min = {0.0 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (53) [ALGB] (19) Real[19] hexFVa.wall.T (start = {288.15 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, nominal = {300.0 for $i1 in 1:19}) (54) [ALGB] (19) flow Real[19] hexFVa.wall.Q (55) [ALGB] (19) Real[19] hexFVa.heatTransfer.Tvol (start = {500.0 for $i1 in 1:19}, min = {273.15 for $i1 in 1:19}, max = {2273.15 for $i1 in 1:19}, nominal = {500.0 for $i1 in 1:19}) (56) [ALGB] (19) Real[19] hexFVb.heatTransfer.Qvol = hexFVb.heatTransfer.Qw (57) [ALGB] (1) Real hexFVa.Tr (58) [ALGB] (1) Real $FUN_13 (59) [ALGB] (19) Real[19] $FUN_12 (60) [ALGB] (1) Real $FUN_11 (61) [ALGB] (1) Real $FUN_10 (62) [ALGB] (1) Real SensT_B_in.T (63) [ALGB] (400) final input Real[20, 20] hexFVa.heatTransfer.fluidState.T = {hexFVa.fluidState[1].T, hexFVa.fluidState[2].T, hexFVa.fluidState[3].T, hexFVa.fluidState[4].T, hexFVa.fluidState[5].T, hexFVa.fluidState[6].T, hexFVa.fluidState[7].T, hexFVa.fluidState[8].T, hexFVa.fluidState[9].T, hexFVa.fluidState[10].T, hexFVa.fluidState[11].T, hexFVa.fluidState[12].T, hexFVa.fluidState[13].T, hexFVa.fluidState[14].T, hexFVa.fluidState[15].T, hexFVa.fluidState[16].T, hexFVa.fluidState[17].T, hexFVa.fluidState[18].T, hexFVa.fluidState[19].T, hexFVa.fluidState[20].T} (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (64) [ALGB] (20) Real[20] hexFVa.heatTransfer.T (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (65) [DISC] (1) Boolean $SEV_9 (66) [DISC] (1) Boolean $SEV_8 (67) [DER-] (1) Real $DER.hexFVa.p (68) [ALGB] (1) Real hexFVb.w (start = hexFVb.wnom / hexFVb.Nt, min = -1e5, max = 1e5) (69) [DISC] (1) Boolean $SEV_6 (70) [ALGB] (20) Real[20] hexFVb.u (71) [DISC] (1) Boolean $SEV_5 (72) [ALGB] (1) Real ValveLin1.w (min = -1e5, max = 1e5) (73) [DISC] (1) Boolean $SEV_4 (74) [ALGB] (1) Real hexFVb.heatTransfer.w_wnom (75) [ALGB] (1) Real SensT_B_out.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (76) [ALGB] (20) protected Real[20] hexFVa.drdh (77) [ALGB] (1) stream Real SensT_A_in.inlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (78) [ALGB] (400) final input Real[20, 20] hexFVa.heatTransfer.fluidState.d = {hexFVa.fluidState[1].d, hexFVa.fluidState[2].d, hexFVa.fluidState[3].d, hexFVa.fluidState[4].d, hexFVa.fluidState[5].d, hexFVa.fluidState[6].d, hexFVa.fluidState[7].d, hexFVa.fluidState[8].d, hexFVa.fluidState[9].d, hexFVa.fluidState[10].d, hexFVa.fluidState[11].d, hexFVa.fluidState[12].d, hexFVa.fluidState[13].d, hexFVa.fluidState[14].d, hexFVa.fluidState[15].d, hexFVa.fluidState[16].d, hexFVa.fluidState[17].d, hexFVa.fluidState[18].d, hexFVa.fluidState[19].d, hexFVa.fluidState[20].d} (start = {150.0 for $i1 in 1:20}, min = {0.0 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (79) [ALGB] (20) protected Real[20] hexFVa.drdp (80) [ALGB] (20) Real[20] hexFVb.h (start = hexFVb.hstart, min = {-1e10 for $i1 in 1:20}, max = {1e10 for $i1 in 1:20}, nominal = {5e5 for $i1 in 1:20}) (81) [ALGB] (1) Real SensT_B_in.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (82) [ALGB] (400) final input Real[20, 20] hexFVa.heatTransfer.fluidState.h = {hexFVa.fluidState[1].h, hexFVa.fluidState[2].h, hexFVa.fluidState[3].h, hexFVa.fluidState[4].h, hexFVa.fluidState[5].h, hexFVa.fluidState[6].h, hexFVa.fluidState[7].h, hexFVa.fluidState[8].h, hexFVa.fluidState[9].h, hexFVa.fluidState[10].h, hexFVa.fluidState[11].h, hexFVa.fluidState[12].h, hexFVa.fluidState[13].h, hexFVa.fluidState[14].h, hexFVa.fluidState[15].h, hexFVa.fluidState[16].h, hexFVa.fluidState[17].h, hexFVa.fluidState[18].h, hexFVa.fluidState[19].h, hexFVa.fluidState[20].h} (start = {1e5 for $i1 in 1:20}, min = {-1e10 for $i1 in 1:20}, max = {1e10 for $i1 in 1:20}, nominal = {5e5 for $i1 in 1:20}) (83) [ALGB] (19) Real[19] hexFVb.dMdt (84) [ALGB] (400) final input Real[20, 20] hexFVa.heatTransfer.fluidState.p = {hexFVa.fluidState[1].p, hexFVa.fluidState[2].p, hexFVa.fluidState[3].p, hexFVa.fluidState[4].p, hexFVa.fluidState[5].p, hexFVa.fluidState[6].p, hexFVa.fluidState[7].p, hexFVa.fluidState[8].p, hexFVa.fluidState[9].p, hexFVa.fluidState[10].p, hexFVa.fluidState[11].p, hexFVa.fluidState[12].p, hexFVa.fluidState[13].p, hexFVa.fluidState[14].p, hexFVa.fluidState[15].p, hexFVa.fluidState[16].p, hexFVa.fluidState[17].p, hexFVa.fluidState[18].p, hexFVa.fluidState[19].p, hexFVa.fluidState[20].p} (start = {5e6 for $i1 in 1:20}, min = {611.657 for $i1 in 1:20}, max = {1e8 for $i1 in 1:20}, nominal = {1e6 for $i1 in 1:20}) (85) [ALGB] (1) Real SensT_B_out.T (86) [ALGB] (1) Real hexFVb.Tr (87) [ALGB] (20) Real[20] hexFVb.T (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (88) [ALGB] (19) Real[19] hexFVb.heatTransfer.wall.T (start = {288.15 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, nominal = {300.0 for $i1 in 1:19}) (89) [ALGB] (1) Real hexFVa.Kf (90) [ALGB] (19) protected Real[19] hexFVa.drbdh (91) [ALGB] (1) Real hexFVb.Q (92) [ALGB] (19) flow Real[19] hexFVb.heatTransfer.wall.Q (93) [ALGB] (1) Real hexFVb.wout (min = -1e5, max = 1e5) (94) [ALGB] (1) Real hexFVa.Dpfric (95) [ALGB] (1) Real hexFVb.M (min = 0.0) (96) [ALGB] (1) Real hexFVa.Cf (97) [ALGB] (1) stream Real SensT_B_in.inlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (98) [DISC] (400) final input Integer[20, 20] hexFVa.heatTransfer.fluidState.phase = {hexFVa.fluidState[1].phase, hexFVa.fluidState[2].phase, hexFVa.fluidState[3].phase, hexFVa.fluidState[4].phase, hexFVa.fluidState[5].phase, hexFVa.fluidState[6].phase, hexFVa.fluidState[7].phase, hexFVa.fluidState[8].phase, hexFVa.fluidState[9].phase, hexFVa.fluidState[10].phase, hexFVa.fluidState[11].phase, hexFVa.fluidState[12].phase, hexFVa.fluidState[13].phase, hexFVa.fluidState[14].phase, hexFVa.fluidState[15].phase, hexFVa.fluidState[16].phase, hexFVa.fluidState[17].phase, hexFVa.fluidState[18].phase, hexFVa.fluidState[19].phase, hexFVa.fluidState[20].phase} (min = {0 for $i1 in 1:20}, max = {2 for $i1 in 1:20}) (99) [ALGB] (19) protected Real[19] hexFVa.drbdp (100) [ALGB] (19) Real[19] hexFVb.Q_single = hexFVb.heatTransfer.Qvol / hexFVb.Nt (101) [ALGB] (1) Real SensT_A_in.T (102) [DISC] (400) final input Integer[20, 20] hexFVb.heatTransfer.fluidState.phase = {hexFVb.fluidState[1].phase, hexFVb.fluidState[2].phase, hexFVb.fluidState[3].phase, hexFVb.fluidState[4].phase, hexFVb.fluidState[5].phase, hexFVb.fluidState[6].phase, hexFVb.fluidState[7].phase, hexFVb.fluidState[8].phase, hexFVb.fluidState[9].phase, hexFVb.fluidState[10].phase, hexFVb.fluidState[11].phase, hexFVb.fluidState[12].phase, hexFVb.fluidState[13].phase, hexFVb.fluidState[14].phase, hexFVb.fluidState[15].phase, hexFVb.fluidState[16].phase, hexFVb.fluidState[17].phase, hexFVb.fluidState[18].phase, hexFVb.fluidState[19].phase, hexFVb.fluidState[20].phase} (min = {0 for $i1 in 1:20}, max = {2 for $i1 in 1:20}) (103) [ALGB] (19) Real[19] hexFVa.heatTransfer.Tw (start = {500.0 for $i1 in 1:19}, min = {273.15 for $i1 in 1:19}, max = {2273.15 for $i1 in 1:19}, nominal = {500.0 for $i1 in 1:19}) (104) [ALGB] (1) Real SensT_A_in.outlet.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (105) [ALGB] (1) stream Real SensT_A_out.outlet.h_outflow (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (106) [ALGB] (1) Real SensT_A_out.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (107) [DER-] (1) Real $DER.hexFVb.p (108) [ALGB] (1) Real hexFVa.w (start = hexFVa.wnom / hexFVa.Nt, min = -1e5, max = 1e5) (109) [ALGB] (20) Real[20] hexFVa.u (110) [ALGB] (1) Real ValveLin2.w (min = -1e5, max = 1e5) (111) [ALGB] (1) Real SensT_A_in.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (112) [ALGB] (1) Real SensT_B_out.fluidState.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (113) [ALGB] (1) Real hexFVb.infl.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (114) [ALGB] (19) Real[19] hexFVa.dMdt (115) [ALGB] (1) Real SensT_A_in.fluidState.T (start = 500.0, min = 273.15, max = 2273.15, nominal = 500.0) (116) [ALGB] (1) Real hexFVa.Dpfric1 (117) [ALGB] (1) Real SensT_A_out.T (118) [ALGB] (20) Real[20] hexFVa.h (start = hexFVa.hstart, min = {-1e10 for $i1 in 1:20}, max = {1e10 for $i1 in 1:20}, nominal = {5e5 for $i1 in 1:20}) (119) [DER-] (19) Real[19] $DER.hexFVb.htilde (120) [ALGB] (19) protected Real[19] hexFVb.rhobar (start = {150.0 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, max = {1e5 for $i1 in 1:19}, nominal = {500.0 for $i1 in 1:19}) (121) [ALGB] (1) Real SensT_B_out.fluidState.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (122) [ALGB] (19) protected Real[19] hexFVb.drbdh (123) [ALGB] (1) Real SensT_A_in.fluidState.d (start = 150.0, min = 0.0, max = 1e5, nominal = 500.0) (124) [ALGB] (1) Real SensT_B_out.fluidState.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (125) [ALGB] (1) Real hexFVa.wout (min = -1e5, max = 1e5) (126) [ALGB] (1) Real SensT_A_in.fluidState.h (start = 1e5, min = -1e10, max = 1e10, nominal = 5e5) (127) [ALGB] (20) Real[20] hexFVa.rho (start = {150.0 for $i1 in 1:20}, min = {0.0 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (128) [ALGB] (400) Real[20, 20] hexFVa.fluidState.p (start = {5e6 for $i1 in 1:20}, min = {611.657 for $i1 in 1:20}, max = {1e8 for $i1 in 1:20}, nominal = {1e6 for $i1 in 1:20}) (129) [ALGB] (19) flow Real[19] hexFVa.heatTransfer.wall.Q (130) [ALGB] (400) Real[20, 20] hexFVb.fluidState.p (start = {5e6 for $i1 in 1:20}, min = {611.657 for $i1 in 1:20}, max = {1e8 for $i1 in 1:20}, nominal = {1e6 for $i1 in 1:20}) (131) [ALGB] (19) protected Real[19] hexFVb.drbdp (132) [ALGB] (20) Real[20] hexFVa.T (start = {500.0 for $i1 in 1:20}, min = {273.15 for $i1 in 1:20}, max = {2273.15 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (133) [ALGB] (19) Real[19] hexFVa.heatTransfer.wall.T (start = {288.15 for $i1 in 1:19}, min = {0.0 for $i1 in 1:19}, nominal = {300.0 for $i1 in 1:19}) (134) [ALGB] (1) Real hexFVa.Q (135) [ALGB] (1) Real SensT_A_in.fluidState.p (start = 5e6, min = 611.657, max = 1e8, nominal = 1e6) (136) [ALGB] (400) Real[20, 20] hexFVa.fluidState.h (start = {1e5 for $i1 in 1:20}, min = {-1e10 for $i1 in 1:20}, max = {1e10 for $i1 in 1:20}, nominal = {5e5 for $i1 in 1:20}) (137) [ALGB] (1) Real hexFVa.M (min = 0.0) (138) [ALGB] (400) Real[20, 20] hexFVb.fluidState.h (start = {1e5 for $i1 in 1:20}, min = {-1e10 for $i1 in 1:20}, max = {1e10 for $i1 in 1:20}, nominal = {5e5 for $i1 in 1:20}) (139) [ALGB] (1) Real hexFVa.omega_hyd (140) [ALGB] (400) Real[20, 20] hexFVb.fluidState.d (start = {150.0 for $i1 in 1:20}, min = {0.0 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (141) [ALGB] (400) Real[20, 20] hexFVa.fluidState.d (start = {150.0 for $i1 in 1:20}, min = {0.0 for $i1 in 1:20}, max = {1e5 for $i1 in 1:20}, nominal = {500.0 for $i1 in 1:20}) (142) [ALGB] (19) Real[19] hexFVa.heatTransfer.Qvol = hexFVa.heatTransfer.Qw (143) [ALGB] (19) Real[19] hexFVb.heatTransfer.Tw (start = {500.0 for $i1 in 1:19}, min = {273.15 for $i1 in 1:19}, max = {2273.15 for $i1 in 1:19}, nominal = {500.0 for $i1 in 1:19}) (144) [ALGB] (19) Real[19] hexFVb.heatTransfer.Tvol (start = {500.0 for $i1 in 1:19}, min = {273.15 for $i1 in 1:19}, max = {2273.15 for $i1 in 1:19}, nominal = {500.0 for $i1 in 1:19}) System Equations (138/1512) ***************************** (1) [SCAL] (1) SensT_B_in.inlet.h_outflow = hexFVb.h[1] ($RES_SIM_80) (2) [FOR-] (19) ($RES_SIM_206) (2) [----] for $i1 in 1:19 loop (2) [----] [SCAL] (1) counterCurrentFV.side2.Q[$i1] + hexFVa.wall.Q[$i1] = 0.0 ($RES_SIM_207) (2) [----] end for; (3) [FOR-] (20) ($RES_SIM_281) (3) [----] for $i1 in 1:20 loop (3) [----] [SCAL] (1) hexFVb.fluidState[$i1].d = Modelica.Media.Water.IF97_Utilities.rho_ph(hexFVb.p, hexFVb.h[$i1], 0, 0) ($RES_SIM_282) (3) [----] end for; (4) [ARRY] (19) counterCurrentFV.side2.T = hexFVa.wall.T ($RES_SIM_208) (5) [SCAL] (1) hexFVb.wout = ValveLin2.w / hexFVb.Nt ($RES_SIM_83) (6) [ARRY] (19) hexFVb.heatTransfer.Qw = hexFVb.heatTransfer.wall.Q ($RES_SIM_123) (7) [FOR-] (19) ($RES_SIM_209) (7) [----] for $i1 in 1:19 loop (7) [----] [SCAL] (1) counterCurrentFV.side1.Q[$i1] + hexFVb.wall.Q[$i1] = 0.0 ($RES_SIM_210) (7) [----] end for; (8) [SCAL] (1) hexFVb.w = SideB_MassFlowRate.w0 / hexFVb.Nt ($RES_SIM_84) (9) [ARRY] (19) hexFVb.heatTransfer.Tw = hexFVb.heatTransfer.wall.T ($RES_SIM_124) (10) [FOR-] (20) ($RES_SIM_283) (10) [----] for $i1 in 1:20 loop (10) [----] [SCAL] (1) hexFVb.fluidState[$i1].T = Modelica.Media.Water.IF97_Utilities.T_ph(hexFVb.p, hexFVb.h[$i1], 0, 0) ($RES_SIM_284) (10) [----] end for; (11) [FOR-] (20) ($RES_SIM_125) (11) [----] for $i1 in 1:20 loop (11) [----] [SCAL] (1) hexFVb.heatTransfer.T[$i1] = hexFVb.heatTransfer.fluidState.h ($RES_SIM_126) (11) [----] end for; (12) [FOR-] (20) ($RES_SIM_285) (12) [----] for $i1 in 1:20 loop (12) [----] [SCAL] (1) hexFVb.fluidState[$i1].p = hexFVb.p ($RES_SIM_286) (12) [----] end for; (13) [FOR-] (20) ($RES_SIM_87) (13) [----] for $i1 in 1:20 loop (13) [----] [SCAL] (1) hexFVb.T[$i1] = hexFVb.fluidState.h ($RES_SIM_88) (13) [----] end for; (14) [FOR-] (19) ($RES_SIM_127) (14) [----] for $i1 in 1:19 loop (14) [----] [SCAL] (1) hexFVb.heatTransfer.Tvol[$i1] = if not hexFVb.heatTransfer.useAverageTemperature then hexFVb.heatTransfer.T[$i1 + 1] else if not hexFVb.heatTransfer.adaptiveAverageTemperature then (hexFVb.heatTransfer.T[$i1] + hexFVb.heatTransfer.T[$i1 + 1]) / 2.0 else (hexFVb.heatTransfer.T[$i1] + hexFVb.heatTransfer.T[$i1 + 1]) / 2.0 + ((hexFVb.heatTransfer.T[$i1 + 1] - hexFVb.heatTransfer.T[$i1]) / 2.0) * $FUN_2 ($RES_SIM_128) (14) [----] end for; (15) [FOR-] (20) ($RES_SIM_287) (15) [----] for $i1 in 1:20 loop (15) [----] [SCAL] (1) hexFVa.fluidState[$i1].phase = 0 ($RES_SIM_288) (15) [----] end for; (16) [FOR-] (20) ($RES_SIM_89) (16) [----] for $i1 in 1:20 loop (16) [----] [SCAL] (1) hexFVb.rho[$i1] = hexFVb.fluidState.d ($RES_SIM_90) (16) [----] end for; (17) [FOR-] (19) ($RES_SIM_129) (17) [----] for $i1 in 1:19 loop (17) [----] [SCAL] (1) hexFVb.heatTransfer.Qw[$i1] = hexFVb.heatTransfer.gamma * hexFVb.heatTransfer.kc * hexFVb.heatTransfer.l * hexFVb.heatTransfer.omega * (hexFVb.heatTransfer.Tw[$i1] - hexFVb.heatTransfer.Tvol[$i1]) * hexFVb.heatTransfer.Nt ($RES_SIM_130) (17) [----] end for; (18) [FOR-] (20) ($RES_SIM_289) (18) [----] for $i1 in 1:20 loop (18) [----] [SCAL] (1) hexFVa.fluidState[$i1].h = hexFVa.h[$i1] ($RES_SIM_290) (18) [----] end for; (19) [FOR-] (19) ($RES_SIM_10) (19) [----] for $i1 in 1:19 loop (19) [----] [SCAL] (1) counterCurrentFV.side2.Q[({19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1})[$i1]] + counterCurrentFV.side1.Q[$i1] = 0.0 ($RES_SIM_11) (19) [----] end for; (20) [SCAL] (1) $TEV_0 = time < SideA_InSpecEnth.startTime ($RES_EVT_297) (21) [SCAL] (1) hexFVa.Tr = noEvent(hexFVa.M / max(hexFVa.w, 1e-15)) ($RES_SIM_13) (22) [ARRY] (19) counterCurrentFV.side1.T = hexFVb.wall.T ($RES_SIM_211) (23) [SCAL] (1) hexFVa.Mtot = hexFVa.M * hexFVa.Nt ($RES_SIM_14) (24) [SCAL] (1) hexFVa.M = hexFVa.A * $FUN_13 * hexFVa.l ($RES_SIM_15) (25) [ARRY] (19) hexFVa.h[2:20] = hexFVa.htilde ($RES_SIM_17) (26) [SCAL] (1) hexFVb.heatTransfer.w_wnom = $FUN_1 / hexFVb.heatTransfer.wnom ($RES_SIM_131) (27) [FOR-] (20) ($RES_SIM_91) (27) [----] for $i1 in 1:20 loop (27) [----] [SCAL] (1) hexFVb.drdp[$i1] = Modelica.Media.Water.IF97_Utilities.ddph_props(hexFVb.fluidState.phase, hexFVb.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFVb.fluidState.phase, hexFVb.fluidState.T, hexFVb.fluidState.p, 0)) ($RES_SIM_92) (27) [----] end for; (28) [SCAL] (1) hexFVa.h[1] = SensT_A_in.outlet.h_outflow ($RES_SIM_18) (29) [SCAL] (1) SensT_A_out.outlet.h_outflow = hexFVa.htilde[19] ($RES_SIM_19) (30) [FOR-] (20) ($RES_SIM_291) (30) [----] for $i1 in 1:20 loop (30) [----] [SCAL] (1) hexFVa.fluidState[$i1].d = Modelica.Media.Water.IF97_Utilities.rho_ph(hexFVa.p, hexFVa.h[$i1], 0, 0) ($RES_SIM_292) (30) [----] end for; (31) [FOR-] (20) ($RES_SIM_93) (31) [----] for $i1 in 1:20 loop (31) [----] [SCAL] (1) hexFVb.drdh[$i1] = Modelica.Media.Water.IF97_Utilities.ddhp_props(hexFVb.fluidState.phase, hexFVb.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFVb.fluidState.phase, hexFVb.fluidState.T, hexFVb.fluidState.p, 0)) ($RES_SIM_94) (31) [----] end for; (32) [SCAL] (1) SensT_B_out.T = SensT_B_out.fluidState.T ($RES_SIM_134) (33) [FOR-] (20) ($RES_SIM_95) (33) [----] for $i1 in 1:20 loop (33) [----] [SCAL] (1) hexFVb.u[$i1] = hexFVb.w / (hexFVb.A * hexFVb.rho[$i1]) ($RES_SIM_96) (33) [----] end for; (34) [FOR-] (20) ($RES_SIM_293) (34) [----] for $i1 in 1:20 loop (34) [----] [SCAL] (1) hexFVa.fluidState[$i1].T = Modelica.Media.Water.IF97_Utilities.T_ph(hexFVa.p, hexFVa.h[$i1], 0, 0) ($RES_SIM_294) (34) [----] end for; (35) [SCAL] (1) SensT_B_out.h = homotopy(if $SEV_8 then SensT_B_out.outlet.h_outflow else SideB_FluidSink.h, SensT_B_out.outlet.h_outflow) ($RES_SIM_136) (36) [FOR-] (19) ($RES_SIM_97) (36) [----] for $i1 in 1:19 loop (36) [----] [SCAL] (1) (hexFVb.wbar[$i1] * (hexFVb.h[$i1 + 1] - hexFVb.h[$i1]) + hexFVb.rhobar[$i1] * hexFVb.l * hexFVb.A * $DER.hexFVb.htilde[$i1]) - hexFVb.l * hexFVb.A * $DER.hexFVb.p = hexFVb.Q_single[$i1] ($RES_SIM_98) (36) [----] end for; (37) [FOR-] (20) ($RES_SIM_295) (37) [----] for $i1 in 1:20 loop (37) [----] [SCAL] (1) hexFVa.fluidState[$i1].p = hexFVa.p ($RES_SIM_296) (37) [----] end for; (38) [FOR-] (19) ($RES_SIM_99) (38) [----] for $i1 in 1:19 loop (38) [----] [SCAL] (1) hexFVb.dMdt[$i1] = hexFVb.l * hexFVb.A * (hexFVb.drbdh[$i1] * $DER.hexFVb.htilde[$i1] + hexFVb.drbdp[$i1] * $DER.hexFVb.p) ($RES_SIM_100) (38) [----] end for; (39) [SCAL] (1) $SEV_4 = hexFVa.w > (-hexFVa.wnom * hexFVa.wnm) ($RES_EVT_302) (40) [SCAL] (1) $SEV_5 = hexFVa.Kf >= 0.0 ($RES_EVT_303) (41) [SCAL] (1) $SEV_6 = hexFVb.w > (-hexFVb.wnom * hexFVb.wnm) ($RES_EVT_304) (42) [SCAL] (1) $SEV_8 = ValveLin2.w > 0.0 ($RES_EVT_306) (43) [SCAL] (1) $SEV_9 = ValveLin1.w > 0.0 ($RES_EVT_307) (44) [SCAL] (1) $SEV_10 = SideB_MassFlowRate.w0 > 0.0 ($RES_EVT_308) (45) [SCAL] (1) $SEV_11 = SideA_MassFlowRate.w0 > 0.0 ($RES_EVT_309) (46) [SCAL] (1) SensT_A_in.inlet.h_outflow = hexFVa.h[1] ($RES_SIM_20) (47) [SCAL] (1) hexFVa.wout = ValveLin1.w / hexFVa.Nt ($RES_SIM_23) (48) [SCAL] (1) hexFVa.w = SideA_MassFlowRate.w0 / hexFVa.Nt ($RES_SIM_24) (49) [FOR-] (19) ($RES_SIM_225) (49) [----] for $i1 in 1:19 loop (49) [----] [SCAL] (1) hexFVa.heatTransfer.wall.Q[$i1] - hexFVa.wall.Q[$i1] = 0.0 ($RES_SIM_226) (49) [----] end for; (50) [FOR-] (20) ($RES_SIM_27) (50) [----] for $i1 in 1:20 loop (50) [----] [SCAL] (1) hexFVa.T[$i1] = hexFVa.fluidState.h ($RES_SIM_28) (50) [----] end for; (51) [SCAL] (1) SensT_A_out.T = SensT_A_out.fluidState.T ($RES_SIM_141) (52) [ARRY] (19) hexFVa.wall.T = hexFVa.heatTransfer.wall.T ($RES_SIM_227) (53) [FOR-] (20) ($RES_SIM_29) (53) [----] for $i1 in 1:20 loop (53) [----] [SCAL] (1) hexFVa.rho[$i1] = hexFVa.fluidState.d ($RES_SIM_30) (53) [----] end for; (54) [FOR-] (19) ($RES_SIM_228) (54) [----] for $i1 in 1:19 loop (54) [----] [SCAL] (1) hexFVb.heatTransfer.wall.Q[$i1] - hexFVb.wall.Q[$i1] = 0.0 ($RES_SIM_229) (54) [----] end for; (55) [SCAL] (1) SensT_A_out.h = homotopy(if $SEV_9 then SensT_A_out.outlet.h_outflow else SideA_FluidSink.h, SensT_A_out.outlet.h_outflow) ($RES_SIM_143) (56) [FOR-] (20) ($RES_SIM_31) (56) [----] for $i1 in 1:20 loop (56) [----] [SCAL] (1) hexFVa.drdp[$i1] = Modelica.Media.Water.IF97_Utilities.ddph_props(hexFVa.fluidState.phase, hexFVa.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFVa.fluidState.phase, hexFVa.fluidState.T, hexFVa.fluidState.p, 0)) ($RES_SIM_32) (56) [----] end for; (57) [ARRY] (19) hexFVb.wall.T = hexFVb.heatTransfer.wall.T ($RES_SIM_230) (58) [FOR-] (20) ($RES_SIM_33) (58) [----] for $i1 in 1:20 loop (58) [----] [SCAL] (1) hexFVa.drdh[$i1] = Modelica.Media.Water.IF97_Utilities.ddhp_props(hexFVa.fluidState.phase, hexFVa.fluidState.T, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(hexFVa.fluidState.phase, hexFVa.fluidState.T, hexFVa.fluidState.p, 0)) ($RES_SIM_34) (58) [----] end for; (59) [FOR-] (20) ($RES_SIM_35) (59) [----] for $i1 in 1:20 loop (59) [----] [SCAL] (1) hexFVa.u[$i1] = hexFVa.w / (hexFVa.A * hexFVa.rho[$i1]) ($RES_SIM_36) (59) [----] end for; (60) [FOR-] (19) ($RES_SIM_37) (60) [----] for $i1 in 1:19 loop (60) [----] [SCAL] (1) (hexFVa.wbar[$i1] * (hexFVa.h[$i1 + 1] - hexFVa.h[$i1]) + hexFVa.rhobar[$i1] * hexFVa.l * hexFVa.A * $DER.hexFVa.htilde[$i1]) - hexFVa.l * hexFVa.A * $DER.hexFVa.p = hexFVa.Q_single[$i1] ($RES_SIM_38) (60) [----] end for; (61) [FOR-] (19) ($RES_SIM_39) (61) [----] for $i1 in 1:19 loop (61) [----] [SCAL] (1) hexFVa.dMdt[$i1] = hexFVa.l * hexFVa.A * (hexFVa.drbdh[$i1] * $DER.hexFVa.htilde[$i1] + hexFVa.drbdp[$i1] * $DER.hexFVa.p) ($RES_SIM_40) (61) [----] end for; (62) [SCAL] (1) SensT_B_in.T = SensT_B_in.fluidState.T ($RES_SIM_154) (63) [SCAL] (1) $FUN_1 = abs(hexFVb.heatTransfer.w[1]) ($RES_$AUX_256) (64) [SCAL] (1) SensT_B_in.h = homotopy(if $SEV_10 then SideB_MassFlowRate.h else SensT_B_in.inlet.h_outflow, SideB_MassFlowRate.h) ($RES_SIM_156) (65) [SCAL] (1) $FUN_2 = exp(-hexFVb.heatTransfer.w_wnom / hexFVb.heatTransfer.sigma) ($RES_$AUX_255) (66) [SCAL] (1) hexFVb.Q = sum(hexFVb.heatTransfer.wall.Q) ($RES_$AUX_254) (67) [SCAL] (1) $FUN_4 = sum(hexFVb.dMdt) ($RES_$AUX_253) (68) [FOR-] (19) ($RES_$AUX_251) (68) [----] for $i1 in 1:19 loop (68) [----] [SCAL] (1) $FUN_5[$i1] = sum(hexFVb.dMdt[1:$i1 - 1]) ($RES_$AUX_252) (68) [----] end for; (69) [SCAL] (1) $FUN_6 = sum(hexFVb.rhobar) ($RES_$AUX_250) (70) [FOR-] (19) ($RES_SIM_41) (70) [----] for $i1 in 1:19 loop (70) [----] [SCAL] (1) hexFVa.rhobar[$i1] = (hexFVa.rho[$i1] + hexFVa.rho[$i1 + 1]) / 2.0 ($RES_SIM_42) (70) [----] end for; (71) [FOR-] (19) ($RES_SIM_43) (71) [----] for $i1 in 1:19 loop (71) [----] [SCAL] (1) hexFVa.drbdp[$i1] = (hexFVa.drdp[$i1] + hexFVa.drdp[$i1 + 1]) / 2.0 ($RES_SIM_44) (71) [----] end for; (72) [FOR-] (19) ($RES_SIM_45) (72) [----] for $i1 in 1:19 loop (72) [----] [SCAL] (1) hexFVa.drbdh[$i1] = (hexFVa.drdh[$i1] + hexFVa.drdh[$i1 + 1]) / 2.0 ($RES_SIM_46) (72) [----] end for; (73) [FOR-] (19) ($RES_SIM_47) (73) [----] for $i1 in 1:19 loop (73) [----] [SCAL] (1) hexFVa.vbar[$i1] = 1.0 / hexFVa.rhobar[$i1] ($RES_SIM_48) (73) [----] end for; (74) [SCAL] (1) SensT_A_in.outlet.h_outflow = SideA_InSpecEnth.offset + (if $TEV_0 then 0.0 else SideA_InSpecEnth.height) ($RES_SIM_161) (75) [FOR-] (19) ($RES_SIM_49) (75) [----] for $i1 in 1:19 loop (75) [----] [SCAL] (1) hexFVa.wbar[$i1] = SideA_MassFlowRate.w0 / hexFVa.Nt - (hexFVa.dMdt[$i1] / 2.0 + $FUN_12[$i1]) ($RES_SIM_50) (75) [----] end for; (76) [SCAL] (1) $FUN_7 = abs(hexFVa.heatTransfer.w[1]) ($RES_$AUX_249) (77) [SCAL] (1) $FUN_8 = exp(-hexFVa.heatTransfer.w_wnom / hexFVa.heatTransfer.sigma) ($RES_$AUX_248) (78) [SCAL] (1) SensT_A_in.T = SensT_A_in.fluidState.T ($RES_SIM_164) (79) [SCAL] (1) hexFVa.Q = sum(hexFVa.heatTransfer.wall.Q) ($RES_$AUX_247) (80) [SCAL] (1) $FUN_10 = sum(hexFVa.dMdt) ($RES_$AUX_246) (81) [SCAL] (1) SensT_A_in.h = homotopy(if $SEV_11 then SensT_A_in.outlet.h_outflow else SensT_A_in.inlet.h_outflow, SensT_A_in.outlet.h_outflow) ($RES_SIM_166) (82) [SCAL] (1) $FUN_11 = sum(hexFVa.vbar) ($RES_$AUX_245) (83) [FOR-] (19) ($RES_$AUX_243) (83) [----] for $i1 in 1:19 loop (83) [----] [SCAL] (1) $FUN_12[$i1] = sum(hexFVa.dMdt[1:$i1 - 1]) ($RES_$AUX_244) (83) [----] end for; (84) [SCAL] (1) $FUN_13 = sum(hexFVa.rhobar) ($RES_$AUX_242) (85) [SCAL] (1) hexFVa.Dpfric1 = homotopy(0.05263157894736842 * $FUN_11 * (hexFVa.w * sqrt(hexFVa.w * hexFVa.w + (hexFVa.wnf * hexFVa.wnom * hexFVa.wnf * hexFVa.wnom) / (hexFVa.Nt * hexFVa.Nt))) * hexFVa.Kf, (hexFVa.dpnom / (hexFVa.wnom / hexFVa.Nt)) * hexFVa.w) ($RES_SIM_53) (86) [SCAL] (1) hexFVa.Dpfric = hexFVa.Dpfric1 ($RES_SIM_54) (87) [FOR-] (19) ($RES_SIM_8) (87) [----] for $i1 in 1:19 loop (87) [----] [SCAL] (1) counterCurrentFV.side2.T[({19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1})[$i1]] = counterCurrentFV.side1.T[$i1] ($RES_SIM_9) (87) [----] end for; (88) [SCAL] (1) (hexFVa.p + hexFVa.Dpfric) - SensT_A_in.outlet.p = 0.0 ($RES_SIM_55) (89) [SCAL] (1) $FUN_10 = (SideA_MassFlowRate.w0 - ValveLin1.w) / hexFVa.Nt ($RES_SIM_56) (90) [SCAL] (1) hexFVa.Kf = (100.0 * hexFVa.omega_hyd * hexFVa.Cf) / hexFVa.A ^ 3.0 ($RES_SIM_59) (91) [SCAL] (1) ValveLin2.w = Constant1.k * ValveLin2.Kv * (hexFVb.p - SideB_FluidSink.p0) ($RES_SIM_172) (92) [SCAL] (1) SensT_A_in.fluidState.h = SensT_A_in.h ($RES_SIM_258) (93) [SCAL] (1) SensT_A_in.fluidState.d = Modelica.Media.Water.IF97_Utilities.rho_ph(SensT_A_in.outlet.p, SensT_A_in.h, 0, 0) ($RES_SIM_259) (94) [SCAL] (1) ValveLin1.w = Constant2.k * ValveLin1.Kv * (hexFVa.p - SideA_FluidSink.p0) ($RES_SIM_177) (95) [ARRY] (19) hexFVb.Q_single = hexFVb.heatTransfer.Qvol / hexFVb.Nt ($RES_BND_232) (96) [FOR-] (20) ($RES_BND_233) (96) [----] for $i1 in 1:20 loop (96) [----] [SCAL] (1) hexFVb.heatTransfer.w[$i1] = hexFVb.w ($RES_BND_234) (96) [----] end for; (97) [ARRY] (19) hexFVb.heatTransfer.Qvol = hexFVb.heatTransfer.Qw ($RES_BND_235) (98) [ARRY] (19) hexFVa.Q_single = hexFVa.heatTransfer.Qvol / hexFVa.Nt ($RES_BND_236) (99) [SCAL] (1) hexFVa.Cf = hexFVa.Cfnom * hexFVa.Kfc ($RES_SIM_60) (100) [FOR-] (20) ($RES_BND_237) (100) [----] for $i1 in 1:20 loop (100) [----] [SCAL] (1) hexFVa.heatTransfer.w[$i1] = hexFVa.w ($RES_BND_238) (100) [----] end for; (101) [SCAL] (1) hexFVa.omega_hyd = (4.0 * hexFVa.A) / hexFVa.Dhyd ($RES_SIM_61) (102) [FOR-] (19) ($RES_SIM_101) (102) [----] for $i1 in 1:19 loop (102) [----] [SCAL] (1) hexFVb.rhobar[$i1] = (hexFVb.rho[$i1] + hexFVb.rho[$i1 + 1]) / 2.0 ($RES_SIM_102) (102) [----] end for; (103) [SCAL] (1) SensT_A_in.fluidState.T = Modelica.Media.Water.IF97_Utilities.T_ph(SensT_A_in.outlet.p, SensT_A_in.h, 0, 0) ($RES_SIM_260) (104) [SCAL] (1) SensT_A_in.fluidState.p = SensT_A_in.outlet.p ($RES_SIM_261) (105) [ARRY] (19) hexFVa.heatTransfer.Qvol = hexFVa.heatTransfer.Qw ($RES_BND_239) (106) [ARRY] (19) hexFVa.heatTransfer.Qw = hexFVa.heatTransfer.wall.Q ($RES_SIM_63) (107) [FOR-] (19) ($RES_SIM_103) (107) [----] for $i1 in 1:19 loop (107) [----] [SCAL] (1) hexFVb.drbdp[$i1] = (hexFVb.drdp[$i1] + hexFVb.drdp[$i1 + 1]) / 2.0 ($RES_SIM_104) (107) [----] end for; (108) [ARRY] (19) hexFVa.heatTransfer.Tw = hexFVa.heatTransfer.wall.T ($RES_SIM_64) (109) [SCAL] (1) SensT_B_in.fluidState.h = SensT_B_in.h ($RES_SIM_263) (110) [FOR-] (20) ($RES_SIM_65) (110) [----] for $i1 in 1:20 loop (110) [----] [SCAL] (1) hexFVa.heatTransfer.T[$i1] = hexFVa.heatTransfer.fluidState.h ($RES_SIM_66) (110) [----] end for; (111) [FOR-] (19) ($RES_SIM_105) (111) [----] for $i1 in 1:19 loop (111) [----] [SCAL] (1) hexFVb.drbdh[$i1] = (hexFVb.drdh[$i1] + hexFVb.drdh[$i1 + 1]) / 2.0 ($RES_SIM_106) (111) [----] end for; (112) [SCAL] (1) SensT_B_in.fluidState.d = Modelica.Media.Water.IF97_Utilities.rho_ph(hexFVb.infl.p, SensT_B_in.h, 0, 0) ($RES_SIM_264) (113) [SCAL] (1) SensT_B_in.fluidState.T = Modelica.Media.Water.IF97_Utilities.T_ph(hexFVb.infl.p, SensT_B_in.h, 0, 0) ($RES_SIM_265) (114) [FOR-] (19) ($RES_SIM_67) (114) [----] for $i1 in 1:19 loop (114) [----] [SCAL] (1) hexFVa.heatTransfer.Tvol[$i1] = if not hexFVa.heatTransfer.useAverageTemperature then hexFVa.heatTransfer.T[$i1 + 1] else if not hexFVa.heatTransfer.adaptiveAverageTemperature then (hexFVa.heatTransfer.T[$i1] + hexFVa.heatTransfer.T[$i1 + 1]) / 2.0 else (hexFVa.heatTransfer.T[$i1] + hexFVa.heatTransfer.T[$i1 + 1]) / 2.0 + ((hexFVa.heatTransfer.T[$i1 + 1] - hexFVa.heatTransfer.T[$i1]) / 2.0) * $FUN_8 ($RES_SIM_68) (114) [----] end for; (115) [FOR-] (19) ($RES_SIM_107) (115) [----] for $i1 in 1:19 loop (115) [----] [SCAL] (1) hexFVb.vbar[$i1] = 1.0 / hexFVb.rhobar[$i1] ($RES_SIM_108) (115) [----] end for; (116) [SCAL] (1) SensT_B_in.fluidState.p = hexFVb.infl.p ($RES_SIM_266) (117) [FOR-] (19) ($RES_SIM_69) (117) [----] for $i1 in 1:19 loop (117) [----] [SCAL] (1) hexFVa.heatTransfer.Qw[$i1] = hexFVa.heatTransfer.gamma * hexFVa.heatTransfer.kc * hexFVa.heatTransfer.l * hexFVa.heatTransfer.omega * (hexFVa.heatTransfer.Tw[$i1] - hexFVa.heatTransfer.Tvol[$i1]) * hexFVa.heatTransfer.Nt ($RES_SIM_70) (117) [----] end for; (118) [FOR-] (19) ($RES_SIM_109) (118) [----] for $i1 in 1:19 loop (118) [----] [SCAL] (1) hexFVb.wbar[$i1] = SideB_MassFlowRate.w0 / hexFVb.Nt - (hexFVb.dMdt[$i1] / 2.0 + $FUN_5[$i1]) ($RES_SIM_110) (118) [----] end for; (119) [SCAL] (1) SensT_A_out.fluidState.h = SensT_A_out.h ($RES_SIM_268) (120) [SCAL] (1) SensT_A_out.fluidState.d = Modelica.Media.Water.IF97_Utilities.rho_ph(SideA_FluidSink.p0, SensT_A_out.h, 0, 0) ($RES_SIM_269) (121) [ARRY] (100) hexFVb.heatTransfer.fluidState = hexFVb.fluidState ($RES_BND_240) (122) [ARRY] (100) hexFVa.heatTransfer.fluidState = hexFVa.fluidState ($RES_BND_241) (123) [SCAL] (1) hexFVa.heatTransfer.w_wnom = $FUN_7 / hexFVa.heatTransfer.wnom ($RES_SIM_71) (124) [SCAL] (1) SensT_A_out.fluidState.T = Modelica.Media.Water.IF97_Utilities.T_ph(SideA_FluidSink.p0, SensT_A_out.h, 0, 0) ($RES_SIM_270) (125) [SCAL] (1) hexFVb.Tr = noEvent(hexFVb.M / max(hexFVb.w, 1e-15)) ($RES_SIM_73) (126) [SCAL] (1) hexFVb.Mtot = hexFVb.M * hexFVb.Nt ($RES_SIM_74) (127) [SCAL] (1) hexFVb.Dpfric = 0.0 ($RES_SIM_114) (128) [SCAL] (1) SensT_B_out.fluidState.h = SensT_B_out.h ($RES_SIM_273) (129) [SCAL] (1) hexFVb.M = hexFVb.A * $FUN_6 * hexFVb.l ($RES_SIM_75) (130) [SCAL] (1) (hexFVb.p + hexFVb.Dpfric) - hexFVb.infl.p = 0.0 ($RES_SIM_115) (131) [SCAL] (1) SensT_B_out.fluidState.d = Modelica.Media.Water.IF97_Utilities.rho_ph(SideB_FluidSink.p0, SensT_B_out.h, 0, 0) ($RES_SIM_274) (132) [SCAL] (1) $FUN_4 = (SideB_MassFlowRate.w0 - ValveLin2.w) / hexFVb.Nt ($RES_SIM_116) (133) [SCAL] (1) SensT_B_out.fluidState.T = Modelica.Media.Water.IF97_Utilities.T_ph(SideB_FluidSink.p0, SensT_B_out.h, 0, 0) ($RES_SIM_275) (134) [ARRY] (19) hexFVb.h[2:20] = hexFVb.htilde ($RES_SIM_77) (135) [SCAL] (1) hexFVb.h[1] = SideB_MassFlowRate.h ($RES_SIM_78) (136) [FOR-] (20) ($RES_SIM_277) (136) [----] for $i1 in 1:20 loop (136) [----] [SCAL] (1) hexFVb.fluidState[$i1].phase = 0 ($RES_SIM_278) (136) [----] end for; (137) [SCAL] (1) SensT_B_out.outlet.h_outflow = hexFVb.htilde[19] ($RES_SIM_79) (138) [FOR-] (20) ($RES_SIM_279) (138) [----] for $i1 in 1:20 loop (138) [----] [SCAL] (1) hexFVb.fluidState[$i1].h = hexFVb.h[$i1] ($RES_SIM_280) (138) [----] end for;