-
Notifications
You must be signed in to change notification settings - Fork 392
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
refactoring goto statements #10505
base: develop
Are you sure you want to change the base?
refactoring goto statements #10505
Changes from 3 commits
ed744c2
47c91ce
c0141a8
024eb3b
f431bc6
ad28a57
86927f1
740ae71
76edf3a
de28187
46c89c5
1bc91ca
fa739c7
069595a
cd4d0d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11687,36 +11687,36 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
|
||
// Iteration_Ncomp: Perform iterations to calculate Ncomp (Label20) | ||
Counter = 1; | ||
Label20:; | ||
Ncomp_new = Ncomp; | ||
Q_c_OU = max(0.0, Q_h_TU_PL - Ncomp); | ||
|
||
// *VRF OU Te calculations | ||
m_air = this->OUAirFlowRate * RhoAir; | ||
SH_OU = this->SH; | ||
this->VRFOU_TeTc( | ||
state, HXOpMode::EvapMode, Q_c_OU, SH_OU, m_air, OutdoorDryBulb, OutdoorHumRat, OutdoorPressure, Tfs, this->EvaporatingTemp); | ||
this->SH = SH_OU; | ||
|
||
// *VRF OU Compressor Simulation at heating mode: Specify the compressor speed and power consumption | ||
this->VRFOU_CalcCompH(state, | ||
TU_HeatingLoad, | ||
this->EvaporatingTemp, | ||
Tdischarge, | ||
h_IU_cond_out_ave, | ||
this->IUCondensingTemp, | ||
CapMinTe, | ||
Tfs, | ||
Pipe_Q_h, | ||
Q_c_OU, | ||
CompSpdActual, | ||
Ncomp_new); | ||
|
||
if ((std::abs(Ncomp_new - Ncomp) > (Tolerance * Ncomp)) && (Counter < 30)) { | ||
bool not_converged; | ||
do { | ||
Ncomp_new = Ncomp; | ||
Q_c_OU = max(0.0, Q_h_TU_PL - Ncomp); | ||
|
||
// *VRF OU Te calculations | ||
m_air = this->OUAirFlowRate * RhoAir; | ||
SH_OU = this->SH; | ||
this->VRFOU_TeTc( | ||
state, HXOpMode::EvapMode, Q_c_OU, SH_OU, m_air, OutdoorDryBulb, OutdoorHumRat, OutdoorPressure, Tfs, this->EvaporatingTemp); | ||
this->SH = SH_OU; | ||
|
||
// *VRF OU Compressor Simulation at heating mode: Specify the compressor speed and power consumption | ||
this->VRFOU_CalcCompH(state, | ||
TU_HeatingLoad, | ||
this->EvaporatingTemp, | ||
Tdischarge, | ||
h_IU_cond_out_ave, | ||
this->IUCondensingTemp, | ||
CapMinTe, | ||
Tfs, | ||
Pipe_Q_h, | ||
Q_c_OU, | ||
CompSpdActual, | ||
Ncomp_new); | ||
|
||
bool not_converged = (std::abs(Ncomp_new - Ncomp) > (Tolerance * Ncomp)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are still making changes in this PR, could I make the tiniest of requests? Could you make the variable name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the suggestion @Myoldmopar. I will change it to |
||
Ncomp = Ncomp_new; | ||
Counter = Counter + 1; | ||
goto Label20; | ||
} | ||
} while (not_converged && (Counter < 30)); | ||
|
||
// Update h_comp_out in iteration Label23 | ||
P_comp_in = GetSatPressureRefrig(state, this->RefrigerantName, this->EvaporatingTemp, RefrigerantIndex, RoutineName); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏