Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr ThermoPower_ThermoPower.Test.GasComponents.TestGasValve.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.GasComponents.TestGasValve,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.GasComponents.TestGasValve") translateModel(ThermoPower.Test.GasComponents.TestGasValve,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="ThermoPower_ThermoPower.Test.GasComponents.TestGasValve") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001154/0.001154, allocations: 107.3 kB / 17.69 MB, free: 5.355 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.001075/0.001076, allocations: 188 kB / 18.62 MB, free: 4.441 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.174/1.174, allocations: 205.1 MB / 224.5 MB, free: 12.25 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ThermoPower 3.1.0-master/package.mo): time 0.2356/0.2356, allocations: 48.85 MB / 320.7 MB, free: 11.04 MB / 270.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 1.654e-05/1.657e-05, allocations: 4.484 kB / 391.5 MB, free: 48.57 MB / 318.1 MB Notification: Performance of NFInst.instantiate(ThermoPower.Test.GasComponents.TestGasValve): time 0.342/0.342, allocations: 251.7 MB / 0.6281 GB, free: 112 kB / 414.1 MB Notification: Performance of NFInst.instExpressions: time 0.00794/0.35, allocations: 4.815 MB / 0.6328 GB, free: 12.93 MB / 430.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000638/0.3507, allocations: 31.97 kB / 0.6328 GB, free: 12.93 MB / 430.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001977/0.3527, allocations: 1.026 MB / 0.6338 GB, free: 12.38 MB / 430.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001963/0.3546, allocations: 1.421 MB / 0.6352 GB, free: 11.56 MB / 430.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.00513/0.3598, allocations: 2.463 MB / 0.6376 GB, free: 9.84 MB / 430.1 MB Notification: Performance of NFFlatten.flatten: time 0.003927/0.3637, allocations: 4.56 MB / 0.642 GB, free: 5.527 MB / 430.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001285/0.365, allocations: 1.279 MB / 0.6433 GB, free: 4.223 MB / 430.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001672/0.3667, allocations: 1.639 MB / 0.6449 GB, free: 2.578 MB / 430.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001154/0.3679, allocations: 1.303 MB / 0.6462 GB, free: 1.27 MB / 430.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002488/0.3681, allocations: 204 kB / 0.6464 GB, free: 1.07 MB / 430.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.002587/0.3707, allocations: 1.575 MB / 0.6479 GB, free: 15.49 MB / 446.1 MB Notification: Performance of combineBinaries: time 0.002654/0.3734, allocations: 3.687 MB / 0.6515 GB, free: 11.77 MB / 446.1 MB Notification: Performance of replaceArrayConstructors: time 0.001452/0.3749, allocations: 2.262 MB / 0.6537 GB, free: 9.48 MB / 446.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0003869/0.3752, allocations: 386.9 kB / 0.6541 GB, free: 9.102 MB / 446.1 MB Notification: Performance of FrontEnd: time 0.0001558/0.3754, allocations: 55.75 kB / 0.6541 GB, free: 9.047 MB / 446.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 424 (359) * Number of variables: 424 (359) Notification: Performance of Bindings: time 0.007494/0.3829, allocations: 9.924 MB / 0.6638 GB, free: 14.84 MB / 462.1 MB Notification: Performance of FunctionAlias: time 0.0009004/0.3838, allocations: 1.111 MB / 0.6649 GB, free: 13.71 MB / 462.1 MB Notification: Performance of Early Inline: time 0.004553/0.3884, allocations: 5.192 MB / 0.67 GB, free: 8.461 MB / 462.1 MB Notification: Performance of simplify1: time 0.0003626/0.3888, allocations: 399.4 kB / 0.6704 GB, free: 8.07 MB / 462.1 MB Notification: Performance of Alias: time 0.006318/0.3951, allocations: 6.38 MB / 0.6766 GB, free: 1.246 MB / 462.1 MB Notification: Performance of simplify2: time 0.0002822/0.3954, allocations: 347.5 kB / 0.6769 GB, free: 0.9062 MB / 462.1 MB Notification: Performance of Events: time 0.001427/0.3968, allocations: 1.345 MB / 0.6782 GB, free: 15.51 MB / 478.1 MB Notification: Performance of Detect States: time 0.00112/0.3979, allocations: 1.254 MB / 0.6795 GB, free: 14.23 MB / 478.1 MB Notification: Performance of Partitioning: time 0.001881/0.3998, allocations: 2.001 MB / 0.6814 GB, free: 11.89 MB / 478.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency V2.outlet.Xi_outflow[2] could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) V3.gas.Xi = {V2.outlet.Xi_outflow[1], V2.outlet.Xi_outflow[2]} ($RES_SIM_259) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (103/133) **************************** (1) [ALGB] (2) stream Real[2] V1.outlet.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (2) [DISC] (1) Boolean $SEV_39 (3) [DISC] (1) Boolean $SEV_38 (4) [ALGB] (2) Real[2] V2.gas.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (5) [DISC] (1) Boolean $SEV_37 (6) [ALGB] (1) Real SourceP1.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (7) [ALGB] (2) Real[2] V3.gas.Xi (start = V3.Xstart[:], min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, StateSelect = default) (8) [ALGB] (1) Real V1.gas.d (start = V1.pnom / (V1.Tstart * 277.1333333333333), min = 0.0, max = 1e5, nominal = 10.0) (9) [ALGB] (1) Real SinkP1.gas.MM (min = 0.001, max = 0.25, nominal = 0.032) (10) [ALGB] (1) Real SinkP1.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (11) [ALGB] (1) Real V2.gas.R (start = 1000.0, min = 0.0, max = 1e7, nominal = 1000.0) (12) [DISC] (2) Boolean[2] $SEV_53[$i1] (13) [ALGB] (1) Real V1.theta_act (14) [ALGB] (1) Real V2.gas.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - V2.gas.T_degC)) (15) [ALGB] (1) stream Real SinkP1.flange.h_outflow (start = 3e5, min = -1e10, max = 1e10, nominal = 1e5) (16) [ALGB] (2) protected Real[2] SinkP1.in_X_internal (17) [ALGB] (1) Real V3.gas.MM (min = 0.001, max = 0.25, nominal = 0.032) (18) [ALGB] (2) Real[2] V1.gas.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (19) [ALGB] (1) Real V2.Y (20) [ALGB] (1) Real SourceP1.gas.d (start = 10.0, min = 0.0, max = 1e5, nominal = 10.0) (21) [ALGB] (2) Real[2] SourceP1.gas.state.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (22) [ALGB] (2) protected Real[2] SourceP1.in_X_internal (23) [DISC] (2) Boolean[2] $SEV_56[$i1] (24) [ALGB] (2) stream Real[2] V2.inlet.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (25) [ALGB] (1) Real V1.gas.R (start = 1000.0, min = 0.0, max = 1e7, nominal = 1000.0) (26) [ALGB] (2) stream Real[2] SinkP1.flange.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (27) [ALGB] (2) Real[2] V2.gas.Xi (start = V2.Xstart[:], min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, StateSelect = default) (28) [ALGB] (2) Real[2] SourceP1.gas.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (29) [ALGB] (1) Real V2.gas.MM (min = 0.001, max = 0.25, nominal = 0.032) (30) [DISC] (2) Boolean[2] $SEV_59[$i1] (31) [ALGB] (1) Real SourceP1.gas.R (start = 1000.0, min = 0.0, max = 1e7, nominal = 1000.0) (32) [ALGB] (1) Real V1.gas.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - V1.gas.T_degC)) (33) [ALGB] (1) Real $FUN_7 (34) [ALGB] (1) Real $FUN_6 (35) [ALGB] (1) Real V3.x (36) [ALGB] (1) Real $FUN_5 (37) [ALGB] (1) Real SinkP1.gas.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * SinkP1.gas.p_bar) (38) [ALGB] (1) Real V3.gas.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * V3.gas.p_bar) (39) [ALGB] (1) Real V3.w (min = -1e5, max = 1e5) (40) [ALGB] (1) Real $FUN_4 (41) [ALGB] (1) Real $FUN_3 (42) [ALGB] (2) Real[2] V1.gas.Xi (start = V1.Xstart[:], min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, StateSelect = default) (43) [ALGB] (1) Real $FUN_2 (44) [ALGB] (1) Real $FUN_1 (45) [ALGB] (1) Real V3.p (start = 1e6, min = 0.0, max = 1e8, nominal = 1e6) (46) [ALGB] (1) Real V1.gas.MM (min = 0.001, max = 0.25, nominal = 0.032) (47) [ALGB] (1) Real V2.gas.state.T (start = 500.0, min = 200.0, max = 6000.0, nominal = 500.0) (48) [ALGB] (1) Real V1.xs (49) [ALGB] (1) Real V3.gas.state.T (start = 500.0, min = 200.0, max = 6000.0, nominal = 500.0) (50) [ALGB] (1) Real V2.theta_act (51) [ALGB] (2) Real[2] V2.gas.state.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (52) [ALGB] (1) Real V1.x (53) [ALGB] (1) Real V2.xs (54) [ALGB] (2) Real[2] V3.gas.state.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (55) [ALGB] (2) Real[2] V1.gas.state.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (56) [ALGB] (1) Real V3.xs (57) [ALGB] (2) stream Real[2] V3.inlet.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (58) [ALGB] (1) Real V1.p (start = 1e6, min = 0.0, max = 1e8, nominal = 1e6) (59) [ALGB] (1) Real V1.gas.state.T (start = 500.0, min = 200.0, max = 6000.0, nominal = 500.0) (60) [DISC] (1) Boolean $SEV_51 (61) [DISC] (2) Boolean[2] $SEV_41[$i1] (62) [DISC] (1) Boolean $SEV_50 (63) [ALGB] (1) Real V3.Y (64) [ALGB] (1) Real V2.gas.state.p (start = 1e6, min = 0.0, max = 1e8, nominal = 1e6) (65) [ALGB] (1) Real V3.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (66) [ALGB] (1) Real V1.dp (67) [ALGB] (1) Real V3.gas.state.p (start = 1e6, min = 0.0, max = 1e8, nominal = 1e6) (68) [ALGB] (1) Real V2.dp (69) [ALGB] (1) Real V1.Y (70) [ALGB] (1) Real V3.dp (71) [DISC] (1) Boolean $SEV_49 (72) [DISC] (2) Boolean[2] $SEV_47[$i1] (73) [DISC] (1) Boolean $TEV_7 (74) [DISC] (1) Boolean $SEV_45 (75) [DISC] (1) Boolean $TEV_6 (76) [DISC] (1) Boolean $SEV_44 (77) [DISC] (1) Boolean $TEV_5 (78) [ALGB] (1) Real V2.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (79) [ALGB] (2) Real[2] SinkP1.gas.state.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (80) [ALGB] (1) Real SinkP1.gas.R (start = 1000.0, min = 0.0, max = 1e7, nominal = 1000.0) (81) [DISC] (1) Boolean $SEV_43 (82) [DISC] (1) Boolean $TEV_4 (83) [ALGB] (1) Real V3.gas.d (start = V3.pnom / (V3.Tstart * 277.1333333333333), min = 0.0, max = 1e5, nominal = 10.0) (84) [ALGB] (1) stream Real V3.outlet.h_outflow (start = 3e5, min = -1e10, max = 1e10, nominal = 1e5) (85) [ALGB] (2) Real[2] SinkP1.gas.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (86) [ALGB] (1) Real V3.theta_act (87) [ALGB] (2) stream Real[2] SourceP1.flange.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (88) [ALGB] (2) Real[2] V3.gas.X (start = {0.768, 0.232}, min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (89) [ALGB] (1) Real V3.gas.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - V3.gas.T_degC)) (90) [ALGB] (2) Real[2] SourceP1.gas.Xi (start = SourceP1.Xnom[:], min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, StateSelect = default) (91) [ALGB] (1) Real V2.x (92) [ALGB] (1) Real V1.gas.u (min = -1e8, max = 1e8, nominal = 1e6) (93) [ALGB] (1) Real V2.gas.d (start = V2.pnom / (V2.Tstart * 277.1333333333333), min = 0.0, max = 1e5, nominal = 10.0) (94) [ALGB] (1) Real SinkP1.gas.d (start = 10.0, min = 0.0, max = 1e5, nominal = 10.0) (95) [ALGB] (1) Real V3.gas.R (start = 1000.0, min = 0.0, max = 1e7, nominal = 1000.0) (96) [ALGB] (2) stream Real[2] V3.outlet.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (97) [ALGB] (2) stream Real[2] V1.inlet.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (98) [ALGB] (2) stream Real[2] V2.outlet.Xi_outflow (min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, nominal = {0.1 for $i1 in 1:2}) (99) [ALGB] (1) Real V2.gas.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * V2.gas.p_bar) (100) [ALGB] (1) Real V2.p (start = 1e6, min = 0.0, max = 1e8, nominal = 1e6) (101) [ALGB] (1) Real SinkP1.gas.state.p (start = 1e6, min = 0.0, max = 1e8, nominal = 1e6) (102) [ALGB] (1) Real SourceP1.gas.MM (min = 0.001, max = 0.25, nominal = 0.032) (103) [ALGB] (2) Real[2] SinkP1.gas.Xi (start = SinkP1.Xnom[:], min = {0.0 for $i1 in 1:2}, max = {1.0 for $i1 in 1:2}, StateSelect = default) System Equations (103/133) **************************** (1) [SCAL] (1) $FUN_3 = abs(V2.xs) ($RES_$AUX_456) (2) [SCAL] (1) $FUN_4 = sqrt(V2.gas.d) ($RES_$AUX_455) (3) [SCAL] (1) $FUN_5 = abs(V3.xs) ($RES_$AUX_454) (4) [SCAL] (1) $FUN_6 = sqrt(V3.gas.d) ($RES_$AUX_453) (5) [SCAL] (1) $FUN_7 = sin(6.283185307179586 * Sine2.freqHz * (time - Sine2.startTime) + Sine2.phase) ($RES_$AUX_452) (6) [SCAL] (1) V3.w = homotopy($FUN_6 * V3.Y * V3.Av * V3.theta_act * ((V3.xs * V3.p) / sqrt(sqrt(V3.xs * V3.p * V3.xs * V3.p + V3.dpnom * V3.b * V3.dpnom * V3.b))), ((V3.dpnom * (V3.theta_act / V3.thetanom)) / V3.wnom) * V3.dp) ($RES_SIM_252) (7) [SCAL] (1) V3.Y = noEvent(1.0 - (0.3333333333333333 * $FUN_5) / V3.Fxt_full) ($RES_SIM_253) (8) [SCAL] (1) V3.xs = noEvent(smooth(0, if $SEV_37 then -V3.Fxt_full else if $SEV_38 then V3.Fxt_full else V3.x)) ($RES_SIM_254) (9) [SCAL] (1) V3.x = V3.dp / V3.p ($RES_SIM_255) (10) [SCAL] (1) V3.dp = 99999.99999999999 * V3.gas.p_bar - 99999.99999999999 * SinkP1.gas.p_bar ($RES_SIM_256) (11) [SCAL] (1) V1.gas.state.T = -((-273.15) - V1.gas.T_degC) ($RES_SIM_331) (12) [SCAL] (1) V3.p = noEvent(if $SEV_39 then 99999.99999999999 * V3.gas.p_bar else 99999.99999999999 * SinkP1.gas.p_bar) ($RES_SIM_258) (13) [FOR-] (2) ($RES_EVT_561) (13) [----] for $i1 in 1:2 loop (13) [----] [SCAL] (1) $SEV_53[$i1] = V1.gas.X[$i1] >= (-1e-5) and V1.gas.X[$i1] <= 1.00001 ($RES_EVT_562) (13) [----] end for; (14) [SCAL] (1) V1.gas.d = -SourceP1.p0 / (((-273.15) - V1.gas.T_degC) * V1.gas.R) ($RES_SIM_332) (15) [ARRY] (2) V3.gas.Xi = {V2.outlet.Xi_outflow[1], V2.outlet.Xi_outflow[2]} ($RES_SIM_259) (16) [SCAL] (1) V1.gas.u = V1.gas.R * ((-273.15) - V1.gas.T_degC) + V3.outlet.h_outflow ($RES_SIM_333) (17) [SCAL] (1) V1.gas.R = {296.8033869505308, 259.8369938872708} * V1.gas.X ($RES_SIM_334) (18) [SCAL] (1) V3.outlet.h_outflow = ThermoPower.Test.GasComponents.TestGasValve.V1.Medium.h_TX(-((-273.15) - V1.gas.T_degC), V1.gas.X, true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_335) (19) [ARRY] (2) V2.gas.Xi = V2.gas.X[:] ($RES_SIM_297) (20) [FOR-] (2) ($RES_EVT_565) (20) [----] for $i1 in 1:2 loop (20) [----] [SCAL] (1) $SEV_56[$i1] = SinkP1.gas.X[$i1] >= (-1e-5) and SinkP1.gas.X[$i1] <= 1.00001 ($RES_EVT_566) (20) [----] end for; (21) [ARRY] (2) SourceP1.gas.Xi = SourceP1.gas.X[:] ($RES_SIM_371) (22) [SCAL] (1) V1.gas.MM = 1/sum(V1.gas.state.X[j] / ({0.0280134, 0.0319988})[j] for j in 1:2) ($RES_SIM_336) (23) [ARRY] (2) V2.gas.state.X = V2.gas.X ($RES_SIM_298) (24) [ARRY] (2) SourceP1.gas.state.X = SourceP1.gas.X ($RES_SIM_372) (25) [SCAL] (1) V2.gas.state.p = 99999.99999999999 * V2.gas.p_bar ($RES_SIM_299) (26) [ARRY] (2) SinkP1.flange.Xi_outflow = SinkP1.gas.Xi ($RES_SIM_338) (27) [FOR-] (2) ($RES_EVT_569) (27) [----] for $i1 in 1:2 loop (27) [----] [SCAL] (1) $SEV_59[$i1] = SourceP1.gas.X[$i1] >= (-1e-5) and SourceP1.gas.X[$i1] <= 1.00001 ($RES_EVT_570) (27) [----] end for; (28) [SCAL] (1) SourceP1.gas.d = SourceP1.p0 / (SourceP1.T * SourceP1.gas.R) ($RES_SIM_375) (29) [SCAL] (1) SourceP1.gas.u = V3.outlet.h_outflow - SourceP1.gas.R * SourceP1.T ($RES_SIM_376) (30) [SCAL] (1) SourceP1.gas.R = {296.8033869505308, 259.8369938872708} * SourceP1.gas.X ($RES_SIM_377) (31) [SCAL] (1) V3.outlet.h_outflow = ThermoPower.Test.GasComponents.TestGasValve.SourceP1.Medium.h_TX(SourceP1.T, SourceP1.gas.X, true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_378) (32) [SCAL] (1) SourceP1.gas.MM = 1/sum(SourceP1.gas.state.X[j] / ({0.0280134, 0.0319988})[j] for j in 1:2) ($RES_SIM_379) (33) [SCAL] (1) V2.gas.state.T = -((-273.15) - V2.gas.T_degC) ($RES_SIM_300) (34) [SCAL] (1) V2.gas.d = -(99999.99999999999 * V2.gas.p_bar) / (((-273.15) - V2.gas.T_degC) * V2.gas.R) ($RES_SIM_301) (35) [SCAL] (1) V2.gas.u = V2.gas.R * ((-273.15) - V2.gas.T_degC) + V3.outlet.h_outflow ($RES_SIM_302) (36) [SCAL] (1) $TEV_4 = time < Sine2.startTime ($RES_EVT_494) (37) [SCAL] (1) V2.gas.R = {296.8033869505308, 259.8369938872708} * V2.gas.X ($RES_SIM_303) (38) [SCAL] (1) $TEV_5 = time < S4.startTime ($RES_EVT_495) (39) [SCAL] (1) V3.outlet.h_outflow = ThermoPower.Test.GasComponents.TestGasValve.V2.Medium.h_TX(-((-273.15) - V2.gas.T_degC), V2.gas.X, true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_304) (40) [SCAL] (1) $TEV_6 = time < S3.startTime ($RES_EVT_496) (41) [ARRY] (2) SinkP1.in_X_internal = SinkP1.Xnom ($RES_SIM_340) (42) [SCAL] (1) V2.gas.MM = 1/sum(V2.gas.state.X[j] / ({0.0280134, 0.0319988})[j] for j in 1:2) ($RES_SIM_305) (43) [ARRY] (2) V3.gas.Xi = V3.gas.X[:] ($RES_SIM_267) (44) [SCAL] (1) $TEV_7 = time < S2.startTime ($RES_EVT_497) (45) [ARRY] (2) SinkP1.gas.Xi = SinkP1.in_X_internal[:] ($RES_SIM_341) (46) [ARRY] (2) V3.gas.state.X = V3.gas.X ($RES_SIM_268) (47) [SCAL] (1) V1.theta_act = S2.offset + (if $TEV_7 then 0.0 else S2.height) ($RES_SIM_307) (48) [SCAL] (1) V3.gas.state.p = 99999.99999999999 * V3.gas.p_bar ($RES_SIM_269) (49) [ARRY] (2) {SourceP1.flange.Xi_outflow[1], SourceP1.flange.Xi_outflow[2]} = V1.outlet.Xi_outflow ($RES_SIM_309) (50) [ARRY] (2) SinkP1.gas.Xi = SinkP1.gas.X[:] ($RES_SIM_349) (51) [SCAL] (1) V3.gas.state.T = -((-273.15) - V3.gas.T_degC) ($RES_SIM_270) (52) [SCAL] (1) V3.gas.d = -(99999.99999999999 * V3.gas.p_bar) / (((-273.15) - V3.gas.T_degC) * V3.gas.R) ($RES_SIM_271) (53) [SCAL] (1) V3.gas.u = V3.gas.R * ((-273.15) - V3.gas.T_degC) + V3.outlet.h_outflow ($RES_SIM_272) (54) [ARRY] (2) V1.inlet.Xi_outflow = {V2.inlet.Xi_outflow[1], V2.inlet.Xi_outflow[2]} ($RES_SIM_310) (55) [SCAL] (1) V3.gas.R = {296.8033869505308, 259.8369938872708} * V3.gas.X ($RES_SIM_273) (56) [SCAL] (1) V3.outlet.h_outflow = ThermoPower.Test.GasComponents.TestGasValve.V3.Medium.h_TX(-((-273.15) - V3.gas.T_degC), V3.gas.X, true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_274) (57) [SCAL] (1) V3.gas.MM = 1/sum(V3.gas.state.X[j] / ({0.0280134, 0.0319988})[j] for j in 1:2) ($RES_SIM_275) (58) [SCAL] (1) V3.w = homotopy($FUN_2 * V1.Y * V1.Av * V1.theta_act * ((V1.xs * V1.p) / sqrt(sqrt(V1.xs * V1.p * V1.xs * V1.p + V1.dpnom * V1.b * V1.dpnom * V1.b))), ((V1.dpnom * (V1.theta_act / V1.thetanom)) / V1.wnom) * V1.dp) ($RES_SIM_313) (59) [SCAL] (1) $SEV_37 = V3.x < (-V3.Fxt_full) ($RES_EVT_543) (60) [SCAL] (1) V1.Y = noEvent(1.0 - (0.3333333333333333 * $FUN_1) / V1.Fxt_full) ($RES_SIM_314) (61) [SCAL] (1) $SEV_38 = V3.x > V3.Fxt_full ($RES_EVT_544) (62) [ARRY] (2) SinkP1.gas.state.X = SinkP1.gas.X ($RES_SIM_350) (63) [SCAL] (1) V1.xs = noEvent(smooth(0, if $SEV_49 then -V1.Fxt_full else if $SEV_50 then V1.Fxt_full else V1.x)) ($RES_SIM_315) (64) [SCAL] (1) $SEV_39 = 99999.99999999999 * V3.gas.p_bar >= 99999.99999999999 * SinkP1.gas.p_bar ($RES_EVT_545) (65) [ARRY] (2) {V1.outlet.Xi_outflow[1], V1.outlet.Xi_outflow[2]} = V2.outlet.Xi_outflow ($RES_SIM_278) (66) [SCAL] (1) SinkP1.gas.state.p = 99999.99999999999 * SinkP1.gas.p_bar ($RES_SIM_351) (67) [SCAL] (1) V1.x = V1.dp / V1.p ($RES_SIM_316) (68) [SCAL] (1) V1.dp = SourceP1.p0 - 99999.99999999999 * V2.gas.p_bar ($RES_SIM_317) (69) [ARRY] (2) V2.inlet.Xi_outflow = {V3.inlet.Xi_outflow[1], V3.inlet.Xi_outflow[2]} ($RES_SIM_279) (70) [FOR-] (2) ($RES_EVT_547) (70) [----] for $i1 in 1:2 loop (70) [----] [SCAL] (1) $SEV_41[$i1] = V3.gas.X[$i1] >= (-1e-5) and V3.gas.X[$i1] <= 1.00001 ($RES_EVT_548) (70) [----] end for; (71) [SCAL] (1) SinkP1.gas.d = (99999.99999999999 * SinkP1.gas.p_bar) / (SinkP1.T * SinkP1.gas.R) ($RES_SIM_353) (72) [SCAL] (1) SinkP1.gas.u = SinkP1.flange.h_outflow - SinkP1.gas.R * SinkP1.T ($RES_SIM_354) (73) [SCAL] (1) V1.p = noEvent(if $SEV_51 then SourceP1.p0 else 99999.99999999999 * V2.gas.p_bar) ($RES_SIM_319) (74) [SCAL] (1) SinkP1.gas.R = {296.8033869505308, 259.8369938872708} * SinkP1.gas.X ($RES_SIM_355) (75) [SCAL] (1) SinkP1.flange.h_outflow = ThermoPower.Test.GasComponents.TestGasValve.SinkP1.Medium.h_TX(SinkP1.T, SinkP1.gas.X, true, Modelica.Media.Interfaces.Choices.ReferenceEnthalpy.ZeroAt0K, 0.0) ($RES_SIM_356) (76) [SCAL] (1) SinkP1.gas.MM = 1/sum(SinkP1.gas.state.X[j] / ({0.0280134, 0.0319988})[j] for j in 1:2) ($RES_SIM_357) (77) [ARRY] (2) SourceP1.flange.Xi_outflow = SourceP1.gas.Xi ($RES_SIM_359) (78) [SCAL] (1) 99999.99999999999 * SinkP1.gas.p_bar = Sine2.offset + (if $TEV_4 then 0.0 else Sine2.amplitude * $FUN_7) ($RES_SIM_244) (79) [SCAL] (1) V3.theta_act = S4.offset + (if $TEV_5 then 0.0 else S4.height) ($RES_SIM_245) (80) [SCAL] (1) V2.theta_act = S3.offset + (if $TEV_6 then 0.0 else S3.height) ($RES_SIM_246) (81) [SCAL] (1) V3.w = homotopy($FUN_4 * V2.Y * V2.Av * V2.theta_act * ((V2.xs * V2.p) / sqrt(sqrt(V2.xs * V2.p * V2.xs * V2.p + V2.dpnom * V2.b * V2.dpnom * V2.b))), ((V2.dpnom * (V2.theta_act / V2.thetanom)) / V2.wnom) * V2.dp) ($RES_SIM_282) (82) [ARRY] (2) V1.gas.Xi = {SourceP1.flange.Xi_outflow[1], SourceP1.flange.Xi_outflow[2]} ($RES_SIM_320) (83) [SCAL] (1) $SEV_43 = V2.x < (-V2.Fxt_full) ($RES_EVT_550) (84) [SCAL] (1) V2.Y = noEvent(1.0 - (0.3333333333333333 * $FUN_3) / V2.Fxt_full) ($RES_SIM_283) (85) [ARRY] (2) {V2.outlet.Xi_outflow[1], V2.outlet.Xi_outflow[2]} = V3.outlet.Xi_outflow ($RES_SIM_248) (86) [SCAL] (1) $SEV_44 = V2.x > V2.Fxt_full ($RES_EVT_551) (87) [SCAL] (1) V2.xs = noEvent(smooth(0, if $SEV_43 then -V2.Fxt_full else if $SEV_44 then V2.Fxt_full else V2.x)) ($RES_SIM_284) (88) [ARRY] (2) V3.inlet.Xi_outflow = {SinkP1.flange.Xi_outflow[1], SinkP1.flange.Xi_outflow[2]} ($RES_SIM_249) (89) [SCAL] (1) $SEV_45 = 99999.99999999999 * V2.gas.p_bar >= 99999.99999999999 * V3.gas.p_bar ($RES_EVT_552) (90) [SCAL] (1) V2.x = V2.dp / V2.p ($RES_SIM_285) (91) [SCAL] (1) V2.dp = 99999.99999999999 * V2.gas.p_bar - 99999.99999999999 * V3.gas.p_bar ($RES_SIM_286) (92) [FOR-] (2) ($RES_EVT_554) (92) [----] for $i1 in 1:2 loop (92) [----] [SCAL] (1) $SEV_47[$i1] = V2.gas.X[$i1] >= (-1e-5) and V2.gas.X[$i1] <= 1.00001 ($RES_EVT_555) (92) [----] end for; (93) [SCAL] (1) V2.p = noEvent(if $SEV_45 then 99999.99999999999 * V2.gas.p_bar else 99999.99999999999 * V3.gas.p_bar) ($RES_SIM_288) (94) [ARRY] (2) SourceP1.in_X_internal = SourceP1.Xnom ($RES_SIM_361) (95) [ARRY] (2) V2.gas.Xi = {V1.outlet.Xi_outflow[1], V1.outlet.Xi_outflow[2]} ($RES_SIM_289) (96) [ARRY] (2) SourceP1.gas.Xi = SourceP1.in_X_internal[:] ($RES_SIM_362) (97) [SCAL] (1) $SEV_49 = V1.x < (-V1.Fxt_full) ($RES_EVT_557) (98) [ARRY] (2) V1.gas.Xi = V1.gas.X[:] ($RES_SIM_328) (99) [SCAL] (1) $SEV_50 = V1.x > V1.Fxt_full ($RES_EVT_558) (100) [ARRY] (2) V1.gas.state.X = V1.gas.X ($RES_SIM_329) (101) [SCAL] (1) $SEV_51 = SourceP1.p0 >= 99999.99999999999 * V2.gas.p_bar ($RES_EVT_559) (102) [SCAL] (1) $FUN_1 = abs(V1.xs) ($RES_$AUX_458) (103) [SCAL] (1) $FUN_2 = sqrt(V1.gas.d) ($RES_$AUX_457)