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

Fix VRF FluidTCtrl negative outdoor unit fan power #10649

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Commits on Aug 8, 2024

  1. use abs(QCoil) in air flow calculation

    as QCoil is negative in cooling mode, directly using
    m_air = Q_coil / (T_coil_out - T_coil_in) / 1005.0
    will result in negative air flow, as well as downstream fan power
    
    Here QCoil should be abs(QCoil)
    Yujie Xu committed Aug 8, 2024
    5 Configuration menu
    Copy the full SHA
    7f2acaf View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. 5 Configuration menu
    Copy the full SHA
    ae3fec6 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. revert abs(Q_coil), reduce h_IU_cond_in label230, fix Q_evap_req neg

    per Mike's comment,
    #10649 (comment),
    Q_coil should not be negative, remove the abs(Q_coil) fix
    
    Q_evap_req will be negative if Q_cond_req <
    CompEvaporatingPWRSpd(CounterCompSpdTemp). This leads to negative compressor
    speed. Temtatively fix it like this.
    
    According to comment here
    #10649 (comment),
    The h_comp_out and h_comp_out_new could keep getting farther and farther from
    each other if h_cond_IU_in can only increase in the iteration. Addressing this
    by adding a direction where h_cond_IU can decrease as well.
    Yujie Xu committed Aug 22, 2024
    4 Configuration menu
    Copy the full SHA
    cabd9e6 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. 4 Configuration menu
    Copy the full SHA
    765218b View commit details
    Browse the repository at this point in the history
  2. add converge check that h_comp_out_new changed

    Yujie Xu committed Aug 23, 2024
    8 Configuration menu
    Copy the full SHA
    35d4b69 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    0f1d4fd View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Revert "add converge check that h_comp_out_new changed"

    This reverts commit 35d4b69.
    Yujie Xu committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    935df9e View commit details
    Browse the repository at this point in the history
  2. Patch for Q_cond_req < min speed power, CompSpdActual int to real

    When Q_cond_req < ComoEvaporatingPWRSpd(1), Q_evap_req will be negative, the
    calculated compressor speed will be negative. The case where Q_cond_req <
    ComoEvaporatingPWRSpd(1) need to be considered, where compressor speed is
    dependent on the compressour power curve output value.
    
    CompSpdActual argument VRFOU_CompCap is an int, but the value passed in was
    originally a real. This casting from int to real will truncate the value. If the
    value is less than 1, it will be set to 0.
    Yujie Xu committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    38ad9f1 View commit details
    Browse the repository at this point in the history
  3. clang-format

    Yujie Xu committed Oct 7, 2024
    4 Configuration menu
    Copy the full SHA
    d54f356 View commit details
    Browse the repository at this point in the history
  4. fix unit test

    Yujie Xu committed Oct 7, 2024
    4 Configuration menu
    Copy the full SHA
    39567c8 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Configuration menu
    Copy the full SHA
    aae3346 View commit details
    Browse the repository at this point in the history
  2. 4 Configuration menu
    Copy the full SHA
    bd53fd7 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. use PLR in compressor speed calculation

    Yujie Xu committed Oct 21, 2024
    4 Configuration menu
    Copy the full SHA
    4e979ea View commit details
    Browse the repository at this point in the history
  2. modify PLR application on the speed level > 1 case

    Yujie Xu committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    1b58521 View commit details
    Browse the repository at this point in the history
  3. 4 Configuration menu
    Copy the full SHA
    cce66e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a135044 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. remove unused Q_evap_req, remove C_cap_operation adjustment

    C_cap_operation was used in the evaporative load adjsutment but not power. not
    sure if this is intended. Maybe just remove this for now
    
    Q_evap_req is no longer used in the calculation, remove it
    Yujie Xu committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    835253a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    436f277 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. fix uninitialized RatedHeatCapacity in VRF HR model

    Yujie Xu committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    a777bf5 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. use newly derived r to compute compressor speed and Q_evap_req

    how r is derived:
    
    in the original code
    Q_evap_req = Q_cond_req - CompEvaporatingPWRSpd(CounterCompSpdTemp);
    I think the intent was
    Q_cond_req = Q_req = Q_evap_req + compressor heat
    but compressor heat might not actually be CompEvaporatingPWRSpd(CounterCompSpdTemp)
    
    let
    k be the speed level
    C be the short form for C_cap_operation
    PWR(.) be the short form of CompEvaporatingPWRSpd(.)
    CAP(.) be the short form of CompEvaporatingCAPSpd(.)
    spd(.) be the short form of this->CompressorSpeed(.)
    deltaPWR be PWR(k) - PWR(k - 1)
    deltaCAP be CAP(k) - CAP(k - 1)
    
    I think compressor heat should be this instead of just PWR(k)
    compressor heat = deltaPWR * r + PWR(k - 1)
    so
    Q_cond_req = Q_req = Q_evap_req + deltaPWR * r + PWR(k - 1) <---- eq 1
    
    we also know this from the CompSpdActual calculation equation that
    CompSpdActual = Spd(k - 1) + deltaSpd / deltaCAP * (Q_evap_req * C - CAP(k - 1))
    so we call the following r
    r = (Q_evap_req * C - CAP(k - 1)) / deltaCAP
    so
    CompSpdActual = Spd(k - 1) + deltaSpd * r
    
    arranging terms in eq 1
    Q_cond_req - deltaPWR * r - PWR(k - 1) = Q_evap_req
    (Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1) = Q_evap_req * C - CAP(k - 1)
    ((Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1)) / deltaCAP = (Q_evap_req * C - CAP(k - 1)) / deltaCAP
    ((Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1)) / deltaCAP = r
    (Q_cond_req - deltaPWR * r - PWR(k - 1)) * C - CAP(k - 1) = deltaCAP * r
    (Q_cond_req - PWR(k - 1)) * C - CAP(k - 1) = deltaCAP * r + deltaPWR * r * C
    so
    r = ((Q_cond_req - PWR(k - 1)) * C - CAP(k - 1)) / (deltaCAP + deltaPWR * C)
      = ((Q_cond_req - PWR(k - 1)) - CAP(k - 1)/C) / (deltaCAP/C + deltaPWR)
    
    in the special case where k = 1, then k - 1, PWR(k - 1) and CAP(k - 1) will all be 0
    
    r = ((Q_cond_req) * C) / (CAP(1) + PWR(1) * C)
      = (Q_cond_req) / (CAP(1)/C + PWR(1))
    Yujie Xu committed Oct 24, 2024
    4 Configuration menu
    Copy the full SHA
    380d580 View commit details
    Browse the repository at this point in the history