Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/EnergyPlus/Autosizing/All_Simple_Sizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Real64 DesiccantDehumidifierBFPerfDataFaceVelocitySizer::size(EnergyPlusData &st
this->autoSizedValue = min(6.0, this->autoSizedValue);
}
if (this->isEpJSON) {
this->sizingString = "nominal_air_face_velocity [m/s]";
this->sizingString = "Nominal Air Face Velocity [m/s]";
}
this->selectSizerOutput(state, errorsFound);
return this->autoSizedValue;
Expand Down
24 changes: 23 additions & 1 deletion src/EnergyPlus/Autosizing/Base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,29 @@ bool BaseSizer::checkInitialized(EnergyPlusData &state, bool &errorsFound)

void BaseSizer::overrideSizingString(std::string_view const string)
{
this->sizingString = string;
// some strings are set inside loops where field names are read in and change slightly.
// (e.g., at Speed 1, at Speed 2, or high_speed vs low_speed)
// these cannot easily be set in a component model's sizing function
// for those corner cases convert snake_case to Camel Case here:
std::string word, result;
std::string str{string.data(), string.size()}; // convert string_view to string
std::istringstream iss(str);
// blank strings will jump to end, Camel Case strings will pass through loop once
while (std::getline(iss, word, '_')) {
if (word == "for" || word == "per" || word == "at") { // don't Capitalize certain words
result += word;
} else if (word == "ua") { // Capitalize all letters of certain words
std::transform(word.begin(), word.end(), word.begin(), ::toupper);
result += word;
} else {
result += toupper(word[0]); // Capitalize the first letter
result += word.substr(1); // Append the rest of the word
}
if (result.size() != str.size()) {
result.insert(result.size(), " "); // insert space between words but not at end of string
}
}
this->sizingString = result;
this->overrideSizeString = false;
}

Expand Down
17 changes: 3 additions & 14 deletions src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,25 +336,14 @@ Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b
if (this->overrideSizeString) {
if (Util::SameString(this->compType, "ZoneHVAC:FourPipeFanCoil")) {
this->sizingString = "Maximum Supply Air Flow Rate [m3/s]";
if (this->isEpJSON) {
this->sizingString = "maximum_supply_air_flow_rate [m3/s]";
}
} else if (this->coilType == HVAC::CoilType::CoolingDXTwoSpeed) {
if (this->dataDXSpeedNum == 1) { // mode 1 is high speed in DXCoils loop
if (this->isEpJSON) {
this->sizingString = "high_speed_rated_air_flow_rate [m3/s]";
} else {
this->sizingString = "High Speed Rated Air Flow Rate [m3/s]";
}
this->sizingString = "High Speed Rated Air Flow Rate [m3/s]";
} else if (this->dataDXSpeedNum == 2) {
if (this->isEpJSON) {
this->sizingString = "low_speed_rated_air_flow_rate [m3/s]";
} else {
this->sizingString = "Low Speed Rated Air Flow Rate [m3/s]";
}
this->sizingString = "Low Speed Rated Air Flow Rate [m3/s]";
}
} else if (this->isEpJSON) {
this->sizingString = "cooling_supply_air_flow_rate [m3/s]";
this->sizingString = "Cooling Supply Air Flow Rate [m3/s]";
}
}
if (this->dataScalableSizingON) {
Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,7 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,

// override sizing string
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "cooling_design_capacity [W]";
}
this->sizingString = "Cooling Design Capacity [W]";
}
if (this->dataScalableCapSizingON) {
int const SELECT_CASE_var(this->zoneEqSizing(this->curZoneEqNum).SizingMethod(HVAC::CoolingCapacitySizing));
Expand Down
34 changes: 6 additions & 28 deletions src/EnergyPlus/Autosizing/CoolingSHRSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,40 +137,18 @@ void CoolingSHRSizer::updateSizingString(EnergyPlusData &state)
// override sizingString to match existing text
if (this->coilType == HVAC::CoilType::CoolingDXTwoSpeed) {
if (this->dataDXSpeedNum == 1) { // mode 1 is high speed in DXCoils loop
if (this->isEpJSON) {
this->sizingString = "high_speed_rated_sensible_heat_ratio";
} else {
this->sizingString = "High Speed Rated Sensible Heat Ratio";
}
this->sizingString = "High Speed Rated Sensible Heat Ratio";
} else if (this->dataDXSpeedNum == 2) {
if (this->isEpJSON) {
this->sizingString = "low_speed_gross_rated_sensible_heat_ratio";
} else {
this->sizingString = "Low Speed Gross Rated Sensible Heat Ratio";
}
this->sizingString = "Low Speed Gross Rated Sensible Heat Ratio";
}
} else if (this->coilType == HVAC::CoilType::CoolingDXMultiSpeed) {
if (this->isEpJSON) {
this->sizingString = fmt::format("speed_{}_rated_sensible_heat_ratio", state.dataSize->DataDXSpeedNum);
} else {
this->sizingString = fmt::format("Speed {} Rated Sensible Heat Ratio", state.dataSize->DataDXSpeedNum);
}
this->sizingString = fmt::format("Speed {} Rated Sensible Heat Ratio", state.dataSize->DataDXSpeedNum);
} else if (this->coilType == HVAC::CoilType::CoolingVRFFluidTCtrl) {
if (this->isEpJSON) {
this->sizingString = "rated_sensible_heat_ratio";
} else {
this->sizingString = "Rated Sensible Heat Ratio";
}
this->sizingString = "Rated Sensible Heat Ratio";
} else if (this->coilType == HVAC::CoilType::CoolingDXCurveFit) {
if (this->isEpJSON) {
this->sizingString = "gross_sensible_heat_ratio";
} else {
this->sizingString = "Gross Sensible Heat Ratio";
}
this->sizingString = "Gross Sensible Heat Ratio";
} else {
if (this->isEpJSON) {
this->sizingString = "gross_rated_sensible_heat_ratio";
}
this->sizingString = "Gross Rated Sensible Heat Ratio";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ Real64 CoolingWaterDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _o
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_inlet_air_humidity_ratio [kgWater/kgDryAir]";
}
this->sizingString = "Design Inlet Air Humidity Ratio [kgWater/kgDryAir]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ Real64 CoolingWaterDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _ori
}
// override sizing string
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_inlet_air_temperature [C]";
}
this->sizingString = "Design Inlet Air Temperature [C]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ Real64 CoolingWaterDesAirOutletHumRatSizer::size(EnergyPlusData &state, Real64 _
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_outlet_air_humidity_ratio [kgWater/kgDryAir]";
}
this->sizingString = "Design Outlet Air Humidity Ratio [kgWater/kgDryAir]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or
}
// override sizing string
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_outlet_air_temperature [C]";
}
this->sizingString = "Design Outlet Air Temperature [C]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ Real64 CoolingWaterDesWaterInletTempSizer::size(EnergyPlusData &state, Real64 _o
this->errorType = AutoSizingResultType::ErrorType1;
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_inlet_water_temperature [C]";
}
this->sizingString = "Design Inlet Water Temperature [C]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ Real64 CoolingWaterNumofTubesPerRowSizer::size(EnergyPlusData &state, Real64 _or
this->errorType = AutoSizingResultType::ErrorType1;
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "number_of_tubes_per_row";
}
this->sizingString = "Number of Tubes per Row";
}
this->selectSizerOutput(state, errorsFound);
return this->autoSizedValue;
Expand Down
10 changes: 2 additions & 8 deletions src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,9 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue,
// override sizing string for detailed coil model
if (this->overrideSizeString) {
if (this->coilType == HVAC::CoilType::CoolingWaterDetailed) {
if (this->isEpJSON) {
this->sizingString = "maximum_water_flow_rate [m3/s]";
} else {
this->sizingString = "Maximum Water Flow Rate [m3/s]";
}
this->sizingString = "Maximum Water Flow Rate [m3/s]";
} else {
if (this->isEpJSON) {
this->sizingString = "design_water_flow_rate [m3/s]";
}
this->sizingString = "Design Water Flow Rate [m3/s]";
}
}
this->selectSizerOutput(state, errorsFound);
Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ Real64 HeatingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b
}
// override sizing string
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "heating_supply_air_flow_rate [m3/s]";
}
this->sizingString = "Heating Supply Air Flow Rate [m3/s]";
}
if (this->dataScalableSizingON) {
if (this->zoneAirFlowSizMethod == DataSizing::SupplyAirFlowRate || this->zoneAirFlowSizMethod == DataSizing::None) {
Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/HeatingAirflowUASizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ Real64 HeatingAirflowUASizer::size(EnergyPlusData &state, Real64 _originalValue,
this->autoSizedValue = 0.0;
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "heating_coil_airflow_for_ua";
}
this->sizingString = "Heating Coil Airflow for UA [m3/s]";
}
this->selectSizerOutput(state, errorsFound);
return this->autoSizedValue;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Autosizing/HeatingAirflowUASizing.hh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct HeatingAirflowUASizer : BaseSizer
HeatingAirflowUASizer()
{
this->sizingType = AutoSizingType::HeatingAirflowUASizing;
this->sizingString = "Heating Coil Airflow For UA";
this->sizingString = "Heating Coil Airflow for UA";
}
~HeatingAirflowUASizer() = default;

Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,7 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,

// override sizing string
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "nominal_capacity [W]";
}
this->sizingString = "Heating Capacity [W]";
}
if (this->dataScalableCapSizingON) {
switch (this->zoneEqSizing(this->curZoneEqNum).SizingMethod(HVAC::HeatingCapacitySizing)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ Real64 HeatingWaterDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _o
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_inlet_air_humidity_ratio [kgWater/kgDryAir]";
}
this->sizingString = "Design Inlet Air Humidity Ratio [kgWater/kgDryAir]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ Real64 HeatingWaterDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _ori
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "rated_inlet_air_temperature";
}
this->sizingString = "Rated Inlet Air Temperature [C]";
}
this->selectSizerOutput(state, errorsFound);
// report not written for OA coils and needs to be corrected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64
// heating coil can't have negative capacity
this->autoSizedValue = std::max(0.0, this->autoSizedValue) * this->dataHeatSizeRatio * this->dataFracOfAutosizedHeatingCapacity;
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "water_heating_design_coil_load_for_ua_sizing";
}
this->sizingString = "Water Heating Design Coil Load for UA Sizing [W]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject && this->curSysNum <= this->numPrimaryAirSys) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct HeatingWaterDesCoilLoadUsedForUASizer : BaseSizerWithScalableInputs
HeatingWaterDesCoilLoadUsedForUASizer()
{
this->sizingType = AutoSizingType::HeatingWaterDesCoilLoadUsedForUASizing;
this->sizingString = "Water Heating Design Coil Load for UA Sizing";
this->sizingString = "Water Heating Design Coil Load for UA Sizing [W]";
}
~HeatingWaterDesCoilLoadUsedForUASizer() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ Real64 HeatingWaterDesCoilWaterVolFlowUsedForUASizer::size(EnergyPlusData &state
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "design_water_volume_flow_rate_used_for_ua_sizing";
}
this->sizingString = "Design Water Volume Flow Rate Used for UA Sizing [m3/s]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct HeatingWaterDesCoilWaterVolFlowUsedForUASizer : BaseSizer
HeatingWaterDesCoilWaterVolFlowUsedForUASizer()
{
this->sizingType = AutoSizingType::HeatingWaterDesCoilWaterVolFlowUsedForUASizing;
this->sizingString = "Design Water Volume Flow Rate Used for UA Sizing";
this->sizingString = "Design Water Volume Flow Rate Used for UA Sizing [m3/s]";
}
~HeatingWaterDesCoilWaterVolFlowUsedForUASizer() = default;

Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/HeatingWaterflowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ Real64 HeatingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue,
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "maximum_water_flow_rate [m3/s]";
}
this->sizingString = "Maximum Water Flow Rate [m3/s]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
11 changes: 1 addition & 10 deletions src/EnergyPlus/Autosizing/SystemAirFlowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -988,21 +988,12 @@ Real64 SystemAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, bo
if (this->overrideSizeString) {
if (Util::SameString(this->compType, "ZoneHVAC:FourPipeFanCoil")) {
this->sizingString = "Maximum Supply Air Flow Rate [m3/s]";
if (this->isEpJSON) {
this->sizingString = "maximum_supply_air_flow_rate [m3/s]";
}
} else if (Util::SameString(this->compType, "ZoneHVAC:UnitVentilator")) {
this->sizingString = "Maximum Supply Air Flow Rate [m3/s]";
if (this->isEpJSON) {
this->sizingString = "maximum_supply_air_flow_rate [m3/s]";
}
} else if (Util::SameString(this->compType, "Fan:SystemModel")) {
this->sizingString = "Design Maximum Air Flow Rate [m3/s]";
// if (this->isEpJSON) this->sizingString = "design_maximum_air_flow_rate [m3/s]";
} else {
if (this->isEpJSON) {
this->sizingString = "supply_air_maximum_flow_rate [m3/s]";
}
this->sizingString = "Supply Air Maximum Flow Rate [m3/s]";
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/WaterHeatingCapacitySizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ Real64 WaterHeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalVa
}
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "rated_capacity";
}
this->sizingString = "Rated Capacity [W]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
Expand Down
4 changes: 1 addition & 3 deletions src/EnergyPlus/Autosizing/WaterHeatingCoilUASizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,7 @@ Real64 WaterHeatingCoilUASizer::size(EnergyPlusData &state, Real64 _originalValu
state.dataSize->DataErrorsFound = true;
}
if (this->overrideSizeString) {
if (this->isEpJSON) {
this->sizingString = "u-factor_times_area_value [W/K]";
}
this->sizingString = "U-Factor Times Area Value [W/K]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject && this->curSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) {
Expand Down
3 changes: 0 additions & 3 deletions src/EnergyPlus/ChillerElectricASHRAE205.cc
Original file line number Diff line number Diff line change
Expand Up @@ -848,9 +848,6 @@ void ASHRAE205ChillerSpecs::size([[maybe_unused]] EnergyPlusData &state)
bool bPRINT = true; // TRUE if sizing is reported to output (eio)
AutoCalculateSizer sizerCondAirFlow;
std::string stringOverride = "Condenser Maximum Requested Flow Rate [m3/s]";
if (state.dataGlobal->isEpJSON) {
stringOverride = "condenser_maximum_requested_flow_rate [m3/s]";
}
sizerCondAirFlow.overrideSizingString(stringOverride);
sizerCondAirFlow.initializeWithinEP(state, CompType, this->Name, bPRINT, RoutineName);
this->CondVolFlowRate = sizerCondAirFlow.size(state, TempSize, ErrorsFound);
Expand Down
3 changes: 0 additions & 3 deletions src/EnergyPlus/ChillerElectricEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1579,9 +1579,6 @@ void ElectricEIRChillerSpecs::size(EnergyPlusData &state)
bool bPRINT = true; // TRUE if sizing is reported to output (eio)
AutoCalculateSizer sizerCondAirFlow;
std::string stringOverride = "Reference Condenser Fluid Flow Rate [m3/s]";
if (state.dataGlobal->isEpJSON) {
stringOverride = "reference_condenser_fluid_flow_rate [m3/s]";
}
sizerCondAirFlow.overrideSizingString(stringOverride);
sizerCondAirFlow.initializeWithinEP(state, CompType, this->Name, bPRINT, RoutineName);
this->CondVolFlowRate = sizerCondAirFlow.size(state, TempSize, ErrorsFound);
Expand Down
Loading
Loading