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

Use Enums for SetupOutputVariable Arguments (Try 2) #8898

Merged
merged 12 commits into from
Jul 22, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ \subsection{DX Cooling Coils}\label{dx-cooling-coils}

Actuators are available for overriding the autosize rated airflow rate and total cooling capacity of the Coil:Cooling:DX object.~ Actuators called ``Coil:Cooling:DX:SingleSpeed'' are available with control types ``Autosized Rated Air Flow Rate'' (in m3/s), ``Autosized Rated Total Cooling Capacity'' (in W), and ``Autosized Rated Sensible Heat Ratio'' (in W/W).~ These are only useful from the calling point named AfterComponentInputReadIn.

\subsection{DX Thermal Storage Coils}\label{dx-cooling-coils}
\subsection{DX Thermal Storage Coils}\label{dx-thermal-storage-coils}

There is an actuator that is available for overriding the operating mode of the DX thermal storage coil object.~ The actuator is called ``Coil:Cooling:DX:SingleSpeed:ThermalStorage'' and is available with the control type ``Operating Mode.'' The operating mode has the following states/values:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,7 @@ \subsubsection{Inputs}\label{inputs-8-029}

Note: the packaged terminal air conditioner's supply air fan, cooling coil and heating coil must be connected according to the configuration shown above (Figure~\ref{fig:schematic-of-a-packaged-terminal-air-001}) for the draw through fan configuration. The only other valid configuration is with a blow through fan placement, where the fan is located between the outdoor air mixer and the DX cooling coil.

\paragraph{Field: Supply Air Fan Operating Mode Schedule Name}\label{field-supply-air-fan-operating-mode-schedule-name-4}
\paragraph{Field: Supply Air Fan Operating Mode Schedule Name}\label{field-supply-air-fan-operating-mode-schedule-name-4-b}

This alpha field specifies the name of the supply air fan operating mode schedule. The supply air fan operating mode may vary during the simulation based on time-of-day or with a change of season. Schedule values of 0 denote that the supply air fan and the heating or cooling coil cycle on and off together to meet the heating or cooling load (a.k.a. AUTO fan). Schedule values other than 0 denote that the supply fan runs continuously while the heating or cooling coil cycles to meet the load.

Expand Down
469 changes: 237 additions & 232 deletions src/EnergyPlus/AirflowNetworkBalanceManager.cc

Large diffs are not rendered by default.

21 changes: 13 additions & 8 deletions src/EnergyPlus/BaseboardElectric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -361,24 +361,29 @@ namespace BaseboardElectric {
"Baseboard Total Heating Energy",
OutputProcessor::Unit::J,
thisBaseboard.Energy,
"System",
"Sum",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Summed,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the kind of change in this PR -- lots of SetupOutputVariable calls changed from strings to the new enums.

thisBaseboard.EquipName,
_,
"ENERGYTRANSFER",
"BASEBOARD",
_,
"System");

SetupOutputVariable(
state, "Baseboard Total Heating Rate", OutputProcessor::Unit::W, thisBaseboard.Power, "System", "Average", thisBaseboard.EquipName);
SetupOutputVariable(state,
"Baseboard Total Heating Rate",
OutputProcessor::Unit::W,
thisBaseboard.Power,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
thisBaseboard.EquipName);

SetupOutputVariable(state,
"Baseboard Electricity Energy",
OutputProcessor::Unit::J,
thisBaseboard.ElecUseLoad,
"System",
"Sum",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Summed,
thisBaseboard.EquipName,
_,
"Electricity",
Expand All @@ -390,8 +395,8 @@ namespace BaseboardElectric {
"Baseboard Electricity Rate",
OutputProcessor::Unit::W,
thisBaseboard.ElecUseRate,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
thisBaseboard.EquipName);
}
}
Expand Down
36 changes: 18 additions & 18 deletions src/EnergyPlus/BaseboardRadiator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ namespace BaseboardRadiator {
"Baseboard Total Heating Energy",
OutputProcessor::Unit::J,
baseboard->Baseboard(BaseboardNum).Energy,
"System",
"Sum",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Summed,
baseboard->Baseboard(BaseboardNum).EquipID,
_,
"ENERGYTRANSFER",
Expand All @@ -485,8 +485,8 @@ namespace BaseboardRadiator {
"Baseboard Hot Water Energy",
OutputProcessor::Unit::J,
baseboard->Baseboard(BaseboardNum).Energy,
"System",
"Sum",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Summed,
baseboard->Baseboard(BaseboardNum).EquipID,
_,
"PLANTLOOPHEATINGDEMAND",
Expand All @@ -498,56 +498,56 @@ namespace BaseboardRadiator {
"Baseboard Total Heating Rate",
OutputProcessor::Unit::W,
baseboard->Baseboard(BaseboardNum).Power,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);

SetupOutputVariable(state,
"Baseboard Hot Water Mass Flow Rate",
OutputProcessor::Unit::kg_s,
baseboard->Baseboard(BaseboardNum).WaterMassFlowRate,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);

SetupOutputVariable(state,
"Baseboard Air Mass Flow Rate",
OutputProcessor::Unit::kg_s,
baseboard->Baseboard(BaseboardNum).AirMassFlowRate,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);

SetupOutputVariable(state,
"Baseboard Air Inlet Temperature",
OutputProcessor::Unit::C,
baseboard->Baseboard(BaseboardNum).AirInletTemp,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);

SetupOutputVariable(state,
"Baseboard Air Outlet Temperature",
OutputProcessor::Unit::C,
baseboard->Baseboard(BaseboardNum).AirOutletTemp,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);

SetupOutputVariable(state,
"Baseboard Water Inlet Temperature",
OutputProcessor::Unit::C,
baseboard->Baseboard(BaseboardNum).WaterInletTemp,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);

SetupOutputVariable(state,
"Baseboard Water Outlet Temperature",
OutputProcessor::Unit::C,
baseboard->Baseboard(BaseboardNum).WaterOutletTemp,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
baseboard->Baseboard(BaseboardNum).EquipID);
}
}
Expand Down
55 changes: 41 additions & 14 deletions src/EnergyPlus/BoilerSteam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,19 @@ namespace BoilerSteam {

void BoilerSpecs::setupOutputVars(EnergyPlusData &state)
{
SetupOutputVariable(state, "Boiler Heating Rate", OutputProcessor::Unit::W, this->BoilerLoad, "System", "Average", this->Name);
SetupOutputVariable(state,
"Boiler Heating Rate",
OutputProcessor::Unit::W,
this->BoilerLoad,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->Name);
SetupOutputVariable(state,
"Boiler Heating Energy",
OutputProcessor::Unit::J,
this->BoilerEnergy,
"System",
"Sum",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Summed,
this->Name,
_,
"ENERGYTRANSFER",
Expand All @@ -461,28 +467,49 @@ namespace BoilerSteam {
"Boiler " + this->BoilerFuelTypeForOutputVariable + " Rate",
OutputProcessor::Unit::W,
this->FuelUsed,
"System",
"Average",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->Name);
SetupOutputVariable(state,
"Boiler " + this->BoilerFuelTypeForOutputVariable + " Energy",
OutputProcessor::Unit::J,
this->FuelConsumed,
"System",
"Sum",
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Summed,
this->Name,
_,
this->BoilerFuelTypeForOutputVariable,
"Heating",
this->EndUseSubcategory,
"Plant");
SetupOutputVariable(state, "Boiler Steam Efficiency", OutputProcessor::Unit::None, this->BoilerEff, "System", "Average", this->Name);
SetupOutputVariable(
state, "Boiler Steam Inlet Temperature", OutputProcessor::Unit::C, this->BoilerInletTemp, "System", "Average", this->Name);
SetupOutputVariable(
state, "Boiler Steam Outlet Temperature", OutputProcessor::Unit::C, this->BoilerOutletTemp, "System", "Average", this->Name);
SetupOutputVariable(
state, "Boiler Steam Mass Flow Rate", OutputProcessor::Unit::kg_s, this->BoilerMassFlowRate, "System", "Average", this->Name);
SetupOutputVariable(state,
"Boiler Steam Efficiency",
OutputProcessor::Unit::None,
this->BoilerEff,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->Name);
SetupOutputVariable(state,
"Boiler Steam Inlet Temperature",
OutputProcessor::Unit::C,
this->BoilerInletTemp,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->Name);
SetupOutputVariable(state,
"Boiler Steam Outlet Temperature",
OutputProcessor::Unit::C,
this->BoilerOutletTemp,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->Name);
SetupOutputVariable(state,
"Boiler Steam Mass Flow Rate",
OutputProcessor::Unit::kg_s,
this->BoilerMassFlowRate,
OutputProcessor::SOVTimeStepType::System,
OutputProcessor::SOVStoreType::Average,
this->Name);
Copy link
Member Author

Choose a reason for hiding this comment

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

Some of the changes caused Clang Format to require line breaks.

}

void BoilerSpecs::autosize(EnergyPlusData &state)
Expand Down
Loading