Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A.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.TestGasFlow1DFV_A,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A") translateModel(ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00119/0.00119, allocations: 102.7 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.001171/0.001171, 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.336/1.336, 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.2756/0.2756, allocations: 48.85 MB / 320.6 MB, free: 11.09 MB / 270.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.05e-05/2.052e-05, allocations: 3.047 kB / 390.8 MB, free: 48.85 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A): time 0.4435/0.4436, allocations: 195.8 MB / 0.5728 GB, free: 5.664 MB / 414.1 MB Notification: Performance of NFInst.instExpressions: time 0.009335/0.453, allocations: 5.099 MB / 0.5778 GB, free: 5.551 MB / 414.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001105/0.4541, allocations: 16.69 kB / 0.5778 GB, free: 5.551 MB / 414.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001191/0.4553, allocations: 374.7 kB / 0.5782 GB, free: 5.547 MB / 414.1 MB Notification: Performance of NFTyping.typeBindings: time 0.002497/0.4579, allocations: 0.8813 MB / 0.579 GB, free: 5.508 MB / 414.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.00282/0.4607, allocations: 0.9965 MB / 0.58 GB, free: 5.477 MB / 414.1 MB Notification: Performance of NFFlatten.flatten: time 0.003722/0.4645, allocations: 2.93 MB / 0.5829 GB, free: 5.457 MB / 414.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0008596/0.4653, allocations: 0.5883 MB / 0.5834 GB, free: 5.41 MB / 414.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001702/0.467, allocations: 0.9828 MB / 0.5844 GB, free: 5.371 MB / 414.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0007836/0.4678, allocations: 0.7047 MB / 0.5851 GB, free: 5.273 MB / 414.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001278/0.468, allocations: 85.78 kB / 0.5852 GB, free: 5.273 MB / 414.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0009753/0.469, allocations: 355 kB / 0.5855 GB, free: 5.266 MB / 414.1 MB Notification: Performance of combineBinaries: time 0.001181/0.4702, allocations: 1.658 MB / 0.5871 GB, free: 4.57 MB / 414.1 MB Notification: Performance of replaceArrayConstructors: time 0.0005809/0.4707, allocations: 1.033 MB / 0.5881 GB, free: 4.02 MB / 414.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0002315/0.471, allocations: 156.7 kB / 0.5883 GB, free: 3.992 MB / 414.1 MB Notification: Performance of FrontEnd: time 0.0001822/0.4712, allocations: 22.88 kB / 0.5883 GB, free: 3.988 MB / 414.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 (157) * Number of variables: 517 (160) Notification: Performance of Bindings: time 0.003857/0.475, allocations: 4.524 MB / 0.5927 GB, free: 2.285 MB / 414.1 MB Notification: Performance of FunctionAlias: time 0.000342/0.4754, allocations: 276.8 kB / 0.593 GB, free: 2.227 MB / 414.1 MB Notification: Performance of Early Inline: time 0.0006976/0.4761, allocations: 0.629 MB / 0.5936 GB, free: 2.117 MB / 414.1 MB Notification: Performance of simplify1: time 0.0001293/0.4762, allocations: 133.9 kB / 0.5937 GB, free: 2.117 MB / 414.1 MB Notification: Performance of Alias: time 0.002964/0.4792, allocations: 2.863 MB / 0.5965 GB, free: 1 MB / 414.1 MB Notification: Performance of simplify2: time 0.0001006/0.4793, allocations: 99.72 kB / 0.5966 GB, free: 0.9648 MB / 414.1 MB Notification: Performance of Events: time 0.0008123/0.4801, allocations: 0.6823 MB / 0.5973 GB, free: 0.6094 MB / 414.1 MB Notification: Performance of Detect States: time 0.0006564/0.4808, allocations: 0.7496 MB / 0.598 GB, free: 124 kB / 414.1 MB Notification: Performance of Partitioning: time 0.001014/0.4818, allocations: 0.9718 MB / 0.599 GB, free: 15.44 MB / 430.1 MB Error: Internal error NBSlice.getDependentCrefIndicesPseudoFor failed because number of flattened indices 9 differ from equation size 54. Error: Internal error NBAdjacency.Matrix.createPseudo failed for [FOR-] (54) ($RES_SIM_52) [----] for j in 1:9 loop [----] [-IF-] (6)if $SEV_5[j] then [----] [----] [SCAL] (1) hex.drbdX2[j, :] = hex.dddX[j + 1, :] ($RES_SIM_54) [----] [----] [SCAL] (1) hex.drbdX1[j, :] = {0.0 for $i1 in 1:1} ($RES_SIM_55) [----] [----] [SCAL] (1) hex.drbdT2[j] = hex.dddT[j + 1] ($RES_SIM_56) [----] [----] [SCAL] (1) hex.drbdT1[j] = 0.0 ($RES_SIM_57) [----] [----] [SCAL] (1) hex.drbdp[j] = hex.dddp[j + 1] ($RES_SIM_58) [----] [----] [SCAL] (1) hex.rhobar[j] = hex.gas[j + 1].d ($RES_SIM_59) [----] [----] else [----] [----] [SCAL] (1) hex.drbdX2[j, :] = hex.dddX[j + 1, :] / 2.0 ($RES_SIM_60) [----] [----] [SCAL] (1) hex.drbdX1[j, :] = hex.dddX[j, :] / 2.0 ($RES_SIM_61) [----] [----] [SCAL] (1) hex.drbdT2[j] = hex.dddT[j + 1] / 2.0 ($RES_SIM_62) [----] [----] [SCAL] (1) hex.drbdT1[j] = hex.dddT[j] / 2.0 ($RES_SIM_63) [----] [----] [SCAL] (1) hex.drbdp[j] = (hex.dddp[j] + hex.dddp[j + 1]) / 2.0 ($RES_SIM_64) [----] [----] [SCAL] (1) hex.rhobar[j] = (hex.gas[j].d + hex.gas[j + 1].d) / 2.0 ($RES_SIM_65) [----] [----] end if; [----] end for; Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (95/531) *************************** (1) [ALGB] (1) Real hex.gas.state.p (start = {1e6 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e8 for $i1 in 1:10}, nominal = {1e6 for $i1 in 1:10}) (2) [DISC] (1) Boolean $SEV_34 (3) [ALGB] (1) Real SensT2.gas.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - SensT2.gas.T_degC)) (4) [ALGB] (10) Real[10] hex.gas.u (min = {-1e8 for $i1 in 1:10}, max = {1e8 for $i1 in 1:10}, nominal = {1e6 for $i1 in 1:10}) (5) [ALGB] (1) Real hex.omega_hyd (6) [ALGB] (10) Real[10] hex.gas.p (min = {0.0 for $i1 in 1:10}, nominal = {1e5 for $i1 in 1:10}, StateSelect = default) (7) [ALGB] (9) protected Real[9] hex.cvbar (start = {1000.0 for $i1 in 1:9}, min = {0.0 for $i1 in 1:9}, max = {1e7 for $i1 in 1:9}, nominal = {1000.0 for $i1 in 1:9}) (8) [ALGB] (9) Real[9] hex.heatTransfer.Qvol (9) [ALGB] (10) protected Real[10] hex.dddp (10) [DISC] (10) Boolean[10] $SEV_11[$i1] (11) [ALGB] (10) Real[10] hex.gas.h (12) [DISC] (10) Boolean[10, 1] $SEV_9[$i1, i] (13) [ALGB] (9) Real[9] hex.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}) (14) [ALGB] (9) protected Real[9, 1] hex.drbdX2 (15) [ALGB] (9) protected Real[9, 1] hex.drbdX1 (16) [ALGB] (1) Real hex.Kf (17) [ALGB] (10) Real[10] hex.gas.d (start = {10.0 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e5 for $i1 in 1:10}, nominal = {10.0 for $i1 in 1:10}) (18) [ALGB] (9) flow Real[9] hex.heatTransfer.wall.Q (19) [ALGB] (10) Real[10] hex.gas.T_degC = {Modelica.SIunits.Conversions.to_degC(hex.gas[$gas1].T) for $gas1 in 1:10} (20) [ALGB] (9) protected Real[9] hex.drbdT2 (21) [ALGB] (9) protected Real[9] hex.drbdT1 (22) [ALGB] (1) Real hex.gas.state.T (start = {500.0 for $i1 in 1:10}, min = {200.0 for $i1 in 1:10}, max = {6000.0 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (23) [ALGB] (10) Real[10] hex.heatTransfer.T (start = {500.0 for $i1 in 1:10}, min = {200.0 for $i1 in 1:10}, max = {6000.0 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (24) [ALGB] (1) Real SensT1.gas.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - SensT1.gas.T_degC)) (25) [ALGB] (9) protected Real[9] hex.drbdp (26) [ALGB] (1) Real Step1.y (27) [DER-] (9) Real[9] $DER.hex.Ttilde (28) [ALGB] (10) final input Real[10] hex.heatTransfer.fluidState.p = {hex.gas[1].state.p, hex.gas[2].state.p, hex.gas[3].state.p, hex.gas[4].state.p, hex.gas[5].state.p, hex.gas[6].state.p, hex.gas[7].state.p, hex.gas[8].state.p, hex.gas[9].state.p, hex.gas[10].state.p} (start = {1e6 for $i1 in 1:10}, min = {0.0 for $i1 in 1:10}, max = {1e8 for $i1 in 1:10}, nominal = {1e6 for $i1 in 1:10}) (29) [ALGB] (1) Real Mhex (min = 0.0) (30) [ALGB] (1) Real $FUN_8 (31) [ALGB] (9) Real[9] $FUN_7 (32) [ALGB] (1) Real $FUN_5 (33) [ALGB] (1) Real hex.Mtot (min = 0.0) (34) [ALGB] (9) protected Real[9] hex.dMdt (35) [ALGB] (10) protected Real[10, 1] hex.dddX (36) [ALGB] (1) Real $FUN_4 (37) [ALGB] (10) Real[10] hex.gas.R (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}) (38) [DISC] (10) Boolean[10] $SEV_4[j] (39) [ALGB] (1) Real Source.gas.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - Source.gas.T_degC)) (40) [ALGB] (10) protected Real[10] hex.dddT (41) [DISC] (10) Boolean[10, 1] $SEV_8[$i1, i] (42) [DISC] (9) Boolean[9] $SEV_5[j] (43) [DER-] (1) Real $DER.hex.p (44) [ALGB] (1) Real hex.Kfl (45) [ALGB] (1) Real gamma = ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A.Medium.specificHeatCapacityCp(hex.gas[1].state) / ThermoPower.Test.DistributedParameterComponents.TestGasFlow1DFV_A.Medium.specificHeatCapacityCv(hex.gas[1].state) (46) [ALGB] (1) Real hex.Tin (start = hex.Tstartin, min = 200.0, max = 6000.0, nominal = 500.0) (47) [ALGB] (1) Real hex.w (start = hex.wnom / hex.Nt, min = -1e5, max = 1e5) (48) [ALGB] (10) Real[10] hex.u (49) [ALGB] (10) final input Real[10] hex.heatTransfer.fluidState.T = {hex.gas[1].state.T, hex.gas[2].state.T, hex.gas[3].state.T, hex.gas[4].state.T, hex.gas[5].state.T, hex.gas[6].state.T, hex.gas[7].state.T, hex.gas[8].state.T, hex.gas[9].state.T, hex.gas[10].state.T} (start = {500.0 for $i1 in 1:10}, min = {200.0 for $i1 in 1:10}, max = {6000.0 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (50) [ALGB] (1) stream Real SensT1.inlet.h_outflow (start = 309498.4543111511, min = -1e10, max = 1e10, nominal = 1e5) (51) [ALGB] (9) flow Real[9] heatSource.wall.Q (52) [ALGB] (10) final Real[10] hex.heatTransfer.w (min = {-1e5 for $i1 in 1:10}, max = {1e5 for $i1 in 1:10}) (53) [ALGB] (1) Real Source.gas.d (start = 10.0, min = 0.0, max = 1e5, nominal = 10.0) (54) [ALGB] (1) Real dMtot_dp = hex.Mtot / (gamma * hex.p) (55) [ALGB] (9) Real[9] heatSource.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}) (56) [ALGB] (9) Real[9] hex.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}) (57) [DISC] (10) Boolean[10] $SEV_13[$i1] (58) [DER-] (1) Real $DER.Mbal (59) [ALGB] (10) Real[10] hex.h (start = {309498.4543111511 for $i1 in 1:10}, min = {-1e10 for $i1 in 1:10}, max = {1e10 for $i1 in 1:10}, nominal = {1e5 for $i1 in 1:10}) (60) [DER-] (10) Real[10, 1] $DER.hex.gas.X (61) [ALGB] (9) flow Real[9] hex.wall.Q (62) [DER-] (10) Real[10] $DER.hex.gas.T (63) [ALGB] (1) Real Source.gas.p_bar = Modelica.SIunits.Conversions.to_bar(-99999.99999999999 * Source.gas.p_bar) (64) [ALGB] (9) protected Real[9] hex.vbar (min = {0.0 for $i1 in 1:9}) (65) [DISC] (10) Boolean[10, 1] $SEV_10[$i1, i] (66) [ALGB] (1) Real SensT1.gas.d (start = 10.0, min = 0.0, max = 1e5, nominal = 10.0) (67) [ALGB] (9) Real[9] hex.heatTransfer.Qw (68) [ALGB] (9) Real[9] hex.wbar (start = {hex.wnom / hex.Nt for $wbar1 in 1:9}, min = {-1e5 for $i1 in 1:9}, max = {1e5 for $i1 in 1:9}) (69) [ALGB] (1) Real tau = dMtot_dp / valve.Kv (70) [ALGB] (1) Real Source.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (71) [ALGB] (1) Real Merr (min = -1e9) (72) [ALGB] (1) Real SensT1.gas.h (73) [ALGB] (1) Real Step2.y (74) [ALGB] (9) protected Real[9] hex.rhobar (start = {10.0 for $i1 in 1:9}, min = {0.0 for $i1 in 1:9}, max = {1e5 for $i1 in 1:9}, nominal = {10.0 for $i1 in 1:9}) (75) [ALGB] (10) Real[10] hex.T (start = {hex.Tstart[$T1] for $T1 in 1:10}, min = {200.0 for $i1 in 1:10}, max = {6000.0 for $i1 in 1:10}, nominal = {500.0 for $i1 in 1:10}) (76) [DISC] (1) Boolean $SEV_6 (77) [ALGB] (1) stream Real hex.outfl.h_outflow (start = 309498.4543111511, min = -1e10, max = 1e10, nominal = 1e5) (78) [ALGB] (1) Real hex.Q (79) [ALGB] (1) Real valve.w (min = -1e5, max = 1e5) (80) [ALGB] (1) Real hex.Tr (81) [ALGB] (1) Real SensT2.gas.d (start = 10.0, min = 0.0, max = 1e5, nominal = 10.0) (82) [ALGB] (1) Real SensT1.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (83) [DISC] (1) Boolean $TEV_2 (84) [ALGB] (1) Real hex.Dpfric (85) [ALGB] (1) Real SensT2.gas.h (86) [DISC] (1) Boolean $TEV_1 (87) [DISC] (1) Boolean $TEV_0 (88) [ALGB] (1) stream Real SensT1.outlet.h_outflow (start = 309498.4543111511, min = -1e10, max = 1e10, nominal = 1e5) (89) [ALGB] (10) protected Real[10] hex.cv (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}) (90) [DISC] (10) Boolean[10] $SEV_12[$i1] (91) [ALGB] (9) Real[9] hex.heatTransfer.Tw (start = {500.0 for $i1 in 1:9}, min = {200.0 for $i1 in 1:9}, max = {6000.0 for $i1 in 1:9}, nominal = {500.0 for $i1 in 1:9}) (92) [ALGB] (10) Real[10] hex.gas.p_bar = {Modelica.SIunits.Conversions.to_bar(hex.gas[$gas1].p) for $gas1 in 1:10} (93) [ALGB] (9) Real[9] hex.Q_single (94) [ALGB] (1) Real SensT2.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (95) [DISC] (10) Boolean[10] $SEV_7[$i1] System Equations (92/529) *************************** (1) [FOR-] (9) ($RES_SIM_50) (1) [----] for j in 1:9 loop (1) [----] [SCAL] (1) hex.dMdt[j] = hex.l * hex.A * (vector(hex.drbdX1[j, :]) * vector($DER.hex.gas[j].X) + hex.drbdT2[j] * $DER.hex.gas[j + 1].T + hex.drbdT1[j] * $DER.hex.gas[j].T + hex.drbdp[j] * $DER.hex.p + vector(hex.drbdX2[j, :]) * vector($DER.hex.gas[j + 1].X)) ($RES_SIM_51) (1) [----] end for; (2) [SCAL] (1) valve.w = Step2.y * valve.Kv * (hex.p - Sink.p0) ($RES_SIM_16) (3) [FOR-] (54) ($RES_SIM_52) (3) [----] for j in 1:9 loop (3) [----] [-IF-] (6)if $SEV_5[j] then (3) [----] [----] [SCAL] (1) hex.drbdX2[j, :] = hex.dddX[j + 1, :] ($RES_SIM_54) (3) [----] [----] [SCAL] (1) hex.drbdX1[j, :] = {0.0 for $i1 in 1:1} ($RES_SIM_55) (3) [----] [----] [SCAL] (1) hex.drbdT2[j] = hex.dddT[j + 1] ($RES_SIM_56) (3) [----] [----] [SCAL] (1) hex.drbdT1[j] = 0.0 ($RES_SIM_57) (3) [----] [----] [SCAL] (1) hex.drbdp[j] = hex.dddp[j + 1] ($RES_SIM_58) (3) [----] [----] [SCAL] (1) hex.rhobar[j] = hex.gas[j + 1].d ($RES_SIM_59) (3) [----] [----] else (3) [----] [----] [SCAL] (1) hex.drbdX2[j, :] = hex.dddX[j + 1, :] / 2.0 ($RES_SIM_60) (3) [----] [----] [SCAL] (1) hex.drbdX1[j, :] = hex.dddX[j, :] / 2.0 ($RES_SIM_61) (3) [----] [----] [SCAL] (1) hex.drbdT2[j] = hex.dddT[j + 1] / 2.0 ($RES_SIM_62) (3) [----] [----] [SCAL] (1) hex.drbdT1[j] = hex.dddT[j] / 2.0 ($RES_SIM_63) (3) [----] [----] [SCAL] (1) hex.drbdp[j] = (hex.dddp[j] + hex.dddp[j + 1]) / 2.0 ($RES_SIM_64) (3) [----] [----] [SCAL] (1) hex.rhobar[j] = (hex.gas[j].d + hex.gas[j + 1].d) / 2.0 ($RES_SIM_65) (3) [----] [----] end if; (3) [----] end for; (4) [FOR-] (10) ($RES_BND_221) (4) [----] for $gas1 in 1:10 loop (4) [----] [SCAL] (1) hex.gas[$gas1].p_bar = hex.gas[$gas1].p / 1e5 ($RES_BND_222) (4) [----] end for; (5) [FOR-] (10) ($RES_SIM_90) (5) [----] for $i1 in 1:10 loop (5) [----] [SCAL] (1) hex.gas[$i1].d = hex.gas[$i1].p / (hex.gas[$i1].T * hex.gas[$i1].R) ($RES_SIM_91) (5) [----] end for; (6) [FOR-] (10) ($RES_BND_224) (6) [----] for $gas1 in 1:10 loop (6) [----] [SCAL] (1) hex.gas[$gas1].T_degC = hex.gas[$gas1].T - 273.15 ($RES_BND_225) (6) [----] end for; (7) [FOR-] (10) ($RES_SIM_92) (7) [----] for $i1 in 1:10 loop (7) [----] [SCAL] (1) hex.gas[$i1].u = hex.gas[$i1].h - hex.gas[$i1].R * hex.gas[$i1].T ($RES_SIM_93) (7) [----] end for; (8) [FOR-] (10) ($RES_SIM_94) (8) [----] for $i1 in 1:10 loop (8) [----] [SCAL] (1) hex.gas[$i1].h = Modelica.Media.IdealGases.Common.Functions.h_T(Modelica.Media.IdealGases.Common.DataRecord("N2", 0.0280134, 0.0, 309498.4543111511, 1000.0, {22103.71497, -381.846182, 6.08273836, -0.00853091441, 1.384646189e-5, -9.62579362e-9, 2.519705809e-12}, {710.846086, -10.76003744}, {587712.406, -2239.249073, 6.06694922, -6.1396855e-4, 1.491806679e-7, -1.923105485e-11, 1.061954386e-15}, {12832.10415, -15.86640027}, 296.8033869505308), hex.gas[$i1].T, true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_95) (8) [----] end for; (9) [ARRY] (10) hex.gas.R = {296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308, 296.8033869505308} ($RES_SIM_96) (10) [SCAL] (1) $TEV_0 = time < Step2.startTime ($RES_EVT_255) (11) [SCAL] (1) $TEV_1 = time < Step4.startTime ($RES_EVT_256) (12) [SCAL] (1) $TEV_2 = time < Step1.startTime ($RES_EVT_257) (13) [SCAL] (1) hex.heatTransfer.Qw = hex.heatTransfer.wall.Q ($RES_SIM_101) (14) [SCAL] (1) hex.Tr = noEvent(Mhex / max(Source.w0 / hex.Nt, 1e-15)) ($RES_SIM_20) (15) [SCAL] (1) hex.heatTransfer.Tw = hex.heatTransfer.wall.T ($RES_SIM_102) (16) [SCAL] (1) hex.Mtot = Mhex * hex.Nt ($RES_SIM_21) (17) [FOR-] (10) ($RES_SIM_103) (17) [----] for j in 1:10 loop (17) [----] [SCAL] (1) hex.heatTransfer.T[j] = hex.heatTransfer.fluidState.p ($RES_SIM_104) (17) [----] end for; (18) [SCAL] (1) Mhex = hex.A * $FUN_8 * hex.l ($RES_SIM_22) (19) [SCAL] (1) hex.Tin = hex.gas[1].T ($RES_SIM_23) (20) [FOR-] (9) ($RES_SIM_105) (20) [----] for j in 1:9 loop (20) [----] [SCAL] (1) hex.heatTransfer.wall.T[j] = hex.heatTransfer.T[j + 1] ($RES_SIM_106) (20) [----] end for; (21) [SCAL] (1) hex.gas[2:10].T = hex.Ttilde ($RES_SIM_24) (22) [SCAL] (1) hex.gas[1].h = SensT1.outlet.h_outflow ($RES_SIM_25) (23) [SCAL] (1) SensT1.gas.d = (0.0033692337889886454 * (99999.99999999999 * Source.gas.p_bar)) / ((-273.15) - SensT1.gas.T_degC) ($RES_SIM_142) (24) [ARRY] (9) hex.heatTransfer.Qvol = hex.heatTransfer.Qw ($RES_SIM_107) (25) [SCAL] (1) hex.outfl.h_outflow = hex.gas[10].h ($RES_SIM_26) (26) [SCAL] (1) SensT1.gas.u = 296.8033869505308 * ((-273.15) - SensT1.gas.T_degC) + SensT1.gas.h ($RES_SIM_143) (27) [ARRY] (10) hex.heatTransfer.w = hex.w * fill(1.0, 10) ($RES_SIM_108) (28) [SCAL] (1) SensT1.inlet.h_outflow = hex.gas[1].h ($RES_SIM_27) (29) [SCAL] (1) SensT1.gas.h = Modelica.Media.IdealGases.Common.Functions.h_T(Modelica.Media.IdealGases.Common.DataRecord("N2", 0.0280134, 0.0, 309498.4543111511, 1000.0, {22103.71497, -381.846182, 6.08273836, -0.00853091441, 1.384646189e-5, -9.62579362e-9, 2.519705809e-12}, {710.846086, -10.76003744}, {587712.406, -2239.249073, 6.06694922, -6.1396855e-4, 1.491806679e-7, -1.923105485e-11, 1.061954386e-15}, {12832.10415, -15.86640027}, 296.8033869505308), -((-273.15) - SensT1.gas.T_degC), true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_144) (30) [ARRY] (20) hex.heatTransfer.fluidState = hex.gas.state ($RES_SIM_109) (31) [SCAL] (1) hex.w = Source.w0 / hex.Nt ($RES_SIM_28) (32) [SCAL] (1) Source.gas.d = (0.0033692337889886454 * (99999.99999999999 * Source.gas.p_bar)) / ((-273.15) - Source.gas.T_degC) ($RES_SIM_180) (33) [SCAL] (1) Source.gas.u = 296.8033869505308 * ((-273.15) - Source.gas.T_degC) + SensT1.outlet.h_outflow ($RES_SIM_181) (34) [SCAL] (1) SensT1.outlet.h_outflow = Modelica.Media.IdealGases.Common.Functions.h_T(Modelica.Media.IdealGases.Common.DataRecord("N2", 0.0280134, 0.0, 309498.4543111511, 1000.0, {22103.71497, -381.846182, 6.08273836, -0.00853091441, 1.384646189e-5, -9.62579362e-9, 2.519705809e-12}, {710.846086, -10.76003744}, {587712.406, -2239.249073, 6.06694922, -6.1396855e-4, 1.491806679e-7, -1.923105485e-11, 1.061954386e-15}, {12832.10415, -15.86640027}, 296.8033869505308), -((-273.15) - Source.gas.T_degC), true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_182) (35) [FOR-] (9) ($RES_SIM_66) (35) [----] for j in 1:9 loop (35) [----] [SCAL] (1) hex.vbar[j] = 1.0 / hex.rhobar[j] ($RES_SIM_67) (35) [----] end for; (36) [FOR-] (9) ($RES_SIM_68) (36) [----] for j in 1:9 loop (36) [----] [SCAL] (1) hex.wbar[j] = Source.w0 / hex.Nt - (hex.dMdt[j] / 2.0 + $FUN_7[integer(1.0 + ((-1.0) + j))]) ($RES_SIM_69) (36) [----] end for; (37) [FOR-] (10) ($RES_EVT_262) (37) [----] for j in 1:10 loop (37) [----] [SCAL] (1) $SEV_4[j] = hex.gas.state.T < 1000.0 ($RES_EVT_263) (37) [----] end for; (38) [SCAL] (1) $SEV_34 = hex.gas.state.T < 1000.0 ($RES_EVT_301) (39) [FOR-] (9) ($RES_EVT_264) (39) [----] for j in 1:9 loop (39) [----] [SCAL] (1) $SEV_5[j] = j == 1 ($RES_EVT_265) (39) [----] end for; (40) [SCAL] (1) $SEV_6 = hex.Kf >= 0.0 ($RES_EVT_266) (41) [FOR-] (10) ($RES_EVT_267) (41) [----] for $i1 in 1:10 loop (41) [----] [SCAL] (1) $SEV_7[$i1] = hex.gas[$i1].p >= 0.0 ($RES_EVT_268) (41) [----] end for; (42) [FOR-] (10) ($RES_SIM_30) (42) [----] for j in 1:10 loop (42) [----] [SCAL] (1) hex.cv[j] = smooth(0, if $SEV_4[j] then 296.8033869505308 * (1.0 / (hex.gas.state.T * hex.gas.state.T) * (22103.71497 + hex.gas.state.T * ((-381.846182) + hex.gas.state.T * (6.08273836 + hex.gas.state.T * ((-0.00853091441) + hex.gas.state.T * (1.384646189e-5 + hex.gas.state.T * ((-9.62579362e-9) + 2.519705809e-12 * hex.gas.state.T))))))) else 296.8033869505308 * (1.0 / (hex.gas.state.T * hex.gas.state.T) * (587712.406 + hex.gas.state.T * ((-2239.249073) + hex.gas.state.T * (6.06694922 + hex.gas.state.T * ((-6.1396855e-4) + hex.gas.state.T * (1.491806679e-7 + hex.gas.state.T * ((-1.923105485e-11) + 1.061954386e-15 * hex.gas.state.T)))))))) - 296.8033869505308 ($RES_SIM_31) (42) [----] end for; (43) [FOR-] (10) ($RES_EVT_269) (43) [----] for {$i1 in 1:10, i in 1:1} loop (43) [----] [SCAL] (1) $SEV_8[$i1, i] = hex.gas[$i1].X[i] >= (-1e-5) ($RES_EVT_270) (43) [----] end for; (44) [FOR-] (10) ($RES_SIM_32) (44) [----] for j in 1:10 loop (44) [----] [SCAL] (1) hex.dddT[j] = -hex.gas.state.p / (hex.gas.state.T * hex.gas.state.T * 296.8033869505308) ($RES_SIM_33) (44) [----] end for; (45) [FOR-] (10) ($RES_SIM_34) (45) [----] for j in 1:10 loop (45) [----] [SCAL] (1) hex.dddp[j] = 1.0 / (hex.gas.state.T * 296.8033869505308) ($RES_SIM_35) (45) [----] end for; (46) [FOR-] (9) ($RES_SIM_70) (46) [----] for j in 1:9 loop (46) [----] [SCAL] (1) hex.cvbar[j] = (hex.cv[j] + hex.cv[j + 1]) / 2.0 ($RES_SIM_71) (46) [----] end for; (47) [FOR-] (10) ($RES_SIM_36) (47) [----] for j in 1:10 loop (47) [----] [SCAL] (1) hex.dddX[j, :] = fill(0.0, 1) ($RES_SIM_37) (47) [----] end for; (48) [SCAL] (1) 99999.99999999999 * Source.gas.p_bar + hex.p + hex.Dpfric = 0.0 ($RES_SIM_73) (49) [FOR-] (10) ($RES_SIM_38) (49) [----] for j in 1:10 loop (49) [----] [SCAL] (1) hex.u[j] = hex.w / (hex.A * hex.gas[j].d) ($RES_SIM_39) (49) [----] end for; (50) [SCAL] (1) gamma = smooth(0, if $SEV_34 then 296.8033869505308 * (1.0 / (hex.gas.state.T * hex.gas.state.T) * (22103.71497 + hex.gas.state.T * ((-381.846182) + hex.gas.state.T * (6.08273836 + hex.gas.state.T * ((-0.00853091441) + hex.gas.state.T * (1.384646189e-5 + hex.gas.state.T * ((-9.62579362e-9) + 2.519705809e-12 * hex.gas.state.T))))))) else 296.8033869505308 * (1.0 / (hex.gas.state.T * hex.gas.state.T) * (587712.406 + hex.gas.state.T * ((-2239.249073) + hex.gas.state.T * (6.06694922 + hex.gas.state.T * ((-6.1396855e-4) + hex.gas.state.T * (1.491806679e-7 + hex.gas.state.T * ((-1.923105485e-11) + 1.061954386e-15 * hex.gas.state.T)))))))) / (smooth(0, if $SEV_34 then 296.8033869505308 * (1.0 / (hex.gas.state.T * hex.gas.state.T) * (22103.71497 + hex.gas.state.T * ((-381.846182) + hex.gas.state.T * (6.08273836 + hex.gas.state.T * ((-0.00853091441) + hex.gas.state.T * (1.384646189e-5 + hex.gas.state.T * ((-9.62579362e-9) + 2.519705809e-12 * hex.gas.state.T))))))) else 296.8033869505308 * (1.0 / (hex.gas.state.T * hex.gas.state.T) * (587712.406 + hex.gas.state.T * ((-2239.249073) + hex.gas.state.T * (6.06694922 + hex.gas.state.T * ((-6.1396855e-4) + hex.gas.state.T * (1.491806679e-7 + hex.gas.state.T * ((-1.923105485e-11) + 1.061954386e-15 * hex.gas.state.T)))))))) - 296.8033869505308) ($RES_BND_206) (51) [SCAL] (1) $FUN_4 = (Source.w0 - valve.w) / hex.Nt ($RES_SIM_74) (52) [SCAL] (1) dMtot_dp = hex.Mtot / (gamma * hex.p) ($RES_BND_207) (53) [SCAL] (1) hex.Kfl = hex.wnf * (hex.wnom / hex.Nt) * hex.Kf ($RES_SIM_76) (54) [SCAL] (1) tau = dMtot_dp / valve.Kv ($RES_BND_209) (55) [FOR-] (9) ($RES_SIM_194) (55) [----] for $i1 in 1:9 loop (55) [----] [SCAL] (1) heatSource.wall.Q[$i1] + hex.wall.Q[$i1] = 0.0 ($RES_SIM_195) (55) [----] end for; (56) [SCAL] (1) hex.Kf = ((0.5 * hex.L * hex.omega_hyd * hex.Cfnom) / hex.A ^ 3.0) * hex.Kfc ($RES_SIM_79) (57) [SCAL] (1) heatSource.wall.T = hex.wall.T ($RES_SIM_196) (58) [FOR-] (10) ($RES_EVT_271) (58) [----] for {$i1 in 1:10, i in 1:1} loop (58) [----] [SCAL] (1) $SEV_9[$i1, i] = hex.gas[$i1].X[i] <= 1.00001 ($RES_EVT_272) (58) [----] end for; (59) [SCAL] (1) SensT1.gas.h = homotopy(SensT1.outlet.h_outflow, SensT1.outlet.h_outflow) ($RES_$AUX_234) (60) [SCAL] (1) SensT2.gas.h = homotopy(hex.outfl.h_outflow, hex.outfl.h_outflow) ($RES_$AUX_233) (61) [FOR-] (10) ($RES_EVT_273) (61) [----] for {$i1 in 1:10, i in 1:1} loop (61) [----] [SCAL] (1) $SEV_10[$i1, i] = $SEV_8[$i1, i] and $SEV_9[$i1, i] ($RES_EVT_274) (61) [----] end for; (62) [SCAL] (1) hex.Q = sum(hex.heatTransfer.wall.Q) ($RES_$AUX_232) (63) [SCAL] (1) $FUN_4 = sum(hex.dMdt) ($RES_$AUX_231) (64) [FOR-] (10) ($RES_EVT_275) (64) [----] for $i1 in 1:10 loop (64) [----] [SCAL] (1) $SEV_11[$i1] = hex.gas[$i1].T >= 200.0 ($RES_EVT_276) (64) [----] end for; (65) [SCAL] (1) $FUN_5 = sum(hex.vbar) ($RES_$AUX_230) (66) [FOR-] (10) ($RES_EVT_277) (66) [----] for $i1 in 1:10 loop (66) [----] [SCAL] (1) $SEV_12[$i1] = hex.gas[$i1].T <= 6000.0 ($RES_EVT_278) (66) [----] end for; (67) [FOR-] (10) ($RES_SIM_40) (67) [----] for j in 1:10 loop (67) [----] [SCAL] (1) hex.gas[j].p = hex.p ($RES_SIM_41) (67) [----] end for; (68) [FOR-] (10) ($RES_EVT_279) (68) [----] for $i1 in 1:10 loop (68) [----] [SCAL] (1) $SEV_13[$i1] = $SEV_11[$i1] and $SEV_12[$i1] ($RES_EVT_280) (68) [----] end for; (69) [SCAL] (1) SensT2.gas.d = -(0.0033692337889886454 * Sink.p0) / ((-273.15) - SensT2.gas.T_degC) ($RES_SIM_123) (70) [FOR-] (10) ($RES_SIM_42) (70) [----] for j in 1:10 loop (70) [----] [SCAL] (1) hex.gas[j].T = hex.T[j] ($RES_SIM_43) (70) [----] end for; (71) [SCAL] (1) SensT2.gas.u = 296.8033869505308 * ((-273.15) - SensT2.gas.T_degC) + SensT2.gas.h ($RES_SIM_124) (72) [SCAL] (1) SensT2.gas.h = Modelica.Media.IdealGases.Common.Functions.h_T(Modelica.Media.IdealGases.Common.DataRecord("N2", 0.0280134, 0.0, 309498.4543111511, 1000.0, {22103.71497, -381.846182, 6.08273836, -0.00853091441, 1.384646189e-5, -9.62579362e-9, 2.519705809e-12}, {710.846086, -10.76003744}, {587712.406, -2239.249073, 6.06694922, -6.1396855e-4, 1.491806679e-7, -1.923105485e-11, 1.061954386e-15}, {12832.10415, -15.86640027}, 296.8033869505308), -((-273.15) - SensT2.gas.T_degC), true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_125) (73) [FOR-] (10) ($RES_SIM_44) (73) [----] for j in 1:10 loop (73) [----] [SCAL] (1) hex.gas[j].h = hex.h[j] ($RES_SIM_45) (73) [----] end for; (74) [SCAL] (1) hex.omega_hyd = (4.0 * hex.A) / hex.Dhyd ($RES_SIM_80) (75) [ARRY] (9) hex.Q_single = hex.heatTransfer.Qvol / hex.Nt ($RES_SIM_82) (76) [FOR-] (9) ($RES_SIM_202) (76) [----] for $i1 in 1:9 loop (76) [----] [SCAL] (1) (-hex.wall.Q[$i1]) + hex.heatTransfer.wall.Q[$i1] = 0.0 ($RES_SIM_203) (76) [----] end for; (77) [FOR-] (9) ($RES_SIM_48) (77) [----] for j in 1:9 loop (77) [----] [SCAL] (1) hex.cvbar[j] * hex.rhobar[j] * hex.l * hex.A * $DER.hex.Ttilde[j] + hex.wbar[j] * (hex.gas[j + 1].h - hex.gas[j].h) = hex.Q_single[j] ($RES_SIM_49) (77) [----] end for; (78) [SCAL] (1) hex.wall.T = hex.heatTransfer.wall.T ($RES_SIM_204) (79) [ARRY] (10) hex.heatTransfer.fluidState.p = {hex.gas[1].state.p, hex.gas[2].state.p, hex.gas[3].state.p, hex.gas[4].state.p, hex.gas[5].state.p, hex.gas[6].state.p, hex.gas[7].state.p, hex.gas[8].state.p, hex.gas[9].state.p, hex.gas[10].state.p} ($RES_BND_218) (80) [ARRY] (10) hex.heatTransfer.fluidState.T = {hex.gas[1].state.T, hex.gas[2].state.T, hex.gas[3].state.T, hex.gas[4].state.T, hex.gas[5].state.T, hex.gas[6].state.T, hex.gas[7].state.T, hex.gas[8].state.T, hex.gas[9].state.T, hex.gas[10].state.T} ($RES_BND_219) (81) [ARRY] (10) hex.gas.X = {{1.0}, {1.0}, {1.0}, {1.0}, {1.0}, {1.0}, {1.0}, {1.0}, {1.0}, {1.0}} ($RES_SIM_87) (82) [ARRY] (10) hex.gas.state.p = hex.gas.p ($RES_SIM_88) (83) [ARRY] (10) hex.gas.state.T = hex.gas.T ($RES_SIM_89) (84) [SCAL] (1) Step2.y = Step2.offset + (if $TEV_0 then 0.0 else Step2.height) ($RES_SIM_9) (85) [SCAL] (1) $DER.Mbal = Source.w0 - valve.w ($RES_SIM_7) (86) [SCAL] (1) Merr = Mhex - Mbal ($RES_SIM_6) (87) [SCAL] (1) hex.Dpfric = homotopy(0.1111111111111111 * $FUN_5 * smooth(1, hex.Kf * (hex.w * sqrt(hex.w * hex.w + (hex.wnom / hex.Nt) * hex.wnf * ((hex.wnom / hex.Nt) * hex.wnf)))), (hex.dpnom / (hex.wnom / hex.Nt)) * hex.w) ($RES_$AUX_229) (88) [FOR-] (9) ($RES_$AUX_227) (88) [----] for j in 1:9 loop (88) [----] [SCAL] (1) $FUN_7[integer(1.0 + ((-1.0) + j))] = sum(hex.dMdt[1:j - 1]) ($RES_$AUX_228) (88) [----] end for; (89) [SCAL] (1) $FUN_8 = sum(hex.rhobar) ($RES_$AUX_226) (90) [SCAL] (1) -((-273.15) - Source.gas.T_degC) = Step4.offset + (if $TEV_1 then 0.0 else Step4.height) ($RES_SIM_10) (91) [SCAL] (1) Step1.y = Step1.offset + (if $TEV_2 then 0.0 else Step1.height) ($RES_SIM_11) (92) [FOR-] (9) ($RES_SIM_12) (92) [----] for i in 1:9 loop (92) [----] [SCAL] (1) heatSource.wall.Q[i] = -Step1.y / 9.0 ($RES_SIM_13) (92) [----] end for;