-
Notifications
You must be signed in to change notification settings - Fork 195
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
Support "No Load Supply Air Flow Rate Ratio" on UnitarySystemPerformance:Multispeed #4749
Conversation
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.
Made a couple of very minor changes. All good. Once CI reports success, we can merge. Thanks @joseph-robertson
N1 , \field No Load Supply Air Flow Rate Ratio | ||
\required-field | ||
\type real | ||
\minimum 0 | ||
\maximum 1 | ||
\note Used to define the no load operating air flow rate when the system fan | ||
\note is specified to operate continuously. |
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.
Ok, default of 1 is changed to be a required-field, 👍
double UnitarySystemPerformanceMultispeed_Impl::noLoadSupplyAirflowRateRatio() const { | ||
boost::optional<double> value = getDouble(OS_UnitarySystemPerformance_MultispeedFields::NoLoadSupplyAirFlowRateRatio, true); | ||
OS_ASSERT(value); | ||
return value.get(); | ||
} | ||
|
||
bool UnitarySystemPerformanceMultispeed_Impl::setNoLoadSupplyAirflowRateRatio(double noLoadSupplyAirflowRateRatio) { | ||
bool result = setDouble(OS_UnitarySystemPerformance_MultispeedFields::NoLoadSupplyAirFlowRateRatio, noLoadSupplyAirflowRateRatio); | ||
return result; | ||
} |
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.
A new getter and a setter (no reset), all good.
bool ok = setNoLoadSupplyAirflowRateRatio(1.0); | ||
OS_ASSERT(ok); |
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.
Ctor sets the required field, good.
// No Load Supply Air Flow Rate Ratio | ||
sysPerf.setDouble(UnitarySystemPerformance_MultispeedFields::NoLoadSupplyAirFlowRateRatio, modelObject.noLoadSupplyAirflowRateRatio()); | ||
|
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.
FT sets the field, which is required, so no if optional, 👍
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.
ideally a FT test would ensure this works appropriately.
// No Load | ||
EXPECT_EQ(1.0, testObject.noLoadSupplyAirflowRateRatio()); | ||
EXPECT_TRUE(testObject.setNoLoadSupplyAirflowRateRatio(0.5)); | ||
EXPECT_EQ(0.5, testObject.noLoadSupplyAirflowRateRatio()); |
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.
No problem here
src/osversion/VersionTranslator.cpp
Outdated
auto value = object.getString(i); | ||
if (value) { |
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.
auto value = object.getString(i); | |
if (value) { | |
if ((value = object.getString(i))) { |
if (i < 3) { | ||
newObject.setString(i, value.get()); | ||
} else { | ||
newObject.setString(i + 1, value.get()); | ||
} | ||
} | ||
} | ||
|
||
newObject.setDouble(3, 1.0); | ||
|
||
m_refactored.push_back(RefactoredObjectData(object, newObject)); | ||
ss << newObject; |
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.
No problem here, all good.
EXPECT_EQ("Unitary System Performance Multispeed 1", perf.getString(OS_UnitarySystemPerformance_MultispeedFields::Name).get()); | ||
EXPECT_EQ("No", perf.getString(OS_UnitarySystemPerformance_MultispeedFields::SingleModeOperation).get()); | ||
EXPECT_EQ(1.0, perf.getDouble(OS_UnitarySystemPerformance_MultispeedFields::NoLoadSupplyAirFlowRateRatio).get()); |
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.
Undefined OS_UnitarySystemPerformance_MultispeedFields
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.
Hmm, these weren't working?
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.
unless you #include the specific Object_FieldEnums.hxx it doesn't no. I'm torn about whether we want to start using the FieldEnums or not... it's going to create problems where we need to update them even if it's just the casing that changes, so I chose not to
CI Results for 4843352:
|
@joseph-robertson I don't have jenkins access here, could you check why the Windows runner is failing please? |
Pull request overview
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.