Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.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/Buildings 8.1.4-maint.8.1.x/package.mo", uses=false) Using package Buildings with version 8.1.4 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/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(Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater") translateModel(Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001511/0.001512, allocations: 108.4 kB / 16.38 MB, free: 6.387 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.001272/0.001272, allocations: 195.6 kB / 17.32 MB, free: 5.766 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.489/1.489, allocations: 205.1 MB / 223.2 MB, free: 12.26 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo): time 1.775/1.775, allocations: 292.3 MB / 0.5496 GB, free: 17.5 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 3.113e-05/3.128e-05, allocations: 6.219 kB / 0.6728 GB, free: 5.934 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater): time 0.5026/0.5026, allocations: 126.1 MB / 0.796 GB, free: 73.48 MB / 0.6544 GB Notification: Performance of NFInst.instExpressions: time 0.02131/0.524, allocations: 15.21 MB / 0.8108 GB, free: 73.3 MB / 0.6544 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.005024/0.529, allocations: 75.34 kB / 0.8109 GB, free: 73.3 MB / 0.6544 GB Notification: Performance of NFTyping.typeComponents: time 0.004517/0.5336, allocations: 0.9569 MB / 0.8119 GB, free: 73.29 MB / 0.6544 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Utilities/Strings.mo:139:3-175:14:writable] Warning: Pure function 'Modelica.Utilities.Strings.isEmpty' contains a call to impure function 'Modelica.Utilities.Strings.Advanced.skipWhiteSpace'. Notification: Performance of NFTyping.typeBindings: time 0.01081/0.5445, allocations: 2.582 MB / 0.8144 GB, free: 73.18 MB / 0.6544 GB Notification: Performance of NFTyping.typeClassSections: time 0.007168/0.5517, allocations: 2.118 MB / 0.8164 GB, free: 73.12 MB / 0.6544 GB Notification: Performance of NFFlatten.flatten: time 0.009904/0.5616, allocations: 5.306 MB / 0.8216 GB, free: 73.07 MB / 0.6544 GB Notification: Performance of NFFlatten.resolveConnections: time 0.003569/0.5652, allocations: 1.821 MB / 0.8234 GB, free: 72.91 MB / 0.6544 GB Notification: Performance of NFEvalConstants.evaluate: time 0.005811/0.5711, allocations: 1.969 MB / 0.8253 GB, free: 72.7 MB / 0.6544 GB Notification: Performance of NFSimplifyModel.simplify: time 0.003834/0.5749, allocations: 1.383 MB / 0.8267 GB, free: 72.46 MB / 0.6544 GB Notification: Performance of NFPackage.collectConstants: time 0.0006038/0.5755, allocations: 197.8 kB / 0.8269 GB, free: 72.46 MB / 0.6544 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0075/0.583, allocations: 2.133 MB / 0.8289 GB, free: 72.41 MB / 0.6544 GB Notification: Performance of combineBinaries: time 0.005931/0.589, allocations: 3.369 MB / 0.8322 GB, free: 70.79 MB / 0.6544 GB Notification: Performance of replaceArrayConstructors: time 0.00301/0.592, allocations: 2.12 MB / 0.8343 GB, free: 69.5 MB / 0.6544 GB Notification: Performance of NFVerifyModel.verify: time 0.002015/0.5941, allocations: 379.4 kB / 0.8347 GB, free: 69.43 MB / 0.6544 GB Notification: Performance of FrontEnd: time 0.0008268/0.5949, allocations: 71 kB / 0.8347 GB, free: 69.42 MB / 0.6544 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 312 (277) * Number of variables: 312 (292) Notification: Performance of Bindings: time 0.01463/0.6095, allocations: 9.819 MB / 0.8443 GB, free: 63.48 MB / 0.6544 GB Notification: Performance of FunctionAlias: time 0.001081/0.6106, allocations: 0.9037 MB / 0.8452 GB, free: 62.89 MB / 0.6544 GB Notification: Performance of Early Inline: time 0.005407/0.6161, allocations: 5.203 MB / 0.8503 GB, free: 59.63 MB / 0.6544 GB Notification: Performance of simplify1: time 0.0004827/0.6166, allocations: 313.8 kB / 0.8506 GB, free: 59.49 MB / 0.6544 GB Notification: Performance of Alias: time 0.009394/0.626, allocations: 8.025 MB / 0.8584 GB, free: 54.79 MB / 0.6544 GB Notification: Performance of simplify2: time 0.0003714/0.6264, allocations: 225.2 kB / 0.8586 GB, free: 54.71 MB / 0.6544 GB Notification: Performance of Events: time 0.0009582/0.6273, allocations: 0.9413 MB / 0.8596 GB, free: 54.16 MB / 0.6544 GB Notification: Performance of Detect States: time 0.0007853/0.6281, allocations: 1.031 MB / 0.8606 GB, free: 53.51 MB / 0.6544 GB Notification: Performance of Partitioning: time 0.001291/0.6294, allocations: 1.523 MB / 0.8621 GB, free: 52.41 MB / 0.6544 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency splDat.u[1] could not be devided by the body size 4 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (4) {{splDat.u[1]}, {splDat.u[2]}, {splDat.u[3]}, {splDat.u[4]}} = {{splDat.y1[1]}, {splDat.y2[1]}, {splDat.y3[1]}, {splDat.y4[1]}} ($RES_SIM_168) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (171/191) **************************** (1) [ALGB] (1) stream Real[1] sin1.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (2) [ALGB] (1) final Real heaPum.con.vol.p = heaPum.con.vol.ports[1].p (3) [ALGB] (2) protected flow Real[2] heaPum.eva.vol.dynBal.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (4) [ALGB] (1) Real heaPum.com.pSuc (start = 1e5, min = 0.0, nominal = 1e5) (5) [ALGB] (1) Real heaPum.com.vSuc (start = 1e-4, min = 0.0) (6) [ALGB] (1) Real heaPum.sta_a1.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (7) [ALGB] (2) stream Real[2] heaPum.con.vol.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (8) [ALGB] (1) Real heaPum.com.port_a.T (start = 288.15, min = 0.0, nominal = 300.0) (9) [DISC] (1) Boolean $SEV_26 (10) [ALGB] (1) protected final Real heaPum.eva.vol.dynBal.medium.state.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (11) [ALGB] (1) Real heaPum.con.NTU = heaPum.con.UA / (heaPum.con.cp_default * Buildings.Utilities.Math.Functions.smoothMax(abs(heaPum.m1_flow), heaPum.con.m_flow_small, heaPum.con.m_flow_small)) (min = 0.0) (12) [DISC] (1) Boolean $SEV_22 (13) [ALGB] (1) Real heaPum.con.port_b.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (14) [ALGB] (1) protected Real heaPum.state_a1_inflow.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (15) [ALGB] (1) Real[1] Sou.ports.p (start = {3e5}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (16) [ALGB] (1) Real heaPum.com.pDis (start = 1e6, min = 0.0, nominal = 1e5) (17) [ALGB] (1) Real heaPum.sta_b2.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (18) [ALGB] (2) protected final Real[2] heaPum.con.vol.dynBal.ports_H_flow (min = {-1e8 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1000.0 for $i1 in 1:2}) (19) [DISC] (1) Boolean $TEV_1 (20) [DISC] (1) Boolean heaPum.com.isOn (fixed = false) (21) [ALGB] (1) Real heaPum.com.PThe (22) [DISC] (1) Boolean $TEV_0 (23) [ALGB] (1) Real heaPum.com.mLea_flow (24) [ALGB] (1) Real loa.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - loa.medium.T_degC)) (25) [ALGB] (1) Real heaPum.sta_a1.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (26) [ALGB] (1) protected final Real heaPum.eva.vol.dynBal.medium.state.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (27) [ALGB] (1) Real heaPum.m1_flow = heaPum.m1_flow (min = -1e5, max = 1e5) (28) [ALGB] (1) stream Real heaPum.eva.preDro.port_b.h_outflow (start = 83680.0, min = -1e10, max = 1e10, nominal = 83680.0) (29) [ALGB] (1) Real heaPum.eva.eps = Buildings.Utilities.Math.Functions.smoothMin(Buildings.Fluid.HeatExchangers.BaseClasses.epsilon_ntuZ(heaPum.eva.NTU, 0.0, 6), 0.999, 1e-4) (min = 0.0) (30) [ALGB] (1) final Real heaPum.eva.vol.p = heaPum.eva.vol.ports[1].p (31) [DISC] (1) Boolean $SEV_15 (32) [DISC] (1) Boolean $SEV_14 (33) [ALGB] (2) stream Real[2] heaPum.eva.vol.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (34) [DISC] (1) Boolean $SEV_13 (35) [ALGB] (1) protected final Real heaPum.eva.vol.dynBal.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - heaPum.eva.vol.dynBal.medium.T_degC)) (36) [DISC] (1) Boolean $SEV_12 (37) [DISC] (1) Boolean $SEV_11 (38) [ALGB] (2) protected final Real[2] heaPum.eva.vol.dynBal.ports_H_flow (min = {-1e8 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1000.0 for $i1 in 1:2}) (39) [DISC] (1) Boolean $SEV_10 (40) [ALGB] (1) Real heaPum.sta_b1.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (41) [ALGB] (1) Real heaPum.com.hCon (42) [ALGB] (1) Real heaPum.port_a2.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (43) [ALGB] (1) protected Real heaPum.lim.y (44) [ALGB] (1) Real heaPum.com.pEva (start = 1e5, min = 0.0, nominal = 1e5) (45) [ALGB] (2) protected stream Real[2] heaPum.con.vol.dynBal.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (46) [ALGB] (1) stream Real[1] sin2.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (47) [ALGB] (2) protected flow Real[2] heaPum.con.vol.dynBal.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (48) [ALGB] (1) Real heaPum.eva.preDro.port_b.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (49) [DISS] (1) protected discrete Real calDat.nextTimeEvent (fixed = true, start = 0.0) (50) [ALGB] (1) flow Real[1] Sou.ports.m_flow (min = {-1e60}, max = {1e60}) (51) [ALGB] (1) protected Real heaPum.com.PR (start = 2.0, min = 0.0) (52) [ALGB] (1) flow Real heaPum.port_b2.m_flow (min = -1e5, max = 1e60) (53) [ALGB] (1) Real heaPum.con.preDro.port_b.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (54) [ALGB] (1) stream Real[1] Sou.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (55) [ALGB] (1) Real heaPum.sta_b1.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (56) [ALGB] (1) Real heaPum.eva.UAeff.y = Buildings.Utilities.Math.Functions.smoothMax(heaPum.eva.UA, (heaPum.eva.cp_default * heaPum.eva.eps * abs(heaPum.m2_flow)) / (1.0 - heaPum.eva.eps), heaPum.eva.UA_small) (57) [ALGB] (1) stream Real heaPum.port_a1.h_outflow (start = 83680.0, min = -1e10, max = 1e10, nominal = 83680.0) (58) [ALGB] (1) Real heaPum.eva.NTU = heaPum.eva.UA / (heaPum.eva.cp_default * Buildings.Utilities.Math.Functions.smoothMax(abs(heaPum.m2_flow), heaPum.eva.m_flow_small, heaPum.eva.m_flow_small)) (min = 0.0) (59) [ALGB] (1) protected Real heaPum.con.con.Q_flow (60) [ALGB] (1) Real heaPum.con.UAeff.y = Buildings.Utilities.Math.Functions.smoothMax(heaPum.con.UA, (heaPum.con.cp_default * heaPum.con.eps * abs(heaPum.m1_flow)) / (1.0 - heaPum.con.eps), heaPum.con.UA_small) (61) [ALGB] (1) Real heaPum.com.TSuc (start = 288.15, min = 0.0, nominal = 300.0) (62) [ALGB] (1) Real $FUN_8 (63) [ALGB] (1) Real $FUN_7 (64) [ALGB] (1) stream Real[1] loa.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (65) [ALGB] (1) Real heaPum.m2_flow = heaPum.m2_flow (min = -1e5, max = 1e5) (66) [ALGB] (1) Real $FUN_4 (67) [DISS] (1) protected discrete Real calDat.nextTimeEventScaled (fixed = true, start = 0.0) (68) [ALGB] (1) Real $FUN_3 (69) [ALGB] (2) flow Real[2] heaPum.con.vol.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (70) [ALGB] (1) Real $FUN_20 (71) [ALGB] (1) stream Real heaPum.port_a2.h_outflow (start = 83680.0, min = -1e10, max = 1e10, nominal = 83680.0) (72) [ALGB] (1) Real heaPum.com.m_flow (73) [ALGB] (1) Real heaPum.eva.port_b.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (74) [ALGB] (1) protected Real heaPum.com.PRInt (start = 2.0) (75) [ALGB] (1) protected final Real heaPum.eva.vol.dynBal.m (start = heaPum.eva.vol.V * heaPum.eva.vol.rho_start, min = 0.0, StateSelect = default) (76) [ALGB] (1) protected final Real heaPum.eva.vol.dynBal.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * heaPum.eva.vol.dynBal.medium.p_bar) (77) [ALGB] (4) Real[4] calDat.y (78) [ALGB] (1) Real $FUN_19 (79) [ALGB] (1) Real loa.medium.state.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (80) [ALGB] (1) Real $FUN_18 (81) [ALGB] (1) Real Sou.medium.state.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (82) [ALGB] (2) protected Real[2] heaPum.con.vol.dynBal.ports.p (start = {3e5 for $ports1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (83) [ALGB] (1) Real $FUN_17 (84) [ALGB] (1) Real[1] sin2.ports.p (start = {3e5}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (85) [ALGB] (1) flow Real[1] loa.ports.m_flow (min = {-1e60}, max = {1e60}) (86) [ALGB] (1) protected Real heaPum.state_b2_inflow.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (87) [ALGB] (1) protected final Real heaPum.eva.vol.dynBal.U (start = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.eva.vol.dynBal.Medium.specificInternalEnergy(Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.eva.vol.dynBal.Medium.setState_pTX(heaPum.eva.vol.dynBal.p_start, heaPum.eva.vol.dynBal.T_start, {})) * heaPum.eva.vol.dynBal.fluidVolume * heaPum.eva.vol.dynBal.rho_start + heaPum.eva.vol.dynBal.CSen * (heaPum.eva.vol.dynBal.T_start - 273.15), nominal = 1e5) (88) [ALGB] (1) protected Real heaPum.com.v_norm (89) [DISC] (1) Boolean $SEV_8 (90) [DISC] (1) Boolean $SEV_7 (91) [ALGB] (1) Real heaPum.com.pCon (start = 1e6, min = 0.0, nominal = 1e5) (92) [ALGB] (1) flow Real heaPum.con.vol.heatPort.Q_flow (93) [DISC] (1) Boolean $SEV_0 (94) [ALGB] (1) protected Real heaPum.state_a2_inflow.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (95) [ALGB] (1) protected final Real heaPum.con.vol.dynBal.m (start = heaPum.con.vol.V * heaPum.con.vol.rho_start, min = 0.0, StateSelect = default) (96) [ALGB] (1) Real loa.medium.state.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (97) [ALGB] (1) Real Sou.medium.state.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (98) [ALGB] (1) Real Sou.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - Sou.medium.T_degC)) (99) [ALGB] (1) protected Real heaPum.state_b2_inflow.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (100) [ALGB] (2) Real[2] heaPum.con.vol.ports.p (start = {3e5 for $ports1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (101) [ALGB] (1) stream Real heaPum.con.preDro.port_b.h_outflow (start = 83680.0, min = -1e10, max = 1e10, nominal = 83680.0) (102) [ALGB] (1) Real[1] sin1.ports.p (start = {3e5}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (103) [ALGB] (1) Real Sou.m_flow_in (104) [ALGB] (1) Real heaPum.eva.dp = heaPum.port_a2.p - heaPum.eva.port_b.p (start = heaPum.eva._dp_start) (105) [ALGB] (1) Real[1] splDat.y4 (106) [ALGB] (1) flow Real heaPum.eva.vol.heatPort.Q_flow (107) [ALGB] (1) Real[1] splDat.y3 (108) [ALGB] (1) Real[1] splDat.y2 (109) [ALGB] (1) Real[1] splDat.y1 (110) [ALGB] (1) protected final Real heaPum.con.vol.dynBal.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - heaPum.con.vol.dynBal.medium.T_degC)) (111) [DISC] (1) Boolean $SEV_51 (112) [DISC] (1) Boolean $SEV_50 (113) [ALGB] (1) protected final Real heaPum.con.vol.dynBal.U (start = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.con.vol.dynBal.Medium.specificInternalEnergy(Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.con.vol.dynBal.Medium.setState_pTX(heaPum.con.vol.dynBal.p_start, heaPum.con.vol.dynBal.T_start, {})) * heaPum.con.vol.dynBal.fluidVolume * heaPum.con.vol.dynBal.rho_start + heaPum.con.vol.dynBal.CSen * (heaPum.con.vol.dynBal.T_start - 273.15), nominal = 1e5) (114) [ALGB] (1) protected Real heaPum.state_a2_inflow.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (115) [ALGB] (1) Real Sou.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * Sou.medium.p_bar) (116) [ALGB] (1) flow Real heaPum.port_b1.m_flow (min = -1e5, max = 1e60) (117) [ALGB] (1) stream Real heaPum.eva.port_b.h_outflow (start = heaPum.eva.h_outflow_start, min = -1e10, max = 1e10, nominal = 83680.0) (118) [ALGB] (1) Real heaPum.com.P (119) [ALGB] (1) Real heaPum.con.dp = heaPum.port_a1.p - heaPum.con.port_b.p (start = heaPum.con._dp_start) (120) [DISC] (1) Boolean $SEV_49 (121) [DISC] (1) Boolean $SEV_48 (122) [DISC] (1) Boolean $SEV_47 (123) [DISC] (1) Boolean $SEV_46 (124) [ALGB] (2) protected stream Real[2] heaPum.eva.vol.dynBal.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (125) [DISC] (1) Boolean $SEV_45 (126) [DISC] (1) Boolean $SEV_44 (127) [ALGB] (1) Real heaPum.sta_a2.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (128) [DISC] (1) Boolean $SEV_43 (129) [DISC] (1) Boolean $SEV_42 (130) [ALGB] (1) Real heaPum.com.port_b.T (start = 288.15, min = 0.0, nominal = 300.0) (131) [DISC] (1) Boolean $SEV_41 (132) [ALGB] (1) Real heaPum.com.COP (start = 5.0, min = 0.0) (133) [DISC] (1) Boolean $SEV_40 (134) [ALGB] (1) Real heaPum.dp2 = heaPum.port_a2.p - heaPum.eva.port_b.p (135) [ALGB] (1) Real heaPum.dp1 = heaPum.port_a1.p - heaPum.con.port_b.p (136) [ALGB] (1) protected Real heaPum.eva.con.Q_flow (137) [ALGB] (1) Real heaPum.eva.preDro.dp = heaPum.port_a2.p - heaPum.eva.preDro.port_b.p (start = heaPum.eva.preDro._dp_start, nominal = 1000.0) (138) [ALGB] (1) protected final Real heaPum.con.vol.dynBal.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * heaPum.con.vol.dynBal.medium.p_bar) (139) [ALGB] (1) flow Real[1] sin2.ports.m_flow (min = {-1e60}, max = {1e60}) (140) [ALGB] (1) flow Real[1] sin1.ports.m_flow (min = {-1e60}, max = {1e60}) (141) [ALGB] (4) Real[4] splDat.u (142) [ALGB] (1) protected Real heaPum.com.k (start = 1.2) (143) [ALGB] (1) protected Real heaPum.con.con.dT (144) [ALGB] (1) protected Real heaPum.state_b1_inflow.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (145) [ALGB] (1) Real heaPum.con.eps = Buildings.Utilities.Math.Functions.smoothMin(Buildings.Fluid.HeatExchangers.BaseClasses.epsilon_ntuZ(heaPum.con.NTU, 0.0, 6), 0.999, 1e-4) (min = 0.0) (146) [ALGB] (1) Real heaPum.com.hEva (147) [DISC] (1) Boolean $SEV_39 (148) [ALGB] (1) Real heaPum.sta_a2.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (149) [DISC] (1) Boolean $SEV_38 (150) [ALGB] (1) protected final Real heaPum.con.vol.dynBal.medium.state.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (151) [DISC] (1) Boolean $SEV_37 (152) [DISC] (1) Boolean $SEV_36 (153) [ALGB] (1) Real loa.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * loa.medium.p_bar) (154) [DISC] (1) Boolean $SEV_35 (155) [DISC] (1) Boolean $SEV_34 (156) [DISC] (1) Boolean $SEV_33 (157) [DISC] (1) Boolean $SEV_32 (158) [DISC] (1) Boolean $SEV_30 (159) [ALGB] (1) protected Real heaPum.state_a1_inflow.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) (160) [ALGB] (1) stream Real heaPum.con.port_b.h_outflow (start = heaPum.con.h_outflow_start, min = -1e10, max = 1e10, nominal = 83680.0) (161) [ALGB] (2) Real[2] heaPum.eva.vol.ports.p (start = {3e5 for $ports1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (162) [ALGB] (1) Real[1] loa.ports.p (start = {3e5}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (163) [ALGB] (1) Real heaPum.sta_b2.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (164) [ALGB] (1) Real heaPum.port_a1.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (165) [ALGB] (1) Real loa.m_flow_in (166) [ALGB] (1) protected Real heaPum.eva.con.dT (167) [ALGB] (1) protected Real heaPum.state_b1_inflow.p (start = 3e5, min = 0.0, max = 1e8, nominal = 1e5) (168) [ALGB] (2) flow Real[2] heaPum.eva.vol.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (169) [ALGB] (2) protected Real[2] heaPum.eva.vol.dynBal.ports.p (start = {3e5 for $ports1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {1e5 for $i1 in 1:2}) (170) [ALGB] (1) Real heaPum.con.preDro.dp = heaPum.port_a1.p - heaPum.con.preDro.port_b.p (start = heaPum.con.preDro._dp_start, nominal = 1000.0) (171) [ALGB] (1) protected final Real heaPum.con.vol.dynBal.medium.state.T (start = 293.15, min = 1.0, max = 1e4, nominal = 300.0) System Equations (164/191) **************************** (1) [SCAL] (1) heaPum.state_b1_inflow.T = 273.15 + 2.390057361376673e-4 * sin1.ports[1].h_outflow ($RES_SIM_362) (2) [SCAL] (1) splDat.y1[1] = -((-273.15) - Sou.medium.T_degC) ($RES_SIM_204) (3) [SCAL] (1) heaPum.state_a1_inflow.p = heaPum.port_a1.p ($RES_SIM_363) (4) [ARRY] (4) calDat.y = splDat.u ($RES_SIM_205) (5) [SCAL] (1) heaPum.eva.vol.dynBal.U = heaPum.eva.vol.dynBal.m * (4184.0 * ((-273.15) - ((-273.15) - heaPum.eva.vol.dynBal.medium.T_degC))) ($RES_SIM_80) (6) [SCAL] (1) heaPum.con.vol.dynBal.U = heaPum.con.vol.dynBal.m * (4184.0 * ((-273.15) - ((-273.15) - heaPum.con.vol.dynBal.medium.T_degC))) ($RES_SIM_120) (7) [SCAL] (1) heaPum.state_a1_inflow.T = 273.15 + 2.390057361376673e-4 * loa.ports[1].h_outflow ($RES_SIM_364) (8) [SCAL] (1) heaPum.eva.vol.dynBal.m = heaPum.eva.vol.dynBal.fluidVolume * heaPum.eva.vol.dynBal.rho_start ($RES_SIM_81) (9) [SCAL] (1) heaPum.con.vol.dynBal.m = heaPum.con.vol.dynBal.fluidVolume * heaPum.con.vol.dynBal.rho_start ($RES_SIM_121) (10) [SCAL] (1) heaPum.sta_b2.p = heaPum.eva.port_b.p ($RES_SIM_365) (11) [SCAL] (1) heaPum.sta_b2.T = 273.15 + 2.390057361376673e-4 * noEvent(if $SEV_51 then sin2.ports[1].h_outflow else heaPum.eva.port_b.h_outflow) ($RES_SIM_366) (12) [SCAL] (1) heaPum.sta_a2.p = heaPum.port_a2.p ($RES_SIM_367) (13) [SCAL] (1) heaPum.sta_a2.T = 273.15 + 2.390057361376673e-4 * noEvent(if $SEV_50 then Sou.ports[1].h_outflow else heaPum.port_a2.h_outflow) ($RES_SIM_368) (14) [SCAL] (1) heaPum.sta_b1.p = heaPum.con.port_b.p ($RES_SIM_369) (15) [SCAL] (1) heaPum.eva.vol.dynBal.medium.state.p = 99999.99999999999 * heaPum.eva.vol.dynBal.medium.p_bar ($RES_SIM_86) (16) [SCAL] (1) heaPum.con.vol.dynBal.medium.state.p = 99999.99999999999 * heaPum.con.vol.dynBal.medium.p_bar ($RES_SIM_126) (17) [SCAL] (1) heaPum.eva.vol.dynBal.medium.state.T = -((-273.15) - heaPum.eva.vol.dynBal.medium.T_degC) ($RES_SIM_87) (18) [SCAL] (1) heaPum.con.vol.dynBal.medium.state.T = -((-273.15) - heaPum.con.vol.dynBal.medium.T_degC) ($RES_SIM_127) (19) [SCAL] (1) $SEV_26 = abs(sum({abs(Sou.ports[1].m_flow)}) - abs(Sou.ports[1].m_flow)) <= 1e-60 ($RES_EVT_451) (20) [SCAL] (1) $SEV_30 = time >= $PRE.calDat.nextTimeEvent ($RES_EVT_455) (21) [SCAL] (1) $SEV_32 = heaPum.eva.UA - (heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps) > heaPum.eva.UA_small ($RES_EVT_457) (22) [SCAL] (1) $SEV_33 = heaPum.eva.UA - (heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps) < (-heaPum.eva.UA_small) ($RES_EVT_458) (23) [SCAL] (1) $SEV_34 = heaPum.eva.UA_small > 0.0 ($RES_EVT_459) (24) [SCAL] (1) heaPum.lim.y = homotopy(smooth(0, if $SEV_7 then heaPum.lim.uMax else if $SEV_8 then heaPum.lim.uMin else isOn.k), isOn.k) ($RES_SIM_12) (25) [SCAL] (1) heaPum.sta_b1.T = 273.15 + 2.390057361376673e-4 * noEvent(if $SEV_49 then sin1.ports[1].h_outflow else heaPum.con.port_b.h_outflow) ($RES_SIM_370) (26) [SCAL] (1) heaPum.sta_a1.p = heaPum.port_a1.p ($RES_SIM_371) (27) [SCAL] (1) heaPum.sta_a1.T = 273.15 + 2.390057361376673e-4 * noEvent(if $SEV_48 then loa.ports[1].h_outflow else heaPum.port_a1.h_outflow) ($RES_SIM_372) (28) [SCAL] (1) loa.ports[1].p = 99999.99999999999 * loa.medium.p_bar ($RES_SIM_130) (29) [SCAL] (1) loa.ports[1].h_outflow = 4184.0 * ((-273.15) - ((-273.15) - loa.medium.T_degC)) ($RES_SIM_131) (30) [SCAL] (1) heaPum.con.con.Q_flow = heaPum.con.UAeff.y * heaPum.con.con.dT ($RES_SIM_92) (31) [SCAL] (1) heaPum.con.con.dT = heaPum.com.port_b.T - (273.15 + 2.390057361376673e-4 * (4184.0 * ((-273.15) - ((-273.15) - heaPum.con.vol.dynBal.medium.T_degC)))) ($RES_SIM_95) (32) [SCAL] (1) -Sou.m_flow_in = sum(Sou.ports.m_flow) ($RES_$AUX_356) (33) [SCAL] (1) -loa.m_flow_in = sum(loa.ports.m_flow) ($RES_$AUX_355) (34) [SCAL] (1) $SEV_35 = 0.999 - $FUN_18 > 1e-4 ($RES_EVT_460) (35) [SCAL] (1) $FUN_3 = semiLinear(heaPum.con.vol.dynBal.ports[1].m_flow, heaPum.con.preDro.port_b.h_outflow, heaPum.con.vol.dynBal.ports[1].h_outflow) ($RES_$AUX_354) (36) [SCAL] (1) $SEV_36 = 0.999 - $FUN_18 < (-1e-4) ($RES_EVT_461) (37) [SCAL] (1) $FUN_4 = semiLinear(heaPum.con.vol.dynBal.ports[2].m_flow, sin1.ports[1].h_outflow, heaPum.con.vol.dynBal.ports[2].h_outflow) ($RES_$AUX_353) (38) [SCAL] (1) $SEV_37 = $FUN_17 - heaPum.eva.m_flow_small > heaPum.eva.m_flow_small ($RES_EVT_462) (39) [SCAL] (1) 0.0 = sum(heaPum.con.vol.dynBal.ports.m_flow) ($RES_$AUX_352) (40) [SCAL] (1) $SEV_38 = $FUN_17 - heaPum.eva.m_flow_small < (-heaPum.eva.m_flow_small) ($RES_EVT_463) (41) [SCAL] (1) -heaPum.con.vol.heatPort.Q_flow = sum(heaPum.con.vol.dynBal.ports_H_flow) ($RES_$AUX_351) (42) [SCAL] (1) $SEV_39 = heaPum.eva.m_flow_small > 0.0 ($RES_EVT_464) (43) [SCAL] (1) $FUN_7 = semiLinear(heaPum.eva.vol.dynBal.ports[1].m_flow, heaPum.eva.preDro.port_b.h_outflow, heaPum.eva.vol.dynBal.ports[1].h_outflow) ($RES_$AUX_350) (44) [SCAL] (1) $SEV_40 = heaPum.con.UA - (heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps) > heaPum.con.UA_small ($RES_EVT_465) (45) [SCAL] (1) $SEV_41 = heaPum.con.UA - (heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps) < (-heaPum.con.UA_small) ($RES_EVT_466) (46) [SCAL] (1) $SEV_42 = heaPum.con.UA_small > 0.0 ($RES_EVT_467) (47) [SCAL] (1) $SEV_43 = 0.999 - $FUN_20 > 1e-4 ($RES_EVT_468) (48) [SCAL] (1) $SEV_44 = 0.999 - $FUN_20 < (-1e-4) ($RES_EVT_469) (49) [SCAL] (1) heaPum.com.PR = max(heaPum.com.pDis / heaPum.com.pSuc, 0.0) ($RES_SIM_23) (50) [SCAL] (1) heaPum.com.isOn = $SEV_12 ($RES_SIM_24) (51) [SCAL] (1) heaPum.eva.preDro.port_b.p = heaPum.eva.vol.ports[1].p ($RES_SIM_223) (52) [-IF-] (11)if heaPum.com.isOn then (52) [----] [SCAL] (1) -(-heaPum.con.con.Q_flow) = heaPum.com.P * heaPum.com.COP ($RES_SIM_26) (52) [----] [SCAL] (1) -heaPum.con.con.Q_flow = -((-heaPum.eva.con.Q_flow) + heaPum.com.P) ($RES_SIM_27) (52) [----] [SCAL] (1) -heaPum.eva.con.Q_flow = heaPum.com.m_flow * (heaPum.com.hEva - heaPum.com.hCon) ($RES_SIM_28) (52) [----] [SCAL] (1) heaPum.com.P = heaPum.com.PThe / heaPum.com.etaEle + heaPum.com.PLos ($RES_SIM_29) (52) [----] [SCAL] (1) heaPum.com.TSuc = heaPum.com.port_a.T + heaPum.com.dTSup ($RES_SIM_30) (52) [----] [SCAL] (1) heaPum.com.PThe = heaPum.com.V_flow_nominal * heaPum.com.pSuc * ((heaPum.com.k * heaPum.com.v_norm) / (heaPum.com.k - 1.0)) * (((1.0 / heaPum.com.k) * heaPum.com.PRInt ^ ((heaPum.com.k - 1.0) / heaPum.com.k) + (heaPum.com.PR * ((heaPum.com.k - 1.0) / heaPum.com.k)) / heaPum.com.volRat) - 1.0) ($RES_SIM_31) (52) [----] [SCAL] (1) heaPum.com.k = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.com.ref.isentropicExponentVap_Tv(heaPum.com.TSuc, heaPum.com.vSuc) ($RES_SIM_32) (52) [----] [SCAL] (1) heaPum.com.m_flow = heaPum.com.v_norm * smooth(1, if $SEV_13 then heaPum.com.V_flow_nominal / heaPum.com.vSuc - heaPum.com.mLea_flow else if $SEV_14 then (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc else if $SEV_15 then 0.25 * ((heaPum.com.mLea_flow + (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc) - heaPum.com.V_flow_nominal / heaPum.com.vSuc) * ((-3.0) + ((heaPum.com.V_flow_nominal / heaPum.com.vSuc - ((1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc + heaPum.com.mLea_flow)) / ((1e-6 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc)) ^ 2.0) * ((1e6 * heaPum.com.vSuc * (heaPum.com.V_flow_nominal / heaPum.com.vSuc - (heaPum.com.mLea_flow + (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc))) / heaPum.com.V_flow_nominal) + 0.5 * ((heaPum.com.V_flow_nominal / heaPum.com.vSuc + (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc) - heaPum.com.mLea_flow) else 0.5 * ((heaPum.com.V_flow_nominal / heaPum.com.vSuc + (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc) - heaPum.com.mLea_flow)) ($RES_SIM_33) (52) [----] [SCAL] (1) heaPum.com.mLea_flow = heaPum.com.leaCoe * heaPum.com.PR ($RES_SIM_34) (52) [----] [SCAL] (1) heaPum.com.pDis = heaPum.com.pCon ($RES_SIM_35) (52) [----] [SCAL] (1) heaPum.com.pSuc = heaPum.com.pEva ($RES_SIM_36) (52) [----] else (52) [----] [SCAL] (1) heaPum.com.COP = 1.0 ($RES_SIM_37) (52) [----] [SCAL] (1) -heaPum.con.con.Q_flow = 0.0 ($RES_SIM_38) (52) [----] [SCAL] (1) -heaPum.eva.con.Q_flow = 0.0 ($RES_SIM_39) (52) [----] [SCAL] (1) heaPum.com.TSuc = heaPum.com.port_a.T ($RES_SIM_40) (52) [----] [SCAL] (1) heaPum.com.P = 0.0 ($RES_SIM_41) (52) [----] [SCAL] (1) heaPum.com.PThe = 0.0 ($RES_SIM_42) (52) [----] [SCAL] (1) heaPum.com.m_flow = 0.0 ($RES_SIM_43) (52) [----] [SCAL] (1) heaPum.com.mLea_flow = 0.0 ($RES_SIM_44) (52) [----] [SCAL] (1) heaPum.com.pDis = heaPum.com.pCon ($RES_SIM_45) (52) [----] [SCAL] (1) heaPum.com.pSuc = heaPum.com.pEva ($RES_SIM_46) (52) [----] [SCAL] (1) heaPum.com.k = 1.0 ($RES_SIM_47) (52) [----] end if; (53) [SCAL] (1) loa.medium.state.p = 99999.99999999999 * loa.medium.p_bar ($RES_SIM_140) (54) [SCAL] (1) loa.medium.state.T = -((-273.15) - loa.medium.T_degC) ($RES_SIM_141) (55) [SCAL] (1) heaPum.eva.vol.ports[2].h_outflow = heaPum.eva.port_b.h_outflow ($RES_SIM_227) (56) [SCAL] (1) heaPum.eva.vol.ports[2].p = heaPum.eva.port_b.p ($RES_SIM_228) (57) [SCAL] (1) sin1.ports[1].h_outflow = 4184.0 * ((-273.15) + sin1.T) ($RES_SIM_145) (58) [SCAL] (1) $FUN_8 = semiLinear(heaPum.eva.vol.dynBal.ports[2].m_flow, sin2.ports[1].h_outflow, heaPum.eva.vol.dynBal.ports[2].h_outflow) ($RES_$AUX_349) (59) [SCAL] (1) sin1.ports[1].p = sin1.p ($RES_SIM_147) (60) [SCAL] (1) 0.0 = sum(heaPum.eva.vol.dynBal.ports.m_flow) ($RES_$AUX_348) (61) [SCAL] (1) -heaPum.eva.vol.heatPort.Q_flow = sum(heaPum.eva.vol.dynBal.ports_H_flow) ($RES_$AUX_347) (62) [SCAL] (1) Sou.ports[1].p = 99999.99999999999 * Sou.medium.p_bar ($RES_SIM_149) (63) [SCAL] (1) heaPum.com.v_norm = Buildings.Utilities.Math.Functions.smoothLimit(heaPum.lim.y, 0.0, 1.0, 0.001) ($RES_$AUX_346) (64) [SCAL] (1) heaPum.com.vSuc = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.com.ref.specificVolumeVap_pT(heaPum.com.pSuc, heaPum.com.TSuc) ($RES_$AUX_345) (65) [SCAL] (1) $SEV_45 = $FUN_19 - heaPum.con.m_flow_small > heaPum.con.m_flow_small ($RES_EVT_470) (66) [SCAL] (1) heaPum.com.pCon = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.com.ref.pressureSatVap_T(heaPum.com.port_b.T) ($RES_$AUX_344) (67) [SCAL] (1) $SEV_46 = $FUN_19 - heaPum.con.m_flow_small < (-heaPum.con.m_flow_small) ($RES_EVT_471) (68) [SCAL] (1) heaPum.com.hCon = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.com.ref.enthalpySatLiq_T(heaPum.com.port_b.T) ($RES_$AUX_343) (69) [SCAL] (1) $SEV_47 = heaPum.con.m_flow_small > 0.0 ($RES_EVT_472) (70) [SCAL] (1) heaPum.com.pEva = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.com.ref.pressureSatVap_T(heaPum.com.port_a.T) ($RES_$AUX_342) (71) [SCAL] (1) $SEV_48 = heaPum.m1_flow > 0.0 ($RES_EVT_473) (72) [SCAL] (1) heaPum.com.hEva = Buildings.Fluid.HeatPumps.Calibration.ScrollWaterToWater.heaPum.com.ref.enthalpySatVap_T(heaPum.com.port_a.T) ($RES_$AUX_341) (73) [SCAL] (1) $SEV_49 = heaPum.port_b1.m_flow > 0.0 ($RES_EVT_474) (74) [SCAL] (1) $FUN_17 = abs(heaPum.m2_flow) ($RES_$AUX_340) (75) [SCAL] (1) $SEV_50 = heaPum.m2_flow > 0.0 ($RES_EVT_475) (76) [SCAL] (1) $SEV_51 = heaPum.port_b2.m_flow > 0.0 ($RES_EVT_476) (77) [SCAL] (1) Sou.ports[1].h_outflow = 4184.0 * ((-273.15) - ((-273.15) - Sou.medium.T_degC)) ($RES_SIM_150) (78) [SCAL] (1) $FUN_18 = Buildings.Fluid.HeatExchangers.BaseClasses.epsilon_ntuZ(heaPum.eva.NTU, 0.0, 6) ($RES_$AUX_339) (79) [SCAL] (1) $FUN_19 = abs(heaPum.m1_flow) ($RES_$AUX_338) (80) [SCAL] (1) Sou.medium.state.p = 99999.99999999999 * Sou.medium.p_bar ($RES_SIM_159) (81) [SCAL] (1) $FUN_20 = Buildings.Fluid.HeatExchangers.BaseClasses.epsilon_ntuZ(heaPum.con.NTU, 0.0, 6) ($RES_$AUX_337) (82) [SCAL] (1) heaPum.dp1 = heaPum.port_a1.p - heaPum.con.port_b.p ($RES_BND_294) (83) [SCAL] (1) heaPum.eva.vol.dynBal.ports[2].h_outflow = heaPum.eva.vol.ports[2].h_outflow ($RES_SIM_243) (84) [SCAL] (1) heaPum.eva.vol.dynBal.ports[1].h_outflow = heaPum.eva.vol.ports[1].h_outflow ($RES_SIM_244) (85) [SCAL] (1) heaPum.dp2 = heaPum.port_a2.p - heaPum.eva.port_b.p ($RES_BND_296) (86) [FOR-] (2) ($RES_SIM_245) (86) [----] for $i1 in 1:2 loop (86) [----] [SCAL] (1) heaPum.eva.vol.dynBal.ports[$i1].m_flow - heaPum.eva.vol.ports[$i1].m_flow = 0.0 ($RES_SIM_246) (86) [----] end for; (87) [SCAL] (1) Sou.medium.state.T = -((-273.15) - Sou.medium.T_degC) ($RES_SIM_160) (88) [SCAL] (1) heaPum.con.dp = heaPum.port_a1.p - heaPum.con.port_b.p ($RES_BND_298) (89) [ARRY] (2) heaPum.eva.vol.dynBal.ports.p = heaPum.eva.vol.ports.p ($RES_SIM_247) (90) [SCAL] (1) heaPum.com.PRInt = heaPum.com.volRat ^ heaPum.com.k ($RES_SIM_49) (91) [SCAL] (1) heaPum.con.preDro.port_b.p = heaPum.con.vol.ports[1].p ($RES_SIM_249) (92) [SCAL] (1) sin2.ports[1].h_outflow = 4184.0 * ((-273.15) + sin2.T) ($RES_SIM_164) (93) [SCAL] (1) sin2.ports[1].p = sin2.p ($RES_SIM_166) (94) [ARRY] (4) {{splDat.u[1]}, {splDat.u[2]}, {splDat.u[3]}, {splDat.u[4]}} = {{splDat.y1[1]}, {splDat.y2[1]}, {splDat.y3[1]}, {splDat.y4[1]}} ($RES_SIM_168) (95) [FOR-] (4) ($RES_SIM_169) (95) [----] for $i1 in 1:4 loop (95) [----] [SCAL] (1) calDat.y[$i1] = calDat.p_offset[$i1] + Modelica.Blocks.Tables.Internal.getTimeTableValue(calDat.tableID, $i1, time, calDat.nextTimeEventScaled, $TEV_1) ($RES_SIM_170) (95) [----] end for; (96) [SCAL] (1) heaPum.con.vol.p = heaPum.con.vol.ports[1].p ($RES_BND_300) (97) [SCAL] (1) heaPum.con.preDro.dp = heaPum.port_a1.p - heaPum.con.preDro.port_b.p ($RES_BND_309) (98) [SCAL] (1) heaPum.eva.con.Q_flow = heaPum.eva.UAeff.y * heaPum.eva.con.dT ($RES_SIM_52) (99) [SCAL] (1) heaPum.con.vol.ports[2].h_outflow = heaPum.con.port_b.h_outflow ($RES_SIM_253) (100) [SCAL] (1) heaPum.eva.con.dT = heaPum.com.port_a.T - (273.15 + 2.390057361376673e-4 * (4184.0 * ((-273.15) - ((-273.15) - heaPum.eva.vol.dynBal.medium.T_degC)))) ($RES_SIM_55) (101) [SCAL] (1) heaPum.con.vol.ports[2].p = heaPum.con.port_b.p ($RES_SIM_254) (102) [WHEN] (1)when {$SEV_30, initial()} then (102) [----] calDat.nextTimeEvent := if calDat.nextTimeEventScaled < 1e60 then calDat.nextTimeEventScaled else 1e60 (102) [----] end when; (103) [WHEN] (1)when {$SEV_30, initial()} then (103) [----] calDat.nextTimeEventScaled := Modelica.Blocks.Tables.Internal.getNextTimeEvent(calDat.tableID, time) (103) [----] end when; (104) [SCAL] (1) $TEV_0 = $PRE.heaPum.com.isOn ($RES_EVT_423) (105) [SCAL] (1) heaPum.eva.vol.heatPort.Q_flow - heaPum.eva.con.Q_flow = 0.0 ($RES_SIM_178) (106) [SCAL] (1) $TEV_1 = $PRE.calDat.nextTimeEventScaled ($RES_EVT_424) (107) [SCAL] (1) heaPum.eva.vol.ports[1].m_flow - heaPum.m2_flow = 0.0 ($RES_SIM_179) (108) [SCAL] (1) $SEV_0 = heaPum.lim.y > 0.01 ($RES_EVT_425) (109) [SCAL] (1) heaPum.con.NTU = heaPum.con.UA / (heaPum.con.cp_default * smooth(1, if $SEV_45 then $FUN_19 else if $SEV_46 then heaPum.con.m_flow_small else if $SEV_47 then 0.25 * (heaPum.con.m_flow_small - $FUN_19) * ((-3.0) + (($FUN_19 - heaPum.con.m_flow_small) / heaPum.con.m_flow_small) ^ 2.0) * (($FUN_19 - heaPum.con.m_flow_small) / heaPum.con.m_flow_small) + 0.5 * ($FUN_19 + heaPum.con.m_flow_small) else 0.5 * ($FUN_19 + heaPum.con.m_flow_small))) ($RES_BND_310) (110) [SCAL] (1) heaPum.con.eps = smooth(1, if $SEV_43 then $FUN_20 else if $SEV_44 then 0.999 else 0.25 * (0.999 - $FUN_20) * ((-3.0) + ((0.999 - $FUN_20) / 1e-4) ^ 2.0) * (1e4 * (0.999 - $FUN_20)) + 0.5 * (0.999 + $FUN_20)) ($RES_BND_311) (111) [SCAL] (1) heaPum.con.UAeff.y = smooth(1, if $SEV_40 then heaPum.con.UA else if $SEV_41 then (heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps) else if $SEV_42 then 0.25 * ((heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps) - heaPum.con.UA) * ((-3.0) + ((heaPum.con.UA - ($FUN_19 * heaPum.con.eps * heaPum.con.cp_default) / (1.0 - heaPum.con.eps)) / heaPum.con.UA_small) ^ 2.0) * ((heaPum.con.UA - (heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps)) / heaPum.con.UA_small) + 0.5 * (heaPum.con.UA + (heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps)) else 0.5 * (heaPum.con.UA + (heaPum.con.cp_default * heaPum.con.eps * $FUN_19) / (1.0 - heaPum.con.eps))) ($RES_BND_312) (112) [SCAL] (1) heaPum.eva.dp = heaPum.port_a2.p - heaPum.eva.port_b.p ($RES_BND_314) (113) [SCAL] (1) heaPum.eva.vol.p = heaPum.eva.vol.ports[1].p ($RES_BND_316) (114) [SCAL] (1) heaPum.eva.preDro.port_b.h_outflow = Sou.ports[1].h_outflow ($RES_SIM_60) (115) [SCAL] (1) heaPum.con.preDro.port_b.h_outflow = loa.ports[1].h_outflow ($RES_SIM_100) (116) [SCAL] (1) heaPum.port_a2.h_outflow = heaPum.eva.vol.ports[1].h_outflow ($RES_SIM_61) (117) [SCAL] (1) heaPum.port_a1.h_outflow = heaPum.con.vol.ports[1].h_outflow ($RES_SIM_101) (118) [SCAL] (1) heaPum.eva.preDro.dp = homotopy(Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow(heaPum.m2_flow, heaPum.eva.preDro.k, heaPum.eva.preDro.m_flow_turbulent), (1000.0 * heaPum.m2_flow) / heaPum.eva.preDro.m_flow_nominal_pos) ($RES_SIM_62) (119) [SCAL] (1) heaPum.con.preDro.dp = homotopy(Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow(heaPum.m1_flow, heaPum.con.preDro.k, heaPum.con.preDro.m_flow_turbulent), (1000.0 * heaPum.m1_flow) / heaPum.con.preDro.m_flow_nominal_pos) ($RES_SIM_102) (120) [FOR-] (2) ($RES_SIM_69) (120) [----] for $i1 in 1:2 loop (120) [----] [SCAL] (1) heaPum.eva.vol.dynBal.ports[$i1].p = 99999.99999999999 * heaPum.eva.vol.dynBal.medium.p_bar ($RES_SIM_70) (120) [----] end for; (121) [SCAL] (1) heaPum.eva.vol.ports[2].m_flow - heaPum.port_b2.m_flow = 0.0 ($RES_SIM_182) (122) [FOR-] (2) ($RES_SIM_109) (122) [----] for $i1 in 1:2 loop (122) [----] [SCAL] (1) heaPum.con.vol.dynBal.ports[$i1].p = 99999.99999999999 * heaPum.con.vol.dynBal.medium.p_bar ($RES_SIM_110) (122) [----] end for; (123) [SCAL] (1) heaPum.con.vol.dynBal.ports[2].h_outflow = heaPum.con.vol.ports[2].h_outflow ($RES_SIM_269) (124) [SCAL] (1) heaPum.con.vol.heatPort.Q_flow - heaPum.con.con.Q_flow = 0.0 ($RES_SIM_186) (125) [SCAL] (1) $SEV_7 = isOn.k > heaPum.lim.uMax ($RES_EVT_432) (126) [SCAL] (1) heaPum.con.vol.ports[1].m_flow - heaPum.m1_flow = 0.0 ($RES_SIM_187) (127) [SCAL] (1) $SEV_8 = isOn.k < heaPum.lim.uMin ($RES_EVT_433) (128) [SCAL] (1) $SEV_10 = heaPum.com.port_a.T > 173.15 and heaPum.com.port_a.T < 345.25 ($RES_EVT_435) (129) [SCAL] (1) $SEV_11 = heaPum.com.port_b.T > 173.15 and heaPum.com.port_b.T < 345.25 ($RES_EVT_436) (130) [SCAL] (1) $SEV_12 = not $PRE.heaPum.com.isOn and heaPum.lim.y > 0.01 or $PRE.heaPum.com.isOn and heaPum.lim.y >= 0.005 ($RES_EVT_437) (131) [SCAL] (1) $SEV_13 = heaPum.com.V_flow_nominal / heaPum.com.vSuc - (heaPum.com.mLea_flow + (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc) > (1e-6 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc ($RES_EVT_438) (132) [SCAL] (1) $SEV_14 = heaPum.com.V_flow_nominal / heaPum.com.vSuc - (heaPum.com.mLea_flow + (1e-5 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc) < (-(1e-6 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc) ($RES_EVT_439) (133) [SCAL] (1) heaPum.eva.preDro.dp = heaPum.port_a2.p - heaPum.eva.preDro.port_b.p ($RES_BND_325) (134) [SCAL] (1) heaPum.eva.NTU = heaPum.eva.UA / (heaPum.eva.cp_default * smooth(1, if $SEV_37 then $FUN_17 else if $SEV_38 then heaPum.eva.m_flow_small else if $SEV_39 then 0.25 * (heaPum.eva.m_flow_small - $FUN_17) * ((-3.0) + (($FUN_17 - heaPum.eva.m_flow_small) / heaPum.eva.m_flow_small) ^ 2.0) * (($FUN_17 - heaPum.eva.m_flow_small) / heaPum.eva.m_flow_small) + 0.5 * ($FUN_17 + heaPum.eva.m_flow_small) else 0.5 * ($FUN_17 + heaPum.eva.m_flow_small))) ($RES_BND_326) (135) [SCAL] (1) heaPum.eva.eps = smooth(1, if $SEV_35 then $FUN_18 else if $SEV_36 then 0.999 else 0.25 * (0.999 - $FUN_18) * ((-3.0) + ((0.999 - $FUN_18) / 1e-4) ^ 2.0) * (1e4 * (0.999 - $FUN_18)) + 0.5 * (0.999 + $FUN_18)) ($RES_BND_327) (136) [SCAL] (1) heaPum.eva.UAeff.y = smooth(1, if $SEV_32 then heaPum.eva.UA else if $SEV_33 then (heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps) else if $SEV_34 then 0.25 * ((heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps) - heaPum.eva.UA) * ((-3.0) + ((heaPum.eva.UA - ($FUN_17 * heaPum.eva.eps * heaPum.eva.cp_default) / (1.0 - heaPum.eva.eps)) / heaPum.eva.UA_small) ^ 2.0) * ((heaPum.eva.UA - (heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps)) / heaPum.eva.UA_small) + 0.5 * (heaPum.eva.UA + (heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps)) else 0.5 * (heaPum.eva.UA + (heaPum.eva.cp_default * heaPum.eva.eps * $FUN_17) / (1.0 - heaPum.eva.eps))) ($RES_BND_328) (137) [FOR-] (2) ($RES_SIM_71) (137) [----] for $i1 in 1:2 loop (137) [----] [SCAL] (1) heaPum.eva.vol.dynBal.ports[$i1].h_outflow = 4184.0 * ((-273.15) - ((-273.15) - heaPum.eva.vol.dynBal.medium.T_degC)) ($RES_SIM_72) (137) [----] end for; (138) [FOR-] (2) ($RES_SIM_111) (138) [----] for $i1 in 1:2 loop (138) [----] [SCAL] (1) heaPum.con.vol.dynBal.ports[$i1].h_outflow = 4184.0 * ((-273.15) - ((-273.15) - heaPum.con.vol.dynBal.medium.T_degC)) ($RES_SIM_112) (138) [----] end for; (139) [SCAL] (1) heaPum.con.vol.dynBal.ports[1].h_outflow = heaPum.con.vol.ports[1].h_outflow ($RES_SIM_270) (140) [FOR-] (2) ($RES_SIM_271) (140) [----] for $i1 in 1:2 loop (140) [----] [SCAL] (1) heaPum.con.vol.dynBal.ports[$i1].m_flow - heaPum.con.vol.ports[$i1].m_flow = 0.0 ($RES_SIM_272) (140) [----] end for; (141) [SCAL] (1) heaPum.state_b2_inflow.p = heaPum.eva.port_b.p ($RES_SIM_357) (142) [SCAL] (1) heaPum.state_b2_inflow.T = 273.15 + 2.390057361376673e-4 * sin2.ports[1].h_outflow ($RES_SIM_358) (143) [ARRY] (2) heaPum.con.vol.dynBal.ports.p = heaPum.con.vol.ports.p ($RES_SIM_273) (144) [SCAL] (1) heaPum.state_a2_inflow.p = heaPum.port_a2.p ($RES_SIM_359) (145) [SCAL] (1) heaPum.eva.vol.dynBal.ports_H_flow[2] = $FUN_8 ($RES_SIM_77) (146) [SCAL] (1) heaPum.con.vol.ports[2].m_flow - heaPum.port_b1.m_flow = 0.0 ($RES_SIM_190) (147) [SCAL] (1) heaPum.con.vol.dynBal.ports_H_flow[2] = $FUN_4 ($RES_SIM_117) (148) [SCAL] (1) heaPum.eva.vol.dynBal.ports_H_flow[1] = $FUN_7 ($RES_SIM_78) (149) [SCAL] (1) heaPum.con.vol.dynBal.ports_H_flow[1] = $FUN_3 ($RES_SIM_118) (150) [SCAL] (1) splDat.y2[1] = -((-273.15) - loa.medium.T_degC) ($RES_SIM_193) (151) [SCAL] (1) heaPum.port_b1.m_flow + sin1.ports[1].m_flow = 0.0 ($RES_SIM_194) (152) [SCAL] (1) $SEV_15 = (1e-6 * heaPum.com.V_flow_nominal) / heaPum.com.vSuc > 0.0 ($RES_EVT_440) (153) [SCAL] (1) sin1.ports[1].p = heaPum.con.port_b.p ($RES_SIM_195) (154) [SCAL] (1) heaPum.m2_flow + Sou.ports[1].m_flow = 0.0 ($RES_SIM_196) (155) [SCAL] (1) Sou.ports[1].p = heaPum.port_a2.p ($RES_SIM_197) (156) [SCAL] (1) heaPum.port_b2.m_flow + sin2.ports[1].m_flow = 0.0 ($RES_SIM_198) (157) [SCAL] (1) sin2.ports[1].p = heaPum.eva.port_b.p ($RES_SIM_199) (158) [SCAL] (1) $SEV_22 = abs(sum({abs(loa.ports[1].m_flow)}) - abs(loa.ports[1].m_flow)) <= 1e-60 ($RES_EVT_447) (159) [SCAL] (1) heaPum.m1_flow + loa.ports[1].m_flow = 0.0 ($RES_SIM_200) (160) [SCAL] (1) loa.ports[1].p = heaPum.port_a1.p ($RES_SIM_201) (161) [SCAL] (1) heaPum.state_a2_inflow.T = 273.15 + 2.390057361376673e-4 * Sou.ports[1].h_outflow ($RES_SIM_360) (162) [SCAL] (1) splDat.y4[1] = loa.m_flow_in ($RES_SIM_202) (163) [SCAL] (1) heaPum.state_b1_inflow.p = heaPum.con.port_b.p ($RES_SIM_361) (164) [SCAL] (1) splDat.y3[1] = Sou.m_flow_in ($RES_SIM_203)