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
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7f2acaf
use abs(QCoil) in air flow calculation
Aug 8, 2024
ae3fec6
Merge remote-tracking branch 'origin/develop' into fixVRFnegativeFanP…
Aug 13, 2024
cabd9e6
revert abs(Q_coil), reduce h_IU_cond_in label230, fix Q_evap_req neg
Aug 22, 2024
765218b
Merge remote-tracking branch 'origin/develop' into fixVRFnegativeFanP…
Aug 23, 2024
35d4b69
add converge check that h_comp_out_new changed
Aug 23, 2024
0f1d4fd
Merge remote-tracking branch 'origin/develop' into fixVRFnegativeFanP…
Oct 4, 2024
935df9e
Revert "add converge check that h_comp_out_new changed"
Oct 7, 2024
38ad9f1
Patch for Q_cond_req < min speed power, CompSpdActual int to real
Oct 7, 2024
d54f356
clang-format
Oct 7, 2024
39567c8
fix unit test
Oct 7, 2024
aae3346
simplify the code by condition on sign of Q_evap_req
Oct 14, 2024
bd53fd7
Merge remote-tracking branch 'origin/develop' into fixVRFnegativeFanP…
Oct 14, 2024
4e979ea
use PLR in compressor speed calculation
Oct 21, 2024
1b58521
modify PLR application on the speed level > 1 case
Oct 21, 2024
cce66e0
Merge remote-tracking branch 'origin/develop' into fixVRFnegativeFanP…
Oct 21, 2024
a135044
fix unit test after changing compSpdActual calculation
Oct 21, 2024
835253a
remove unused Q_evap_req, remove C_cap_operation adjustment
Oct 22, 2024
436f277
fix unit test after removing C_cap_operation adjustment
Oct 22, 2024
a777bf5
fix uninitialized RatedHeatCapacity in VRF HR model
Oct 23, 2024
380d580
use newly derived r to compute compressor speed and Q_evap_req
Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13726,6 +13726,9 @@ void VRFCondenserEquipment::VRFOU_CompSpd(

} else {
CompSpdActual = this->CompressorSpeed(1) * (Q_evap_req * C_cap_operation) / CompEvaporatingCAPSpd(1);
if (Q_cond_req - CompEvaporatingPWRSpd(CounterCompSpdTemp) < 0.0) { // use compressor power to meet condenser required load
CompSpdActual = this->CompressorSpeed(1) * (Q_cond_req * C_cap_operation) / CompEvaporatingPWRSpd(1);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@yujiex I think I understand the intent here. This could be simpler.

}  else {
    if (Q_evap_req < 0.0) {  // use compressor power to meet condenser required load
          CompSpdActual = this->CompressorSpeed(1) * (Q_cond_req * C_cap_operation) /CompEvaporatingPWRSpd(1);
    } else {
          CompSpdActual = this->CompressorSpeed(1) * (Q_evap_req * C_cap_operation) / CompEvaporatingCAPSpd(1);
    }

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, this is more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

What I don't understand is what looks like a COP term = Qc / PWR. I just don't see how that gets back to a speed 1 fraction. What am I missing?

CompSpdActual = this->CompressorSpeed(1) * (Q_cond_req * C_cap_operation) /CompEvaporatingPWRSpd(1);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rraustad The way I think about this is when Q_cond_req - CompEvaporatingPWRSpd(1) <= 0.0, then what CompEvaporatingPWRSpd(1) can supply is too much to meet Q_cond_req. The speed should be somewhere between 0 and the 1st speed level. So in this case Q_cond_req should be met by CompEvaporatingPWRSpd(1) * ratio. This ratio is calculated as Q_cond_req / CompEvaporatingPWRSpd(1)

Copy link
Contributor

Choose a reason for hiding this comment

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

But CompEvaporatingPWRSpd is power, not capacity. So Q_cond_req / CompEvaporatingPWRSpd(1) looks strange to me. Shouldn't both equations have CompEvaporatingCAPSpd in the denominator (line 13729)?

Array1D<Real64> CompEvaporatingPWRSpd; // Array for the compressor power at certain speed [W]
Array1D<Real64> CompEvaporatingCAPSpd; // Array for the evaporating capacity at certain speed [W]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can also try to change the VRF evaporative capacity to make it reach higher speed levels.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is how they look when they can reach higher speed levels (I reduced the capacity to 10000, the autosized heating and cooing capacity are around 70000W)

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make it span speeds? like from speed 1 to speed 3? I want to see what Q_evap_req * C_cap_operating / CompEvaporatingCAPSpd(x) looks like (or your derivation). I suspect there are discontinuities because C_cap_operatiion = 0.6. And make a scatter plot like before. Q_evap_req versus compressor speed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see, your plot is Q_evap_req versus comp speed. I was confused because I didn't see a 45 degree line like I was expecting. Why is Q_evap_req = 2000 at comp speeds 0 - 10000 ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Somehow there's some weird thing happening when I plot with excel. CompSpdActual is always below 6000 for both the feature and develop branch output, but it somehow plotted it out to over 10000. I have attached the data here
plot data.zip
I used R to plot, this is how they look

image


break; // EXIT DoName1
Expand All @@ -13740,13 +13743,13 @@ void VRFCondenserEquipment::VRFOU_CompSpd(

void VRFCondenserEquipment::VRFOU_CompCap(
EnergyPlusData &state,
int const CompSpdActual, // Given compressor speed
Real64 const T_suction, // Compressor suction temperature Te' [C]
Real64 const T_discharge, // Compressor discharge temperature Tc' [C]
Real64 const h_IU_evap_in, // Enthalpy of IU at inlet, for C_cap_operation calculation [kJ/kg]
Real64 const h_comp_in, // Enthalpy after piping loss (compressor inlet), for C_cap_operation calculation [kJ/kg]
Real64 &Q_c_tot, // Compressor evaporative capacity [W]
Real64 &Ncomp // Compressor power [W]
Real64 const CompSpdActual, // Given compressor speed
Real64 const T_suction, // Compressor suction temperature Te' [C]
Real64 const T_discharge, // Compressor discharge temperature Tc' [C]
Real64 const h_IU_evap_in, // Enthalpy of IU at inlet, for C_cap_operation calculation [kJ/kg]
Real64 const h_comp_in, // Enthalpy after piping loss (compressor inlet), for C_cap_operation calculation [kJ/kg]
Real64 &Q_c_tot, // Compressor evaporative capacity [W]
Real64 &Ncomp // Compressor power [W]
)
{

Expand Down
14 changes: 7 additions & 7 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.hh
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,13 @@ namespace HVACVariableRefrigerantFlow {
);

void VRFOU_CompCap(EnergyPlusData &state,
int CompSpdActual, // Given compressor speed
Real64 T_suction, // Compressor suction temperature Te' [C]
Real64 T_discharge, // Compressor discharge temperature Tc' [C]
Real64 h_IU_evap_in, // Enthalpy of IU at inlet, for C_cap_operation calculation [kJ/kg]
Real64 h_comp_in, // Enthalpy after piping loss (compressor inlet), for C_cap_operation calculation [kJ/kg]
Real64 &Q_c_tot, // Compressor evaporative capacity [W]
Real64 &Ncomp // Compressor power [W]
Real64 CompSpdActual, // Given compressor speed
Real64 T_suction, // Compressor suction temperature Te' [C]
Real64 T_discharge, // Compressor discharge temperature Tc' [C]
Real64 h_IU_evap_in, // Enthalpy of IU at inlet, for C_cap_operation calculation [kJ/kg]
Real64 h_comp_in, // Enthalpy after piping loss (compressor inlet), for C_cap_operation calculation [kJ/kg]
Real64 &Q_c_tot, // Compressor evaporative capacity [W]
Real64 &Ncomp // Compressor power [W]
);

void VRFOU_PipeLossC(EnergyPlusData &state,
Expand Down
4 changes: 2 additions & 2 deletions tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2458,8 +2458,8 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_VRFOU_Compressor)

// Test
EXPECT_NEAR(756, CompSpdActual, 1);
EXPECT_NEAR(899, Ncomp, 1);
EXPECT_NEAR(3186, Q_c_OU, 1);
EXPECT_NEAR(901, Ncomp, 1);
EXPECT_NEAR(3196, Q_c_OU, 1);
EXPECT_NEAR(0, Q_h_OU, 1);
EXPECT_NEAR(242, N_fan_OU, 1);
EXPECT_NEAR(0.0158, m_ref_OU_evap, 0.0005);
Expand Down