Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_1.6_Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.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 1.6.0+build.1/package.mo", uses=false) Using package Buildings with version 1.6 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 1.6.0+build.1/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.MixingVolumes.Examples.MixingVolumeInitialization,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_1.6_Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization") translateModel(Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_1.6_Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001226/0.001226, allocations: 107.3 kB / 16.42 MB, free: 5.973 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.001296/0.001296, allocations: 191.3 kB / 17.36 MB, free: 5.566 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.327/1.327, allocations: 205.1 MB / 223.2 MB, free: 12.24 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 1.6.0+build.1/package.mo): time 0.4306/0.4306, allocations: 95.48 MB / 366.1 MB, free: 12.16 MB / 318.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.2e-05/2.201e-05, allocations: 6.219 kB / 0.5042 GB, free: 11.91 MB / 398.1 MB Notification: Performance of NFInst.instantiate(Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization): time 0.4362/0.4362, allocations: 156.3 MB / 0.6569 GB, free: 2.434 MB / 0.4981 GB Notification: Performance of NFInst.instExpressions: time 0.01464/0.4509, allocations: 10.44 MB / 0.6671 GB, free: 7.973 MB / 0.5137 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.001134/0.452, allocations: 31.81 kB / 0.6671 GB, free: 7.941 MB / 0.5137 GB Notification: Performance of NFTyping.typeComponents: time 0.001127/0.4532, allocations: 401.4 kB / 0.6675 GB, free: 7.547 MB / 0.5137 GB Notification: Performance of NFTyping.typeBindings: time 0.003989/0.4572, allocations: 1.52 MB / 0.6689 GB, free: 6.02 MB / 0.5137 GB Notification: Performance of NFTyping.typeClassSections: time 0.005651/0.4629, allocations: 2.497 MB / 0.6714 GB, free: 3.535 MB / 0.5137 GB Notification: Performance of NFFlatten.flatten: time 0.003827/0.4667, allocations: 2.743 MB / 0.6741 GB, free: 0.7812 MB / 0.5137 GB Notification: Performance of NFFlatten.resolveConnections: time 0.001036/0.4677, allocations: 0.7089 MB / 0.6748 GB, free: 64 kB / 0.5137 GB Notification: Performance of NFEvalConstants.evaluate: time 0.00229/0.47, allocations: 1.059 MB / 0.6758 GB, free: 15 MB / 0.5294 GB Notification: Performance of NFSimplifyModel.simplify: time 0.001356/0.4714, allocations: 0.993 MB / 0.6768 GB, free: 14 MB / 0.5294 GB Notification: Performance of NFPackage.collectConstants: time 0.0001361/0.4716, allocations: 88 kB / 0.6768 GB, free: 13.92 MB / 0.5294 GB Notification: Performance of NFFlatten.collectFunctions: time 0.004585/0.4761, allocations: 1.969 MB / 0.6788 GB, free: 11.95 MB / 0.5294 GB Notification: Performance of combineBinaries: time 0.001786/0.4779, allocations: 1.812 MB / 0.6805 GB, free: 10.12 MB / 0.5294 GB Notification: Performance of replaceArrayConstructors: time 0.0007619/0.4787, allocations: 1.095 MB / 0.6816 GB, free: 9.012 MB / 0.5294 GB Notification: Performance of NFVerifyModel.verify: time 0.0002422/0.479, allocations: 163.5 kB / 0.6818 GB, free: 8.852 MB / 0.5294 GB Notification: Performance of FrontEnd: time 0.0002125/0.4792, allocations: 31.86 kB / 0.6818 GB, free: 8.82 MB / 0.5294 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 149 (127) * Number of variables: 157 (126) Notification: Performance of Bindings: time 0.004288/0.4835, allocations: 4.576 MB / 0.6863 GB, free: 4.105 MB / 0.5294 GB Notification: Performance of FunctionAlias: time 0.0006415/0.4841, allocations: 0.5176 MB / 0.6868 GB, free: 3.582 MB / 0.5294 GB Notification: Performance of Early Inline: time 0.002208/0.4863, allocations: 2.244 MB / 0.689 GB, free: 1.297 MB / 0.5294 GB Notification: Performance of simplify1: time 0.000228/0.4866, allocations: 183.8 kB / 0.6891 GB, free: 1.117 MB / 0.5294 GB Notification: Performance of Alias: time 0.002737/0.4893, allocations: 2.441 MB / 0.6915 GB, free: 14.46 MB / 0.545 GB Notification: Performance of simplify2: time 0.0001706/0.4895, allocations: 159.8 kB / 0.6917 GB, free: 14.3 MB / 0.545 GB Notification: Performance of Events: time 0.0004743/0.49, allocations: 411.7 kB / 0.6921 GB, free: 13.89 MB / 0.545 GB Notification: Performance of Detect States: time 0.0005648/0.4906, allocations: 0.5546 MB / 0.6926 GB, free: 13.32 MB / 0.545 GB Notification: Performance of Partitioning: time 0.0009097/0.4915, allocations: 0.8999 MB / 0.6935 GB, free: 12.25 MB / 0.545 GB Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (86/117) *************************** (1) [ALGB] (1) protected Real[1] pipe2.flowModel.diameters = 0.5 * (pipe2.flowModel.dimensions[2:2] + pipe2.flowModel.dimensions[1:1]) (2) [ALGB] (2) final Real[2] pipe1.flowModel.roughnesses = {pipe1.roughness, pipe1.roughness} (min = {0.0 for $i1 in 1:2}) (3) [ALGB] (1) flow Real pipe1.port_b.m_flow (min = -1e5, max = 1e60) (4) [ALGB] (1) Real[1] pipe2.flowModel.Is (5) [ALGB] (1) protected Real vol1.dynBal.medium.state.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (6) [ALGB] (1) protected Real vol1.dynBal.medium.p_bar = Modelica.SIunits.Conversions.to_bar(99999.99999999999 * vol1.dynBal.medium.p_bar) (7) [ALGB] (2) final Real[2] pipe2.flowModel.roughnesses = {pipe2.roughness, pipe2.roughness} (min = {0.0 for $i1 in 1:2}) (8) [ALGB] (2) final Real[2] pipe1.flowModel.dimensions = {(4.0 * pipe1.crossArea) / pipe1.perimeter, (4.0 * pipe1.crossArea) / pipe1.perimeter} (9) [ALGB] (1) Real vol1.p (10) [ALGB] (1) final Real[1] pipe1.flowModel.dheights = {pipe1.height_ab} (11) [ALGB] (1) Real pipe2.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (12) [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}) (13) [ALGB] (1) Real[1] pipe2.flowModel.Fs_p (14) [DER-] (1) Real $DER.vol1.dynBal.m (15) [ALGB] (1) Real[1] sou1.ports.p (start = {1e5 for $i1 in 1:1}, 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 pipe1.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (17) [ALGB] (1) Real[1] pipe2.flowModel.Fs_fg (18) [ALGB] (1) protected Real vol1.dynBal.medium.T_degC = Modelica.SIunits.Conversions.to_degC(-((-273.15) - vol1.dynBal.medium.T_degC)) (19) [ALGB] (1) protected Real vol1.dynBal.mb_flow (20) [ALGB] (1) Real[1] pipe2.flowModel.pathLengths_internal = pipe2.flowModel.pathLengths (21) [ALGB] (1) stream Real pipe2.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (22) [ALGB] (1) stream Real pipe1.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (23) [ALGB] (1) final Real[1] pipe2.flowModel.pathLengths = {pipe2.length} (24) [ALGB] (1) Real $FUN_8 (25) [ALGB] (1) flow Real pipe2.port_b.m_flow (min = -1e5, max = 1e60) (26) [ALGB] (2) final Real[2] pipe2.flowModel.dimensions = {(4.0 * pipe2.crossArea) / pipe2.perimeter, (4.0 * pipe2.crossArea) / pipe2.perimeter} (27) [ALGB] (1) Real $FUN_6 (28) [ALGB] (4) input Real[2, 2] pipe1.flowModel.states.p (start = {1e5 for $i1 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}) (29) [ALGB] (1) protected Real[1] pipe1.flowModel.diameters = 0.5 * (pipe1.flowModel.dimensions[2:2] + pipe1.flowModel.dimensions[1:1]) (30) [ALGB] (1) Real $FUN_2 (31) [ALGB] (1) Real $FUN_1 (32) [ALGB] (2) Real[2] vol1.ports.p (start = {1e5 for $i1 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}) (33) [DER-] (1) Real $DER.vol1.dynBal.U (34) [ALGB] (1) flow Real[1] sin1.ports.m_flow (min = {-1e60}, max = {1e60}) (35) [ALGB] (2) Real[2] pipe2.flowModel.vs = {(-pipe2.port_b.m_flow) / (pipe2.flowModel.crossAreas[1] * Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.Medium.density(pipe2.flowModel.states[1])), -pipe2.port_b.m_flow / (Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.Medium.density(pipe2.flowModel.states[2]) * pipe2.flowModel.crossAreas[2])} / pipe2.nParallel (36) [ALGB] (1) Real[1] pipe1.flowModel.Fs_p (37) [ALGB] (2) stream Real[2] vol1.ports.h_outflow (min = {-1e10 for $i1 in 1:2}, max = {1e10 for $i1 in 1:2}, nominal = {1e6 for $i1 in 1:2}) (38) [ALGB] (1) Real[1] pipe2.flowModel.Ib_flows (39) [ALGB] (1) Real[1] sin1.ports.p (start = {1e5 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {1e5 for $i1 in 1:1}) (40) [ALGB] (1) Real[1] pipe1.flowModel.rhos_act (start = {1.0 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, nominal = {1.0 for $i1 in 1:1}) (41) [ALGB] (4) input Real[2, 2] pipe2.flowModel.states.T (start = {288.15 for $i1 in 1:2}, min = {273.15 for $states1 in 1:2}, max = {373.15 for $states1 in 1:2}, nominal = {300.0 for $i1 in 1:2}) (42) [ALGB] (2) final Real[2] pipe1.flowModel.crossAreas = {pipe1.crossArea, pipe1.crossArea} (43) [ALGB] (1) Real[1] pipe1.flowModel.Fs_fg (44) [ALGB] (1) Real[1] pipe2.flowModel.m_flows (start = {0.0 for $i1 in 1:1}, min = {-1e60 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, StateSelect = default) (45) [ALGB] (4) input Real[2, 2] pipe1.flowModel.states.T (start = {288.15 for $i1 in 1:2}, min = {273.15 for $states1 in 1:2}, max = {373.15 for $states1 in 1:2}, nominal = {300.0 for $i1 in 1:2}) (46) [ALGB] (1) Real[1] pipe1.flowModel.Is (47) [ALGB] (1) Real[1] pipe2.flowModel.rhos_act (start = {1.0 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, nominal = {1.0 for $i1 in 1:1}) (48) [ALGB] (1) Real[1] pipe2.flowModel.dps_fg (start = {pipe2.flowModel.p_a_start - pipe2.flowModel.p_b_start for $i1 in 1:1}) (49) [ALGB] (1) Real[1] pipe1.flowModel.m_flows (start = {0.0 for $i1 in 1:1}, min = {-1e60 for $i1 in 1:1}, max = {1e5 for $i1 in 1:1}, StateSelect = default) (50) [ALGB] (1) Real[1] pipe1.flowModel.Ib_flows (51) [ALGB] (1) flow Real[1] sou1.ports.m_flow (min = {-1e60}, max = {1e60}) (52) [ALGB] (1) protected Real vol1.dynBal.medium.d (start = vol1.dynBal.rho_nominal, min = 0.0, max = 1e5, nominal = 1.0) (53) [ALGB] (1) protected Real vol1.dynBal.Hb_flow (54) [ALGB] (1) Real[1] pipe2.flowModel.mus_act (start = {0.001 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {0.001 for $i1 in 1:1}) (55) [ALGB] (1) stream Real[1] sou1.ports.h_outflow (min = {-1e10 for $i1 in 1:1}, max = {1e10 for $i1 in 1:1}, nominal = {1e6 for $i1 in 1:1}) (56) [ALGB] (2) protected Real[2] vol1.dynBal.ports.p (start = {1e5 for $i1 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}) (57) [ALGB] (2) protected Real[2] vol1.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}) (58) [ALGB] (2) Real[2] pipe2.flowModel.rhos = {Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.flowModel.Medium.density(pipe2.flowModel.states[$i1]) for $i1 in 1:2} (start = {1.0 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}, nominal = {1.0 for $i1 in 1:2}) (59) [ALGB] (1) Real pipe1.port_b.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (60) [ALGB] (2) Real[2] pipe2.flowModel.mus = {Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.flowModel.Medium.dynamicViscosity(pipe2.flowModel.states[$i1]) for $i1 in 1:2} (start = {0.001 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {0.001 for $i1 in 1:2}) (61) [ALGB] (1) Real[1] pipe1.flowModel.mus_act (start = {0.001 for $i1 in 1:1}, min = {0.0 for $i1 in 1:1}, max = {1e8 for $i1 in 1:1}, nominal = {0.001 for $i1 in 1:1}) (62) [ALGB] (2) Real[2] pipe1.flowModel.mus = {Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.flowModel.Medium.dynamicViscosity(pipe1.flowModel.states[$i1]) for $i1 in 1:2} (start = {0.001 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e8 for $i1 in 1:2}, nominal = {0.001 for $i1 in 1:2}) (63) [DISC] (1) Boolean $SEV_8 (64) [ALGB] (1) protected Real vol1.dynBal.medium.u (min = -1e8, max = 1e8, nominal = 1e6) (65) [DISC] (1) Boolean $SEV_6 (66) [ALGB] (1) Real pipe2.port_a.p (start = 1e5, min = 0.0, max = 1e8, nominal = 1e5) (67) [ALGB] (4) input Real[2, 2] pipe2.flowModel.states.p (start = {1e5 for $i1 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}) (68) [DISC] (1) Boolean $SEV_1 (69) [DISC] (1) Boolean $SEV_0 (70) [ALGB] (1) Real[1] pipe1.flowModel.dps_fg (start = {pipe1.flowModel.p_a_start - pipe1.flowModel.p_b_start for $i1 in 1:1}) (71) [ALGB] (1) final Real[1] pipe1.flowModel.pathLengths = {pipe1.length} (72) [ALGB] (1) Real[1] pipe1.flowModel.Res_turbulent_internal = pipe1.flowModel.Re_turbulent * {1.0 for $i1 in 1:1} (73) [ALGB] (2) Real[2] pipe1.flowModel.vs = {(-pipe1.port_b.m_flow) / (pipe1.flowModel.crossAreas[1] * Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.Medium.density(pipe1.flowModel.states[1])), -pipe1.port_b.m_flow / (Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.Medium.density(pipe1.flowModel.states[2]) * pipe1.flowModel.crossAreas[2])} / pipe1.nParallel (74) [ALGB] (1) protected Real vol1.dynBal.medium.state.T (start = 288.15, min = 273.15, max = 373.15, nominal = 300.0) (75) [ALGB] (2) Real[2] pipe1.flowModel.rhos = {Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.flowModel.Medium.density(pipe1.flowModel.states[$i1]) for $i1 in 1:2} (start = {1.0 for $i1 in 1:2}, min = {0.0 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}, nominal = {1.0 for $i1 in 1:2}) (76) [ALGB] (2) protected flow Real[2] vol1.dynBal.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (77) [ALGB] (2) final Real[2] pipe2.flowModel.crossAreas = {pipe2.crossArea, pipe2.crossArea} (78) [ALGB] (1) stream Real pipe2.port_a.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (79) [ALGB] (2) flow Real[2] vol1.ports.m_flow (min = {-1e5 for $i1 in 1:2}, max = {1e5 for $i1 in 1:2}) (80) [ALGB] (1) stream Real pipe1.port_b.h_outflow (min = -1e10, max = 1e10, nominal = 1e6) (81) [ALGB] (1) protected Real pipe1.flowModel.dp_fric_nominal = sum({Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.flowModel.WallFriction.pressureLoss_m_flow(pipe1.flowModel.m_flow_nominal / pipe1.flowModel.nParallel, pipe1.flowModel.rho_nominal, pipe1.flowModel.rho_nominal, pipe1.flowModel.mu_nominal, pipe1.flowModel.mu_nominal, pipe1.flowModel.pathLengths_internal[1], pipe1.flowModel.diameters[1], ((pipe1.flowModel.crossAreas[2:2] + pipe1.flowModel.crossAreas[1:1]) / 2.0)[1], ((pipe1.flowModel.roughnesses[2:2] + pipe1.flowModel.roughnesses[1:1]) / 2.0)[1], pipe1.flowModel.m_flow_small / pipe1.flowModel.nParallel, pipe1.flowModel.Res_turbulent_internal[1])}) (min = 0.0, nominal = 1e5) (82) [ALGB] (1) final Real[1] pipe2.flowModel.dheights = {pipe2.height_ab} (83) [ALGB] (2) protected stream Real[2] vol1.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}) (84) [ALGB] (1) protected Real pipe2.flowModel.dp_fric_nominal = sum({Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.flowModel.WallFriction.pressureLoss_m_flow(pipe2.flowModel.m_flow_nominal / pipe2.flowModel.nParallel, pipe2.flowModel.rho_nominal, pipe2.flowModel.rho_nominal, pipe2.flowModel.mu_nominal, pipe2.flowModel.mu_nominal, pipe2.flowModel.pathLengths_internal[1], pipe2.flowModel.diameters[1], ((pipe2.flowModel.crossAreas[2:2] + pipe2.flowModel.crossAreas[1:1]) / 2.0)[1], ((pipe2.flowModel.roughnesses[2:2] + pipe2.flowModel.roughnesses[1:1]) / 2.0)[1], pipe2.flowModel.m_flow_small / pipe2.flowModel.nParallel, pipe2.flowModel.Res_turbulent_internal[1])}) (min = 0.0, nominal = 1e5) (85) [ALGB] (1) Real[1] pipe1.flowModel.pathLengths_internal = pipe1.flowModel.pathLengths (86) [ALGB] (1) Real[1] pipe2.flowModel.Res_turbulent_internal = pipe2.flowModel.Re_turbulent * {1.0 for $i1 in 1:1} System Equations (87/109) *************************** (1) [SCAL] (1) pipe1.port_b.h_outflow = sou1.ports[1].h_outflow - system.g * pipe1.height_ab ($RES_SIM_50) (2) [SCAL] (1) $DER.vol1.dynBal.U = vol1.dynBal.Hb_flow ($RES_SIM_15) (3) [ARRY] (1) pipe2.flowModel.pathLengths_internal = pipe2.flowModel.pathLengths ($RES_BND_146) (4) [SCAL] (1) pipe2.flowModel.Res_turbulent_internal[1] = pipe2.flowModel.Re_turbulent ($RES_BND_147) (5) [SCAL] (1) -pipe1.port_b.m_flow = pipe1.flowModel.m_flows[1] ($RES_SIM_52) (6) [ARRY] (1) pipe2.flowModel.diameters = 0.5 * (pipe2.flowModel.dimensions[2:2] + pipe2.flowModel.dimensions[1:1]) ($RES_BND_148) (7) [ARRY] (1) {0.0} = pipe1.flowModel.Ib_flows - (pipe1.flowModel.Fs_fg + pipe1.flowModel.Fs_p) ($RES_SIM_53) (8) [SCAL] (1) vol1.dynBal.ports_H_flow[2] = smooth(0, vol1.dynBal.ports[2].m_flow * (if $SEV_0 then pipe2.port_a.h_outflow else vol1.dynBal.ports[2].h_outflow)) ($RES_SIM_18) (9) [ARRY] (1) pipe1.flowModel.Is = {pipe1.flowModel.m_flows[1] * pipe1.flowModel.pathLengths[1]} ($RES_SIM_54) (10) [SCAL] (1) vol1.dynBal.ports_H_flow[1] = smooth(0, vol1.dynBal.ports[1].m_flow * (if $SEV_1 then pipe1.port_b.h_outflow else vol1.dynBal.ports[1].h_outflow)) ($RES_SIM_19) (11) [ARRY] (1) pipe1.flowModel.dps_fg = {(2.0 * (pipe1.flowModel.Fs_fg[1] / pipe1.flowModel.nParallel)) / (pipe1.flowModel.crossAreas[1] + pipe1.flowModel.crossAreas[2])} ($RES_SIM_55) (12) [ARRY] (1) pipe1.flowModel.Fs_p = pipe1.flowModel.nParallel * {0.5 * (pipe1.flowModel.crossAreas[1] + pipe1.flowModel.crossAreas[2]) * (pipe1.flowModel.states.T - pipe1.flowModel.states.T)} ($RES_SIM_56) (13) [ARRY] (1) pipe1.flowModel.Ib_flows = {0.0} ($RES_SIM_57) (14) [SCAL] (1) pipe1.flowModel.rhos_act[1] = noEvent(if $SEV_8 then pipe1.flowModel.rhos[1] else pipe1.flowModel.rhos[2]) ($RES_SIM_58) (15) [SCAL] (1) pipe1.flowModel.mus_act[1] = noEvent(if $SEV_8 then pipe1.flowModel.mus[1] else pipe1.flowModel.mus[2]) ($RES_SIM_59) (16) [SCAL] (1) $SEV_0 = vol1.dynBal.ports[2].m_flow > 0.0 ($RES_EVT_172) (17) [SCAL] (1) $SEV_1 = vol1.dynBal.ports[1].m_flow > 0.0 ($RES_EVT_173) (18) [SCAL] (1) $SEV_6 = pipe2.flowModel.m_flows[1] > 0.0 ($RES_EVT_178) (19) [SCAL] (1) vol1.ports[2].m_flow - pipe2.port_b.m_flow = 0.0 ($RES_SIM_102) (20) [SCAL] (1) vol1.dynBal.U = vol1.dynBal.m * vol1.dynBal.medium.u ($RES_SIM_21) (21) [SCAL] (1) pipe2.port_b.m_flow + sin1.ports[1].m_flow = 0.0 ($RES_SIM_103) (22) [SCAL] (1) vol1.dynBal.m = vol1.V * vol1.dynBal.medium.d ($RES_SIM_22) (23) [SCAL] (1) vol1.ports[1].m_flow + pipe1.port_b.m_flow = 0.0 ($RES_SIM_104) (24) [SCAL] (1) pipe2.port_b.p = sin1.ports[1].p ($RES_SIM_105) (25) [SCAL] (1) vol1.ports[2].p = pipe2.port_a.p ($RES_SIM_106) (26) [ARRY] (4) pipe1.flowModel.states = {Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.Medium.ThermodynamicState(pipe1.port_a.p, 298.15 + 9.945795414988312e-4 * sou1.ports[1].h_outflow), Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.Medium.ThermodynamicState(pipe1.port_b.p, 298.15 + 9.945795414988312e-4 * vol1.ports[1].h_outflow)} ($RES_BND_154) (27) [ARRY] (1) pipe1.flowModel.m_flows = {homotopy(({$FUN_1} .* pipe1.flowModel.nParallel)[1], (pipe1.flowModel.m_flow_nominal / pipe1.flowModel.dp_nominal * (pipe1.flowModel.dps_fg - (pipe1.flowModel.g * pipe1.flowModel.dheights) .* pipe1.flowModel.rho_nominal))[1])} ($RES_SIM_60) (28) [SCAL] (1) pipe1.port_b.p = vol1.ports[1].p ($RES_SIM_107) (29) [ARRY] (4) pipe2.flowModel.states = {Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.Medium.ThermodynamicState(pipe2.port_a.p, 298.15 + 9.945795414988312e-4 * vol1.ports[2].h_outflow), Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.Medium.ThermodynamicState(pipe2.port_b.p, 298.15 + 9.945795414988312e-4 * sin1.ports[1].h_outflow)} ($RES_BND_155) (30) [SCAL] (1) sin1.ports[1].p = sin1.p ($RES_SIM_61) (31) [SCAL] (1) sou1.ports[1].m_flow - pipe1.port_b.m_flow = 0.0 ($RES_SIM_108) (32) [SCAL] (1) sin1.ports[1].h_outflow = 1005.45 * ((-298.15) + sin1.T) ($RES_SIM_62) (33) [SCAL] (1) vol1.dynBal.medium.state.p = 99999.99999999999 * vol1.dynBal.medium.p_bar ($RES_SIM_27) (34) [SCAL] (1) sou1.ports[1].p = pipe1.port_a.p ($RES_SIM_109) (35) [SCAL] (1) vol1.dynBal.medium.state.T = -((-273.15) - vol1.dynBal.medium.T_degC) ($RES_SIM_28) (36) [SCAL] (1) $SEV_8 = pipe1.flowModel.m_flows[1] > 0.0 ($RES_EVT_180) (37) [ARRY] (2) pipe1.flowModel.vs = {-pipe1.port_b.m_flow / (pipe1.flowModel.crossAreas[1] * ((0.003483703884165752 * pipe1.flowModel.states.T) / pipe1.flowModel.states.p)), -pipe1.port_b.m_flow / (((0.003483703884165752 * pipe1.flowModel.states.T) / pipe1.flowModel.states.p) * pipe1.flowModel.crossAreas[2])} / pipe1.nParallel ($RES_BND_122) (38) [ARRY] (2) pipe1.flowModel.crossAreas = {pipe1.crossArea, pipe1.crossArea} ($RES_BND_123) (39) [SCAL] (1) vol1.dynBal.ports[2].h_outflow = vol1.ports[2].h_outflow ($RES_SIM_111) (40) [ARRY] (2) pipe1.flowModel.dimensions = {(4.0 * pipe1.crossArea) / pipe1.perimeter, (4.0 * pipe1.crossArea) / pipe1.perimeter} ($RES_BND_124) (41) [SCAL] (1) vol1.dynBal.ports[1].h_outflow = vol1.ports[1].h_outflow ($RES_SIM_112) (42) [SCAL] (1) vol1.dynBal.medium.d = -(0.003483703884165752 * (99999.99999999999 * vol1.dynBal.medium.p_bar)) / ((-273.15) - vol1.dynBal.medium.T_degC) ($RES_SIM_30) (43) [ARRY] (2) pipe1.flowModel.roughnesses = {pipe1.roughness, pipe1.roughness} ($RES_BND_125) (44) [SCAL] (1) $FUN_1 = Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.flowModel.WallFriction.massFlowRate_dp_staticHead(pipe1.flowModel.dps_fg[1], pipe1.flowModel.rhos[1], pipe1.flowModel.rhos[2], pipe1.flowModel.mus[1], pipe1.flowModel.mus[2], pipe1.flowModel.pathLengths_internal[1], pipe1.flowModel.diameters[1], (pipe1.flowModel.g * pipe1.flowModel.dheights)[1], (0.5 .* (pipe1.flowModel.crossAreas[1:1] + pipe1.flowModel.crossAreas[2:2]))[1], (0.5 .* (pipe1.flowModel.roughnesses[1:1] + pipe1.flowModel.roughnesses[2:2]))[1], pipe1.flowModel.dp_small, pipe1.flowModel.Res_turbulent_internal[1]) ($RES_$AUX_164) (45) [FOR-] (2) ($RES_SIM_113) (45) [----] for $i1 in 1:2 loop (45) [----] [SCAL] (1) vol1.dynBal.ports[$i1].m_flow - vol1.ports[$i1].m_flow = 0.0 ($RES_SIM_114) (45) [----] end for; (46) [ARRY] (1) pipe1.flowModel.dheights = {pipe1.height_ab} ($RES_BND_126) (47) [SCAL] (1) $FUN_2 = Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.flowModel.WallFriction.massFlowRate_dp_staticHead(pipe2.flowModel.dps_fg[1], pipe2.flowModel.rhos[1], pipe2.flowModel.rhos[2], pipe2.flowModel.mus[1], pipe2.flowModel.mus[2], pipe2.flowModel.pathLengths_internal[1], pipe2.flowModel.diameters[1], (pipe2.flowModel.g * pipe2.flowModel.dheights)[1], (0.5 .* (pipe2.flowModel.crossAreas[1:1] + pipe2.flowModel.crossAreas[2:2]))[1], (0.5 .* (pipe2.flowModel.roughnesses[1:1] + pipe2.flowModel.roughnesses[2:2]))[1], pipe2.flowModel.dp_small, pipe2.flowModel.Res_turbulent_internal[1]) ($RES_$AUX_163) (48) [SCAL] (1) vol1.dynBal.medium.u = 287.0508037566665 * ((-273.15) - vol1.dynBal.medium.T_degC) + 1005.45 * ((-298.15) - ((-273.15) - vol1.dynBal.medium.T_degC)) ($RES_SIM_32) (49) [ARRY] (1) pipe1.flowModel.pathLengths = {pipe1.length} ($RES_BND_127) (50) [SCAL] (1) vol1.dynBal.mb_flow = sum(vol1.dynBal.ports.m_flow) ($RES_$AUX_162) (51) [ARRY] (2) vol1.dynBal.ports.p = vol1.ports.p ($RES_SIM_115) (52) [FOR-] (2) ($RES_BND_128) (52) [----] for $i1 in 1:2 loop (52) [----] [SCAL] (1) pipe1.flowModel.rhos[$i1] = (0.003483703884165752 * pipe1.flowModel.states.T) / pipe1.flowModel.states.p ($RES_BND_129) (52) [----] end for; (53) [SCAL] (1) vol1.dynBal.Hb_flow = sum(vol1.dynBal.ports_H_flow) ($RES_$AUX_161) (54) [SCAL] (1) pipe2.port_a.h_outflow = sin1.ports[1].h_outflow + system.g * pipe2.height_ab ($RES_SIM_36) (55) [SCAL] (1) pipe2.port_b.h_outflow = vol1.ports[2].h_outflow - system.g * pipe2.height_ab ($RES_SIM_37) (56) [SCAL] (1) -pipe2.port_b.m_flow = pipe2.flowModel.m_flows[1] ($RES_SIM_39) (57) [FOR-] (2) ($RES_BND_130) (57) [----] for $i1 in 1:2 loop (57) [----] [SCAL] (1) pipe1.flowModel.mus[$i1] = 1.82e-5 ($RES_BND_131) (57) [----] end for; (58) [SCAL] (1) $FUN_6 = Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe2.flowModel.WallFriction.pressureLoss_m_flow(pipe2.flowModel.m_flow_nominal / pipe2.flowModel.nParallel, pipe2.flowModel.rho_nominal, pipe2.flowModel.rho_nominal, pipe2.flowModel.mu_nominal, pipe2.flowModel.mu_nominal, pipe2.flowModel.pathLengths_internal[1], pipe2.flowModel.diameters[1], (0.5 .* (pipe2.flowModel.crossAreas[2:2] + pipe2.flowModel.crossAreas[1:1]))[1], (0.5 .* (pipe2.flowModel.roughnesses[2:2] + pipe2.flowModel.roughnesses[1:1]))[1], pipe2.flowModel.m_flow_small / pipe2.flowModel.nParallel, pipe2.flowModel.Res_turbulent_internal[1]) ($RES_$AUX_159) (59) [SCAL] (1) pipe2.flowModel.dp_fric_nominal = sum({$FUN_6}) ($RES_$AUX_158) (60) [ARRY] (1) pipe1.flowModel.pathLengths_internal = pipe1.flowModel.pathLengths ($RES_BND_132) (61) [SCAL] (1) $FUN_8 = Buildings.Fluid.MixingVolumes.Examples.MixingVolumeInitialization.pipe1.flowModel.WallFriction.pressureLoss_m_flow(pipe1.flowModel.m_flow_nominal / pipe1.flowModel.nParallel, pipe1.flowModel.rho_nominal, pipe1.flowModel.rho_nominal, pipe1.flowModel.mu_nominal, pipe1.flowModel.mu_nominal, pipe1.flowModel.pathLengths_internal[1], pipe1.flowModel.diameters[1], (0.5 .* (pipe1.flowModel.crossAreas[2:2] + pipe1.flowModel.crossAreas[1:1]))[1], (0.5 .* (pipe1.flowModel.roughnesses[2:2] + pipe1.flowModel.roughnesses[1:1]))[1], pipe1.flowModel.m_flow_small / pipe1.flowModel.nParallel, pipe1.flowModel.Res_turbulent_internal[1]) ($RES_$AUX_157) (62) [SCAL] (1) pipe1.flowModel.Res_turbulent_internal[1] = pipe1.flowModel.Re_turbulent ($RES_BND_133) (63) [SCAL] (1) pipe1.flowModel.dp_fric_nominal = sum({$FUN_8}) ($RES_$AUX_156) (64) [ARRY] (1) pipe1.flowModel.diameters = 0.5 * (pipe1.flowModel.dimensions[2:2] + pipe1.flowModel.dimensions[1:1]) ($RES_BND_134) (65) [ARRY] (1) {0.0} = pipe2.flowModel.Ib_flows - (pipe2.flowModel.Fs_fg + pipe2.flowModel.Fs_p) ($RES_SIM_40) (66) [ARRY] (1) pipe2.flowModel.Is = {pipe2.flowModel.m_flows[1] * pipe2.flowModel.pathLengths[1]} ($RES_SIM_41) (67) [ARRY] (2) pipe2.flowModel.vs = {-pipe2.port_b.m_flow / (pipe2.flowModel.crossAreas[1] * ((0.003483703884165752 * pipe2.flowModel.states.T) / pipe2.flowModel.states.p)), -pipe2.port_b.m_flow / (((0.003483703884165752 * pipe2.flowModel.states.T) / pipe2.flowModel.states.p) * pipe2.flowModel.crossAreas[2])} / pipe2.nParallel ($RES_BND_136) (68) [ARRY] (1) pipe2.flowModel.dps_fg = {(2.0 * (pipe2.flowModel.Fs_fg[1] / pipe2.flowModel.nParallel)) / (pipe2.flowModel.crossAreas[1] + pipe2.flowModel.crossAreas[2])} ($RES_SIM_42) (69) [ARRY] (2) pipe2.flowModel.crossAreas = {pipe2.crossArea, pipe2.crossArea} ($RES_BND_137) (70) [ARRY] (1) pipe2.flowModel.Fs_p = pipe2.flowModel.nParallel * {0.5 * (pipe2.flowModel.crossAreas[1] + pipe2.flowModel.crossAreas[2]) * (pipe2.flowModel.states.T - pipe2.flowModel.states.T)} ($RES_SIM_43) (71) [ARRY] (2) pipe2.flowModel.dimensions = {(4.0 * pipe2.crossArea) / pipe2.perimeter, (4.0 * pipe2.crossArea) / pipe2.perimeter} ($RES_BND_138) (72) [ARRY] (1) pipe2.flowModel.Ib_flows = {0.0} ($RES_SIM_44) (73) [ARRY] (2) pipe2.flowModel.roughnesses = {pipe2.roughness, pipe2.roughness} ($RES_BND_139) (74) [SCAL] (1) pipe2.flowModel.rhos_act[1] = noEvent(if $SEV_6 then pipe2.flowModel.rhos[1] else pipe2.flowModel.rhos[2]) ($RES_SIM_45) (75) [SCAL] (1) sou1.ports[1].p = sou1.p ($RES_SIM_81) (76) [SCAL] (1) pipe2.flowModel.mus_act[1] = noEvent(if $SEV_6 then pipe2.flowModel.mus[1] else pipe2.flowModel.mus[2]) ($RES_SIM_46) (77) [SCAL] (1) sou1.ports[1].h_outflow = 1005.45 * ((-298.15) + sou1.T) ($RES_SIM_82) (78) [ARRY] (1) pipe2.flowModel.m_flows = {homotopy(({$FUN_2} .* pipe2.flowModel.nParallel)[1], (pipe2.flowModel.m_flow_nominal / pipe2.flowModel.dp_nominal * (pipe2.flowModel.dps_fg - (pipe2.flowModel.g * pipe2.flowModel.dheights) .* pipe2.flowModel.rho_nominal))[1])} ($RES_SIM_47) (79) [SCAL] (1) pipe1.port_a.h_outflow = vol1.ports[1].h_outflow + system.g * pipe1.height_ab ($RES_SIM_49) (80) [SCAL] (1) vol1.p = vol1.ports[1].p ($RES_SIM_8) (81) [ARRY] (1) pipe2.flowModel.dheights = {pipe2.height_ab} ($RES_BND_140) (82) [FOR-] (2) ($RES_SIM_10) (82) [----] for $i1 in 1:2 loop (82) [----] [SCAL] (1) vol1.dynBal.ports[$i1].p = 99999.99999999999 * vol1.dynBal.medium.p_bar ($RES_SIM_11) (82) [----] end for; (83) [ARRY] (1) pipe2.flowModel.pathLengths = {pipe2.length} ($RES_BND_141) (84) [FOR-] (2) ($RES_BND_142) (84) [----] for $i1 in 1:2 loop (84) [----] [SCAL] (1) pipe2.flowModel.rhos[$i1] = (0.003483703884165752 * pipe2.flowModel.states.T) / pipe2.flowModel.states.p ($RES_BND_143) (84) [----] end for; (85) [FOR-] (2) ($RES_SIM_12) (85) [----] for $i1 in 1:2 loop (85) [----] [SCAL] (1) vol1.dynBal.ports[$i1].h_outflow = 1005.45 * ((-298.15) - ((-273.15) - vol1.dynBal.medium.T_degC)) ($RES_SIM_13) (85) [----] end for; (86) [FOR-] (2) ($RES_BND_144) (86) [----] for $i1 in 1:2 loop (86) [----] [SCAL] (1) pipe2.flowModel.mus[$i1] = 1.82e-5 ($RES_BND_145) (86) [----] end for; (87) [SCAL] (1) $DER.vol1.dynBal.m = vol1.dynBal.mb_flow + vol1.masExc.k ($RES_SIM_14)