-
Notifications
You must be signed in to change notification settings - Fork 396
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
Corrects crash in DOAS fan sizing #10816
Open
rraustad
wants to merge
7
commits into
develop
Choose a base branch
from
10814-DOAS-vector-issue
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6bf19d9
Correct crash in DOAS fan sizing
rraustad 0d248a0
Add unit test
rraustad b249e6f
Revise OA system fan sizing methodology
rraustad 4aed060
Merge remote-tracking branch 'remotes/origin/develop' into 10814-DOAS…
mjwitte c3f5c49
Merge remote-tracking branch 'remotes/origin/develop' into 10814-DOAS…
mjwitte 3bf1d38
Use same sizing as OA controller max
rraustad d357c9f
Add peak timestamp
rraustad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -777,13 +777,38 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo | |
} | ||
|
||
} else { | ||
auto &sysSizPeakDDNum = state.dataSize->SysSizPeakDDNum(this->curSysNum); | ||
|
||
if (this->airLoopSysFlag) { | ||
auto const &unitarysysEqSizing = this->unitarySysEqSizing(this->curSysNum); | ||
if (unitarysysEqSizing.CoolingAirFlow && unitarysysEqSizing.HeatingAirFlow) { | ||
this->autoSizedValue = std::max(unitarysysEqSizing.CoolingAirVolFlow, unitarysysEqSizing.HeatingAirVolFlow); | ||
if (this->autoSizedValue == unitarysysEqSizing.CoolingAirVolFlow) { | ||
if (this->curOASysNum > 0) { | ||
// should a parent object ever override DOAS or OASystem flow rate (e.g., using oaSysEqSizing().AirVolFlow)? | ||
if (outsideAirSys(this->curOASysNum).AirLoopDOASNum > -1) { | ||
this->autoSizedValue = | ||
this->airloopDOAS[outsideAirSys(this->curOASysNum).AirLoopDOASNum].SizingMassFlow / state.dataEnvrn->StdRhoAir; | ||
} else { | ||
switch (this->curDuctType) { | ||
case HVAC::AirDuctType::Cooling: { | ||
this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesCoolVolFlow; | ||
} break; | ||
case HVAC::AirDuctType::Heating: { | ||
this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesHeatVolFlow; | ||
} break; | ||
case HVAC::AirDuctType::Main: | ||
case HVAC::AirDuctType::Other: | ||
default: { | ||
this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow; | ||
} break; | ||
} | ||
if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesHeatVolFlow) { | ||
if (this->finalSysSizing(this->curSysNum).HeatDDNum > 0 && | ||
this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); | ||
} | ||
} else if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesCoolVolFlow) { | ||
auto &sysSizPeakDDNum = state.dataSize->SysSizPeakDDNum(this->curSysNum); | ||
if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); | ||
DDNameFanPeak = desDayInput.Title; | ||
|
@@ -793,8 +818,51 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo | |
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); | ||
} | ||
} | ||
} | ||
} else { | ||
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. The code change is from here to line 780 above. The below is just git confusion. |
||
auto &sysSizPeakDDNum = state.dataSize->SysSizPeakDDNum(this->curSysNum); | ||
|
||
if (this->airLoopSysFlag) { | ||
auto const &unitarysysEqSizing = this->unitarySysEqSizing(this->curSysNum); | ||
if (unitarysysEqSizing.CoolingAirFlow && unitarysysEqSizing.HeatingAirFlow) { | ||
this->autoSizedValue = std::max(unitarysysEqSizing.CoolingAirVolFlow, unitarysysEqSizing.HeatingAirVolFlow); | ||
if (this->autoSizedValue == unitarysysEqSizing.CoolingAirVolFlow) { | ||
if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); | ||
} | ||
|
||
} else if (this->autoSizedValue == unitarysysEqSizing.HeatingAirVolFlow) { | ||
} else if (this->autoSizedValue == unitarysysEqSizing.HeatingAirVolFlow) { | ||
if (this->finalSysSizing(this->curSysNum).HeatDDNum > 0 && | ||
this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); | ||
} | ||
} | ||
} else if (unitarysysEqSizing.CoolingAirFlow) { | ||
this->autoSizedValue = unitarysysEqSizing.CoolingAirVolFlow; | ||
if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); | ||
DDNameFanPeak = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD).Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); | ||
} | ||
} else if (unitarysysEqSizing.HeatingAirFlow) { | ||
this->autoSizedValue = unitarysysEqSizing.HeatingAirVolFlow; | ||
if (this->finalSysSizing(this->curSysNum).HeatDDNum > 0 && | ||
this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); | ||
|
@@ -805,31 +873,32 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo | |
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); | ||
} | ||
} | ||
} else if (unitarysysEqSizing.CoolingAirFlow) { | ||
this->autoSizedValue = unitarysysEqSizing.CoolingAirVolFlow; | ||
if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); | ||
DDNameFanPeak = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD).Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); | ||
} | ||
} else if (unitarysysEqSizing.HeatingAirFlow) { | ||
this->autoSizedValue = unitarysysEqSizing.HeatingAirVolFlow; | ||
if (this->finalSysSizing(this->curSysNum).HeatDDNum > 0 && | ||
this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); | ||
} | ||
|
||
} else { | ||
this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow; | ||
if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesHeatVolFlow) { | ||
if (this->finalSysSizing(this->curSysNum).HeatDDNum > 0 && | ||
this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); | ||
} | ||
} else if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesCoolVolFlow) { | ||
if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); | ||
} | ||
} | ||
} | ||
} else { | ||
this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow; | ||
if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesHeatVolFlow) { | ||
|
@@ -855,32 +924,8 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo | |
} | ||
} | ||
} | ||
} else { | ||
this->autoSizedValue = this->finalSysSizing(this->curSysNum).DesMainVolFlow; | ||
if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesHeatVolFlow) { | ||
if (this->finalSysSizing(this->curSysNum).HeatDDNum > 0 && | ||
this->finalSysSizing(this->curSysNum).HeatDDNum <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(this->finalSysSizing(this->curSysNum).HeatDDNum); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, this->finalSysSizing(this->curSysNum).SysHeatAirTimeStepPk)); | ||
} | ||
} else if (this->autoSizedValue == this->finalSysSizing(this->curSysNum).DesCoolVolFlow) { | ||
if (sysSizPeakDDNum.CoolFlowPeakDD > 0 && sysSizPeakDDNum.CoolFlowPeakDD <= state.dataEnvrn->TotDesDays) { | ||
auto &desDayInput = state.dataWeather->DesDayInput(sysSizPeakDDNum.CoolFlowPeakDD); | ||
DDNameFanPeak = desDayInput.Title; | ||
dateTimeFanPeak = format("{}/{} {}", | ||
desDayInput.Month, | ||
desDayInput.DayOfMonth, | ||
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText( | ||
state, sysSizPeakDDNum.TimeStepAtCoolFlowPk(sysSizPeakDDNum.CoolFlowPeakDD))); | ||
} | ||
} | ||
if (this->dataFractionUsedForSizing > 0.0) this->autoSizedValue = this->autoSizedValue * this->dataFractionUsedForSizing; | ||
} | ||
if (this->dataFractionUsedForSizing > 0.0) this->autoSizedValue = this->autoSizedValue * this->dataFractionUsedForSizing; | ||
} | ||
} | ||
} else if (this->dataNonZoneNonAirloopValue > 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Feels a little weird to size the OA system fan using the air loop flow rate (instead of using DesOutAirVolFlow) but that's what happened before and is how the MaxOA gets sized for the OA controller.