Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CO2 features to large office complex air #4

Conversation

GuowenLi-PhD
Copy link

@GuowenLi-PhD GuowenLi-PhD commented Jul 15, 2024

Main Updates:

  1. Add CO2 property to building mix air volume and fresh air source models
  2. Add CO2 sensors to all 15 zones and 3 AHUs and the measurements to the Read blocks following BOPTEST template
  3. Reverse the connection of AHU return air flow sensor to make the measurement value positive
  4. Add example models to subsystem models for testing purposes

Remain Question

  • In MultizoneOfficeComplexAir.TestCases.TestCase, the code of MultizoneOfficeComplexAir.BaseClasses.LoadSide.LoadWrapper needs to be placed after MultizoneOfficeComplexAir.BaseClasses.HVACSide.HVAC to simulate successfully, otherwise the model initialization fails. The specific reason for this setting needs to be clarified.
    Potential solution: please refer to pull request Adjusted system equipment sizing and Resolved nonlinear system warnings. #7 : To avoid initialization failure, set initial economizer damper positions as open (refer to the commit e370209)

terrancelu92 and others added 30 commits October 18, 2022 14:49
1. Replace Medium Air with Buildings library air media package with CO2
2. CO2 inputs are calculated based on the number of occupant in each thermal zone
3. Add CO2 sensors for each thermal zone
However, error: could not solve simplified initialization for homotopy method; Integrator failed to start model.
Although 'TestSuccess' run successfully, we need to debug why 'TestCase' failed to initialize since two system models are almost the same.
LoadWrapper needs to be put behind of HVAC to avoid model initialization failure (but reason is not clear yet)
Copy link
Owner

@terrancelu92 terrancelu92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuowenLi-PhD , thank you. Please see my in-line comments, make corresponding changes, and submit a new PR.

@GuowenLi-PhD
Copy link
Author

GuowenLi-PhD commented Jul 18, 2024

All comments resolved, I have requested a new review.

@terrancelu92 terrancelu92 merged commit 03a9186 into terrancelu92:issue1_addCO2_largeOffice_complexAir Jul 21, 2024
@terrancelu92
Copy link
Owner

The testcase model after adding CO2 sensors cannot be solved by Dymola 2021 but Dymola 2024. The following errors are reported:

ERROR: Failed to solve nonlinear system using Newton solver.
  During initialization at time: 15552000
  Tag: initialization.nonlinear[29]

  Common causes:
   * The system of equations has no solution - the residual will be above zero.
     - This may be caused by initial conditions not being fully specified, check the translation log.
     - In some cases the event-logic can cause this.
   * Starting values are too far from the solution, see homotopy in the manual.
     - In rare cases this could occur at events.
   * The equations are too discontinuous for the nonlinear solver - the residual will have knees.
     - Likely caused by over-using noEvent.
  Especially consider the first two items above when the nonlinear solver fails during initialization.

  To get more information consider the options:
   * Simulation/Setup/Translation/Generate listing of translated Modelica code in dsmodel.mof
   * Simulation/Setup/Translation/List non-linear iteration variables
   * Simulation/Setup/Debug/Store variables after failed initialization
     - If a failure to solve a nonlinear equation caused failed initialization.
   * The options under the group Simulation/Setup/Debug/Nonlinear solver diagnostics

  Jacobian inverse norm estimate: 137074
  Condition number estimate: 182.156
  1-norm of the residual = 29444.7

  Last value of the solution:
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.valFre.dp = -1173.25
    hva.floor3.duaFanAirHanUni.cooCoi.port_a_Air.p = 101193
    hva.floor3.duaFanAirHanUni.retFan.varSpeFloMov.VMachine_flow = 57.7338
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.valExh.dp = 1308.43
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.jun1.res3.dp = 23.4808
  Last value of the residual:
    { -13.6311, -9067.21, 20213.4, 0.00782236, 150.454 }
 
Trying to solve non-linear system using global homotopy-method.
Error: The following error was detected at time: 15552000
Modelica model specifies zone '        "name": "Perimeter_bot_ZN_3"' twice, once in TestCase.loaEnePlu.whoBui.fmuZonBotFlr[4] and once in TestCase.loaEnePlu.whoBui.fmuZonBotFlr[4], both belonging to building TestCase.loaEnePlu.building. Each zone must only be specified once per building.
Error: could not solve simplified initialization for homotopy method.

@terrancelu92
Copy link
Owner

terrancelu92 commented Jul 22, 2024

  1. The initialization CO2 values of the AHU-level airflows starts off at 0 while the CO2 values for the zone air flows seem to start at 400 ppm. @GuowenLi-PhD , please help check and address this issue. Not sure if it relates to the initialization error in Dymola 2020.

image

  1. Also, please also help look into the highlighted circle area -> why does the outdoor air CO2 have such behavior?

image

@terrancelu92
Copy link
Owner

terrancelu92 commented Jul 22, 2024

The testcase model after adding CO2 sensors cannot be solved by Dymola 2021 but Dymola 2024. The following errors are reported:

ERROR: Failed to solve nonlinear system using Newton solver.
  During initialization at time: 15552000
  Tag: initialization.nonlinear[29]

  Common causes:
   * The system of equations has no solution - the residual will be above zero.
     - This may be caused by initial conditions not being fully specified, check the translation log.
     - In some cases the event-logic can cause this.
   * Starting values are too far from the solution, see homotopy in the manual.
     - In rare cases this could occur at events.
   * The equations are too discontinuous for the nonlinear solver - the residual will have knees.
     - Likely caused by over-using noEvent.
  Especially consider the first two items above when the nonlinear solver fails during initialization.

  To get more information consider the options:
   * Simulation/Setup/Translation/Generate listing of translated Modelica code in dsmodel.mof
   * Simulation/Setup/Translation/List non-linear iteration variables
   * Simulation/Setup/Debug/Store variables after failed initialization
     - If a failure to solve a nonlinear equation caused failed initialization.
   * The options under the group Simulation/Setup/Debug/Nonlinear solver diagnostics

  Jacobian inverse norm estimate: 137074
  Condition number estimate: 182.156
  1-norm of the residual = 29444.7

  Last value of the solution:
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.valFre.dp = -1173.25
    hva.floor3.duaFanAirHanUni.cooCoi.port_a_Air.p = 101193
    hva.floor3.duaFanAirHanUni.retFan.varSpeFloMov.VMachine_flow = 57.7338
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.valExh.dp = 1308.43
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.jun1.res3.dp = 23.4808
  Last value of the residual:
    { -13.6311, -9067.21, 20213.4, 0.00782236, 150.454 }
 
Trying to solve non-linear system using global homotopy-method.
Error: The following error was detected at time: 15552000
Modelica model specifies zone '        "name": "Perimeter_bot_ZN_3"' twice, once in TestCase.loaEnePlu.whoBui.fmuZonBotFlr[4] and once in TestCase.loaEnePlu.whoBui.fmuZonBotFlr[4], both belonging to building TestCase.loaEnePlu.building. Each zone must only be specified once per building.
Error: could not solve simplified initialization for homotopy method.

@GuowenLi-PhD , please output the .mof file and check initialization.nonlinear[29] . Not sure if this nonlinear equations are related to the initialization error in Dymola 2021.

@GuowenLi-PhD
Copy link
Author

GuowenLi-PhD commented Jul 22, 2024

  1. The initialization CO2 values of the AHU-level airflows starts off at 0 while the CO2 values for the zone air flows seem to start at 400 ppm. @GuowenLi-PhD , please help check and address this issue. Not sure if it relates to the initialization error in Dymola 2020.

image

  1. Also, please also help look into the highlighted circle area -> why does the outdoor air CO2 have such behavior?

image

Reply to @terrancelu92

  1. The initial sensor value starts from 0 because the default C_start = 0 in the CO2 sensor. As the shown in the following screenshot, the solution is to change C_start from 0 to 400 ppm which is the same as the outdoor air CO2 ppm.
    image

  2. The up-down behavior of the outdoor air CO2 sensor occurred when (1) the supply air instantaneously reversed as shown in the following highlighted plots and (2) the default setting of allowFlowReversal in CO2 sensor is true. The solution is to change allowFlowReversal of CO2 sensor to be false.
    image

@GuowenLi-PhD
Copy link
Author

The testcase model after adding CO2 sensors cannot be solved by Dymola 2021 but Dymola 2024. The following errors are reported:

ERROR: Failed to solve nonlinear system using Newton solver.
  During initialization at time: 15552000
  Tag: initialization.nonlinear[29]

  Common causes:
   * The system of equations has no solution - the residual will be above zero.
     - This may be caused by initial conditions not being fully specified, check the translation log.
     - In some cases the event-logic can cause this.
   * Starting values are too far from the solution, see homotopy in the manual.
     - In rare cases this could occur at events.
   * The equations are too discontinuous for the nonlinear solver - the residual will have knees.
     - Likely caused by over-using noEvent.
  Especially consider the first two items above when the nonlinear solver fails during initialization.

  To get more information consider the options:
   * Simulation/Setup/Translation/Generate listing of translated Modelica code in dsmodel.mof
   * Simulation/Setup/Translation/List non-linear iteration variables
   * Simulation/Setup/Debug/Store variables after failed initialization
     - If a failure to solve a nonlinear equation caused failed initialization.
   * The options under the group Simulation/Setup/Debug/Nonlinear solver diagnostics

  Jacobian inverse norm estimate: 137074
  Condition number estimate: 182.156
  1-norm of the residual = 29444.7

  Last value of the solution:
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.valFre.dp = -1173.25
    hva.floor3.duaFanAirHanUni.cooCoi.port_a_Air.p = 101193
    hva.floor3.duaFanAirHanUni.retFan.varSpeFloMov.VMachine_flow = 57.7338
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.valExh.dp = 1308.43
    hva.floor3.duaFanAirHanUni.mixBox.mixBox.jun1.res3.dp = 23.4808
  Last value of the residual:
    { -13.6311, -9067.21, 20213.4, 0.00782236, 150.454 }
 
Trying to solve non-linear system using global homotopy-method.
Error: The following error was detected at time: 15552000
Modelica model specifies zone '        "name": "Perimeter_bot_ZN_3"' twice, once in TestCase.loaEnePlu.whoBui.fmuZonBotFlr[4] and once in TestCase.loaEnePlu.whoBui.fmuZonBotFlr[4], both belonging to building TestCase.loaEnePlu.building. Each zone must only be specified once per building.
Error: could not solve simplified initialization for homotopy method.

@GuowenLi-PhD , please output the .mof file and check initialization.nonlinear[29] . Not sure if this nonlinear equations are related to the initialization error in Dymola 2021.

Use command Advanced.OutputModelicaCode=true to output .mof file. In Dymola 2024, the nonlinear error message is different than that in Dymola 2021, where the error output is initialization.nonlinear[27]:

  // Nonlinear system of equations
  // Tag: simulation.nonlinear[27]
    // It depends on the following parameters: 
    //   hva.boiWatPla.boiSta.plantNStageCondition.OnSin
    //   hva.boiWatPla.expVesCHW.p_start
    //   hva.boiWatPla.mulBoi.boi[1].valCHW.m_flow_turbulent
    //   hva.boiWatPla.mulBoi.boi[2].valCHW.m_flow_turbulent
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[1]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[2]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[3]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[4]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[5]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[6]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.V_flow[7]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[1]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[2]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[3]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[4]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[5]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[6]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.dp[7]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3.n
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[1]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[2]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[3]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[4]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[5]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[6]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3[7]
    //   hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.gaiSpe.k
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[1]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[2]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[3]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[4]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[5]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[6]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.V_flow[7]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[1]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[2]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[3]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[4]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[5]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[6]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.dp[7]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3.n
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[1]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[2]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[3]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[4]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[5]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[6]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3[7]
    //   hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.gaiSpe.k
    //   hva.boiWatPla.pumSecHW.val[1].m_flow_turbulent
    //   hva.boiWatPla.pumSecHW.val[2].m_flow_turbulent
    //   hva.boiWatPla.secPumCon.conPI.conPID.P.k
    //   hva.boiWatPla.secPumCon.conPI.conPID.errP.u1
    //   hva.boiWatPla.secPumCon.conPI.conPID.lim.uMax
    //   hva.boiWatPla.secPumCon.conPI.conPID.lim.uMin
    //   hva.boiWatPla.secPumCon.conPI.conPID.uMea_revAct.k
    //   hva.boiWatPla.secPumCon.conPI.zerSpe.k
    //   hva.floor1.fivZonVAV.vAV1.rehVal.m_flow_turbulent
    //   hva.floor1.fivZonVAV.vAV2.rehVal.m_flow_turbulent
    //   hva.floor1.fivZonVAV.vAV3.rehVal.m_flow_turbulent
    //   hva.floor1.fivZonVAV.vAV4.rehVal.m_flow_turbulent
    //   hva.floor1.fivZonVAV.vAV5.rehVal.m_flow_turbulent
    //   hva.floor2.fivZonVAV.vAV1.rehVal.m_flow_turbulent
    //   hva.floor2.fivZonVAV.vAV2.rehVal.m_flow_turbulent
    //   hva.floor2.fivZonVAV.vAV3.rehVal.m_flow_turbulent
    //   hva.floor2.fivZonVAV.vAV4.rehVal.m_flow_turbulent
    //   hva.floor2.fivZonVAV.vAV5.rehVal.m_flow_turbulent
    //   hva.floor3.fivZonVAV.vAV1.rehVal.m_flow_turbulent
    //   hva.floor3.fivZonVAV.vAV2.rehVal.m_flow_turbulent
    //   hva.floor3.fivZonVAV.vAV3.rehVal.m_flow_turbulent
    //   hva.floor3.fivZonVAV.vAV4.rehVal.m_flow_turbulent
    //   hva.floor3.fivZonVAV.vAV5.rehVal.m_flow_turbulent
    // It depends on the following timevarying variables: 
    //   hva.boiWatPla.mulBoi.boi[1].valCHW.kVal
    //   hva.boiWatPla.mulBoi.boi[2].valCHW.kVal
    //   hva.boiWatPla.pumSecHW.val[1].kVal
    //   hva.boiWatPla.pumSecHW.val[2].kVal
    //   hva.boiWatPla.secPumCon.conPI.conPID.I.y
    //   hva.boiWatPla.secPumCon.pumSta.y[1]
    //   hva.boiWatPla.secPumCon.pumSta.y[2]
    //   hva.floor1.fivZonVAV.vAV1.rehVal.kVal
    //   hva.floor1.fivZonVAV.vAV2.rehVal.kVal
    //   hva.floor1.fivZonVAV.vAV3.rehVal.kVal
    //   hva.floor1.fivZonVAV.vAV4.rehVal.kVal
    //   hva.floor1.fivZonVAV.vAV5.rehVal.kVal
    //   hva.floor2.fivZonVAV.vAV1.rehVal.kVal
    //   hva.floor2.fivZonVAV.vAV2.rehVal.kVal
    //   hva.floor2.fivZonVAV.vAV3.rehVal.kVal
    //   hva.floor2.fivZonVAV.vAV4.rehVal.kVal
    //   hva.floor2.fivZonVAV.vAV5.rehVal.kVal
    //   hva.floor3.fivZonVAV.vAV1.rehVal.kVal
    //   hva.floor3.fivZonVAV.vAV2.rehVal.kVal
    //   hva.floor3.fivZonVAV.vAV3.rehVal.kVal
    //   hva.floor3.fivZonVAV.vAV4.rehVal.kVal
    //   hva.floor3.fivZonVAV.vAV5.rehVal.kVal
    // Start values for iteration variables of non-linear system of 52 equations: 
    //   hva.boiWatPla.pumSecHW.pum[2].port_a.m_flow
    //   hva.boiWatPla.port_b.p
    //   hva.boiWatPla.mulBoi.boi[2].port_b_CHW.m_flow
    //   hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res3.dp
    //   hva.floor3.fivZonVAV.ReheatWatNet.ports_b[4].m_flow
    //   hva.floor3.fivZonVAV.ReheatWatNet.junSup4.res1.dp
    //   hva.floor3.fivZonVAV.ReheatWatNet.ports_a[4].p
    //   hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p
    //   hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res3.dp
    //   hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p
    //   hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p
    //   hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res3.dp
    //   hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p
    //   hva.floor2.fivZonVAV.ReheatWatNet.ports_b[4].m_flow
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup4.res1.dp
    //   hva.floor2.fivZonVAV.ReheatWatNet.ports_a[4].p
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.dp
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res3.dp
    //   hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.dp
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p
    //   hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res3.dp
    //   hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p
    //   hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res3.dp
    //   hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p
    //   hva.floor2.port_b_HeaWat.p
    //   hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p
    //   hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p
    //   hva.floor2.port_a_HeaWat.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res3.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.ports_b[4].m_flow
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet4.res2.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.ports_a[4].p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup4.res1.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res2.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res3.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res2.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res2.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res3.dp
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p
    //   hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.dp
    //   hva.boiWatNet.junSup1.res1.port_b.p
    //   hva.boiWatNet.junRet1.res1.port_b.p
  algorithm // Torn part
    hva.boiWatPla.dp := hva.boiWatPla.port_b.p-hva.boiWatPla.expVesCHW.p_start;
    hva.boiWatPla.secPumCon.conPI.conPID.errP.u2 := hva.boiWatPla.secPumCon.conPI.conPID.uMea_revAct.k
      *hva.boiWatPla.dp;
    hva.boiWatPla.secPumCon.conPI.conPID.P.u := hva.boiWatPla.secPumCon.conPI.conPID.errP.u1
      -hva.boiWatPla.secPumCon.conPI.conPID.errP.u2;
    hva.boiWatPla.secPumCon.conPI.conPID.P.y := hva.boiWatPla.secPumCon.conPI.conPID.P.k
      *hva.boiWatPla.secPumCon.conPI.conPID.P.u;
    hva.boiWatPla.secPumCon.conPI.conPID.lim.u := hva.boiWatPla.secPumCon.conPI.conPID.P.y
      +hva.boiWatPla.secPumCon.conPI.conPID.I.y;
    hva.boiWatPla.secPumCon.conPI.conPID.y := smooth(0, noEvent((if 
      hva.boiWatPla.secPumCon.conPI.conPID.lim.u > hva.boiWatPla.secPumCon.conPI.conPID.lim.uMax
       then hva.boiWatPla.secPumCon.conPI.conPID.lim.uMax else (if 
      hva.boiWatPla.secPumCon.conPI.conPID.lim.u < hva.boiWatPla.secPumCon.conPI.conPID.lim.uMin
       then hva.boiWatPla.secPumCon.conPI.conPID.lim.uMin else hva.boiWatPla.secPumCon.conPI.conPID.lim.u))));
    hva.boiWatPla.secPumCon.replicator.u := (if hva.boiWatPla.boiSta.plantNStageCondition.OnSin
       then hva.boiWatPla.secPumCon.conPI.conPID.y else hva.boiWatPla.secPumCon.conPI.zerSpe.k);
    hva.boiWatPla.pumSecHW.speSig[2] := hva.boiWatPla.secPumCon.pumSta.y[2]*
      hva.boiWatPla.secPumCon.replicator.u;
    hva.boiWatPla.pumSecHW.speRat[2] := hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.gaiSpe.k
      *hva.boiWatPla.pumSecHW.speSig[2];
    hva.boiWatPla.pumSecHW.val[2].dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.boiWatPla.pumSecHW.pum[2].port_a.m_flow, hva.boiWatPla.pumSecHW.val[2].kVal,
       hva.boiWatPla.pumSecHW.val[2].m_flow_turbulent);
    hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.VMachine_flow := 0.0010044335697769957
      *hva.boiWatPla.pumSecHW.pum[2].port_a.m_flow;
    hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.dpMachine := Buildings.Fluid.Movers.BaseClasses.Characteristics.pressure
      (
      hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.VMachine_flow, 
      hva.boiWatPla.pumSecHW.speRat[2], 
      hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.preDer3, 
      1004325.0, 
      0.02971964500860585, 
      hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.eff.pCur3)-8448.326012214986*
      hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.VMachine_flow;
    hva.boiWatPla.pumSecHW.pum[2].port_b.p := hva.boiWatPla.pumSecHW.pum[2].varSpeFloMov.dpMachine
      +hva.boiWatPla.expVesCHW.p_start;
    hva.boiWatPla.pumSecHW.speSig[1] := hva.boiWatPla.secPumCon.pumSta.y[1]*
      hva.boiWatPla.secPumCon.replicator.u;
    hva.boiWatPla.pumSecHW.speRat[1] := hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.gaiSpe.k
      *hva.boiWatPla.pumSecHW.speSig[1];
    hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res1.dp := hva.floor2.port_a_HeaWat.p
      -hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p;
    hva.floor3.port_a_HeaWat.m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res1.dp, 0.046609176692849086, 
      1.2484022399999999);
    hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res1.dp := hva.floor2.port_a_HeaWat.p
      -hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p;
    hva.floor2.port_a_HeaWat.m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res1.dp, 0.4660917669284908, 
      12.484022399999997);
    hva.floor1.port_a_HeaWat.m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.dp, 0.046609176692849086, 
      1.2484022399999999);
    hva.boiWatPla.port_b.m_flow :=  -(hva.floor3.port_a_HeaWat.m_flow+
      hva.floor2.port_a_HeaWat.m_flow+hva.floor1.port_a_HeaWat.m_flow);
    hva.boiWatPla.pumSecHW.pum[1].port_a.m_flow := hva.floor3.port_a_HeaWat.m_flow
      +hva.floor2.port_a_HeaWat.m_flow+hva.floor1.port_a_HeaWat.m_flow-
      hva.boiWatPla.pumSecHW.pum[2].port_a.m_flow;
    hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.VMachine_flow := 0.0010044335697769957
      *hva.boiWatPla.pumSecHW.pum[1].port_a.m_flow;
    hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.dpMachine := Buildings.Fluid.Movers.BaseClasses.Characteristics.pressure
      (
      hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.VMachine_flow, 
      hva.boiWatPla.pumSecHW.speRat[1], 
      hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.preDer3, 
      1004325.0, 
      0.02971964500860585, 
      hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.eff.pCur3)-8448.326012214986*
      hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.VMachine_flow;
    hva.boiWatPla.pumSecHW.pum[1].port_b.p := hva.boiWatPla.pumSecHW.pum[1].varSpeFloMov.dpMachine
      +hva.boiWatPla.expVesCHW.p_start;
    hva.boiWatPla.pumSecHW.val[1].dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.boiWatPla.pumSecHW.pum[1].port_a.m_flow, hva.boiWatPla.pumSecHW.val[1].kVal,
       hva.boiWatPla.pumSecHW.val[1].m_flow_turbulent);
    hva.boiWatPla.mulBoi.boi[1].port_b_CHW.m_flow :=  -(hva.floor3.port_a_HeaWat.m_flow
      +hva.floor2.port_a_HeaWat.m_flow+hva.floor1.port_a_HeaWat.m_flow+
      hva.boiWatPla.mulBoi.boi[2].port_b_CHW.m_flow);
    hva.boiWatPla.mulBoi.boi[1].valCHW.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.boiWatPla.mulBoi.boi[1].port_b_CHW.m_flow, hva.boiWatPla.mulBoi.boi[1].valCHW.kVal,
       hva.boiWatPla.mulBoi.boi[1].valCHW.m_flow_turbulent);
    hva.boiWatNet.junSup1.res1.dp := hva.boiWatPla.pumSecHW.pum[1].port_b.p-(
      hva.boiWatPla.pumSecHW.val[1].dp+hva.boiWatPla.mulBoi.boi[1].valCHW.dp+
      hva.boiWatNet.junSup1.res1.port_b.p);
    hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res3.dp, 0.022721381565471706, 
      0.7453555199999999);
    hva.floor3.fivZonVAV.vAV1.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow, hva.floor3.fivZonVAV.vAV1.rehVal.kVal,
       hva.floor3.fivZonVAV.vAV1.rehVal.m_flow_turbulent);
    hva.floor3.fivZonVAV.vAV4.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor3.fivZonVAV.ReheatWatNet.ports_b[4].m_flow, hva.floor3.fivZonVAV.vAV4.rehVal.kVal,
       hva.floor3.fivZonVAV.vAV4.rehVal.m_flow_turbulent);
    hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow :=  -Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res3.dp, 0.005733769686107731, 
      0.15357599999999993);
    hva.floor3.fivZonVAV.ReheatWatNet.ports_b[3].m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res3.dp, 0.0053698109030621095,
       0.10170143999999998);
    hva.floor3.fivZonVAV.ReheatWatNet.ports_b[5].m_flow :=  -(hva.floor3.port_a_HeaWat.m_flow
      +hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow
      +hva.floor3.fivZonVAV.ReheatWatNet.ports_b[3].m_flow+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[4].m_flow);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow :=  -(
      hva.floor3.port_a_HeaWat.m_flow+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      +hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[3].m_flow);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res2.dp := hva.floor3.fivZonVAV.ReheatWatNet.junSup4.res1.dp
      +hva.floor3.fivZonVAV.vAV4.rehVal.dp+hva.floor3.fivZonVAV.ReheatWatNet.ports_a[4].p
      -hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p;
    hva.boiWatPla.port_a.m_flow := hva.floor2.port_a_HeaWat.m_flow+
      hva.floor1.port_a_HeaWat.m_flow+hva.floor3.port_a_HeaWat.m_flow;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow := hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      -(hva.floor2.port_a_HeaWat.m_flow-hva.boiWatPla.port_a.m_flow+
      hva.floor1.port_a_HeaWat.m_flow)+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow
      +hva.floor3.fivZonVAV.ReheatWatNet.ports_b[3].m_flow;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow, 0.013082156763835876,
       0.24776927999999993);
    hva.floor3.fivZonVAV.vAV3.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor3.fivZonVAV.ReheatWatNet.ports_b[3].m_flow, hva.floor3.fivZonVAV.vAV3.rehVal.kVal,
       hva.floor3.fivZonVAV.vAV3.rehVal.m_flow_turbulent);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow :=  -(
      hva.floor3.port_a_HeaWat.m_flow+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      +hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res2.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow, 0.018451967666897988,
       0.34947071999999996);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res1.dp := hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res2.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p-hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res3.dp := hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res3.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p-hva.floor3.fivZonVAV.vAV3.rehVal.dp
      -hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet4.res2.dp := hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res1.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p-hva.floor3.fivZonVAV.ReheatWatNet.ports_a[4].p;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow := hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      -(hva.floor2.port_a_HeaWat.m_flow-hva.boiWatPla.port_a.m_flow+
      hva.floor1.port_a_HeaWat.m_flow)+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow, 0.018451967666897988,
       0.34947071999999996);
    hva.floor3.fivZonVAV.vAV2.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow, hva.floor3.fivZonVAV.vAV2.rehVal.kVal,
       hva.floor3.fivZonVAV.vAV2.rehVal.m_flow_turbulent);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow :=  -(
      hva.floor3.port_a_HeaWat.m_flow+hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res2.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow, 0.026560742520515268,
       0.50304672);
    hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res1.dp := hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res2.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p-hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p;
    hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res3.dp := hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res3.dp
      -hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p+hva.floor3.fivZonVAV.vAV2.rehVal.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res2.dp := hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res1.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p-hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res3.dp, 0.22721381565471707, 
      7.453555199999999);
    hva.floor2.fivZonVAV.ReheatWatNet.ports_b[2].m_flow :=  -Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res3.dp, 0.05733769686107733, 
      1.5357599999999998);
    hva.floor2.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow :=  -(
      hva.floor2.port_a_HeaWat.m_flow+hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      +hva.floor2.fivZonVAV.ReheatWatNet.ports_b[2].m_flow);
    hva.floor2.fivZonVAV.ReheatWatNet.ports_b[3].m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res3.dp, 0.05369810903062109, 
      1.0170143999999997);
    hva.floor2.fivZonVAV.ReheatWatNet.ports_b[5].m_flow := hva.floor2.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow
      -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[3].m_flow-hva.floor2.fivZonVAV.ReheatWatNet.ports_b[4].m_flow;
    hva.floor2.fivZonVAV.vAV4.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[4].m_flow, hva.floor2.fivZonVAV.vAV4.rehVal.kVal,
       hva.floor2.fivZonVAV.vAV4.rehVal.m_flow_turbulent);
    hva.floor2.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow := hva.floor2.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow
      -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[3].m_flow;
    hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res2.dp := hva.floor2.fivZonVAV.ReheatWatNet.junSup4.res1.dp
      +hva.floor2.fivZonVAV.vAV4.rehVal.dp+hva.floor2.fivZonVAV.ReheatWatNet.ports_a[4].p
      -hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow := hva.floor2.port_a_HeaWat.m_flow
      +hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+hva.floor2.fivZonVAV.ReheatWatNet.ports_b[2].m_flow
      +hva.floor2.fivZonVAV.ReheatWatNet.ports_b[3].m_flow;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow, 0.13082156763835878,
       2.4776927999999994);
    hva.floor2.fivZonVAV.vAV3.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[3].m_flow, hva.floor2.fivZonVAV.vAV3.rehVal.kVal,
       hva.floor2.fivZonVAV.vAV3.rehVal.m_flow_turbulent);
    hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res2.dp := hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p-hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res3.dp := hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res3.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p-hva.floor2.fivZonVAV.vAV3.rehVal.dp
      -hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet4.res2.dp := hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res1.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p-hva.floor2.fivZonVAV.ReheatWatNet.ports_a[4].p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow := hva.floor2.port_a_HeaWat.m_flow
      +hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+hva.floor2.fivZonVAV.ReheatWatNet.ports_b[2].m_flow;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow, 0.18451967666897987,
       3.4947071999999992);
    hva.floor2.fivZonVAV.vAV2.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[2].m_flow, hva.floor2.fivZonVAV.vAV2.rehVal.kVal,
       hva.floor2.fivZonVAV.vAV2.rehVal.m_flow_turbulent);
    hva.floor2.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow :=  -(
      hva.floor2.port_a_HeaWat.m_flow+hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow);
    hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res2.dp := hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p-hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res3.dp := hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res3.dp
      -hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p+hva.floor2.fivZonVAV.vAV2.rehVal.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res2.dp := hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res1.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p-hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow := hva.floor2.port_a_HeaWat.m_flow
      +hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow, 0.2656074252051526,
       5.030467199999999);
    hva.floor2.fivZonVAV.vAV1.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow, hva.floor2.fivZonVAV.vAV1.rehVal.kVal,
       hva.floor2.fivZonVAV.vAV1.rehVal.m_flow_turbulent);
    hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res3.dp := hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res3.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p-hva.floor2.fivZonVAV.vAV1.rehVal.dp
      -hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res2.dp := hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res1.dp
      +hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p-hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p;
    hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res2.dp := hva.floor2.port_b_HeaWat.p
      -hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p;
    hva.floor3.port_b_HeaWat.m_flow := hva.floor2.port_a_HeaWat.m_flow-
      hva.boiWatPla.port_a.m_flow+hva.floor1.port_a_HeaWat.m_flow;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res2.dp := hva.floor2.port_b_HeaWat.p
      -hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow := hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      -(hva.floor2.port_a_HeaWat.m_flow-hva.boiWatPla.port_a.m_flow+
      hva.floor1.port_a_HeaWat.m_flow);
    hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow, 0.026560742520515268,
       0.50304672);
    hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res2.dp := hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res1.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p-hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p;
    hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res3.dp := hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res3.dp
      +hva.floor3.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p-hva.floor3.fivZonVAV.vAV1.rehVal.dp
      -hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p;
    hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res3.dp, 0.022721381565471706, 
      0.7453555199999999);
    hva.floor1.fivZonVAV.vAV1.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow, hva.floor1.fivZonVAV.vAV1.rehVal.kVal,
       hva.floor1.fivZonVAV.vAV1.rehVal.m_flow_turbulent);
    hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow :=  -Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res3.dp, 0.005733769686107731, 
      0.15357599999999993);
    hva.floor1.fivZonVAV.ReheatWatNet.ports_b[3].m_flow := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res3.dp, 0.0053698109030621095,
       0.10170143999999998);
    hva.floor1.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow := hva.floor1.port_a_HeaWat.m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[3].m_flow;
    hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res1.dp := hva.floor1.fivZonVAV.ReheatWatNet.junRet4.res2.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_a[4].p-hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p;
    hva.floor1.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow := hva.floor1.port_a_HeaWat.m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow;
    hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res1.dp := hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res2.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p-hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p;
    hva.floor1.fivZonVAV.vAV3.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor1.fivZonVAV.ReheatWatNet.ports_b[3].m_flow, hva.floor1.fivZonVAV.vAV3.rehVal.kVal,
       hva.floor1.fivZonVAV.vAV3.rehVal.m_flow_turbulent);
    hva.floor1.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow :=  -(
      hva.floor1.port_a_HeaWat.m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow);
    hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res2.dp := hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p-hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p;
    hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res3.dp := hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res3.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p-hva.floor1.fivZonVAV.vAV3.rehVal.dp
      -hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res1.port_b.p;
    hva.boiWatNet.junRet1.res3.dp := hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res2.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p-hva.boiWatNet.junRet1.res1.port_b.p;
    hva.floor1.fivZonVAV.vAV2.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow, hva.floor1.fivZonVAV.vAV2.rehVal.kVal,
       hva.floor1.fivZonVAV.vAV2.rehVal.m_flow_turbulent);
    hva.floor1.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow :=  -(
      hva.floor1.port_a_HeaWat.m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow);
    hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res2.dp := hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p-hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p;
    hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res3.dp := hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res3.dp
      -hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.port_b.p+hva.floor1.fivZonVAV.vAV2.rehVal.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p;
    hva.floor1.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow :=  -(
      hva.floor1.port_a_HeaWat.m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[3].m_flow);
    hva.floor1.fivZonVAV.vAV4.rehVal.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor1.fivZonVAV.ReheatWatNet.ports_b[4].m_flow, hva.floor1.fivZonVAV.vAV4.rehVal.kVal,
       hva.floor1.fivZonVAV.vAV4.rehVal.m_flow_turbulent);
    hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res2.dp := hva.floor1.fivZonVAV.ReheatWatNet.junSup4.res1.dp
      +hva.floor1.fivZonVAV.vAV4.rehVal.dp+hva.floor1.fivZonVAV.ReheatWatNet.ports_a[4].p
      -hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.port_b.p;
    hva.floor1.fivZonVAV.ReheatWatNet.ports_b[5].m_flow :=  -(hva.floor1.port_a_HeaWat.m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[3].m_flow+hva.floor1.fivZonVAV.ReheatWatNet.ports_b[4].m_flow);
    hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res3.dp := hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res3.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p-hva.floor1.fivZonVAV.vAV1.rehVal.dp
      -hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p;
    hva.boiWatNet.junSup1.res3.dp := hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res1.port_b.p-hva.boiWatNet.junSup1.res1.port_b.p;
    hva.boiWatNet.junSup1.port_2.m_flow :=  -(hva.floor3.port_a_HeaWat.m_flow+
      hva.floor2.port_a_HeaWat.m_flow);
    hva.boiWatNet.junSup1.res2.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.boiWatNet.junSup1.port_2.m_flow, 0.4585736648262413, 13.732424639999996);
    hva.boiWatNet.junSup2.res1.dp := hva.boiWatNet.junSup1.res2.dp+
      hva.boiWatNet.junSup1.res1.port_b.p-hva.floor2.port_a_HeaWat.p;
    hva.boiWatNet.junRet1.res2.dp := hva.boiWatPla.expVesCHW.p_start-
      hva.boiWatNet.junRet1.res1.port_b.p;
    hva.boiWatNet.junRet1.port_1.m_flow := hva.boiWatPla.port_a.m_flow-
      hva.floor1.port_a_HeaWat.m_flow;
    hva.boiWatNet.junRet1.res1.dp := Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      (hva.boiWatNet.junRet1.port_1.m_flow, 0.4585736648262413, 13.732424639999996);
    hva.boiWatNet.junRet2.res2.dp := hva.boiWatNet.junRet1.res1.dp+
      hva.boiWatNet.junRet1.res1.port_b.p-hva.floor2.port_b_HeaWat.p;
    hva.floor1.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow := hva.floor1.port_a_HeaWat.m_flow
      +hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow;
    hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res1.dp := hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res2.dp
      +hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res1.port_b.p-hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res1.port_b.p;

  equation // Residual equations
    0 = hva.boiWatPla.pumSecHW.pum[2].port_b.p-(hva.boiWatPla.pumSecHW.val[2].dp
      +hva.boiWatPla.mulBoi.boi[1].valCHW.dp+hva.boiWatNet.junSup1.res1.dp+
      hva.boiWatNet.junSup1.res1.port_b.p);
    0 = hva.boiWatPla.port_b.p-(hva.boiWatNet.junSup1.res1.dp+hva.boiWatNet.junSup1.res1.port_b.p);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup1.res2.dp, 0.026560742520515268, 
      0.50304672);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res1.dp, 0.026560742520515268, 
      0.50304672);
    0 = hva.floor1.port_a_HeaWat.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res2.dp, 0.046609176692849086, 
      1.2484022399999999);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet1.res3.dp, 0.022721381565471706, 
      0.7453555199999999);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res1.dp, 0.018451967666897988, 
      0.34947071999999996);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet2.res2.dp, 0.026560742520515268, 
      0.50304672);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res1.dp, 0.026560742520515268, 
      0.50304672);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res2.dp, 0.018451967666897988, 
      0.34947071999999996);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.ports_b[2].m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup2.res3.dp, 0.005733769686107731, 
      0.15357599999999993);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res1.dp, 0.018451967666897988, 
      0.34947071999999996);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup3.res2.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res1.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res2.dp, 0.018451967666897988, 
      0.34947071999999996);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.ports_b[3].m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet3.res3.dp, 0.0053698109030621095,
       0.10170143999999998);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junSup4.res1.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor1.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor1.fivZonVAV.ReheatWatNet.junRet4.res2.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor1.fivZonVAV.vAV4.rehVal.dp-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor1.fivZonVAV.ReheatWatNet.ports_b[5].m_flow, hva.floor1.fivZonVAV.vAV5.rehVal.kVal,
       hva.floor1.fivZonVAV.vAV5.rehVal.m_flow_turbulent);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup1.res2.dp, 0.2656074252051526, 
      5.030467199999999);
    0 = hva.floor2.port_a_HeaWat.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res2.dp, 0.4660917669284908, 
      12.484022399999997);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet1.res3.dp, 0.22721381565471707, 
      7.453555199999999);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet2.res2.dp, 0.2656074252051526, 
      5.030467199999999);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res1.dp, 0.2656074252051526, 
      5.030467199999999);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res2.dp, 0.18451967666897987, 
      3.4947071999999992);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.ports_b[2].m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup2.res3.dp, 0.05733769686107733, 
      1.5357599999999998);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res1.dp, 0.18451967666897987, 
      3.4947071999999992);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup3.res2.dp, 0.13082156763835878, 
      2.4776927999999994);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res2.dp, 0.18451967666897987, 
      3.4947071999999992);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.ports_b[3].m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet3.res3.dp, 0.05369810903062109, 
      1.0170143999999997);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junSup4.res1.dp, 0.13082156763835878, 
      2.4776927999999994);
    0 = hva.floor2.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor2.fivZonVAV.ReheatWatNet.junRet4.res2.dp, 0.13082156763835878, 
      2.4776927999999994);
    0 = hva.floor2.fivZonVAV.vAV4.rehVal.dp-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor2.fivZonVAV.ReheatWatNet.ports_b[5].m_flow, hva.floor2.fivZonVAV.vAV5.rehVal.kVal,
       hva.floor2.fivZonVAV.vAV5.rehVal.m_flow_turbulent);
    0 = hva.floor3.port_b_HeaWat.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res2.dp, 0.046609176692849086, 
      1.2484022399999999);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.ports_b[1].m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet1.res3.dp, 0.022721381565471706, 
      0.7453555199999999);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junRet1.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet2.res2.dp, 0.026560742520515268, 
      0.50304672);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junSup1.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res1.dp, 0.026560742520515268, 
      0.50304672);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.ports_b[2].m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup2.res3.dp, 0.005733769686107731, 
      0.15357599999999993);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junSup2.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res1.dp, 0.018451967666897988, 
      0.34947071999999996);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup3.res2.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junRet2.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res2.dp, 0.018451967666897988, 
      0.34947071999999996);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.ports_b[3].m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet3.res3.dp, 0.0053698109030621095,
       0.10170143999999998);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junSup3.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junSup4.res1.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor3.fivZonVAV.ReheatWatNet.junRet3.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.floor3.fivZonVAV.ReheatWatNet.junRet4.res2.dp, 0.013082156763835876, 
      0.24776927999999993);
    0 = hva.floor3.fivZonVAV.vAV4.rehVal.dp-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.floor3.fivZonVAV.ReheatWatNet.ports_b[5].m_flow, hva.floor3.fivZonVAV.vAV5.rehVal.kVal,
       hva.floor3.fivZonVAV.vAV5.rehVal.m_flow_turbulent);
    0 = hva.boiWatPla.port_b.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.boiWatNet.junSup1.res1.dp, 0.5002621798104451, 14.980826879999995);
    0 = hva.floor1.port_a_HeaWat.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.boiWatNet.junSup1.res3.dp, 0.041688514984203756, 1.2484022399999999);
    0 = hva.boiWatPla.port_a.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.boiWatNet.junRet1.res2.dp, 0.5002621798104451, 14.980826879999995);
    0 = hva.floor1.port_a_HeaWat.m_flow-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.boiWatNet.junRet1.res3.dp, 0.041688514984203756, 1.2484022399999999);
    0 = hva.boiWatNet.junRet1.port_1.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.boiWatNet.junRet2.res2.dp, 0.4585736648262413, 13.732424639999996);
    0 = hva.boiWatNet.junSup1.port_2.m_flow+Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp
      (hva.boiWatNet.junSup2.res1.dp, 0.4585736648262413, 13.732424639999996);
    0 = hva.boiWatPla.mulBoi.boi[1].valCHW.dp-Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow
      ( -hva.boiWatPla.mulBoi.boi[2].port_b_CHW.m_flow, hva.boiWatPla.mulBoi.boi[2].valCHW.kVal,
       hva.boiWatPla.mulBoi.boi[2].valCHW.m_flow_turbulent);
  // Analytic Jacobian was produced, but it is not listed here.
  // To have it listed, set
  //   Advanced.OutputModelicaCodeWithJacobians = true
  // before translation. May give much output,
  // because common subexpression elimination is not activated.
  // End of nonlinear system of equations

The reason of the nonlinear and initialization issue need to be further investigated. (Hold on)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants