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

Improved Support for Multi-speed Fans #9746

Merged
merged 34 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
339d44e
Upload a draft NFP
lgu1234 Nov 18, 2022
5e095fb
Revise NFP based on comments
lgu1234 Dec 1, 2022
ee4cbff
Update NFP based on comments
lgu1234 Jan 9, 2023
9206678
Merge branch 'develop' into MultispeedFans
lgu1234 Jan 9, 2023
52a199a
Final NFP
lgu1234 Jan 12, 2023
1da6891
Merge branch 'develop' into MultispeedFans
lgu1234 Jan 12, 2023
09e6b25
Upload design document
lgu1234 Feb 22, 2023
c52794b
Merge branch 'develop' into MultispeedFans
lgu1234 Feb 22, 2023
9ffbd6e
Initial upload
lgu1234 May 10, 2023
b5424bd
Merge branch 'develop' into MultispeedFans
lgu1234 May 10, 2023
e86f452
Clang format
lgu1234 May 10, 2023
029f6ba
Clang format
lgu1234 May 11, 2023
95499ca
Correct a mistake in unit test
lgu1234 May 11, 2023
187ef58
Clang format more
lgu1234 May 11, 2023
c7599db
Clang format in unit test
lgu1234 May 11, 2023
ea74729
Upload a rvi file and correct a mistake
lgu1234 May 15, 2023
9fa565c
Merge branch 'develop' into MultispeedFans
lgu1234 May 15, 2023
8bbc5bd
Address comments
lgu1234 May 17, 2023
8d0b646
Merge branch 'develop' into MultispeedFans
lgu1234 May 17, 2023
bfdd62a
Adjust inputs due to idd changes
lgu1234 May 17, 2023
8466b38
Merge branch 'develop' into MultispeedFans
lgu1234 May 18, 2023
a9ea65b
Merge branch 'develop' into MultispeedFans
lgu1234 Jun 7, 2023
fde9769
Merge branch 'develop' into MultispeedFans
lgu1234 Jun 14, 2023
9c31b28
Address comments
lgu1234 Jul 6, 2023
dcc69ed
Merge branch 'MultispeedFans' of https://github.com/NREL/EnergyPlus i…
lgu1234 Jul 6, 2023
13eb113
Merge branch 'develop' into MultispeedFans
lgu1234 Jul 6, 2023
9c8a271
CLang format
lgu1234 Jul 6, 2023
47bc2ce
Merge branch 'develop' into MultispeedFans
lgu1234 Jul 6, 2023
f44c7fe
Address comments
lgu1234 Jul 19, 2023
538b5a8
Merge branch 'develop' into MultispeedFans
lgu1234 Jul 19, 2023
b03e970
Merge branch 'develop' into MultispeedFans
lgu1234 Aug 16, 2023
cfee11b
Conflict correction
lgu1234 Aug 16, 2023
5fec7ee
Merge branch 'develop' into MultispeedFans
lgu1234 Aug 16, 2023
36a9e38
Clang format
lgu1234 Aug 16, 2023
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
1,083 changes: 1,083 additions & 0 deletions design/FY2023/NFP_MultispeedFans.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

21 changes: 18 additions & 3 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -36447,10 +36447,18 @@ ZoneHVAC:WaterToAirHeatPump,
\note Constant results in 100% water flow regardless of compressor PLR
\note Cycling results in water flow that matches compressor PLR
\note ConstantOnDemand results in 100% water flow whenever the coil is on, but is 0% whenever the coil has no load
A20; \field Design Specification ZoneHVAC Sizing Object Name
A20, \field Design Specification ZoneHVAC Sizing Object Name
\note Enter the name of a DesignSpecificationZoneHVACSizing object.
\type object-list
\object-list DesignSpecificationZoneHVACSizingName
A21, \field Design Specification Multispeed Object Type
\type choice
\key UnitarySystemPerformance:Multispeed
\note Enter the type of performance specification object used to describe the multispeed coil or fan.
A22; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\note Enter the name of the performance specification object used to describe the multispeed coil or fan.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add two new optional fields as proposed

Copy link
Member

Choose a reason for hiding this comment

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

Two optional fields, no transition 👍

Copy link
Member

Choose a reason for hiding this comment

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

The wording here is a little funny, but maybe there's precedent:

\note Enter the name of the performance specification objec

The phrase "Enter the name of..." sounds like it's one of the many interactive text-based games I probably don't still play in 2023. If there is any other change to make, I'd prefer to at least take out the word "Enter". @mjwitte any thoughts on this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Actually, I copy the note from the same field used in UnitarySystem. I am open to any changes.

A27; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\note Enter the name of the performance specification object used to describe the multispeed coil.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lgu1234 If there are other changes to make, then let's change this everywhere to simply say "\note The name of the . . . "

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte Done everywhere (3 objects)

Copy link
Member

Choose a reason for hiding this comment

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

The note actually still appears to say "Enter the name..." But it's fine, and not worth any other commits.


ZoneHVAC:Dehumidifier:DX,
\memo This object calculates the performance of zone (room) air dehumidifiers.
Expand Down Expand Up @@ -42340,14 +42348,21 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow,
\default 21.0
\units C
\note Supplemental heater will not operate when outdoor temperature exceeds this value.
A19; \field Controlling Zone or Thermostat Location
A19, \field Controlling Zone or Thermostat Location
\type object-list
\object-list ZoneNames
\note Used only for AirloopHVAC equipment on a main branch and defines zone name where thermostat is located.
\note Not required for zone equipment. Leave blank if terminal unit is used in AirLoopHVAC:OutdoorAirSystem:EquipmentList.
\note Required when terminal unit is used on main AirloopHVAC branch and coils are not set point controlled.
\note When terminal unit is used in air loop and is load controlled, this zone's thermostat will control operation.

A20, \field Design Specification Multispeed Object Type
\type choice
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add two new optional fields as proposed

Copy link
Member

Choose a reason for hiding this comment

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

Two optional fields, no transition 👍

\key UnitarySystemPerformance:Multispeed
\note Enter the type of performance specification object used to describe the multispeed coil or fan.
A21; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\note Enter the name of the performance specification object used to describe the multispeed coil or fan.

\group Zone HVAC Radiative/Convective Units

Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HVACFan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ namespace HVACFan {

FanSystem::FanSystem(EnergyPlusData &state, std::string const &objectName)
: availSchedIndex(0), inletNodeNum(0), outletNodeNum(0), designAirVolFlowRate(0.0), speedControl(SpeedControlMethod::NotSet), deltaPress(0.0),
designElecPower(0.0), powerModFuncFlowFractionCurveIndex(0), AirLoopNum(0), AirPathFlag(false), fanIsSecondaryDriver(false),
designElecPower(0.0), powerModFuncFlowFractionCurveIndex(0), AirLoopNum(0), AirPathFlag(false), m_numSpeeds(0), fanIsSecondaryDriver(false),
Copy link
Member

Choose a reason for hiding this comment

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

This is fine, but I would request that any future time you are adding or modifying class member variables, just initialize them on the class declaration itself, and don't perpetuate these long initializer lists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar I can do it to initialize class member variables. In order to be consistent with existing structure, I prefer to make any changes later after the new feature is merged. Thanks.

m_fanType_Num(0), m_designAirVolFlowRateWasAutosized(false), m_minPowerFlowFrac(0.0), m_motorEff(0.0), m_motorInAirFrac(0.0),
m_designElecPowerWasAutosized(false), m_powerSizingMethod(PowerSizingMethod::Invalid), m_elecPowerPerFlowRate(0.0),
m_elecPowerPerFlowRatePerPressure(0.0), m_fanTotalEff(0.0), m_nightVentPressureDelta(0.0), m_nightVentFlowFraction(0.0), m_zoneNum(0),
m_zoneRadFract(0.0), m_heatLossesDestination(ThermalLossDestination::Invalid), m_qdotConvZone(0.0), m_qdotRadZone(0.0), m_numSpeeds(0),
m_zoneRadFract(0.0), m_heatLossesDestination(ThermalLossDestination::Invalid), m_qdotConvZone(0.0), m_qdotRadZone(0.0),
m_inletAirMassFlowRate(0.0), m_outletAirMassFlowRate(0.0), m_maxAirMassFlowRate(0.0), m_inletAirTemp(0.0), m_outletAirTemp(0.0),
m_inletAirHumRat(0.0), m_outletAirHumRat(0.0), m_inletAirEnthalpy(0.0), m_outletAirEnthalpy(0.0), m_objEnvrnFlag(true),
m_objSizingFlag(true), m_fanPower(0.0), m_fanEnergy(0.0), m_maxAirFlowRateEMSOverrideOn(false), m_maxAirFlowRateEMSOverrideValue(0.0),
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HVACFan.hh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ namespace HVACFan {
int powerModFuncFlowFractionCurveIndex; // pointer to performance curve or table
int AirLoopNum; // AirLoop number
bool AirPathFlag; // Yes, this fan is a part of airpath
int m_numSpeeds; // input for how many speed levels for discrete fan
std::vector<Real64> m_massFlowAtSpeed;
Copy link
Member

Choose a reason for hiding this comment

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

A regular vector, always nice to see standard types. The size of this isn't known at compile time, is it? (If so, we should make it a fixed size std::array...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Myoldmopar Unfortunately, the size of vector is unknown at compile time. A fixed size of array may not be used.


// Mass Flow Rate Control Variables
bool fanIsSecondaryDriver; // true if this fan is used to augment flow and may pass air when off.
Expand Down Expand Up @@ -205,12 +207,10 @@ namespace HVACFan {
Real64 m_qdotConvZone; // fan power lost to surrounding zone by convection to air (W)
Real64 m_qdotRadZone; // fan power lost to surrounding zone by radiation to zone surfaces(W)
std::string m_endUseSubcategoryName;
int m_numSpeeds; // input for how many speed levels for discrete fan
std::vector<Real64> m_flowFractionAtSpeed; // array of flow fractions for speed levels
std::vector<Real64> m_powerFractionAtSpeed; // array of power fractions for speed levels
std::vector<bool> m_powerFractionInputAtSpeed;
// calculation variables
std::vector<Real64> m_massFlowAtSpeed;
std::vector<Real64> m_totEfficAtSpeed;
Real64 m_inletAirMassFlowRate; // MassFlow through the Fan being Simulated [kg/Sec]
Real64 m_outletAirMassFlowRate;
Expand Down
Loading