From c703a56d5019640b2559adc61188f31b5a9af2f7 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Thu, 3 Oct 2019 15:34:49 -0500 Subject: [PATCH 01/86] Require Python 3.6 or higher --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b2d317db56..01699cf0ddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,8 +72,8 @@ option( ENABLE_INSTALL_REMOTE "Enable install_remote and install_remote_plist co mark_as_advanced( ENABLE_INSTALL_REMOTE ) -# we are making python a required dependency, so find it here...starting off by requiring at least 2.7 -find_package(PythonInterp 2.7 REQUIRED) +# we are making python a required dependency, so find it here +find_package(PythonInterp 3.6 REQUIRED) if( BUILD_TESTING ) option( ENABLE_REGRESSION_TESTING "Enable Regression Tests" OFF ) From 71c6760b1873cd4666aeabae2959261b0c4b76ca Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Fri, 4 Oct 2019 10:50:43 -0500 Subject: [PATCH 02/86] Open it up to just any Python 3 for now --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01699cf0ddd..4f9438d6ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,7 @@ option( ENABLE_INSTALL_REMOTE "Enable install_remote and install_remote_plist co mark_as_advanced( ENABLE_INSTALL_REMOTE ) # we are making python a required dependency, so find it here -find_package(PythonInterp 3.6 REQUIRED) +find_package(PythonInterp 3 REQUIRED) if( BUILD_TESTING ) option( ENABLE_REGRESSION_TESTING "Enable Regression Tests" OFF ) From fa08a566e364fa0beaa217bdb9594e4c9bc52040 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 21 Oct 2019 10:02:00 -0600 Subject: [PATCH 03/86] update water mains temp calc to be consistent with reference --- src/EnergyPlus/WeatherManager.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index c47fe958508..cf2e764288e 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -8357,7 +8357,6 @@ namespace WeatherManager { Real64 Lag; // Value used in correlation Real64 Offset; // Value used in correlation Real64 CurrentWaterMainsTemp; // calculated water main temp (F) - Real64 WaterMainsTempFromCorrelation; // calculated water main temp (C) // FLOW: Tavg = AnnualOAAvgDryBulbTemp * (9.0 / 5.0) + 32.0; @@ -8368,17 +8367,17 @@ namespace WeatherManager { Offset = 6.0; int latitude_sign; if (Latitude >= 0) { - latitude_sign = -1; - } else { latitude_sign = 1; + } else { + latitude_sign = -1; } - CurrentWaterMainsTemp = Tavg + Offset + Ratio * (Tdiff / 2.0) * latitude_sign * std::cos((0.986 * (DayOfYear - 15.0 - Lag)) * DegToRadians); + CurrentWaterMainsTemp = Tavg + Offset + Ratio * (Tdiff / 2.0) * latitude_sign * std::sin((0.986 * (DayOfYear - 15.0 - Lag) - 90) * DegToRadians); if (CurrentWaterMainsTemp < 32.0) CurrentWaterMainsTemp = 32.0; // Convert F to C - return WaterMainsTempFromCorrelation = (CurrentWaterMainsTemp - 32.0) * (5.0 / 9.0); + return (CurrentWaterMainsTemp - 32.0) * (5.0 / 9.0); } void GetWeatherStation(bool &ErrorsFound) { From 785782e464be6df867f91e81ce57c78f83589b1e Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 28 Oct 2019 14:21:03 +0100 Subject: [PATCH 04/86] Add unit test for #7481 --- .../unit/OutputReportTabular.unit.cc | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index 918a741fb6a..32a342f2ba2 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -7653,3 +7654,130 @@ TEST_F(SQLiteFixture, WriteSourceEnergyEndUseSummary_TestPerArea) { EnergyPlus::sqlite->sqliteCommit(); } + +TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) +{ + EnergyPlus::sqlite->sqliteBegin(); + EnergyPlus::sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); + + OutputReportTabular::displayTabularBEPS = true; + OutputReportTabular::displayDemandEndUse = true; + OutputReportTabular::displayLEEDSummary = true; + + OutputReportTabular::WriteTabularFiles = true; + + SetupUnitConversions(); + OutputReportTabular::unitsStyle = OutputReportTabular::unitsStyleInchPound; + + // Needed to avoid crash (from ElectricPowerServiceManager.hh) + createFacilityElectricPowerServiceObject(); + + SetPredefinedTables(); + + Real64 extLitUse; + + SetupOutputVariable("Exterior Lights Electric Energy", + OutputProcessor::Unit::J, + extLitUse, + "Zone", + "Sum", + "Lite1", + _, + "Electricity", + "Exterior Lights", + "General"); + SetupOutputVariable("Exterior Lights Electric Energy", + OutputProcessor::Unit::J, + extLitUse, + "Zone", + "Sum", + "Lite2", + _, + "Electricity", + "Exterior Lights", + "AnotherEndUseSubCat"); + SetupOutputVariable("Exterior Lights Electric Energy", + OutputProcessor::Unit::J, + extLitUse, + "Zone", + "Sum", + "Lite3", + _, + "Electricity", + "Exterior Lights", + "General"); + + DataGlobals::DoWeathSim = true; + DataGlobals::TimeStepZone = 1.0; + displayTabularBEPS = true; + // OutputProcessor::TimeValue.allocate(2); + + auto timeStep = 1.0; + + SetupTimePointers("Zone", timeStep); + SetupTimePointers("HVAC", timeStep); + + TimeValue.at(OutputProcessor::TimeStepType::TimeStepZone).TimeStep = 60; + TimeValue.at(OutputProcessor::TimeStepType::TimeStepSystem).TimeStep = 60; + + GetInputOutputTableSummaryReports(); + + extLitUse = 1.01; + + DataEnvironment::Month = 12; + + UpdateMeterReporting(); + UpdateDataandReport(OutputProcessor::TimeStepType::TimeStepZone); + GatherBEPSResultsForTimestep(OutputProcessor::TimeStepType::TimeStepZone); + GatherPeakDemandForTimestep(OutputProcessor::TimeStepType::TimeStepZone); + EXPECT_EQ(extLitUse * 3, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights)); + // General + EXPECT_EQ(extLitUse * 2, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1)); + // AnotherEndUseSubCat + EXPECT_EQ(extLitUse * 1, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1)); + + UpdateMeterReporting(); + UpdateDataandReport(OutputProcessor::TimeStepType::TimeStepZone); + GatherBEPSResultsForTimestep(OutputProcessor::TimeStepType::TimeStepZone); + GatherPeakDemandForTimestep(OutputProcessor::TimeStepType::TimeStepZone); + EXPECT_EQ(extLitUse * 6, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights)); + // General + EXPECT_EQ(extLitUse * 4, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1)); + // AnotherEndUseSubCat + EXPECT_EQ(extLitUse * 2, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1)); + + UpdateMeterReporting(); + UpdateDataandReport(OutputProcessor::TimeStepType::TimeStepZone); + GatherBEPSResultsForTimestep(OutputProcessor::TimeStepType::TimeStepZone); + GatherPeakDemandForTimestep(OutputProcessor::TimeStepType::TimeStepZone); + EXPECT_EQ(extLitUse * 9, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights)); + // General + EXPECT_EQ(extLitUse * 6, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1)); + // AnotherEndUseSubCat + EXPECT_EQ(extLitUse * 3, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1)); + + OutputReportTabular::WriteBEPSTable(); + OutputReportTabular::WriteDemandEndUseSummary(); + + EnergyPlus::sqlite->sqliteCommit(); + + // We test for Heating and Total, since they should be the same + std::vector testReportNames = {"AnnualBuildingUtilityPerformanceSummary", "DemandEndUseComponentsSummary"}; + + + for (auto& reportName: testReportNames) { + + std::string query("SELECT RowName From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ColumnName = 'Subcategory'" + " AND ReportName = '" + reportName + "'" + " AND Value = 'AnotherEndUseSubCat'"); + + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(1ul, result.size()) << "Query crashed for reportName=" << reportName; + + // Add informative message if failed + EXPECT_EQ("Exterior Lighting", result[0][0]) << "Failed for reportName=" << reportName; + } +} From 662cca2574ae599e51a834ece1eea86dabfb152a Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 28 Oct 2019 15:01:21 +0100 Subject: [PATCH 05/86] Add a method to forward-fill rowHead and use it for End Use By Subcategories (in BEPS and Demand End Use) before outputing to SQL/ResultsSchema --- src/EnergyPlus/OutputReportTabular.cc | 22 ++++++++++++++++++++++ src/EnergyPlus/OutputReportTabular.hh | 4 ++++ 2 files changed, 26 insertions(+) diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 636210a83dd..71bdd559993 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -8565,6 +8565,11 @@ namespace OutputReportTabular { if (displayTabularBEPS) { WriteSubtitle("End Uses By Subcategory"); WriteTable(tableBody, rowHead, columnHead, columnWidth); + + // Before outputing to SQL, we forward fill the End use column (rowHead) (cf #7481) + // for better sql queries + FillRowHead(rowHead); + if (sqlite) { sqlite->createSQLiteTabularDataRecords( tableBody, rowHead, columnHead, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "End Uses By Subcategory"); @@ -9893,6 +9898,9 @@ namespace OutputReportTabular { // heading for the entire sub-table WriteSubtitle("End Uses By Subcategory"); WriteTable(tableBody, rowHead, columnHead, columnWidth, false, footnote); + + // Forward-Fill the blanks in the rowHead for better sql queries + FillRowHead(rowHead); if (sqlite) { sqlite->createSQLiteTabularDataRecords( tableBody, rowHead, columnHead, "DemandEndUseComponentsSummary", "Entire Facility", "End Uses By Subcategory"); @@ -15151,6 +15159,20 @@ namespace OutputReportTabular { } } + void FillRowHead(Array1D_string & rowHead) + { + // Forward fill the blanks in rowHead (eg End use column) + std::string currentEndUseName; + for (size_t i = 1; i <= rowHead.size(); ++i) { + std::string thisEndUseName = rowHead(i); + if (thisEndUseName.empty()) { + rowHead(i) = currentEndUseName; + } else { + currentEndUseName = thisEndUseName; + } + } + } + //====================================================================================================================== //====================================================================================================================== diff --git a/src/EnergyPlus/OutputReportTabular.hh b/src/EnergyPlus/OutputReportTabular.hh index 1a6a21efa56..3c1ee2acede 100644 --- a/src/EnergyPlus/OutputReportTabular.hh +++ b/src/EnergyPlus/OutputReportTabular.hh @@ -890,6 +890,10 @@ namespace OutputReportTabular { void DetermineBuildingFloorArea(); + /* Tables with Subcategories in particular have a blank for rowHead for display in the HTML output. + * This routine will fill up the blanks for output to Sql in particular */ + void FillRowHead(Array1D_string & rowHead); + //====================================================================================================================== //====================================================================================================================== From ae7ef90907505bca3b7bc8fabcb2267435b4ba4e Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 28 Oct 2019 15:50:14 +0100 Subject: [PATCH 06/86] Demonstrate that one can now use a (complicated) SQL query to search by end use subcat --- .../unit/OutputReportTabular.unit.cc | 106 +++++++++++++++--- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index 32a342f2ba2..4e297d1b7b8 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -7667,14 +7667,14 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) OutputReportTabular::WriteTabularFiles = true; SetupUnitConversions(); - OutputReportTabular::unitsStyle = OutputReportTabular::unitsStyleInchPound; + OutputReportTabular::unitsStyle = OutputReportTabular::unitsStyleJtoKWH; // Needed to avoid crash (from ElectricPowerServiceManager.hh) createFacilityElectricPowerServiceObject(); SetPredefinedTables(); - Real64 extLitUse; + Real64 extLitUse = 1e8; SetupOutputVariable("Exterior Lights Electric Energy", OutputProcessor::Unit::J, @@ -7722,39 +7722,37 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) GetInputOutputTableSummaryReports(); - extLitUse = 1.01; - DataEnvironment::Month = 12; UpdateMeterReporting(); UpdateDataandReport(OutputProcessor::TimeStepType::TimeStepZone); GatherBEPSResultsForTimestep(OutputProcessor::TimeStepType::TimeStepZone); GatherPeakDemandForTimestep(OutputProcessor::TimeStepType::TimeStepZone); - EXPECT_EQ(extLitUse * 3, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights)); + EXPECT_NEAR(extLitUse * 3, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights), 1.); // General - EXPECT_EQ(extLitUse * 2, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1)); + EXPECT_NEAR(extLitUse * 2, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1), 1.); // AnotherEndUseSubCat - EXPECT_EQ(extLitUse * 1, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1)); + EXPECT_NEAR(extLitUse * 1, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1), 1.); UpdateMeterReporting(); UpdateDataandReport(OutputProcessor::TimeStepType::TimeStepZone); GatherBEPSResultsForTimestep(OutputProcessor::TimeStepType::TimeStepZone); GatherPeakDemandForTimestep(OutputProcessor::TimeStepType::TimeStepZone); - EXPECT_EQ(extLitUse * 6, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights)); + EXPECT_NEAR(extLitUse * 6, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights), 1.); // General - EXPECT_EQ(extLitUse * 4, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1)); + EXPECT_NEAR(extLitUse * 4, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1), 1.); // AnotherEndUseSubCat - EXPECT_EQ(extLitUse * 2, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1)); + EXPECT_NEAR(extLitUse * 2, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1), 1.); UpdateMeterReporting(); UpdateDataandReport(OutputProcessor::TimeStepType::TimeStepZone); GatherBEPSResultsForTimestep(OutputProcessor::TimeStepType::TimeStepZone); GatherPeakDemandForTimestep(OutputProcessor::TimeStepType::TimeStepZone); - EXPECT_EQ(extLitUse * 9, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights)); + EXPECT_NEAR(extLitUse * 9, gatherEndUseBEPS(1, DataGlobalConstants::endUseExteriorLights), 1.); // General - EXPECT_EQ(extLitUse * 6, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1)); + EXPECT_NEAR(extLitUse * 6, gatherEndUseSubBEPS(1, DataGlobalConstants::endUseExteriorLights, 1), 1.); // AnotherEndUseSubCat - EXPECT_EQ(extLitUse * 3, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1)); + EXPECT_NEAR(extLitUse * 3, gatherEndUseSubBEPS(2, DataGlobalConstants::endUseExteriorLights, 1), 1.); OutputReportTabular::WriteBEPSTable(); OutputReportTabular::WriteDemandEndUseSummary(); @@ -7764,6 +7762,8 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) // We test for Heating and Total, since they should be the same std::vector testReportNames = {"AnnualBuildingUtilityPerformanceSummary", "DemandEndUseComponentsSummary"}; + std::string endUseName = "Exterior Lighting"; + std::string endUseSubCategoryName = "AnotherEndUseSubCat"; for (auto& reportName: testReportNames) { @@ -7771,13 +7771,89 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) " WHERE TableName = 'End Uses By Subcategory'" " AND ColumnName = 'Subcategory'" " AND ReportName = '" + reportName + "'" - " AND Value = 'AnotherEndUseSubCat'"); + " AND Value = '" + endUseSubCategoryName + "'"); auto result = queryResult(query, "TabularDataWithStrings"); ASSERT_EQ(1ul, result.size()) << "Query crashed for reportName=" << reportName; // Add informative message if failed - EXPECT_EQ("Exterior Lighting", result[0][0]) << "Failed for reportName=" << reportName; + EXPECT_EQ(endUseName, result[0][0]) << "Failed for reportName=" << reportName; + } + + // Here's a demonstration of how the new format of the table could help in querying for a specific end use only, which was impossible before + // Here I'm returning ALL entries that belong to a specific end use (one row for each resource (fuel) type) + + { + auto result = queryResult( + "SELECT * FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND RowName = '" + endUseName + "'" + " AND (TabularDataIndex - (SELECT TabularDataIndex FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Subcategory'" + " AND RowName = '" + endUseName + "'" + " AND Value = '" + endUseSubCategoryName + "'))" + " % (SELECT COUNT(Value) FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Subcategory') = 0", + "TabularDataWithStrings"); + ASSERT_EQ(7u, result.size()); } + + { + // Since the above is a bit dense, let's break it down + // We get the First TabularDataIndex for our end use subcategory + // We also get the number of subcategories + // We seek (TabularDataIndex - startIndex) % nCats == 0 + std::string startIndexQuery( + "SELECT TabularDataIndex FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Subcategory'" + " AND RowName = '" + endUseName + "'" + " AND Value = '" + endUseSubCategoryName + "'" + ); + + Real64 return_val = execAndReturnFirstDouble(startIndexQuery); + int startIndex = static_cast(return_val); + + std::string nEndUseSubCatsQuery( + "SELECT COUNT(Value) FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Subcategory'" + ); + return_val = execAndReturnFirstDouble(nEndUseSubCatsQuery); + int nEndUseSubCats = static_cast(return_val); + + std::string query( + "SELECT * FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND RowName = '" + endUseName + "'" // Purely optional here... + " AND (TabularDataIndex - " + std::to_string(startIndex) + ") % " + std::to_string(nEndUseSubCats) + " = 0" + ); + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(7u, result.size()) << "Failed for query: " << query; + + // Now specifically get the electricity one, and make sure it's the right number that's returned + query = ( + "SELECT Value FROM TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND RowName = '" + endUseName + "'" + " AND ColumnName = 'Electricity'" + " AND (TabularDataIndex - " + std::to_string(startIndex) + ") % " + std::to_string(nEndUseSubCats) + " = 0" + ); + return_val = execAndReturnFirstDouble(query); + EXPECT_NEAR(extLitUse * 3 / 3.6e6, return_val, 0.01) << "Failed for query: " << query; + + + } + } From 1e0259d52f24c3cf888aa9f29a99f757174d635d Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 28 Oct 2019 16:31:14 +0100 Subject: [PATCH 07/86] Add to OutputChanges markdown --- .../OutputChanges9-2-0-to-9-3-0.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md index d42f80db545..d47dd315f59 100644 --- a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md +++ b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md @@ -12,3 +12,29 @@ This will eventually become a more structured file, but currently it isn't clear A new column "Peak Load Type to Size On" has been added to the `Coil Sizing Details:Coils` report See [7397](https://github.com/NREL/EnergyPlus/pull/7397) + +### End Use By Subcategory in SQL + +In the SQL Output file, for `ReportName = "AnnualBuildingUtilityPerformanceSummary"` and `ReportName = "DemandEndUseComponentsSummary"`, +the tables `TableName = "End Uses by Subcategory"` no longer have blank `RowName` corresponding to the End Use (eg: Heating, Interior Lighting, etc) for additional End Use Subcategories. +This will allow querying a specific End Use Subcategory in the SQL file. + +Example SQL Query to return all rows (one row per fuel type) for End Use "Interior Lighting", Sucategory "GeneralLights": +``` +SELECT * FROM TabularDataWithStrings + WHERE TableName = "End Uses By Subcategory" + AND ReportName = "AnnualBuildingUtilityPerformanceSummary" + AND RowName = "Interior Lighting" + AND (TabularDataIndex - (SELECT TabularDataIndex FROM TabularDataWithStrings + WHERE TableName = "End Uses By Subcategory" + AND ReportName = "AnnualBuildingUtilityPerformanceSummary" + AND ColumnName = "Subcategory" + AND RowName = "Interior Lighting" + AND Value = "GeneralLights")) + % (SELECT COUNT(Value) FROM TabularDataWithStrings + WHERE TableName = "End Uses By Subcategory" + AND ReportName = "AnnualBuildingUtilityPerformanceSummary" + AND ColumnName = "Subcategory") +``` + +See [PR#7584](https://github.com/NREL/EnergyPlus/pull/7584). From f2c7275361ad8efac19ed10ccc682064202ee258 Mon Sep 17 00:00:00 2001 From: nigusse Date: Tue, 19 Nov 2019 13:55:11 -0500 Subject: [PATCH 08/86] corrected CapFTemp curve index in multi-speed DX coils --- src/EnergyPlus/DXCoils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 4a7dc663e2a..0e4622706c4 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -14876,7 +14876,7 @@ namespace DXCoils { (SELECT_CASE_var == CoilDX_HeatingEmpirical) || (SELECT_CASE_var == CoilDX_CoolingTwoStageWHumControl)) { CapFTCurveIndex = DXCoil(CoilIndex).CCapFTemp(1); } else if ((SELECT_CASE_var == CoilDX_MultiSpeedCooling) || (SELECT_CASE_var == CoilDX_MultiSpeedHeating)) { - CapFTCurveIndex = DXCoil(CoilIndex).MSCCapFTemp(1); + CapFTCurveIndex = DXCoil(CoilIndex).MSCCapFTemp(DXCoil(CoilIndex).NumOfSpeeds); } else if (SELECT_CASE_var == CoilVRF_Heating) { CapFTCurveIndex = DXCoil(CoilIndex).CCapFTemp(1); } else { From 58167532a0e8171d8259d0cf64fcbb3f1473ce72 Mon Sep 17 00:00:00 2001 From: nigusse Date: Wed, 20 Nov 2019 14:06:46 -0500 Subject: [PATCH 09/86] Added unit test --- tst/EnergyPlus/unit/DXCoils.unit.cc | 137 ++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 0b4af144a59..bd4bf300a31 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -3833,4 +3833,141 @@ TEST_F(EnergyPlusFixture, TestMultiSpeedCoolingCoilPartialAutoSizeOutput) EXPECT_EQ(1.75, DXCoil(1).MSRatedAirVolFlowRate(2)); EXPECT_EQ(0.875, DXCoil(1).MSRatedAirVolFlowRate(1)); } + +TEST_F(EnergyPlusFixture, DXCoils_GetDXCoilCapFTCurveIndexTest) +{ + using CurveManager::BiQuadratic; + using CurveManager::NumCurves; + using CurveManager::Quadratic; + int DXCoilNum; + int CurveNum; + + NumDXCoils = 2; + DXCoil.allocate(NumDXCoils); + DXCoil(1).DXCoilType_Num = CoilDX_MultiSpeedCooling; + DXCoil(1).DXCoilType = "Coil:Cooling:DX:MultiSpeed"; + DXCoil(2).DXCoilType_Num = CoilDX_MultiSpeedHeating; + DXCoil(2).DXCoilType = "Coil:Heating:DX:MultiSpeed"; + + + for (DXCoilNum = 1; DXCoilNum <= 2; ++DXCoilNum) { + DXCoil(DXCoilNum).NumOfSpeeds = 2; + DXCoil(DXCoilNum).MSRatedTotCap.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + DXCoil(DXCoilNum).MSCCapFTemp.allocate(DXCoil(DXCoilNum).NumOfSpeeds); + } + + NumCurves = 4; + PerfCurve.allocate(NumCurves); + + CurveNum = 1; + PerfCurve(CurveNum).Name = "HP_Cool-Cap-fT-SP1"; + PerfCurve(CurveNum).CurveType = BiQuadratic; + PerfCurve(CurveNum).ObjectType = "Curve:Biquadratic"; + PerfCurve(CurveNum).InterpolationType = EvaluateCurveToLimits; + PerfCurve(CurveNum).Coeff1 = 1.658788451; + PerfCurve(CurveNum).Coeff2 = -0.0834530076; + PerfCurve(CurveNum).Coeff3 = 0.00342409032; + PerfCurve(CurveNum).Coeff4 = 0.0024332436; + PerfCurve(CurveNum).Coeff5 = -4.5036e-005; + PerfCurve(CurveNum).Coeff6 = -0.00053367984; + PerfCurve(CurveNum).Var1Min = 13.88; + PerfCurve(CurveNum).Var1Max = 23.88; + PerfCurve(CurveNum).Var2Min = 18.33; + PerfCurve(CurveNum).Var2Max = 51.66; + + CurveNum = 2; + PerfCurve(CurveNum).Name = "HP_Cool-Cap-fT-SP2"; + PerfCurve(CurveNum).CurveType = BiQuadratic; + PerfCurve(CurveNum).ObjectType = "Curve:Biquadratic"; + PerfCurve(CurveNum).InterpolationType = EvaluateCurveToLimits; + PerfCurve(CurveNum).Coeff1 = 1.472738138; + PerfCurve(CurveNum).Coeff2 = -0.0672218352; + PerfCurve(CurveNum).Coeff3 = 0.0029199042; + PerfCurve(CurveNum).Coeff4 = 5.16005999999982e-005; + PerfCurve(CurveNum).Coeff5 = -2.97756e-005; + PerfCurve(CurveNum).Coeff6 = -0.00035908596; + PerfCurve(CurveNum).Var1Min = 13.88; + PerfCurve(CurveNum).Var1Max = 23.88; + PerfCurve(CurveNum).Var2Min = 18.33; + PerfCurve(CurveNum).Var2Max = 51.66; + + CurveNum = 3; + PerfCurve(CurveNum).Name = "HP_Heat-Cap-fT-SP1"; + PerfCurve(CurveNum).CurveType = BiQuadratic; + PerfCurve(CurveNum).ObjectType = "Curve:Biquadratic"; + PerfCurve(CurveNum).InterpolationType = EvaluateCurveToLimits; + PerfCurve(CurveNum).Coeff1 = 0.84077409; + PerfCurve(CurveNum).Coeff2 = -0.0014336586; + PerfCurve(CurveNum).Coeff3 = -0.000150336; + PerfCurve(CurveNum).Coeff4 = 0.029628603; + PerfCurve(CurveNum).Coeff5 = 0.000161676; + PerfCurve(CurveNum).Coeff6 = -2.349e-005; + PerfCurve(CurveNum).Var1Min = -100.0; + PerfCurve(CurveNum).Var1Max = 100.0; + PerfCurve(CurveNum).Var2Min = -100.0; + PerfCurve(CurveNum).Var2Max = 100.0; + + CurveNum = 4; + PerfCurve(CurveNum).Name = "HP_Heat-Cap-fT-SP2"; + PerfCurve(CurveNum).CurveType = BiQuadratic; + PerfCurve(CurveNum).ObjectType = "Curve:Biquadratic"; + PerfCurve(CurveNum).InterpolationType = EvaluateCurveToLimits; + PerfCurve(CurveNum).Coeff1 = 0.831506971; + PerfCurve(CurveNum).Coeff2 = 0.0018392166; + PerfCurve(CurveNum).Coeff3 = -0.000187596; + PerfCurve(CurveNum).Coeff4 = 0.0266002056; + PerfCurve(CurveNum).Coeff5 = 0.000191484; + PerfCurve(CurveNum).Coeff6 = -6.5772e-005; + PerfCurve(CurveNum).Var1Min = -100.0; + PerfCurve(CurveNum).Var1Max = 100.0; + PerfCurve(CurveNum).Var2Min = -100.0; + PerfCurve(CurveNum).Var2Max = 100.0; + + DXCoil(1).MSCCapFTemp(1) = 1; + DXCoil(1).MSCCapFTemp(2) = 2; + + DXCoilNum = 2; + DXCoil(DXCoilNum).MSCCapFTemp(1) = 3; + DXCoil(DXCoilNum).MSCCapFTemp(2) = 4; + + bool ErrorsFound; + int DataTotCapCurveIndex = 0; + + DXCoils::GetCoilsInputFlag = false; + + // dx cooling coil + int CoilIndex = 1; + EXPECT_EQ(DXCoil(CoilIndex).DXCoilType, "Coil:Cooling:DX:MultiSpeed"); + DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex( CoilIndex, ErrorsFound ); + EXPECT_EQ(2, DataTotCapCurveIndex); + // evaluate dx cooling coil curves to show impacts of incorrect curve index + Real64 TotCapTempModFac_lowestSpeed = CurveValue(1, 19.4, 30.0); + Real64 TotCapTempModFac_designSpeed = CurveValue(DataTotCapCurveIndex, 19.4, 30.0); + EXPECT_DOUBLE_EQ(1.0503539775151995, TotCapTempModFac_lowestSpeed); + EXPECT_DOUBLE_EQ(1.0333316291120003, TotCapTempModFac_designSpeed); + // apply dx cooling coil capacity curve correction + Real64 PeakCoilCoolingLoad = 10000.0; + Real64 NominalCoolingDesignCapacity_lowestSpeed = PeakCoilCoolingLoad / TotCapTempModFac_lowestSpeed; + Real64 NominalCoolingDesignCapacity_designSpeed = PeakCoilCoolingLoad / TotCapTempModFac_designSpeed; + EXPECT_DOUBLE_EQ(9520.5999254239905, NominalCoolingDesignCapacity_lowestSpeed); + EXPECT_DOUBLE_EQ(9677.4353153145621, NominalCoolingDesignCapacity_designSpeed); + + // dx heating coil + CoilIndex = 2; + EXPECT_EQ(DXCoil(CoilIndex).DXCoilType, "Coil:Heating:DX:MultiSpeed"); + DataTotCapCurveIndex = DXCoils::GetDXCoilCapFTCurveIndex( CoilIndex, ErrorsFound ); + EXPECT_EQ(4, DataTotCapCurveIndex); + // evaluate dx heating coil curves to show impacts of incorrect curve index + TotCapTempModFac_lowestSpeed = CurveValue(3, 5.0, 10.0); + TotCapTempModFac_designSpeed = CurveValue(DataTotCapCurveIndex, 5.0, 10.0); + EXPECT_DOUBLE_EQ(1.1411265269999999, TotCapTempModFac_lowestSpeed); + EXPECT_DOUBLE_EQ(1.1178750099999999, TotCapTempModFac_designSpeed); + // apply dx heating coil capacity curve correction + Real64 PeakCoilHeatingLoad = 10000.0; + Real64 NominalHeatingDesignCapacity_lowestSpeed = PeakCoilHeatingLoad / TotCapTempModFac_lowestSpeed; + Real64 NominalHeatingDesignCapacity_designSpeed = PeakCoilHeatingLoad / TotCapTempModFac_designSpeed; + EXPECT_DOUBLE_EQ(8763.2701224550547, NominalHeatingDesignCapacity_lowestSpeed); + EXPECT_DOUBLE_EQ(8945.5439208717980, NominalHeatingDesignCapacity_designSpeed); +} + } // namespace EnergyPlus From dbd36115c3abf030dd1df562b135dd72a3a2f085 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 6 Dec 2019 14:45:25 -0700 Subject: [PATCH 10/86] cleanup comments --- src/EnergyPlus/UserDefinedComponents.cc | 216 +----------------------- src/EnergyPlus/UserDefinedComponents.hh | 13 -- 2 files changed, 1 insertion(+), 228 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 1e66b6e0855..d11cda21606 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -92,16 +92,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS MODULE: // Collect component models for custom program with Erl. - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // OTHER NOTES: - // na - - // Using/Aliasing using namespace DataPrecisionGlobals; using DataGlobals::BeginEnvrnFlag; using DataGlobals::emsCallFromUserDefinedComponentModel; @@ -111,14 +101,6 @@ namespace UserDefinedComponents { using namespace DataRuntimeLanguage; using DataWater::WaterStorage; - // Data - // MODULE PARAMETER DEFINITIONS: - // na - - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: - int NumUserPlantComps(0); int NumUserCoils(0); int NumUserZoneAir(0); @@ -130,16 +112,11 @@ namespace UserDefinedComponents { Array1D_bool CheckUserAirTerminal; bool GetInput(true); - // SUBROUTINE SPECIFICATIONS FOR MODULE : - - // Object Data Array1D UserPlantComp; Array1D UserCoil; Array1D UserZoneAirHVAC; Array1D UserAirTerminal; - // Functions - void SimUserDefinedPlantComponent(int const LoopNum, // plant loop sim call originated from int const LoopSideNum, // plant loop side sim call originated from std::string const &EP_UNUSED(EquipType), // type of equipment, 'PlantComponent:UserDefined' @@ -164,20 +141,16 @@ namespace UserDefinedComponents { // METHODOLOGY EMPLOYED: // This routine to be called from PlantLoopEquipment. - // Using/Aliasing using EMSManager::ManageEMS; using General::TrimSigDigits; using PlantUtilities::InitComponentNodes; using PlantUtilities::RegisterPlantCompDesignFlow; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int CompNum; int ThisLoop; int Loop; - // Autodesk:Uninit Initialize variables used uninitialized - ThisLoop = 0; // Autodesk:Uninit Force default initialization + ThisLoop = 0; if (GetInput) { GetUserDefinedComponents(); @@ -279,10 +252,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // Using/Aliasing using EMSManager::ManageEMS; using General::TrimSigDigits; using PlantUtilities::InitComponentNodes; @@ -290,7 +259,6 @@ namespace UserDefinedComponents { using PlantUtilities::SetComponentFlowRate; using Psychrometrics::PsyHFnTdbW; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 EnthInlet; Real64 EnthOutlet; int CompNum; @@ -382,10 +350,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // Using/Aliasing using EMSManager::ManageEMS; using General::TrimSigDigits; using PlantUtilities::InitComponentNodes; @@ -393,7 +357,6 @@ namespace UserDefinedComponents { using PlantUtilities::SetComponentFlowRate; using Psychrometrics::PsyHFnTdbW; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CompNum; int Loop; Real64 AirMassFlow; @@ -488,14 +451,12 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // simulation call for generic air terminal - // Using/Aliasing using EMSManager::ManageEMS; using General::TrimSigDigits; using PlantUtilities::InitComponentNodes; using PlantUtilities::RegisterPlantCompDesignFlow; using PlantUtilities::SetComponentFlowRate; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CompNum; int Loop; @@ -569,10 +530,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // Using/Aliasing using BranchNodeConnections::TestCompSet; using DataHeatBalance::IntGainTypeOf_AirTerminalUserDefined; using DataHeatBalance::IntGainTypeOf_CoilUserDefined; @@ -586,10 +543,8 @@ namespace UserDefinedComponents { using WaterManager::SetupTankDemandComponent; using WaterManager::SetupTankSupplyComponent; - // SUBROUTINE PARAMETER DEFINITIONS: static ObjexxFCL::gio::Fmt fmtLD("*"); - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool ErrorsFound(false); int NumAlphas; // Number of elements in the alpha array int NumNums; // Number of elements in the numeric array @@ -612,8 +567,6 @@ namespace UserDefinedComponents { int aArgCount; int StackMngrNum; static bool lDummy; // Fix Changed to static: Passed to SetupEMSActuator as source of persistent Reference - // INTEGER :: alphaNum - // INTEGER :: Loop int MgrCountTest; int CtrlZone; // controlled zone do loop index int SupAirIn; // controlled zone supply air inlet index @@ -2110,16 +2063,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataEnvironment::OutBaroPress; using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; @@ -2127,26 +2070,13 @@ namespace UserDefinedComponents { using Psychrometrics::PsyCpAirFnWTdb; using Psychrometrics::PsyRhoAirFnPbTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("InitPlantUserComponent"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyEnvrnFlag; // environment flag static Array1D_bool MyFlag; int ConnectionNum; bool errFlag; - // REAL(r64) :: rho - // REAL(r64) :: Cp if (MyOneTimeFlag) { MyFlag.allocate(NumUserPlantComps); @@ -2227,35 +2157,14 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataEnvironment::OutBaroPress; using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; using Psychrometrics::PsyCpAirFnWTdb; using Psychrometrics::PsyRhoAirFnPbTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("InitCoilUserDefined"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyFlag; bool errFlag; @@ -2336,13 +2245,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // initialize data for user-defined zone HVAC forced air component model - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataEnvironment::OutBaroPress; using DataZoneEnergyDemands::ZoneSysEnergyDemand; using DataZoneEnergyDemands::ZoneSysMoistureDemand; @@ -2351,19 +2253,8 @@ namespace UserDefinedComponents { using Psychrometrics::PsyCpAirFnWTdb; using Psychrometrics::PsyRhoAirFnPbTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("InitZoneAirUserDefined"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyFlag; bool errFlag; @@ -2459,16 +2350,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataEnvironment::OutBaroPress; using DataZoneEnergyDemands::ZoneSysEnergyDemand; using DataZoneEnergyDemands::ZoneSysMoistureDemand; @@ -2477,19 +2358,8 @@ namespace UserDefinedComponents { using Psychrometrics::PsyCpAirFnWTdb; using Psychrometrics::PsyRhoAirFnPbTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("InitAirTerminalUserDefined"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyFlag; bool errFlag; @@ -2591,28 +2461,10 @@ namespace UserDefinedComponents { // METHODOLOGY EMPLOYED: // copy actuated values to structures elsewhere in program. - // REFERENCES: - // na - - // Using/Aliasing using PlantUtilities::SafeCopyPlantNode; using PlantUtilities::SetComponentFlowRate; using Psychrometrics::PsyHFnTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - SafeCopyPlantNode(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum, UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum); // unload Actuators to node data structure @@ -2675,30 +2527,10 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using PlantUtilities::SafeCopyPlantNode; using PlantUtilities::SetComponentFlowRate; using Psychrometrics::PsyHFnTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int Loop; for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { @@ -2753,30 +2585,10 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using PlantUtilities::SafeCopyPlantNode; using PlantUtilities::SetComponentFlowRate; using Psychrometrics::PsyHFnTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int Loop; Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.InletMassFlowRate; @@ -2831,34 +2643,10 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using PlantUtilities::SafeCopyPlantNode; using PlantUtilities::SetComponentFlowRate; using Psychrometrics::PsyHFnTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // na int Loop; Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.InletMassFlowRate; @@ -2947,7 +2735,6 @@ namespace UserDefinedComponents { // This subroutine gets a given user defined Cooling Coil's air inlet node -- issues error message if that // coil is not a legal user defined Cooling Coil and sets air node to 0, otherwise, returns inlet air node number. - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CoilIndex; // Obtains and allocates TESCoil related parameters from input file @@ -2985,7 +2772,6 @@ namespace UserDefinedComponents { // This subroutine gets a given user defined Cooling Coil's air outlet node -- issues error message if that // coil is not a legal user defined Cooling Coil and sets air node to 0, otherwise, returns outlet air node number. - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CoilIndex; // Obtains and allocates TESCoil related parameters from input file diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index ebe222c03da..f17b4be01bc 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -60,18 +60,9 @@ namespace EnergyPlus { namespace UserDefinedComponents { - // Using/Aliasing using DataPlant::HowMet_Unknown; using DataPlant::LoopFlowStatus_Unknown; - // Data - // MODULE PARAMETER DEFINITIONS: - // na - - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: - extern int NumUserPlantComps; extern int NumUserCoils; extern int NumUserZoneAir; @@ -83,10 +74,6 @@ namespace UserDefinedComponents { extern Array1D_bool CheckUserAirTerminal; extern bool GetInput; - // SUBROUTINE SPECIFICATIONS FOR MODULE : - - // Types - struct PlantConnectionStruct { // Members From 53a88bb42759700b097a37f8f0315aed17668b76 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 6 Dec 2019 14:48:54 -0700 Subject: [PATCH 11/86] cleanup warnings --- src/EnergyPlus/UserDefinedComponents.cc | 6 +----- src/EnergyPlus/UserDefinedComponents.hh | 28 ++++++++++++------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index d11cda21606..017fd6721eb 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -92,7 +91,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS MODULE: // Collect component models for custom program with Erl. - using namespace DataPrecisionGlobals; using DataGlobals::BeginEnvrnFlag; using DataGlobals::emsCallFromUserDefinedComponentModel; using DataGlobals::NumOfZones; @@ -150,8 +148,6 @@ namespace UserDefinedComponents { int ThisLoop; int Loop; - ThisLoop = 0; - if (GetInput) { GetUserDefinedComponents(); GetInput = false; @@ -318,7 +314,7 @@ namespace UserDefinedComponents { ReportCoilUserDefined(CompNum); - if (AirLoopNum != -1) { // IF the sysem is not an equipment of outdoor air unit + if (AirLoopNum != -1) { // IF the system is not an equipment of outdoor air unit // determine if heating or cooling on primary air stream if (Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp) { HeatingActive = true; diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index f17b4be01bc..c0a0a4213eb 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -272,50 +272,50 @@ namespace UserDefinedComponents { // Functions - void SimUserDefinedPlantComponent(int const LoopNum, // plant loop sim call originated from - int const LoopSideNum, // plant loop side sim call originated from + void SimUserDefinedPlantComponent(int LoopNum, // plant loop sim call originated from + int LoopSideNum, // plant loop side sim call originated from std::string const &EquipType, // type of equipment, 'PlantComponent:UserDefined' std::string const &EquipName, // user name for component int &CompIndex, bool &InitLoopEquip, - Real64 const MyLoad, + Real64 MyLoad, Real64 &MaxCap, Real64 &MinCap, Real64 &OptCap); void SimCoilUserDefined(std::string const &EquipName, // user name for component int &CompIndex, - int const AirLoopNum, + int AirLoopNum, bool &HeatingActive, bool &CoolingActive); void SimZoneAirUserDefined(std::string const &CompName, // name of the packaged terminal heat pump - int const ZoneNum, // number of zone being served + int ZoneNum, // number of zone being served Real64 &SensibleOutputProvided, // sensible capacity delivered to zone Real64 &LatentOutputProvided, // Latent add/removal (kg/s), dehumid = negative int &CompIndex // index to zone hvac unit ); void - SimAirTerminalUserDefined(std::string const &CompName, bool const FirstHVACIteration, int const ZoneNum, int const ZoneNodeNum, int &CompIndex); + SimAirTerminalUserDefined(std::string const &CompName, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum, int &CompIndex); void GetUserDefinedComponents(); - void InitPlantUserComponent(int const CompNum, int const LoopNum, Real64 const MyLoad); + void InitPlantUserComponent(int CompNum, int LoopNum, Real64 MyLoad); - void InitCoilUserDefined(int const CompNum); + void InitCoilUserDefined(int CompNum); - void InitZoneAirUserDefined(int const CompNum, int const ZoneNum); + void InitZoneAirUserDefined(int CompNum, int ZoneNum); - void InitAirTerminalUserDefined(int const CompNum, int const ZoneNum); + void InitAirTerminalUserDefined(int CompNum, int ZoneNum); - void ReportPlantUserComponent(int const CompNum, int const LoopNum); + void ReportPlantUserComponent(int CompNum, int LoopNum); - void ReportCoilUserDefined(int const CompNum); + void ReportCoilUserDefined(int CompNum); - void ReportZoneAirUserDefined(int const CompNum); + void ReportZoneAirUserDefined(int CompNum); - void ReportAirTerminalUserDefined(int const CompNum); + void ReportAirTerminalUserDefined(int CompNum); void GetUserDefinedCoilIndex(std::string const &CoilName, int &CoilIndex, bool &ErrorsFound, std::string const &CurrentModuleObject); From 449c5face6a965ff48809a7ea052f9853a39faf0 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 6 Dec 2019 15:38:20 -0700 Subject: [PATCH 12/86] partial cleanup usings --- src/EnergyPlus/UserDefinedComponents.cc | 317 ++++++++++-------------- src/EnergyPlus/UserDefinedComponents.hh | 12 +- 2 files changed, 128 insertions(+), 201 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 017fd6721eb..60d543ab058 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -91,10 +91,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS MODULE: // Collect component models for custom program with Erl. - using DataGlobals::BeginEnvrnFlag; - using DataGlobals::emsCallFromUserDefinedComponentModel; - using DataGlobals::NumOfZones; - using namespace DataPlant; using namespace DataLoopNode; using namespace DataRuntimeLanguage; using DataWater::WaterStorage; @@ -108,6 +104,7 @@ namespace UserDefinedComponents { Array1D_bool CheckUserCoilName; Array1D_bool CheckUserZoneAirName; Array1D_bool CheckUserAirTerminal; + bool GetInput(true); Array1D UserPlantComp; @@ -139,11 +136,6 @@ namespace UserDefinedComponents { // METHODOLOGY EMPLOYED: // This routine to be called from PlantLoopEquipment. - using EMSManager::ManageEMS; - using General::TrimSigDigits; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::RegisterPlantCompDesignFlow; - int CompNum; int ThisLoop; int Loop; @@ -163,19 +155,19 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > NumUserPlantComps) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + - ", Number of units =" + TrimSigDigits(NumUserPlantComps) + ", Entered Unit name = " + EquipName); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Number of units =" + General::TrimSigDigits(NumUserPlantComps) + ", Entered Unit name = " + EquipName); } if (CheckUserPlantCompName(CompNum)) { if (EquipName != UserPlantComp(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + ", Unit name=" + EquipName + + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + EquipName + ", stored unit name for that index=" + UserPlantComp(CompNum).Name); } CheckUserPlantCompName(CompNum) = false; } } bool anyEMSRan; - if (InitLoopEquip || BeginEnvrnFlag) { + if (InitLoopEquip || DataGlobals::BeginEnvrnFlag) { InitPlantUserComponent(CompNum, LoopNum, MyLoad); // find loop connection number from LoopNum and LoopSide ThisLoop = 0; @@ -186,14 +178,14 @@ namespace UserDefinedComponents { } if (ThisLoop > 0) { if (UserPlantComp(CompNum).Loop(ThisLoop).ErlInitProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).Loop(ThisLoop).ErlInitProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).Loop(ThisLoop).ErlInitProgramMngr); } // now interface sizing related values with rest of E+ MinCap = UserPlantComp(CompNum).Loop(ThisLoop).MinLoad; MaxCap = UserPlantComp(CompNum).Loop(ThisLoop).MaxLoad; OptCap = UserPlantComp(CompNum).Loop(ThisLoop).OptLoad; - InitComponentNodes(UserPlantComp(CompNum).Loop(ThisLoop).MassFlowRateMin, + PlantUtilities::InitComponentNodes(UserPlantComp(CompNum).Loop(ThisLoop).MassFlowRateMin, UserPlantComp(CompNum).Loop(ThisLoop).MassFlowRateMax, UserPlantComp(CompNum).Loop(ThisLoop).InletNodeNum, UserPlantComp(CompNum).Loop(ThisLoop).OutletNodeNum, @@ -202,13 +194,13 @@ namespace UserDefinedComponents { UserPlantComp(CompNum).Loop(ThisLoop).BranchNum, UserPlantComp(CompNum).Loop(ThisLoop).CompNum); - RegisterPlantCompDesignFlow(UserPlantComp(CompNum).Loop(ThisLoop).InletNodeNum, + PlantUtilities::RegisterPlantCompDesignFlow(UserPlantComp(CompNum).Loop(ThisLoop).InletNodeNum, UserPlantComp(CompNum).Loop(ThisLoop).DesignVolumeFlowRate); } else { // throw warning - ShowFatalError("SimUserDefinedPlantComponent: did not find where called from loop number called from =" + TrimSigDigits(LoopNum) + - " , loop side called from =" + TrimSigDigits(LoopSideNum)); + ShowFatalError("SimUserDefinedPlantComponent: did not find where called from loop number called from =" + General::TrimSigDigits(LoopNum) + + " , loop side called from =" + General::TrimSigDigits(LoopSideNum)); } return; } @@ -224,12 +216,12 @@ namespace UserDefinedComponents { if (ThisLoop > 0) { if (UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr); } } if (UserPlantComp(CompNum).ErlSimProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).ErlSimProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).ErlSimProgramMngr); } ReportPlantUserComponent(CompNum, ThisLoop); @@ -248,13 +240,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using EMSManager::ManageEMS; - using General::TrimSigDigits; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::RegisterPlantCompDesignFlow; - using PlantUtilities::SetComponentFlowRate; - using Psychrometrics::PsyHFnTdbW; - Real64 EnthInlet; Real64 EnthOutlet; int CompNum; @@ -274,26 +259,26 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > NumUserCoils) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + - ", Number of units =" + TrimSigDigits(NumUserCoils) + ", Entered Unit name = " + EquipName); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Number of units =" + General::TrimSigDigits(NumUserCoils) + ", Entered Unit name = " + EquipName); } if (CheckUserCoilName(CompNum)) { if (EquipName != UserCoil(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + ", Unit name=" + EquipName + + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + EquipName + ", stored unit name for that index=" + UserCoil(CompNum).Name); } CheckUserCoilName(CompNum) = false; } } bool anyEMSRan; - if (BeginEnvrnFlag) { + if (DataGlobals::BeginEnvrnFlag) { if (UserCoil(CompNum).ErlInitProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserCoil(CompNum).ErlInitProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserCoil(CompNum).ErlInitProgramMngr); } if (UserCoil(CompNum).PlantIsConnected) { - InitComponentNodes(UserCoil(CompNum).Loop.MassFlowRateMin, + PlantUtilities::InitComponentNodes(UserCoil(CompNum).Loop.MassFlowRateMin, UserCoil(CompNum).Loop.MassFlowRateMax, UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.OutletNodeNum, @@ -302,14 +287,14 @@ namespace UserDefinedComponents { UserCoil(CompNum).Loop.BranchNum, UserCoil(CompNum).Loop.CompNum); - RegisterPlantCompDesignFlow(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.DesignVolumeFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.DesignVolumeFlowRate); } } InitCoilUserDefined(CompNum); if (UserCoil(CompNum).ErlSimProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserCoil(CompNum).ErlSimProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserCoil(CompNum).ErlSimProgramMngr); } ReportCoilUserDefined(CompNum); @@ -322,8 +307,8 @@ namespace UserDefinedComponents { HeatingActive = false; } - EnthInlet = PsyHFnTdbW(Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); - EnthOutlet = PsyHFnTdbW(Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); + EnthInlet = Psychrometrics::PsyHFnTdbW(Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); + EnthOutlet = Psychrometrics::PsyHFnTdbW(Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); if (EnthInlet > EnthOutlet) { CoolingActive = true; } else { @@ -346,13 +331,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using EMSManager::ManageEMS; - using General::TrimSigDigits; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::RegisterPlantCompDesignFlow; - using PlantUtilities::SetComponentFlowRate; - using Psychrometrics::PsyHFnTdbW; - int CompNum; int Loop; Real64 AirMassFlow; @@ -375,28 +353,28 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > NumUserZoneAir) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + - ", Number of units =" + TrimSigDigits(NumUserZoneAir) + ", Entered Unit name = " + CompName); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Number of units =" + General::TrimSigDigits(NumUserZoneAir) + ", Entered Unit name = " + CompName); } if (CheckUserZoneAirName(CompNum)) { if (CompName != UserZoneAirHVAC(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + ", Unit name=" + CompName + + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + CompName + ", stored unit name for that index=" + UserZoneAirHVAC(CompNum).Name); } CheckUserZoneAirName(CompNum) = false; } } bool anyEMSRan; - if (BeginEnvrnFlag) { + if (DataGlobals::BeginEnvrnFlag) { InitZoneAirUserDefined(CompNum, ZoneNum); if (UserZoneAirHVAC(CompNum).ErlInitProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlInitProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlInitProgramMngr); } if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { - InitComponentNodes(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMin, + PlantUtilities::InitComponentNodes(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMin, UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMax, UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum, @@ -405,7 +383,7 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, UserZoneAirHVAC(CompNum).Loop(Loop).CompNum); - RegisterPlantCompDesignFlow(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, + PlantUtilities::RegisterPlantCompDesignFlow(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).DesignVolumeFlowRate); } } @@ -415,7 +393,7 @@ namespace UserDefinedComponents { InitZoneAirUserDefined(CompNum, ZoneNum); if (UserZoneAirHVAC(CompNum).ErlSimProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlSimProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlSimProgramMngr); } ReportZoneAirUserDefined(CompNum); @@ -425,8 +403,8 @@ namespace UserDefinedComponents { min(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate, Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate); // calculate sensible load met using delta enthalpy at a constant (minimum) humidity ratio) MinHumRat = min(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); - SensibleOutputProvided = AirMassFlow * (PsyHFnTdbW(Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - - PsyHFnTdbW(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); + SensibleOutputProvided = AirMassFlow * (Psychrometrics::PsyHFnTdbW(Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - + Psychrometrics::PsyHFnTdbW(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); // CR9155 Remove specific humidity calculations SpecHumOut = Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat; @@ -447,12 +425,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // simulation call for generic air terminal - using EMSManager::ManageEMS; - using General::TrimSigDigits; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::RegisterPlantCompDesignFlow; - using PlantUtilities::SetComponentFlowRate; - int CompNum; int Loop; @@ -471,28 +443,28 @@ namespace UserDefinedComponents { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > NumUserAirTerminals) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + - ", Number of units =" + TrimSigDigits(NumUserAirTerminals) + ", Entered Unit name = " + CompName); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Number of units =" + General::TrimSigDigits(NumUserAirTerminals) + ", Entered Unit name = " + CompName); } if (CheckUserAirTerminal(CompNum)) { if (CompName != UserAirTerminal(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + ", Unit name=" + CompName + + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + CompName + ", stored unit name for that index=" + UserAirTerminal(CompNum).Name); } CheckUserAirTerminal(CompNum) = false; } } bool anyEMSRan; - if (BeginEnvrnFlag) { + if (DataGlobals::BeginEnvrnFlag) { InitAirTerminalUserDefined(CompNum, ZoneNum); if (UserAirTerminal(CompNum).ErlInitProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlInitProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlInitProgramMngr); } if (UserAirTerminal(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { - InitComponentNodes(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMin, + PlantUtilities::InitComponentNodes(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMin, UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMax, UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum, @@ -501,7 +473,7 @@ namespace UserDefinedComponents { UserAirTerminal(CompNum).Loop(Loop).BranchNum, UserAirTerminal(CompNum).Loop(Loop).CompNum); - RegisterPlantCompDesignFlow(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, + PlantUtilities::RegisterPlantCompDesignFlow(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).DesignVolumeFlowRate); } } @@ -511,7 +483,7 @@ namespace UserDefinedComponents { InitAirTerminalUserDefined(CompNum, ZoneNum); if (UserAirTerminal(CompNum).ErlSimProgramMngr > 0) { - ManageEMS(emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlSimProgramMngr); + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlSimProgramMngr); } ReportAirTerminalUserDefined(CompNum); @@ -527,13 +499,7 @@ namespace UserDefinedComponents { // RE-ENGINEERED na using BranchNodeConnections::TestCompSet; - using DataHeatBalance::IntGainTypeOf_AirTerminalUserDefined; - using DataHeatBalance::IntGainTypeOf_CoilUserDefined; - using DataHeatBalance::IntGainTypeOf_PlantComponentUserDefined; - using DataHeatBalance::IntGainTypeOf_ZoneHVACForcedAirUserDefined; - using DataHeatBalance::Zone; using DataZoneEquipment::ZoneEquipConfig; - using General::RoundSigDigits; using GlobalNames::VerifyUniqueCoilName; using NodeInputManager::GetOnlySingleNode; using WaterManager::SetupTankDemandComponent; @@ -621,7 +587,7 @@ namespace UserDefinedComponents { UserPlantComp(CompLoop).Loop.allocate(NumPlantConnections); UserPlantComp(CompLoop).NumPlantConnections = NumPlantConnections; for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { - LoopStr = RoundSigDigits(ConnectionLoop); + LoopStr = General::RoundSigDigits(ConnectionLoop); aArgCount = (ConnectionLoop - 1) * 6 + 3; UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, @@ -645,13 +611,13 @@ namespace UserDefinedComponents { { auto const SELECT_CASE_var(cAlphaArgs(aArgCount + 2)); if (SELECT_CASE_var == "DEMANDSLOAD") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_NoneDemand; + UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; } else if (SELECT_CASE_var == "MEETSLOADWITHPASSIVECAPACITY") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_PassiveCap; + UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_PassiveCap; } else if (SELECT_CASE_var == "MEETSLOADWITHNOMINALCAPACITY") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_ByNominalCap; + UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_ByNominalCap; } else if (SELECT_CASE_var == "MEETSLOADWITHNOMINALCAPACITYLOWOUTLIMIT") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_ByNominalCapLowOutLimit; + UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_ByNominalCapLowOutLimit; // actuator for low out limit SetupEMSActuator("Plant Connection " + LoopStr, UserPlantComp(CompLoop).Name, @@ -660,7 +626,7 @@ namespace UserDefinedComponents { lDummy, UserPlantComp(CompLoop).Loop(ConnectionLoop).LowOutTempLimit); } else if (SELECT_CASE_var == "MEETSLOADWITHNOMINALCAPACITYHIOUTLIMIT") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_ByNominalCapHiOutLimit; + UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_ByNominalCapHiOutLimit; // actuator for hi out limit SetupEMSActuator("Plant Connection " + LoopStr, UserPlantComp(CompLoop).Name, @@ -674,11 +640,11 @@ namespace UserDefinedComponents { { auto const SELECT_CASE_var(cAlphaArgs(aArgCount + 3)); if (SELECT_CASE_var == "NEEDSFLOWIFLOOPON") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).FlowPriority = LoopFlowStatus_NeedyIfLoopOn; + UserPlantComp(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyIfLoopOn; } else if (SELECT_CASE_var == "NEEDSFLOWANDTURNSLOOPON") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).FlowPriority = LoopFlowStatus_NeedyAndTurnsLoopOn; + UserPlantComp(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; } else if (SELECT_CASE_var == "RECEIVESWHATEVERFLOWAVAILABLE") { - UserPlantComp(CompLoop).Loop(ConnectionLoop).FlowPriority = LoopFlowStatus_TakesWhatGets; + UserPlantComp(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_TakesWhatGets; } } @@ -717,7 +683,7 @@ namespace UserDefinedComponents { UserPlantComp(CompLoop).Name, "[kg/s]", UserPlantComp(CompLoop).Loop(ConnectionLoop).InletMassFlowRate); - if (UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed != HowMet_NoneDemand) { + if (UserPlantComp(CompLoop).Loop(ConnectionLoop).HowLoadServed != DataPlant::HowMet_NoneDemand) { SetupEMSInternalVariable("Load Request for Plant Connection " + LoopStr, UserPlantComp(CompLoop).Name, "[W]", @@ -871,7 +837,7 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(31)) { - UserPlantComp(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(31), Zone); + UserPlantComp(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(31), DataHeatBalance::Zone); if (UserPlantComp(CompLoop).Zone.ZoneNum == 0) { ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(31)); ErrorsFound = true; @@ -880,7 +846,7 @@ namespace UserDefinedComponents { SetupZoneInternalGain(UserPlantComp(CompLoop).Zone.ZoneNum, cCurrentModuleObject, cAlphaArgs(1), - IntGainTypeOf_PlantComponentUserDefined, + DataHeatBalance::IntGainTypeOf_PlantComponentUserDefined, UserPlantComp(CompLoop).Zone.ConvectionGainRate, UserPlantComp(CompLoop).Zone.ReturnAirConvectionGainRate, UserPlantComp(CompLoop).Zone.ThermalRadiationGainRate, @@ -1018,7 +984,7 @@ namespace UserDefinedComponents { 1, ObjectIsNotParent); - LoopStr = RoundSigDigits(ConnectionLoop); + LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Air Connection " + LoopStr, UserCoil(CompLoop).Name, @@ -1107,9 +1073,9 @@ namespace UserDefinedComponents { TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), cAlphaArgs(10), "Plant Nodes"); // this model is only for plant connections that are "Demand" - UserCoil(CompLoop).Loop.HowLoadServed = HowMet_NoneDemand; + UserCoil(CompLoop).Loop.HowLoadServed = DataPlant::HowMet_NoneDemand; // this model is only for plant connections that are needy and turn loop on - UserCoil(CompLoop).Loop.FlowPriority = LoopFlowStatus_NeedyAndTurnsLoopOn; + UserCoil(CompLoop).Loop.FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables // model input related internal variables @@ -1189,7 +1155,7 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(13)) { - UserCoil(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(13), Zone); + UserCoil(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(13), DataHeatBalance::Zone); if (UserCoil(CompLoop).Zone.ZoneNum == 0) { ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(13)); ErrorsFound = true; @@ -1198,7 +1164,7 @@ namespace UserDefinedComponents { SetupZoneInternalGain(UserCoil(CompLoop).Zone.ZoneNum, cCurrentModuleObject, cAlphaArgs(1), - IntGainTypeOf_CoilUserDefined, + DataHeatBalance::IntGainTypeOf_CoilUserDefined, UserCoil(CompLoop).Zone.ConvectionGainRate, UserCoil(CompLoop).Zone.ReturnAirConvectionGainRate, UserCoil(CompLoop).Zone.ThermalRadiationGainRate, @@ -1473,8 +1439,8 @@ namespace UserDefinedComponents { (ConnectionLoop + 2), ObjectIsNotParent); TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_NoneDemand; - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).FlowPriority = LoopFlowStatus_NeedyAndTurnsLoopOn; + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables ObjexxFCL::gio::write(LoopStr, fmtLD) << ConnectionLoop; strip(LoopStr); @@ -1565,7 +1531,7 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(16)) { - UserZoneAirHVAC(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(16), Zone); + UserZoneAirHVAC(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(16), DataHeatBalance::Zone); if (UserZoneAirHVAC(CompLoop).Zone.ZoneNum == 0) { ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(16)); ErrorsFound = true; @@ -1574,7 +1540,7 @@ namespace UserDefinedComponents { SetupZoneInternalGain(UserZoneAirHVAC(CompLoop).Zone.ZoneNum, cCurrentModuleObject, cAlphaArgs(1), - IntGainTypeOf_ZoneHVACForcedAirUserDefined, + DataHeatBalance::IntGainTypeOf_ZoneHVACForcedAirUserDefined, UserZoneAirHVAC(CompLoop).Zone.ConvectionGainRate, UserZoneAirHVAC(CompLoop).Zone.ReturnAirConvectionGainRate, UserZoneAirHVAC(CompLoop).Zone.ThermalRadiationGainRate, @@ -1775,7 +1741,7 @@ namespace UserDefinedComponents { } // Fill the Zone Equipment data with the inlet node number of this unit. - for (CtrlZone = 1; CtrlZone <= NumOfZones; ++CtrlZone) { + for (CtrlZone = 1; CtrlZone <= DataGlobals::NumOfZones; ++CtrlZone) { if (!ZoneEquipConfig(CtrlZone).IsControlled) continue; for (SupAirIn = 1; SupAirIn <= ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { @@ -1890,10 +1856,10 @@ namespace UserDefinedComponents { ObjectIsNotParent, cAlphaFieldNames(aArgCount + 1)); TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); - UserAirTerminal(CompLoop).Loop(ConnectionLoop).HowLoadServed = HowMet_NoneDemand; - UserAirTerminal(CompLoop).Loop(ConnectionLoop).FlowPriority = LoopFlowStatus_NeedyAndTurnsLoopOn; + UserAirTerminal(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; + UserAirTerminal(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables - LoopStr = RoundSigDigits(ConnectionLoop); + LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Plant Connection " + LoopStr, UserAirTerminal(CompLoop).Name, @@ -1981,7 +1947,7 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(14)) { - UserAirTerminal(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(14), Zone); + UserAirTerminal(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(14), DataHeatBalance::Zone); if (UserAirTerminal(CompLoop).Zone.ZoneNum == 0) { ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(14)); ErrorsFound = true; @@ -1990,7 +1956,7 @@ namespace UserDefinedComponents { SetupZoneInternalGain(UserAirTerminal(CompLoop).Zone.ZoneNum, cCurrentModuleObject, cAlphaArgs(1), - IntGainTypeOf_AirTerminalUserDefined, + DataHeatBalance::IntGainTypeOf_AirTerminalUserDefined, UserAirTerminal(CompLoop).Zone.ConvectionGainRate, UserAirTerminal(CompLoop).Zone.ReturnAirConvectionGainRate, UserAirTerminal(CompLoop).Zone.ThermalRadiationGainRate, @@ -2060,11 +2026,6 @@ namespace UserDefinedComponents { // RE-ENGINEERED na using DataEnvironment::OutBaroPress; - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - using PlantUtilities::InitComponentNodes; - using Psychrometrics::PsyCpAirFnWTdb; - using Psychrometrics::PsyRhoAirFnPbTdbW; static std::string const RoutineName("InitPlantUserComponent"); @@ -2087,7 +2048,7 @@ namespace UserDefinedComponents { for (ConnectionNum = 1; ConnectionNum <= UserPlantComp(CompNum).NumPlantConnections; ++ConnectionNum) { errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserPlantComp(CompNum).Name, - TypeOf_PlantComponentUserDefined, + DataPlant::TypeOf_PlantComponentUserDefined, UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum, UserPlantComp(CompNum).Loop(ConnectionNum).LoopSideNum, UserPlantComp(CompNum).Loop(ConnectionNum).BranchNum, @@ -2102,14 +2063,14 @@ namespace UserDefinedComponents { } // set user input for flow priority - PlantLoop(UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum) + DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum) .LoopSide(UserPlantComp(CompNum).Loop(ConnectionNum).LoopSideNum) .Branch(UserPlantComp(CompNum).Loop(ConnectionNum).BranchNum) .Comp(UserPlantComp(CompNum).Loop(ConnectionNum).CompNum) .FlowPriority = UserPlantComp(CompNum).Loop(ConnectionNum).FlowPriority; // set user input for how loads served - PlantLoop(UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum) + DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum) .LoopSide(UserPlantComp(CompNum).Loop(ConnectionNum).LoopSideNum) .Branch(UserPlantComp(CompNum).Loop(ConnectionNum).BranchNum) .Comp(UserPlantComp(CompNum).Loop(ConnectionNum).CompNum) @@ -2123,21 +2084,21 @@ namespace UserDefinedComponents { // fill internal variable targets UserPlantComp(CompNum).Loop(LoopNum).MyLoad = MyLoad; - UserPlantComp(CompNum).Loop(LoopNum).InletRho = GetDensityGlycol(PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, + UserPlantComp(CompNum).Loop(LoopNum).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, - PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, + DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, RoutineName); - UserPlantComp(CompNum).Loop(LoopNum).InletCp = GetSpecificHeatGlycol(PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, + UserPlantComp(CompNum).Loop(LoopNum).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, - PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, + DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, RoutineName); UserPlantComp(CompNum).Loop(LoopNum).InletMassFlowRate = Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).MassFlowRate; UserPlantComp(CompNum).Loop(LoopNum).InletTemp = Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp; if (UserPlantComp(CompNum).Air.InletNodeNum > 0) { - UserPlantComp(CompNum).Air.InletRho = PsyRhoAirFnPbTdbW( + UserPlantComp(CompNum).Air.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW( OutBaroPress, Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp, Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, RoutineName); UserPlantComp(CompNum).Air.InletCp = - PsyCpAirFnWTdb(Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp); + Psychrometrics::PsyCpAirFnWTdb(Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp); UserPlantComp(CompNum).Air.InletTemp = Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp; UserPlantComp(CompNum).Air.InletMassFlowRate = Node(UserPlantComp(CompNum).Air.InletNodeNum).MassFlowRate; UserPlantComp(CompNum).Air.InletHumRat = Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat; @@ -2154,10 +2115,6 @@ namespace UserDefinedComponents { // RE-ENGINEERED na using DataEnvironment::OutBaroPress; - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - using Psychrometrics::PsyCpAirFnWTdb; - using Psychrometrics::PsyRhoAirFnPbTdbW; static std::string const RoutineName("InitCoilUserDefined"); @@ -2175,7 +2132,7 @@ namespace UserDefinedComponents { if (UserCoil(CompNum).PlantIsConnected) { errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserCoil(CompNum).Name, - TypeOf_CoilUserDefined, + DataPlant::TypeOf_CoilUserDefined, UserCoil(CompNum).Loop.LoopNum, UserCoil(CompNum).Loop.LoopSideNum, UserCoil(CompNum).Loop.BranchNum, @@ -2185,14 +2142,14 @@ namespace UserDefinedComponents { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - PlantLoop(UserCoil(CompNum).Loop.LoopNum) + DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum) .LoopSide(UserCoil(CompNum).Loop.LoopSideNum) .Branch(UserCoil(CompNum).Loop.BranchNum) .Comp(UserCoil(CompNum).Loop.CompNum) .FlowPriority = UserCoil(CompNum).Loop.FlowPriority; // set user input for how loads served - PlantLoop(UserCoil(CompNum).Loop.LoopNum) + DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum) .LoopSide(UserCoil(CompNum).Loop.LoopSideNum) .Branch(UserCoil(CompNum).Loop.BranchNum) .Comp(UserCoil(CompNum).Loop.CompNum) @@ -2203,26 +2160,26 @@ namespace UserDefinedComponents { // fill internal variable targets for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { - UserCoil(CompNum).Air(Loop).InletRho = PsyRhoAirFnPbTdbW(OutBaroPress, + UserCoil(CompNum).Air(Loop).InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp, Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, RoutineName); UserCoil(CompNum).Air(Loop).InletCp = - PsyCpAirFnWTdb(Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp); + Psychrometrics::PsyCpAirFnWTdb(Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp); UserCoil(CompNum).Air(Loop).InletTemp = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp; UserCoil(CompNum).Air(Loop).InletMassFlowRate = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRate; UserCoil(CompNum).Air(Loop).InletHumRat = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat; } if (UserCoil(CompNum).PlantIsConnected) { - UserCoil(CompNum).Loop.InletRho = GetDensityGlycol(PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, + UserCoil(CompNum).Loop.InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, - PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, + DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, RoutineName); - UserCoil(CompNum).Loop.InletCp = GetSpecificHeatGlycol(PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, + UserCoil(CompNum).Loop.InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, - PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, + DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, RoutineName); UserCoil(CompNum).Loop.InletTemp = Node(UserCoil(CompNum).Loop.InletNodeNum).Temp; UserCoil(CompNum).Loop.InletMassFlowRate = Node(UserCoil(CompNum).Loop.InletNodeNum).MassFlowRate; @@ -2244,10 +2201,6 @@ namespace UserDefinedComponents { using DataEnvironment::OutBaroPress; using DataZoneEnergyDemands::ZoneSysEnergyDemand; using DataZoneEnergyDemands::ZoneSysMoistureDemand; - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - using Psychrometrics::PsyCpAirFnWTdb; - using Psychrometrics::PsyRhoAirFnPbTdbW; static std::string const RoutineName("InitZoneAirUserDefined"); @@ -2266,7 +2219,7 @@ namespace UserDefinedComponents { for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserZoneAirHVAC(CompNum).Name, - TypeOf_ZoneHVACAirUserDefined, + DataPlant::TypeOf_ZoneHVACAirUserDefined, UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum, UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, @@ -2280,14 +2233,14 @@ namespace UserDefinedComponents { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum) + DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum) .LoopSide(UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum) .Branch(UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum) .Comp(UserZoneAirHVAC(CompNum).Loop(Loop).CompNum) .FlowPriority = UserZoneAirHVAC(CompNum).Loop(Loop).FlowPriority; // set user input for how loads served - PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum) + DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum) .LoopSide(UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum) .Branch(UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum) .Comp(UserZoneAirHVAC(CompNum).Loop(Loop).CompNum) @@ -2301,21 +2254,21 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompNum).RemainingOutputReqToDehumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; UserZoneAirHVAC(CompNum).RemainingOutputReqToHumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; - UserZoneAirHVAC(CompNum).ZoneAir.InletRho = PsyRhoAirFnPbTdbW(OutBaroPress, + UserZoneAirHVAC(CompNum).ZoneAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, RoutineName); UserZoneAirHVAC(CompNum).ZoneAir.InletCp = - PsyCpAirFnWTdb(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp); + Psychrometrics::PsyCpAirFnWTdb(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp); UserZoneAirHVAC(CompNum).ZoneAir.InletTemp = Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp; UserZoneAirHVAC(CompNum).ZoneAir.InletHumRat = Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; if (UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum > 0) { - UserZoneAirHVAC(CompNum).SourceAir.InletRho = PsyRhoAirFnPbTdbW(OutBaroPress, + UserZoneAirHVAC(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp, Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, RoutineName); - UserZoneAirHVAC(CompNum).SourceAir.InletCp = PsyCpAirFnWTdb(Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, + UserZoneAirHVAC(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp); UserZoneAirHVAC(CompNum).SourceAir.InletTemp = Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp; UserZoneAirHVAC(CompNum).SourceAir.InletHumRat = Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat; @@ -2323,13 +2276,13 @@ namespace UserDefinedComponents { if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { - UserZoneAirHVAC(CompNum).Loop(Loop).InletRho = GetDensityGlycol(PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, + UserZoneAirHVAC(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, - PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, + DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); - UserZoneAirHVAC(CompNum).Loop(Loop).InletCp = GetSpecificHeatGlycol(PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, + UserZoneAirHVAC(CompNum).Loop(Loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, - PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, + DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); UserZoneAirHVAC(CompNum).Loop(Loop).InletTemp = Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp; UserZoneAirHVAC(CompNum).Loop(Loop).InletMassFlowRate = Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; @@ -2349,10 +2302,6 @@ namespace UserDefinedComponents { using DataEnvironment::OutBaroPress; using DataZoneEnergyDemands::ZoneSysEnergyDemand; using DataZoneEnergyDemands::ZoneSysMoistureDemand; - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - using Psychrometrics::PsyCpAirFnWTdb; - using Psychrometrics::PsyRhoAirFnPbTdbW; static std::string const RoutineName("InitAirTerminalUserDefined"); @@ -2371,7 +2320,7 @@ namespace UserDefinedComponents { for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserAirTerminal(CompNum).Name, - TypeOf_AirTerminalUserDefined, + DataPlant::TypeOf_AirTerminalUserDefined, UserAirTerminal(CompNum).Loop(Loop).LoopNum, UserAirTerminal(CompNum).Loop(Loop).LoopSideNum, UserAirTerminal(CompNum).Loop(Loop).BranchNum, @@ -2385,14 +2334,14 @@ namespace UserDefinedComponents { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum) + DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum) .LoopSide(UserAirTerminal(CompNum).Loop(Loop).LoopSideNum) .Branch(UserAirTerminal(CompNum).Loop(Loop).BranchNum) .Comp(UserAirTerminal(CompNum).Loop(Loop).CompNum) .FlowPriority = UserAirTerminal(CompNum).Loop(Loop).FlowPriority; // set user input for how loads served - PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum) + DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum) .LoopSide(UserAirTerminal(CompNum).Loop(Loop).LoopSideNum) .Branch(UserAirTerminal(CompNum).Loop(Loop).BranchNum) .Comp(UserAirTerminal(CompNum).Loop(Loop).CompNum) @@ -2406,21 +2355,21 @@ namespace UserDefinedComponents { UserAirTerminal(CompNum).RemainingOutputReqToDehumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; UserAirTerminal(CompNum).RemainingOutputReqToHumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; - UserAirTerminal(CompNum).AirLoop.InletRho = PsyRhoAirFnPbTdbW(OutBaroPress, + UserAirTerminal(CompNum).AirLoop.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp, Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, RoutineName); UserAirTerminal(CompNum).AirLoop.InletCp = - PsyCpAirFnWTdb(Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp); + Psychrometrics::PsyCpAirFnWTdb(Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp); UserAirTerminal(CompNum).AirLoop.InletTemp = Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp; UserAirTerminal(CompNum).AirLoop.InletHumRat = Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat; if (UserAirTerminal(CompNum).SourceAir.InletNodeNum > 0) { - UserAirTerminal(CompNum).SourceAir.InletRho = PsyRhoAirFnPbTdbW(OutBaroPress, + UserAirTerminal(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp, Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, RoutineName); - UserAirTerminal(CompNum).SourceAir.InletCp = PsyCpAirFnWTdb(Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, + UserAirTerminal(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp); UserAirTerminal(CompNum).SourceAir.InletTemp = Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp; UserAirTerminal(CompNum).SourceAir.InletHumRat = Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat; @@ -2428,13 +2377,13 @@ namespace UserDefinedComponents { if (UserAirTerminal(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { - UserAirTerminal(CompNum).Loop(Loop).InletRho = GetDensityGlycol(PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, + UserAirTerminal(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, - PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, + DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); - UserAirTerminal(CompNum).Loop(Loop).InletCp = GetSpecificHeatGlycol(PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, + UserAirTerminal(CompNum).Loop(Loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, - PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, + DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); UserAirTerminal(CompNum).Loop(Loop).InletTemp = Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp; UserAirTerminal(CompNum).Loop(Loop).InletMassFlowRate = Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; @@ -2457,18 +2406,14 @@ namespace UserDefinedComponents { // METHODOLOGY EMPLOYED: // copy actuated values to structures elsewhere in program. - using PlantUtilities::SafeCopyPlantNode; - using PlantUtilities::SetComponentFlowRate; - using Psychrometrics::PsyHFnTdbW; - - SafeCopyPlantNode(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum, UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum); + PlantUtilities::SafeCopyPlantNode(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum, UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum); // unload Actuators to node data structure Node(UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum).Temp = UserPlantComp(CompNum).Loop(LoopNum).OutletTemp; // make mass flow requests, just this loop - SetComponentFlowRate(UserPlantComp(CompNum).Loop(LoopNum).MassFlowRateRequest, + PlantUtilities::SetComponentFlowRate(UserPlantComp(CompNum).Loop(LoopNum).MassFlowRateRequest, UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum, UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum, UserPlantComp(CompNum).Loop(LoopNum).LoopNum, @@ -2481,7 +2426,7 @@ namespace UserDefinedComponents { Node(UserPlantComp(CompNum).Air.OutletNodeNum).HumRat = UserPlantComp(CompNum).Air.OutletHumRat; Node(UserPlantComp(CompNum).Air.OutletNodeNum).MassFlowRate = UserPlantComp(CompNum).Air.OutletMassFlowRate; Node(UserPlantComp(CompNum).Air.OutletNodeNum).Enthalpy = - PsyHFnTdbW(UserPlantComp(CompNum).Air.OutletTemp, UserPlantComp(CompNum).Air.OutletHumRat); + Psychrometrics::PsyHFnTdbW(UserPlantComp(CompNum).Air.OutletTemp, UserPlantComp(CompNum).Air.OutletHumRat); } if (UserPlantComp(CompNum).Water.SuppliedByWaterSystem) { @@ -2494,16 +2439,16 @@ namespace UserDefinedComponents { UserPlantComp(CompNum).Water.CollectedVdot; } - if (UserPlantComp(CompNum).Loop(LoopNum).HowLoadServed == HowMet_ByNominalCapLowOutLimit) { - PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum) + if (UserPlantComp(CompNum).Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapLowOutLimit) { + DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum) .LoopSide(UserPlantComp(CompNum).Loop(LoopNum).LoopSideNum) .Branch(UserPlantComp(CompNum).Loop(LoopNum).BranchNum) .Comp(UserPlantComp(CompNum).Loop(LoopNum).CompNum) .MinOutletTemp = UserPlantComp(CompNum).Loop(LoopNum).LowOutTempLimit; } - if (UserPlantComp(CompNum).Loop(LoopNum).HowLoadServed == HowMet_ByNominalCapHiOutLimit) { - PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum) + if (UserPlantComp(CompNum).Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapHiOutLimit) { + DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum) .LoopSide(UserPlantComp(CompNum).Loop(LoopNum).LoopSideNum) .Branch(UserPlantComp(CompNum).Loop(LoopNum).BranchNum) .Comp(UserPlantComp(CompNum).Loop(LoopNum).CompNum) @@ -2523,10 +2468,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - using PlantUtilities::SafeCopyPlantNode; - using PlantUtilities::SetComponentFlowRate; - using Psychrometrics::PsyHFnTdbW; - int Loop; for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { @@ -2535,7 +2476,7 @@ namespace UserDefinedComponents { Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).HumRat = UserCoil(CompNum).Air(Loop).OutletHumRat; Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRate = UserCoil(CompNum).Air(Loop).OutletMassFlowRate; Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Enthalpy = - PsyHFnTdbW(UserCoil(CompNum).Air(Loop).OutletTemp, UserCoil(CompNum).Air(Loop).OutletHumRat); + Psychrometrics::PsyHFnTdbW(UserCoil(CompNum).Air(Loop).OutletTemp, UserCoil(CompNum).Air(Loop).OutletHumRat); Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMinAvail = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMinAvail; @@ -2546,14 +2487,14 @@ namespace UserDefinedComponents { if (UserCoil(CompNum).PlantIsConnected) { // make mass flow requests - SetComponentFlowRate(UserCoil(CompNum).Loop.MassFlowRateRequest, + PlantUtilities::SetComponentFlowRate(UserCoil(CompNum).Loop.MassFlowRateRequest, UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.OutletNodeNum, UserCoil(CompNum).Loop.LoopNum, UserCoil(CompNum).Loop.LoopSideNum, UserCoil(CompNum).Loop.BranchNum, UserCoil(CompNum).Loop.CompNum); - SafeCopyPlantNode(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.OutletNodeNum); + PlantUtilities::SafeCopyPlantNode(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.OutletNodeNum); // unload Actuators to node data structure Node(UserCoil(CompNum).Loop.OutletNodeNum).Temp = UserCoil(CompNum).Loop.OutletTemp; } @@ -2581,10 +2522,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - using PlantUtilities::SafeCopyPlantNode; - using PlantUtilities::SetComponentFlowRate; - using Psychrometrics::PsyHFnTdbW; - int Loop; Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.InletMassFlowRate; @@ -2593,27 +2530,27 @@ namespace UserDefinedComponents { Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat; Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.OutletMassFlowRate; Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Enthalpy = - PsyHFnTdbW(UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp, UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat); + Psychrometrics::PsyHFnTdbW(UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp, UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat); if (UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum > 0) { Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).SourceAir.OutletTemp; Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat; Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).SourceAir.OutletMassFlowRate; Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Enthalpy = - PsyHFnTdbW(UserZoneAirHVAC(CompNum).SourceAir.OutletTemp, UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat); + Psychrometrics::PsyHFnTdbW(UserZoneAirHVAC(CompNum).SourceAir.OutletTemp, UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat); } if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { // make mass flow requests - SetComponentFlowRate(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateRequest, + PlantUtilities::SetComponentFlowRate(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateRequest, UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum, UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, UserZoneAirHVAC(CompNum).Loop(Loop).CompNum); - SafeCopyPlantNode(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum); + PlantUtilities::SafeCopyPlantNode(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum); // unload Actuators to node data structure Node(UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).Loop(Loop).OutletTemp; } @@ -2639,10 +2576,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using PlantUtilities::SafeCopyPlantNode; - using PlantUtilities::SetComponentFlowRate; - using Psychrometrics::PsyHFnTdbW; - int Loop; Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.InletMassFlowRate; @@ -2651,26 +2584,26 @@ namespace UserDefinedComponents { Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).HumRat = UserAirTerminal(CompNum).AirLoop.OutletHumRat; Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.OutletMassFlowRate; Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Enthalpy = - PsyHFnTdbW(UserAirTerminal(CompNum).AirLoop.OutletTemp, UserAirTerminal(CompNum).AirLoop.OutletHumRat); + Psychrometrics::PsyHFnTdbW(UserAirTerminal(CompNum).AirLoop.OutletTemp, UserAirTerminal(CompNum).AirLoop.OutletHumRat); if (UserAirTerminal(CompNum).SourceAir.OutletNodeNum > 0) { Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Temp = UserAirTerminal(CompNum).SourceAir.OutletTemp; Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).HumRat = UserAirTerminal(CompNum).SourceAir.OutletHumRat; Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).SourceAir.OutletMassFlowRate; Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Enthalpy = - PsyHFnTdbW(UserAirTerminal(CompNum).SourceAir.OutletTemp, UserAirTerminal(CompNum).SourceAir.OutletHumRat); + Psychrometrics::PsyHFnTdbW(UserAirTerminal(CompNum).SourceAir.OutletTemp, UserAirTerminal(CompNum).SourceAir.OutletHumRat); } if (UserAirTerminal(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { // make mass flow requests - SetComponentFlowRate(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateRequest, + PlantUtilities::SetComponentFlowRate(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateRequest, UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum, UserAirTerminal(CompNum).Loop(Loop).LoopNum, UserAirTerminal(CompNum).Loop(Loop).LoopSideNum, UserAirTerminal(CompNum).Loop(Loop).BranchNum, UserAirTerminal(CompNum).Loop(Loop).CompNum); - SafeCopyPlantNode(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum); + PlantUtilities::SafeCopyPlantNode(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum); // unload Actuators to node data structure Node(UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum).Temp = UserAirTerminal(CompNum).Loop(Loop).OutletTemp; } diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index c0a0a4213eb..52255eba2d7 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -60,9 +60,6 @@ namespace EnergyPlus { namespace UserDefinedComponents { - using DataPlant::HowMet_Unknown; - using DataPlant::LoopFlowStatus_Unknown; - extern int NumUserPlantComps; extern int NumUserCoils; extern int NumUserZoneAir; @@ -72,7 +69,6 @@ namespace UserDefinedComponents { extern Array1D_bool CheckUserCoilName; extern Array1D_bool CheckUserZoneAirName; extern Array1D_bool CheckUserAirTerminal; - extern bool GetInput; struct PlantConnectionStruct { @@ -101,12 +97,12 @@ namespace UserDefinedComponents { Real64 InletCp; // fills internal Variable, current specific heat for fluid type and inlet temperature [J/kg-C] Real64 InletTemp; // fills internal variable, current inlet fluid temperature [C] Real64 InletMassFlowRate; // fills internal variable, current inlet mass flow rate [kg/s] - Real64 OutletTemp; // filled by actuator, componenent outlet temperature [C] + Real64 OutletTemp; // filled by actuator, component outlet temperature [C] // Default Constructor PlantConnectionStruct() : ErlInitProgramMngr(0), ErlSimProgramMngr(0), LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), InletNodeNum(0), OutletNodeNum(0), - FlowPriority(LoopFlowStatus_Unknown), HowLoadServed(HowMet_Unknown), LowOutTempLimit(0.0), HiOutTempLimit(0.0), + FlowPriority(DataPlant::LoopFlowStatus_Unknown), HowLoadServed(DataPlant::HowMet_Unknown), LowOutTempLimit(0.0), HiOutTempLimit(0.0), MassFlowRateRequest(0.0), MassFlowRateMin(0.0), MassFlowRateMax(0.0), DesignVolumeFlowRate(0.0), MyLoad(0.0), MinLoad(0.0), MaxLoad(0.0), OptLoad(0.0), InletRho(0.0), InletCp(0.0), InletTemp(0.0), InletMassFlowRate(0.0), OutletTemp(0.0) { @@ -199,7 +195,7 @@ namespace UserDefinedComponents { std::string Name; // user identifier int ErlSimProgramMngr; // EMS:ProgramManager to always run when this model is called int ErlInitProgramMngr; // EMS:ProgramManager to run when this model is initialized and setup - int NumAirConnections; // count of how many air connectiosn there are + int NumAirConnections; // count of how many air connections there are bool PlantIsConnected; Array1D Air; PlantConnectionStruct Loop; @@ -270,8 +266,6 @@ namespace UserDefinedComponents { extern Array1D UserZoneAirHVAC; extern Array1D UserAirTerminal; - // Functions - void SimUserDefinedPlantComponent(int LoopNum, // plant loop sim call originated from int LoopSideNum, // plant loop side sim call originated from std::string const &EquipType, // type of equipment, 'PlantComponent:UserDefined' From dc474056233a6c0897f99f85b10d73aaafaccfad Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Sun, 8 Dec 2019 16:30:17 -0700 Subject: [PATCH 13/86] cleanup usings --- src/EnergyPlus/UserDefinedComponents.cc | 477 +++++++++++------------- 1 file changed, 227 insertions(+), 250 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 60d543ab058..154e623feb3 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -91,10 +91,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS MODULE: // Collect component models for custom program with Erl. - using namespace DataLoopNode; - using namespace DataRuntimeLanguage; - using DataWater::WaterStorage; - int NumUserPlantComps(0); int NumUserCoils(0); int NumUserZoneAir(0); @@ -301,14 +297,14 @@ namespace UserDefinedComponents { if (AirLoopNum != -1) { // IF the system is not an equipment of outdoor air unit // determine if heating or cooling on primary air stream - if (Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp) { + if (DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp) { HeatingActive = true; } else { HeatingActive = false; } - EnthInlet = Psychrometrics::PsyHFnTdbW(Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); - EnthOutlet = Psychrometrics::PsyHFnTdbW(Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); + EnthInlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); + EnthOutlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); if (EnthInlet > EnthOutlet) { CoolingActive = true; } else { @@ -400,15 +396,15 @@ namespace UserDefinedComponents { // calculate delivered capacity AirMassFlow = - min(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate, Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate); + min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate); // calculate sensible load met using delta enthalpy at a constant (minimum) humidity ratio) - MinHumRat = min(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); - SensibleOutputProvided = AirMassFlow * (Psychrometrics::PsyHFnTdbW(Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - - Psychrometrics::PsyHFnTdbW(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); + MinHumRat = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); + SensibleOutputProvided = AirMassFlow * (Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - + Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); // CR9155 Remove specific humidity calculations - SpecHumOut = Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat; - SpecHumIn = Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; + SpecHumOut = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat; + SpecHumIn = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; LatentOutputProvided = AirMassFlow * (SpecHumOut - SpecHumIn); // Latent rate, kg/s (dehumid = negative) } @@ -498,13 +494,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using BranchNodeConnections::TestCompSet; - using DataZoneEquipment::ZoneEquipConfig; - using GlobalNames::VerifyUniqueCoilName; - using NodeInputManager::GetOnlySingleNode; - using WaterManager::SetupTankDemandComponent; - using WaterManager::SetupTankSupplyComponent; - static ObjexxFCL::gio::Fmt fmtLD("*"); static bool ErrorsFound(false); @@ -570,7 +559,7 @@ namespace UserDefinedComponents { // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserPlantComp(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -589,24 +578,24 @@ namespace UserDefinedComponents { for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { LoopStr = General::RoundSigDigits(ConnectionLoop); aArgCount = (ConnectionLoop - 1) * 6 + 3; - UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount), + UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, ConnectionLoop, - ObjectIsNotParent); - UserPlantComp(CompLoop).Loop(ConnectionLoop).OutletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + DataLoopNode::ObjectIsNotParent); + UserPlantComp(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, ConnectionLoop, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes " + LoopStr); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes " + LoopStr); { auto const SELECT_CASE_var(cAlphaArgs(aArgCount + 2)); @@ -650,7 +639,7 @@ namespace UserDefinedComponents { // find program manager for initial setup, begin environment and sizing of this plant connection if (!lAlphaFieldBlanks(aArgCount + 4)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 4), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 4), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -663,7 +652,7 @@ namespace UserDefinedComponents { // find program to call for model simulations for just this plant connection if (!lAlphaFieldBlanks(aArgCount + 5)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 5), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 5), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -751,14 +740,14 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(27)) { - UserPlantComp(CompLoop).Air.InletNodeNum = GetOnlySingleNode(cAlphaArgs(27), + UserPlantComp(CompLoop).Air.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(27), ErrorsFound, cCurrentModuleObject, UserPlantComp(CompLoop).Name, - NodeType_Air, - NodeConnectionType_OutsideAirReference, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable( "Inlet Temperature for Air Connection", UserPlantComp(CompLoop).Name, "[C]", UserPlantComp(CompLoop).Air.InletTemp); @@ -777,14 +766,14 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(28)) { - UserPlantComp(CompLoop).Air.OutletNodeNum = GetOnlySingleNode(cAlphaArgs(28), + UserPlantComp(CompLoop).Air.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(28), ErrorsFound, cCurrentModuleObject, UserPlantComp(CompLoop).Name, - NodeType_Air, - NodeConnectionType_ReliefAir, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_ReliefAir, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); // outlet air node results SetupEMSActuator( "Air Connection", UserPlantComp(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserPlantComp(CompLoop).Air.OutletTemp); @@ -803,7 +792,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(29)) { - SetupTankDemandComponent(cAlphaArgs(1), + WaterManager::SetupTankDemandComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(29), ErrorsFound, @@ -820,7 +809,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(30)) { - SetupTankSupplyComponent(cAlphaArgs(1), + WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(30), ErrorsFound, @@ -939,13 +928,13 @@ namespace UserDefinedComponents { UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); // ErrorsFound will be set to True if problem was found, left untouched otherwise - VerifyUniqueCoilName(cCurrentModuleObject, cAlphaArgs(1), ErrorsFound, cCurrentModuleObject + " Name"); + GlobalNames::VerifyUniqueCoilName(cCurrentModuleObject, cAlphaArgs(1), ErrorsFound, cCurrentModuleObject + " Name"); UserCoil(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -958,7 +947,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -975,14 +964,14 @@ namespace UserDefinedComponents { UserCoil(CompLoop).NumAirConnections = NumAirConnections; for (ConnectionLoop = 1; ConnectionLoop <= NumAirConnections; ++ConnectionLoop) { aArgCount = (ConnectionLoop - 1) * 2 + 4; - UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount), + UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, UserCoil(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables @@ -1007,14 +996,14 @@ namespace UserDefinedComponents { "[J/kg-C]", UserCoil(CompLoop).Air(ConnectionLoop).InletCp); - UserCoil(CompLoop).Air(ConnectionLoop).OutletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + UserCoil(CompLoop).Air(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), ErrorsFound, cCurrentModuleObject, UserCoil(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Air Connection " + LoopStr, UserCoil(CompLoop).Name, "Outlet Temperature", @@ -1034,7 +1023,7 @@ namespace UserDefinedComponents { lDummy, UserCoil(CompLoop).Air(ConnectionLoop).OutletMassFlowRate); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Air Nodes " + LoopStr); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Air Nodes " + LoopStr); } if (!lAlphaFieldBlanks(8)) { @@ -1053,24 +1042,24 @@ namespace UserDefinedComponents { } if (UserCoil(CompLoop).PlantIsConnected) { // get input - UserCoil(CompLoop).Loop.InletNodeNum = GetOnlySingleNode(cAlphaArgs(9), + UserCoil(CompLoop).Loop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(9), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, 2, - ObjectIsNotParent); - UserCoil(CompLoop).Loop.OutletNodeNum = GetOnlySingleNode(cAlphaArgs(10), + DataLoopNode::ObjectIsNotParent); + UserCoil(CompLoop).Loop.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(10), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, 2, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), cAlphaArgs(10), "Plant Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), cAlphaArgs(10), "Plant Nodes"); // this model is only for plant connections that are "Demand" UserCoil(CompLoop).Loop.HowLoadServed = DataPlant::HowMet_NoneDemand; @@ -1121,7 +1110,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(11)) { - SetupTankDemandComponent(cAlphaArgs(1), + WaterManager::SetupTankDemandComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(11), ErrorsFound, @@ -1138,7 +1127,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(12)) { - SetupTankSupplyComponent(cAlphaArgs(1), + WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(12), ErrorsFound, @@ -1248,7 +1237,7 @@ namespace UserDefinedComponents { // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1261,7 +1250,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1272,14 +1261,14 @@ namespace UserDefinedComponents { } } - UserZoneAirHVAC(CompLoop).ZoneAir.InletNodeNum = GetOnlySingleNode(cAlphaArgs(4), + UserZoneAirHVAC(CompLoop).ZoneAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, UserZoneAirHVAC(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Primary Air Connection", UserZoneAirHVAC(CompLoop).Name, @@ -1321,14 +1310,14 @@ namespace UserDefinedComponents { "[kg/s]", lDummy, UserZoneAirHVAC(CompLoop).ZoneAir.InletMassFlowRate); - UserZoneAirHVAC(CompLoop).ZoneAir.OutletNodeNum = GetOnlySingleNode(cAlphaArgs(5), + UserZoneAirHVAC(CompLoop).ZoneAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, UserZoneAirHVAC(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Primary Air Connection", UserZoneAirHVAC(CompLoop).Name, "Outlet Temperature", @@ -1349,14 +1338,14 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).ZoneAir.OutletMassFlowRate); if (!lAlphaFieldBlanks(6)) { - UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum = GetOnlySingleNode(cAlphaArgs(6), + UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, UserZoneAirHVAC(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, 2, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Secondary Air Connection", UserZoneAirHVAC(CompLoop).Name, @@ -1384,14 +1373,14 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(7)) { - UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum = GetOnlySingleNode(cAlphaArgs(7), + UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(7), ErrorsFound, cCurrentModuleObject, UserZoneAirHVAC(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, 2, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Secondary Air Connection", UserZoneAirHVAC(CompLoop).Name, "Outlet Temperature", @@ -1422,23 +1411,23 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).Loop.allocate(NumPlantConnections); for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { aArgCount = (ConnectionLoop - 1) * 2 + 8; - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).InletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount), + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, (ConnectionLoop + 2), - ObjectIsNotParent); - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).OutletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, (ConnectionLoop + 2), - ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); + DataLoopNode::ObjectIsNotParent); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables @@ -1497,7 +1486,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(14)) { - SetupTankDemandComponent(cAlphaArgs(1), + WaterManager::SetupTankDemandComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(14), ErrorsFound, @@ -1514,7 +1503,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(15)) { - SetupTankSupplyComponent(cAlphaArgs(1), + WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(15), ErrorsFound, @@ -1622,7 +1611,7 @@ namespace UserDefinedComponents { // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1635,7 +1624,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), EMSProgramCallManager); + StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1646,14 +1635,14 @@ namespace UserDefinedComponents { } } - UserAirTerminal(CompLoop).AirLoop.InletNodeNum = GetOnlySingleNode(cAlphaArgs(4), + UserAirTerminal(CompLoop).AirLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, UserAirTerminal(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, 1, - ObjectIsNotParent, + DataLoopNode::ObjectIsNotParent, cAlphaFieldNames(4)); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Primary Air Connection", @@ -1696,14 +1685,14 @@ namespace UserDefinedComponents { "[kg/s]", lDummy, UserAirTerminal(CompLoop).AirLoop.InletMassFlowRate); - UserAirTerminal(CompLoop).AirLoop.OutletNodeNum = GetOnlySingleNode(cAlphaArgs(5), + UserAirTerminal(CompLoop).AirLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, UserAirTerminal(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, 1, - ObjectIsNotParent, + DataLoopNode::ObjectIsNotParent, cAlphaFieldNames(5)); SetupEMSActuator("Primary Air Connection", UserAirTerminal(CompLoop).Name, @@ -1723,7 +1712,7 @@ namespace UserDefinedComponents { "[kg/s]", lDummy, UserAirTerminal(CompLoop).AirLoop.OutletMassFlowRate); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), cAlphaArgs(5), "Air Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), cAlphaArgs(5), "Air Nodes"); int ADUNum = 0; for (ADUNum = 1; ADUNum <= DataDefineEquip::NumAirDistUnits; ++ADUNum) { @@ -1736,24 +1725,24 @@ namespace UserDefinedComponents { if (UserAirTerminal(CompLoop).ADUNum == 0) { ShowSevereError("GetUserDefinedComponents: No matching Air Distribution Unit for " + cCurrentModuleObject + " = " + UserAirTerminal(CompLoop).Name); - ShowContinueError("...should have outlet node=" + NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum)); + ShowContinueError("...should have outlet node=" + DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum)); // ErrorsFound=.TRUE. } // Fill the Zone Equipment data with the inlet node number of this unit. for (CtrlZone = 1; CtrlZone <= DataGlobals::NumOfZones; ++CtrlZone) { - if (!ZoneEquipConfig(CtrlZone).IsControlled) continue; - for (SupAirIn = 1; SupAirIn <= ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { - if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { - if (ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { + if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; + for (SupAirIn = 1; SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { + if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { + if (DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError("Error in connecting a terminal unit to a zone"); - ShowContinueError(NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum) + " already connects to another zone"); + ShowContinueError(DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum) + " already connects to another zone"); ShowContinueError("Occurs for terminal unit " + cCurrentModuleObject + " = " + UserAirTerminal(CompLoop).Name); ShowContinueError("Check terminal unit node names for errors"); ErrorsFound = true; } else { - ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).InNode = UserAirTerminal(CompLoop).AirLoop.InletNodeNum; - ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode = UserAirTerminal(CompLoop).AirLoop.OutletNodeNum; + DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).InNode = UserAirTerminal(CompLoop).AirLoop.InletNodeNum; + DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode = UserAirTerminal(CompLoop).AirLoop.OutletNodeNum; } UserAirTerminal(CompLoop).ActualCtrlZoneNum = CtrlZone; @@ -1762,14 +1751,14 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(6)) { - UserAirTerminal(CompLoop).SourceAir.InletNodeNum = GetOnlySingleNode(cAlphaArgs(6), + UserAirTerminal(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, UserAirTerminal(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, 2, - ObjectIsNotParent, + DataLoopNode::ObjectIsNotParent, cAlphaFieldNames(6)); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Secondary Air Connection", @@ -1798,14 +1787,14 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(7)) { - UserAirTerminal(CompLoop).SourceAir.OutletNodeNum = GetOnlySingleNode(cAlphaArgs(7), + UserAirTerminal(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(7), ErrorsFound, cCurrentModuleObject, UserAirTerminal(CompLoop).Name, - NodeType_Air, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, 2, - ObjectIsNotParent, + DataLoopNode::ObjectIsNotParent, cAlphaFieldNames(7)); SetupEMSActuator("Secondary Air Connection", UserAirTerminal(CompLoop).Name, @@ -1837,25 +1826,25 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).Loop.allocate(NumPlantConnections); for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { aArgCount = (ConnectionLoop - 1) * 2 + 8; - UserAirTerminal(CompLoop).Loop(ConnectionLoop).InletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount), + UserAirTerminal(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Inlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, (ConnectionLoop + 2), - ObjectIsNotParent, + DataLoopNode::ObjectIsNotParent, cAlphaFieldNames(aArgCount)); - UserAirTerminal(CompLoop).Loop(ConnectionLoop).OutletNodeNum = GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + UserAirTerminal(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Outlet, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, (ConnectionLoop + 2), - ObjectIsNotParent, + DataLoopNode::ObjectIsNotParent, cAlphaFieldNames(aArgCount + 1)); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); UserAirTerminal(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; UserAirTerminal(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables @@ -1913,7 +1902,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(12)) { - SetupTankDemandComponent(cAlphaArgs(1), + WaterManager::SetupTankDemandComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(12), ErrorsFound, @@ -1930,7 +1919,7 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(13)) { - SetupTankSupplyComponent(cAlphaArgs(1), + WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), cCurrentModuleObject, cAlphaArgs(13), ErrorsFound, @@ -2025,8 +2014,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using DataEnvironment::OutBaroPress; - static std::string const RoutineName("InitPlantUserComponent"); static bool MyOneTimeFlag(true); // one time flag @@ -2085,23 +2072,23 @@ namespace UserDefinedComponents { // fill internal variable targets UserPlantComp(CompNum).Loop(LoopNum).MyLoad = MyLoad; UserPlantComp(CompNum).Loop(LoopNum).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, - Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, + DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, RoutineName); UserPlantComp(CompNum).Loop(LoopNum).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, - Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, + DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, RoutineName); - UserPlantComp(CompNum).Loop(LoopNum).InletMassFlowRate = Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).MassFlowRate; - UserPlantComp(CompNum).Loop(LoopNum).InletTemp = Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp; + UserPlantComp(CompNum).Loop(LoopNum).InletMassFlowRate = DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).MassFlowRate; + UserPlantComp(CompNum).Loop(LoopNum).InletTemp = DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp; if (UserPlantComp(CompNum).Air.InletNodeNum > 0) { UserPlantComp(CompNum).Air.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW( - OutBaroPress, Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp, Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, RoutineName); + DataEnvironment::OutBaroPress, DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp, DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, RoutineName); UserPlantComp(CompNum).Air.InletCp = - Psychrometrics::PsyCpAirFnWTdb(Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp); - UserPlantComp(CompNum).Air.InletTemp = Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp; - UserPlantComp(CompNum).Air.InletMassFlowRate = Node(UserPlantComp(CompNum).Air.InletNodeNum).MassFlowRate; - UserPlantComp(CompNum).Air.InletHumRat = Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat; + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp); + UserPlantComp(CompNum).Air.InletTemp = DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp; + UserPlantComp(CompNum).Air.InletMassFlowRate = DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).MassFlowRate; + UserPlantComp(CompNum).Air.InletHumRat = DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat; } } @@ -2114,8 +2101,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using DataEnvironment::OutBaroPress; - static std::string const RoutineName("InitCoilUserDefined"); static bool MyOneTimeFlag(true); // one time flag @@ -2160,29 +2145,29 @@ namespace UserDefinedComponents { // fill internal variable targets for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { - UserCoil(CompNum).Air(Loop).InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, - Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp, - Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, + UserCoil(CompNum).Air(Loop).InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp, + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, RoutineName); UserCoil(CompNum).Air(Loop).InletCp = - Psychrometrics::PsyCpAirFnWTdb(Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp); - UserCoil(CompNum).Air(Loop).InletTemp = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp; - UserCoil(CompNum).Air(Loop).InletMassFlowRate = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRate; - UserCoil(CompNum).Air(Loop).InletHumRat = Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat; + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp); + UserCoil(CompNum).Air(Loop).InletTemp = DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp; + UserCoil(CompNum).Air(Loop).InletMassFlowRate = DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRate; + UserCoil(CompNum).Air(Loop).InletHumRat = DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat; } if (UserCoil(CompNum).PlantIsConnected) { UserCoil(CompNum).Loop.InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, - Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, + DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, RoutineName); UserCoil(CompNum).Loop.InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, - Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, + DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, RoutineName); - UserCoil(CompNum).Loop.InletTemp = Node(UserCoil(CompNum).Loop.InletNodeNum).Temp; - UserCoil(CompNum).Loop.InletMassFlowRate = Node(UserCoil(CompNum).Loop.InletNodeNum).MassFlowRate; + UserCoil(CompNum).Loop.InletTemp = DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).Temp; + UserCoil(CompNum).Loop.InletMassFlowRate = DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).MassFlowRate; } } @@ -2198,10 +2183,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // initialize data for user-defined zone HVAC forced air component model - using DataEnvironment::OutBaroPress; - using DataZoneEnergyDemands::ZoneSysEnergyDemand; - using DataZoneEnergyDemands::ZoneSysMoistureDemand; - static std::string const RoutineName("InitZoneAirUserDefined"); static bool MyOneTimeFlag(true); // one time flag @@ -2249,43 +2230,43 @@ namespace UserDefinedComponents { } } // fill internal variable targets - UserZoneAirHVAC(CompNum).RemainingOutputToHeatingSP = ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; - UserZoneAirHVAC(CompNum).RemainingOutputToCoolingSP = ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; - UserZoneAirHVAC(CompNum).RemainingOutputReqToDehumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; - UserZoneAirHVAC(CompNum).RemainingOutputReqToHumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; - - UserZoneAirHVAC(CompNum).ZoneAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, - Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, - Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, + UserZoneAirHVAC(CompNum).RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; + UserZoneAirHVAC(CompNum).RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; + UserZoneAirHVAC(CompNum).RemainingOutputReqToDehumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; + UserZoneAirHVAC(CompNum).RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; + + UserZoneAirHVAC(CompNum).ZoneAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, RoutineName); UserZoneAirHVAC(CompNum).ZoneAir.InletCp = - Psychrometrics::PsyCpAirFnWTdb(Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp); - UserZoneAirHVAC(CompNum).ZoneAir.InletTemp = Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp; - UserZoneAirHVAC(CompNum).ZoneAir.InletHumRat = Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp); + UserZoneAirHVAC(CompNum).ZoneAir.InletTemp = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp; + UserZoneAirHVAC(CompNum).ZoneAir.InletHumRat = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; if (UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum > 0) { - UserZoneAirHVAC(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, - Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp, - Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, + UserZoneAirHVAC(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, RoutineName); - UserZoneAirHVAC(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, - Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp); - UserZoneAirHVAC(CompNum).SourceAir.InletTemp = Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp; - UserZoneAirHVAC(CompNum).SourceAir.InletHumRat = Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat; + UserZoneAirHVAC(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp); + UserZoneAirHVAC(CompNum).SourceAir.InletTemp = DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp; + UserZoneAirHVAC(CompNum).SourceAir.InletHumRat = DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat; } if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { UserZoneAirHVAC(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, - Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); UserZoneAirHVAC(CompNum).Loop(Loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, - Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); - UserZoneAirHVAC(CompNum).Loop(Loop).InletTemp = Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp; - UserZoneAirHVAC(CompNum).Loop(Loop).InletMassFlowRate = Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; + UserZoneAirHVAC(CompNum).Loop(Loop).InletTemp = DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp; + UserZoneAirHVAC(CompNum).Loop(Loop).InletMassFlowRate = DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; } } } @@ -2299,10 +2280,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - using DataEnvironment::OutBaroPress; - using DataZoneEnergyDemands::ZoneSysEnergyDemand; - using DataZoneEnergyDemands::ZoneSysMoistureDemand; - static std::string const RoutineName("InitAirTerminalUserDefined"); static bool MyOneTimeFlag(true); // one time flag @@ -2350,43 +2327,43 @@ namespace UserDefinedComponents { } } // fill internal variable targets - UserAirTerminal(CompNum).RemainingOutputToHeatingSP = ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; - UserAirTerminal(CompNum).RemainingOutputToCoolingSP = ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; - UserAirTerminal(CompNum).RemainingOutputReqToDehumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; - UserAirTerminal(CompNum).RemainingOutputReqToHumidSP = ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; - - UserAirTerminal(CompNum).AirLoop.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, - Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp, - Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, + UserAirTerminal(CompNum).RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; + UserAirTerminal(CompNum).RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; + UserAirTerminal(CompNum).RemainingOutputReqToDehumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; + UserAirTerminal(CompNum).RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; + + UserAirTerminal(CompNum).AirLoop.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp, + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, RoutineName); UserAirTerminal(CompNum).AirLoop.InletCp = - Psychrometrics::PsyCpAirFnWTdb(Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp); - UserAirTerminal(CompNum).AirLoop.InletTemp = Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp; - UserAirTerminal(CompNum).AirLoop.InletHumRat = Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat; + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp); + UserAirTerminal(CompNum).AirLoop.InletTemp = DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp; + UserAirTerminal(CompNum).AirLoop.InletHumRat = DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat; if (UserAirTerminal(CompNum).SourceAir.InletNodeNum > 0) { - UserAirTerminal(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, - Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp, - Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, + UserAirTerminal(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp, + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, RoutineName); - UserAirTerminal(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, - Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp); - UserAirTerminal(CompNum).SourceAir.InletTemp = Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp; - UserAirTerminal(CompNum).SourceAir.InletHumRat = Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat; + UserAirTerminal(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp); + UserAirTerminal(CompNum).SourceAir.InletTemp = DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp; + UserAirTerminal(CompNum).SourceAir.InletHumRat = DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat; } if (UserAirTerminal(CompNum).NumPlantConnections > 0) { for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { UserAirTerminal(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, - Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, + DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); UserAirTerminal(CompNum).Loop(Loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, - Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, + DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, RoutineName); - UserAirTerminal(CompNum).Loop(Loop).InletTemp = Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp; - UserAirTerminal(CompNum).Loop(Loop).InletMassFlowRate = Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; + UserAirTerminal(CompNum).Loop(Loop).InletTemp = DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp; + UserAirTerminal(CompNum).Loop(Loop).InletMassFlowRate = DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; } } } @@ -2410,7 +2387,7 @@ namespace UserDefinedComponents { // unload Actuators to node data structure - Node(UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum).Temp = UserPlantComp(CompNum).Loop(LoopNum).OutletTemp; + DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum).Temp = UserPlantComp(CompNum).Loop(LoopNum).OutletTemp; // make mass flow requests, just this loop PlantUtilities::SetComponentFlowRate(UserPlantComp(CompNum).Loop(LoopNum).MassFlowRateRequest, @@ -2422,20 +2399,20 @@ namespace UserDefinedComponents { UserPlantComp(CompNum).Loop(LoopNum).CompNum); if (UserPlantComp(CompNum).Air.OutletNodeNum > 0) { - Node(UserPlantComp(CompNum).Air.OutletNodeNum).Temp = UserPlantComp(CompNum).Air.OutletTemp; - Node(UserPlantComp(CompNum).Air.OutletNodeNum).HumRat = UserPlantComp(CompNum).Air.OutletHumRat; - Node(UserPlantComp(CompNum).Air.OutletNodeNum).MassFlowRate = UserPlantComp(CompNum).Air.OutletMassFlowRate; - Node(UserPlantComp(CompNum).Air.OutletNodeNum).Enthalpy = + DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).Temp = UserPlantComp(CompNum).Air.OutletTemp; + DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).HumRat = UserPlantComp(CompNum).Air.OutletHumRat; + DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).MassFlowRate = UserPlantComp(CompNum).Air.OutletMassFlowRate; + DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(UserPlantComp(CompNum).Air.OutletTemp, UserPlantComp(CompNum).Air.OutletHumRat); } if (UserPlantComp(CompNum).Water.SuppliedByWaterSystem) { - WaterStorage(UserPlantComp(CompNum).Water.SupplyTankID).VdotRequestDemand(UserPlantComp(CompNum).Water.SupplyTankDemandARRID) = + DataWater::WaterStorage(UserPlantComp(CompNum).Water.SupplyTankID).VdotRequestDemand(UserPlantComp(CompNum).Water.SupplyTankDemandARRID) = UserPlantComp(CompNum).Water.SupplyVdotRequest; } if (UserPlantComp(CompNum).Water.CollectsToWaterSystem) { - WaterStorage(UserPlantComp(CompNum).Water.CollectionTankID).VdotAvailSupply(UserPlantComp(CompNum).Water.CollectionTankSupplyARRID) = + DataWater::WaterStorage(UserPlantComp(CompNum).Water.CollectionTankID).VdotAvailSupply(UserPlantComp(CompNum).Water.CollectionTankSupplyARRID) = UserPlantComp(CompNum).Water.CollectedVdot; } @@ -2472,16 +2449,16 @@ namespace UserDefinedComponents { for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { if (UserCoil(CompNum).Air(Loop).OutletNodeNum > 0) { - Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Temp = UserCoil(CompNum).Air(Loop).OutletTemp; - Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).HumRat = UserCoil(CompNum).Air(Loop).OutletHumRat; - Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRate = UserCoil(CompNum).Air(Loop).OutletMassFlowRate; - Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Enthalpy = + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Temp = UserCoil(CompNum).Air(Loop).OutletTemp; + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).HumRat = UserCoil(CompNum).Air(Loop).OutletHumRat; + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRate = UserCoil(CompNum).Air(Loop).OutletMassFlowRate; + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(UserCoil(CompNum).Air(Loop).OutletTemp, UserCoil(CompNum).Air(Loop).OutletHumRat); - Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMinAvail = - Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMinAvail; - Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMaxAvail = - Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMaxAvail; + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMinAvail = + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMinAvail; + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMaxAvail = + DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMaxAvail; } } @@ -2496,16 +2473,16 @@ namespace UserDefinedComponents { UserCoil(CompNum).Loop.CompNum); PlantUtilities::SafeCopyPlantNode(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.OutletNodeNum); // unload Actuators to node data structure - Node(UserCoil(CompNum).Loop.OutletNodeNum).Temp = UserCoil(CompNum).Loop.OutletTemp; + DataLoopNode::Node(UserCoil(CompNum).Loop.OutletNodeNum).Temp = UserCoil(CompNum).Loop.OutletTemp; } if (UserCoil(CompNum).Water.SuppliedByWaterSystem) { - WaterStorage(UserCoil(CompNum).Water.SupplyTankID).VdotRequestDemand(UserCoil(CompNum).Water.SupplyTankDemandARRID) = + DataWater::WaterStorage(UserCoil(CompNum).Water.SupplyTankID).VdotRequestDemand(UserCoil(CompNum).Water.SupplyTankDemandARRID) = UserCoil(CompNum).Water.SupplyVdotRequest; } if (UserCoil(CompNum).Water.CollectsToWaterSystem) { - WaterStorage(UserCoil(CompNum).Water.CollectionTankID).VdotAvailSupply(UserCoil(CompNum).Water.CollectionTankSupplyARRID) = + DataWater::WaterStorage(UserCoil(CompNum).Water.CollectionTankID).VdotAvailSupply(UserCoil(CompNum).Water.CollectionTankSupplyARRID) = UserCoil(CompNum).Water.CollectedVdot; } } @@ -2524,19 +2501,19 @@ namespace UserDefinedComponents { int Loop; - Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.InletMassFlowRate; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.InletMassFlowRate; - Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp; - Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat; - Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.OutletMassFlowRate; - Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Enthalpy = + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.OutletMassFlowRate; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp, UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat); if (UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum > 0) { - Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).SourceAir.OutletTemp; - Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat; - Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).SourceAir.OutletMassFlowRate; - Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Enthalpy = + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).SourceAir.OutletTemp; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).SourceAir.OutletMassFlowRate; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(UserZoneAirHVAC(CompNum).SourceAir.OutletTemp, UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat); } @@ -2552,17 +2529,17 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompNum).Loop(Loop).CompNum); PlantUtilities::SafeCopyPlantNode(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum); // unload Actuators to node data structure - Node(UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).Loop(Loop).OutletTemp; + DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).Loop(Loop).OutletTemp; } } if (UserZoneAirHVAC(CompNum).Water.SuppliedByWaterSystem) { - WaterStorage(UserZoneAirHVAC(CompNum).Water.SupplyTankID).VdotRequestDemand(UserZoneAirHVAC(CompNum).Water.SupplyTankDemandARRID) = + DataWater::WaterStorage(UserZoneAirHVAC(CompNum).Water.SupplyTankID).VdotRequestDemand(UserZoneAirHVAC(CompNum).Water.SupplyTankDemandARRID) = UserZoneAirHVAC(CompNum).Water.SupplyVdotRequest; } if (UserZoneAirHVAC(CompNum).Water.CollectsToWaterSystem) { - WaterStorage(UserZoneAirHVAC(CompNum).Water.CollectionTankID).VdotAvailSupply(UserZoneAirHVAC(CompNum).Water.CollectionTankSupplyARRID) = + DataWater::WaterStorage(UserZoneAirHVAC(CompNum).Water.CollectionTankID).VdotAvailSupply(UserZoneAirHVAC(CompNum).Water.CollectionTankSupplyARRID) = UserZoneAirHVAC(CompNum).Water.CollectedVdot; } } @@ -2578,18 +2555,18 @@ namespace UserDefinedComponents { int Loop; - Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.InletMassFlowRate; + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.InletMassFlowRate; - Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Temp = UserAirTerminal(CompNum).AirLoop.OutletTemp; - Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).HumRat = UserAirTerminal(CompNum).AirLoop.OutletHumRat; - Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.OutletMassFlowRate; - Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Enthalpy = + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Temp = UserAirTerminal(CompNum).AirLoop.OutletTemp; + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).HumRat = UserAirTerminal(CompNum).AirLoop.OutletHumRat; + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.OutletMassFlowRate; + DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(UserAirTerminal(CompNum).AirLoop.OutletTemp, UserAirTerminal(CompNum).AirLoop.OutletHumRat); if (UserAirTerminal(CompNum).SourceAir.OutletNodeNum > 0) { - Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Temp = UserAirTerminal(CompNum).SourceAir.OutletTemp; - Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).HumRat = UserAirTerminal(CompNum).SourceAir.OutletHumRat; - Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).SourceAir.OutletMassFlowRate; - Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Enthalpy = + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Temp = UserAirTerminal(CompNum).SourceAir.OutletTemp; + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).HumRat = UserAirTerminal(CompNum).SourceAir.OutletHumRat; + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).SourceAir.OutletMassFlowRate; + DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(UserAirTerminal(CompNum).SourceAir.OutletTemp, UserAirTerminal(CompNum).SourceAir.OutletHumRat); } @@ -2605,17 +2582,17 @@ namespace UserDefinedComponents { UserAirTerminal(CompNum).Loop(Loop).CompNum); PlantUtilities::SafeCopyPlantNode(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum); // unload Actuators to node data structure - Node(UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum).Temp = UserAirTerminal(CompNum).Loop(Loop).OutletTemp; + DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum).Temp = UserAirTerminal(CompNum).Loop(Loop).OutletTemp; } } if (UserAirTerminal(CompNum).Water.SuppliedByWaterSystem) { - WaterStorage(UserAirTerminal(CompNum).Water.SupplyTankID).VdotRequestDemand(UserAirTerminal(CompNum).Water.SupplyTankDemandARRID) = + DataWater::WaterStorage(UserAirTerminal(CompNum).Water.SupplyTankID).VdotRequestDemand(UserAirTerminal(CompNum).Water.SupplyTankDemandARRID) = UserAirTerminal(CompNum).Water.SupplyVdotRequest; } if (UserAirTerminal(CompNum).Water.CollectsToWaterSystem) { - WaterStorage(UserAirTerminal(CompNum).Water.CollectionTankID).VdotAvailSupply(UserAirTerminal(CompNum).Water.CollectionTankSupplyARRID) = + DataWater::WaterStorage(UserAirTerminal(CompNum).Water.CollectionTankID).VdotAvailSupply(UserAirTerminal(CompNum).Water.CollectionTankSupplyARRID) = UserAirTerminal(CompNum).Water.CollectedVdot; } } From 6fe32b047654313716d056c0045fa64f6d4713c9 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 9 Dec 2019 07:38:44 -0700 Subject: [PATCH 14/86] cleanup locals --- src/EnergyPlus/UserDefinedComponents.cc | 180 +++++++++--------------- 1 file changed, 66 insertions(+), 114 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 154e623feb3..76e0d08ce6f 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -134,7 +134,6 @@ namespace UserDefinedComponents { int CompNum; int ThisLoop; - int Loop; if (GetInput) { GetUserDefinedComponents(); @@ -167,7 +166,7 @@ namespace UserDefinedComponents { InitPlantUserComponent(CompNum, LoopNum, MyLoad); // find loop connection number from LoopNum and LoopSide ThisLoop = 0; - for (Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { if (LoopNum != UserPlantComp(CompNum).Loop(Loop).LoopNum) continue; if (LoopSideNum != UserPlantComp(CompNum).Loop(Loop).LoopSideNum) continue; ThisLoop = Loop; @@ -202,7 +201,7 @@ namespace UserDefinedComponents { } ThisLoop = 0; - for (Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { if (LoopNum != UserPlantComp(CompNum).Loop(Loop).LoopNum) continue; if (LoopSideNum != UserPlantComp(CompNum).Loop(Loop).LoopSideNum) continue; ThisLoop = Loop; @@ -236,8 +235,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - Real64 EnthInlet; - Real64 EnthOutlet; int CompNum; if (GetInput) { @@ -297,19 +294,12 @@ namespace UserDefinedComponents { if (AirLoopNum != -1) { // IF the system is not an equipment of outdoor air unit // determine if heating or cooling on primary air stream - if (DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp) { - HeatingActive = true; - } else { - HeatingActive = false; - } + HeatingActive = DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < + DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp; - EnthInlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); - EnthOutlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); - if (EnthInlet > EnthOutlet) { - CoolingActive = true; - } else { - CoolingActive = false; - } + Real64 EnthInlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); + Real64 EnthOutlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); + CoolingActive = EnthInlet > EnthOutlet; } } @@ -328,11 +318,6 @@ namespace UserDefinedComponents { // RE-ENGINEERED na int CompNum; - int Loop; - Real64 AirMassFlow; - Real64 MinHumRat; - Real64 SpecHumOut; - Real64 SpecHumIn; if (GetInput) { GetUserDefinedComponents(); @@ -368,7 +353,7 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlInitProgramMngr); } if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { PlantUtilities::InitComponentNodes(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMin, UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMax, @@ -395,16 +380,15 @@ namespace UserDefinedComponents { ReportZoneAirUserDefined(CompNum); // calculate delivered capacity - AirMassFlow = + Real64 AirMassFlow = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate); // calculate sensible load met using delta enthalpy at a constant (minimum) humidity ratio) - MinHumRat = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); + Real64 MinHumRat = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); SensibleOutputProvided = AirMassFlow * (Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); - // CR9155 Remove specific humidity calculations - SpecHumOut = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat; - SpecHumIn = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; + Real64 SpecHumOut = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat; + Real64 SpecHumIn = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; LatentOutputProvided = AirMassFlow * (SpecHumOut - SpecHumIn); // Latent rate, kg/s (dehumid = negative) } @@ -422,7 +406,6 @@ namespace UserDefinedComponents { // simulation call for generic air terminal int CompNum; - int Loop; if (GetInput) { GetUserDefinedComponents(); @@ -458,7 +441,7 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlInitProgramMngr); } if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { PlantUtilities::InitComponentNodes(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMin, UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMax, @@ -496,43 +479,26 @@ namespace UserDefinedComponents { static ObjexxFCL::gio::Fmt fmtLD("*"); - static bool ErrorsFound(false); + bool ErrorsFound(false); int NumAlphas; // Number of elements in the alpha array int NumNums; // Number of elements in the numeric array int IOStat; // IO Status when calling get input subroutine - static int MaxNumAlphas(0); // argument for call to GetObjectDefMaxArgs - static int MaxNumNumbers(0); // argument for call to GetObjectDefMaxArgs static int TotalArgs(0); // argument for call to GetObjectDefMaxArgs Array1D_string cAlphaFieldNames; - Array1D_string cNumericFieldNames; - Array1D_bool lNumericFieldBlanks; Array1D_bool lAlphaFieldBlanks; Array1D_string cAlphaArgs; Array1D rNumericArgs; std::string cCurrentModuleObject; - int CompLoop; - int ConnectionLoop; - int NumPlantConnections; - int NumAirConnections; std::string LoopStr; - int aArgCount; - int StackMngrNum; static bool lDummy; // Fix Changed to static: Passed to SetupEMSActuator as source of persistent Reference - int MgrCountTest; - int CtrlZone; // controlled zone do loop index - int SupAirIn; // controlled zone supply air inlet index cCurrentModuleObject = "PlantComponent:UserDefined"; inputProcessor->getObjectDefMaxArgs(cCurrentModuleObject, TotalArgs, NumAlphas, NumNums); - MaxNumNumbers = NumNums; - MaxNumAlphas = NumAlphas; - cAlphaFieldNames.allocate(MaxNumAlphas); - cAlphaArgs.allocate(MaxNumAlphas); - lAlphaFieldBlanks.dimension(MaxNumAlphas, false); - cNumericFieldNames.allocate(MaxNumNumbers); - rNumericArgs.dimension(MaxNumNumbers, 0.0); - lNumericFieldBlanks.dimension(MaxNumNumbers, false); + cAlphaFieldNames.allocate(NumAlphas); + cAlphaArgs.allocate(NumAlphas); + lAlphaFieldBlanks.dimension(NumAlphas, false); + rNumericArgs.dimension(NumNums, 0.0); // need to make sure GetEMSInput has run... @@ -541,7 +507,7 @@ namespace UserDefinedComponents { if (NumUserPlantComps > 0) { UserPlantComp.allocate(NumUserPlantComps); CheckUserPlantCompName.dimension(NumUserPlantComps, true); - for (CompLoop = 1; CompLoop <= NumUserPlantComps; ++CompLoop) { + for (int CompLoop = 1; CompLoop <= NumUserPlantComps; ++CompLoop) { inputProcessor->getObjectItem(cCurrentModuleObject, CompLoop, cAlphaArgs, @@ -549,17 +515,17 @@ namespace UserDefinedComponents { rNumericArgs, NumNums, IOStat, - lNumericFieldBlanks, + _, lAlphaFieldBlanks, cAlphaFieldNames, - cNumericFieldNames); + _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); UserPlantComp(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserPlantComp(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -570,14 +536,14 @@ namespace UserDefinedComponents { } } - NumPlantConnections = std::floor(rNumericArgs(1)); + int NumPlantConnections = std::floor(rNumericArgs(1)); if ((NumPlantConnections >= 1) && (NumPlantConnections <= 4)) { UserPlantComp(CompLoop).Loop.allocate(NumPlantConnections); UserPlantComp(CompLoop).NumPlantConnections = NumPlantConnections; - for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { + for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { LoopStr = General::RoundSigDigits(ConnectionLoop); - aArgCount = (ConnectionLoop - 1) * 6 + 3; + int aArgCount = (ConnectionLoop - 1) * 6 + 3; UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, @@ -639,7 +605,7 @@ namespace UserDefinedComponents { // find program manager for initial setup, begin environment and sizing of this plant connection if (!lAlphaFieldBlanks(aArgCount + 4)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 4), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 4), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -652,7 +618,7 @@ namespace UserDefinedComponents { // find program to call for model simulations for just this plant connection if (!lAlphaFieldBlanks(aArgCount + 5)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 5), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(aArgCount + 5), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -890,9 +856,9 @@ namespace UserDefinedComponents { } // make sure user has entered at least some erl program managers to actually calculate something - MgrCountTest = 0; + int MgrCountTest = 0; if (UserPlantComp(CompLoop).ErlSimProgramMngr > 0) MgrCountTest = 1; - for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { + for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { if (UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlInitProgramMngr > 0) ++MgrCountTest; if (UserPlantComp(CompLoop).Loop(ConnectionLoop).ErlSimProgramMngr > 0) ++MgrCountTest; } @@ -913,7 +879,7 @@ namespace UserDefinedComponents { if (NumUserCoils > 0) { UserCoil.allocate(NumUserCoils); CheckUserCoilName.dimension(NumUserCoils, true); - for (CompLoop = 1; CompLoop <= NumUserCoils; ++CompLoop) { + for (int CompLoop = 1; CompLoop <= NumUserCoils; ++CompLoop) { inputProcessor->getObjectItem(cCurrentModuleObject, CompLoop, cAlphaArgs, @@ -921,10 +887,10 @@ namespace UserDefinedComponents { rNumericArgs, NumNums, IOStat, - lNumericFieldBlanks, + _, lAlphaFieldBlanks, cAlphaFieldNames, - cNumericFieldNames); + _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); // ErrorsFound will be set to True if problem was found, left untouched otherwise @@ -934,7 +900,7 @@ namespace UserDefinedComponents { // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -947,7 +913,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -958,12 +924,12 @@ namespace UserDefinedComponents { } } - NumAirConnections = std::floor(rNumericArgs(1)); + int NumAirConnections = std::floor(rNumericArgs(1)); if ((NumAirConnections >= 1) && (NumAirConnections <= 2)) { UserCoil(CompLoop).Air.allocate(NumAirConnections); UserCoil(CompLoop).NumAirConnections = NumAirConnections; - for (ConnectionLoop = 1; ConnectionLoop <= NumAirConnections; ++ConnectionLoop) { - aArgCount = (ConnectionLoop - 1) * 2 + 4; + for (int ConnectionLoop = 1; ConnectionLoop <= NumAirConnections; ++ConnectionLoop) { + int aArgCount = (ConnectionLoop - 1) * 2 + 4; UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, @@ -1220,7 +1186,7 @@ namespace UserDefinedComponents { if (NumUserZoneAir > 0) { UserZoneAirHVAC.allocate(NumUserZoneAir); CheckUserZoneAirName.dimension(NumUserZoneAir, true); - for (CompLoop = 1; CompLoop <= NumUserZoneAir; ++CompLoop) { + for (int CompLoop = 1; CompLoop <= NumUserZoneAir; ++CompLoop) { inputProcessor->getObjectItem(cCurrentModuleObject, CompLoop, cAlphaArgs, @@ -1228,16 +1194,16 @@ namespace UserDefinedComponents { rNumericArgs, NumNums, IOStat, - lNumericFieldBlanks, + _, lAlphaFieldBlanks, cAlphaFieldNames, - cNumericFieldNames); + _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); UserZoneAirHVAC(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1250,7 +1216,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1405,12 +1371,12 @@ namespace UserDefinedComponents { // CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(6),cAlphaArgs(7),'Air Nodes') } - NumPlantConnections = std::floor(rNumericArgs(1)); + int NumPlantConnections = std::floor(rNumericArgs(1)); UserZoneAirHVAC(CompLoop).NumPlantConnections = NumPlantConnections; if ((NumPlantConnections >= 1) && (NumPlantConnections <= 3)) { UserZoneAirHVAC(CompLoop).Loop.allocate(NumPlantConnections); - for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { - aArgCount = (ConnectionLoop - 1) * 2 + 8; + for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { + int aArgCount = (ConnectionLoop - 1) * 2 + 8; UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, @@ -1594,7 +1560,7 @@ namespace UserDefinedComponents { if (NumUserAirTerminals > 0) { UserAirTerminal.allocate(NumUserAirTerminals); CheckUserAirTerminal.dimension(NumUserAirTerminals, true); - for (CompLoop = 1; CompLoop <= NumUserAirTerminals; ++CompLoop) { + for (int CompLoop = 1; CompLoop <= NumUserAirTerminals; ++CompLoop) { inputProcessor->getObjectItem(cCurrentModuleObject, CompLoop, cAlphaArgs, @@ -1602,16 +1568,16 @@ namespace UserDefinedComponents { rNumericArgs, NumNums, IOStat, - lNumericFieldBlanks, + _, lAlphaFieldBlanks, cAlphaFieldNames, - cNumericFieldNames); + _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); UserAirTerminal(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1624,7 +1590,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1730,9 +1696,9 @@ namespace UserDefinedComponents { } // Fill the Zone Equipment data with the inlet node number of this unit. - for (CtrlZone = 1; CtrlZone <= DataGlobals::NumOfZones; ++CtrlZone) { + for (int CtrlZone = 1; CtrlZone <= DataGlobals::NumOfZones; ++CtrlZone) { if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; - for (SupAirIn = 1; SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { + for (int SupAirIn = 1; SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { if (DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError("Error in connecting a terminal unit to a zone"); @@ -1820,12 +1786,12 @@ namespace UserDefinedComponents { // CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(6),cAlphaArgs(7),'Air Nodes') } - NumPlantConnections = std::floor(rNumericArgs(1)); + int NumPlantConnections = std::floor(rNumericArgs(1)); UserAirTerminal(CompLoop).NumPlantConnections = NumPlantConnections; if ((NumPlantConnections >= 1) && (NumPlantConnections <= 2)) { UserAirTerminal(CompLoop).Loop.allocate(NumPlantConnections); - for (ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { - aArgCount = (ConnectionLoop - 1) * 2 + 8; + for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { + int aArgCount = (ConnectionLoop - 1) * 2 + 8; UserAirTerminal(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), ErrorsFound, cCurrentModuleObject, @@ -2019,8 +1985,6 @@ namespace UserDefinedComponents { static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyEnvrnFlag; // environment flag static Array1D_bool MyFlag; - int ConnectionNum; - bool errFlag; if (MyOneTimeFlag) { MyFlag.allocate(NumUserPlantComps); @@ -2032,8 +1996,8 @@ namespace UserDefinedComponents { if (MyFlag(CompNum)) { // locate the connections to the plant loops - for (ConnectionNum = 1; ConnectionNum <= UserPlantComp(CompNum).NumPlantConnections; ++ConnectionNum) { - errFlag = false; + for (int ConnectionNum = 1; ConnectionNum <= UserPlantComp(CompNum).NumPlantConnections; ++ConnectionNum) { + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserPlantComp(CompNum).Name, DataPlant::TypeOf_PlantComponentUserDefined, UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum, @@ -2105,8 +2069,6 @@ namespace UserDefinedComponents { static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyFlag; - bool errFlag; - int Loop; if (MyOneTimeFlag) { MyFlag.dimension(NumUserCoils, true); @@ -2115,7 +2077,7 @@ namespace UserDefinedComponents { if (MyFlag(CompNum)) { if (UserCoil(CompNum).PlantIsConnected) { - errFlag = false; + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserCoil(CompNum).Name, DataPlant::TypeOf_CoilUserDefined, UserCoil(CompNum).Loop.LoopNum, @@ -2144,7 +2106,7 @@ namespace UserDefinedComponents { } // fill internal variable targets - for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { + for (int Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { UserCoil(CompNum).Air(Loop).InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, @@ -2187,8 +2149,6 @@ namespace UserDefinedComponents { static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyFlag; - bool errFlag; - int Loop; if (MyOneTimeFlag) { MyFlag.dimension(NumUserZoneAir, true); @@ -2197,8 +2157,8 @@ namespace UserDefinedComponents { if (MyFlag(CompNum)) { if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { - errFlag = false; + for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserZoneAirHVAC(CompNum).Name, DataPlant::TypeOf_ZoneHVACAirUserDefined, UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, @@ -2284,8 +2244,6 @@ namespace UserDefinedComponents { static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyFlag; - bool errFlag; - int Loop; if (MyOneTimeFlag) { MyFlag.dimension(NumUserAirTerminals, true); @@ -2294,8 +2252,8 @@ namespace UserDefinedComponents { if (MyFlag(CompNum)) { if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { - errFlag = false; + for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserAirTerminal(CompNum).Name, DataPlant::TypeOf_AirTerminalUserDefined, UserAirTerminal(CompNum).Loop(Loop).LoopNum, @@ -2445,9 +2403,7 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - int Loop; - - for (Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { + for (int Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { if (UserCoil(CompNum).Air(Loop).OutletNodeNum > 0) { DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Temp = UserCoil(CompNum).Air(Loop).OutletTemp; DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).HumRat = UserCoil(CompNum).Air(Loop).OutletHumRat; @@ -2499,8 +2455,6 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - int Loop; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.InletMassFlowRate; DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp; @@ -2518,7 +2472,7 @@ namespace UserDefinedComponents { } if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { // make mass flow requests PlantUtilities::SetComponentFlowRate(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateRequest, UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, @@ -2553,8 +2507,6 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - int Loop; - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.InletMassFlowRate; DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Temp = UserAirTerminal(CompNum).AirLoop.OutletTemp; @@ -2571,7 +2523,7 @@ namespace UserDefinedComponents { } if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { // make mass flow requests PlantUtilities::SetComponentFlowRate(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateRequest, UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, From 6da152f3bd793e0c73cf33d77ebc6a048d0584e6 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 9 Dec 2019 07:47:47 -0700 Subject: [PATCH 15/86] cleanup locals --- src/EnergyPlus/UserDefinedComponents.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 76e0d08ce6f..f251c19abd6 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -2216,7 +2216,7 @@ namespace UserDefinedComponents { } if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { UserZoneAirHVAC(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, @@ -2311,7 +2311,7 @@ namespace UserDefinedComponents { } if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { + for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { UserAirTerminal(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, @@ -2616,8 +2616,7 @@ namespace UserDefinedComponents { } } - void - GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject) + void GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject) { // SUBROUTINE INFORMATION: From 8b11996dcd46cff146d903d5e2fc112fcf00c14a Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 9 Dec 2019 08:05:42 -0700 Subject: [PATCH 16/86] cleanup statics --- src/EnergyPlus/UserDefinedComponents.cc | 52 +++++-------------------- src/EnergyPlus/UserDefinedComponents.hh | 12 ++++-- 2 files changed, 17 insertions(+), 47 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index f251c19abd6..59b7b8dbfb0 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -483,7 +483,7 @@ namespace UserDefinedComponents { int NumAlphas; // Number of elements in the alpha array int NumNums; // Number of elements in the numeric array int IOStat; // IO Status when calling get input subroutine - static int TotalArgs(0); // argument for call to GetObjectDefMaxArgs + int TotalArgs; // argument for call to GetObjectDefMaxArgs Array1D_string cAlphaFieldNames; Array1D_bool lAlphaFieldBlanks; Array1D_string cAlphaArgs; @@ -1982,19 +1982,7 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitPlantUserComponent"); - static bool MyOneTimeFlag(true); // one time flag - static Array1D_bool MyEnvrnFlag; // environment flag - static Array1D_bool MyFlag; - - if (MyOneTimeFlag) { - MyFlag.allocate(NumUserPlantComps); - MyEnvrnFlag.allocate(NumUserPlantComps); - MyFlag = true; - MyEnvrnFlag = true; - MyOneTimeFlag = false; - } - - if (MyFlag(CompNum)) { + if (UserPlantComp(CompNum).myOneTimeFlag) { // locate the connections to the plant loops for (int ConnectionNum = 1; ConnectionNum <= UserPlantComp(CompNum).NumPlantConnections; ++ConnectionNum) { bool errFlag = false; @@ -2028,7 +2016,7 @@ namespace UserDefinedComponents { .HowLoadServed = UserPlantComp(CompNum).Loop(ConnectionNum).HowLoadServed; } - MyFlag(CompNum) = false; + UserPlantComp(CompNum).myOneTimeFlag = false; } if (LoopNum <= 0 || LoopNum > UserPlantComp(CompNum).NumPlantConnections) return; @@ -2067,15 +2055,7 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitCoilUserDefined"); - static bool MyOneTimeFlag(true); // one time flag - static Array1D_bool MyFlag; - - if (MyOneTimeFlag) { - MyFlag.dimension(NumUserCoils, true); - MyOneTimeFlag = false; - } - - if (MyFlag(CompNum)) { + if (UserCoil(CompNum).myOneTimeFlag) { if (UserCoil(CompNum).PlantIsConnected) { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(UserCoil(CompNum).Name, @@ -2102,7 +2082,7 @@ namespace UserDefinedComponents { .Comp(UserCoil(CompNum).Loop.CompNum) .HowLoadServed = UserCoil(CompNum).Loop.HowLoadServed; } - MyFlag(CompNum) = false; + UserCoil(CompNum).myOneTimeFlag = false; } // fill internal variable targets @@ -2147,15 +2127,7 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitZoneAirUserDefined"); - static bool MyOneTimeFlag(true); // one time flag - static Array1D_bool MyFlag; - - if (MyOneTimeFlag) { - MyFlag.dimension(NumUserZoneAir, true); - MyOneTimeFlag = false; - } - - if (MyFlag(CompNum)) { + if (UserZoneAirHVAC(CompNum).myOneTimeFlag) { if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { bool errFlag = false; @@ -2188,6 +2160,7 @@ namespace UserDefinedComponents { .HowLoadServed = UserZoneAirHVAC(CompNum).Loop(Loop).HowLoadServed; } } + UserZoneAirHVAC(CompNum).myOneTimeFlag = false; } // fill internal variable targets UserZoneAirHVAC(CompNum).RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; @@ -2242,15 +2215,7 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitAirTerminalUserDefined"); - static bool MyOneTimeFlag(true); // one time flag - static Array1D_bool MyFlag; - - if (MyOneTimeFlag) { - MyFlag.dimension(NumUserAirTerminals, true); - MyOneTimeFlag = false; - } - - if (MyFlag(CompNum)) { + if (UserAirTerminal(CompNum).myOneTimeFlag) { if (UserAirTerminal(CompNum).NumPlantConnections > 0) { for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { bool errFlag = false; @@ -2283,6 +2248,7 @@ namespace UserDefinedComponents { .HowLoadServed = UserAirTerminal(CompNum).Loop(Loop).HowLoadServed; } } + UserAirTerminal(CompNum).myOneTimeFlag = false; } // fill internal variable targets UserAirTerminal(CompNum).RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index 52255eba2d7..8faf0044b0f 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -182,9 +182,10 @@ namespace UserDefinedComponents { AirConnectionStruct Air; WaterUseTankConnectionStruct Water; ZoneInternalGainsStruct Zone; + bool myOneTimeFlag; // Default Constructor - UserPlantComponentStruct() : ErlSimProgramMngr(0), NumPlantConnections(0) + UserPlantComponentStruct() : ErlSimProgramMngr(0), NumPlantConnections(0), myOneTimeFlag(true) { } }; @@ -201,9 +202,10 @@ namespace UserDefinedComponents { PlantConnectionStruct Loop; WaterUseTankConnectionStruct Water; ZoneInternalGainsStruct Zone; + bool myOneTimeFlag; // Default Constructor - UserCoilComponentStruct() : ErlSimProgramMngr(0), ErlInitProgramMngr(0), NumAirConnections(0), PlantIsConnected(false) + UserCoilComponentStruct() : ErlSimProgramMngr(0), ErlInitProgramMngr(0), NumAirConnections(0), PlantIsConnected(false), myOneTimeFlag(true) { } }; @@ -224,11 +226,12 @@ namespace UserDefinedComponents { Real64 RemainingOutputToCoolingSP; // sensible load remaining for device, negative means cooling [W] Real64 RemainingOutputReqToHumidSP; // latent load remaining for device, to humidification setpoint [kg/s] Real64 RemainingOutputReqToDehumidSP; // latent load remaining for device, Negative means dehumidify [kg/s] + bool myOneTimeFlag; // Default Constructor UserZoneHVACForcedAirComponentStruct() : ErlSimProgramMngr(0), ErlInitProgramMngr(0), NumPlantConnections(0), RemainingOutputToHeatingSP(0.0), RemainingOutputToCoolingSP(0.0), - RemainingOutputReqToHumidSP(0.0), RemainingOutputReqToDehumidSP(0.0) + RemainingOutputReqToHumidSP(0.0), RemainingOutputReqToDehumidSP(0.0), myOneTimeFlag(true) { } }; @@ -251,11 +254,12 @@ namespace UserDefinedComponents { Real64 RemainingOutputToCoolingSP; // sensible load remaining for device, negative means cooling [W] Real64 RemainingOutputReqToHumidSP; // latent load remaining for device, to humidification setpoint [kg/s] Real64 RemainingOutputReqToDehumidSP; // latent load remaining for device, Negative means dehumidify [kg/s] + bool myOneTimeFlag; // Default Constructor UserAirTerminalComponentStruct() : ActualCtrlZoneNum(0), ADUNum(0), ErlSimProgramMngr(0), ErlInitProgramMngr(0), NumPlantConnections(0), RemainingOutputToHeatingSP(0.0), - RemainingOutputToCoolingSP(0.0), RemainingOutputReqToHumidSP(0.0), RemainingOutputReqToDehumidSP(0.0) + RemainingOutputToCoolingSP(0.0), RemainingOutputReqToHumidSP(0.0), RemainingOutputReqToDehumidSP(0.0), myOneTimeFlag(true) { } }; From 5f8dc26403d352a5d1bf54a0baa791afcc145c36 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 9 Dec 2019 08:34:11 -0700 Subject: [PATCH 17/86] functions to members --- src/EnergyPlus/UserDefinedComponents.cc | 642 ++++++++++++------------ src/EnergyPlus/UserDefinedComponents.hh | 45 +- 2 files changed, 344 insertions(+), 343 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 59b7b8dbfb0..3e8b23f48a6 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -163,7 +163,7 @@ namespace UserDefinedComponents { } bool anyEMSRan; if (InitLoopEquip || DataGlobals::BeginEnvrnFlag) { - InitPlantUserComponent(CompNum, LoopNum, MyLoad); + UserPlantComp(CompNum).InitPlantUserComponent(LoopNum, MyLoad); // find loop connection number from LoopNum and LoopSide ThisLoop = 0; for (int Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { @@ -207,7 +207,7 @@ namespace UserDefinedComponents { ThisLoop = Loop; } - InitPlantUserComponent(CompNum, ThisLoop, MyLoad); + UserPlantComp(CompNum).InitPlantUserComponent(ThisLoop, MyLoad); if (ThisLoop > 0) { if (UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr > 0) { @@ -219,7 +219,7 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).ErlSimProgramMngr); } - ReportPlantUserComponent(CompNum, ThisLoop); + UserPlantComp(CompNum).ReportPlantUserComponent(ThisLoop); } void SimCoilUserDefined(std::string const &EquipName, // user name for component @@ -284,13 +284,13 @@ namespace UserDefinedComponents { } } - InitCoilUserDefined(CompNum); + UserCoil(CompNum).InitCoilUserDefined(); if (UserCoil(CompNum).ErlSimProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserCoil(CompNum).ErlSimProgramMngr); } - ReportCoilUserDefined(CompNum); + UserCoil(CompNum).ReportCoilUserDefined(); if (AirLoopNum != -1) { // IF the system is not an equipment of outdoor air unit // determine if heating or cooling on primary air stream @@ -347,7 +347,7 @@ namespace UserDefinedComponents { } bool anyEMSRan; if (DataGlobals::BeginEnvrnFlag) { - InitZoneAirUserDefined(CompNum, ZoneNum); + UserZoneAirHVAC(CompNum).InitZoneAirUserDefined(ZoneNum); if (UserZoneAirHVAC(CompNum).ErlInitProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlInitProgramMngr); @@ -371,13 +371,13 @@ namespace UserDefinedComponents { } // BeginEnvrnFlag - InitZoneAirUserDefined(CompNum, ZoneNum); + UserZoneAirHVAC(CompNum).InitZoneAirUserDefined(ZoneNum); if (UserZoneAirHVAC(CompNum).ErlSimProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlSimProgramMngr); } - ReportZoneAirUserDefined(CompNum); + UserZoneAirHVAC(CompNum).ReportZoneAirUserDefined(); // calculate delivered capacity Real64 AirMassFlow = @@ -435,7 +435,7 @@ namespace UserDefinedComponents { } bool anyEMSRan; if (DataGlobals::BeginEnvrnFlag) { - InitAirTerminalUserDefined(CompNum, ZoneNum); + UserAirTerminal(CompNum).InitAirTerminalUserDefined(ZoneNum); if (UserAirTerminal(CompNum).ErlInitProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlInitProgramMngr); @@ -459,13 +459,13 @@ namespace UserDefinedComponents { } // BeginEnvrnFlag - InitAirTerminalUserDefined(CompNum, ZoneNum); + UserAirTerminal(CompNum).InitAirTerminalUserDefined(ZoneNum); if (UserAirTerminal(CompNum).ErlSimProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlSimProgramMngr); } - ReportAirTerminalUserDefined(CompNum); + UserAirTerminal(CompNum).ReportAirTerminalUserDefined(); } void GetUserDefinedComponents() @@ -1972,7 +1972,7 @@ namespace UserDefinedComponents { } } - void InitPlantUserComponent(int const CompNum, int const LoopNum, Real64 const MyLoad) + void UserPlantComponentStruct::InitPlantUserComponent(int const LoopNum, Real64 const MyLoad) { // SUBROUTINE INFORMATION: // AUTHOR @@ -1982,69 +1982,69 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitPlantUserComponent"); - if (UserPlantComp(CompNum).myOneTimeFlag) { + if (this->myOneTimeFlag) { // locate the connections to the plant loops - for (int ConnectionNum = 1; ConnectionNum <= UserPlantComp(CompNum).NumPlantConnections; ++ConnectionNum) { + for (int ConnectionNum = 1; ConnectionNum <= this->NumPlantConnections; ++ConnectionNum) { bool errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(UserPlantComp(CompNum).Name, + PlantUtilities::ScanPlantLoopsForObject(this->Name, DataPlant::TypeOf_PlantComponentUserDefined, - UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum, - UserPlantComp(CompNum).Loop(ConnectionNum).LoopSideNum, - UserPlantComp(CompNum).Loop(ConnectionNum).BranchNum, - UserPlantComp(CompNum).Loop(ConnectionNum).CompNum, + this->Loop(ConnectionNum).LoopNum, + this->Loop(ConnectionNum).LoopSideNum, + this->Loop(ConnectionNum).BranchNum, + this->Loop(ConnectionNum).CompNum, errFlag, _, _, _, - UserPlantComp(CompNum).Loop(ConnectionNum).InletNodeNum); + this->Loop(ConnectionNum).InletNodeNum); if (errFlag) { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum) - .LoopSide(UserPlantComp(CompNum).Loop(ConnectionNum).LoopSideNum) - .Branch(UserPlantComp(CompNum).Loop(ConnectionNum).BranchNum) - .Comp(UserPlantComp(CompNum).Loop(ConnectionNum).CompNum) - .FlowPriority = UserPlantComp(CompNum).Loop(ConnectionNum).FlowPriority; + DataPlant::PlantLoop(this->Loop(ConnectionNum).LoopNum) + .LoopSide(this->Loop(ConnectionNum).LoopSideNum) + .Branch(this->Loop(ConnectionNum).BranchNum) + .Comp(this->Loop(ConnectionNum).CompNum) + .FlowPriority = this->Loop(ConnectionNum).FlowPriority; // set user input for how loads served - DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(ConnectionNum).LoopNum) - .LoopSide(UserPlantComp(CompNum).Loop(ConnectionNum).LoopSideNum) - .Branch(UserPlantComp(CompNum).Loop(ConnectionNum).BranchNum) - .Comp(UserPlantComp(CompNum).Loop(ConnectionNum).CompNum) - .HowLoadServed = UserPlantComp(CompNum).Loop(ConnectionNum).HowLoadServed; + DataPlant::PlantLoop(this->Loop(ConnectionNum).LoopNum) + .LoopSide(this->Loop(ConnectionNum).LoopSideNum) + .Branch(this->Loop(ConnectionNum).BranchNum) + .Comp(this->Loop(ConnectionNum).CompNum) + .HowLoadServed = this->Loop(ConnectionNum).HowLoadServed; } - UserPlantComp(CompNum).myOneTimeFlag = false; + this->myOneTimeFlag = false; } - if (LoopNum <= 0 || LoopNum > UserPlantComp(CompNum).NumPlantConnections) return; + if (LoopNum <= 0 || LoopNum > this->NumPlantConnections) return; // fill internal variable targets - UserPlantComp(CompNum).Loop(LoopNum).MyLoad = MyLoad; - UserPlantComp(CompNum).Loop(LoopNum).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, - DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, - DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, + this->Loop(LoopNum).MyLoad = MyLoad; + this->Loop(LoopNum).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->Loop(LoopNum).LoopNum).FluidName, + DataLoopNode::Node(this->Loop(LoopNum).InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop(LoopNum).LoopNum).FluidIndex, RoutineName); - UserPlantComp(CompNum).Loop(LoopNum).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidName, - DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp, - DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum).FluidIndex, + this->Loop(LoopNum).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->Loop(LoopNum).LoopNum).FluidName, + DataLoopNode::Node(this->Loop(LoopNum).InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop(LoopNum).LoopNum).FluidIndex, RoutineName); - UserPlantComp(CompNum).Loop(LoopNum).InletMassFlowRate = DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).MassFlowRate; - UserPlantComp(CompNum).Loop(LoopNum).InletTemp = DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum).Temp; - if (UserPlantComp(CompNum).Air.InletNodeNum > 0) { - UserPlantComp(CompNum).Air.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW( - DataEnvironment::OutBaroPress, DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp, DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, RoutineName); - UserPlantComp(CompNum).Air.InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat, DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp); - UserPlantComp(CompNum).Air.InletTemp = DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).Temp; - UserPlantComp(CompNum).Air.InletMassFlowRate = DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).MassFlowRate; - UserPlantComp(CompNum).Air.InletHumRat = DataLoopNode::Node(UserPlantComp(CompNum).Air.InletNodeNum).HumRat; + this->Loop(LoopNum).InletMassFlowRate = DataLoopNode::Node(this->Loop(LoopNum).InletNodeNum).MassFlowRate; + this->Loop(LoopNum).InletTemp = DataLoopNode::Node(this->Loop(LoopNum).InletNodeNum).Temp; + if (this->Air.InletNodeNum > 0) { + this->Air.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW( + DataEnvironment::OutBaroPress, DataLoopNode::Node(this->Air.InletNodeNum).Temp, DataLoopNode::Node(this->Air.InletNodeNum).HumRat, RoutineName); + this->Air.InletCp = + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->Air.InletNodeNum).HumRat, DataLoopNode::Node(this->Air.InletNodeNum).Temp); + this->Air.InletTemp = DataLoopNode::Node(this->Air.InletNodeNum).Temp; + this->Air.InletMassFlowRate = DataLoopNode::Node(this->Air.InletNodeNum).MassFlowRate; + this->Air.InletHumRat = DataLoopNode::Node(this->Air.InletNodeNum).HumRat; } } - void InitCoilUserDefined(int const CompNum) + void UserCoilComponentStruct::InitCoilUserDefined() { // SUBROUTINE INFORMATION: @@ -2055,65 +2055,65 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitCoilUserDefined"); - if (UserCoil(CompNum).myOneTimeFlag) { - if (UserCoil(CompNum).PlantIsConnected) { + if (this->myOneTimeFlag) { + if (this->PlantIsConnected) { bool errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(UserCoil(CompNum).Name, + PlantUtilities::ScanPlantLoopsForObject(this->Name, DataPlant::TypeOf_CoilUserDefined, - UserCoil(CompNum).Loop.LoopNum, - UserCoil(CompNum).Loop.LoopSideNum, - UserCoil(CompNum).Loop.BranchNum, - UserCoil(CompNum).Loop.CompNum, + this->Loop.LoopNum, + this->Loop.LoopSideNum, + this->Loop.BranchNum, + this->Loop.CompNum, errFlag); if (errFlag) { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum) - .LoopSide(UserCoil(CompNum).Loop.LoopSideNum) - .Branch(UserCoil(CompNum).Loop.BranchNum) - .Comp(UserCoil(CompNum).Loop.CompNum) - .FlowPriority = UserCoil(CompNum).Loop.FlowPriority; + DataPlant::PlantLoop(this->Loop.LoopNum) + .LoopSide(this->Loop.LoopSideNum) + .Branch(this->Loop.BranchNum) + .Comp(this->Loop.CompNum) + .FlowPriority = this->Loop.FlowPriority; // set user input for how loads served - DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum) - .LoopSide(UserCoil(CompNum).Loop.LoopSideNum) - .Branch(UserCoil(CompNum).Loop.BranchNum) - .Comp(UserCoil(CompNum).Loop.CompNum) - .HowLoadServed = UserCoil(CompNum).Loop.HowLoadServed; + DataPlant::PlantLoop(this->Loop.LoopNum) + .LoopSide(this->Loop.LoopSideNum) + .Branch(this->Loop.BranchNum) + .Comp(this->Loop.CompNum) + .HowLoadServed = this->Loop.HowLoadServed; } - UserCoil(CompNum).myOneTimeFlag = false; + this->myOneTimeFlag = false; } // fill internal variable targets - for (int Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { - UserCoil(CompNum).Air(Loop).InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp, - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, - RoutineName); - - UserCoil(CompNum).Air(Loop).InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat, DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp); - UserCoil(CompNum).Air(Loop).InletTemp = DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).Temp; - UserCoil(CompNum).Air(Loop).InletMassFlowRate = DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRate; - UserCoil(CompNum).Air(Loop).InletHumRat = DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).HumRat; + for (int loop = 1; loop <= this->NumAirConnections; ++loop) { + this->Air(loop).InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(this->Air(loop).InletNodeNum).Temp, + DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat, + RoutineName); + + this->Air(loop).InletCp = + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat, DataLoopNode::Node(this->Air(loop).InletNodeNum).Temp); + this->Air(loop).InletTemp = DataLoopNode::Node(this->Air(loop).InletNodeNum).Temp; + this->Air(loop).InletMassFlowRate = DataLoopNode::Node(this->Air(loop).InletNodeNum).MassFlowRate; + this->Air(loop).InletHumRat = DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat; } - if (UserCoil(CompNum).PlantIsConnected) { - UserCoil(CompNum).Loop.InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, - DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, - DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, + if (this->PlantIsConnected) { + this->Loop.InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->Loop.LoopNum).FluidName, + DataLoopNode::Node(this->Loop.InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop.LoopNum).FluidIndex, RoutineName); - UserCoil(CompNum).Loop.InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidName, - DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).Temp, - DataPlant::PlantLoop(UserCoil(CompNum).Loop.LoopNum).FluidIndex, + this->Loop.InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->Loop.LoopNum).FluidName, + DataLoopNode::Node(this->Loop.InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop.LoopNum).FluidIndex, RoutineName); - UserCoil(CompNum).Loop.InletTemp = DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).Temp; - UserCoil(CompNum).Loop.InletMassFlowRate = DataLoopNode::Node(UserCoil(CompNum).Loop.InletNodeNum).MassFlowRate; + this->Loop.InletTemp = DataLoopNode::Node(this->Loop.InletNodeNum).Temp; + this->Loop.InletMassFlowRate = DataLoopNode::Node(this->Loop.InletNodeNum).MassFlowRate; } } - void InitZoneAirUserDefined(int const CompNum, int const ZoneNum) + void UserZoneHVACForcedAirComponentStruct::InitZoneAirUserDefined(int const ZoneNum) { // SUBROUTINE INFORMATION: @@ -2127,84 +2127,84 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitZoneAirUserDefined"); - if (UserZoneAirHVAC(CompNum).myOneTimeFlag) { - if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { + if (this->myOneTimeFlag) { + if (this->NumPlantConnections > 0) { + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { bool errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(UserZoneAirHVAC(CompNum).Name, + PlantUtilities::ScanPlantLoopsForObject(this->Name, DataPlant::TypeOf_ZoneHVACAirUserDefined, - UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, - UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum, - UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, - UserZoneAirHVAC(CompNum).Loop(Loop).CompNum, + this->Loop(loop).LoopNum, + this->Loop(loop).LoopSideNum, + this->Loop(loop).BranchNum, + this->Loop(loop).CompNum, errFlag, _, _, _, - UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum); + this->Loop(loop).InletNodeNum); if (errFlag) { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum) - .LoopSide(UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum) - .Branch(UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum) - .Comp(UserZoneAirHVAC(CompNum).Loop(Loop).CompNum) - .FlowPriority = UserZoneAirHVAC(CompNum).Loop(Loop).FlowPriority; + DataPlant::PlantLoop(this->Loop(loop).LoopNum) + .LoopSide(this->Loop(loop).LoopSideNum) + .Branch(this->Loop(loop).BranchNum) + .Comp(this->Loop(loop).CompNum) + .FlowPriority = this->Loop(loop).FlowPriority; // set user input for how loads served - DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum) - .LoopSide(UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum) - .Branch(UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum) - .Comp(UserZoneAirHVAC(CompNum).Loop(Loop).CompNum) - .HowLoadServed = UserZoneAirHVAC(CompNum).Loop(Loop).HowLoadServed; + DataPlant::PlantLoop(this->Loop(loop).LoopNum) + .LoopSide(this->Loop(loop).LoopSideNum) + .Branch(this->Loop(loop).BranchNum) + .Comp(this->Loop(loop).CompNum) + .HowLoadServed = this->Loop(loop).HowLoadServed; } } - UserZoneAirHVAC(CompNum).myOneTimeFlag = false; + this->myOneTimeFlag = false; } // fill internal variable targets - UserZoneAirHVAC(CompNum).RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; - UserZoneAirHVAC(CompNum).RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; - UserZoneAirHVAC(CompNum).RemainingOutputReqToDehumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; - UserZoneAirHVAC(CompNum).RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; - - UserZoneAirHVAC(CompNum).ZoneAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, + this->RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; + this->RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; + this->RemainingOutputReqToDehumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; + this->RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; + + this->ZoneAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp, + DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat, RoutineName); - UserZoneAirHVAC(CompNum).ZoneAir.InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp); - UserZoneAirHVAC(CompNum).ZoneAir.InletTemp = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp; - UserZoneAirHVAC(CompNum).ZoneAir.InletHumRat = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; - - if (UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum > 0) { - UserZoneAirHVAC(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, + this->ZoneAir.InletCp = + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp); + this->ZoneAir.InletTemp = DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp; + this->ZoneAir.InletHumRat = DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat; + + if (this->SourceAir.InletNodeNum > 0) { + this->SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp, + DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, RoutineName); - UserZoneAirHVAC(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp); - UserZoneAirHVAC(CompNum).SourceAir.InletTemp = DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).Temp; - UserZoneAirHVAC(CompNum).SourceAir.InletHumRat = DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.InletNodeNum).HumRat; + this->SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp); + this->SourceAir.InletTemp = DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp; + this->SourceAir.InletHumRat = DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat; } - if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { - UserZoneAirHVAC(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, - DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, - RoutineName); - UserZoneAirHVAC(CompNum).Loop(Loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidName, - DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp, - DataPlant::PlantLoop(UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum).FluidIndex, - RoutineName); - UserZoneAirHVAC(CompNum).Loop(Loop).InletTemp = DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).Temp; - UserZoneAirHVAC(CompNum).Loop(Loop).InletMassFlowRate = DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; + if (this->NumPlantConnections > 0) { + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { + this->Loop(loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidName, + DataLoopNode::Node(this->Loop(loop).InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidIndex, + RoutineName); + this->Loop(loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidName, + DataLoopNode::Node(this->Loop(loop).InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidIndex, + RoutineName); + this->Loop(loop).InletTemp = DataLoopNode::Node(this->Loop(loop).InletNodeNum).Temp; + this->Loop(loop).InletMassFlowRate = DataLoopNode::Node(this->Loop(loop).InletNodeNum).MassFlowRate; } } } - void InitAirTerminalUserDefined(int const CompNum, int const ZoneNum) + void UserAirTerminalComponentStruct::InitAirTerminalUserDefined(int const ZoneNum) { // SUBROUTINE INFORMATION: @@ -2215,84 +2215,84 @@ namespace UserDefinedComponents { static std::string const RoutineName("InitAirTerminalUserDefined"); - if (UserAirTerminal(CompNum).myOneTimeFlag) { - if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { + if (this->myOneTimeFlag) { + if (this->NumPlantConnections > 0) { + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { bool errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(UserAirTerminal(CompNum).Name, + PlantUtilities::ScanPlantLoopsForObject(this->Name, DataPlant::TypeOf_AirTerminalUserDefined, - UserAirTerminal(CompNum).Loop(Loop).LoopNum, - UserAirTerminal(CompNum).Loop(Loop).LoopSideNum, - UserAirTerminal(CompNum).Loop(Loop).BranchNum, - UserAirTerminal(CompNum).Loop(Loop).CompNum, + this->Loop(loop).LoopNum, + this->Loop(loop).LoopSideNum, + this->Loop(loop).BranchNum, + this->Loop(loop).CompNum, errFlag, _, _, _, - UserAirTerminal(CompNum).Loop(Loop).InletNodeNum); + this->Loop(loop).InletNodeNum); if (errFlag) { ShowFatalError("InitPlantUserComponent: Program terminated due to previous condition(s)."); } // set user input for flow priority - DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum) - .LoopSide(UserAirTerminal(CompNum).Loop(Loop).LoopSideNum) - .Branch(UserAirTerminal(CompNum).Loop(Loop).BranchNum) - .Comp(UserAirTerminal(CompNum).Loop(Loop).CompNum) - .FlowPriority = UserAirTerminal(CompNum).Loop(Loop).FlowPriority; + DataPlant::PlantLoop(this->Loop(loop).LoopNum) + .LoopSide(this->Loop(loop).LoopSideNum) + .Branch(this->Loop(loop).BranchNum) + .Comp(this->Loop(loop).CompNum) + .FlowPriority = this->Loop(loop).FlowPriority; // set user input for how loads served - DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum) - .LoopSide(UserAirTerminal(CompNum).Loop(Loop).LoopSideNum) - .Branch(UserAirTerminal(CompNum).Loop(Loop).BranchNum) - .Comp(UserAirTerminal(CompNum).Loop(Loop).CompNum) - .HowLoadServed = UserAirTerminal(CompNum).Loop(Loop).HowLoadServed; + DataPlant::PlantLoop(this->Loop(loop).LoopNum) + .LoopSide(this->Loop(loop).LoopSideNum) + .Branch(this->Loop(loop).BranchNum) + .Comp(this->Loop(loop).CompNum) + .HowLoadServed = this->Loop(loop).HowLoadServed; } } - UserAirTerminal(CompNum).myOneTimeFlag = false; + this->myOneTimeFlag = false; } // fill internal variable targets - UserAirTerminal(CompNum).RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; - UserAirTerminal(CompNum).RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; - UserAirTerminal(CompNum).RemainingOutputReqToDehumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; - UserAirTerminal(CompNum).RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; - - UserAirTerminal(CompNum).AirLoop.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp, - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, + this->RemainingOutputToHeatingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToHeatSP; + this->RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; + this->RemainingOutputReqToDehumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToDehumidSP; + this->RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; + + this->AirLoop.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp, + DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat, RoutineName); - UserAirTerminal(CompNum).AirLoop.InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat, DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp); - UserAirTerminal(CompNum).AirLoop.InletTemp = DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).Temp; - UserAirTerminal(CompNum).AirLoop.InletHumRat = DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).HumRat; - - if (UserAirTerminal(CompNum).SourceAir.InletNodeNum > 0) { - UserAirTerminal(CompNum).SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp, - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, + this->AirLoop.InletCp = + Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat, DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp); + this->AirLoop.InletTemp = DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp; + this->AirLoop.InletHumRat = DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat; + + if (this->SourceAir.InletNodeNum > 0) { + this->SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp, + DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, RoutineName); - UserAirTerminal(CompNum).SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat, - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp); - UserAirTerminal(CompNum).SourceAir.InletTemp = DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).Temp; - UserAirTerminal(CompNum).SourceAir.InletHumRat = DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.InletNodeNum).HumRat; + this->SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp); + this->SourceAir.InletTemp = DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp; + this->SourceAir.InletHumRat = DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat; } - if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { - UserAirTerminal(CompNum).Loop(Loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, - DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, - DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, - RoutineName); - UserAirTerminal(CompNum).Loop(Loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidName, - DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp, - DataPlant::PlantLoop(UserAirTerminal(CompNum).Loop(Loop).LoopNum).FluidIndex, - RoutineName); - UserAirTerminal(CompNum).Loop(Loop).InletTemp = DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).Temp; - UserAirTerminal(CompNum).Loop(Loop).InletMassFlowRate = DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum).MassFlowRate; + if (this->NumPlantConnections > 0) { + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { + this->Loop(loop).InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidName, + DataLoopNode::Node(this->Loop(loop).InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidIndex, + RoutineName); + this->Loop(loop).InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidName, + DataLoopNode::Node(this->Loop(loop).InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop(loop).LoopNum).FluidIndex, + RoutineName); + this->Loop(loop).InletTemp = DataLoopNode::Node(this->Loop(loop).InletNodeNum).Temp; + this->Loop(loop).InletMassFlowRate = DataLoopNode::Node(this->Loop(loop).InletNodeNum).MassFlowRate; } } } - void ReportPlantUserComponent(int const CompNum, int const LoopNum) + void UserPlantComponentStruct::ReportPlantUserComponent(int const LoopNum) { // SUBROUTINE INFORMATION: @@ -2307,57 +2307,57 @@ namespace UserDefinedComponents { // METHODOLOGY EMPLOYED: // copy actuated values to structures elsewhere in program. - PlantUtilities::SafeCopyPlantNode(UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum, UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum); + PlantUtilities::SafeCopyPlantNode(this->Loop(LoopNum).InletNodeNum, this->Loop(LoopNum).OutletNodeNum); // unload Actuators to node data structure - DataLoopNode::Node(UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum).Temp = UserPlantComp(CompNum).Loop(LoopNum).OutletTemp; + DataLoopNode::Node(this->Loop(LoopNum).OutletNodeNum).Temp = this->Loop(LoopNum).OutletTemp; // make mass flow requests, just this loop - PlantUtilities::SetComponentFlowRate(UserPlantComp(CompNum).Loop(LoopNum).MassFlowRateRequest, - UserPlantComp(CompNum).Loop(LoopNum).InletNodeNum, - UserPlantComp(CompNum).Loop(LoopNum).OutletNodeNum, - UserPlantComp(CompNum).Loop(LoopNum).LoopNum, - UserPlantComp(CompNum).Loop(LoopNum).LoopSideNum, - UserPlantComp(CompNum).Loop(LoopNum).BranchNum, - UserPlantComp(CompNum).Loop(LoopNum).CompNum); - - if (UserPlantComp(CompNum).Air.OutletNodeNum > 0) { - DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).Temp = UserPlantComp(CompNum).Air.OutletTemp; - DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).HumRat = UserPlantComp(CompNum).Air.OutletHumRat; - DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).MassFlowRate = UserPlantComp(CompNum).Air.OutletMassFlowRate; - DataLoopNode::Node(UserPlantComp(CompNum).Air.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(UserPlantComp(CompNum).Air.OutletTemp, UserPlantComp(CompNum).Air.OutletHumRat); + PlantUtilities::SetComponentFlowRate(this->Loop(LoopNum).MassFlowRateRequest, + this->Loop(LoopNum).InletNodeNum, + this->Loop(LoopNum).OutletNodeNum, + this->Loop(LoopNum).LoopNum, + this->Loop(LoopNum).LoopSideNum, + this->Loop(LoopNum).BranchNum, + this->Loop(LoopNum).CompNum); + + if (this->Air.OutletNodeNum > 0) { + DataLoopNode::Node(this->Air.OutletNodeNum).Temp = this->Air.OutletTemp; + DataLoopNode::Node(this->Air.OutletNodeNum).HumRat = this->Air.OutletHumRat; + DataLoopNode::Node(this->Air.OutletNodeNum).MassFlowRate = this->Air.OutletMassFlowRate; + DataLoopNode::Node(this->Air.OutletNodeNum).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->Air.OutletTemp, this->Air.OutletHumRat); } - if (UserPlantComp(CompNum).Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(UserPlantComp(CompNum).Water.SupplyTankID).VdotRequestDemand(UserPlantComp(CompNum).Water.SupplyTankDemandARRID) = - UserPlantComp(CompNum).Water.SupplyVdotRequest; + if (this->Water.SuppliedByWaterSystem) { + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = + this->Water.SupplyVdotRequest; } - if (UserPlantComp(CompNum).Water.CollectsToWaterSystem) { - DataWater::WaterStorage(UserPlantComp(CompNum).Water.CollectionTankID).VdotAvailSupply(UserPlantComp(CompNum).Water.CollectionTankSupplyARRID) = - UserPlantComp(CompNum).Water.CollectedVdot; + if (this->Water.CollectsToWaterSystem) { + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = + this->Water.CollectedVdot; } - if (UserPlantComp(CompNum).Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapLowOutLimit) { - DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum) - .LoopSide(UserPlantComp(CompNum).Loop(LoopNum).LoopSideNum) - .Branch(UserPlantComp(CompNum).Loop(LoopNum).BranchNum) - .Comp(UserPlantComp(CompNum).Loop(LoopNum).CompNum) - .MinOutletTemp = UserPlantComp(CompNum).Loop(LoopNum).LowOutTempLimit; + if (this->Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapLowOutLimit) { + DataPlant::PlantLoop(this->Loop(LoopNum).LoopNum) + .LoopSide(this->Loop(LoopNum).LoopSideNum) + .Branch(this->Loop(LoopNum).BranchNum) + .Comp(this->Loop(LoopNum).CompNum) + .MinOutletTemp = this->Loop(LoopNum).LowOutTempLimit; } - if (UserPlantComp(CompNum).Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapHiOutLimit) { - DataPlant::PlantLoop(UserPlantComp(CompNum).Loop(LoopNum).LoopNum) - .LoopSide(UserPlantComp(CompNum).Loop(LoopNum).LoopSideNum) - .Branch(UserPlantComp(CompNum).Loop(LoopNum).BranchNum) - .Comp(UserPlantComp(CompNum).Loop(LoopNum).CompNum) - .MaxOutletTemp = UserPlantComp(CompNum).Loop(LoopNum).HiOutTempLimit; + if (this->Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapHiOutLimit) { + DataPlant::PlantLoop(this->Loop(LoopNum).LoopNum) + .LoopSide(this->Loop(LoopNum).LoopSideNum) + .Branch(this->Loop(LoopNum).BranchNum) + .Comp(this->Loop(LoopNum).CompNum) + .MaxOutletTemp = this->Loop(LoopNum).HiOutTempLimit; } } - void ReportCoilUserDefined(int const CompNum) + void UserCoilComponentStruct::ReportCoilUserDefined() { // SUBROUTINE INFORMATION: @@ -2369,47 +2369,47 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - for (int Loop = 1; Loop <= UserCoil(CompNum).NumAirConnections; ++Loop) { - if (UserCoil(CompNum).Air(Loop).OutletNodeNum > 0) { - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Temp = UserCoil(CompNum).Air(Loop).OutletTemp; - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).HumRat = UserCoil(CompNum).Air(Loop).OutletHumRat; - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRate = UserCoil(CompNum).Air(Loop).OutletMassFlowRate; - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(UserCoil(CompNum).Air(Loop).OutletTemp, UserCoil(CompNum).Air(Loop).OutletHumRat); - - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMinAvail = - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMinAvail; - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).OutletNodeNum).MassFlowRateMaxAvail = - DataLoopNode::Node(UserCoil(CompNum).Air(Loop).InletNodeNum).MassFlowRateMaxAvail; + for (int loop = 1; loop <= this->NumAirConnections; ++loop) { + if (this->Air(loop).OutletNodeNum > 0) { + DataLoopNode::Node(this->Air(loop).OutletNodeNum).Temp = this->Air(loop).OutletTemp; + DataLoopNode::Node(this->Air(loop).OutletNodeNum).HumRat = this->Air(loop).OutletHumRat; + DataLoopNode::Node(this->Air(loop).OutletNodeNum).MassFlowRate = this->Air(loop).OutletMassFlowRate; + DataLoopNode::Node(this->Air(loop).OutletNodeNum).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->Air(loop).OutletTemp, this->Air(loop).OutletHumRat); + + DataLoopNode::Node(this->Air(loop).OutletNodeNum).MassFlowRateMinAvail = + DataLoopNode::Node(this->Air(loop).InletNodeNum).MassFlowRateMinAvail; + DataLoopNode::Node(this->Air(loop).OutletNodeNum).MassFlowRateMaxAvail = + DataLoopNode::Node(this->Air(loop).InletNodeNum).MassFlowRateMaxAvail; } } - if (UserCoil(CompNum).PlantIsConnected) { + if (this->PlantIsConnected) { // make mass flow requests - PlantUtilities::SetComponentFlowRate(UserCoil(CompNum).Loop.MassFlowRateRequest, - UserCoil(CompNum).Loop.InletNodeNum, - UserCoil(CompNum).Loop.OutletNodeNum, - UserCoil(CompNum).Loop.LoopNum, - UserCoil(CompNum).Loop.LoopSideNum, - UserCoil(CompNum).Loop.BranchNum, - UserCoil(CompNum).Loop.CompNum); - PlantUtilities::SafeCopyPlantNode(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.OutletNodeNum); + PlantUtilities::SetComponentFlowRate(this->Loop.MassFlowRateRequest, + this->Loop.InletNodeNum, + this->Loop.OutletNodeNum, + this->Loop.LoopNum, + this->Loop.LoopSideNum, + this->Loop.BranchNum, + this->Loop.CompNum); + PlantUtilities::SafeCopyPlantNode(this->Loop.InletNodeNum, this->Loop.OutletNodeNum); // unload Actuators to node data structure - DataLoopNode::Node(UserCoil(CompNum).Loop.OutletNodeNum).Temp = UserCoil(CompNum).Loop.OutletTemp; + DataLoopNode::Node(this->Loop.OutletNodeNum).Temp = this->Loop.OutletTemp; } - if (UserCoil(CompNum).Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(UserCoil(CompNum).Water.SupplyTankID).VdotRequestDemand(UserCoil(CompNum).Water.SupplyTankDemandARRID) = - UserCoil(CompNum).Water.SupplyVdotRequest; + if (this->Water.SuppliedByWaterSystem) { + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = + this->Water.SupplyVdotRequest; } - if (UserCoil(CompNum).Water.CollectsToWaterSystem) { - DataWater::WaterStorage(UserCoil(CompNum).Water.CollectionTankID).VdotAvailSupply(UserCoil(CompNum).Water.CollectionTankSupplyARRID) = - UserCoil(CompNum).Water.CollectedVdot; + if (this->Water.CollectsToWaterSystem) { + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = + this->Water.CollectedVdot; } } - void ReportZoneAirUserDefined(int const CompNum) + void UserZoneHVACForcedAirComponentStruct::ReportZoneAirUserDefined() { // SUBROUTINE INFORMATION: @@ -2421,50 +2421,50 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // report model outputs - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.InletMassFlowRate; + DataLoopNode::Node(this->ZoneAir.InletNodeNum).MassFlowRate = this->ZoneAir.InletMassFlowRate; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).ZoneAir.OutletMassFlowRate; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(UserZoneAirHVAC(CompNum).ZoneAir.OutletTemp, UserZoneAirHVAC(CompNum).ZoneAir.OutletHumRat); + DataLoopNode::Node(this->ZoneAir.OutletNodeNum).Temp = this->ZoneAir.OutletTemp; + DataLoopNode::Node(this->ZoneAir.OutletNodeNum).HumRat = this->ZoneAir.OutletHumRat; + DataLoopNode::Node(this->ZoneAir.OutletNodeNum).MassFlowRate = this->ZoneAir.OutletMassFlowRate; + DataLoopNode::Node(this->ZoneAir.OutletNodeNum).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->ZoneAir.OutletTemp, this->ZoneAir.OutletHumRat); - if (UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum > 0) { - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).SourceAir.OutletTemp; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).HumRat = UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserZoneAirHVAC(CompNum).SourceAir.OutletMassFlowRate; - DataLoopNode::Node(UserZoneAirHVAC(CompNum).SourceAir.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(UserZoneAirHVAC(CompNum).SourceAir.OutletTemp, UserZoneAirHVAC(CompNum).SourceAir.OutletHumRat); + if (this->SourceAir.OutletNodeNum > 0) { + DataLoopNode::Node(this->SourceAir.OutletNodeNum).Temp = this->SourceAir.OutletTemp; + DataLoopNode::Node(this->SourceAir.OutletNodeNum).HumRat = this->SourceAir.OutletHumRat; + DataLoopNode::Node(this->SourceAir.OutletNodeNum).MassFlowRate = this->SourceAir.OutletMassFlowRate; + DataLoopNode::Node(this->SourceAir.OutletNodeNum).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->SourceAir.OutletTemp, this->SourceAir.OutletHumRat); } - if (UserZoneAirHVAC(CompNum).NumPlantConnections > 0) { - for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { + if (this->NumPlantConnections > 0) { + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { // make mass flow requests - PlantUtilities::SetComponentFlowRate(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateRequest, - UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, - UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum, - UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, - UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum, - UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, - UserZoneAirHVAC(CompNum).Loop(Loop).CompNum); - PlantUtilities::SafeCopyPlantNode(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum); + PlantUtilities::SetComponentFlowRate(this->Loop(loop).MassFlowRateRequest, + this->Loop(loop).InletNodeNum, + this->Loop(loop).OutletNodeNum, + this->Loop(loop).LoopNum, + this->Loop(loop).LoopSideNum, + this->Loop(loop).BranchNum, + this->Loop(loop).CompNum); + PlantUtilities::SafeCopyPlantNode(this->Loop(loop).InletNodeNum, this->Loop(loop).OutletNodeNum); // unload Actuators to node data structure - DataLoopNode::Node(UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum).Temp = UserZoneAirHVAC(CompNum).Loop(Loop).OutletTemp; + DataLoopNode::Node(this->Loop(loop).OutletNodeNum).Temp = this->Loop(loop).OutletTemp; } } - if (UserZoneAirHVAC(CompNum).Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(UserZoneAirHVAC(CompNum).Water.SupplyTankID).VdotRequestDemand(UserZoneAirHVAC(CompNum).Water.SupplyTankDemandARRID) = - UserZoneAirHVAC(CompNum).Water.SupplyVdotRequest; + if (this->Water.SuppliedByWaterSystem) { + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = + this->Water.SupplyVdotRequest; } - if (UserZoneAirHVAC(CompNum).Water.CollectsToWaterSystem) { - DataWater::WaterStorage(UserZoneAirHVAC(CompNum).Water.CollectionTankID).VdotAvailSupply(UserZoneAirHVAC(CompNum).Water.CollectionTankSupplyARRID) = - UserZoneAirHVAC(CompNum).Water.CollectedVdot; + if (this->Water.CollectsToWaterSystem) { + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = + this->Water.CollectedVdot; } } - void ReportAirTerminalUserDefined(int const CompNum) + void UserAirTerminalComponentStruct::ReportAirTerminalUserDefined() { // SUBROUTINE INFORMATION: @@ -2473,45 +2473,45 @@ namespace UserDefinedComponents { // MODIFIED na // RE-ENGINEERED na - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.InletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.InletMassFlowRate; - - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Temp = UserAirTerminal(CompNum).AirLoop.OutletTemp; - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).HumRat = UserAirTerminal(CompNum).AirLoop.OutletHumRat; - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).AirLoop.OutletMassFlowRate; - DataLoopNode::Node(UserAirTerminal(CompNum).AirLoop.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(UserAirTerminal(CompNum).AirLoop.OutletTemp, UserAirTerminal(CompNum).AirLoop.OutletHumRat); - if (UserAirTerminal(CompNum).SourceAir.OutletNodeNum > 0) { - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Temp = UserAirTerminal(CompNum).SourceAir.OutletTemp; - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).HumRat = UserAirTerminal(CompNum).SourceAir.OutletHumRat; - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).MassFlowRate = UserAirTerminal(CompNum).SourceAir.OutletMassFlowRate; - DataLoopNode::Node(UserAirTerminal(CompNum).SourceAir.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(UserAirTerminal(CompNum).SourceAir.OutletTemp, UserAirTerminal(CompNum).SourceAir.OutletHumRat); + DataLoopNode::Node(this->AirLoop.InletNodeNum).MassFlowRate = this->AirLoop.InletMassFlowRate; + + DataLoopNode::Node(this->AirLoop.OutletNodeNum).Temp = this->AirLoop.OutletTemp; + DataLoopNode::Node(this->AirLoop.OutletNodeNum).HumRat = this->AirLoop.OutletHumRat; + DataLoopNode::Node(this->AirLoop.OutletNodeNum).MassFlowRate = this->AirLoop.OutletMassFlowRate; + DataLoopNode::Node(this->AirLoop.OutletNodeNum).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->AirLoop.OutletTemp, this->AirLoop.OutletHumRat); + if (this->SourceAir.OutletNodeNum > 0) { + DataLoopNode::Node(this->SourceAir.OutletNodeNum).Temp = this->SourceAir.OutletTemp; + DataLoopNode::Node(this->SourceAir.OutletNodeNum).HumRat = this->SourceAir.OutletHumRat; + DataLoopNode::Node(this->SourceAir.OutletNodeNum).MassFlowRate = this->SourceAir.OutletMassFlowRate; + DataLoopNode::Node(this->SourceAir.OutletNodeNum).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->SourceAir.OutletTemp, this->SourceAir.OutletHumRat); } - if (UserAirTerminal(CompNum).NumPlantConnections > 0) { - for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { + if (this->NumPlantConnections > 0) { + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { // make mass flow requests - PlantUtilities::SetComponentFlowRate(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateRequest, - UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, - UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum, - UserAirTerminal(CompNum).Loop(Loop).LoopNum, - UserAirTerminal(CompNum).Loop(Loop).LoopSideNum, - UserAirTerminal(CompNum).Loop(Loop).BranchNum, - UserAirTerminal(CompNum).Loop(Loop).CompNum); - PlantUtilities::SafeCopyPlantNode(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum); + PlantUtilities::SetComponentFlowRate(this->Loop(loop).MassFlowRateRequest, + this->Loop(loop).InletNodeNum, + this->Loop(loop).OutletNodeNum, + this->Loop(loop).LoopNum, + this->Loop(loop).LoopSideNum, + this->Loop(loop).BranchNum, + this->Loop(loop).CompNum); + PlantUtilities::SafeCopyPlantNode(this->Loop(loop).InletNodeNum, this->Loop(loop).OutletNodeNum); // unload Actuators to node data structure - DataLoopNode::Node(UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum).Temp = UserAirTerminal(CompNum).Loop(Loop).OutletTemp; + DataLoopNode::Node(this->Loop(loop).OutletNodeNum).Temp = this->Loop(loop).OutletTemp; } } - if (UserAirTerminal(CompNum).Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(UserAirTerminal(CompNum).Water.SupplyTankID).VdotRequestDemand(UserAirTerminal(CompNum).Water.SupplyTankDemandARRID) = - UserAirTerminal(CompNum).Water.SupplyVdotRequest; + if (this->Water.SuppliedByWaterSystem) { + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = + this->Water.SupplyVdotRequest; } - if (UserAirTerminal(CompNum).Water.CollectsToWaterSystem) { - DataWater::WaterStorage(UserAirTerminal(CompNum).Water.CollectionTankID).VdotAvailSupply(UserAirTerminal(CompNum).Water.CollectionTankSupplyARRID) = - UserAirTerminal(CompNum).Water.CollectedVdot; + if (this->Water.CollectsToWaterSystem) { + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = + this->Water.CollectedVdot; } } diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index 8faf0044b0f..3acd6f14f9a 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -188,6 +188,11 @@ namespace UserDefinedComponents { UserPlantComponentStruct() : ErlSimProgramMngr(0), NumPlantConnections(0), myOneTimeFlag(true) { } + + void InitPlantUserComponent(int LoopNum, Real64 MyLoad); + + void ReportPlantUserComponent(int LoopNum); + }; struct UserCoilComponentStruct @@ -208,6 +213,11 @@ namespace UserDefinedComponents { UserCoilComponentStruct() : ErlSimProgramMngr(0), ErlInitProgramMngr(0), NumAirConnections(0), PlantIsConnected(false), myOneTimeFlag(true) { } + + void InitCoilUserDefined(); + + void ReportCoilUserDefined(); + }; struct UserZoneHVACForcedAirComponentStruct @@ -234,6 +244,11 @@ namespace UserDefinedComponents { RemainingOutputReqToHumidSP(0.0), RemainingOutputReqToDehumidSP(0.0), myOneTimeFlag(true) { } + + void InitZoneAirUserDefined(int ZoneNum); + + void ReportZoneAirUserDefined(); + }; struct UserAirTerminalComponentStruct @@ -262,6 +277,11 @@ namespace UserDefinedComponents { RemainingOutputToCoolingSP(0.0), RemainingOutputReqToHumidSP(0.0), RemainingOutputReqToDehumidSP(0.0), myOneTimeFlag(true) { } + + void InitAirTerminalUserDefined(int ZoneNum); + + void ReportAirTerminalUserDefined(); + }; // Object Data @@ -294,34 +314,15 @@ namespace UserDefinedComponents { int &CompIndex // index to zone hvac unit ); - void - SimAirTerminalUserDefined(std::string const &CompName, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum, int &CompIndex); + void SimAirTerminalUserDefined(std::string const &CompName, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum, int &CompIndex); void GetUserDefinedComponents(); - void InitPlantUserComponent(int CompNum, int LoopNum, Real64 MyLoad); - - void InitCoilUserDefined(int CompNum); - - void InitZoneAirUserDefined(int CompNum, int ZoneNum); - - void InitAirTerminalUserDefined(int CompNum, int ZoneNum); - - void ReportPlantUserComponent(int CompNum, int LoopNum); - - void ReportCoilUserDefined(int CompNum); - - void ReportZoneAirUserDefined(int CompNum); - - void ReportAirTerminalUserDefined(int CompNum); - void GetUserDefinedCoilIndex(std::string const &CoilName, int &CoilIndex, bool &ErrorsFound, std::string const &CurrentModuleObject); - void - GetUserDefinedCoilAirInletNode(std::string const &CoilName, int &CoilAirInletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); + void GetUserDefinedCoilAirInletNode(std::string const &CoilName, int &CoilAirInletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); - void - GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); + void GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); } // namespace UserDefinedComponents From dccef840068ed6f789804f936fec0e893d92f2d5 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 9 Dec 2019 08:40:45 -0700 Subject: [PATCH 18/86] rename member methods --- src/EnergyPlus/UserDefinedComponents.cc | 38 ++++++++++++------------- src/EnergyPlus/UserDefinedComponents.hh | 16 +++++------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 3e8b23f48a6..6e59a265a79 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -163,7 +163,7 @@ namespace UserDefinedComponents { } bool anyEMSRan; if (InitLoopEquip || DataGlobals::BeginEnvrnFlag) { - UserPlantComp(CompNum).InitPlantUserComponent(LoopNum, MyLoad); + UserPlantComp(CompNum).initialize(LoopNum, MyLoad); // find loop connection number from LoopNum and LoopSide ThisLoop = 0; for (int Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { @@ -207,7 +207,7 @@ namespace UserDefinedComponents { ThisLoop = Loop; } - UserPlantComp(CompNum).InitPlantUserComponent(ThisLoop, MyLoad); + UserPlantComp(CompNum).initialize(ThisLoop, MyLoad); if (ThisLoop > 0) { if (UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr > 0) { @@ -219,7 +219,7 @@ namespace UserDefinedComponents { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).ErlSimProgramMngr); } - UserPlantComp(CompNum).ReportPlantUserComponent(ThisLoop); + UserPlantComp(CompNum).report(ThisLoop); } void SimCoilUserDefined(std::string const &EquipName, // user name for component @@ -284,13 +284,13 @@ namespace UserDefinedComponents { } } - UserCoil(CompNum).InitCoilUserDefined(); + UserCoil(CompNum).initialize(); if (UserCoil(CompNum).ErlSimProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserCoil(CompNum).ErlSimProgramMngr); } - UserCoil(CompNum).ReportCoilUserDefined(); + UserCoil(CompNum).report(); if (AirLoopNum != -1) { // IF the system is not an equipment of outdoor air unit // determine if heating or cooling on primary air stream @@ -347,7 +347,7 @@ namespace UserDefinedComponents { } bool anyEMSRan; if (DataGlobals::BeginEnvrnFlag) { - UserZoneAirHVAC(CompNum).InitZoneAirUserDefined(ZoneNum); + UserZoneAirHVAC(CompNum).initialize(ZoneNum); if (UserZoneAirHVAC(CompNum).ErlInitProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlInitProgramMngr); @@ -371,13 +371,13 @@ namespace UserDefinedComponents { } // BeginEnvrnFlag - UserZoneAirHVAC(CompNum).InitZoneAirUserDefined(ZoneNum); + UserZoneAirHVAC(CompNum).initialize(ZoneNum); if (UserZoneAirHVAC(CompNum).ErlSimProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserZoneAirHVAC(CompNum).ErlSimProgramMngr); } - UserZoneAirHVAC(CompNum).ReportZoneAirUserDefined(); + UserZoneAirHVAC(CompNum).report(); // calculate delivered capacity Real64 AirMassFlow = @@ -435,7 +435,7 @@ namespace UserDefinedComponents { } bool anyEMSRan; if (DataGlobals::BeginEnvrnFlag) { - UserAirTerminal(CompNum).InitAirTerminalUserDefined(ZoneNum); + UserAirTerminal(CompNum).initialize(ZoneNum); if (UserAirTerminal(CompNum).ErlInitProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlInitProgramMngr); @@ -459,13 +459,13 @@ namespace UserDefinedComponents { } // BeginEnvrnFlag - UserAirTerminal(CompNum).InitAirTerminalUserDefined(ZoneNum); + UserAirTerminal(CompNum).initialize(ZoneNum); if (UserAirTerminal(CompNum).ErlSimProgramMngr > 0) { EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserAirTerminal(CompNum).ErlSimProgramMngr); } - UserAirTerminal(CompNum).ReportAirTerminalUserDefined(); + UserAirTerminal(CompNum).report(); } void GetUserDefinedComponents() @@ -1972,7 +1972,7 @@ namespace UserDefinedComponents { } } - void UserPlantComponentStruct::InitPlantUserComponent(int const LoopNum, Real64 const MyLoad) + void UserPlantComponentStruct::initialize(int LoopNum, Real64 MyLoad) { // SUBROUTINE INFORMATION: // AUTHOR @@ -2044,7 +2044,7 @@ namespace UserDefinedComponents { } } - void UserCoilComponentStruct::InitCoilUserDefined() + void UserCoilComponentStruct::initialize() { // SUBROUTINE INFORMATION: @@ -2113,7 +2113,7 @@ namespace UserDefinedComponents { } } - void UserZoneHVACForcedAirComponentStruct::InitZoneAirUserDefined(int const ZoneNum) + void UserZoneHVACForcedAirComponentStruct::initialize(int const ZoneNum) { // SUBROUTINE INFORMATION: @@ -2204,7 +2204,7 @@ namespace UserDefinedComponents { } } - void UserAirTerminalComponentStruct::InitAirTerminalUserDefined(int const ZoneNum) + void UserAirTerminalComponentStruct::initialize(int const ZoneNum) { // SUBROUTINE INFORMATION: @@ -2292,7 +2292,7 @@ namespace UserDefinedComponents { } } - void UserPlantComponentStruct::ReportPlantUserComponent(int const LoopNum) + void UserPlantComponentStruct::report(int const LoopNum) { // SUBROUTINE INFORMATION: @@ -2357,7 +2357,7 @@ namespace UserDefinedComponents { } } - void UserCoilComponentStruct::ReportCoilUserDefined() + void UserCoilComponentStruct::report() { // SUBROUTINE INFORMATION: @@ -2409,7 +2409,7 @@ namespace UserDefinedComponents { } } - void UserZoneHVACForcedAirComponentStruct::ReportZoneAirUserDefined() + void UserZoneHVACForcedAirComponentStruct::report() { // SUBROUTINE INFORMATION: @@ -2464,7 +2464,7 @@ namespace UserDefinedComponents { } } - void UserAirTerminalComponentStruct::ReportAirTerminalUserDefined() + void UserAirTerminalComponentStruct::report() { // SUBROUTINE INFORMATION: diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index 3acd6f14f9a..300de2e740f 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -189,9 +189,9 @@ namespace UserDefinedComponents { { } - void InitPlantUserComponent(int LoopNum, Real64 MyLoad); + void initialize(int LoopNum, Real64 MyLoad); - void ReportPlantUserComponent(int LoopNum); + void report(int LoopNum); }; @@ -214,9 +214,9 @@ namespace UserDefinedComponents { { } - void InitCoilUserDefined(); + void initialize(); - void ReportCoilUserDefined(); + void report(); }; @@ -245,9 +245,9 @@ namespace UserDefinedComponents { { } - void InitZoneAirUserDefined(int ZoneNum); + void initialize(int ZoneNum); - void ReportZoneAirUserDefined(); + void report(); }; @@ -278,9 +278,9 @@ namespace UserDefinedComponents { { } - void InitAirTerminalUserDefined(int ZoneNum); + void initialize(int ZoneNum); - void ReportAirTerminalUserDefined(); + void report(); }; From c06d2b003d7256b3242d328d11688e04b22caf51 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 9 Dec 2019 19:55:48 -0700 Subject: [PATCH 19/86] move user defined plant comp to plantCompPtr calling calling methods --- src/EnergyPlus/HeatBalanceSurfaceManager.cc | 2 +- src/EnergyPlus/Plant/PlantManager.cc | 2 + src/EnergyPlus/PlantLoopEquip.cc | 11 +- src/EnergyPlus/RuntimeLanguageProcessor.cc | 2 +- src/EnergyPlus/SingleDuct.cc | 2 +- src/EnergyPlus/UserDefinedComponents.cc | 787 +++++++++++--------- src/EnergyPlus/UserDefinedComponents.hh | 24 +- 7 files changed, 466 insertions(+), 364 deletions(-) diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index f045b33f107..94d38826152 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -226,7 +226,7 @@ namespace HeatBalanceSurfaceManager { using HeatBalanceAirManager::ManageAirHeatBalance; using HeatBalFiniteDiffManager::SurfaceFD; - using OutputReportTabular::GatherComponentLoadsSurface; // for writing tabular compoonent loads output reports + using OutputReportTabular::GatherComponentLoadsSurface; // for writing tabular component loads output reports using ThermalComfort::ManageThermalComfort; int SurfNum; diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index e817819fa79..d43bddedd72 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -103,6 +103,7 @@ #include #include #include +#include #include #include #include @@ -1429,6 +1430,7 @@ namespace EnergyPlus { this_comp.TypeOf_Num = TypeOf_PlantComponentUserDefined; this_comp.GeneralEquipType = GenEquipTypes_PlantComponent; this_comp.CurOpSchemeType = UnknownStatusOpSchemeType; + this_comp.compPtr = UserDefinedComponents::UserPlantComponentStruct::factory(CompNames(CompNum)); } else if (UtilityRoutines::SameString(this_comp_type, "Coil:UserDefined")) { this_comp.TypeOf_Num = TypeOf_CoilUserDefined; this_comp.GeneralEquipType = GenEquipTypes_PlantComponent; diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index bd3984ecfeb..0d8629b81c2 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -197,7 +197,6 @@ namespace PlantLoopEquip { using PlantCentralGSHP::SimCentralGroundSourceHeatPump; using RefrigeratedCase::SimRefrigCondenser; using SteamBaseboardRadiator::UpdateSteamBaseboardPlantConnection; - using UserDefinedComponents::SimUserDefinedPlantComponent; using WaterCoils::UpdateWaterToAirCoilPlantConnection; using WaterUse::SimulateWaterUseConnection; @@ -1029,15 +1028,7 @@ namespace PlantLoopEquip { } else if (GeneralEquipType == GenEquipTypes_PlantComponent) { if (EquipTypeNum == TypeOf_PlantComponentUserDefined) { - - SimUserDefinedPlantComponent( - LoopNum, LoopSideNum, sim_component.TypeOf, sim_component.Name, EquipNum, InitLoopEquip, CurLoad, MaxLoad, MinLoad, OptLoad); - if (InitLoopEquip) { - sim_component.MaxLoad = MaxLoad; - sim_component.MinLoad = MinLoad; - sim_component.OptLoad = OptLoad; - sim_component.CompNum = EquipNum; - } + sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); } else if (EquipTypeNum == TypeOf_WaterSource) { sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index db77bd46ecd..2db323cf395 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -977,7 +977,7 @@ namespace RuntimeLanguageProcessor { WriteTrace(StackNum, InstructionNum, ReturnValue, seriousErrorFound); } else if (SELECT_CASE_var == KeywordWhile) { - // evaluate expresssion at while, skip to past endwhile if not true + // evaluate expression at while, skip to past endwhile if not true ExpressionNum = ErlStack(StackNum).Instruction(InstructionNum).Argument1; InstructionNum2 = ErlStack(StackNum).Instruction(InstructionNum).Argument2; ReturnValue = EvaluateExpression(ExpressionNum, seriousErrorFound); diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index 90b3d08f4c2..8e6de415495 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -5452,7 +5452,7 @@ namespace SingleDuct { NumATMixers = inputProcessor->getNumObjectsFound(cCurrentModuleObject); SysATMixer.allocate(NumATMixers); - // Need air disribution units first + // Need air distribution units first ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment(); for (ATMixerNum = 1; ATMixerNum <= NumATMixers; ++ATMixerNum) { diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 6e59a265a79..bb4d71e368d 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -75,6 +75,7 @@ #include #include #include +#include namespace EnergyPlus { @@ -102,24 +103,86 @@ namespace UserDefinedComponents { Array1D_bool CheckUserAirTerminal; bool GetInput(true); + bool GetPlantCompInput(true); Array1D UserPlantComp; Array1D UserCoil; Array1D UserZoneAirHVAC; Array1D UserAirTerminal; - void SimUserDefinedPlantComponent(int const LoopNum, // plant loop sim call originated from - int const LoopSideNum, // plant loop side sim call originated from - std::string const &EP_UNUSED(EquipType), // type of equipment, 'PlantComponent:UserDefined' - std::string const &EquipName, // user name for component - int &CompIndex, - bool &InitLoopEquip, - Real64 const MyLoad, - Real64 &MaxCap, - Real64 &MinCap, - Real64 &OptCap) + PlantComponent *UserPlantComponentStruct::factory(std::string const &objectName) { + // Process the input data + if (GetPlantCompInput) { + GetUserDefinedPlantComponents(); + GetPlantCompInput = false; + } + // Now look for this particular object + for (auto &thisComp : UserPlantComp) { + if (thisComp.Name == objectName) { + return &thisComp; + } + } + // If we didn't find it, fatal + ShowFatalError("LocalUserDefinedPlantComponentFactory: Error getting inputs for object named: " + objectName); // LCOV_EXCL_LINE + // Shut up the compiler + return nullptr; // LCOV_EXCL_LINE + } + + void UserPlantComponentStruct::onInitLoopEquip(const PlantLocation &calledFromLocation) + { + bool anyEMSRan; + Real64 myLoad = 0.0; + int thisLoop = 0; + + this->initialize(calledFromLocation.loopNum, myLoad); + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { + if (calledFromLocation.loopNum != this->Loop(loop).LoopNum) continue; + if (calledFromLocation.loopSideNum != this->Loop(loop).LoopSideNum) continue; + thisLoop = loop; + } + + if (thisLoop > 0) { + if (this->Loop(thisLoop).ErlInitProgramMngr > 0) { + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, this->Loop(thisLoop).ErlInitProgramMngr); + } + + PlantUtilities::InitComponentNodes(this->Loop(thisLoop).MassFlowRateMin, + this->Loop(thisLoop).MassFlowRateMax, + this->Loop(thisLoop).InletNodeNum, + this->Loop(thisLoop).OutletNodeNum, + this->Loop(thisLoop).LoopNum, + this->Loop(thisLoop).LoopSideNum, + this->Loop(thisLoop).BranchNum, + this->Loop(thisLoop).CompNum); + + PlantUtilities::RegisterPlantCompDesignFlow(this->Loop(thisLoop).InletNodeNum, + this->Loop(thisLoop).DesignVolumeFlowRate); + + } else { + // throw warning + ShowFatalError("SimUserDefinedPlantComponent: did not find where called from loop number called from =" + General::TrimSigDigits(calledFromLocation.loopNum) + + " , loop side called from =" + General::TrimSigDigits(calledFromLocation.loopSideNum)); + } + } + + void UserPlantComponentStruct::getDesignCapacities(const PlantLocation &calledFromLocation, Real64 &MaxLoad, Real64 &MinLoad, Real64 &OptLoad) + { + int thisLoop = 0; + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { + if (calledFromLocation.loopNum != this->Loop(loop).LoopNum) continue; + if (calledFromLocation.loopSideNum != this->Loop(loop).LoopSideNum) continue; + thisLoop = loop; + } + + MinLoad = this->Loop(thisLoop).MinLoad; + MaxLoad = this->Loop(thisLoop).MaxLoad; + OptLoad = this->Loop(thisLoop).OptLoad; + } + + void UserPlantComponentStruct::UserPlantComponentStruct::simulate(const EnergyPlus::PlantLocation &calledFromLocation, bool EP_UNUSED(FirstHVACIteration), Real64 &CurLoad, bool EP_UNUSED(RunFlag)) + { // SUBROUTINE INFORMATION: // AUTHOR B. Griffith // DATE WRITTEN Jan 2012 @@ -129,97 +192,32 @@ namespace UserDefinedComponents { // PURPOSE OF THIS SUBROUTINE: // User Defined plant generic component - // METHODOLOGY EMPLOYED: - // This routine to be called from PlantLoopEquipment. - - int CompNum; - int ThisLoop; - - if (GetInput) { - GetUserDefinedComponents(); - GetInput = false; + if (DataGlobals::BeginEnvrnFlag) { + this->onInitLoopEquip(calledFromLocation); } - // Find the correct Equipment - if (CompIndex == 0) { - CompNum = UtilityRoutines::FindItemInList(EquipName, UserPlantComp); - if (CompNum == 0) { - ShowFatalError("SimUserDefinedPlantComponent: User Defined Plant Component not found"); - } - CompIndex = CompNum; - } else { - CompNum = CompIndex; - if (CompNum < 1 || CompNum > NumUserPlantComps) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + - ", Number of units =" + General::TrimSigDigits(NumUserPlantComps) + ", Entered Unit name = " + EquipName); - } - if (CheckUserPlantCompName(CompNum)) { - if (EquipName != UserPlantComp(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + EquipName + - ", stored unit name for that index=" + UserPlantComp(CompNum).Name); - } - CheckUserPlantCompName(CompNum) = false; - } - } bool anyEMSRan; - if (InitLoopEquip || DataGlobals::BeginEnvrnFlag) { - UserPlantComp(CompNum).initialize(LoopNum, MyLoad); - // find loop connection number from LoopNum and LoopSide - ThisLoop = 0; - for (int Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { - if (LoopNum != UserPlantComp(CompNum).Loop(Loop).LoopNum) continue; - if (LoopSideNum != UserPlantComp(CompNum).Loop(Loop).LoopSideNum) continue; - ThisLoop = Loop; - } - if (ThisLoop > 0) { - if (UserPlantComp(CompNum).Loop(ThisLoop).ErlInitProgramMngr > 0) { - EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).Loop(ThisLoop).ErlInitProgramMngr); - } - // now interface sizing related values with rest of E+ - MinCap = UserPlantComp(CompNum).Loop(ThisLoop).MinLoad; - MaxCap = UserPlantComp(CompNum).Loop(ThisLoop).MaxLoad; - OptCap = UserPlantComp(CompNum).Loop(ThisLoop).OptLoad; - - PlantUtilities::InitComponentNodes(UserPlantComp(CompNum).Loop(ThisLoop).MassFlowRateMin, - UserPlantComp(CompNum).Loop(ThisLoop).MassFlowRateMax, - UserPlantComp(CompNum).Loop(ThisLoop).InletNodeNum, - UserPlantComp(CompNum).Loop(ThisLoop).OutletNodeNum, - UserPlantComp(CompNum).Loop(ThisLoop).LoopNum, - UserPlantComp(CompNum).Loop(ThisLoop).LoopSideNum, - UserPlantComp(CompNum).Loop(ThisLoop).BranchNum, - UserPlantComp(CompNum).Loop(ThisLoop).CompNum); - - PlantUtilities::RegisterPlantCompDesignFlow(UserPlantComp(CompNum).Loop(ThisLoop).InletNodeNum, - UserPlantComp(CompNum).Loop(ThisLoop).DesignVolumeFlowRate); - - } else { - // throw warning - ShowFatalError("SimUserDefinedPlantComponent: did not find where called from loop number called from =" + General::TrimSigDigits(LoopNum) + - " , loop side called from =" + General::TrimSigDigits(LoopSideNum)); - } - return; - } + int thisLoop = 0; - ThisLoop = 0; - for (int Loop = 1; Loop <= UserPlantComp(CompNum).NumPlantConnections; ++Loop) { - if (LoopNum != UserPlantComp(CompNum).Loop(Loop).LoopNum) continue; - if (LoopSideNum != UserPlantComp(CompNum).Loop(Loop).LoopSideNum) continue; - ThisLoop = Loop; + for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { + if (calledFromLocation.loopNum != this->Loop(loop).LoopNum) continue; + if (calledFromLocation.loopSideNum != this->Loop(loop).LoopSideNum) continue; + thisLoop = loop; } - UserPlantComp(CompNum).initialize(ThisLoop, MyLoad); + this->initialize(thisLoop, CurLoad); - if (ThisLoop > 0) { - if (UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr > 0) { - EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).Loop(ThisLoop).ErlSimProgramMngr); + if (thisLoop > 0) { + if (this->Loop(thisLoop).ErlSimProgramMngr > 0) { + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, this->Loop(thisLoop).ErlSimProgramMngr); } } - if (UserPlantComp(CompNum).ErlSimProgramMngr > 0) { - EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, UserPlantComp(CompNum).ErlSimProgramMngr); + if (this->ErlSimProgramMngr > 0) { + EMSManager::ManageEMS(DataGlobals::emsCallFromUserDefinedComponentModel, anyEMSRan, this->ErlSimProgramMngr); } - UserPlantComp(CompNum).report(ThisLoop); + this->report(thisLoop); } void SimCoilUserDefined(std::string const &EquipName, // user name for component @@ -237,9 +235,9 @@ namespace UserDefinedComponents { int CompNum; - if (GetInput) { - GetUserDefinedComponents(); - GetInput = false; + if (GetPlantCompInput) { + GetUserDefinedPlantComponents(); + GetPlantCompInput = false; } // Find the correct Equipment @@ -468,15 +466,8 @@ namespace UserDefinedComponents { UserAirTerminal(CompNum).report(); } - void GetUserDefinedComponents() + void GetUserDefinedPlantComponents() { - - // SUBROUTINE INFORMATION: - // AUTHOR B. Griffith - // DATE WRITTEN Jan 2012 - // MODIFIED na - // RE-ENGINEERED na - static ObjexxFCL::gio::Fmt fmtLD("*"); bool ErrorsFound(false); @@ -502,7 +493,6 @@ namespace UserDefinedComponents { // need to make sure GetEMSInput has run... - cCurrentModuleObject = "PlantComponent:UserDefined"; NumUserPlantComps = inputProcessor->getNumObjectsFound(cCurrentModuleObject); if (NumUserPlantComps > 0) { UserPlantComp.allocate(NumUserPlantComps); @@ -545,21 +535,21 @@ namespace UserDefinedComponents { LoopStr = General::RoundSigDigits(ConnectionLoop); int aArgCount = (ConnectionLoop - 1) * 6 + 3; UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - ConnectionLoop, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + ConnectionLoop, + DataLoopNode::ObjectIsNotParent); UserPlantComp(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - ConnectionLoop, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + ConnectionLoop, + DataLoopNode::ObjectIsNotParent); BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes " + LoopStr); @@ -707,16 +697,16 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(27)) { UserPlantComp(CompLoop).Air.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(27), - ErrorsFound, - cCurrentModuleObject, - UserPlantComp(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_OutsideAirReference, - 1, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + UserPlantComp(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, + 1, + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable( - "Inlet Temperature for Air Connection", UserPlantComp(CompLoop).Name, "[C]", UserPlantComp(CompLoop).Air.InletTemp); + "Inlet Temperature for Air Connection", UserPlantComp(CompLoop).Name, "[C]", UserPlantComp(CompLoop).Air.InletTemp); SetupEMSInternalVariable("Inlet Mass Flow Rate for Air Connection", UserPlantComp(CompLoop).Name, "[kg/s]", @@ -726,23 +716,23 @@ namespace UserDefinedComponents { "[kgWater/kgDryAir]", UserPlantComp(CompLoop).Air.InletHumRat); SetupEMSInternalVariable( - "Inlet Density for Air Connection", UserPlantComp(CompLoop).Name, "[kg/m3]", UserPlantComp(CompLoop).Air.InletRho); + "Inlet Density for Air Connection", UserPlantComp(CompLoop).Name, "[kg/m3]", UserPlantComp(CompLoop).Air.InletRho); SetupEMSInternalVariable( - "Inlet Specific Heat for Air Connection", UserPlantComp(CompLoop).Name, "[J/kg-C]", UserPlantComp(CompLoop).Air.InletCp); + "Inlet Specific Heat for Air Connection", UserPlantComp(CompLoop).Name, "[J/kg-C]", UserPlantComp(CompLoop).Air.InletCp); } if (!lAlphaFieldBlanks(28)) { UserPlantComp(CompLoop).Air.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(28), - ErrorsFound, - cCurrentModuleObject, - UserPlantComp(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_ReliefAir, - 1, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + UserPlantComp(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_ReliefAir, + 1, + DataLoopNode::ObjectIsNotParent); // outlet air node results SetupEMSActuator( - "Air Connection", UserPlantComp(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserPlantComp(CompLoop).Air.OutletTemp); + "Air Connection", UserPlantComp(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserPlantComp(CompLoop).Air.OutletTemp); SetupEMSActuator("Air Connection", UserPlantComp(CompLoop).Name, "Outlet Humidity Ratio", @@ -759,11 +749,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(29)) { WaterManager::SetupTankDemandComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(29), - ErrorsFound, - UserPlantComp(CompLoop).Water.SupplyTankID, - UserPlantComp(CompLoop).Water.SupplyTankDemandARRID); + cCurrentModuleObject, + cAlphaArgs(29), + ErrorsFound, + UserPlantComp(CompLoop).Water.SupplyTankID, + UserPlantComp(CompLoop).Water.SupplyTankDemandARRID); UserPlantComp(CompLoop).Water.SuppliedByWaterSystem = true; SetupEMSActuator("Water System", @@ -776,11 +766,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(30)) { WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(30), - ErrorsFound, - UserPlantComp(CompLoop).Water.CollectionTankID, - UserPlantComp(CompLoop).Water.CollectionTankSupplyARRID); + cCurrentModuleObject, + cAlphaArgs(30), + ErrorsFound, + UserPlantComp(CompLoop).Water.CollectionTankID, + UserPlantComp(CompLoop).Water.CollectionTankSupplyARRID); UserPlantComp(CompLoop).Water.CollectsToWaterSystem = true; SetupEMSActuator("Water System", UserPlantComp(CompLoop).Name, @@ -875,7 +865,15 @@ namespace UserDefinedComponents { } cCurrentModuleObject = "Coil:UserDefined"; + inputProcessor->getObjectDefMaxArgs(cCurrentModuleObject, TotalArgs, NumAlphas, NumNums); + + cAlphaFieldNames.allocate(NumAlphas); + cAlphaArgs.allocate(NumAlphas); + lAlphaFieldBlanks.dimension(NumAlphas, false); + rNumericArgs.dimension(NumNums, 0.0); + NumUserCoils = inputProcessor->getNumObjectsFound(cCurrentModuleObject); + if (NumUserCoils > 0) { UserCoil.allocate(NumUserCoils); CheckUserCoilName.dimension(NumUserCoils, true); @@ -894,13 +892,15 @@ namespace UserDefinedComponents { UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); // ErrorsFound will be set to True if problem was found, left untouched otherwise - GlobalNames::VerifyUniqueCoilName(cCurrentModuleObject, cAlphaArgs(1), ErrorsFound, cCurrentModuleObject + " Name"); + GlobalNames::VerifyUniqueCoilName(cCurrentModuleObject, cAlphaArgs(1), ErrorsFound, + cCurrentModuleObject + " Name"); UserCoil(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), + DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -913,7 +913,8 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), + DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -930,14 +931,15 @@ namespace UserDefinedComponents { UserCoil(CompLoop).NumAirConnections = NumAirConnections; for (int ConnectionLoop = 1; ConnectionLoop <= NumAirConnections; ++ConnectionLoop) { int aArgCount = (ConnectionLoop - 1) * 2 + 4; - UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - UserCoil(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 1, - DataLoopNode::ObjectIsNotParent); + UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + UserCoil(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables @@ -962,14 +964,15 @@ namespace UserDefinedComponents { "[J/kg-C]", UserCoil(CompLoop).Air(ConnectionLoop).InletCp); - UserCoil(CompLoop).Air(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - UserCoil(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 1, - DataLoopNode::ObjectIsNotParent); + UserCoil(CompLoop).Air(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + UserCoil(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Air Connection " + LoopStr, UserCoil(CompLoop).Name, "Outlet Temperature", @@ -989,7 +992,9 @@ namespace UserDefinedComponents { lDummy, UserCoil(CompLoop).Air(ConnectionLoop).OutletMassFlowRate); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Air Nodes " + LoopStr); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), + cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), + "Air Nodes " + LoopStr); } if (!lAlphaFieldBlanks(8)) { @@ -1009,23 +1014,24 @@ namespace UserDefinedComponents { if (UserCoil(CompLoop).PlantIsConnected) { // get input UserCoil(CompLoop).Loop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(9), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - 2, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + 2, + DataLoopNode::ObjectIsNotParent); UserCoil(CompLoop).Loop.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(10), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - 2, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + 2, + DataLoopNode::ObjectIsNotParent); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), cAlphaArgs(10), "Plant Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), + cAlphaArgs(10), "Plant Nodes"); // this model is only for plant connections that are "Demand" UserCoil(CompLoop).Loop.HowLoadServed = DataPlant::HowMet_NoneDemand; @@ -1035,18 +1041,22 @@ namespace UserDefinedComponents { // Setup Internal Variables // model input related internal variables SetupEMSInternalVariable( - "Inlet Temperature for Plant Connection", UserCoil(CompLoop).Name, "[C]", UserCoil(CompLoop).Loop.InletTemp); + "Inlet Temperature for Plant Connection", UserCoil(CompLoop).Name, "[C]", + UserCoil(CompLoop).Loop.InletTemp); SetupEMSInternalVariable("Inlet Mass Flow Rate for Plant Connection", UserCoil(CompLoop).Name, "[kg/s]", UserCoil(CompLoop).Loop.InletMassFlowRate); SetupEMSInternalVariable( - "Inlet Density for Plant Connection", UserCoil(CompLoop).Name, "[kg/m3]", UserCoil(CompLoop).Loop.InletRho); + "Inlet Density for Plant Connection", UserCoil(CompLoop).Name, "[kg/m3]", + UserCoil(CompLoop).Loop.InletRho); SetupEMSInternalVariable( - "Inlet Specific Heat for Plant Connection", UserCoil(CompLoop).Name, "[J/kg-C]", UserCoil(CompLoop).Loop.InletCp); + "Inlet Specific Heat for Plant Connection", UserCoil(CompLoop).Name, "[J/kg-C]", + UserCoil(CompLoop).Loop.InletCp); // model results related actuators SetupEMSActuator( - "Plant Connection", UserCoil(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserCoil(CompLoop).Loop.OutletTemp); + "Plant Connection", UserCoil(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, + UserCoil(CompLoop).Loop.OutletTemp); SetupEMSActuator("Plant Connection", UserCoil(CompLoop).Name, "Mass Flow Rate", @@ -1077,11 +1087,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(11)) { WaterManager::SetupTankDemandComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(11), - ErrorsFound, - UserCoil(CompLoop).Water.SupplyTankID, - UserCoil(CompLoop).Water.SupplyTankDemandARRID); + cCurrentModuleObject, + cAlphaArgs(11), + ErrorsFound, + UserCoil(CompLoop).Water.SupplyTankID, + UserCoil(CompLoop).Water.SupplyTankDemandARRID); UserCoil(CompLoop).Water.SuppliedByWaterSystem = true; SetupEMSActuator("Water System", @@ -1094,11 +1104,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(12)) { WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(12), - ErrorsFound, - UserCoil(CompLoop).Water.CollectionTankID, - UserCoil(CompLoop).Water.CollectionTankSupplyARRID); + cCurrentModuleObject, + cAlphaArgs(12), + ErrorsFound, + UserCoil(CompLoop).Water.CollectionTankID, + UserCoil(CompLoop).Water.CollectionTankSupplyARRID); UserCoil(CompLoop).Water.CollectsToWaterSystem = true; SetupEMSActuator("Water System", UserCoil(CompLoop).Name, @@ -1110,9 +1120,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(13)) { - UserCoil(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(13), DataHeatBalance::Zone); + UserCoil(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(13), + DataHeatBalance::Zone); if (UserCoil(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(13)); + ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + + ": Ambient Zone Name not found = " + cAlphaArgs(13)); ErrorsFound = true; } else { UserCoil(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1178,10 +1190,48 @@ namespace UserDefinedComponents { } // NumUserCoils > 0 if (ErrorsFound) { - ShowFatalError("GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); + ShowFatalError( + "GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); + } + } + + void GetUserDefinedComponents() + { + + // SUBROUTINE INFORMATION: + // AUTHOR B. Griffith + // DATE WRITTEN Jan 2012 + // MODIFIED na + // RE-ENGINEERED na + + static ObjexxFCL::gio::Fmt fmtLD("*"); + + bool ErrorsFound(false); + int NumAlphas; // Number of elements in the alpha array + int NumNums; // Number of elements in the numeric array + int IOStat; // IO Status when calling get input subroutine + int TotalArgs; // argument for call to GetObjectDefMaxArgs + Array1D_string cAlphaFieldNames; + Array1D_bool lAlphaFieldBlanks; + Array1D_string cAlphaArgs; + Array1D rNumericArgs; + std::string cCurrentModuleObject; + std::string LoopStr; + static bool lDummy; // Fix Changed to static: Passed to SetupEMSActuator as source of persistent Reference + + if (GetPlantCompInput) { + GetUserDefinedPlantComponents(); + GetPlantCompInput = false; } cCurrentModuleObject = "ZoneHVAC:ForcedAir:UserDefined"; + inputProcessor->getObjectDefMaxArgs(cCurrentModuleObject, TotalArgs, NumAlphas, NumNums); + + cAlphaFieldNames.allocate(NumAlphas); + cAlphaArgs.allocate(NumAlphas); + lAlphaFieldBlanks.dimension(NumAlphas, false); + rNumericArgs.dimension(NumNums, 0.0); + NumUserZoneAir = inputProcessor->getNumObjectsFound(cCurrentModuleObject); if (NumUserZoneAir > 0) { UserZoneAirHVAC.allocate(NumUserZoneAir); @@ -1203,7 +1253,8 @@ namespace UserDefinedComponents { // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), + DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1216,7 +1267,8 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), + DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1228,13 +1280,14 @@ namespace UserDefinedComponents { } UserZoneAirHVAC(CompLoop).ZoneAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), - ErrorsFound, - cCurrentModuleObject, - UserZoneAirHVAC(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 1, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + UserZoneAirHVAC( + CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Primary Air Connection", UserZoneAirHVAC(CompLoop).Name, @@ -1277,13 +1330,14 @@ namespace UserDefinedComponents { lDummy, UserZoneAirHVAC(CompLoop).ZoneAir.InletMassFlowRate); UserZoneAirHVAC(CompLoop).ZoneAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), - ErrorsFound, - cCurrentModuleObject, - UserZoneAirHVAC(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 1, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + UserZoneAirHVAC( + CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Primary Air Connection", UserZoneAirHVAC(CompLoop).Name, "Outlet Temperature", @@ -1304,14 +1358,15 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).ZoneAir.OutletMassFlowRate); if (!lAlphaFieldBlanks(6)) { - UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), - ErrorsFound, - cCurrentModuleObject, - UserZoneAirHVAC(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 2, - DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(6), + ErrorsFound, + cCurrentModuleObject, + UserZoneAirHVAC(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 2, + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Secondary Air Connection", UserZoneAirHVAC(CompLoop).Name, @@ -1339,14 +1394,15 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(7)) { - UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(7), - ErrorsFound, - cCurrentModuleObject, - UserZoneAirHVAC(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 2, - DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(7), + ErrorsFound, + cCurrentModuleObject, + UserZoneAirHVAC(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 2, + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Secondary Air Connection", UserZoneAirHVAC(CompLoop).Name, "Outlet Temperature", @@ -1367,7 +1423,8 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).SourceAir.OutletMassFlowRate); } - if ((UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum > 0) && (UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum > 0)) { + if ((UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum > 0) && + (UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum > 0)) { // CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(6),cAlphaArgs(7),'Air Nodes') } @@ -1377,25 +1434,32 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).Loop.allocate(NumPlantConnections); for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { int aArgCount = (ConnectionLoop - 1) * 2 + 8; - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent); - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); + UserZoneAirHVAC(CompLoop).Loop( + ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).Loop( + ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), + cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), + "Plant Nodes"); UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; - UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; + UserZoneAirHVAC(CompLoop).Loop( + ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables ObjexxFCL::gio::write(LoopStr, fmtLD) << ConnectionLoop; strip(LoopStr); @@ -1453,11 +1517,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(14)) { WaterManager::SetupTankDemandComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(14), - ErrorsFound, - UserZoneAirHVAC(CompLoop).Water.SupplyTankID, - UserZoneAirHVAC(CompLoop).Water.SupplyTankDemandARRID); + cCurrentModuleObject, + cAlphaArgs(14), + ErrorsFound, + UserZoneAirHVAC(CompLoop).Water.SupplyTankID, + UserZoneAirHVAC(CompLoop).Water.SupplyTankDemandARRID); UserZoneAirHVAC(CompLoop).Water.SuppliedByWaterSystem = true; SetupEMSActuator("Water System", @@ -1470,11 +1534,12 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(15)) { WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(15), - ErrorsFound, - UserZoneAirHVAC(CompLoop).Water.CollectionTankID, - UserZoneAirHVAC(CompLoop).Water.CollectionTankSupplyARRID); + cCurrentModuleObject, + cAlphaArgs(15), + ErrorsFound, + UserZoneAirHVAC(CompLoop).Water.CollectionTankID, + UserZoneAirHVAC( + CompLoop).Water.CollectionTankSupplyARRID); UserZoneAirHVAC(CompLoop).Water.CollectsToWaterSystem = true; SetupEMSActuator("Water System", UserZoneAirHVAC(CompLoop).Name, @@ -1486,9 +1551,12 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(16)) { - UserZoneAirHVAC(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(16), DataHeatBalance::Zone); + UserZoneAirHVAC(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(16), + DataHeatBalance::Zone); if (UserZoneAirHVAC(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(16)); + ShowSevereError( + cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + + cAlphaArgs(16)); ErrorsFound = true; } else { UserZoneAirHVAC(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1552,10 +1620,19 @@ namespace UserDefinedComponents { } // NumUserZoneAir > 0 if (ErrorsFound) { - ShowFatalError("GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); + ShowFatalError( + "GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); } cCurrentModuleObject = "AirTerminal:SingleDuct:UserDefined"; + + inputProcessor->getObjectDefMaxArgs(cCurrentModuleObject, TotalArgs, NumAlphas, NumNums); + + cAlphaFieldNames.allocate(NumAlphas); + cAlphaArgs.allocate(NumAlphas); + lAlphaFieldBlanks.dimension(NumAlphas, false); + rNumericArgs.dimension(NumNums, 0.0); + NumUserAirTerminals = inputProcessor->getNumObjectsFound(cCurrentModuleObject); if (NumUserAirTerminals > 0) { UserAirTerminal.allocate(NumUserAirTerminals); @@ -1577,7 +1654,8 @@ namespace UserDefinedComponents { // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), + DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1590,7 +1668,8 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), + DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1602,14 +1681,16 @@ namespace UserDefinedComponents { } UserAirTerminal(CompLoop).AirLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), - ErrorsFound, - cCurrentModuleObject, - UserAirTerminal(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 1, - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(4)); + ErrorsFound, + cCurrentModuleObject, + UserAirTerminal( + CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames( + 4)); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Primary Air Connection", UserAirTerminal(CompLoop).Name, @@ -1652,14 +1733,16 @@ namespace UserDefinedComponents { lDummy, UserAirTerminal(CompLoop).AirLoop.InletMassFlowRate); UserAirTerminal(CompLoop).AirLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), - ErrorsFound, - cCurrentModuleObject, - UserAirTerminal(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 1, - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(5)); + ErrorsFound, + cCurrentModuleObject, + UserAirTerminal( + CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames( + 5)); SetupEMSActuator("Primary Air Connection", UserAirTerminal(CompLoop).Name, "Outlet Temperature", @@ -1678,37 +1761,49 @@ namespace UserDefinedComponents { "[kg/s]", lDummy, UserAirTerminal(CompLoop).AirLoop.OutletMassFlowRate); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), cAlphaArgs(5), "Air Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), + cAlphaArgs(5), "Air Nodes"); int ADUNum = 0; for (ADUNum = 1; ADUNum <= DataDefineEquip::NumAirDistUnits; ++ADUNum) { - if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == DataDefineEquip::AirDistUnit(ADUNum).OutletNodeNum) { + if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == + DataDefineEquip::AirDistUnit(ADUNum).OutletNodeNum) { // AirDistUnit(ADUNum)%InletNodeNum = IndUnitIUNum)%InletNodeNum UserAirTerminal(CompLoop).ADUNum = ADUNum; } } // one assumes if there isn't one assigned, it's an error? if (UserAirTerminal(CompLoop).ADUNum == 0) { - ShowSevereError("GetUserDefinedComponents: No matching Air Distribution Unit for " + cCurrentModuleObject + " = " + + ShowSevereError("GetUserDefinedComponents: No matching Air Distribution Unit for " + + cCurrentModuleObject + " = " + UserAirTerminal(CompLoop).Name); - ShowContinueError("...should have outlet node=" + DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum)); + ShowContinueError("...should have outlet node=" + + DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum)); // ErrorsFound=.TRUE. } // Fill the Zone Equipment data with the inlet node number of this unit. for (int CtrlZone = 1; CtrlZone <= DataGlobals::NumOfZones; ++CtrlZone) { if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; - for (int SupAirIn = 1; SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { - if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { - if (DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { + for (int SupAirIn = 1; + SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { + if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == + DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { + if (DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > + 0) { ShowSevereError("Error in connecting a terminal unit to a zone"); - ShowContinueError(DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum) + " already connects to another zone"); - ShowContinueError("Occurs for terminal unit " + cCurrentModuleObject + " = " + UserAirTerminal(CompLoop).Name); + ShowContinueError( + DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum) + + " already connects to another zone"); + ShowContinueError("Occurs for terminal unit " + cCurrentModuleObject + " = " + + UserAirTerminal(CompLoop).Name); ShowContinueError("Check terminal unit node names for errors"); ErrorsFound = true; } else { - DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).InNode = UserAirTerminal(CompLoop).AirLoop.InletNodeNum; - DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode = UserAirTerminal(CompLoop).AirLoop.OutletNodeNum; + DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool( + SupAirIn).InNode = UserAirTerminal(CompLoop).AirLoop.InletNodeNum; + DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool( + SupAirIn).OutNode = UserAirTerminal(CompLoop).AirLoop.OutletNodeNum; } UserAirTerminal(CompLoop).ActualCtrlZoneNum = CtrlZone; @@ -1717,15 +1812,16 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(6)) { - UserAirTerminal(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), - ErrorsFound, - cCurrentModuleObject, - UserAirTerminal(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 2, - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(6)); + UserAirTerminal(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(6), + ErrorsFound, + cCurrentModuleObject, + UserAirTerminal(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 2, + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(6)); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Secondary Air Connection", UserAirTerminal(CompLoop).Name, @@ -1753,15 +1849,16 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(7)) { - UserAirTerminal(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(7), - ErrorsFound, - cCurrentModuleObject, - UserAirTerminal(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 2, - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(7)); + UserAirTerminal(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(7), + ErrorsFound, + cCurrentModuleObject, + UserAirTerminal(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 2, + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(7)); SetupEMSActuator("Secondary Air Connection", UserAirTerminal(CompLoop).Name, "Outlet Temperature", @@ -1782,7 +1879,8 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).SourceAir.OutletMassFlowRate); } - if ((UserAirTerminal(CompLoop).SourceAir.InletNodeNum > 0) && (UserAirTerminal(CompLoop).SourceAir.OutletNodeNum > 0)) { + if ((UserAirTerminal(CompLoop).SourceAir.InletNodeNum > 0) && + (UserAirTerminal(CompLoop).SourceAir.OutletNodeNum > 0)) { // CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(6),cAlphaArgs(7),'Air Nodes') } @@ -1792,27 +1890,34 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).Loop.allocate(NumPlantConnections); for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { int aArgCount = (ConnectionLoop - 1) * 2 + 8; - UserAirTerminal(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(aArgCount)); - UserAirTerminal(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(aArgCount + 1)); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); + UserAirTerminal(CompLoop).Loop( + ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(aArgCount)); + UserAirTerminal(CompLoop).Loop( + ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(aArgCount + 1)); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), + cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), + "Plant Nodes"); UserAirTerminal(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; - UserAirTerminal(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; + UserAirTerminal(CompLoop).Loop( + ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables @@ -1869,11 +1974,11 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(12)) { WaterManager::SetupTankDemandComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(12), - ErrorsFound, - UserAirTerminal(CompLoop).Water.SupplyTankID, - UserAirTerminal(CompLoop).Water.SupplyTankDemandARRID); + cCurrentModuleObject, + cAlphaArgs(12), + ErrorsFound, + UserAirTerminal(CompLoop).Water.SupplyTankID, + UserAirTerminal(CompLoop).Water.SupplyTankDemandARRID); UserAirTerminal(CompLoop).Water.SuppliedByWaterSystem = true; SetupEMSActuator("Water System", @@ -1886,11 +1991,12 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(13)) { WaterManager::SetupTankSupplyComponent(cAlphaArgs(1), - cCurrentModuleObject, - cAlphaArgs(13), - ErrorsFound, - UserAirTerminal(CompLoop).Water.CollectionTankID, - UserAirTerminal(CompLoop).Water.CollectionTankSupplyARRID); + cCurrentModuleObject, + cAlphaArgs(13), + ErrorsFound, + UserAirTerminal(CompLoop).Water.CollectionTankID, + UserAirTerminal( + CompLoop).Water.CollectionTankSupplyARRID); UserAirTerminal(CompLoop).Water.CollectsToWaterSystem = true; SetupEMSActuator("Water System", UserAirTerminal(CompLoop).Name, @@ -1902,9 +2008,12 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(14)) { - UserAirTerminal(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(14), DataHeatBalance::Zone); + UserAirTerminal(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(14), + DataHeatBalance::Zone); if (UserAirTerminal(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(14)); + ShowSevereError( + cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + + cAlphaArgs(14)); ErrorsFound = true; } else { UserAirTerminal(CompLoop).Zone.DeviceHasInternalGains = true; diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index 300de2e740f..df5b36ead3b 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -55,6 +55,7 @@ #include #include #include +#include namespace EnergyPlus { @@ -172,7 +173,7 @@ namespace UserDefinedComponents { } }; - struct UserPlantComponentStruct + struct UserPlantComponentStruct : PlantComponent { // Members std::string Name; // user identifier @@ -189,6 +190,14 @@ namespace UserDefinedComponents { { } + static PlantComponent *factory(std::string const &objectName); + + void onInitLoopEquip(const PlantLocation &calledFromLocation) override; + + void getDesignCapacities(const PlantLocation &calledFromLocation, Real64 &MaxLoad, Real64 &MinLoad, Real64 &OptLoad) override; + + void simulate(const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag) override; + void initialize(int LoopNum, Real64 MyLoad); void report(int LoopNum); @@ -290,17 +299,6 @@ namespace UserDefinedComponents { extern Array1D UserZoneAirHVAC; extern Array1D UserAirTerminal; - void SimUserDefinedPlantComponent(int LoopNum, // plant loop sim call originated from - int LoopSideNum, // plant loop side sim call originated from - std::string const &EquipType, // type of equipment, 'PlantComponent:UserDefined' - std::string const &EquipName, // user name for component - int &CompIndex, - bool &InitLoopEquip, - Real64 MyLoad, - Real64 &MaxCap, - Real64 &MinCap, - Real64 &OptCap); - void SimCoilUserDefined(std::string const &EquipName, // user name for component int &CompIndex, int AirLoopNum, @@ -316,6 +314,8 @@ namespace UserDefinedComponents { void SimAirTerminalUserDefined(std::string const &CompName, bool FirstHVACIteration, int ZoneNum, int ZoneNodeNum, int &CompIndex); + void GetUserDefinedPlantComponents(); + void GetUserDefinedComponents(); void GetUserDefinedCoilIndex(std::string const &CoilName, int &CoilIndex, bool &ErrorsFound, std::string const &CurrentModuleObject); From 859516dded17ada694097e8adfc9e1b350b1f6d3 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 08:41:45 -0700 Subject: [PATCH 20/86] cleanup comments --- .../PhotovoltaicThermalCollectors.cc | 164 ------------------ .../PhotovoltaicThermalCollectors.hh | 23 --- 2 files changed, 187 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 36d045df15f..b48b0550258 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -105,12 +105,6 @@ namespace PhotovoltaicThermalCollectors { // the first model is a "simple" or "ideal" model useful for sizing, early design, or policy analyses // Simple PV/T model just converts incoming solar to electricity and temperature rise of a working fluid. - // REFERENCES: - - // OTHER NOTES: - // na - - // Using/Aliasing using namespace DataPrecisionGlobals; using namespace DataGlobals; using DataSurfaces::Surface; @@ -122,8 +116,6 @@ namespace PhotovoltaicThermalCollectors { using DataSurfaces::TotSurfaces; using namespace DataPhotovoltaics; - // Data - // MODULE PARAMETER DEFINITIONS: int const SimplePVTmodel(1001); int const LayerByLayerPVTmodel(1002); @@ -141,26 +133,12 @@ namespace PhotovoltaicThermalCollectors { static std::string const BlankString; static bool GetInputFlag(true); // First time, input is "gotten" - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: Array1D_bool CheckEquipName; int NumPVT(0); // count of all types of PVT in input file int NumSimplePVTPerform(0); // count of simple PVT performance objects in input file - // SUBROUTINE SPECIFICATIONS FOR MODULE: - // Driver/Manager Routines - - // Utility routines for module - // these would be public such as: - // PUBLIC GetPVTIncidentSolarForInternalPVLayer - // PUBLIC GetPVTCellTemp - - // Object Data Array1D PVT; - // Functions - void SimPVTcollectors(int &PVTnum, // index to PVT array. bool const FirstHVACIteration, int const CalledFrom, @@ -174,14 +152,8 @@ namespace PhotovoltaicThermalCollectors { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // Using/Aliasing using General::TrimSigDigits; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - if (GetInputFlag) { GetPVTcollectorsInput(); GetInputFlag = false; @@ -246,10 +218,6 @@ namespace PhotovoltaicThermalCollectors { // PURPOSE OF THIS SUBROUTINE: // Get input for PVT objects - // METHODOLOGY EMPLOYED: - // usual E+ methods - - // Using/Aliasing using namespace DataIPShortCuts; using namespace DataHeatBalance; using namespace DataLoopNode; @@ -263,7 +231,6 @@ namespace PhotovoltaicThermalCollectors { using ScheduleManager::GetScheduleIndex; using namespace DataPlant; // DSU - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int Item; // Item to be "gotten" int NumAlphas; // Number of Alphas for each GetObjectItem call int NumNumbers; // Number of Numbers for each GetObjectItem call @@ -538,7 +505,6 @@ namespace PhotovoltaicThermalCollectors { // PURPOSE OF THIS SUBROUTINE: // init for PVT - // Using/Aliasing using DataGlobals::AnyEnergyManagementSystemInModel; using DataGlobals::SysSizingCalc; using DataHeatBalance::QRadSWOutIncident; @@ -556,10 +522,8 @@ namespace PhotovoltaicThermalCollectors { using PlantUtilities::ScanPlantLoopsForObject; using PlantUtilities::SetComponentFlowRate; - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("InitPVTcollectors"); - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int InletNode; int OutletNode; int PVTindex; @@ -752,10 +716,6 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // Obtains hot water flow rate from the plant sizing array. - // REFERENCES: - // na - - // Using/Aliasing using namespace DataSizing; using DataHVACGlobals::Cooling; using DataHVACGlobals::Heating; @@ -775,22 +735,9 @@ namespace PhotovoltaicThermalCollectors { using DataPlant::PlantFirstSizesOkayToReport; using General::RoundSigDigits; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS - // na - - // DERIVED TYPE DEFINITIONS - // na - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int PltSizNum; // Plant Sizing index corresponding to CurLoopNum bool ErrorsFound; // If errors detected in input - // unused1208 CHARACTER(len=MaxNameLength) :: equipName ! Name of boiler object Real64 DesVolFlow; Real64 DesMassFlow; bool HardSizeNoDesRun; // Indicator to hardsize and no sizing run @@ -977,29 +924,10 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // decide if PVT should be in cooling or heat mode and if it should be bypassed or not - // REFERENCES: - // na - - // Using/Aliasing using DataHeatBalance::QRadSWOutIncident; using DataLoopNode::Node; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static int SurfNum(0); - // INTEGER :: PlantLoopNum = 0 - // REAL(r64) :: mdot = 0.0D0 SurfNum = PVT(PVTnum).SurfNum; @@ -1033,36 +961,15 @@ namespace PhotovoltaicThermalCollectors { } } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { - // PlantLoopNum = PVT(PVTNum)%PlantLoopNum - // mdot = Node(PVT(PVTNum)%PlantInletNodeNum)%MassFlowRate - // If (.NOT. Allocated(PlantReport)) RETURN ! this can happen early before plant is setup if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { if (QRadSWOutIncident(SurfNum) > MinIrradiance) { // is heating wanted? - - // IF (mdot > 0.0D0) THEN - // If (PlantReport(PlantLoopNum)%HeatingDemand > 0.0) THEN PVT(PVTnum).HeatingUseful = true; - // PVT(PVTnum)%CoolingUseful = .FALSE. PVT(PVTnum).BypassDamperOff = true; - // ELSE - // PVT(PVTnum)%HeatingUseful = .FALSE. - // PVT(PVTnum)%CoolingUseful = .TRUE. - // PVT(PVTnum)%BypassDamperOff = .FALSE. - // ENDIF - } else { // is cooling wanted? - // IF (mdot > 0.0D0) THEN - // If (PlantReport(PlantLoopNum)%CoolingDemand > 0.0) THEN - // PVT(PVTnum)%CoolingUseful = .TRUE. - // PVT(PVTnum)%HeatingUseful = .FALSE. - // PVT(PVTnum)%BypassDamperOff = .TRUE. - // ELSE PVT(PVTnum).CoolingUseful = false; - // PVT(PVTnum)%HeatingUseful = .TRUE. PVT(PVTnum).BypassDamperOff = false; - // ENDIF } } } @@ -1083,10 +990,6 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // Current model is "simple" fixed efficiency and simple night sky balance for cooling - // REFERENCES: - // na - - // Using/Aliasing using ConvectionCoefficients::InitExteriorConvectionCoeff; using DataEnvironment::OutBaroPress; using DataEnvironment::OutDryBulbTemp; @@ -1102,20 +1005,8 @@ namespace PhotovoltaicThermalCollectors { using Psychrometrics::PsyTwbFnTdbWPb; using ScheduleManager::GetCurrentScheduleValue; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("CalcPVTcollectors"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - static int InletNode(0); static int OutletNode(0); static Real64 Eff(0.0); @@ -1136,7 +1027,6 @@ namespace PhotovoltaicThermalCollectors { static Real64 WetBulbInlet(0.0); static Real64 DewPointInlet(0.0); - // flow SurfNum = PVT(PVTnum).SurfNum; RoughSurf = VerySmooth; @@ -1296,33 +1186,10 @@ namespace PhotovoltaicThermalCollectors { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataLoopNode::Node; using PlantUtilities::SafeCopyPlantNode; using Psychrometrics::PsyHFnTdbW; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int InletNode; int OutletNode; @@ -1367,30 +1234,6 @@ namespace PhotovoltaicThermalCollectors { // MODIFIED na // RE-ENGINEERED na - // PURPOSE OF THIS SUBROUTINE: - // - - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // USE STATEMENTS: - // na - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static int PVTnum(0); static int loop(0); @@ -1425,10 +1268,8 @@ namespace PhotovoltaicThermalCollectors { // This function looks up the given PVT and returns the air inlet node number. // If incorrect PVT name is given, ErrorsFound is returned as true and node number as zero. - // Return value int NodeNum; // node number returned - // FUNCTION LOCAL VARIABLE DECLARATIONS: int WhichPVT; if (GetInputFlag) { @@ -1461,10 +1302,8 @@ namespace PhotovoltaicThermalCollectors { // This function looks up the given PVT and returns the air outlet node number. // If incorrect PVT name is given, ErrorsFound is returned as true and node number as zero. - // Return value int NodeNum; // node number returned - // FUNCTION LOCAL VARIABLE DECLARATIONS: int WhichPVT; if (GetInputFlag) { @@ -1484,9 +1323,6 @@ namespace PhotovoltaicThermalCollectors { return NodeNum; } - //===================== Utility/Other routines for module. - // Insert as appropriate - } // namespace PhotovoltaicThermalCollectors } // namespace EnergyPlus diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index ac7cbf945bb..d49007cdea5 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -60,10 +60,6 @@ namespace EnergyPlus { namespace PhotovoltaicThermalCollectors { - // Using/Aliasing - - // Data - // MODULE PARAMETER DEFINITIONS: extern int const SimplePVTmodel; extern int const LayerByLayerPVTmodel; @@ -78,23 +74,10 @@ namespace PhotovoltaicThermalCollectors { extern Real64 const SimplePVTWaterSizeFactor; // [ m3/s/m2 ] average of collectors in SolarCollectors.idf - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: extern Array1D_bool CheckEquipName; extern int NumPVT; // count of all types of PVT in input file extern int NumSimplePVTPerform; // count of simple PVT performance objects in input file - // SUBROUTINE SPECIFICATIONS FOR MODULE: - // Driver/Manager Routines - - // Utility routines for module - // these would be public such as: - // PUBLIC GetPVTIncidentSolarForInternalPVLayer - // PUBLIC GetPVTCellTemp - - // Types - struct SimplePVTModelStruct { // Members @@ -182,11 +165,8 @@ namespace PhotovoltaicThermalCollectors { } }; - // Object Data extern Array1D PVT; - // Functions - void SimPVTcollectors(int &PVTnum, // index to PVT array. bool const FirstHVACIteration, int const CalledFrom, @@ -216,9 +196,6 @@ namespace PhotovoltaicThermalCollectors { bool &ErrorsFound ); - //===================== Utility/Other routines for module. - // Insert as appropriate - } // namespace PhotovoltaicThermalCollectors } // namespace EnergyPlus From 47a61af7dbeb73f56cf265c322a28262a58518ee Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 09:13:05 -0700 Subject: [PATCH 21/86] cleanup usings --- .../PhotovoltaicThermalCollectors.cc | 470 +++++++----------- .../PhotovoltaicThermalCollectors.hh | 5 - 2 files changed, 190 insertions(+), 285 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index b48b0550258..53f3f48ed5c 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -55,8 +55,6 @@ // EnergyPlus Headers #include #include -#include -#include #include #include #include @@ -64,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -74,7 +71,6 @@ #include #include #include -#include #include #include #include @@ -99,23 +95,12 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // The approach is to have one PVT structure that works with different models. - // the PVT modle reuses photovoltaic modeling in Photovoltaics.cc for electricity generation. + // the PVT model reuses photovoltaic modeling in Photovoltaics.cc for electricity generation. // the electric load center and "generator" is all accessed thru PV objects and models. // this module is for the thermal portion of PVT. // the first model is a "simple" or "ideal" model useful for sizing, early design, or policy analyses // Simple PV/T model just converts incoming solar to electricity and temperature rise of a working fluid. - using namespace DataPrecisionGlobals; - using namespace DataGlobals; - using DataSurfaces::Surface; - using DataSurfaces::SurfaceClass_Detached_B; - using DataSurfaces::SurfaceClass_Detached_F; - using DataSurfaces::SurfaceClass_Shading; - using DataSurfaces::SurfSunlitArea; - using DataSurfaces::SurfSunlitFrac; - using DataSurfaces::TotSurfaces; - using namespace DataPhotovoltaics; - int const SimplePVTmodel(1001); int const LayerByLayerPVTmodel(1002); @@ -152,8 +137,6 @@ namespace PhotovoltaicThermalCollectors { // MODIFIED na // RE-ENGINEERED na - using General::TrimSigDigits; - if (GetInputFlag) { GetPVTcollectorsInput(); GetInputFlag = false; @@ -167,12 +150,12 @@ namespace PhotovoltaicThermalCollectors { } } else { if (PVTnum > NumPVT || PVTnum < 1) { - ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + TrimSigDigits(PVTnum) + - ", Number of PVT units=" + TrimSigDigits(NumPVT) + ", Entered Unit name=" + PVTName()); + ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + General::TrimSigDigits(PVTnum) + + ", Number of PVT units=" + General::TrimSigDigits(NumPVT) + ", Entered Unit name=" + PVTName()); } if (CheckEquipName(PVTnum)) { if (PVTName != PVT(PVTnum).Name) { - ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + TrimSigDigits(PVTnum) + ", Unit name=" + PVTName() + + ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + General::TrimSigDigits(PVTnum) + ", Unit name=" + PVTName() + ", stored name for that index=" + PVT(PVTnum).Name); } CheckEquipName(PVTnum) = false; @@ -180,8 +163,8 @@ namespace PhotovoltaicThermalCollectors { } } else { if (PVTnum > NumPVT || PVTnum < 1) { - ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + TrimSigDigits(PVTnum) + - ", Number of PVT units=" + TrimSigDigits(NumPVT) + ", Entered Unit name=" + PVTName()); + ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + General::TrimSigDigits(PVTnum) + + ", Number of PVT units=" + General::TrimSigDigits(NumPVT) + ", Entered Unit name=" + PVTName()); } } // compName present @@ -218,19 +201,6 @@ namespace PhotovoltaicThermalCollectors { // PURPOSE OF THIS SUBROUTINE: // Get input for PVT objects - using namespace DataIPShortCuts; - using namespace DataHeatBalance; - using namespace DataLoopNode; - using BranchNodeConnections::TestCompSet; - using DataEnvironment::StdRhoAir; - using DataSizing::AutoSize; - using General::RoundSigDigits; - using NodeInputManager::GetOnlySingleNode; - using PlantUtilities::RegisterPlantCompDesignFlow; - using ReportSizingManager::ReportSizingOutput; - using ScheduleManager::GetScheduleIndex; - using namespace DataPlant; // DSU - int Item; // Item to be "gotten" int NumAlphas; // Number of Alphas for each GetObjectItem call int NumNumbers; // Number of Numbers for each GetObjectItem call @@ -243,80 +213,80 @@ namespace PhotovoltaicThermalCollectors { Array1D tmpSimplePVTperf; // first load the performance object info into temporary structure - cCurrentModuleObject = "SolarCollectorPerformance:PhotovoltaicThermal:Simple"; - NumSimplePVTPerform = inputProcessor->getNumObjectsFound(cCurrentModuleObject); + DataIPShortCuts::cCurrentModuleObject = "SolarCollectorPerformance:PhotovoltaicThermal:Simple"; + NumSimplePVTPerform = inputProcessor->getNumObjectsFound(DataIPShortCuts::cCurrentModuleObject); if (NumSimplePVTPerform > 0) { tmpSimplePVTperf.allocate(NumSimplePVTPerform); for (Item = 1; Item <= NumSimplePVTPerform; ++Item) { - inputProcessor->getObjectItem(cCurrentModuleObject, + inputProcessor->getObjectItem(DataIPShortCuts::cCurrentModuleObject, Item, - cAlphaArgs, + DataIPShortCuts::cAlphaArgs, NumAlphas, - rNumericArgs, + DataIPShortCuts::rNumericArgs, NumNumbers, IOStatus, _, - lAlphaFieldBlanks, - cAlphaFieldNames, - cNumericFieldNames); - if (UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound)) continue; + DataIPShortCuts::lAlphaFieldBlanks, + DataIPShortCuts::cAlphaFieldNames, + DataIPShortCuts::cNumericFieldNames); + if (UtilityRoutines::IsNameEmpty(DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cCurrentModuleObject, ErrorsFound)) continue; - tmpSimplePVTperf(Item).Name = cAlphaArgs(1); - if (UtilityRoutines::SameString(cAlphaArgs(2), "Fixed")) { + tmpSimplePVTperf(Item).Name = DataIPShortCuts::cAlphaArgs(1); + if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(2), "Fixed")) { tmpSimplePVTperf(Item).ThermEfficMode = FixedThermEffic; - } else if (UtilityRoutines::SameString(cAlphaArgs(2), "Scheduled")) { + } else if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(2), "Scheduled")) { tmpSimplePVTperf(Item).ThermEfficMode = ScheduledThermEffic; } else { - ShowSevereError("Invalid " + cAlphaFieldNames(2) + " = " + cAlphaArgs(2)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ErrorsFound = true; } - tmpSimplePVTperf(Item).ThermalActiveFract = rNumericArgs(1); - tmpSimplePVTperf(Item).ThermEffic = rNumericArgs(2); + tmpSimplePVTperf(Item).ThermalActiveFract = DataIPShortCuts::rNumericArgs(1); + tmpSimplePVTperf(Item).ThermEffic = DataIPShortCuts::rNumericArgs(2); - tmpSimplePVTperf(Item).ThermEffSchedNum = GetScheduleIndex(cAlphaArgs(3)); + tmpSimplePVTperf(Item).ThermEffSchedNum = ScheduleManager::GetScheduleIndex(DataIPShortCuts::cAlphaArgs(3)); if ((tmpSimplePVTperf(Item).ThermEffSchedNum == 0) && (tmpSimplePVTperf(Item).ThermEfficMode == ScheduledThermEffic)) { - ShowSevereError("Invalid " + cAlphaFieldNames(3) + " = " + cAlphaArgs(3)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(3) + " = " + DataIPShortCuts::cAlphaArgs(3)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ErrorsFound = true; } - tmpSimplePVTperf(Item).SurfEmissivity = rNumericArgs(3); + tmpSimplePVTperf(Item).SurfEmissivity = DataIPShortCuts::rNumericArgs(3); } } // NumSimplePVTPerform > 0 // now get main PVT objects - cCurrentModuleObject = "SolarCollector:FlatPlate:PhotovoltaicThermal"; - NumPVT = inputProcessor->getNumObjectsFound(cCurrentModuleObject); + DataIPShortCuts::cCurrentModuleObject = "SolarCollector:FlatPlate:PhotovoltaicThermal"; + NumPVT = inputProcessor->getNumObjectsFound(DataIPShortCuts::cCurrentModuleObject); PVT.allocate(NumPVT); CheckEquipName.dimension(NumPVT, true); for (Item = 1; Item <= NumPVT; ++Item) { - inputProcessor->getObjectItem(cCurrentModuleObject, + inputProcessor->getObjectItem(DataIPShortCuts::cCurrentModuleObject, Item, - cAlphaArgs, + DataIPShortCuts::cAlphaArgs, NumAlphas, - rNumericArgs, + DataIPShortCuts::rNumericArgs, NumNumbers, IOStatus, _, - lAlphaFieldBlanks, - cAlphaFieldNames, - cNumericFieldNames); - if (UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound)) continue; + DataIPShortCuts::lAlphaFieldBlanks, + DataIPShortCuts::cAlphaFieldNames, + DataIPShortCuts::cNumericFieldNames); + if (UtilityRoutines::IsNameEmpty(DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cCurrentModuleObject, ErrorsFound)) continue; - PVT(Item).Name = cAlphaArgs(1); - PVT(Item).TypeNum = TypeOf_PVTSolarCollectorFlatPlate; // DSU, assigned in DataPlant + PVT(Item).Name = DataIPShortCuts::cAlphaArgs(1); + PVT(Item).TypeNum = DataPlant::TypeOf_PVTSolarCollectorFlatPlate; // DSU, assigned in DataPlant - PVT(Item).SurfNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), Surface); + PVT(Item).SurfNum = UtilityRoutines::FindItemInList(DataIPShortCuts::cAlphaArgs(2), DataSurfaces::Surface); // check surface if (PVT(Item).SurfNum == 0) { - if (lAlphaFieldBlanks(2)) { - ShowSevereError("Invalid " + cAlphaFieldNames(2) + " = " + cAlphaArgs(2)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + if (DataIPShortCuts::lAlphaFieldBlanks(2)) { + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ShowContinueError("Surface name cannot be blank."); } else { - ShowSevereError("Invalid " + cAlphaFieldNames(2) + " = " + cAlphaArgs(2)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ShowContinueError("Surface was not found."); } ErrorsFound = true; @@ -324,105 +294,105 @@ namespace PhotovoltaicThermalCollectors { // ! Found one -- make sure has right parameters for PVT SurfNum = PVT(Item).SurfNum; - if (!Surface(PVT(Item).SurfNum).ExtSolar) { - ShowSevereError("Invalid " + cAlphaFieldNames(2) + " = " + cAlphaArgs(2)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + if (!DataSurfaces::Surface(PVT(Item).SurfNum).ExtSolar) { + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ShowContinueError("Surface must be exposed to solar."); ErrorsFound = true; } // check surface orientation, warn if upside down - if ((Surface(SurfNum).Tilt < -95.0) || (Surface(SurfNum).Tilt > 95.0)) { - ShowWarningError("Suspected input problem with " + cAlphaFieldNames(2) + " = " + cAlphaArgs(2)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + if ((DataSurfaces::Surface(SurfNum).Tilt < -95.0) || (DataSurfaces::Surface(SurfNum).Tilt > 95.0)) { + ShowWarningError("Suspected input problem with " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ShowContinueError("Surface used for solar collector faces down"); - ShowContinueError("Surface tilt angle (degrees from ground outward normal) = " + RoundSigDigits(Surface(SurfNum).Tilt, 2)); + ShowContinueError("Surface tilt angle (degrees from ground outward normal) = " + General::RoundSigDigits(DataSurfaces::Surface(SurfNum).Tilt, 2)); } } // check surface - if (lAlphaFieldBlanks(3)) { - ShowSevereError("Invalid " + cAlphaFieldNames(3) + " = " + cAlphaArgs(3)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); - ShowContinueError(cAlphaFieldNames(3) + ", name cannot be blank."); + if (DataIPShortCuts::lAlphaFieldBlanks(3)) { + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(3) + " = " + DataIPShortCuts::cAlphaArgs(3)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); + ShowContinueError(DataIPShortCuts::cAlphaFieldNames(3) + ", name cannot be blank."); ErrorsFound = true; } else { - PVT(Item).PVTModelName = cAlphaArgs(3); + PVT(Item).PVTModelName = DataIPShortCuts::cAlphaArgs(3); ThisParamObj = UtilityRoutines::FindItemInList(PVT(Item).PVTModelName, tmpSimplePVTperf); if (ThisParamObj > 0) { PVT(Item).Simple = tmpSimplePVTperf(ThisParamObj); // entire structure assigned // do one-time setups on input data - PVT(Item).AreaCol = Surface(PVT(Item).SurfNum).Area * PVT(Item).Simple.ThermalActiveFract; + PVT(Item).AreaCol = DataSurfaces::Surface(PVT(Item).SurfNum).Area * PVT(Item).Simple.ThermalActiveFract; PVT(Item).PVTModelType = SimplePVTmodel; } else { - ShowSevereError("Invalid " + cAlphaFieldNames(3) + " = " + cAlphaArgs(3)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); - ShowContinueError(cAlphaFieldNames(3) + ", was not found."); + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(3) + " = " + DataIPShortCuts::cAlphaArgs(3)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); + ShowContinueError(DataIPShortCuts::cAlphaFieldNames(3) + ", was not found."); ErrorsFound = true; } } - if (allocated(PVarray)) { // then PV input gotten... but don't expect this to be true. - PVT(Item).PVnum = UtilityRoutines::FindItemInList(cAlphaArgs(4), PVarray); + if (allocated(DataPhotovoltaics::PVarray)) { // then PV input gotten... but don't expect this to be true. + PVT(Item).PVnum = UtilityRoutines::FindItemInList(DataIPShortCuts::cAlphaArgs(4), DataPhotovoltaics::PVarray); // check PV if (PVT(Item).PVnum == 0) { - ShowSevereError("Invalid " + cAlphaFieldNames(4) + " = " + cAlphaArgs(4)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(4) + " = " + DataIPShortCuts::cAlphaArgs(4)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ErrorsFound = true; } else { - PVT(Item).PVname = cAlphaArgs(4); + PVT(Item).PVname = DataIPShortCuts::cAlphaArgs(4); PVT(Item).PVfound = true; } } else { // no PV or not yet gotten. - PVT(Item).PVname = cAlphaArgs(4); + PVT(Item).PVname = DataIPShortCuts::cAlphaArgs(4); PVT(Item).PVfound = false; } - if (UtilityRoutines::SameString(cAlphaArgs(5), "Water")) { + if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(5), "Water")) { PVT(Item).WorkingFluidType = LiquidWorkingFluid; - } else if (UtilityRoutines::SameString(cAlphaArgs(5), "Air")) { + } else if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(5), "Air")) { PVT(Item).WorkingFluidType = AirWorkingFluid; } else { - if (lAlphaFieldBlanks(5)) { - ShowSevereError("Invalid " + cAlphaFieldNames(5) + " = " + cAlphaArgs(5)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); - ShowContinueError(cAlphaFieldNames(5) + " field cannot be blank."); + if (DataIPShortCuts::lAlphaFieldBlanks(5)) { + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(5) + " = " + DataIPShortCuts::cAlphaArgs(5)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); + ShowContinueError(DataIPShortCuts::cAlphaFieldNames(5) + " field cannot be blank."); } else { - ShowSevereError("Invalid " + cAlphaFieldNames(5) + " = " + cAlphaArgs(5)); - ShowContinueError("Entered in " + cCurrentModuleObject + " = " + cAlphaArgs(1)); + ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(5) + " = " + DataIPShortCuts::cAlphaArgs(5)); + ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); } ErrorsFound = true; } if (PVT(Item).WorkingFluidType == LiquidWorkingFluid) { - PVT(Item).PlantInletNodeNum = GetOnlySingleNode( - cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent); - PVT(Item).PlantOutletNodeNum = GetOnlySingleNode( - cAlphaArgs(7), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Water, NodeConnectionType_Outlet, 1, ObjectIsNotParent); + PVT(Item).PlantInletNodeNum = NodeInputManager::GetOnlySingleNode( + DataIPShortCuts::cAlphaArgs(6), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); + PVT(Item).PlantOutletNodeNum = NodeInputManager::GetOnlySingleNode( + DataIPShortCuts::cAlphaArgs(7), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(6), cAlphaArgs(7), "Water Nodes"); + BranchNodeConnections::TestCompSet(DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cAlphaArgs(6), DataIPShortCuts::cAlphaArgs(7), "Water Nodes"); - PVT(Item).WLoopSideNum = DemandSupply_No; + PVT(Item).WLoopSideNum = DataPlant::DemandSupply_No; } if (PVT(Item).WorkingFluidType == AirWorkingFluid) { - PVT(Item).HVACInletNodeNum = GetOnlySingleNode( - cAlphaArgs(8), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Air, NodeConnectionType_Inlet, 1, ObjectIsNotParent); - PVT(Item).HVACOutletNodeNum = GetOnlySingleNode( - cAlphaArgs(9), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Air, NodeConnectionType_Outlet, 1, ObjectIsNotParent); + PVT(Item).HVACInletNodeNum = NodeInputManager::GetOnlySingleNode( + DataIPShortCuts::cAlphaArgs(8), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); + PVT(Item).HVACOutletNodeNum = NodeInputManager::GetOnlySingleNode( + DataIPShortCuts::cAlphaArgs(9), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(8), cAlphaArgs(9), "Air Nodes"); + BranchNodeConnections::TestCompSet(DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cAlphaArgs(8), DataIPShortCuts::cAlphaArgs(9), "Air Nodes"); } - PVT(Item).DesignVolFlowRate = rNumericArgs(1); + PVT(Item).DesignVolFlowRate = DataIPShortCuts::rNumericArgs(1); PVT(Item).SizingInit = true; - if (PVT(Item).DesignVolFlowRate == AutoSize) { + if (PVT(Item).DesignVolFlowRate == DataSizing::AutoSize) { PVT(Item).DesignVolFlowRateWasAutoSized = true; } - if (PVT(Item).DesignVolFlowRate != AutoSize) { + if (PVT(Item).DesignVolFlowRate != DataSizing::AutoSize) { if (PVT(Item).WorkingFluidType == LiquidWorkingFluid) { - RegisterPlantCompDesignFlow(PVT(Item).PlantInletNodeNum, PVT(Item).DesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(PVT(Item).PlantInletNodeNum, PVT(Item).DesignVolFlowRate); } else if (PVT(Item).WorkingFluidType == AirWorkingFluid) { - PVT(Item).MaxMassFlowRate = PVT(Item).DesignVolFlowRate * StdRhoAir; + PVT(Item).MaxMassFlowRate = PVT(Item).DesignVolFlowRate * DataEnvironment::StdRhoAir; } PVT(Item).SizingInit = false; } @@ -505,23 +475,6 @@ namespace PhotovoltaicThermalCollectors { // PURPOSE OF THIS SUBROUTINE: // init for PVT - using DataGlobals::AnyEnergyManagementSystemInModel; - using DataGlobals::SysSizingCalc; - using DataHeatBalance::QRadSWOutIncident; - using DataHVACGlobals::DoSetPointTest; - using DataHVACGlobals::SetPointErrorFlag; - using DataLoopNode::Node; - using DataLoopNode::SensedNodeFlagValue; - using DataPlant::PlantLoop; - using EMSManager::CheckIfNodeSetPointManagedByEMS; - using EMSManager::iTemperatureSetPoint; - using FluidProperties::GetDensityGlycol; - using General::RoundSigDigits; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::RegisterPlantCompDesignFlow; - using PlantUtilities::ScanPlantLoopsForObject; - using PlantUtilities::SetComponentFlowRate; - static std::string const RoutineName("InitPVTcollectors"); int InletNode; @@ -542,9 +495,9 @@ namespace PhotovoltaicThermalCollectors { } if (SetLoopIndexFlag(PVTnum)) { - if (allocated(PlantLoop) && (PVT(PVTnum).PlantInletNodeNum > 0)) { + if (allocated(DataPlant::PlantLoop) && (PVT(PVTnum).PlantInletNodeNum > 0)) { errFlag = false; - ScanPlantLoopsForObject(PVT(PVTnum).Name, + PlantUtilities::ScanPlantLoopsForObject(PVT(PVTnum).Name, PVT(PVTnum).TypeNum, PVT(PVTnum).WLoopNum, PVT(PVTnum).WLoopSideNum, @@ -565,8 +518,8 @@ namespace PhotovoltaicThermalCollectors { // finish set up of PV, becaues PV get-input follows PVT's get input. if (!PVT(PVTnum).PVfound) { - if (allocated(PVarray)) { - PVT(PVTnum).PVnum = UtilityRoutines::FindItemInList(PVT(PVTnum).PVname, PVarray); + if (allocated(DataPhotovoltaics::PVarray)) { + PVT(PVTnum).PVnum = UtilityRoutines::FindItemInList(PVT(PVTnum).PVname, DataPhotovoltaics::PVarray); if (PVT(PVTnum).PVnum == 0) { ShowSevereError("Invalid name for photovoltaic generator = " + PVT(PVTnum).PVname); ShowContinueError("Entered in flat plate photovoltaic-thermal collector = " + PVT(PVTnum).Name); @@ -575,7 +528,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).PVfound = true; } } else { - if ((!BeginEnvrnFlag) && (!FirstHVACIteration)) { + if ((!DataGlobals::BeginEnvrnFlag) && (!FirstHVACIteration)) { ShowSevereError("Photovoltaic generators are missing for Photovoltaic Thermal modeling"); ShowContinueError("Needed for flat plate photovoltaic-thermal collector = " + PVT(PVTnum).Name); ErrorsFound = true; @@ -583,18 +536,18 @@ namespace PhotovoltaicThermalCollectors { } } - if (!SysSizingCalc && MySetPointCheckFlag && DoSetPointTest) { + if (!DataGlobals::SysSizingCalc && MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { for (PVTindex = 1; PVTindex <= NumPVT; ++PVTindex) { if (PVT(PVTindex).WorkingFluidType == AirWorkingFluid) { - if (Node(PVT(PVTindex).HVACOutletNodeNum).TempSetPoint == SensedNodeFlagValue) { - if (!AnyEnergyManagementSystemInModel) { + if (DataLoopNode::Node(PVT(PVTindex).HVACOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { + if (!DataGlobals::AnyEnergyManagementSystemInModel) { ShowSevereError("Missing temperature setpoint for PVT outlet node "); ShowContinueError("Add a setpoint manager to outlet node of PVT named " + PVT(PVTindex).Name); - SetPointErrorFlag = true; + DataHVACGlobals::SetPointErrorFlag = true; } else { // need call to EMS to check node - CheckIfNodeSetPointManagedByEMS(PVT(PVTindex).HVACOutletNodeNum, iTemperatureSetPoint, SetPointErrorFlag); - if (SetPointErrorFlag) { + EMSManager::CheckIfNodeSetPointManagedByEMS(PVT(PVTindex).HVACOutletNodeNum, EMSManager::iTemperatureSetPoint, DataHVACGlobals::SetPointErrorFlag); + if (DataHVACGlobals::SetPointErrorFlag) { ShowSevereError("Missing temperature setpoint for PVT outlet node "); ShowContinueError("Add a setpoint manager to outlet node of PVT named " + PVT(PVTindex).Name); ShowContinueError(" or use an EMS actuator to establish a setpoint at the outlet node of PVT"); @@ -606,7 +559,7 @@ namespace PhotovoltaicThermalCollectors { MySetPointCheckFlag = false; } - if (!SysSizingCalc && PVT(PVTnum).SizingInit && (PVT(PVTnum).WorkingFluidType == AirWorkingFluid)) { + if (!DataGlobals::SysSizingCalc && PVT(PVTnum).SizingInit && (PVT(PVTnum).WorkingFluidType == AirWorkingFluid)) { SizePVT(PVTnum); } @@ -621,7 +574,7 @@ namespace PhotovoltaicThermalCollectors { } } - if (BeginEnvrnFlag && PVT(PVTnum).EnvrnInit) { + if (DataGlobals::BeginEnvrnFlag && PVT(PVTnum).EnvrnInit) { PVT(PVTnum).MassFlowRate = 0.0; PVT(PVTnum).BypassDamperOff = true; @@ -644,14 +597,14 @@ namespace PhotovoltaicThermalCollectors { if (SELECT_CASE_var == LiquidWorkingFluid) { - rho = GetDensityGlycol(PlantLoop(PVT(PVTnum).WLoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidName, DataGlobals::HWInitConvTemp, - PlantLoop(PVT(PVTnum).WLoopNum).FluidIndex, + DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidIndex, RoutineName); PVT(PVTnum).MaxMassFlowRate = PVT(PVTnum).DesignVolFlowRate * rho; - InitComponentNodes(0.0, + PlantUtilities::InitComponentNodes(0.0, PVT(PVTnum).MaxMassFlowRate, InletNode, OutletNode, @@ -669,7 +622,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).EnvrnInit = false; } - if (!BeginEnvrnFlag) PVT(PVTnum).EnvrnInit = true; + if (!DataGlobals::BeginEnvrnFlag) PVT(PVTnum).EnvrnInit = true; { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); @@ -677,7 +630,7 @@ namespace PhotovoltaicThermalCollectors { if (SELECT_CASE_var == LiquidWorkingFluid) { // heating only right now, so control flow requests based on incident solar SurfNum = PVT(PVTnum).SurfNum; - if (QRadSWOutIncident(SurfNum) > MinIrradiance) { + if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { // IF (FirstHVACIteration) THEN PVT(PVTnum).MassFlowRate = PVT(PVTnum).MaxMassFlowRate; // DSU // ENDIF @@ -687,7 +640,7 @@ namespace PhotovoltaicThermalCollectors { // ENDIF } // Should we declare a mass flow rate variable in the data structure instead of using node(outlet)%MassFlowRate ? DSU - SetComponentFlowRate(PVT(PVTnum).MassFlowRate, + PlantUtilities::SetComponentFlowRate(PVT(PVTnum).MassFlowRate, InletNode, OutletNode, PVT(PVTnum).WLoopNum, @@ -695,7 +648,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).WLoopBranchNum, PVT(PVTnum).WLoopCompNum); // DSU | DSU } else if (SELECT_CASE_var == AirWorkingFluid) { - PVT(PVTnum).MassFlowRate = Node(InletNode).MassFlowRate; + PVT(PVTnum).MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; } } } @@ -716,25 +669,6 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // Obtains hot water flow rate from the plant sizing array. - using namespace DataSizing; - using DataHVACGlobals::Cooling; - using DataHVACGlobals::Heating; - using DataHVACGlobals::Main; - using DataHVACGlobals::Other; - using DataHVACGlobals::SmallWaterVolFlow; - using DataPlant::DemandSide; - using DataPlant::PlantLoop; - using DataPlant::SupplySide; - using PlantUtilities::RegisterPlantCompDesignFlow; - using ReportSizingManager::ReportSizingOutput; - using namespace OutputReportPredefined; - using DataEnvironment::StdRhoAir; - using DataLoopNode::Node; - using DataPlant::PlantFinalSizesOkayToReport; - using DataPlant::PlantFirstSizesOkayToFinalize; - using DataPlant::PlantFirstSizesOkayToReport; - using General::RoundSigDigits; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int PltSizNum; // Plant Sizing index corresponding to CurLoopNum bool ErrorsFound; // If errors detected in input @@ -745,13 +679,13 @@ namespace PhotovoltaicThermalCollectors { Real64 DesignVolFlowRateDes; // Autosize design volume flow for reporting Real64 DesignVolFlowRateUser; // Hardsize design volume flow for reporting - if (SysSizingRunDone || ZoneSizingRunDone) { + if (DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone) { HardSizeNoDesRun = false; } else { HardSizeNoDesRun = true; } - if (CurSysNum > 0) { - CheckThisAirSystemForSizing(CurSysNum, SizingDesRunThisAirSys); + if (DataSizing::CurSysNum > 0) { + CheckThisAirSystemForSizing(DataSizing::CurSysNum, SizingDesRunThisAirSys); } else { SizingDesRunThisAirSys = false; } @@ -763,69 +697,69 @@ namespace PhotovoltaicThermalCollectors { if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { - if (!allocated(PlantSizData)) return; - if (!allocated(PlantLoop)) return; + if (!allocated(DataSizing::PlantSizData)) return; + if (!allocated(DataPlant::PlantLoop)) return; if (PVT(PVTnum).WLoopNum > 0) { - PltSizNum = PlantLoop(PVT(PVTnum).WLoopNum).PlantSizNum; + PltSizNum = DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).PlantSizNum; } - if (PVT(PVTnum).WLoopSideNum == SupplySide) { + if (PVT(PVTnum).WLoopSideNum == DataPlant::SupplySide) { if (PltSizNum > 0) { - if (PlantSizData(PltSizNum).DesVolFlowRate >= SmallWaterVolFlow) { - DesVolFlow = PlantSizData(PltSizNum).DesVolFlowRate; + if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { + DesVolFlow = DataSizing::PlantSizData(PltSizNum).DesVolFlowRate; } else { DesVolFlow = 0.0; } DesignVolFlowRateDes = DesVolFlow; } else { if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { - if (PlantFirstSizesOkayToFinalize) { + if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("Autosizing of PVT solar collector design flow rate requires a Sizing:Plant object"); ShowContinueError("Occurs in PVT object=" + PVT(PVTnum).Name); ErrorsFound = true; } } else { // Hardsized - if (PlantFinalSizesOkayToReport && PVT(PVTnum).DesignVolFlowRate > 0.0) { - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + if (DataPlant::PlantFinalSizesOkayToReport && PVT(PVTnum).DesignVolFlowRate > 0.0) { + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "User-Specified Design Flow Rate [m3/s]", PVT(PVTnum).DesignVolFlowRate); } } } - } else if (PVT(PVTnum).WLoopSideNum == DemandSide) { + } else if (PVT(PVTnum).WLoopSideNum == DataPlant::DemandSide) { DesignVolFlowRateDes = PVT(PVTnum).AreaCol * SimplePVTWaterSizeFactor; } if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { PVT(PVTnum).DesignVolFlowRate = DesignVolFlowRateDes; - if (PlantFinalSizesOkayToReport) { - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + if (DataPlant::PlantFinalSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); } - if (PlantFirstSizesOkayToReport) { - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + if (DataPlant::PlantFirstSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Initial Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); } - RegisterPlantCompDesignFlow(PVT(PVTnum).PlantInletNodeNum, PVT(PVTnum).DesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(PVT(PVTnum).PlantInletNodeNum, PVT(PVTnum).DesignVolFlowRate); } else { // Hardsized with sizing data - if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0 && PlantFinalSizesOkayToReport) { + if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0 && DataPlant::PlantFinalSizesOkayToReport) { DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes, "User-Specified Design Flow Rate [m3/s]", DesignVolFlowRateUser); - if (DisplayExtraWarnings) { - if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > AutoVsHardSizingThreshold) { + if (DataGlobals::DisplayExtraWarnings) { + if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > DataSizing::AutoVsHardSizingThreshold) { ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + PVT(PVTnum).Name); - ShowContinueError("User-Specified Design Flow Rate of " + RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); - ShowContinueError("differs from Design Size Design Flow Rate of " + RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); + ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); + ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); ShowContinueError("This may, or may not, indicate mismatched component sizes."); ShowContinueError("Verify that the value entered is intended and is consistent with other components."); } @@ -836,43 +770,41 @@ namespace PhotovoltaicThermalCollectors { if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { - if (CurSysNum > 0) { + if (DataSizing::CurSysNum > 0) { if (!PVT(PVTnum).DesignVolFlowRateWasAutoSized && !SizingDesRunThisAirSys) { // Simulation continue HardSizeNoDesRun = true; if (PVT(PVTnum).DesignVolFlowRate > 0.0) { - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "User-Specified Design Flow Rate [m3/s]", PVT(PVTnum).DesignVolFlowRate); } } else { CheckSysSizing("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name); - if (CurOASysNum > 0) { - DesVolFlow = FinalSysSizing(CurSysNum).DesOutAirVolFlow; + if (DataSizing::CurOASysNum > 0) { + DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesOutAirVolFlow; } else { { - auto const SELECT_CASE_var(CurDuctType); - if (SELECT_CASE_var == Main) { - DesVolFlow = FinalSysSizing(CurSysNum).SysAirMinFlowRat * FinalSysSizing(CurSysNum).DesMainVolFlow; - } else if (SELECT_CASE_var == Cooling) { - DesVolFlow = FinalSysSizing(CurSysNum).SysAirMinFlowRat * FinalSysSizing(CurSysNum).DesCoolVolFlow; - } else if (SELECT_CASE_var == Heating) { - DesVolFlow = FinalSysSizing(CurSysNum).DesHeatVolFlow; - } else if (SELECT_CASE_var == Other) { - DesVolFlow = FinalSysSizing(CurSysNum).DesMainVolFlow; + auto const SELECT_CASE_var(DataSizing::CurDuctType); + if (SELECT_CASE_var == DataHVACGlobals::Main) { + DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; + } else if (SELECT_CASE_var == DataHVACGlobals::Cooling) { + DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesCoolVolFlow; + } else if (SELECT_CASE_var == DataHVACGlobals::Heating) { + DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesHeatVolFlow; } else { - DesVolFlow = FinalSysSizing(CurSysNum).DesMainVolFlow; + DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; } } } - DesMassFlow = StdRhoAir * DesVolFlow; + DesMassFlow = DataEnvironment::StdRhoAir * DesVolFlow; DesignVolFlowRateDes = DesVolFlow; PVT(PVTnum).MaxMassFlowRate = DesMassFlow; } if (!HardSizeNoDesRun) { if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { PVT(PVTnum).DesignVolFlowRate = DesignVolFlowRateDes; - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); @@ -880,17 +812,17 @@ namespace PhotovoltaicThermalCollectors { } else { if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0) { DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; - ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", + ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes, "User-Specified Design Flow Rate [m3/s]", DesignVolFlowRateUser); - if (DisplayExtraWarnings) { - if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > AutoVsHardSizingThreshold) { + if (DataGlobals::DisplayExtraWarnings) { + if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > DataSizing::AutoVsHardSizingThreshold) { ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + PVT(PVTnum).Name); - ShowContinueError("User-Specified Design Flow Rate of " + RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); - ShowContinueError("differs from Design Size Design Flow Rate of " + RoundSigDigits(DesignVolFlowRateDes, 5) + + ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); + ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); ShowContinueError("This may, or may not, indicate mismatched component sizes."); ShowContinueError("Verify that the value entered is intended and is consistent with other components."); @@ -899,7 +831,7 @@ namespace PhotovoltaicThermalCollectors { } } } - } else if (CurZoneEqNum > 0) { + } else if (DataSizing::CurZoneEqNum > 0) { // PVT is not currently for zone equipment, should not come here. } } @@ -924,9 +856,6 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // decide if PVT should be in cooling or heat mode and if it should be bypassed or not - using DataHeatBalance::QRadSWOutIncident; - using DataLoopNode::Node; - static int SurfNum(0); SurfNum = PVT(PVTnum).SurfNum; @@ -934,10 +863,10 @@ namespace PhotovoltaicThermalCollectors { if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { - if (QRadSWOutIncident(SurfNum) > MinIrradiance) { + if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? // Outlet node is required to have a setpoint. - if (Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint > Node(PVT(PVTnum).HVACInletNodeNum).Temp) { + if (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint > DataLoopNode::Node(PVT(PVTnum).HVACInletNodeNum).Temp) { PVT(PVTnum).HeatingUseful = true; PVT(PVTnum).CoolingUseful = false; PVT(PVTnum).BypassDamperOff = true; @@ -948,7 +877,7 @@ namespace PhotovoltaicThermalCollectors { } } else { // is cooling wanted? - if (Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint < Node(PVT(PVTnum).HVACInletNodeNum).Temp) { + if (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint < DataLoopNode::Node(PVT(PVTnum).HVACInletNodeNum).Temp) { PVT(PVTnum).CoolingUseful = true; PVT(PVTnum).HeatingUseful = false; PVT(PVTnum).BypassDamperOff = true; @@ -962,7 +891,7 @@ namespace PhotovoltaicThermalCollectors { } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { - if (QRadSWOutIncident(SurfNum) > MinIrradiance) { + if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? PVT(PVTnum).HeatingUseful = true; PVT(PVTnum).BypassDamperOff = true; @@ -990,21 +919,6 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // Current model is "simple" fixed efficiency and simple night sky balance for cooling - using ConvectionCoefficients::InitExteriorConvectionCoeff; - using DataEnvironment::OutBaroPress; - using DataEnvironment::OutDryBulbTemp; - using DataEnvironment::SkyTemp; - using DataGlobals::SecInHour; - using DataHeatBalance::QRadSWOutIncident; - using DataHeatBalance::VerySmooth; - using DataHVACGlobals::TimeStepSys; - using DataLoopNode::Node; - using Psychrometrics::CPHW; - using Psychrometrics::PsyCpAirFnWTdb; - using Psychrometrics::PsyTdpFnTdbTwbPb; - using Psychrometrics::PsyTwbFnTdbWPb; - using ScheduleManager::GetCurrentScheduleValue; - static std::string const RoutineName("CalcPVTcollectors"); static int InletNode(0); @@ -1028,7 +942,7 @@ namespace PhotovoltaicThermalCollectors { static Real64 DewPointInlet(0.0); SurfNum = PVT(PVTnum).SurfNum; - RoughSurf = VerySmooth; + RoughSurf = DataHeatBalance::VerySmooth; { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); @@ -1042,7 +956,7 @@ namespace PhotovoltaicThermalCollectors { } mdot = PVT(PVTnum).MassFlowRate; - Tinlet = Node(InletNode).Temp; + Tinlet = DataLoopNode::Node(InletNode).Temp; if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { @@ -1054,38 +968,38 @@ namespace PhotovoltaicThermalCollectors { if (SELECT_CASE_var == FixedThermEffic) { Eff = PVT(PVTnum).Simple.ThermEffic; } else if (SELECT_CASE_var == ScheduledThermEffic) { - Eff = GetCurrentScheduleValue(PVT(PVTnum).Simple.ThermEffSchedNum); + Eff = ScheduleManager::GetCurrentScheduleValue(PVT(PVTnum).Simple.ThermEffSchedNum); PVT(PVTnum).Simple.ThermEffic = Eff; } } - PotentialHeatGain = QRadSWOutIncident(SurfNum) * Eff * PVT(PVTnum).AreaCol; + PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(SurfNum) * Eff * PVT(PVTnum).AreaCol; if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { - Winlet = Node(InletNode).HumRat; - CpInlet = PsyCpAirFnWTdb(Winlet, Tinlet); + Winlet = DataLoopNode::Node(InletNode).HumRat; + CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); if (mdot * CpInlet > 0.0) { PotentialOutletTemp = Tinlet + PotentialHeatGain / (mdot * CpInlet); } else { PotentialOutletTemp = Tinlet; } // now compare heating potential to setpoint and figure bypass fraction - if (PotentialOutletTemp > Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint) { // need to modulate + if (PotentialOutletTemp > DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint) { // need to modulate if (Tinlet != PotentialOutletTemp) { BypassFraction = - (Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint - PotentialOutletTemp) / (Tinlet - PotentialOutletTemp); + (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint - PotentialOutletTemp) / (Tinlet - PotentialOutletTemp); } else { BypassFraction = 0.0; } BypassFraction = max(0.0, BypassFraction); - PotentialOutletTemp = Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint; - PotentialHeatGain = mdot * PsyCpAirFnWTdb(Winlet, Tinlet) * (PotentialOutletTemp - Tinlet); + PotentialOutletTemp = DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint; + PotentialHeatGain = mdot * Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet) * (PotentialOutletTemp - Tinlet); } else { BypassFraction = 0.0; } } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { - CpInlet = CPHW(Tinlet); + CpInlet = Psychrometrics::CPHW(Tinlet); if (mdot * CpInlet != 0.0) { // protect divide by zero PotentialOutletTemp = Tinlet + PotentialHeatGain / (mdot * CpInlet); } else { @@ -1097,7 +1011,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).Report.ThermEfficiency = Eff; PVT(PVTnum).Report.ThermHeatGain = PotentialHeatGain; PVT(PVTnum).Report.ThermPower = PVT(PVTnum).Report.ThermHeatGain; - PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * TimeStepSys * SecInHour; + PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; PVT(PVTnum).Report.ThermHeatLoss = 0.0; PVT(PVTnum).Report.TinletWorkFluid = Tinlet; PVT(PVTnum).Report.MdotWorkFluid = mdot; @@ -1107,21 +1021,21 @@ namespace PhotovoltaicThermalCollectors { } else if (PVT(PVTnum).CoolingUseful && PVT(PVTnum).BypassDamperOff && (mdot > 0.0)) { // calculate cooling using energy balance - InitExteriorConvectionCoeff( + ConvectionCoefficients::InitExteriorConvectionCoeff( SurfNum, 0.0, RoughSurf, PVT(PVTnum).Simple.SurfEmissivity, PVT(PVTnum).Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { - Winlet = Node(InletNode).HumRat; - CpInlet = PsyCpAirFnWTdb(Winlet, Tinlet); - WetBulbInlet = PsyTwbFnTdbWPb(Tinlet, Winlet, OutBaroPress, RoutineName); - DewPointInlet = PsyTdpFnTdbTwbPb(Tinlet, WetBulbInlet, OutBaroPress, RoutineName); + Winlet = DataLoopNode::Node(InletNode).HumRat; + CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); + WetBulbInlet = Psychrometrics::PsyTwbFnTdbWPb(Tinlet, Winlet, DataEnvironment::OutBaroPress, RoutineName); + DewPointInlet = Psychrometrics::PsyTdpFnTdbTwbPb(Tinlet, WetBulbInlet, DataEnvironment::OutBaroPress, RoutineName); } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { - CpInlet = CPHW(Tinlet); + CpInlet = Psychrometrics::CPHW(Tinlet); } Tcollector = (2.0 * mdot * CpInlet * Tinlet + - PVT(PVTnum).AreaCol * (HrGround * OutDryBulbTemp + HrSky * SkyTemp + HrAir * Surface(SurfNum).OutDryBulbTemp + - HcExt * Surface(SurfNum).OutDryBulbTemp)) / + PVT(PVTnum).AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + HrAir * DataSurfaces::Surface(SurfNum).OutDryBulbTemp + + HcExt * DataSurfaces::Surface(SurfNum).OutDryBulbTemp)) / (2.0 * mdot * CpInlet + PVT(PVTnum).AreaCol * (HrGround + HrSky + HrAir + HcExt)); PotentialOutletTemp = 2.0 * Tcollector - Tinlet; @@ -1146,7 +1060,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).Report.ThermHeatLoss = mdot * CpInlet * (Tinlet - PVT(PVTnum).Report.ToutletWorkFluid); PVT(PVTnum).Report.ThermHeatGain = 0.0; PVT(PVTnum).Report.ThermPower = -1.0 * PVT(PVTnum).Report.ThermHeatLoss; - PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * TimeStepSys * SecInHour; + PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; PVT(PVTnum).Report.ThermEfficiency = 0.0; PVT(PVTnum).Simple.LastCollectorTemp = Tcollector; PVT(PVTnum).Report.BypassStatus = 0.0; @@ -1186,10 +1100,6 @@ namespace PhotovoltaicThermalCollectors { // MODIFIED na // RE-ENGINEERED na - using DataLoopNode::Node; - using PlantUtilities::SafeCopyPlantNode; - using Psychrometrics::PsyHFnTdbW; - int InletNode; int OutletNode; @@ -1199,26 +1109,26 @@ namespace PhotovoltaicThermalCollectors { InletNode = PVT(PVTnum).PlantInletNodeNum; OutletNode = PVT(PVTnum).PlantOutletNodeNum; - SafeCopyPlantNode(InletNode, OutletNode); - Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; + PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); + DataLoopNode::Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; } else if (SELECT_CASE_var == AirWorkingFluid) { InletNode = PVT(PVTnum).HVACInletNodeNum; OutletNode = PVT(PVTnum).HVACOutletNodeNum; // Set the outlet nodes for properties that just pass through & not used - Node(OutletNode).Quality = Node(InletNode).Quality; - Node(OutletNode).Press = Node(InletNode).Press; - Node(OutletNode).MassFlowRate = Node(InletNode).MassFlowRate; - Node(OutletNode).MassFlowRateMin = Node(InletNode).MassFlowRateMin; - Node(OutletNode).MassFlowRateMax = Node(InletNode).MassFlowRateMax; - Node(OutletNode).MassFlowRateMinAvail = Node(InletNode).MassFlowRateMinAvail; - Node(OutletNode).MassFlowRateMaxAvail = Node(InletNode).MassFlowRateMaxAvail; + DataLoopNode::Node(OutletNode).Quality = DataLoopNode::Node(InletNode).Quality; + DataLoopNode::Node(OutletNode).Press = DataLoopNode::Node(InletNode).Press; + DataLoopNode::Node(OutletNode).MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; + DataLoopNode::Node(OutletNode).MassFlowRateMin = DataLoopNode::Node(InletNode).MassFlowRateMin; + DataLoopNode::Node(OutletNode).MassFlowRateMax = DataLoopNode::Node(InletNode).MassFlowRateMax; + DataLoopNode::Node(OutletNode).MassFlowRateMinAvail = DataLoopNode::Node(InletNode).MassFlowRateMinAvail; + DataLoopNode::Node(OutletNode).MassFlowRateMaxAvail = DataLoopNode::Node(InletNode).MassFlowRateMaxAvail; // Set outlet node variables that are possibly changed - Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; - Node(OutletNode).HumRat = Node(InletNode).HumRat; // assumes dewpoint bound on cooling .... - Node(OutletNode).Enthalpy = PsyHFnTdbW(PVT(PVTnum).Report.ToutletWorkFluid, Node(OutletNode).HumRat); + DataLoopNode::Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; + DataLoopNode::Node(OutletNode).HumRat = DataLoopNode::Node(InletNode).HumRat; // assumes dewpoint bound on cooling .... + DataLoopNode::Node(OutletNode).Enthalpy = Psychrometrics::PsyHFnTdbW(PVT(PVTnum).Report.ToutletWorkFluid, DataLoopNode::Node(OutletNode).HumRat); } } } diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index d49007cdea5..08057008521 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -50,11 +50,6 @@ // ObjexxFCL Headers #include -#include - -// EnergyPlus Headers -#include -#include namespace EnergyPlus { From d4671e851e58c69455721102a0a5ca2d35838a87 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 09:31:12 -0700 Subject: [PATCH 22/86] cleanup warnings --- .../PhotovoltaicThermalCollectors.cc | 35 ++++--------------- .../PhotovoltaicThermalCollectors.hh | 33 +++++++---------- 2 files changed, 19 insertions(+), 49 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 53f3f48ed5c..f20a111e293 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -102,7 +102,6 @@ namespace PhotovoltaicThermalCollectors { // Simple PV/T model just converts incoming solar to electricity and temperature rise of a working fluid. int const SimplePVTmodel(1001); - int const LayerByLayerPVTmodel(1002); int const ScheduledThermEffic(15); // mode for thermal efficiency is to use schedule int const FixedThermEffic(16); // mode for thermal efficiency is to use fixed value @@ -477,11 +476,10 @@ namespace PhotovoltaicThermalCollectors { static std::string const RoutineName("InitPVTcollectors"); - int InletNode; - int OutletNode; + int InletNode = 0; + int OutletNode = 0; int PVTindex; int SurfNum; - static bool ErrorsFound(false); static bool MySetPointCheckFlag(true); static bool MyOneTimeFlag(true); // one time flag static Array1D_bool SetLoopIndexFlag; // get loop number flag @@ -516,14 +514,13 @@ namespace PhotovoltaicThermalCollectors { } } - // finish set up of PV, becaues PV get-input follows PVT's get input. + // finish set up of PV, because PV get-input follows PVT's get input. if (!PVT(PVTnum).PVfound) { if (allocated(DataPhotovoltaics::PVarray)) { PVT(PVTnum).PVnum = UtilityRoutines::FindItemInList(PVT(PVTnum).PVname, DataPhotovoltaics::PVarray); if (PVT(PVTnum).PVnum == 0) { ShowSevereError("Invalid name for photovoltaic generator = " + PVT(PVTnum).PVname); ShowContinueError("Entered in flat plate photovoltaic-thermal collector = " + PVT(PVTnum).Name); - ErrorsFound = true; } else { PVT(PVTnum).PVfound = true; } @@ -531,7 +528,6 @@ namespace PhotovoltaicThermalCollectors { if ((!DataGlobals::BeginEnvrnFlag) && (!FirstHVACIteration)) { ShowSevereError("Photovoltaic generators are missing for Photovoltaic Thermal modeling"); ShowContinueError("Needed for flat plate photovoltaic-thermal collector = " + PVT(PVTnum).Name); - ErrorsFound = true; } } } @@ -571,6 +567,8 @@ namespace PhotovoltaicThermalCollectors { } else if (SELECT_CASE_var == AirWorkingFluid) { InletNode = PVT(PVTnum).HVACInletNodeNum; OutletNode = PVT(PVTnum).HVACOutletNodeNum; + } else { + assert(false); } } @@ -679,11 +677,8 @@ namespace PhotovoltaicThermalCollectors { Real64 DesignVolFlowRateDes; // Autosize design volume flow for reporting Real64 DesignVolFlowRateUser; // Hardsize design volume flow for reporting - if (DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone) { - HardSizeNoDesRun = false; - } else { - HardSizeNoDesRun = true; - } + HardSizeNoDesRun = !(DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone); + if (DataSizing::CurSysNum > 0) { CheckThisAirSystemForSizing(DataSizing::CurSysNum, SizingDesRunThisAirSys); } else { @@ -691,7 +686,6 @@ namespace PhotovoltaicThermalCollectors { } DesignVolFlowRateDes = 0.0; - DesignVolFlowRateUser = 0.0; PltSizNum = 0; ErrorsFound = false; @@ -922,7 +916,6 @@ namespace PhotovoltaicThermalCollectors { static std::string const RoutineName("CalcPVTcollectors"); static int InletNode(0); - static int OutletNode(0); static Real64 Eff(0.0); static int SurfNum(0); static int RoughSurf(0); @@ -948,10 +941,8 @@ namespace PhotovoltaicThermalCollectors { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); if (SELECT_CASE_var == LiquidWorkingFluid) { InletNode = PVT(PVTnum).PlantInletNodeNum; - OutletNode = PVT(PVTnum).PlantOutletNodeNum; } else if (SELECT_CASE_var == AirWorkingFluid) { InletNode = PVT(PVTnum).HVACInletNodeNum; - OutletNode = PVT(PVTnum).HVACOutletNodeNum; } } @@ -1065,18 +1056,6 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).Simple.LastCollectorTemp = Tcollector; PVT(PVTnum).Report.BypassStatus = 0.0; - } else if (!PVT(PVTnum).BypassDamperOff) { // bypassed, zero things out - - PVT(PVTnum).Report.TinletWorkFluid = Tinlet; - PVT(PVTnum).Report.ToutletWorkFluid = Tinlet; - PVT(PVTnum).Report.ThermHeatLoss = 0.0; - PVT(PVTnum).Report.ThermHeatGain = 0.0; - PVT(PVTnum).Report.ThermPower = 0.0; - PVT(PVTnum).Report.ThermEfficiency = 0.0; - PVT(PVTnum).Report.ThermEnergy = 0.0; - PVT(PVTnum).Report.BypassStatus = 1.0; - PVT(PVTnum).Report.MdotWorkFluid = mdot; - } else { PVT(PVTnum).Report.TinletWorkFluid = Tinlet; PVT(PVTnum).Report.ToutletWorkFluid = Tinlet; diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index 08057008521..5ee63b5eebd 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -56,7 +56,6 @@ namespace EnergyPlus { namespace PhotovoltaicThermalCollectors { extern int const SimplePVTmodel; - extern int const LayerByLayerPVTmodel; extern int const ScheduledThermEffic; // mode for thermal efficiency is to use schedule extern int const FixedThermEffic; // mode for thermal efficiency is to use fixed value @@ -117,7 +116,6 @@ namespace PhotovoltaicThermalCollectors { struct PVTCollectorStruct { // Members - // input std::string Name; // Name of PVT collector int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant !DSU int WLoopNum; // Water plant loop index number !DSU @@ -132,8 +130,6 @@ namespace PhotovoltaicThermalCollectors { std::string PVname; // named Generator:Photovoltaic object int PVnum; // PV index bool PVfound; // init, need to delay get input until PV gotten - // INTEGER :: PlantLoopNum = 0 ! needed for sizing and control - // INTEGER :: PlantLoopSide = 0 ! needed for sizing, demand vs. supply sided SimplePVTModelStruct Simple; // performance data structure. int WorkingFluidType; int PlantInletNodeNum; @@ -152,7 +148,7 @@ namespace PhotovoltaicThermalCollectors { // Default Constructor PVTCollectorStruct() - : WLoopNum(0), WLoopSideNum(0), WLoopBranchNum(0), WLoopCompNum(0), EnvrnInit(true), SizingInit(true), PVTModelType(0), SurfNum(0), + : TypeNum(0), WLoopNum(0), WLoopSideNum(0), WLoopBranchNum(0), WLoopCompNum(0), EnvrnInit(true), SizingInit(true), PVTModelType(0), SurfNum(0), PVnum(0), PVfound(false), WorkingFluidType(0), PlantInletNodeNum(0), PlantOutletNodeNum(0), HVACInletNodeNum(0), HVACOutletNodeNum(0), DesignVolFlowRate(0.0), DesignVolFlowRateWasAutoSized(false), MaxMassFlowRate(0.0), MassFlowRate(0.0), AreaCol(0.0), BypassDamperOff(true), CoolingUseful(false), HeatingUseful(false) @@ -163,33 +159,28 @@ namespace PhotovoltaicThermalCollectors { extern Array1D PVT; void SimPVTcollectors(int &PVTnum, // index to PVT array. - bool const FirstHVACIteration, - int const CalledFrom, + bool FirstHVACIteration, + int CalledFrom, Optional_string_const PVTName = _, Optional_bool_const InitLoopEquip = _); void GetPVTcollectorsInput(); - void InitPVTcollectors(int const PVTnum, bool const FirstHVACIteration); + void InitPVTcollectors(int PVTnum, bool FirstHVACIteration); - void SizePVT(int const PVTnum); + void SizePVT(int PVTnum); - void ControlPVTcollector(int const PVTnum); + void ControlPVTcollector(int PVTnum); - void CalcPVTcollectors(int const PVTnum); + void CalcPVTcollectors(int PVTnum); - void UpdatePVTcollectors(int const PVTnum); + void UpdatePVTcollectors(int PVTnum); - void GetPVTThermalPowerProduction(int const PVindex, // index of PV generator (not PVT collector) - Real64 &ThermalPower, - Real64 &ThermalEnergy); - int GetAirInletNodeNum(std::string const &PVTName, - bool &ErrorsFound - ); + void GetPVTThermalPowerProduction(int PVindex, Real64 &ThermalPower, Real64 &ThermalEnergy); - int GetAirOutletNodeNum(std::string const &PVTName, - bool &ErrorsFound - ); + int GetAirInletNodeNum(std::string const &PVTName, bool &ErrorsFound); + + int GetAirOutletNodeNum(std::string const &PVTName, bool &ErrorsFound); } // namespace PhotovoltaicThermalCollectors From e913827716a9adb7983593155e7369d570657d69 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 09:46:45 -0700 Subject: [PATCH 23/86] cleanup statics --- .../PhotovoltaicThermalCollectors.cc | 68 ++++++++----------- .../PhotovoltaicThermalCollectors.hh | 6 +- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index f20a111e293..ed651f5c9ae 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -114,7 +114,6 @@ namespace PhotovoltaicThermalCollectors { Real64 const SimplePVTWaterSizeFactor(1.905e-5); // [ m3/s/m2 ] average of collectors in SolarCollectors.idf - static std::string const BlankString; static bool GetInputFlag(true); // First time, input is "gotten" Array1D_bool CheckEquipName; @@ -204,7 +203,7 @@ namespace PhotovoltaicThermalCollectors { int NumAlphas; // Number of Alphas for each GetObjectItem call int NumNumbers; // Number of Numbers for each GetObjectItem call int IOStatus; // Used in GetObjectItem - static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine + bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine int SurfNum; // local use only int ThisParamObj; @@ -480,19 +479,15 @@ namespace PhotovoltaicThermalCollectors { int OutletNode = 0; int PVTindex; int SurfNum; - static bool MySetPointCheckFlag(true); - static bool MyOneTimeFlag(true); // one time flag - static Array1D_bool SetLoopIndexFlag; // get loop number flag bool errFlag; Real64 rho; // local fluid density kg/s // Do the one time initializations - if (MyOneTimeFlag) { - SetLoopIndexFlag.dimension(NumPVT, true); - MyOneTimeFlag = false; + if (PVT(PVTnum).MyOneTimeFlag) { + PVT(PVTnum).MyOneTimeFlag = false; } - if (SetLoopIndexFlag(PVTnum)) { + if (PVT(PVTnum).SetLoopIndexFlag) { if (allocated(DataPlant::PlantLoop) && (PVT(PVTnum).PlantInletNodeNum > 0)) { errFlag = false; PlantUtilities::ScanPlantLoopsForObject(PVT(PVTnum).Name, @@ -510,7 +505,7 @@ namespace PhotovoltaicThermalCollectors { if (errFlag) { ShowFatalError("InitPVTcollectors: Program terminated for previous conditions."); } - SetLoopIndexFlag(PVTnum) = false; + PVT(PVTnum).SetLoopIndexFlag = false; } } @@ -532,7 +527,7 @@ namespace PhotovoltaicThermalCollectors { } } - if (!DataGlobals::SysSizingCalc && MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { + if (!DataGlobals::SysSizingCalc && PVT(PVTnum).MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { for (PVTindex = 1; PVTindex <= NumPVT; ++PVTindex) { if (PVT(PVTindex).WorkingFluidType == AirWorkingFluid) { if (DataLoopNode::Node(PVT(PVTindex).HVACOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { @@ -552,7 +547,7 @@ namespace PhotovoltaicThermalCollectors { } } } - MySetPointCheckFlag = false; + PVT(PVTnum).MySetPointCheckFlag = false; } if (!DataGlobals::SysSizingCalc && PVT(PVTnum).SizingInit && (PVT(PVTnum).WorkingFluidType == AirWorkingFluid)) { @@ -850,14 +845,10 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // decide if PVT should be in cooling or heat mode and if it should be bypassed or not - static int SurfNum(0); - - SurfNum = PVT(PVTnum).SurfNum; - if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { + if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? // Outlet node is required to have a setpoint. if (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint > DataLoopNode::Node(PVT(PVTnum).HVACInletNodeNum).Temp) { @@ -885,7 +876,7 @@ namespace PhotovoltaicThermalCollectors { } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { + if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? PVT(PVTnum).HeatingUseful = true; PVT(PVTnum).BypassDamperOff = true; @@ -915,24 +906,24 @@ namespace PhotovoltaicThermalCollectors { static std::string const RoutineName("CalcPVTcollectors"); - static int InletNode(0); - static Real64 Eff(0.0); - static int SurfNum(0); - static int RoughSurf(0); - static Real64 HcExt(0.0); - static Real64 HrSky(0.0); - static Real64 HrGround(0.0); - static Real64 HrAir(0.0); - static Real64 Tcollector(0.0); - static Real64 mdot(0.0); - static Real64 Tinlet(0.0); - static Real64 Winlet(0.0); - static Real64 CpInlet(0.0); - static Real64 PotentialOutletTemp(0.0); - static Real64 BypassFraction(0.0); - static Real64 PotentialHeatGain(0.0); - static Real64 WetBulbInlet(0.0); - static Real64 DewPointInlet(0.0); + int InletNode(0); + Real64 Eff(0.0); + int SurfNum(0); + int RoughSurf(0); + Real64 HcExt(0.0); + Real64 HrSky(0.0); + Real64 HrGround(0.0); + Real64 HrAir(0.0); + Real64 Tcollector(0.0); + Real64 mdot(0.0); + Real64 Tinlet(0.0); + Real64 Winlet(0.0); + Real64 CpInlet(0.0); + Real64 PotentialOutletTemp(0.0); + Real64 BypassFraction(0.0); + Real64 PotentialHeatGain(0.0); + Real64 WetBulbInlet(0.0); + Real64 DewPointInlet(0.0); SurfNum = PVT(PVTnum).SurfNum; RoughSurf = DataHeatBalance::VerySmooth; @@ -1123,11 +1114,10 @@ namespace PhotovoltaicThermalCollectors { // MODIFIED na // RE-ENGINEERED na - static int PVTnum(0); - static int loop(0); + int PVTnum(0); // first find PVT index that is associated with this PV generator - for (loop = 1; loop <= NumPVT; ++loop) { + for (int loop = 1; loop <= NumPVT; ++loop) { if (!PVT(loop).PVfound) continue; if (PVT(loop).PVnum == PVindex) { // we found it PVTnum = loop; diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index 5ee63b5eebd..69c2be15cad 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -145,13 +145,17 @@ namespace PhotovoltaicThermalCollectors { bool CoolingUseful; bool HeatingUseful; PVTReportStruct Report; + bool MySetPointCheckFlag; + bool MyOneTimeFlag; + bool SetLoopIndexFlag; // Default Constructor PVTCollectorStruct() : TypeNum(0), WLoopNum(0), WLoopSideNum(0), WLoopBranchNum(0), WLoopCompNum(0), EnvrnInit(true), SizingInit(true), PVTModelType(0), SurfNum(0), PVnum(0), PVfound(false), WorkingFluidType(0), PlantInletNodeNum(0), PlantOutletNodeNum(0), HVACInletNodeNum(0), HVACOutletNodeNum(0), DesignVolFlowRate(0.0), DesignVolFlowRateWasAutoSized(false), MaxMassFlowRate(0.0), MassFlowRate(0.0), AreaCol(0.0), - BypassDamperOff(true), CoolingUseful(false), HeatingUseful(false) + BypassDamperOff(true), CoolingUseful(false), HeatingUseful(false), MySetPointCheckFlag(true), MyOneTimeFlag(true), + SetLoopIndexFlag(true) { } }; From 893237dc0c2362cdbfa5bbbd38356d020b9d8636 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 10:36:48 -0700 Subject: [PATCH 24/86] fix bug --- src/EnergyPlus/PhotovoltaicThermalCollectors.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index ed651f5c9ae..952a99b6527 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -1045,7 +1045,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; PVT(PVTnum).Report.ThermEfficiency = 0.0; PVT(PVTnum).Simple.LastCollectorTemp = Tcollector; - PVT(PVTnum).Report.BypassStatus = 0.0; + PVT(PVTnum).Report.BypassStatus = BypassFraction; } else { PVT(PVTnum).Report.TinletWorkFluid = Tinlet; From ca75cac0b84503cf77ff8e4d316b9562d082ba54 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 10:55:15 -0700 Subject: [PATCH 25/86] cleanup mod vars --- .../PhotovoltaicThermalCollectors.cc | 84 ++++++++----------- .../PhotovoltaicThermalCollectors.hh | 27 +++--- 2 files changed, 50 insertions(+), 61 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 952a99b6527..a28e6baf174 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -103,12 +103,6 @@ namespace PhotovoltaicThermalCollectors { int const SimplePVTmodel(1001); - int const ScheduledThermEffic(15); // mode for thermal efficiency is to use schedule - int const FixedThermEffic(16); // mode for thermal efficiency is to use fixed value - - int const LiquidWorkingFluid(1); - int const AirWorkingFluid(2); - int const CalledFromPlantLoopEquipMgr(101); int const CalledFromOutsideAirSystem(102); @@ -129,12 +123,6 @@ namespace PhotovoltaicThermalCollectors { Optional_bool_const InitLoopEquip) { - // SUBROUTINE INFORMATION: - // AUTHOR - // DATE WRITTEN - // MODIFIED na - // RE-ENGINEERED na - if (GetInputFlag) { GetPVTcollectorsInput(); GetInputFlag = false; @@ -175,8 +163,8 @@ namespace PhotovoltaicThermalCollectors { } // check where called from and what type of collector this is, return if not right for calling order for speed - if ((PVT(PVTnum).WorkingFluidType == AirWorkingFluid) && (CalledFrom == CalledFromPlantLoopEquipMgr)) return; - if ((PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) && (CalledFrom == CalledFromOutsideAirSystem)) return; + if ((PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) && (CalledFrom == CalledFromPlantLoopEquipMgr)) return; + if ((PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) && (CalledFrom == CalledFromOutsideAirSystem)) return; InitPVTcollectors(PVTnum, FirstHVACIteration); @@ -231,9 +219,9 @@ namespace PhotovoltaicThermalCollectors { tmpSimplePVTperf(Item).Name = DataIPShortCuts::cAlphaArgs(1); if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(2), "Fixed")) { - tmpSimplePVTperf(Item).ThermEfficMode = FixedThermEffic; + tmpSimplePVTperf(Item).ThermEfficMode = ThermEfficEnum::FIXED; } else if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(2), "Scheduled")) { - tmpSimplePVTperf(Item).ThermEfficMode = ScheduledThermEffic; + tmpSimplePVTperf(Item).ThermEfficMode = ThermEfficEnum::SCHEDULED; } else { ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); @@ -243,7 +231,7 @@ namespace PhotovoltaicThermalCollectors { tmpSimplePVTperf(Item).ThermEffic = DataIPShortCuts::rNumericArgs(2); tmpSimplePVTperf(Item).ThermEffSchedNum = ScheduleManager::GetScheduleIndex(DataIPShortCuts::cAlphaArgs(3)); - if ((tmpSimplePVTperf(Item).ThermEffSchedNum == 0) && (tmpSimplePVTperf(Item).ThermEfficMode == ScheduledThermEffic)) { + if ((tmpSimplePVTperf(Item).ThermEffSchedNum == 0) && (tmpSimplePVTperf(Item).ThermEfficMode == ThermEfficEnum::SCHEDULED)) { ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(3) + " = " + DataIPShortCuts::cAlphaArgs(3)); ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ErrorsFound = true; @@ -345,9 +333,9 @@ namespace PhotovoltaicThermalCollectors { } if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(5), "Water")) { - PVT(Item).WorkingFluidType = LiquidWorkingFluid; + PVT(Item).WorkingFluidType = WorkingFluidEnum::LIQUID; } else if (UtilityRoutines::SameString(DataIPShortCuts::cAlphaArgs(5), "Air")) { - PVT(Item).WorkingFluidType = AirWorkingFluid; + PVT(Item).WorkingFluidType = WorkingFluidEnum::AIR; } else { if (DataIPShortCuts::lAlphaFieldBlanks(5)) { ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(5) + " = " + DataIPShortCuts::cAlphaArgs(5)); @@ -360,7 +348,7 @@ namespace PhotovoltaicThermalCollectors { ErrorsFound = true; } - if (PVT(Item).WorkingFluidType == LiquidWorkingFluid) { + if (PVT(Item).WorkingFluidType == WorkingFluidEnum::LIQUID) { PVT(Item).PlantInletNodeNum = NodeInputManager::GetOnlySingleNode( DataIPShortCuts::cAlphaArgs(6), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); PVT(Item).PlantOutletNodeNum = NodeInputManager::GetOnlySingleNode( @@ -371,7 +359,7 @@ namespace PhotovoltaicThermalCollectors { PVT(Item).WLoopSideNum = DataPlant::DemandSupply_No; } - if (PVT(Item).WorkingFluidType == AirWorkingFluid) { + if (PVT(Item).WorkingFluidType == WorkingFluidEnum::AIR) { PVT(Item).HVACInletNodeNum = NodeInputManager::GetOnlySingleNode( DataIPShortCuts::cAlphaArgs(8), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); PVT(Item).HVACOutletNodeNum = NodeInputManager::GetOnlySingleNode( @@ -387,9 +375,9 @@ namespace PhotovoltaicThermalCollectors { } if (PVT(Item).DesignVolFlowRate != DataSizing::AutoSize) { - if (PVT(Item).WorkingFluidType == LiquidWorkingFluid) { + if (PVT(Item).WorkingFluidType == WorkingFluidEnum::LIQUID) { PlantUtilities::RegisterPlantCompDesignFlow(PVT(Item).PlantInletNodeNum, PVT(Item).DesignVolFlowRate); - } else if (PVT(Item).WorkingFluidType == AirWorkingFluid) { + } else if (PVT(Item).WorkingFluidType == WorkingFluidEnum::AIR) { PVT(Item).MaxMassFlowRate = PVT(Item).DesignVolFlowRate * DataEnvironment::StdRhoAir; } PVT(Item).SizingInit = false; @@ -402,7 +390,7 @@ namespace PhotovoltaicThermalCollectors { SetupOutputVariable( "Generator Produced Thermal Rate", OutputProcessor::Unit::W, PVT(Item).Report.ThermPower, "System", "Average", PVT(Item).Name); - if (PVT(Item).WorkingFluidType == LiquidWorkingFluid) { + if (PVT(Item).WorkingFluidType == WorkingFluidEnum::LIQUID) { SetupOutputVariable("Generator Produced Thermal Energy", OutputProcessor::Unit::J, PVT(Item).Report.ThermEnergy, @@ -414,7 +402,7 @@ namespace PhotovoltaicThermalCollectors { "HeatProduced", _, "Plant"); - } else if (PVT(Item).WorkingFluidType == AirWorkingFluid) { + } else if (PVT(Item).WorkingFluidType == WorkingFluidEnum::AIR) { SetupOutputVariable("Generator Produced Thermal Energy", OutputProcessor::Unit::J, PVT(Item).Report.ThermEnergy, @@ -529,7 +517,7 @@ namespace PhotovoltaicThermalCollectors { if (!DataGlobals::SysSizingCalc && PVT(PVTnum).MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { for (PVTindex = 1; PVTindex <= NumPVT; ++PVTindex) { - if (PVT(PVTindex).WorkingFluidType == AirWorkingFluid) { + if (PVT(PVTindex).WorkingFluidType == WorkingFluidEnum::AIR) { if (DataLoopNode::Node(PVT(PVTindex).HVACOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!DataGlobals::AnyEnergyManagementSystemInModel) { ShowSevereError("Missing temperature setpoint for PVT outlet node "); @@ -550,16 +538,16 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).MySetPointCheckFlag = false; } - if (!DataGlobals::SysSizingCalc && PVT(PVTnum).SizingInit && (PVT(PVTnum).WorkingFluidType == AirWorkingFluid)) { + if (!DataGlobals::SysSizingCalc && PVT(PVTnum).SizingInit && (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR)) { SizePVT(PVTnum); } { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); - if (SELECT_CASE_var == LiquidWorkingFluid) { + if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { InletNode = PVT(PVTnum).PlantInletNodeNum; OutletNode = PVT(PVTnum).PlantOutletNodeNum; - } else if (SELECT_CASE_var == AirWorkingFluid) { + } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { InletNode = PVT(PVTnum).HVACInletNodeNum; OutletNode = PVT(PVTnum).HVACOutletNodeNum; } else { @@ -588,7 +576,7 @@ namespace PhotovoltaicThermalCollectors { { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); - if (SELECT_CASE_var == LiquidWorkingFluid) { + if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidName, DataGlobals::HWInitConvTemp, @@ -608,7 +596,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).Simple.LastCollectorTemp = 23.0; - } else if (SELECT_CASE_var == AirWorkingFluid) { + } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { PVT(PVTnum).Simple.LastCollectorTemp = 23.0; } } @@ -620,7 +608,7 @@ namespace PhotovoltaicThermalCollectors { { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); - if (SELECT_CASE_var == LiquidWorkingFluid) { + if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { // heating only right now, so control flow requests based on incident solar SurfNum = PVT(PVTnum).SurfNum; if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { @@ -640,7 +628,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).WLoopSideNum, PVT(PVTnum).WLoopBranchNum, PVT(PVTnum).WLoopCompNum); // DSU | DSU - } else if (SELECT_CASE_var == AirWorkingFluid) { + } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { PVT(PVTnum).MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; } } @@ -684,7 +672,7 @@ namespace PhotovoltaicThermalCollectors { PltSizNum = 0; ErrorsFound = false; - if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { + if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { if (!allocated(DataSizing::PlantSizData)) return; if (!allocated(DataPlant::PlantLoop)) return; @@ -757,7 +745,7 @@ namespace PhotovoltaicThermalCollectors { } } // plant component - if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { + if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { if (DataSizing::CurSysNum > 0) { if (!PVT(PVTnum).DesignVolFlowRateWasAutoSized && !SizingDesRunThisAirSys) { // Simulation continue @@ -845,7 +833,7 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // decide if PVT should be in cooling or heat mode and if it should be bypassed or not - if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { + if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { @@ -874,7 +862,7 @@ namespace PhotovoltaicThermalCollectors { } } - } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { + } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? @@ -930,9 +918,9 @@ namespace PhotovoltaicThermalCollectors { { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); - if (SELECT_CASE_var == LiquidWorkingFluid) { + if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { InletNode = PVT(PVTnum).PlantInletNodeNum; - } else if (SELECT_CASE_var == AirWorkingFluid) { + } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { InletNode = PVT(PVTnum).HVACInletNodeNum; } } @@ -947,9 +935,9 @@ namespace PhotovoltaicThermalCollectors { { auto const SELECT_CASE_var(PVT(PVTnum).Simple.ThermEfficMode); - if (SELECT_CASE_var == FixedThermEffic) { + if (SELECT_CASE_var == ThermEfficEnum::FIXED) { Eff = PVT(PVTnum).Simple.ThermEffic; - } else if (SELECT_CASE_var == ScheduledThermEffic) { + } else if (SELECT_CASE_var == ThermEfficEnum::SCHEDULED) { Eff = ScheduleManager::GetCurrentScheduleValue(PVT(PVTnum).Simple.ThermEffSchedNum); PVT(PVTnum).Simple.ThermEffic = Eff; } @@ -957,7 +945,7 @@ namespace PhotovoltaicThermalCollectors { PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(SurfNum) * Eff * PVT(PVTnum).AreaCol; - if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { + if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { Winlet = DataLoopNode::Node(InletNode).HumRat; CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); if (mdot * CpInlet > 0.0) { @@ -980,7 +968,7 @@ namespace PhotovoltaicThermalCollectors { } else { BypassFraction = 0.0; } - } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { + } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { CpInlet = Psychrometrics::CPHW(Tinlet); if (mdot * CpInlet != 0.0) { // protect divide by zero PotentialOutletTemp = Tinlet + PotentialHeatGain / (mdot * CpInlet); @@ -1006,12 +994,12 @@ namespace PhotovoltaicThermalCollectors { ConvectionCoefficients::InitExteriorConvectionCoeff( SurfNum, 0.0, RoughSurf, PVT(PVTnum).Simple.SurfEmissivity, PVT(PVTnum).Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); - if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { + if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { Winlet = DataLoopNode::Node(InletNode).HumRat; CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); WetBulbInlet = Psychrometrics::PsyTwbFnTdbWPb(Tinlet, Winlet, DataEnvironment::OutBaroPress, RoutineName); DewPointInlet = Psychrometrics::PsyTdpFnTdbTwbPb(Tinlet, WetBulbInlet, DataEnvironment::OutBaroPress, RoutineName); - } else if (PVT(PVTnum).WorkingFluidType == LiquidWorkingFluid) { + } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { CpInlet = Psychrometrics::CPHW(Tinlet); } @@ -1023,7 +1011,7 @@ namespace PhotovoltaicThermalCollectors { PotentialOutletTemp = 2.0 * Tcollector - Tinlet; PVT(PVTnum).Report.ToutletWorkFluid = PotentialOutletTemp; // trap for air not being cooled below its wetbulb. - if (PVT(PVTnum).WorkingFluidType == AirWorkingFluid) { + if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { if (PotentialOutletTemp < DewPointInlet) { // water removal would be needed.. not going to allow that for now. limit cooling to dew point and model bypass if (Tinlet != PotentialOutletTemp) { @@ -1075,14 +1063,14 @@ namespace PhotovoltaicThermalCollectors { { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); - if (SELECT_CASE_var == LiquidWorkingFluid) { + if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { InletNode = PVT(PVTnum).PlantInletNodeNum; OutletNode = PVT(PVTnum).PlantOutletNodeNum; PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); DataLoopNode::Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; - } else if (SELECT_CASE_var == AirWorkingFluid) { + } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { InletNode = PVT(PVTnum).HVACInletNodeNum; OutletNode = PVT(PVTnum).HVACOutletNodeNum; diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index 69c2be15cad..6325ba3e08c 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -55,20 +55,21 @@ namespace EnergyPlus { namespace PhotovoltaicThermalCollectors { - extern int const SimplePVTmodel; - - extern int const ScheduledThermEffic; // mode for thermal efficiency is to use schedule - extern int const FixedThermEffic; // mode for thermal efficiency is to use fixed value + enum struct WorkingFluidEnum + { + LIQUID, + AIR + }; - extern int const LiquidWorkingFluid; - extern int const AirWorkingFluid; + enum struct ThermEfficEnum + { + SCHEDULED, + FIXED + }; extern int const CalledFromPlantLoopEquipMgr; extern int const CalledFromOutsideAirSystem; - extern Real64 const SimplePVTWaterSizeFactor; // [ m3/s/m2 ] average of collectors in SolarCollectors.idf - - extern Array1D_bool CheckEquipName; extern int NumPVT; // count of all types of PVT in input file extern int NumSimplePVTPerform; // count of simple PVT performance objects in input file @@ -77,7 +78,7 @@ namespace PhotovoltaicThermalCollectors { // Members std::string Name; Real64 ThermalActiveFract; // fraction of surface area with active thermal collection - int ThermEfficMode; // setting for how therm effic is determined + ThermEfficEnum ThermEfficMode; // setting for how therm effic is determined Real64 ThermEffic; // fixed or current Therm efficiency int ThermEffSchedNum; // pointer to schedule for therm effic (if any) Real64 SurfEmissivity; // surface emittance in long wave IR @@ -86,7 +87,7 @@ namespace PhotovoltaicThermalCollectors { // Default Constructor SimplePVTModelStruct() - : ThermalActiveFract(0.0), ThermEfficMode(0), ThermEffic(0.0), ThermEffSchedNum(0), SurfEmissivity(0.0), LastCollectorTemp(0.0), + : ThermalActiveFract(0.0), ThermEfficMode(ThermEfficEnum::FIXED), ThermEffic(0.0), ThermEffSchedNum(0), SurfEmissivity(0.0), LastCollectorTemp(0.0), CollectorTemp(0.0) { } @@ -131,7 +132,7 @@ namespace PhotovoltaicThermalCollectors { int PVnum; // PV index bool PVfound; // init, need to delay get input until PV gotten SimplePVTModelStruct Simple; // performance data structure. - int WorkingFluidType; + WorkingFluidEnum WorkingFluidType; int PlantInletNodeNum; int PlantOutletNodeNum; int HVACInletNodeNum; @@ -152,7 +153,7 @@ namespace PhotovoltaicThermalCollectors { // Default Constructor PVTCollectorStruct() : TypeNum(0), WLoopNum(0), WLoopSideNum(0), WLoopBranchNum(0), WLoopCompNum(0), EnvrnInit(true), SizingInit(true), PVTModelType(0), SurfNum(0), - PVnum(0), PVfound(false), WorkingFluidType(0), PlantInletNodeNum(0), PlantOutletNodeNum(0), HVACInletNodeNum(0), HVACOutletNodeNum(0), + PVnum(0), PVfound(false), WorkingFluidType(WorkingFluidEnum::LIQUID), PlantInletNodeNum(0), PlantOutletNodeNum(0), HVACInletNodeNum(0), HVACOutletNodeNum(0), DesignVolFlowRate(0.0), DesignVolFlowRateWasAutoSized(false), MaxMassFlowRate(0.0), MassFlowRate(0.0), AreaCol(0.0), BypassDamperOff(true), CoolingUseful(false), HeatingUseful(false), MySetPointCheckFlag(true), MyOneTimeFlag(true), SetLoopIndexFlag(true) From 609022f2691e97f52b928c64550b7bf69ddb9932 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 11:48:56 -0700 Subject: [PATCH 26/86] cleanup locals --- .../PhotovoltaicThermalCollectors.cc | 142 +++++++----------- 1 file changed, 56 insertions(+), 86 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index a28e6baf174..e7ce01d09df 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -192,8 +192,6 @@ namespace PhotovoltaicThermalCollectors { int NumNumbers; // Number of Numbers for each GetObjectItem call int IOStatus; // Used in GetObjectItem bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine - int SurfNum; // local use only - int ThisParamObj; // Object Data Array1D tmpSimplePVTperf; @@ -261,7 +259,7 @@ namespace PhotovoltaicThermalCollectors { if (UtilityRoutines::IsNameEmpty(DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cCurrentModuleObject, ErrorsFound)) continue; PVT(Item).Name = DataIPShortCuts::cAlphaArgs(1); - PVT(Item).TypeNum = DataPlant::TypeOf_PVTSolarCollectorFlatPlate; // DSU, assigned in DataPlant + PVT(Item).TypeNum = DataPlant::TypeOf_PVTSolarCollectorFlatPlate; PVT(Item).SurfNum = UtilityRoutines::FindItemInList(DataIPShortCuts::cAlphaArgs(2), DataSurfaces::Surface); // check surface @@ -277,8 +275,6 @@ namespace PhotovoltaicThermalCollectors { } ErrorsFound = true; } else { - // ! Found one -- make sure has right parameters for PVT - SurfNum = PVT(Item).SurfNum; if (!DataSurfaces::Surface(PVT(Item).SurfNum).ExtSolar) { ShowSevereError("Invalid " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); @@ -287,11 +283,11 @@ namespace PhotovoltaicThermalCollectors { ErrorsFound = true; } // check surface orientation, warn if upside down - if ((DataSurfaces::Surface(SurfNum).Tilt < -95.0) || (DataSurfaces::Surface(SurfNum).Tilt > 95.0)) { + if ((DataSurfaces::Surface(PVT(Item).SurfNum).Tilt < -95.0) || (DataSurfaces::Surface(PVT(Item).SurfNum).Tilt > 95.0)) { ShowWarningError("Suspected input problem with " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ShowContinueError("Surface used for solar collector faces down"); - ShowContinueError("Surface tilt angle (degrees from ground outward normal) = " + General::RoundSigDigits(DataSurfaces::Surface(SurfNum).Tilt, 2)); + ShowContinueError("Surface tilt angle (degrees from ground outward normal) = " + General::RoundSigDigits(DataSurfaces::Surface(PVT(Item).SurfNum).Tilt, 2)); } } // check surface @@ -303,7 +299,7 @@ namespace PhotovoltaicThermalCollectors { ErrorsFound = true; } else { PVT(Item).PVTModelName = DataIPShortCuts::cAlphaArgs(3); - ThisParamObj = UtilityRoutines::FindItemInList(PVT(Item).PVTModelName, tmpSimplePVTperf); + int ThisParamObj = UtilityRoutines::FindItemInList(PVT(Item).PVTModelName, tmpSimplePVTperf); if (ThisParamObj > 0) { PVT(Item).Simple = tmpSimplePVTperf(ThisParamObj); // entire structure assigned // do one-time setups on input data @@ -463,13 +459,6 @@ namespace PhotovoltaicThermalCollectors { static std::string const RoutineName("InitPVTcollectors"); - int InletNode = 0; - int OutletNode = 0; - int PVTindex; - int SurfNum; - bool errFlag; - Real64 rho; // local fluid density kg/s - // Do the one time initializations if (PVT(PVTnum).MyOneTimeFlag) { PVT(PVTnum).MyOneTimeFlag = false; @@ -477,7 +466,7 @@ namespace PhotovoltaicThermalCollectors { if (PVT(PVTnum).SetLoopIndexFlag) { if (allocated(DataPlant::PlantLoop) && (PVT(PVTnum).PlantInletNodeNum > 0)) { - errFlag = false; + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(PVT(PVTnum).Name, PVT(PVTnum).TypeNum, PVT(PVTnum).WLoopNum, @@ -516,7 +505,7 @@ namespace PhotovoltaicThermalCollectors { } if (!DataGlobals::SysSizingCalc && PVT(PVTnum).MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { - for (PVTindex = 1; PVTindex <= NumPVT; ++PVTindex) { + for (int PVTindex = 1; PVTindex <= NumPVT; ++PVTindex) { if (PVT(PVTindex).WorkingFluidType == WorkingFluidEnum::AIR) { if (DataLoopNode::Node(PVT(PVTindex).HVACOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { if (!DataGlobals::AnyEnergyManagementSystemInModel) { @@ -542,6 +531,9 @@ namespace PhotovoltaicThermalCollectors { SizePVT(PVTnum); } + int InletNode = 0; + int OutletNode = 0; + { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { @@ -578,7 +570,7 @@ namespace PhotovoltaicThermalCollectors { if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidName, DataGlobals::HWInitConvTemp, DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidIndex, RoutineName); @@ -609,25 +601,20 @@ namespace PhotovoltaicThermalCollectors { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { - // heating only right now, so control flow requests based on incident solar - SurfNum = PVT(PVTnum).SurfNum; - if (DataHeatBalance::QRadSWOutIncident(SurfNum) > DataPhotovoltaics::MinIrradiance) { - // IF (FirstHVACIteration) THEN - PVT(PVTnum).MassFlowRate = PVT(PVTnum).MaxMassFlowRate; // DSU - // ENDIF + // heating only right now, so control flow requests based on incident solar; + if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { + PVT(PVTnum).MassFlowRate = PVT(PVTnum).MaxMassFlowRate; } else { - // IF (FirstHVACIteration) THEN - PVT(PVTnum).MassFlowRate = 0.0; // DSU - // ENDIF + PVT(PVTnum).MassFlowRate = 0.0; } - // Should we declare a mass flow rate variable in the data structure instead of using node(outlet)%MassFlowRate ? DSU + PlantUtilities::SetComponentFlowRate(PVT(PVTnum).MassFlowRate, InletNode, OutletNode, PVT(PVTnum).WLoopNum, PVT(PVTnum).WLoopSideNum, PVT(PVTnum).WLoopBranchNum, - PVT(PVTnum).WLoopCompNum); // DSU | DSU + PVT(PVTnum).WLoopCompNum); } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { PVT(PVTnum).MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; } @@ -650,17 +637,10 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // Obtains hot water flow rate from the plant sizing array. - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int PltSizNum; // Plant Sizing index corresponding to CurLoopNum - bool ErrorsFound; // If errors detected in input - Real64 DesVolFlow; - Real64 DesMassFlow; - bool HardSizeNoDesRun; // Indicator to hardsize and no sizing run bool SizingDesRunThisAirSys; // true if a particular air system had a Sizing:System object and system sizing done - Real64 DesignVolFlowRateDes; // Autosize design volume flow for reporting - Real64 DesignVolFlowRateUser; // Hardsize design volume flow for reporting - HardSizeNoDesRun = !(DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone); + // Indicator to hardsize and no sizing run + bool HardSizeNoDesRun = !(DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone); if (DataSizing::CurSysNum > 0) { CheckThisAirSystemForSizing(DataSizing::CurSysNum, SizingDesRunThisAirSys); @@ -668,9 +648,9 @@ namespace PhotovoltaicThermalCollectors { SizingDesRunThisAirSys = false; } - DesignVolFlowRateDes = 0.0; - PltSizNum = 0; - ErrorsFound = false; + Real64 DesignVolFlowRateDes = 0.0; // Autosize design volume flow for reporting + int PltSizNum = 0; // Plant Sizing index corresponding to CurLoopNum + bool ErrorsFound = false; if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { @@ -683,11 +663,10 @@ namespace PhotovoltaicThermalCollectors { if (PVT(PVTnum).WLoopSideNum == DataPlant::SupplySide) { if (PltSizNum > 0) { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { - DesVolFlow = DataSizing::PlantSizData(PltSizNum).DesVolFlowRate; + DesignVolFlowRateDes = DataSizing::PlantSizData(PltSizNum).DesVolFlowRate; } else { - DesVolFlow = 0.0; + DesignVolFlowRateDes = 0.0; } - DesignVolFlowRateDes = DesVolFlow; } else { if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -725,7 +704,7 @@ namespace PhotovoltaicThermalCollectors { } else { // Hardsized with sizing data if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0 && DataPlant::PlantFinalSizesOkayToReport) { - DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; + Real64 DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Design Size Design Flow Rate [m3/s]", @@ -759,23 +738,22 @@ namespace PhotovoltaicThermalCollectors { } else { CheckSysSizing("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name); if (DataSizing::CurOASysNum > 0) { - DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesOutAirVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesOutAirVolFlow; } else { { auto const SELECT_CASE_var(DataSizing::CurDuctType); if (SELECT_CASE_var == DataHVACGlobals::Main) { - DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; } else if (SELECT_CASE_var == DataHVACGlobals::Cooling) { - DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesCoolVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesCoolVolFlow; } else if (SELECT_CASE_var == DataHVACGlobals::Heating) { - DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesHeatVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesHeatVolFlow; } else { - DesVolFlow = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; } } } - DesMassFlow = DataEnvironment::StdRhoAir * DesVolFlow; - DesignVolFlowRateDes = DesVolFlow; + Real64 DesMassFlow = DataEnvironment::StdRhoAir * DesignVolFlowRateDes; PVT(PVTnum).MaxMassFlowRate = DesMassFlow; } if (!HardSizeNoDesRun) { @@ -788,7 +766,7 @@ namespace PhotovoltaicThermalCollectors { PVT(PVTnum).SizingInit = false; } else { if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0) { - DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; + Real64 DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name, "Design Size Design Flow Rate [m3/s]", @@ -895,26 +873,6 @@ namespace PhotovoltaicThermalCollectors { static std::string const RoutineName("CalcPVTcollectors"); int InletNode(0); - Real64 Eff(0.0); - int SurfNum(0); - int RoughSurf(0); - Real64 HcExt(0.0); - Real64 HrSky(0.0); - Real64 HrGround(0.0); - Real64 HrAir(0.0); - Real64 Tcollector(0.0); - Real64 mdot(0.0); - Real64 Tinlet(0.0); - Real64 Winlet(0.0); - Real64 CpInlet(0.0); - Real64 PotentialOutletTemp(0.0); - Real64 BypassFraction(0.0); - Real64 PotentialHeatGain(0.0); - Real64 WetBulbInlet(0.0); - Real64 DewPointInlet(0.0); - - SurfNum = PVT(PVTnum).SurfNum; - RoughSurf = DataHeatBalance::VerySmooth; { auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); @@ -925,13 +883,18 @@ namespace PhotovoltaicThermalCollectors { } } - mdot = PVT(PVTnum).MassFlowRate; - Tinlet = DataLoopNode::Node(InletNode).Temp; + Real64 mdot = PVT(PVTnum).MassFlowRate; + Real64 Tinlet = DataLoopNode::Node(InletNode).Temp; if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { + Real64 BypassFraction(0.0); + Real64 PotentialOutletTemp(0.0); + if (PVT(PVTnum).HeatingUseful && PVT(PVTnum).BypassDamperOff && (mdot > 0.0)) { + Real64 Eff(0.0); + { auto const SELECT_CASE_var(PVT(PVTnum).Simple.ThermEfficMode); @@ -943,11 +906,11 @@ namespace PhotovoltaicThermalCollectors { } } - PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(SurfNum) * Eff * PVT(PVTnum).AreaCol; + Real64 PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) * Eff * PVT(PVTnum).AreaCol; if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { - Winlet = DataLoopNode::Node(InletNode).HumRat; - CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); + Real64 Winlet = DataLoopNode::Node(InletNode).HumRat; + Real64 CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); if (mdot * CpInlet > 0.0) { PotentialOutletTemp = Tinlet + PotentialHeatGain / (mdot * CpInlet); } else { @@ -969,7 +932,7 @@ namespace PhotovoltaicThermalCollectors { BypassFraction = 0.0; } } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { - CpInlet = Psychrometrics::CPHW(Tinlet); + Real64 CpInlet = Psychrometrics::CPHW(Tinlet); if (mdot * CpInlet != 0.0) { // protect divide by zero PotentialOutletTemp = Tinlet + PotentialHeatGain / (mdot * CpInlet); } else { @@ -991,11 +954,20 @@ namespace PhotovoltaicThermalCollectors { } else if (PVT(PVTnum).CoolingUseful && PVT(PVTnum).BypassDamperOff && (mdot > 0.0)) { // calculate cooling using energy balance + Real64 HrGround(0.0); + Real64 HrAir(0.0); + Real64 HcExt(0.0); + Real64 HrSky(0.0); + ConvectionCoefficients::InitExteriorConvectionCoeff( - SurfNum, 0.0, RoughSurf, PVT(PVTnum).Simple.SurfEmissivity, PVT(PVTnum).Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); + PVT(PVTnum).SurfNum, 0.0, DataHeatBalance::VerySmooth, PVT(PVTnum).Simple.SurfEmissivity, PVT(PVTnum).Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); + + Real64 WetBulbInlet(0.0); + Real64 DewPointInlet(0.0); + Real64 CpInlet(0.0); if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { - Winlet = DataLoopNode::Node(InletNode).HumRat; + Real64 Winlet = DataLoopNode::Node(InletNode).HumRat; CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); WetBulbInlet = Psychrometrics::PsyTwbFnTdbWPb(Tinlet, Winlet, DataEnvironment::OutBaroPress, RoutineName); DewPointInlet = Psychrometrics::PsyTdpFnTdbTwbPb(Tinlet, WetBulbInlet, DataEnvironment::OutBaroPress, RoutineName); @@ -1003,9 +975,9 @@ namespace PhotovoltaicThermalCollectors { CpInlet = Psychrometrics::CPHW(Tinlet); } - Tcollector = (2.0 * mdot * CpInlet * Tinlet + - PVT(PVTnum).AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + HrAir * DataSurfaces::Surface(SurfNum).OutDryBulbTemp + - HcExt * DataSurfaces::Surface(SurfNum).OutDryBulbTemp)) / + Real64 Tcollector = (2.0 * mdot * CpInlet * Tinlet + + PVT(PVTnum).AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + HrAir * DataSurfaces::Surface(PVT(PVTnum).SurfNum).OutDryBulbTemp + + HcExt * DataSurfaces::Surface(PVT(PVTnum).SurfNum).OutDryBulbTemp)) / (2.0 * mdot * CpInlet + PVT(PVTnum).AreaCol * (HrGround + HrSky + HrAir + HcExt)); PotentialOutletTemp = 2.0 * Tcollector - Tinlet; @@ -1136,7 +1108,6 @@ namespace PhotovoltaicThermalCollectors { // If incorrect PVT name is given, ErrorsFound is returned as true and node number as zero. int NodeNum; // node number returned - int WhichPVT; if (GetInputFlag) { @@ -1170,7 +1141,6 @@ namespace PhotovoltaicThermalCollectors { // If incorrect PVT name is given, ErrorsFound is returned as true and node number as zero. int NodeNum; // node number returned - int WhichPVT; if (GetInputFlag) { From af63c805528c7fd642b59708a7f8e99dde31c96b Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 15:09:20 -0700 Subject: [PATCH 27/86] member functions --- .../PhotovoltaicThermalCollectors.cc | 398 +++++++++--------- .../PhotovoltaicThermalCollectors.hh | 33 +- 2 files changed, 216 insertions(+), 215 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index e7ce01d09df..47ac8f4c48c 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -156,8 +156,8 @@ namespace PhotovoltaicThermalCollectors { if (present(InitLoopEquip)) { if (InitLoopEquip) { - InitPVTcollectors(PVTnum, FirstHVACIteration); - SizePVT(PVTnum); + PVT(PVTnum).initialize(FirstHVACIteration); + PVT(PVTnum).size(); return; } } @@ -166,13 +166,13 @@ namespace PhotovoltaicThermalCollectors { if ((PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) && (CalledFrom == CalledFromPlantLoopEquipMgr)) return; if ((PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) && (CalledFrom == CalledFromOutsideAirSystem)) return; - InitPVTcollectors(PVTnum, FirstHVACIteration); + PVT(PVTnum).initialize(FirstHVACIteration); - ControlPVTcollector(PVTnum); + PVT(PVTnum).control(); - CalcPVTcollectors(PVTnum); + PVT(PVTnum).calculate(); - UpdatePVTcollectors(PVTnum); + PVT(PVTnum).update(); } void GetPVTcollectorsInput() @@ -445,7 +445,7 @@ namespace PhotovoltaicThermalCollectors { if (allocated(tmpSimplePVTperf)) tmpSimplePVTperf.deallocate(); } - void InitPVTcollectors(int const PVTnum, bool const FirstHVACIteration) + void PVTCollectorStruct::initialize(bool const FirstHVACIteration) { // SUBROUTINE INFORMATION: @@ -460,19 +460,19 @@ namespace PhotovoltaicThermalCollectors { static std::string const RoutineName("InitPVTcollectors"); // Do the one time initializations - if (PVT(PVTnum).MyOneTimeFlag) { - PVT(PVTnum).MyOneTimeFlag = false; + if (this->MyOneTimeFlag) { + this->MyOneTimeFlag = false; } - if (PVT(PVTnum).SetLoopIndexFlag) { - if (allocated(DataPlant::PlantLoop) && (PVT(PVTnum).PlantInletNodeNum > 0)) { + if (this->SetLoopIndexFlag) { + if (allocated(DataPlant::PlantLoop) && (this->PlantInletNodeNum > 0)) { bool errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(PVT(PVTnum).Name, - PVT(PVTnum).TypeNum, - PVT(PVTnum).WLoopNum, - PVT(PVTnum).WLoopSideNum, - PVT(PVTnum).WLoopBranchNum, - PVT(PVTnum).WLoopCompNum, + PlantUtilities::ScanPlantLoopsForObject(this->Name, + this->TypeNum, + this->WLoopNum, + this->WLoopSideNum, + this->WLoopBranchNum, + this->WLoopCompNum, errFlag, _, _, @@ -482,29 +482,29 @@ namespace PhotovoltaicThermalCollectors { if (errFlag) { ShowFatalError("InitPVTcollectors: Program terminated for previous conditions."); } - PVT(PVTnum).SetLoopIndexFlag = false; + this->SetLoopIndexFlag = false; } } // finish set up of PV, because PV get-input follows PVT's get input. - if (!PVT(PVTnum).PVfound) { + if (!this->PVfound) { if (allocated(DataPhotovoltaics::PVarray)) { - PVT(PVTnum).PVnum = UtilityRoutines::FindItemInList(PVT(PVTnum).PVname, DataPhotovoltaics::PVarray); - if (PVT(PVTnum).PVnum == 0) { - ShowSevereError("Invalid name for photovoltaic generator = " + PVT(PVTnum).PVname); - ShowContinueError("Entered in flat plate photovoltaic-thermal collector = " + PVT(PVTnum).Name); + this->PVnum = UtilityRoutines::FindItemInList(this->PVname, DataPhotovoltaics::PVarray); + if (this->PVnum == 0) { + ShowSevereError("Invalid name for photovoltaic generator = " + this->PVname); + ShowContinueError("Entered in flat plate photovoltaic-thermal collector = " + this->Name); } else { - PVT(PVTnum).PVfound = true; + this->PVfound = true; } } else { if ((!DataGlobals::BeginEnvrnFlag) && (!FirstHVACIteration)) { ShowSevereError("Photovoltaic generators are missing for Photovoltaic Thermal modeling"); - ShowContinueError("Needed for flat plate photovoltaic-thermal collector = " + PVT(PVTnum).Name); + ShowContinueError("Needed for flat plate photovoltaic-thermal collector = " + this->Name); } } } - if (!DataGlobals::SysSizingCalc && PVT(PVTnum).MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { + if (!DataGlobals::SysSizingCalc && this->MySetPointCheckFlag && DataHVACGlobals::DoSetPointTest) { for (int PVTindex = 1; PVTindex <= NumPVT; ++PVTindex) { if (PVT(PVTindex).WorkingFluidType == WorkingFluidEnum::AIR) { if (DataLoopNode::Node(PVT(PVTindex).HVACOutletNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { @@ -524,104 +524,104 @@ namespace PhotovoltaicThermalCollectors { } } } - PVT(PVTnum).MySetPointCheckFlag = false; + this->MySetPointCheckFlag = false; } - if (!DataGlobals::SysSizingCalc && PVT(PVTnum).SizingInit && (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR)) { - SizePVT(PVTnum); + if (!DataGlobals::SysSizingCalc && this->SizingInit && (this->WorkingFluidType == WorkingFluidEnum::AIR)) { + this->size(); } int InletNode = 0; int OutletNode = 0; { - auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); + auto const SELECT_CASE_var(this->WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { - InletNode = PVT(PVTnum).PlantInletNodeNum; - OutletNode = PVT(PVTnum).PlantOutletNodeNum; + InletNode = this->PlantInletNodeNum; + OutletNode = this->PlantOutletNodeNum; } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { - InletNode = PVT(PVTnum).HVACInletNodeNum; - OutletNode = PVT(PVTnum).HVACOutletNodeNum; + InletNode = this->HVACInletNodeNum; + OutletNode = this->HVACOutletNodeNum; } else { assert(false); } } - if (DataGlobals::BeginEnvrnFlag && PVT(PVTnum).EnvrnInit) { - - PVT(PVTnum).MassFlowRate = 0.0; - PVT(PVTnum).BypassDamperOff = true; - PVT(PVTnum).CoolingUseful = false; - PVT(PVTnum).HeatingUseful = false; - PVT(PVTnum).Simple.LastCollectorTemp = 0.0; - PVT(PVTnum).Simple.CollectorTemp = 0.0; - PVT(PVTnum).Report.ThermEfficiency = 0.0; - PVT(PVTnum).Report.ThermPower = 0.0; - PVT(PVTnum).Report.ThermHeatGain = 0.0; - PVT(PVTnum).Report.ThermHeatLoss = 0.0; - PVT(PVTnum).Report.ThermEnergy = 0.0; - PVT(PVTnum).Report.MdotWorkFluid = 0.0; - PVT(PVTnum).Report.TinletWorkFluid = 0.0; - PVT(PVTnum).Report.ToutletWorkFluid = 0.0; - PVT(PVTnum).Report.BypassStatus = 0.0; + if (DataGlobals::BeginEnvrnFlag && this->EnvrnInit) { + + this->MassFlowRate = 0.0; + this->BypassDamperOff = true; + this->CoolingUseful = false; + this->HeatingUseful = false; + this->Simple.LastCollectorTemp = 0.0; + this->Simple.CollectorTemp = 0.0; + this->Report.ThermEfficiency = 0.0; + this->Report.ThermPower = 0.0; + this->Report.ThermHeatGain = 0.0; + this->Report.ThermHeatLoss = 0.0; + this->Report.ThermEnergy = 0.0; + this->Report.MdotWorkFluid = 0.0; + this->Report.TinletWorkFluid = 0.0; + this->Report.ToutletWorkFluid = 0.0; + this->Report.BypassStatus = 0.0; { - auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); + auto const SELECT_CASE_var(this->WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { - Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->WLoopNum).FluidName, DataGlobals::HWInitConvTemp, - DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).FluidIndex, + DataPlant::PlantLoop(this->WLoopNum).FluidIndex, RoutineName); - PVT(PVTnum).MaxMassFlowRate = PVT(PVTnum).DesignVolFlowRate * rho; + this->MaxMassFlowRate = this->DesignVolFlowRate * rho; PlantUtilities::InitComponentNodes(0.0, - PVT(PVTnum).MaxMassFlowRate, + this->MaxMassFlowRate, InletNode, OutletNode, - PVT(PVTnum).WLoopNum, - PVT(PVTnum).WLoopSideNum, - PVT(PVTnum).WLoopBranchNum, - PVT(PVTnum).WLoopCompNum); + this->WLoopNum, + this->WLoopSideNum, + this->WLoopBranchNum, + this->WLoopCompNum); - PVT(PVTnum).Simple.LastCollectorTemp = 23.0; + this->Simple.LastCollectorTemp = 23.0; } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { - PVT(PVTnum).Simple.LastCollectorTemp = 23.0; + this->Simple.LastCollectorTemp = 23.0; } } - PVT(PVTnum).EnvrnInit = false; + this->EnvrnInit = false; } - if (!DataGlobals::BeginEnvrnFlag) PVT(PVTnum).EnvrnInit = true; + if (!DataGlobals::BeginEnvrnFlag) this->EnvrnInit = true; { - auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); + auto const SELECT_CASE_var(this->WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { // heating only right now, so control flow requests based on incident solar; - if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { - PVT(PVTnum).MassFlowRate = PVT(PVTnum).MaxMassFlowRate; + if (DataHeatBalance::QRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { + this->MassFlowRate = this->MaxMassFlowRate; } else { - PVT(PVTnum).MassFlowRate = 0.0; + this->MassFlowRate = 0.0; } - PlantUtilities::SetComponentFlowRate(PVT(PVTnum).MassFlowRate, + PlantUtilities::SetComponentFlowRate(this->MassFlowRate, InletNode, OutletNode, - PVT(PVTnum).WLoopNum, - PVT(PVTnum).WLoopSideNum, - PVT(PVTnum).WLoopBranchNum, - PVT(PVTnum).WLoopCompNum); + this->WLoopNum, + this->WLoopSideNum, + this->WLoopBranchNum, + this->WLoopCompNum); } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { - PVT(PVTnum).MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; + this->MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; } } } - void SizePVT(int const PVTnum) + void PVTCollectorStruct::size() { // SUBROUTINE INFORMATION: @@ -652,15 +652,15 @@ namespace PhotovoltaicThermalCollectors { int PltSizNum = 0; // Plant Sizing index corresponding to CurLoopNum bool ErrorsFound = false; - if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { + if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { if (!allocated(DataSizing::PlantSizData)) return; if (!allocated(DataPlant::PlantLoop)) return; - if (PVT(PVTnum).WLoopNum > 0) { - PltSizNum = DataPlant::PlantLoop(PVT(PVTnum).WLoopNum).PlantSizNum; + if (this->WLoopNum > 0) { + PltSizNum = DataPlant::PlantLoop(this->WLoopNum).PlantSizNum; } - if (PVT(PVTnum).WLoopSideNum == DataPlant::SupplySide) { + if (this->WLoopSideNum == DataPlant::SupplySide) { if (PltSizNum > 0) { if (DataSizing::PlantSizData(PltSizNum).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { DesignVolFlowRateDes = DataSizing::PlantSizData(PltSizNum).DesVolFlowRate; @@ -668,52 +668,52 @@ namespace PhotovoltaicThermalCollectors { DesignVolFlowRateDes = 0.0; } } else { - if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { + if (this->DesignVolFlowRateWasAutoSized) { if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("Autosizing of PVT solar collector design flow rate requires a Sizing:Plant object"); - ShowContinueError("Occurs in PVT object=" + PVT(PVTnum).Name); + ShowContinueError("Occurs in PVT object=" + this->Name); ErrorsFound = true; } } else { // Hardsized - if (DataPlant::PlantFinalSizesOkayToReport && PVT(PVTnum).DesignVolFlowRate > 0.0) { + if (DataPlant::PlantFinalSizesOkayToReport && this->DesignVolFlowRate > 0.0) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "User-Specified Design Flow Rate [m3/s]", - PVT(PVTnum).DesignVolFlowRate); + this->DesignVolFlowRate); } } } - } else if (PVT(PVTnum).WLoopSideNum == DataPlant::DemandSide) { - DesignVolFlowRateDes = PVT(PVTnum).AreaCol * SimplePVTWaterSizeFactor; + } else if (this->WLoopSideNum == DataPlant::DemandSide) { + DesignVolFlowRateDes = this->AreaCol * SimplePVTWaterSizeFactor; } - if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { - PVT(PVTnum).DesignVolFlowRate = DesignVolFlowRateDes; + if (this->DesignVolFlowRateWasAutoSized) { + this->DesignVolFlowRate = DesignVolFlowRateDes; if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "Initial Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); } - PlantUtilities::RegisterPlantCompDesignFlow(PVT(PVTnum).PlantInletNodeNum, PVT(PVTnum).DesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(this->PlantInletNodeNum, this->DesignVolFlowRate); } else { // Hardsized with sizing data - if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0 && DataPlant::PlantFinalSizesOkayToReport) { - Real64 DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; + if (this->DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0 && DataPlant::PlantFinalSizesOkayToReport) { + Real64 DesignVolFlowRateUser = this->DesignVolFlowRate; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes, "User-Specified Design Flow Rate [m3/s]", DesignVolFlowRateUser); if (DataGlobals::DisplayExtraWarnings) { if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > DataSizing::AutoVsHardSizingThreshold) { - ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + PVT(PVTnum).Name); + ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + this->Name); ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); ShowContinueError("This may, or may not, indicate mismatched component sizes."); @@ -724,19 +724,19 @@ namespace PhotovoltaicThermalCollectors { } } // plant component - if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { + if (this->WorkingFluidType == WorkingFluidEnum::AIR) { if (DataSizing::CurSysNum > 0) { - if (!PVT(PVTnum).DesignVolFlowRateWasAutoSized && !SizingDesRunThisAirSys) { // Simulation continue + if (!this->DesignVolFlowRateWasAutoSized && !SizingDesRunThisAirSys) { // Simulation continue HardSizeNoDesRun = true; - if (PVT(PVTnum).DesignVolFlowRate > 0.0) { + if (this->DesignVolFlowRate > 0.0) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "User-Specified Design Flow Rate [m3/s]", - PVT(PVTnum).DesignVolFlowRate); + this->DesignVolFlowRate); } } else { - CheckSysSizing("SolarCollector:FlatPlate:PhotovoltaicThermal", PVT(PVTnum).Name); + CheckSysSizing("SolarCollector:FlatPlate:PhotovoltaicThermal", this->Name); if (DataSizing::CurOASysNum > 0) { DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesOutAirVolFlow; } else { @@ -754,28 +754,28 @@ namespace PhotovoltaicThermalCollectors { } } Real64 DesMassFlow = DataEnvironment::StdRhoAir * DesignVolFlowRateDes; - PVT(PVTnum).MaxMassFlowRate = DesMassFlow; + this->MaxMassFlowRate = DesMassFlow; } if (!HardSizeNoDesRun) { - if (PVT(PVTnum).DesignVolFlowRateWasAutoSized) { - PVT(PVTnum).DesignVolFlowRate = DesignVolFlowRateDes; + if (this->DesignVolFlowRateWasAutoSized) { + this->DesignVolFlowRate = DesignVolFlowRateDes; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); - PVT(PVTnum).SizingInit = false; + this->SizingInit = false; } else { - if (PVT(PVTnum).DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0) { - Real64 DesignVolFlowRateUser = PVT(PVTnum).DesignVolFlowRate; + if (this->DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0) { + Real64 DesignVolFlowRateUser = this->DesignVolFlowRate; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - PVT(PVTnum).Name, + this->Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes, "User-Specified Design Flow Rate [m3/s]", DesignVolFlowRateUser); if (DataGlobals::DisplayExtraWarnings) { if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > DataSizing::AutoVsHardSizingThreshold) { - ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + PVT(PVTnum).Name); + ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + this->Name); ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); @@ -796,7 +796,7 @@ namespace PhotovoltaicThermalCollectors { } } - void ControlPVTcollector(int const PVTnum) + void PVTCollectorStruct::control() { // SUBROUTINE INFORMATION: @@ -811,51 +811,51 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // decide if PVT should be in cooling or heat mode and if it should be bypassed or not - if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { + if (this->WorkingFluidType == WorkingFluidEnum::AIR) { - if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { - if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { + if (this->PVTModelType == SimplePVTmodel) { + if (DataHeatBalance::QRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? // Outlet node is required to have a setpoint. - if (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint > DataLoopNode::Node(PVT(PVTnum).HVACInletNodeNum).Temp) { - PVT(PVTnum).HeatingUseful = true; - PVT(PVTnum).CoolingUseful = false; - PVT(PVTnum).BypassDamperOff = true; + if (DataLoopNode::Node(this->HVACOutletNodeNum).TempSetPoint > DataLoopNode::Node(this->HVACInletNodeNum).Temp) { + this->HeatingUseful = true; + this->CoolingUseful = false; + this->BypassDamperOff = true; } else { - PVT(PVTnum).HeatingUseful = false; - PVT(PVTnum).CoolingUseful = true; - PVT(PVTnum).BypassDamperOff = false; + this->HeatingUseful = false; + this->CoolingUseful = true; + this->BypassDamperOff = false; } } else { // is cooling wanted? - if (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint < DataLoopNode::Node(PVT(PVTnum).HVACInletNodeNum).Temp) { - PVT(PVTnum).CoolingUseful = true; - PVT(PVTnum).HeatingUseful = false; - PVT(PVTnum).BypassDamperOff = true; + if (DataLoopNode::Node(this->HVACOutletNodeNum).TempSetPoint < DataLoopNode::Node(this->HVACInletNodeNum).Temp) { + this->CoolingUseful = true; + this->HeatingUseful = false; + this->BypassDamperOff = true; } else { - PVT(PVTnum).CoolingUseful = false; - PVT(PVTnum).HeatingUseful = true; - PVT(PVTnum).BypassDamperOff = false; + this->CoolingUseful = false; + this->HeatingUseful = true; + this->BypassDamperOff = false; } } } - } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { - if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { - if (DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) > DataPhotovoltaics::MinIrradiance) { + } else if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { + if (this->PVTModelType == SimplePVTmodel) { + if (DataHeatBalance::QRadSWOutIncident(this->SurfNum) > DataPhotovoltaics::MinIrradiance) { // is heating wanted? - PVT(PVTnum).HeatingUseful = true; - PVT(PVTnum).BypassDamperOff = true; + this->HeatingUseful = true; + this->BypassDamperOff = true; } else { // is cooling wanted? - PVT(PVTnum).CoolingUseful = false; - PVT(PVTnum).BypassDamperOff = false; + this->CoolingUseful = false; + this->BypassDamperOff = false; } } } } - void CalcPVTcollectors(int const PVTnum) + void PVTCollectorStruct::calculate() { // SUBROUTINE INFORMATION: @@ -875,40 +875,40 @@ namespace PhotovoltaicThermalCollectors { int InletNode(0); { - auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); + auto const SELECT_CASE_var(this->WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { - InletNode = PVT(PVTnum).PlantInletNodeNum; + InletNode = this->PlantInletNodeNum; } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { - InletNode = PVT(PVTnum).HVACInletNodeNum; + InletNode = this->HVACInletNodeNum; } } - Real64 mdot = PVT(PVTnum).MassFlowRate; + Real64 mdot = this->MassFlowRate; Real64 Tinlet = DataLoopNode::Node(InletNode).Temp; - if (PVT(PVTnum).PVTModelType == SimplePVTmodel) { + if (this->PVTModelType == SimplePVTmodel) { Real64 BypassFraction(0.0); Real64 PotentialOutletTemp(0.0); - if (PVT(PVTnum).HeatingUseful && PVT(PVTnum).BypassDamperOff && (mdot > 0.0)) { + if (this->HeatingUseful && this->BypassDamperOff && (mdot > 0.0)) { Real64 Eff(0.0); { - auto const SELECT_CASE_var(PVT(PVTnum).Simple.ThermEfficMode); + auto const SELECT_CASE_var(this->Simple.ThermEfficMode); if (SELECT_CASE_var == ThermEfficEnum::FIXED) { - Eff = PVT(PVTnum).Simple.ThermEffic; + Eff = this->Simple.ThermEffic; } else if (SELECT_CASE_var == ThermEfficEnum::SCHEDULED) { - Eff = ScheduleManager::GetCurrentScheduleValue(PVT(PVTnum).Simple.ThermEffSchedNum); - PVT(PVTnum).Simple.ThermEffic = Eff; + Eff = ScheduleManager::GetCurrentScheduleValue(this->Simple.ThermEffSchedNum); + this->Simple.ThermEffic = Eff; } } - Real64 PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(PVT(PVTnum).SurfNum) * Eff * PVT(PVTnum).AreaCol; + Real64 PotentialHeatGain = DataHeatBalance::QRadSWOutIncident(this->SurfNum) * Eff * this->AreaCol; - if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { + if (this->WorkingFluidType == WorkingFluidEnum::AIR) { Real64 Winlet = DataLoopNode::Node(InletNode).HumRat; Real64 CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); if (mdot * CpInlet > 0.0) { @@ -917,21 +917,21 @@ namespace PhotovoltaicThermalCollectors { PotentialOutletTemp = Tinlet; } // now compare heating potential to setpoint and figure bypass fraction - if (PotentialOutletTemp > DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint) { // need to modulate + if (PotentialOutletTemp > DataLoopNode::Node(this->HVACOutletNodeNum).TempSetPoint) { // need to modulate if (Tinlet != PotentialOutletTemp) { BypassFraction = - (DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint - PotentialOutletTemp) / (Tinlet - PotentialOutletTemp); + (DataLoopNode::Node(this->HVACOutletNodeNum).TempSetPoint - PotentialOutletTemp) / (Tinlet - PotentialOutletTemp); } else { BypassFraction = 0.0; } BypassFraction = max(0.0, BypassFraction); - PotentialOutletTemp = DataLoopNode::Node(PVT(PVTnum).HVACOutletNodeNum).TempSetPoint; + PotentialOutletTemp = DataLoopNode::Node(this->HVACOutletNodeNum).TempSetPoint; PotentialHeatGain = mdot * Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet) * (PotentialOutletTemp - Tinlet); } else { BypassFraction = 0.0; } - } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { + } else if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { Real64 CpInlet = Psychrometrics::CPHW(Tinlet); if (mdot * CpInlet != 0.0) { // protect divide by zero PotentialOutletTemp = Tinlet + PotentialHeatGain / (mdot * CpInlet); @@ -941,17 +941,17 @@ namespace PhotovoltaicThermalCollectors { BypassFraction = 0.0; } - PVT(PVTnum).Report.ThermEfficiency = Eff; - PVT(PVTnum).Report.ThermHeatGain = PotentialHeatGain; - PVT(PVTnum).Report.ThermPower = PVT(PVTnum).Report.ThermHeatGain; - PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - PVT(PVTnum).Report.ThermHeatLoss = 0.0; - PVT(PVTnum).Report.TinletWorkFluid = Tinlet; - PVT(PVTnum).Report.MdotWorkFluid = mdot; - PVT(PVTnum).Report.ToutletWorkFluid = PotentialOutletTemp; - PVT(PVTnum).Report.BypassStatus = BypassFraction; - - } else if (PVT(PVTnum).CoolingUseful && PVT(PVTnum).BypassDamperOff && (mdot > 0.0)) { + this->Report.ThermEfficiency = Eff; + this->Report.ThermHeatGain = PotentialHeatGain; + this->Report.ThermPower = this->Report.ThermHeatGain; + this->Report.ThermEnergy = this->Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->Report.ThermHeatLoss = 0.0; + this->Report.TinletWorkFluid = Tinlet; + this->Report.MdotWorkFluid = mdot; + this->Report.ToutletWorkFluid = PotentialOutletTemp; + this->Report.BypassStatus = BypassFraction; + + } else if (this->CoolingUseful && this->BypassDamperOff && (mdot > 0.0)) { // calculate cooling using energy balance Real64 HrGround(0.0); @@ -960,30 +960,30 @@ namespace PhotovoltaicThermalCollectors { Real64 HrSky(0.0); ConvectionCoefficients::InitExteriorConvectionCoeff( - PVT(PVTnum).SurfNum, 0.0, DataHeatBalance::VerySmooth, PVT(PVTnum).Simple.SurfEmissivity, PVT(PVTnum).Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); + this->SurfNum, 0.0, DataHeatBalance::VerySmooth, this->Simple.SurfEmissivity, this->Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); Real64 WetBulbInlet(0.0); Real64 DewPointInlet(0.0); Real64 CpInlet(0.0); - if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { + if (this->WorkingFluidType == WorkingFluidEnum::AIR) { Real64 Winlet = DataLoopNode::Node(InletNode).HumRat; CpInlet = Psychrometrics::PsyCpAirFnWTdb(Winlet, Tinlet); WetBulbInlet = Psychrometrics::PsyTwbFnTdbWPb(Tinlet, Winlet, DataEnvironment::OutBaroPress, RoutineName); DewPointInlet = Psychrometrics::PsyTdpFnTdbTwbPb(Tinlet, WetBulbInlet, DataEnvironment::OutBaroPress, RoutineName); - } else if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) { + } else if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { CpInlet = Psychrometrics::CPHW(Tinlet); } Real64 Tcollector = (2.0 * mdot * CpInlet * Tinlet + - PVT(PVTnum).AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + HrAir * DataSurfaces::Surface(PVT(PVTnum).SurfNum).OutDryBulbTemp + - HcExt * DataSurfaces::Surface(PVT(PVTnum).SurfNum).OutDryBulbTemp)) / - (2.0 * mdot * CpInlet + PVT(PVTnum).AreaCol * (HrGround + HrSky + HrAir + HcExt)); + this->AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + HrAir * DataSurfaces::Surface(this->SurfNum).OutDryBulbTemp + + HcExt * DataSurfaces::Surface(this->SurfNum).OutDryBulbTemp)) / + (2.0 * mdot * CpInlet + this->AreaCol * (HrGround + HrSky + HrAir + HcExt)); PotentialOutletTemp = 2.0 * Tcollector - Tinlet; - PVT(PVTnum).Report.ToutletWorkFluid = PotentialOutletTemp; + this->Report.ToutletWorkFluid = PotentialOutletTemp; // trap for air not being cooled below its wetbulb. - if (PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) { + if (this->WorkingFluidType == WorkingFluidEnum::AIR) { if (PotentialOutletTemp < DewPointInlet) { // water removal would be needed.. not going to allow that for now. limit cooling to dew point and model bypass if (Tinlet != PotentialOutletTemp) { @@ -996,32 +996,32 @@ namespace PhotovoltaicThermalCollectors { } } - PVT(PVTnum).Report.MdotWorkFluid = mdot; - PVT(PVTnum).Report.TinletWorkFluid = Tinlet; - PVT(PVTnum).Report.ToutletWorkFluid = PotentialOutletTemp; - PVT(PVTnum).Report.ThermHeatLoss = mdot * CpInlet * (Tinlet - PVT(PVTnum).Report.ToutletWorkFluid); - PVT(PVTnum).Report.ThermHeatGain = 0.0; - PVT(PVTnum).Report.ThermPower = -1.0 * PVT(PVTnum).Report.ThermHeatLoss; - PVT(PVTnum).Report.ThermEnergy = PVT(PVTnum).Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - PVT(PVTnum).Report.ThermEfficiency = 0.0; - PVT(PVTnum).Simple.LastCollectorTemp = Tcollector; - PVT(PVTnum).Report.BypassStatus = BypassFraction; + this->Report.MdotWorkFluid = mdot; + this->Report.TinletWorkFluid = Tinlet; + this->Report.ToutletWorkFluid = PotentialOutletTemp; + this->Report.ThermHeatLoss = mdot * CpInlet * (Tinlet - this->Report.ToutletWorkFluid); + this->Report.ThermHeatGain = 0.0; + this->Report.ThermPower = -1.0 * this->Report.ThermHeatLoss; + this->Report.ThermEnergy = this->Report.ThermPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->Report.ThermEfficiency = 0.0; + this->Simple.LastCollectorTemp = Tcollector; + this->Report.BypassStatus = BypassFraction; } else { - PVT(PVTnum).Report.TinletWorkFluid = Tinlet; - PVT(PVTnum).Report.ToutletWorkFluid = Tinlet; - PVT(PVTnum).Report.ThermHeatLoss = 0.0; - PVT(PVTnum).Report.ThermHeatGain = 0.0; - PVT(PVTnum).Report.ThermPower = 0.0; - PVT(PVTnum).Report.ThermEfficiency = 0.0; - PVT(PVTnum).Report.ThermEnergy = 0.0; - PVT(PVTnum).Report.BypassStatus = 1.0; - PVT(PVTnum).Report.MdotWorkFluid = mdot; + this->Report.TinletWorkFluid = Tinlet; + this->Report.ToutletWorkFluid = Tinlet; + this->Report.ThermHeatLoss = 0.0; + this->Report.ThermHeatGain = 0.0; + this->Report.ThermPower = 0.0; + this->Report.ThermEfficiency = 0.0; + this->Report.ThermEnergy = 0.0; + this->Report.BypassStatus = 1.0; + this->Report.MdotWorkFluid = mdot; } } } - void UpdatePVTcollectors(int const PVTnum) + void PVTCollectorStruct::update() { // SUBROUTINE INFORMATION: @@ -1034,17 +1034,17 @@ namespace PhotovoltaicThermalCollectors { int OutletNode; { - auto const SELECT_CASE_var(PVT(PVTnum).WorkingFluidType); + auto const SELECT_CASE_var(this->WorkingFluidType); if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { - InletNode = PVT(PVTnum).PlantInletNodeNum; - OutletNode = PVT(PVTnum).PlantOutletNodeNum; + InletNode = this->PlantInletNodeNum; + OutletNode = this->PlantOutletNodeNum; PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); - DataLoopNode::Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; + DataLoopNode::Node(OutletNode).Temp = this->Report.ToutletWorkFluid; } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { - InletNode = PVT(PVTnum).HVACInletNodeNum; - OutletNode = PVT(PVTnum).HVACOutletNodeNum; + InletNode = this->HVACInletNodeNum; + OutletNode = this->HVACOutletNodeNum; // Set the outlet nodes for properties that just pass through & not used DataLoopNode::Node(OutletNode).Quality = DataLoopNode::Node(InletNode).Quality; @@ -1056,9 +1056,9 @@ namespace PhotovoltaicThermalCollectors { DataLoopNode::Node(OutletNode).MassFlowRateMaxAvail = DataLoopNode::Node(InletNode).MassFlowRateMaxAvail; // Set outlet node variables that are possibly changed - DataLoopNode::Node(OutletNode).Temp = PVT(PVTnum).Report.ToutletWorkFluid; + DataLoopNode::Node(OutletNode).Temp = this->Report.ToutletWorkFluid; DataLoopNode::Node(OutletNode).HumRat = DataLoopNode::Node(InletNode).HumRat; // assumes dewpoint bound on cooling .... - DataLoopNode::Node(OutletNode).Enthalpy = Psychrometrics::PsyHFnTdbW(PVT(PVTnum).Report.ToutletWorkFluid, DataLoopNode::Node(OutletNode).HumRat); + DataLoopNode::Node(OutletNode).Enthalpy = Psychrometrics::PsyHFnTdbW(this->Report.ToutletWorkFluid, DataLoopNode::Node(OutletNode).HumRat); } } } diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index 6325ba3e08c..ee461ff3585 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -118,11 +118,11 @@ namespace PhotovoltaicThermalCollectors { { // Members std::string Name; // Name of PVT collector - int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant !DSU - int WLoopNum; // Water plant loop index number !DSU - int WLoopSideNum; // Water plant loop side index !DSU - int WLoopBranchNum; // Water plant loop branch index !DSU - int WLoopCompNum; // Water plant loop component index !DSU + int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant + int WLoopNum; // Water plant loop index number + int WLoopSideNum; // Water plant loop side index + int WLoopBranchNum; // Water plant loop branch index + int WLoopCompNum; // Water plant loop component index bool EnvrnInit; // manage begin environmen inits bool SizingInit; // manage when sizing is complete std::string PVTModelName; // Name of PVT performance object @@ -140,7 +140,7 @@ namespace PhotovoltaicThermalCollectors { Real64 DesignVolFlowRate; bool DesignVolFlowRateWasAutoSized; // true if design volume flow rate was autosize on input Real64 MaxMassFlowRate; - Real64 MassFlowRate; // DSU + Real64 MassFlowRate; Real64 AreaCol; bool BypassDamperOff; bool CoolingUseful; @@ -159,6 +159,17 @@ namespace PhotovoltaicThermalCollectors { SetLoopIndexFlag(true) { } + + void initialize(bool FirstHVACIteration); + + void size(); + + void control(); + + void calculate(); + + void update(); + }; extern Array1D PVT; @@ -171,16 +182,6 @@ namespace PhotovoltaicThermalCollectors { void GetPVTcollectorsInput(); - void InitPVTcollectors(int PVTnum, bool FirstHVACIteration); - - void SizePVT(int PVTnum); - - void ControlPVTcollector(int PVTnum); - - void CalcPVTcollectors(int PVTnum); - - void UpdatePVTcollectors(int PVTnum); - void GetPVTThermalPowerProduction(int PVindex, Real64 &ThermalPower, Real64 &ThermalEnergy); int GetAirInletNodeNum(std::string const &PVTName, bool &ErrorsFound); From 13ba04f9f5a7645853ec2189c3ff0648b745a5fc Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 10 Dec 2019 15:56:44 -0700 Subject: [PATCH 28/86] move outputs to member function --- .../PhotovoltaicThermalCollectors.cc | 113 +++++++++--------- .../PhotovoltaicThermalCollectors.hh | 2 + 2 files changed, 60 insertions(+), 55 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 47ac8f4c48c..6819edf2dcc 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -380,69 +380,71 @@ namespace PhotovoltaicThermalCollectors { } } - for (Item = 1; Item <= NumPVT; ++Item) { - // electrical production reporting under generator:photovoltaic.... - // only thermal side reported here, + if (ErrorsFound) { + ShowFatalError("Errors found in processing input for photovoltaic thermal collectors"); + } - SetupOutputVariable( - "Generator Produced Thermal Rate", OutputProcessor::Unit::W, PVT(Item).Report.ThermPower, "System", "Average", PVT(Item).Name); - if (PVT(Item).WorkingFluidType == WorkingFluidEnum::LIQUID) { - SetupOutputVariable("Generator Produced Thermal Energy", - OutputProcessor::Unit::J, - PVT(Item).Report.ThermEnergy, - "System", - "Sum", - PVT(Item).Name, - _, - "SolarWater", - "HeatProduced", - _, - "Plant"); - } else if (PVT(Item).WorkingFluidType == WorkingFluidEnum::AIR) { - SetupOutputVariable("Generator Produced Thermal Energy", - OutputProcessor::Unit::J, - PVT(Item).Report.ThermEnergy, - "System", - "Sum", - PVT(Item).Name, - _, - "SolarAir", - "HeatProduced", - _, - "System"); - SetupOutputVariable("Generator PVT Fluid Bypass Status", - OutputProcessor::Unit::None, - PVT(Item).Report.BypassStatus, - "System", - "Average", - PVT(Item).Name); - } + if (allocated(tmpSimplePVTperf)) tmpSimplePVTperf.deallocate(); + } + + void PVTCollectorStruct::setupReportVars() + { + SetupOutputVariable("Generator Produced Thermal Rate", OutputProcessor::Unit::W, this->Report.ThermPower, "System", "Average", this->Name); - SetupOutputVariable("Generator PVT Fluid Inlet Temperature", - OutputProcessor::Unit::C, - PVT(Item).Report.TinletWorkFluid, + if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { + SetupOutputVariable("Generator Produced Thermal Energy", + OutputProcessor::Unit::J, + this->Report.ThermEnergy, "System", - "Average", - PVT(Item).Name); - SetupOutputVariable("Generator PVT Fluid Outlet Temperature", - OutputProcessor::Unit::C, - PVT(Item).Report.ToutletWorkFluid, + "Sum", + this->Name, + _, + "SolarWater", + "HeatProduced", + _, + "Plant"); + + } else if (this->WorkingFluidType == WorkingFluidEnum::AIR) { + SetupOutputVariable("Generator Produced Thermal Energy", + OutputProcessor::Unit::J, + this->Report.ThermEnergy, "System", - "Average", - PVT(Item).Name); - SetupOutputVariable("Generator PVT Fluid Mass Flow Rate", - OutputProcessor::Unit::kg_s, - PVT(Item).Report.MdotWorkFluid, + "Sum", + this->Name, + _, + "SolarAir", + "HeatProduced", + _, + "System"); + + SetupOutputVariable("Generator PVT Fluid Bypass Status", + OutputProcessor::Unit::None, + this->Report.BypassStatus, "System", "Average", - PVT(Item).Name); + this->Name); } - if (ErrorsFound) { - ShowFatalError("Errors found in processing input for photovoltaic thermal collectors"); - } - - if (allocated(tmpSimplePVTperf)) tmpSimplePVTperf.deallocate(); + SetupOutputVariable("Generator PVT Fluid Inlet Temperature", + OutputProcessor::Unit::C, + this->Report.TinletWorkFluid, + "System", + "Average", + this->Name); + + SetupOutputVariable("Generator PVT Fluid Outlet Temperature", + OutputProcessor::Unit::C, + this->Report.ToutletWorkFluid, + "System", + "Average", + this->Name); + + SetupOutputVariable("Generator PVT Fluid Mass Flow Rate", + OutputProcessor::Unit::kg_s, + this->Report.MdotWorkFluid, + "System", + "Average", + this->Name); } void PVTCollectorStruct::initialize(bool const FirstHVACIteration) @@ -461,6 +463,7 @@ namespace PhotovoltaicThermalCollectors { // Do the one time initializations if (this->MyOneTimeFlag) { + this->setupReportVars(); this->MyOneTimeFlag = false; } diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index ee461ff3585..fb20aa9d9a8 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -160,6 +160,8 @@ namespace PhotovoltaicThermalCollectors { { } + void setupReportVars(); + void initialize(bool FirstHVACIteration); void size(); From 221885a8bda1ca23398adc4b9c523439eeab0a55 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 11 Dec 2019 09:24:43 -0700 Subject: [PATCH 29/86] move to plantComponent methods --- src/EnergyPlus/MixedAir.cc | 9 +- .../PhotovoltaicThermalCollectors.cc | 83 +++++++------------ .../PhotovoltaicThermalCollectors.hh | 35 ++++---- src/EnergyPlus/Plant/PlantManager.cc | 2 + src/EnergyPlus/PlantLoopEquip.cc | 12 +-- .../unit/Fixtures/EnergyPlusFixture.cc | 68 +++++++-------- .../unit/Fixtures/EnergyPlusFixture.hh | 2 +- 7 files changed, 92 insertions(+), 119 deletions(-) diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index 9ecf5e6afeb..ff81a4f396c 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -93,6 +93,7 @@ #include #include #include +#include #include #include #include @@ -599,8 +600,6 @@ namespace MixedAir { using HVACDXSystem::SimDXCoolingSystem; using HVACHXAssistedCoolingCoil::HXAssistedCoil; using HVACHXAssistedCoolingCoil::SimHXAssistedCoolingCoil; - using PhotovoltaicThermalCollectors::CalledFromOutsideAirSystem; - using PhotovoltaicThermalCollectors::SimPVTcollectors; using SimAirServingZones::SolveWaterCoilController; using SteamCoils::SimulateSteamCoilComponents; using TranspiredCollector::SimTranspiredCollector; @@ -831,7 +830,11 @@ namespace MixedAir { // Air-based Photovoltaic-thermal flat plate collector } else if (SELECT_CASE_var == PVT_AirBased) { // 'SolarCollector:FlatPlate:PhotovoltaicThermal' if (Sim) { - SimPVTcollectors(CompIndex, FirstHVACIteration, CalledFromOutsideAirSystem, CompName); + auto thisPVT = PhotovoltaicThermalCollectors::PVTCollectorStruct::factory(CompName); + PlantLocation dummyCalledFrom(0, 0, 0, 0); + Real64 dummyCurLoad(0.0); + bool dummyRunFlag(true); + thisPVT->simulate(dummyCalledFrom, FirstHVACIteration, dummyCurLoad, dummyRunFlag); } // Evaporative Cooler Types diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 6819edf2dcc..71bd4c92c5d 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -103,76 +103,54 @@ namespace PhotovoltaicThermalCollectors { int const SimplePVTmodel(1001); - int const CalledFromPlantLoopEquipMgr(101); - int const CalledFromOutsideAirSystem(102); - Real64 const SimplePVTWaterSizeFactor(1.905e-5); // [ m3/s/m2 ] average of collectors in SolarCollectors.idf static bool GetInputFlag(true); // First time, input is "gotten" - Array1D_bool CheckEquipName; int NumPVT(0); // count of all types of PVT in input file - int NumSimplePVTPerform(0); // count of simple PVT performance objects in input file Array1D PVT; - void SimPVTcollectors(int &PVTnum, // index to PVT array. - bool const FirstHVACIteration, - int const CalledFrom, - Optional_string_const PVTName, - Optional_bool_const InitLoopEquip) + void clear_state() { + GetInputFlag = true; + NumPVT = 0; + PVT.deallocate(); + } + PlantComponent *PVTCollectorStruct::factory(std::string const &objectName) + { if (GetInputFlag) { GetPVTcollectorsInput(); GetInputFlag = false; } - - if (present(PVTName)) { - if (PVTnum == 0) { - PVTnum = UtilityRoutines::FindItemInList(PVTName, PVT); - if (PVTnum == 0) { - ShowFatalError("SimPVTcollectors: Unit not found=" + PVTName()); - } - } else { - if (PVTnum > NumPVT || PVTnum < 1) { - ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + General::TrimSigDigits(PVTnum) + - ", Number of PVT units=" + General::TrimSigDigits(NumPVT) + ", Entered Unit name=" + PVTName()); - } - if (CheckEquipName(PVTnum)) { - if (PVTName != PVT(PVTnum).Name) { - ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + General::TrimSigDigits(PVTnum) + ", Unit name=" + PVTName() + - ", stored name for that index=" + PVT(PVTnum).Name); - } - CheckEquipName(PVTnum) = false; - } - } - } else { - if (PVTnum > NumPVT || PVTnum < 1) { - ShowFatalError("SimPVTcollectors: Invalid PVT index passed = " + General::TrimSigDigits(PVTnum) + - ", Number of PVT units=" + General::TrimSigDigits(NumPVT) + ", Entered Unit name=" + PVTName()); - } - } // compName present - - if (present(InitLoopEquip)) { - if (InitLoopEquip) { - PVT(PVTnum).initialize(FirstHVACIteration); - PVT(PVTnum).size(); - return; + for (auto &thisComp : PVT) { + if (thisComp.Name == objectName) { + return &thisComp; } } + // If we didn't find it, fatal + ShowFatalError("Solar Thermal Collector Factory: Error getting inputs for object named: " + objectName); + // Shut up the compiler + return nullptr; + } - // check where called from and what type of collector this is, return if not right for calling order for speed - if ((PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::AIR) && (CalledFrom == CalledFromPlantLoopEquipMgr)) return; - if ((PVT(PVTnum).WorkingFluidType == WorkingFluidEnum::LIQUID) && (CalledFrom == CalledFromOutsideAirSystem)) return; - - PVT(PVTnum).initialize(FirstHVACIteration); - - PVT(PVTnum).control(); + void PVTCollectorStruct::onInitLoopEquip(const PlantLocation &EP_UNUSED(calledFromLocation)) + { + this->initialize(true); + this->size(); + } - PVT(PVTnum).calculate(); + void PVTCollectorStruct::simulate(const PlantLocation &EP_UNUSED(calledFromLocation), + bool const FirstHVACIteration, + Real64 &EP_UNUSED(CurLoad), + bool const EP_UNUSED(RunFlag)) + { - PVT(PVTnum).update(); + this->initialize(FirstHVACIteration); + this->control(); + this->calculate(); + this->update(); } void GetPVTcollectorsInput() @@ -198,7 +176,7 @@ namespace PhotovoltaicThermalCollectors { // first load the performance object info into temporary structure DataIPShortCuts::cCurrentModuleObject = "SolarCollectorPerformance:PhotovoltaicThermal:Simple"; - NumSimplePVTPerform = inputProcessor->getNumObjectsFound(DataIPShortCuts::cCurrentModuleObject); + int NumSimplePVTPerform = inputProcessor->getNumObjectsFound(DataIPShortCuts::cCurrentModuleObject); if (NumSimplePVTPerform > 0) { tmpSimplePVTperf.allocate(NumSimplePVTPerform); for (Item = 1; Item <= NumSimplePVTPerform; ++Item) { @@ -242,7 +220,6 @@ namespace PhotovoltaicThermalCollectors { DataIPShortCuts::cCurrentModuleObject = "SolarCollector:FlatPlate:PhotovoltaicThermal"; NumPVT = inputProcessor->getNumObjectsFound(DataIPShortCuts::cCurrentModuleObject); PVT.allocate(NumPVT); - CheckEquipName.dimension(NumPVT, true); for (Item = 1; Item <= NumPVT; ++Item) { inputProcessor->getObjectItem(DataIPShortCuts::cCurrentModuleObject, diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index fb20aa9d9a8..cfb4adc670e 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -51,6 +51,9 @@ // ObjexxFCL Headers #include +// EnergyPlus Headers +#include + namespace EnergyPlus { namespace PhotovoltaicThermalCollectors { @@ -67,12 +70,6 @@ namespace PhotovoltaicThermalCollectors { FIXED }; - extern int const CalledFromPlantLoopEquipMgr; - extern int const CalledFromOutsideAirSystem; - - extern int NumPVT; // count of all types of PVT in input file - extern int NumSimplePVTPerform; // count of simple PVT performance objects in input file - struct SimplePVTModelStruct { // Members @@ -114,16 +111,16 @@ namespace PhotovoltaicThermalCollectors { } }; - struct PVTCollectorStruct + struct PVTCollectorStruct : PlantComponent { // Members std::string Name; // Name of PVT collector - int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant - int WLoopNum; // Water plant loop index number - int WLoopSideNum; // Water plant loop side index - int WLoopBranchNum; // Water plant loop branch index - int WLoopCompNum; // Water plant loop component index - bool EnvrnInit; // manage begin environmen inits + int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant + int WLoopNum; // Water plant loop index number + int WLoopSideNum; // Water plant loop side index + int WLoopBranchNum; // Water plant loop branch index + int WLoopCompNum; // Water plant loop component index + bool EnvrnInit; // manage begin environment inits bool SizingInit; // manage when sizing is complete std::string PVTModelName; // Name of PVT performance object int PVTModelType; // model type indicator, only simple avail now @@ -160,6 +157,12 @@ namespace PhotovoltaicThermalCollectors { { } + static PlantComponent *factory(std::string const &objectName); + + void onInitLoopEquip(const PlantLocation &calledFromLocation) override; + + void simulate(const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag) override; + void setupReportVars(); void initialize(bool FirstHVACIteration); @@ -176,11 +179,7 @@ namespace PhotovoltaicThermalCollectors { extern Array1D PVT; - void SimPVTcollectors(int &PVTnum, // index to PVT array. - bool FirstHVACIteration, - int CalledFrom, - Optional_string_const PVTName = _, - Optional_bool_const InitLoopEquip = _); + void clear_state(); void GetPVTcollectorsInput(); diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 23c94ea86d8..70f2d27c47d 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -89,6 +89,7 @@ #include #include #include +#include #include #include #include @@ -1341,6 +1342,7 @@ namespace EnergyPlus { } else if (LoopSideNum == SupplySide) { this_comp.CurOpSchemeType = UnknownStatusOpSchemeType; } + this_comp.compPtr = PhotovoltaicThermalCollectors::PVTCollectorStruct::factory(CompNames(CompNum)); } else if (UtilityRoutines::SameString(this_comp_type, "CentralHeatPumpSystem")) { this_comp.TypeOf_Num = TypeOf_CentralGroundSourceHeatPump; this_comp.GeneralEquipType = GenEquipTypes_CentralHeatPumpSystem; diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index a0dfd28ddf2..5a1962b7503 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -190,8 +190,6 @@ namespace PlantLoopEquip { using BaseboardRadiator::UpdateBaseboardPlantConnection; using HVACVariableRefrigerantFlow::SimVRFCondenserPlant; using HWBaseboardRadiator::UpdateHWBaseboardPlantConnection; - using PhotovoltaicThermalCollectors::CalledFromPlantLoopEquipMgr; - using PhotovoltaicThermalCollectors::SimPVTcollectors; using RefrigeratedCase::SimRefrigCondenser; using SteamBaseboardRadiator::UpdateSteamBaseboardPlantConnection; using UserDefinedComponents::SimUserDefinedPlantComponent; @@ -868,17 +866,9 @@ namespace PlantLoopEquip { sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); - if (InitLoopEquip) { - sim_component.CompNum = EquipNum; - } - } else if (EquipTypeNum == TypeOf_PVTSolarCollectorFlatPlate) { - SimPVTcollectors(EquipNum, FirstHVACIteration, CalledFromPlantLoopEquipMgr, sim_component.Name, InitLoopEquip); - - if (InitLoopEquip) { - sim_component.CompNum = EquipNum; - } + sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); } else { ShowSevereError("SimPlantEquip: Invalid Solar Collector Type=" + sim_component.TypeOf); diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index 907149d9221..669dab981c7 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -59,8 +59,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -71,9 +71,8 @@ #include #include #include -#include #include -#include +#include #include #include #include @@ -84,10 +83,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -112,11 +111,12 @@ #include #include #include -#include +#include #include #include #include #include +#include #include #include #include @@ -130,8 +130,18 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include #include #include #include @@ -142,16 +152,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -171,9 +171,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -191,6 +191,7 @@ #include #include #include +#include #include #include #include @@ -211,9 +212,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -303,27 +304,29 @@ void EnergyPlusFixture::TearDown() void EnergyPlusFixture::clear_all_states() { // A to Z order + AirflowNetwork::clear_state(); AirflowNetworkBalanceManager::clear_state(); BaseboardElectric::clear_state(); BaseboardRadiator::clear_state(); Boilers::clear_state(); BoilerSteam::clear_state(); BranchInputManager::clear_state(); - CoolingPanelSimple::clear_state(); ChillerAbsorption::clear_state(); ChillerElectricEIR::clear_state(); ChillerExhaustAbsorption::clear_state(); ChillerGasAbsorption::clear_state(); ChillerIndirectAbsorption::clear_state(); + clearCoilSelectionReportObj(); // ReportCoilSelection + clearFacilityElectricPowerServiceObject(); CondenserLoopTowers::clear_state(); + CoolingPanelSimple::clear_state(); CoolTower::clear_state(); CrossVentMgr::clear_state(); - CurveManager::clear_state(); CTElectricGenerator::clear_state(); - AirflowNetwork::clear_state(); + CurveManager::clear_state(); DataAirLoop::clear_state(); - DataBranchAirLoopPlant::clear_state(); DataAirSystems::clear_state(); + DataBranchAirLoopPlant::clear_state(); DataBranchNodeConnections::clear_state(); DataContaminantBalance::clear_state(); DataConvergParams::clear_state(); @@ -361,11 +364,12 @@ void EnergyPlusFixture::clear_all_states() DirectAirManager::clear_state(); DualDuct::clear_state(); DXCoils::clear_state(); - clearFacilityElectricPowerServiceObject(); EarthTube::clear_state(); EconomicLifeCycleCost::clear_state(); EconomicTariff::clear_state(); + EIRWaterToWaterHeatPumps::EIRWaterToWaterHeatPump::clear_state(); EMSManager::clear_state(); + EnergyPlus::inputProcessor->clear_state(); EvaporativeCoolers::clear_state(); EvaporativeFluidCoolers::clear_state(); ExteriorEnergyUse::clear_state(); @@ -383,18 +387,18 @@ void EnergyPlusFixture::clear_all_states() HeatBalanceManager::clear_state(); HeatBalanceSurfaceManager::clear_state(); HeatBalFiniteDiffManager::clear_state(); - HeatPumpWaterToWaterSimple::GshpSpecs::clear_state(); + HeatingCoils::clear_state(); HeatPumpWaterToWaterCOOLING::clear_state(); HeatPumpWaterToWaterHEATING::clear_state(); + HeatPumpWaterToWaterSimple::GshpSpecs::clear_state(); HeatRecovery::clear_state(); - HeatingCoils::clear_state(); HighTempRadiantSystem::clear_state(); Humidifiers::clear_state(); HVACControllers::clear_state(); HVACDXHeatPumpSystem::clear_state(); HVACDXSystem::clear_state(); - HVACHXAssistedCoolingCoil::clear_state(); HVACFan::clearHVACFanObjects(); + HVACHXAssistedCoolingCoil::clear_state(); HVACManager::clear_state(); HVACSingleDuctInduc::clear_state(); HVACStandAloneERV::clear_state(); @@ -402,7 +406,6 @@ void EnergyPlusFixture::clear_all_states() HVACVariableRefrigerantFlow::clear_state(); HybridModel::clear_state(); HysteresisPhaseChange::clear_state(); - EnergyPlus::inputProcessor->clear_state(); IceThermalStorage::clear_state(); IntegratedHeatPump::clear_state(); InternalHeatGains::clear_state(); @@ -419,8 +422,9 @@ void EnergyPlusFixture::clear_all_states() OutputReportTabularAnnual::clear_state(); OutsideEnergySources::clear_state(); PackagedTerminalHeatPump::clear_state(); - Pipes::clear_state(); + PhotovoltaicThermalCollectors::clear_state(); PipeHeatTransfer::clear_state(); + Pipes::clear_state(); PlantCentralGSHP::clear_state(); PlantChillers::clear_state(); PlantCondLoopOperation::clear_state(); @@ -428,9 +432,9 @@ void EnergyPlusFixture::clear_all_states() PlantLoopSolver::clear_state(); PlantManager::clear_state(); PlantPipingSystemsManager::clear_state(); + PlantPipingSystemsManager::clear_state(); PlantPressureSystem::clear_state(); PlantUtilities::clear_state(); - PlantPipingSystemsManager::clear_state(); PlantValves::clear_state(); PollutionModule::clear_state(); PoweredInductionUnits::clear_state(); @@ -438,7 +442,7 @@ void EnergyPlusFixture::clear_all_states() Pumps::clear_state(); PurchasedAirManager::clear_state(); PVWatts::clear_state(); - clearCoilSelectionReportObj(); // ReportCoilSelection + ResultsFramework::clear_state(); ReturnAirPathManager::clear_state(); RoomAirModelAirflowNetwork::clear_state(); RoomAirModelManager::clear_state(); @@ -454,8 +458,8 @@ void EnergyPlusFixture::clear_all_states() SplitterComponent::clear_state(); SteamCoils::clear_state(); SurfaceGeometry::clear_state(); - SystemAvailabilityManager::clear_state(); SwimmingPool::clear_state(); + SystemAvailabilityManager::clear_state(); ThermalComfort::clear_state(); UnitarySystems::clear_state(); UnitHeater::clear_state(); @@ -465,7 +469,6 @@ void EnergyPlusFixture::clear_all_states() WaterCoils::clear_state(); WaterThermalTanks::clear_state(); WaterToAirHeatPumpSimple::clear_state(); - EIRWaterToWaterHeatPumps::EIRWaterToWaterHeatPump::clear_state(); WaterUse::clear_state(); WeatherManager::clear_state(); WindowAC::clear_state(); @@ -478,7 +481,6 @@ void EnergyPlusFixture::clear_all_states() ZoneEquipmentManager::clear_state(); ZonePlenum::clear_state(); ZoneTempPredictorCorrector::clear_state(); - ResultsFramework::clear_state(); } std::string EnergyPlusFixture::delimited_string(std::vector const &strings, std::string const &delimiter) diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh index 7d0ab82206f..30d6eecaa03 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh @@ -148,7 +148,7 @@ protected: } // This function creates a string based on a vector of string inputs that is delimited by DataStringGlobals::NL by default, but any - // delimiter can be passed in to this funciton. This allows for cross platform output string comparisons. + // delimiter can be passed in to this function. This allows for cross platform output string comparisons. std::string delimited_string(std::vector const &strings, std::string const &delimiter = DataStringGlobals::NL); // This function reads all the lines in the supplied filePath. It puts each line into the vector. From c7e3ff104214a72aae63bba58988ba2698f8e3cc Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 11 Dec 2019 10:25:34 -0700 Subject: [PATCH 30/86] add clear_state --- src/EnergyPlus/UserDefinedComponents.cc | 18 ++++++++++++++++++ src/EnergyPlus/UserDefinedComponents.hh | 2 ++ .../unit/Fixtures/EnergyPlusFixture.cc | 2 ++ 3 files changed, 22 insertions(+) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index bb4d71e368d..5c312716a65 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -110,6 +110,24 @@ namespace UserDefinedComponents { Array1D UserZoneAirHVAC; Array1D UserAirTerminal; + void clear_state() + { + NumUserPlantComps = 0; + NumUserCoils = 0; + NumUserZoneAir = 0; + NumUserAirTerminals = 0; + + CheckUserPlantCompName.deallocate(); + CheckUserCoilName.deallocate(); + CheckUserZoneAirName.deallocate(); + CheckUserAirTerminal.deallocate(); + + UserPlantComp.deallocate(); + UserCoil.deallocate(); + UserZoneAirHVAC.deallocate(); + UserAirTerminal.deallocate(); + } + PlantComponent *UserPlantComponentStruct::factory(std::string const &objectName) { // Process the input data diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index df5b36ead3b..f8d624e1eae 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -299,6 +299,8 @@ namespace UserDefinedComponents { extern Array1D UserZoneAirHVAC; extern Array1D UserAirTerminal; + void clear_state(); + void SimCoilUserDefined(std::string const &EquipName, // user name for component int &CompIndex, int AirLoopNum, diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index b9791592706..58e082eacb4 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -217,6 +217,7 @@ #include #include #include +#include #include #include #include @@ -462,6 +463,7 @@ void EnergyPlusFixture::clear_all_states() UnitarySystems::clear_state(); UnitHeater::clear_state(); UnitVentilator::clear_state(); + UserDefinedComponents::clear_state(); VariableSpeedCoils::clear_state(); VentilatedSlab::clear_state(); WaterCoils::clear_state(); From 7a66fee48d19dd2075b4257779aec53e2447c4c6 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Wed, 11 Dec 2019 10:27:05 -0700 Subject: [PATCH 31/86] apply style --- src/EnergyPlus/UserDefinedComponents.cc | 705 +++++++++++------------- src/EnergyPlus/UserDefinedComponents.hh | 12 +- 2 files changed, 314 insertions(+), 403 deletions(-) diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 5c312716a65..2624e5ebb7f 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -70,12 +70,12 @@ #include #include #include +#include #include #include #include #include #include -#include namespace EnergyPlus { @@ -175,12 +175,12 @@ namespace UserDefinedComponents { this->Loop(thisLoop).BranchNum, this->Loop(thisLoop).CompNum); - PlantUtilities::RegisterPlantCompDesignFlow(this->Loop(thisLoop).InletNodeNum, - this->Loop(thisLoop).DesignVolumeFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(this->Loop(thisLoop).InletNodeNum, this->Loop(thisLoop).DesignVolumeFlowRate); } else { // throw warning - ShowFatalError("SimUserDefinedPlantComponent: did not find where called from loop number called from =" + General::TrimSigDigits(calledFromLocation.loopNum) + + ShowFatalError("SimUserDefinedPlantComponent: did not find where called from loop number called from =" + + General::TrimSigDigits(calledFromLocation.loopNum) + " , loop side called from =" + General::TrimSigDigits(calledFromLocation.loopSideNum)); } } @@ -199,7 +199,10 @@ namespace UserDefinedComponents { OptLoad = this->Loop(thisLoop).OptLoad; } - void UserPlantComponentStruct::UserPlantComponentStruct::simulate(const EnergyPlus::PlantLocation &calledFromLocation, bool EP_UNUSED(FirstHVACIteration), Real64 &CurLoad, bool EP_UNUSED(RunFlag)) + void UserPlantComponentStruct::UserPlantComponentStruct::simulate(const EnergyPlus::PlantLocation &calledFromLocation, + bool EP_UNUSED(FirstHVACIteration), + Real64 &CurLoad, + bool EP_UNUSED(RunFlag)) { // SUBROUTINE INFORMATION: // AUTHOR B. Griffith @@ -273,8 +276,8 @@ namespace UserDefinedComponents { } if (CheckUserCoilName(CompNum)) { if (EquipName != UserCoil(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + EquipName + - ", stored unit name for that index=" + UserCoil(CompNum).Name); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Unit name=" + EquipName + ", stored unit name for that index=" + UserCoil(CompNum).Name); } CheckUserCoilName(CompNum) = false; } @@ -288,13 +291,13 @@ namespace UserDefinedComponents { if (UserCoil(CompNum).PlantIsConnected) { PlantUtilities::InitComponentNodes(UserCoil(CompNum).Loop.MassFlowRateMin, - UserCoil(CompNum).Loop.MassFlowRateMax, - UserCoil(CompNum).Loop.InletNodeNum, - UserCoil(CompNum).Loop.OutletNodeNum, - UserCoil(CompNum).Loop.LoopNum, - UserCoil(CompNum).Loop.LoopSideNum, - UserCoil(CompNum).Loop.BranchNum, - UserCoil(CompNum).Loop.CompNum); + UserCoil(CompNum).Loop.MassFlowRateMax, + UserCoil(CompNum).Loop.InletNodeNum, + UserCoil(CompNum).Loop.OutletNodeNum, + UserCoil(CompNum).Loop.LoopNum, + UserCoil(CompNum).Loop.LoopSideNum, + UserCoil(CompNum).Loop.BranchNum, + UserCoil(CompNum).Loop.CompNum); PlantUtilities::RegisterPlantCompDesignFlow(UserCoil(CompNum).Loop.InletNodeNum, UserCoil(CompNum).Loop.DesignVolumeFlowRate); } @@ -310,11 +313,13 @@ namespace UserDefinedComponents { if (AirLoopNum != -1) { // IF the system is not an equipment of outdoor air unit // determine if heating or cooling on primary air stream - HeatingActive = DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < - DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp; + HeatingActive = + DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp < DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp; - Real64 EnthInlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); - Real64 EnthOutlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); + Real64 EnthInlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).Temp, + DataLoopNode::Node(UserCoil(CompNum).Air(1).InletNodeNum).HumRat); + Real64 EnthOutlet = Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).Temp, + DataLoopNode::Node(UserCoil(CompNum).Air(1).OutletNodeNum).HumRat); CoolingActive = EnthInlet > EnthOutlet; } } @@ -355,8 +360,8 @@ namespace UserDefinedComponents { } if (CheckUserZoneAirName(CompNum)) { if (CompName != UserZoneAirHVAC(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + CompName + - ", stored unit name for that index=" + UserZoneAirHVAC(CompNum).Name); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Unit name=" + CompName + ", stored unit name for that index=" + UserZoneAirHVAC(CompNum).Name); } CheckUserZoneAirName(CompNum) = false; } @@ -372,16 +377,16 @@ namespace UserDefinedComponents { for (int Loop = 1; Loop <= UserZoneAirHVAC(CompNum).NumPlantConnections; ++Loop) { PlantUtilities::InitComponentNodes(UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMin, - UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMax, - UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, - UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum, - UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, - UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum, - UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, - UserZoneAirHVAC(CompNum).Loop(Loop).CompNum); + UserZoneAirHVAC(CompNum).Loop(Loop).MassFlowRateMax, + UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, + UserZoneAirHVAC(CompNum).Loop(Loop).OutletNodeNum, + UserZoneAirHVAC(CompNum).Loop(Loop).LoopNum, + UserZoneAirHVAC(CompNum).Loop(Loop).LoopSideNum, + UserZoneAirHVAC(CompNum).Loop(Loop).BranchNum, + UserZoneAirHVAC(CompNum).Loop(Loop).CompNum); PlantUtilities::RegisterPlantCompDesignFlow(UserZoneAirHVAC(CompNum).Loop(Loop).InletNodeNum, - UserZoneAirHVAC(CompNum).Loop(Loop).DesignVolumeFlowRate); + UserZoneAirHVAC(CompNum).Loop(Loop).DesignVolumeFlowRate); } } @@ -396,12 +401,14 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompNum).report(); // calculate delivered capacity - Real64 AirMassFlow = - min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate); + Real64 AirMassFlow = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).MassFlowRate, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).MassFlowRate); // calculate sensible load met using delta enthalpy at a constant (minimum) humidity ratio) - Real64 MinHumRat = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); - SensibleOutputProvided = AirMassFlow * (Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - - Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); + Real64 MinHumRat = min(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat, + DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat); + SensibleOutputProvided = + AirMassFlow * (Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).Temp, MinHumRat) - + Psychrometrics::PsyHFnTdbW(DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).Temp, MinHumRat)); Real64 SpecHumOut = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.OutletNodeNum).HumRat; Real64 SpecHumIn = DataLoopNode::Node(UserZoneAirHVAC(CompNum).ZoneAir.InletNodeNum).HumRat; @@ -443,8 +450,8 @@ namespace UserDefinedComponents { } if (CheckUserAirTerminal(CompNum)) { if (CompName != UserAirTerminal(CompNum).Name) { - ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Unit name=" + CompName + - ", stored unit name for that index=" + UserAirTerminal(CompNum).Name); + ShowFatalError("SimUserDefinedPlantComponent: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + + ", Unit name=" + CompName + ", stored unit name for that index=" + UserAirTerminal(CompNum).Name); } CheckUserAirTerminal(CompNum) = false; } @@ -460,16 +467,16 @@ namespace UserDefinedComponents { for (int Loop = 1; Loop <= UserAirTerminal(CompNum).NumPlantConnections; ++Loop) { PlantUtilities::InitComponentNodes(UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMin, - UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMax, - UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, - UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum, - UserAirTerminal(CompNum).Loop(Loop).LoopNum, - UserAirTerminal(CompNum).Loop(Loop).LoopSideNum, - UserAirTerminal(CompNum).Loop(Loop).BranchNum, - UserAirTerminal(CompNum).Loop(Loop).CompNum); + UserAirTerminal(CompNum).Loop(Loop).MassFlowRateMax, + UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, + UserAirTerminal(CompNum).Loop(Loop).OutletNodeNum, + UserAirTerminal(CompNum).Loop(Loop).LoopNum, + UserAirTerminal(CompNum).Loop(Loop).LoopSideNum, + UserAirTerminal(CompNum).Loop(Loop).BranchNum, + UserAirTerminal(CompNum).Loop(Loop).CompNum); PlantUtilities::RegisterPlantCompDesignFlow(UserAirTerminal(CompNum).Loop(Loop).InletNodeNum, - UserAirTerminal(CompNum).Loop(Loop).DesignVolumeFlowRate); + UserAirTerminal(CompNum).Loop(Loop).DesignVolumeFlowRate); } } @@ -489,10 +496,10 @@ namespace UserDefinedComponents { static ObjexxFCL::gio::Fmt fmtLD("*"); bool ErrorsFound(false); - int NumAlphas; // Number of elements in the alpha array - int NumNums; // Number of elements in the numeric array - int IOStat; // IO Status when calling get input subroutine - int TotalArgs; // argument for call to GetObjectDefMaxArgs + int NumAlphas; // Number of elements in the alpha array + int NumNums; // Number of elements in the numeric array + int IOStat; // IO Status when calling get input subroutine + int TotalArgs; // argument for call to GetObjectDefMaxArgs Array1D_string cAlphaFieldNames; Array1D_bool lAlphaFieldBlanks; Array1D_string cAlphaArgs; @@ -516,17 +523,8 @@ namespace UserDefinedComponents { UserPlantComp.allocate(NumUserPlantComps); CheckUserPlantCompName.dimension(NumUserPlantComps, true); for (int CompLoop = 1; CompLoop <= NumUserPlantComps; ++CompLoop) { - inputProcessor->getObjectItem(cCurrentModuleObject, - CompLoop, - cAlphaArgs, - NumAlphas, - rNumericArgs, - NumNums, - IOStat, - _, - lAlphaFieldBlanks, - cAlphaFieldNames, - _); + inputProcessor->getObjectItem( + cCurrentModuleObject, CompLoop, cAlphaArgs, NumAlphas, rNumericArgs, NumNums, IOStat, _, lAlphaFieldBlanks, cAlphaFieldNames, _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); UserPlantComp(CompLoop).Name = cAlphaArgs(1); @@ -552,24 +550,27 @@ namespace UserDefinedComponents { for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { LoopStr = General::RoundSigDigits(ConnectionLoop); int aArgCount = (ConnectionLoop - 1) * 6 + 3; - UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - ConnectionLoop, - DataLoopNode::ObjectIsNotParent); - UserPlantComp(CompLoop).Loop(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - ConnectionLoop, - DataLoopNode::ObjectIsNotParent); - - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes " + LoopStr); + UserPlantComp(CompLoop).Loop(ConnectionLoop).InletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + ConnectionLoop, + DataLoopNode::ObjectIsNotParent); + UserPlantComp(CompLoop).Loop(ConnectionLoop).OutletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + ConnectionLoop, + DataLoopNode::ObjectIsNotParent); + + BranchNodeConnections::TestCompSet( + cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes " + LoopStr); { auto const SELECT_CASE_var(cAlphaArgs(aArgCount + 2)); @@ -714,17 +715,18 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(27)) { - UserPlantComp(CompLoop).Air.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(27), - ErrorsFound, - cCurrentModuleObject, - UserPlantComp(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_OutsideAirReference, - 1, - DataLoopNode::ObjectIsNotParent); + UserPlantComp(CompLoop).Air.InletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(27), + ErrorsFound, + cCurrentModuleObject, + UserPlantComp(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, + 1, + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable( - "Inlet Temperature for Air Connection", UserPlantComp(CompLoop).Name, "[C]", UserPlantComp(CompLoop).Air.InletTemp); + "Inlet Temperature for Air Connection", UserPlantComp(CompLoop).Name, "[C]", UserPlantComp(CompLoop).Air.InletTemp); SetupEMSInternalVariable("Inlet Mass Flow Rate for Air Connection", UserPlantComp(CompLoop).Name, "[kg/s]", @@ -734,9 +736,9 @@ namespace UserDefinedComponents { "[kgWater/kgDryAir]", UserPlantComp(CompLoop).Air.InletHumRat); SetupEMSInternalVariable( - "Inlet Density for Air Connection", UserPlantComp(CompLoop).Name, "[kg/m3]", UserPlantComp(CompLoop).Air.InletRho); + "Inlet Density for Air Connection", UserPlantComp(CompLoop).Name, "[kg/m3]", UserPlantComp(CompLoop).Air.InletRho); SetupEMSInternalVariable( - "Inlet Specific Heat for Air Connection", UserPlantComp(CompLoop).Name, "[J/kg-C]", UserPlantComp(CompLoop).Air.InletCp); + "Inlet Specific Heat for Air Connection", UserPlantComp(CompLoop).Name, "[J/kg-C]", UserPlantComp(CompLoop).Air.InletCp); } if (!lAlphaFieldBlanks(28)) { @@ -750,7 +752,7 @@ namespace UserDefinedComponents { DataLoopNode::ObjectIsNotParent); // outlet air node results SetupEMSActuator( - "Air Connection", UserPlantComp(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserPlantComp(CompLoop).Air.OutletTemp); + "Air Connection", UserPlantComp(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserPlantComp(CompLoop).Air.OutletTemp); SetupEMSActuator("Air Connection", UserPlantComp(CompLoop).Name, "Outlet Humidity Ratio", @@ -896,29 +898,18 @@ namespace UserDefinedComponents { UserCoil.allocate(NumUserCoils); CheckUserCoilName.dimension(NumUserCoils, true); for (int CompLoop = 1; CompLoop <= NumUserCoils; ++CompLoop) { - inputProcessor->getObjectItem(cCurrentModuleObject, - CompLoop, - cAlphaArgs, - NumAlphas, - rNumericArgs, - NumNums, - IOStat, - _, - lAlphaFieldBlanks, - cAlphaFieldNames, - _); + inputProcessor->getObjectItem( + cCurrentModuleObject, CompLoop, cAlphaArgs, NumAlphas, rNumericArgs, NumNums, IOStat, _, lAlphaFieldBlanks, cAlphaFieldNames, _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); // ErrorsFound will be set to True if problem was found, left untouched otherwise - GlobalNames::VerifyUniqueCoilName(cCurrentModuleObject, cAlphaArgs(1), ErrorsFound, - cCurrentModuleObject + " Name"); + GlobalNames::VerifyUniqueCoilName(cCurrentModuleObject, cAlphaArgs(1), ErrorsFound, cCurrentModuleObject + " Name"); UserCoil(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), - DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -931,8 +922,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), - DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserCoil(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -949,15 +939,15 @@ namespace UserDefinedComponents { UserCoil(CompLoop).NumAirConnections = NumAirConnections; for (int ConnectionLoop = 1; ConnectionLoop <= NumAirConnections; ++ConnectionLoop) { int aArgCount = (ConnectionLoop - 1) * 2 + 4; - UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - UserCoil(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 1, - DataLoopNode::ObjectIsNotParent); + UserCoil(CompLoop).Air(ConnectionLoop).InletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + UserCoil(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables @@ -982,15 +972,15 @@ namespace UserDefinedComponents { "[J/kg-C]", UserCoil(CompLoop).Air(ConnectionLoop).InletCp); - UserCoil(CompLoop).Air(ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - UserCoil(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 1, - DataLoopNode::ObjectIsNotParent); + UserCoil(CompLoop).Air(ConnectionLoop).OutletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + UserCoil(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Air Connection " + LoopStr, UserCoil(CompLoop).Name, "Outlet Temperature", @@ -1010,9 +1000,8 @@ namespace UserDefinedComponents { lDummy, UserCoil(CompLoop).Air(ConnectionLoop).OutletMassFlowRate); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), - cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), - "Air Nodes " + LoopStr); + BranchNodeConnections::TestCompSet( + cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Air Nodes " + LoopStr); } if (!lAlphaFieldBlanks(8)) { @@ -1048,8 +1037,7 @@ namespace UserDefinedComponents { 2, DataLoopNode::ObjectIsNotParent); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), - cAlphaArgs(10), "Plant Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(9), cAlphaArgs(10), "Plant Nodes"); // this model is only for plant connections that are "Demand" UserCoil(CompLoop).Loop.HowLoadServed = DataPlant::HowMet_NoneDemand; @@ -1059,22 +1047,18 @@ namespace UserDefinedComponents { // Setup Internal Variables // model input related internal variables SetupEMSInternalVariable( - "Inlet Temperature for Plant Connection", UserCoil(CompLoop).Name, "[C]", - UserCoil(CompLoop).Loop.InletTemp); + "Inlet Temperature for Plant Connection", UserCoil(CompLoop).Name, "[C]", UserCoil(CompLoop).Loop.InletTemp); SetupEMSInternalVariable("Inlet Mass Flow Rate for Plant Connection", UserCoil(CompLoop).Name, "[kg/s]", UserCoil(CompLoop).Loop.InletMassFlowRate); SetupEMSInternalVariable( - "Inlet Density for Plant Connection", UserCoil(CompLoop).Name, "[kg/m3]", - UserCoil(CompLoop).Loop.InletRho); + "Inlet Density for Plant Connection", UserCoil(CompLoop).Name, "[kg/m3]", UserCoil(CompLoop).Loop.InletRho); SetupEMSInternalVariable( - "Inlet Specific Heat for Plant Connection", UserCoil(CompLoop).Name, "[J/kg-C]", - UserCoil(CompLoop).Loop.InletCp); + "Inlet Specific Heat for Plant Connection", UserCoil(CompLoop).Name, "[J/kg-C]", UserCoil(CompLoop).Loop.InletCp); // model results related actuators SetupEMSActuator( - "Plant Connection", UserCoil(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, - UserCoil(CompLoop).Loop.OutletTemp); + "Plant Connection", UserCoil(CompLoop).Name, "Outlet Temperature", "[C]", lDummy, UserCoil(CompLoop).Loop.OutletTemp); SetupEMSActuator("Plant Connection", UserCoil(CompLoop).Name, "Mass Flow Rate", @@ -1138,11 +1122,9 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(13)) { - UserCoil(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(13), - DataHeatBalance::Zone); + UserCoil(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(13), DataHeatBalance::Zone); if (UserCoil(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + - ": Ambient Zone Name not found = " + cAlphaArgs(13)); + ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(13)); ErrorsFound = true; } else { UserCoil(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1208,8 +1190,7 @@ namespace UserDefinedComponents { } // NumUserCoils > 0 if (ErrorsFound) { - ShowFatalError( - "GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); + ShowFatalError("GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); } } @@ -1225,10 +1206,10 @@ namespace UserDefinedComponents { static ObjexxFCL::gio::Fmt fmtLD("*"); bool ErrorsFound(false); - int NumAlphas; // Number of elements in the alpha array - int NumNums; // Number of elements in the numeric array - int IOStat; // IO Status when calling get input subroutine - int TotalArgs; // argument for call to GetObjectDefMaxArgs + int NumAlphas; // Number of elements in the alpha array + int NumNums; // Number of elements in the numeric array + int IOStat; // IO Status when calling get input subroutine + int TotalArgs; // argument for call to GetObjectDefMaxArgs Array1D_string cAlphaFieldNames; Array1D_bool lAlphaFieldBlanks; Array1D_string cAlphaArgs; @@ -1255,24 +1236,14 @@ namespace UserDefinedComponents { UserZoneAirHVAC.allocate(NumUserZoneAir); CheckUserZoneAirName.dimension(NumUserZoneAir, true); for (int CompLoop = 1; CompLoop <= NumUserZoneAir; ++CompLoop) { - inputProcessor->getObjectItem(cCurrentModuleObject, - CompLoop, - cAlphaArgs, - NumAlphas, - rNumericArgs, - NumNums, - IOStat, - _, - lAlphaFieldBlanks, - cAlphaFieldNames, - _); + inputProcessor->getObjectItem( + cCurrentModuleObject, CompLoop, cAlphaArgs, NumAlphas, rNumericArgs, NumNums, IOStat, _, lAlphaFieldBlanks, cAlphaFieldNames, _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); UserZoneAirHVAC(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), - DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1285,8 +1256,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), - DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserZoneAirHVAC(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1300,8 +1270,7 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).ZoneAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, - UserZoneAirHVAC( - CompLoop).Name, + UserZoneAirHVAC(CompLoop).Name, DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Inlet, 1, @@ -1350,8 +1319,7 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).ZoneAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, - UserZoneAirHVAC( - CompLoop).Name, + UserZoneAirHVAC(CompLoop).Name, DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Outlet, 1, @@ -1376,15 +1344,14 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).ZoneAir.OutletMassFlowRate); if (!lAlphaFieldBlanks(6)) { - UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(6), - ErrorsFound, - cCurrentModuleObject, - UserZoneAirHVAC(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 2, - DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), + ErrorsFound, + cCurrentModuleObject, + UserZoneAirHVAC(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 2, + DataLoopNode::ObjectIsNotParent); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Secondary Air Connection", UserZoneAirHVAC(CompLoop).Name, @@ -1412,15 +1379,14 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(7)) { - UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(7), - ErrorsFound, - cCurrentModuleObject, - UserZoneAirHVAC(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 2, - DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(7), + ErrorsFound, + cCurrentModuleObject, + UserZoneAirHVAC(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 2, + DataLoopNode::ObjectIsNotParent); SetupEMSActuator("Secondary Air Connection", UserZoneAirHVAC(CompLoop).Name, "Outlet Temperature", @@ -1441,8 +1407,7 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).SourceAir.OutletMassFlowRate); } - if ((UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum > 0) && - (UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum > 0)) { + if ((UserZoneAirHVAC(CompLoop).SourceAir.InletNodeNum > 0) && (UserZoneAirHVAC(CompLoop).SourceAir.OutletNodeNum > 0)) { // CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(6),cAlphaArgs(7),'Air Nodes') } @@ -1452,32 +1417,28 @@ namespace UserDefinedComponents { UserZoneAirHVAC(CompLoop).Loop.allocate(NumPlantConnections); for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { int aArgCount = (ConnectionLoop - 1) * 2 + 8; - UserZoneAirHVAC(CompLoop).Loop( - ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent); - UserZoneAirHVAC(CompLoop).Loop( - ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), - cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), - "Plant Nodes"); + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).InletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent); + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).OutletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent); + BranchNodeConnections::TestCompSet( + cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; - UserZoneAirHVAC(CompLoop).Loop( - ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; + UserZoneAirHVAC(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables ObjexxFCL::gio::write(LoopStr, fmtLD) << ConnectionLoop; strip(LoopStr); @@ -1556,8 +1517,7 @@ namespace UserDefinedComponents { cAlphaArgs(15), ErrorsFound, UserZoneAirHVAC(CompLoop).Water.CollectionTankID, - UserZoneAirHVAC( - CompLoop).Water.CollectionTankSupplyARRID); + UserZoneAirHVAC(CompLoop).Water.CollectionTankSupplyARRID); UserZoneAirHVAC(CompLoop).Water.CollectsToWaterSystem = true; SetupEMSActuator("Water System", UserZoneAirHVAC(CompLoop).Name, @@ -1569,12 +1529,9 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(16)) { - UserZoneAirHVAC(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(16), - DataHeatBalance::Zone); + UserZoneAirHVAC(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(16), DataHeatBalance::Zone); if (UserZoneAirHVAC(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError( - cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + - cAlphaArgs(16)); + ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(16)); ErrorsFound = true; } else { UserZoneAirHVAC(CompLoop).Zone.DeviceHasInternalGains = true; @@ -1638,8 +1595,7 @@ namespace UserDefinedComponents { } // NumUserZoneAir > 0 if (ErrorsFound) { - ShowFatalError( - "GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); + ShowFatalError("GetUserDefinedComponents: Errors found in processing " + cCurrentModuleObject + " input."); } cCurrentModuleObject = "AirTerminal:SingleDuct:UserDefined"; @@ -1656,24 +1612,14 @@ namespace UserDefinedComponents { UserAirTerminal.allocate(NumUserAirTerminals); CheckUserAirTerminal.dimension(NumUserAirTerminals, true); for (int CompLoop = 1; CompLoop <= NumUserAirTerminals; ++CompLoop) { - inputProcessor->getObjectItem(cCurrentModuleObject, - CompLoop, - cAlphaArgs, - NumAlphas, - rNumericArgs, - NumNums, - IOStat, - _, - lAlphaFieldBlanks, - cAlphaFieldNames, - _); + inputProcessor->getObjectItem( + cCurrentModuleObject, CompLoop, cAlphaArgs, NumAlphas, rNumericArgs, NumNums, IOStat, _, lAlphaFieldBlanks, cAlphaFieldNames, _); UtilityRoutines::IsNameEmpty(cAlphaArgs(1), cCurrentModuleObject, ErrorsFound); UserAirTerminal(CompLoop).Name = cAlphaArgs(1); // now get program manager for model simulations if (!lAlphaFieldBlanks(2)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), - DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(2), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlSimProgramMngr = StackMngrNum; } else { @@ -1686,8 +1632,7 @@ namespace UserDefinedComponents { // now get program manager for model initializations if (!lAlphaFieldBlanks(3)) { - int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), - DataRuntimeLanguage::EMSProgramCallManager); + int StackMngrNum = UtilityRoutines::FindItemInList(cAlphaArgs(3), DataRuntimeLanguage::EMSProgramCallManager); if (StackMngrNum > 0) { // found it UserAirTerminal(CompLoop).ErlInitProgramMngr = StackMngrNum; } else { @@ -1701,14 +1646,12 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).AirLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, - UserAirTerminal( - CompLoop).Name, + UserAirTerminal(CompLoop).Name, DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames( - 4)); + cAlphaFieldNames(4)); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Primary Air Connection", UserAirTerminal(CompLoop).Name, @@ -1753,14 +1696,12 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).AirLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, - UserAirTerminal( - CompLoop).Name, + UserAirTerminal(CompLoop).Name, DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames( - 5)); + cAlphaFieldNames(5)); SetupEMSActuator("Primary Air Connection", UserAirTerminal(CompLoop).Name, "Outlet Temperature", @@ -1779,49 +1720,40 @@ namespace UserDefinedComponents { "[kg/s]", lDummy, UserAirTerminal(CompLoop).AirLoop.OutletMassFlowRate); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), - cAlphaArgs(5), "Air Nodes"); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(4), cAlphaArgs(5), "Air Nodes"); int ADUNum = 0; for (ADUNum = 1; ADUNum <= DataDefineEquip::NumAirDistUnits; ++ADUNum) { - if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == - DataDefineEquip::AirDistUnit(ADUNum).OutletNodeNum) { + if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == DataDefineEquip::AirDistUnit(ADUNum).OutletNodeNum) { // AirDistUnit(ADUNum)%InletNodeNum = IndUnitIUNum)%InletNodeNum UserAirTerminal(CompLoop).ADUNum = ADUNum; } } // one assumes if there isn't one assigned, it's an error? if (UserAirTerminal(CompLoop).ADUNum == 0) { - ShowSevereError("GetUserDefinedComponents: No matching Air Distribution Unit for " + - cCurrentModuleObject + " = " + + ShowSevereError("GetUserDefinedComponents: No matching Air Distribution Unit for " + cCurrentModuleObject + " = " + UserAirTerminal(CompLoop).Name); - ShowContinueError("...should have outlet node=" + - DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum)); + ShowContinueError("...should have outlet node=" + DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum)); // ErrorsFound=.TRUE. } // Fill the Zone Equipment data with the inlet node number of this unit. for (int CtrlZone = 1; CtrlZone <= DataGlobals::NumOfZones; ++CtrlZone) { if (!DataZoneEquipment::ZoneEquipConfig(CtrlZone).IsControlled) continue; - for (int SupAirIn = 1; - SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { - if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == - DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { - if (DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > - 0) { + for (int SupAirIn = 1; SupAirIn <= DataZoneEquipment::ZoneEquipConfig(CtrlZone).NumInletNodes; ++SupAirIn) { + if (UserAirTerminal(CompLoop).AirLoop.OutletNodeNum == DataZoneEquipment::ZoneEquipConfig(CtrlZone).InletNode(SupAirIn)) { + if (DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode > 0) { ShowSevereError("Error in connecting a terminal unit to a zone"); - ShowContinueError( - DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum) + - " already connects to another zone"); - ShowContinueError("Occurs for terminal unit " + cCurrentModuleObject + " = " + - UserAirTerminal(CompLoop).Name); + ShowContinueError(DataLoopNode::NodeID(UserAirTerminal(CompLoop).AirLoop.OutletNodeNum) + + " already connects to another zone"); + ShowContinueError("Occurs for terminal unit " + cCurrentModuleObject + " = " + UserAirTerminal(CompLoop).Name); ShowContinueError("Check terminal unit node names for errors"); ErrorsFound = true; } else { - DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool( - SupAirIn).InNode = UserAirTerminal(CompLoop).AirLoop.InletNodeNum; - DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool( - SupAirIn).OutNode = UserAirTerminal(CompLoop).AirLoop.OutletNodeNum; + DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).InNode = + UserAirTerminal(CompLoop).AirLoop.InletNodeNum; + DataZoneEquipment::ZoneEquipConfig(CtrlZone).AirDistUnitCool(SupAirIn).OutNode = + UserAirTerminal(CompLoop).AirLoop.OutletNodeNum; } UserAirTerminal(CompLoop).ActualCtrlZoneNum = CtrlZone; @@ -1830,16 +1762,15 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(6)) { - UserAirTerminal(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(6), - ErrorsFound, - cCurrentModuleObject, - UserAirTerminal(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Inlet, - 2, - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(6)); + UserAirTerminal(CompLoop).SourceAir.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), + ErrorsFound, + cCurrentModuleObject, + UserAirTerminal(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 2, + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(6)); // model input related internal variables SetupEMSInternalVariable("Inlet Temperature for Secondary Air Connection", UserAirTerminal(CompLoop).Name, @@ -1867,16 +1798,15 @@ namespace UserDefinedComponents { } if (!lAlphaFieldBlanks(7)) { - UserAirTerminal(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(7), - ErrorsFound, - cCurrentModuleObject, - UserAirTerminal(CompLoop).Name, - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_Outlet, - 2, - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(7)); + UserAirTerminal(CompLoop).SourceAir.OutletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(7), + ErrorsFound, + cCurrentModuleObject, + UserAirTerminal(CompLoop).Name, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 2, + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(7)); SetupEMSActuator("Secondary Air Connection", UserAirTerminal(CompLoop).Name, "Outlet Temperature", @@ -1897,8 +1827,7 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).SourceAir.OutletMassFlowRate); } - if ((UserAirTerminal(CompLoop).SourceAir.InletNodeNum > 0) && - (UserAirTerminal(CompLoop).SourceAir.OutletNodeNum > 0)) { + if ((UserAirTerminal(CompLoop).SourceAir.InletNodeNum > 0) && (UserAirTerminal(CompLoop).SourceAir.OutletNodeNum > 0)) { // CALL TestCompSet(TRIM(cCurrentModuleObject),cAlphaArgs(1),cAlphaArgs(6),cAlphaArgs(7),'Air Nodes') } @@ -1908,34 +1837,30 @@ namespace UserDefinedComponents { UserAirTerminal(CompLoop).Loop.allocate(NumPlantConnections); for (int ConnectionLoop = 1; ConnectionLoop <= NumPlantConnections; ++ConnectionLoop) { int aArgCount = (ConnectionLoop - 1) * 2 + 8; - UserAirTerminal(CompLoop).Loop( - ConnectionLoop).InletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(aArgCount), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Inlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(aArgCount)); - UserAirTerminal(CompLoop).Loop( - ConnectionLoop).OutletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(aArgCount + 1), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Outlet, - (ConnectionLoop + 2), - DataLoopNode::ObjectIsNotParent, - cAlphaFieldNames(aArgCount + 1)); - BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), - cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), - "Plant Nodes"); + UserAirTerminal(CompLoop).Loop(ConnectionLoop).InletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(aArgCount)); + UserAirTerminal(CompLoop).Loop(ConnectionLoop).OutletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(aArgCount + 1), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + (ConnectionLoop + 2), + DataLoopNode::ObjectIsNotParent, + cAlphaFieldNames(aArgCount + 1)); + BranchNodeConnections::TestCompSet( + cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(aArgCount), cAlphaArgs(aArgCount + 1), "Plant Nodes"); UserAirTerminal(CompLoop).Loop(ConnectionLoop).HowLoadServed = DataPlant::HowMet_NoneDemand; - UserAirTerminal(CompLoop).Loop( - ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; + UserAirTerminal(CompLoop).Loop(ConnectionLoop).FlowPriority = DataPlant::LoopFlowStatus_NeedyAndTurnsLoopOn; // Setup Internal Variables LoopStr = General::RoundSigDigits(ConnectionLoop); // model input related internal variables @@ -2013,8 +1938,7 @@ namespace UserDefinedComponents { cAlphaArgs(13), ErrorsFound, UserAirTerminal(CompLoop).Water.CollectionTankID, - UserAirTerminal( - CompLoop).Water.CollectionTankSupplyARRID); + UserAirTerminal(CompLoop).Water.CollectionTankSupplyARRID); UserAirTerminal(CompLoop).Water.CollectsToWaterSystem = true; SetupEMSActuator("Water System", UserAirTerminal(CompLoop).Name, @@ -2026,12 +1950,9 @@ namespace UserDefinedComponents { if (!lAlphaFieldBlanks(14)) { - UserAirTerminal(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(14), - DataHeatBalance::Zone); + UserAirTerminal(CompLoop).Zone.ZoneNum = UtilityRoutines::FindItemInList(cAlphaArgs(14), DataHeatBalance::Zone); if (UserAirTerminal(CompLoop).Zone.ZoneNum == 0) { - ShowSevereError( - cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + - cAlphaArgs(14)); + ShowSevereError(cCurrentModuleObject + " = " + cAlphaArgs(1) + ": Ambient Zone Name not found = " + cAlphaArgs(14)); ErrorsFound = true; } else { UserAirTerminal(CompLoop).Zone.DeviceHasInternalGains = true; @@ -2161,8 +2082,10 @@ namespace UserDefinedComponents { this->Loop(LoopNum).InletMassFlowRate = DataLoopNode::Node(this->Loop(LoopNum).InletNodeNum).MassFlowRate; this->Loop(LoopNum).InletTemp = DataLoopNode::Node(this->Loop(LoopNum).InletNodeNum).Temp; if (this->Air.InletNodeNum > 0) { - this->Air.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW( - DataEnvironment::OutBaroPress, DataLoopNode::Node(this->Air.InletNodeNum).Temp, DataLoopNode::Node(this->Air.InletNodeNum).HumRat, RoutineName); + this->Air.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, + DataLoopNode::Node(this->Air.InletNodeNum).Temp, + DataLoopNode::Node(this->Air.InletNodeNum).HumRat, + RoutineName); this->Air.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->Air.InletNodeNum).HumRat, DataLoopNode::Node(this->Air.InletNodeNum).Temp); this->Air.InletTemp = DataLoopNode::Node(this->Air.InletNodeNum).Temp; @@ -2219,8 +2142,8 @@ namespace UserDefinedComponents { DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat, RoutineName); - this->Air(loop).InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat, DataLoopNode::Node(this->Air(loop).InletNodeNum).Temp); + this->Air(loop).InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat, + DataLoopNode::Node(this->Air(loop).InletNodeNum).Temp); this->Air(loop).InletTemp = DataLoopNode::Node(this->Air(loop).InletNodeNum).Temp; this->Air(loop).InletMassFlowRate = DataLoopNode::Node(this->Air(loop).InletNodeNum).MassFlowRate; this->Air(loop).InletHumRat = DataLoopNode::Node(this->Air(loop).InletNodeNum).HumRat; @@ -2228,13 +2151,13 @@ namespace UserDefinedComponents { if (this->PlantIsConnected) { this->Loop.InletRho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->Loop.LoopNum).FluidName, - DataLoopNode::Node(this->Loop.InletNodeNum).Temp, - DataPlant::PlantLoop(this->Loop.LoopNum).FluidIndex, - RoutineName); + DataLoopNode::Node(this->Loop.InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop.LoopNum).FluidIndex, + RoutineName); this->Loop.InletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->Loop.LoopNum).FluidName, - DataLoopNode::Node(this->Loop.InletNodeNum).Temp, - DataPlant::PlantLoop(this->Loop.LoopNum).FluidIndex, - RoutineName); + DataLoopNode::Node(this->Loop.InletNodeNum).Temp, + DataPlant::PlantLoop(this->Loop.LoopNum).FluidIndex, + RoutineName); this->Loop.InletTemp = DataLoopNode::Node(this->Loop.InletNodeNum).Temp; this->Loop.InletMassFlowRate = DataLoopNode::Node(this->Loop.InletNodeNum).MassFlowRate; } @@ -2296,21 +2219,21 @@ namespace UserDefinedComponents { this->RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; this->ZoneAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp, - DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat, - RoutineName); - this->ZoneAir.InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat, DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp); + DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp, + DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat, + RoutineName); + this->ZoneAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat, + DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp); this->ZoneAir.InletTemp = DataLoopNode::Node(this->ZoneAir.InletNodeNum).Temp; this->ZoneAir.InletHumRat = DataLoopNode::Node(this->ZoneAir.InletNodeNum).HumRat; if (this->SourceAir.InletNodeNum > 0) { this->SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp, - DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, - RoutineName); + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp, + DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, + RoutineName); this->SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, - DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp); + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp); this->SourceAir.InletTemp = DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp; this->SourceAir.InletHumRat = DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat; } @@ -2384,21 +2307,21 @@ namespace UserDefinedComponents { this->RemainingOutputReqToHumidSP = DataZoneEnergyDemands::ZoneSysMoistureDemand(ZoneNum).RemainingOutputReqToHumidSP; this->AirLoop.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp, - DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat, - RoutineName); - this->AirLoop.InletCp = - Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat, DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp); + DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp, + DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat, + RoutineName); + this->AirLoop.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat, + DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp); this->AirLoop.InletTemp = DataLoopNode::Node(this->AirLoop.InletNodeNum).Temp; this->AirLoop.InletHumRat = DataLoopNode::Node(this->AirLoop.InletNodeNum).HumRat; if (this->SourceAir.InletNodeNum > 0) { this->SourceAir.InletRho = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, - DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp, - DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, - RoutineName); + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp, + DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, + RoutineName); this->SourceAir.InletCp = Psychrometrics::PsyCpAirFnWTdb(DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat, - DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp); + DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp); this->SourceAir.InletTemp = DataLoopNode::Node(this->SourceAir.InletNodeNum).Temp; this->SourceAir.InletHumRat = DataLoopNode::Node(this->SourceAir.InletNodeNum).HumRat; } @@ -2442,29 +2365,26 @@ namespace UserDefinedComponents { // make mass flow requests, just this loop PlantUtilities::SetComponentFlowRate(this->Loop(LoopNum).MassFlowRateRequest, - this->Loop(LoopNum).InletNodeNum, - this->Loop(LoopNum).OutletNodeNum, - this->Loop(LoopNum).LoopNum, - this->Loop(LoopNum).LoopSideNum, - this->Loop(LoopNum).BranchNum, - this->Loop(LoopNum).CompNum); + this->Loop(LoopNum).InletNodeNum, + this->Loop(LoopNum).OutletNodeNum, + this->Loop(LoopNum).LoopNum, + this->Loop(LoopNum).LoopSideNum, + this->Loop(LoopNum).BranchNum, + this->Loop(LoopNum).CompNum); if (this->Air.OutletNodeNum > 0) { DataLoopNode::Node(this->Air.OutletNodeNum).Temp = this->Air.OutletTemp; DataLoopNode::Node(this->Air.OutletNodeNum).HumRat = this->Air.OutletHumRat; DataLoopNode::Node(this->Air.OutletNodeNum).MassFlowRate = this->Air.OutletMassFlowRate; - DataLoopNode::Node(this->Air.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(this->Air.OutletTemp, this->Air.OutletHumRat); + DataLoopNode::Node(this->Air.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(this->Air.OutletTemp, this->Air.OutletHumRat); } if (this->Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = - this->Water.SupplyVdotRequest; + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = this->Water.SupplyVdotRequest; } if (this->Water.CollectsToWaterSystem) { - DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = - this->Water.CollectedVdot; + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = this->Water.CollectedVdot; } if (this->Loop(LoopNum).HowLoadServed == DataPlant::HowMet_ByNominalCapLowOutLimit) { @@ -2514,25 +2434,23 @@ namespace UserDefinedComponents { if (this->PlantIsConnected) { // make mass flow requests PlantUtilities::SetComponentFlowRate(this->Loop.MassFlowRateRequest, - this->Loop.InletNodeNum, - this->Loop.OutletNodeNum, - this->Loop.LoopNum, - this->Loop.LoopSideNum, - this->Loop.BranchNum, - this->Loop.CompNum); + this->Loop.InletNodeNum, + this->Loop.OutletNodeNum, + this->Loop.LoopNum, + this->Loop.LoopSideNum, + this->Loop.BranchNum, + this->Loop.CompNum); PlantUtilities::SafeCopyPlantNode(this->Loop.InletNodeNum, this->Loop.OutletNodeNum); // unload Actuators to node data structure DataLoopNode::Node(this->Loop.OutletNodeNum).Temp = this->Loop.OutletTemp; } if (this->Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = - this->Water.SupplyVdotRequest; + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = this->Water.SupplyVdotRequest; } if (this->Water.CollectsToWaterSystem) { - DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = - this->Water.CollectedVdot; + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = this->Water.CollectedVdot; } } @@ -2553,8 +2471,7 @@ namespace UserDefinedComponents { DataLoopNode::Node(this->ZoneAir.OutletNodeNum).Temp = this->ZoneAir.OutletTemp; DataLoopNode::Node(this->ZoneAir.OutletNodeNum).HumRat = this->ZoneAir.OutletHumRat; DataLoopNode::Node(this->ZoneAir.OutletNodeNum).MassFlowRate = this->ZoneAir.OutletMassFlowRate; - DataLoopNode::Node(this->ZoneAir.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(this->ZoneAir.OutletTemp, this->ZoneAir.OutletHumRat); + DataLoopNode::Node(this->ZoneAir.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(this->ZoneAir.OutletTemp, this->ZoneAir.OutletHumRat); if (this->SourceAir.OutletNodeNum > 0) { DataLoopNode::Node(this->SourceAir.OutletNodeNum).Temp = this->SourceAir.OutletTemp; @@ -2568,12 +2485,12 @@ namespace UserDefinedComponents { for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { // make mass flow requests PlantUtilities::SetComponentFlowRate(this->Loop(loop).MassFlowRateRequest, - this->Loop(loop).InletNodeNum, - this->Loop(loop).OutletNodeNum, - this->Loop(loop).LoopNum, - this->Loop(loop).LoopSideNum, - this->Loop(loop).BranchNum, - this->Loop(loop).CompNum); + this->Loop(loop).InletNodeNum, + this->Loop(loop).OutletNodeNum, + this->Loop(loop).LoopNum, + this->Loop(loop).LoopSideNum, + this->Loop(loop).BranchNum, + this->Loop(loop).CompNum); PlantUtilities::SafeCopyPlantNode(this->Loop(loop).InletNodeNum, this->Loop(loop).OutletNodeNum); // unload Actuators to node data structure DataLoopNode::Node(this->Loop(loop).OutletNodeNum).Temp = this->Loop(loop).OutletTemp; @@ -2581,13 +2498,11 @@ namespace UserDefinedComponents { } if (this->Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = - this->Water.SupplyVdotRequest; + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = this->Water.SupplyVdotRequest; } if (this->Water.CollectsToWaterSystem) { - DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = - this->Water.CollectedVdot; + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = this->Water.CollectedVdot; } } @@ -2605,8 +2520,7 @@ namespace UserDefinedComponents { DataLoopNode::Node(this->AirLoop.OutletNodeNum).Temp = this->AirLoop.OutletTemp; DataLoopNode::Node(this->AirLoop.OutletNodeNum).HumRat = this->AirLoop.OutletHumRat; DataLoopNode::Node(this->AirLoop.OutletNodeNum).MassFlowRate = this->AirLoop.OutletMassFlowRate; - DataLoopNode::Node(this->AirLoop.OutletNodeNum).Enthalpy = - Psychrometrics::PsyHFnTdbW(this->AirLoop.OutletTemp, this->AirLoop.OutletHumRat); + DataLoopNode::Node(this->AirLoop.OutletNodeNum).Enthalpy = Psychrometrics::PsyHFnTdbW(this->AirLoop.OutletTemp, this->AirLoop.OutletHumRat); if (this->SourceAir.OutletNodeNum > 0) { DataLoopNode::Node(this->SourceAir.OutletNodeNum).Temp = this->SourceAir.OutletTemp; DataLoopNode::Node(this->SourceAir.OutletNodeNum).HumRat = this->SourceAir.OutletHumRat; @@ -2619,12 +2533,12 @@ namespace UserDefinedComponents { for (int loop = 1; loop <= this->NumPlantConnections; ++loop) { // make mass flow requests PlantUtilities::SetComponentFlowRate(this->Loop(loop).MassFlowRateRequest, - this->Loop(loop).InletNodeNum, - this->Loop(loop).OutletNodeNum, - this->Loop(loop).LoopNum, - this->Loop(loop).LoopSideNum, - this->Loop(loop).BranchNum, - this->Loop(loop).CompNum); + this->Loop(loop).InletNodeNum, + this->Loop(loop).OutletNodeNum, + this->Loop(loop).LoopNum, + this->Loop(loop).LoopSideNum, + this->Loop(loop).BranchNum, + this->Loop(loop).CompNum); PlantUtilities::SafeCopyPlantNode(this->Loop(loop).InletNodeNum, this->Loop(loop).OutletNodeNum); // unload Actuators to node data structure DataLoopNode::Node(this->Loop(loop).OutletNodeNum).Temp = this->Loop(loop).OutletTemp; @@ -2632,13 +2546,11 @@ namespace UserDefinedComponents { } if (this->Water.SuppliedByWaterSystem) { - DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = - this->Water.SupplyVdotRequest; + DataWater::WaterStorage(this->Water.SupplyTankID).VdotRequestDemand(this->Water.SupplyTankDemandARRID) = this->Water.SupplyVdotRequest; } if (this->Water.CollectsToWaterSystem) { - DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = - this->Water.CollectedVdot; + DataWater::WaterStorage(this->Water.CollectionTankID).VdotAvailSupply(this->Water.CollectionTankSupplyARRID) = this->Water.CollectedVdot; } } @@ -2709,7 +2621,8 @@ namespace UserDefinedComponents { } } - void GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject) + void + GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject) { // SUBROUTINE INFORMATION: diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index f8d624e1eae..94cb7011915 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -201,7 +201,6 @@ namespace UserDefinedComponents { void initialize(int LoopNum, Real64 MyLoad); void report(int LoopNum); - }; struct UserCoilComponentStruct @@ -226,7 +225,6 @@ namespace UserDefinedComponents { void initialize(); void report(); - }; struct UserZoneHVACForcedAirComponentStruct @@ -257,7 +255,6 @@ namespace UserDefinedComponents { void initialize(int ZoneNum); void report(); - }; struct UserAirTerminalComponentStruct @@ -290,7 +287,6 @@ namespace UserDefinedComponents { void initialize(int ZoneNum); void report(); - }; // Object Data @@ -308,7 +304,7 @@ namespace UserDefinedComponents { bool &CoolingActive); void SimZoneAirUserDefined(std::string const &CompName, // name of the packaged terminal heat pump - int ZoneNum, // number of zone being served + int ZoneNum, // number of zone being served Real64 &SensibleOutputProvided, // sensible capacity delivered to zone Real64 &LatentOutputProvided, // Latent add/removal (kg/s), dehumid = negative int &CompIndex // index to zone hvac unit @@ -322,9 +318,11 @@ namespace UserDefinedComponents { void GetUserDefinedCoilIndex(std::string const &CoilName, int &CoilIndex, bool &ErrorsFound, std::string const &CurrentModuleObject); - void GetUserDefinedCoilAirInletNode(std::string const &CoilName, int &CoilAirInletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); + void + GetUserDefinedCoilAirInletNode(std::string const &CoilName, int &CoilAirInletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); - void GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); + void + GetUserDefinedCoilAirOutletNode(std::string const &CoilName, int &CoilAirOutletNode, bool &ErrorsFound, std::string const &CurrentModuleObject); } // namespace UserDefinedComponents From 2c17d7e702b57218092725beb43340366f2423d1 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 12 Dec 2019 19:03:15 +0100 Subject: [PATCH 32/86] Change per @shorowit. Output RowName as : --- src/EnergyPlus/OutputReportTabular.cc | 44 +++++++++++++++++++++------ 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 69d0314ee14..d58a7080766 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -8464,8 +8464,7 @@ namespace OutputReportTabular { columnHead.allocate(7); columnWidth.allocate(7); columnWidth = 14; // array assignment - same for all columns - tableBody.allocate(7, numRows); - + tableBody.allocate(7, numRows); // TODO: this appears to be (column, row)... rowHead = ""; tableBody = ""; @@ -8542,18 +8541,30 @@ namespace OutputReportTabular { WriteSubtitle("End Uses By Subcategory"); WriteTable(tableBody, rowHead, columnHead, columnWidth); + Array1D_string rowHeadTemp(rowHead); // Before outputing to SQL, we forward fill the End use column (rowHead) (cf #7481) // for better sql queries - FillRowHead(rowHead); + FillRowHead(rowHeadTemp); + + for (int i = 1; i <= numRows; ++i) { + rowHeadTemp(i) = rowHeadTemp(i) + ":" + tableBody(1, i); + } + + // Erase the SubCategory (first column), using slicing + Array2D_string tableBodyTemp(tableBody({2, _, _ }, {_, _, _})); + Array1D_string columnHeadTemp(columnHead({2, _, _ })); if (sqlite) { sqlite->createSQLiteTabularDataRecords( - tableBody, rowHead, columnHead, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "End Uses By Subcategory"); + tableBodyTemp, rowHeadTemp, columnHeadTemp, "AnnualBuildingUtilityPerformanceSummary", "Entire Facility", "End Uses By Subcategory"); } if (ResultsFramework::OutputSchema->timeSeriesAndTabularEnabled()) { ResultsFramework::OutputSchema->TabularReportsCollection.addReportTable( - tableBody, rowHead, columnHead, "Annual Building Utility Performance Summary", "Entire Facility", "End Uses By Subcategory"); + tableBodyTemp, rowHeadTemp, columnHeadTemp, "Annual Building Utility Performance Summary", "Entire Facility", "End Uses By Subcategory"); } + rowHeadTemp.deallocate(); + tableBodyTemp.deallocate(); + columnHeadTemp.deallocate(); } // EAp2-4/5. Performance Rating Method Compliance @@ -9875,16 +9886,30 @@ namespace OutputReportTabular { WriteSubtitle("End Uses By Subcategory"); WriteTable(tableBody, rowHead, columnHead, columnWidth, false, footnote); - // Forward-Fill the blanks in the rowHead for better sql queries - FillRowHead(rowHead); + Array1D_string rowHeadTemp(rowHead); + // Before outputing to SQL, we forward fill the End use column (rowHead) (cf #7481) + // for better sql queries + FillRowHead(rowHeadTemp); + + for (int i = 1; i <= numRows; ++i) { + rowHeadTemp(i) = rowHeadTemp(i) + ":" + tableBody(1, i); + } + + // Erase the SubCategory (first column), using slicing + Array2D_string tableBodyTemp(tableBody({2, _, _ }, {_, _, _})); + Array1D_string columnHeadTemp(columnHead({2, _, _ })); + if (sqlite) { sqlite->createSQLiteTabularDataRecords( - tableBody, rowHead, columnHead, "DemandEndUseComponentsSummary", "Entire Facility", "End Uses By Subcategory"); + tableBodyTemp, rowHeadTemp, columnHeadTemp, "DemandEndUseComponentsSummary", "Entire Facility", "End Uses By Subcategory"); } if (ResultsFramework::OutputSchema->timeSeriesAndTabularEnabled()) { ResultsFramework::OutputSchema->TabularReportsCollection.addReportTable( - tableBody, rowHead, columnHead, "Demand End Use Components Summary", "Entire Facility", "End Uses By Subcategory"); + tableBodyTemp, rowHeadTemp, columnHeadTemp, "Demand End Use Components Summary", "Entire Facility", "End Uses By Subcategory"); } + rowHeadTemp.deallocate(); + tableBodyTemp.deallocate(); + columnHeadTemp.deallocate(); // EAp2-4/5. Performance Rating Method Compliance for (iResource = 1; iResource <= 6; ++iResource) { @@ -15149,6 +15174,7 @@ namespace OutputReportTabular { } } + //====================================================================================================================== //====================================================================================================================== From 7ec339ec178e6a4d330b43c9d78db762292dec93 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 12 Dec 2019 19:03:19 +0100 Subject: [PATCH 33/86] Update test --- .../unit/OutputReportTabular.unit.cc | 114 ++++++------------ 1 file changed, 38 insertions(+), 76 deletions(-) diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index 4e297d1b7b8..ac64abf4d39 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -7761,99 +7761,61 @@ TEST_F(SQLiteFixture, OutputReportTabular_EndUseBySubcategorySQL) // We test for Heating and Total, since they should be the same std::vector testReportNames = {"AnnualBuildingUtilityPerformanceSummary", "DemandEndUseComponentsSummary"}; + std::vector endUseSubCategoryNames = {"General", "AnotherEndUseSubCat"}; std::string endUseName = "Exterior Lighting"; std::string endUseSubCategoryName = "AnotherEndUseSubCat"; + std::string rowName = endUseName + ":" + endUseSubCategoryName; + std::string columnName = "Electricity"; - for (auto& reportName: testReportNames) { + for (auto& endUseSubCategoryName: endUseSubCategoryNames) { + for (auto& reportName: testReportNames) { - std::string query("SELECT RowName From TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ColumnName = 'Subcategory'" - " AND ReportName = '" + reportName + "'" - " AND Value = '" + endUseSubCategoryName + "'"); - - auto result = queryResult(query, "TabularDataWithStrings"); + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ColumnName = 'Electricity'" + " AND ReportName = '" + reportName + "'" + " AND RowName = '" + endUseName + ":" + endUseSubCategoryName + "'"); // Now Like 'Exterior Lighting:General' - ASSERT_EQ(1ul, result.size()) << "Query crashed for reportName=" << reportName; + auto result = queryResult(query, "TabularDataWithStrings"); - // Add informative message if failed - EXPECT_EQ(endUseName, result[0][0]) << "Failed for reportName=" << reportName; + ASSERT_EQ(1ul, result.size()) << "Query crashed for reportName=" << reportName; + } } - // Here's a demonstration of how the new format of the table could help in querying for a specific end use only, which was impossible before - // Here I'm returning ALL entries that belong to a specific end use (one row for each resource (fuel) type) + // Specifically get the electricity usage for End Use = Exterior Lighting, and End Use Subcat = AnotherEndUseSubCat, + // and make sure it's the right number that's returned + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND ColumnName = 'Electricity'" + " AND RowName = 'Exterior Lighting:AnotherEndUseSubCat'"); + Real64 return_val = execAndReturnFirstDouble(query); + + EXPECT_NEAR(extLitUse * 3 / 3.6e6, return_val, 0.01) << "Failed for query: " << query; + + + // Get all Interior Lighting End Uses (all subcats) for Electricity { - auto result = queryResult( - "SELECT * FROM TabularDataWithStrings" + std::string query("SELECT Value From TabularDataWithStrings" " WHERE TableName = 'End Uses By Subcategory'" " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND RowName = '" + endUseName + "'" - " AND (TabularDataIndex - (SELECT TabularDataIndex FROM TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND ColumnName = 'Subcategory'" - " AND RowName = '" + endUseName + "'" - " AND Value = '" + endUseSubCategoryName + "'))" - " % (SELECT COUNT(Value) FROM TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND ColumnName = 'Subcategory') = 0", - "TabularDataWithStrings"); - ASSERT_EQ(7u, result.size()); + " AND ColumnName = 'Electricity'" + " AND RowName LIKE 'Exterior Lighting:%'"); + auto result = queryResult(query, "TabularDataWithStrings"); + + ASSERT_EQ(2u, result.size()) << "Failed for query: " << query; } + // Get all subcat usage for all fuels (6) { - // Since the above is a bit dense, let's break it down - // We get the First TabularDataIndex for our end use subcategory - // We also get the number of subcategories - // We seek (TabularDataIndex - startIndex) % nCats == 0 - std::string startIndexQuery( - "SELECT TabularDataIndex FROM TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND ColumnName = 'Subcategory'" - " AND RowName = '" + endUseName + "'" - " AND Value = '" + endUseSubCategoryName + "'" - ); - - Real64 return_val = execAndReturnFirstDouble(startIndexQuery); - int startIndex = static_cast(return_val); - - std::string nEndUseSubCatsQuery( - "SELECT COUNT(Value) FROM TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND ColumnName = 'Subcategory'" - ); - return_val = execAndReturnFirstDouble(nEndUseSubCatsQuery); - int nEndUseSubCats = static_cast(return_val); - - std::string query( - "SELECT * FROM TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND RowName = '" + endUseName + "'" // Purely optional here... - " AND (TabularDataIndex - " + std::to_string(startIndex) + ") % " + std::to_string(nEndUseSubCats) + " = 0" - ); + std::string query("SELECT Value From TabularDataWithStrings" + " WHERE TableName = 'End Uses By Subcategory'" + " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" + " AND RowName = 'Exterior Lighting:AnotherEndUseSubCat'"); auto result = queryResult(query, "TabularDataWithStrings"); - ASSERT_EQ(7u, result.size()) << "Failed for query: " << query; - - // Now specifically get the electricity one, and make sure it's the right number that's returned - query = ( - "SELECT Value FROM TabularDataWithStrings" - " WHERE TableName = 'End Uses By Subcategory'" - " AND ReportName = 'AnnualBuildingUtilityPerformanceSummary'" - " AND RowName = '" + endUseName + "'" - " AND ColumnName = 'Electricity'" - " AND (TabularDataIndex - " + std::to_string(startIndex) + ") % " + std::to_string(nEndUseSubCats) + " = 0" - ); - return_val = execAndReturnFirstDouble(query); - EXPECT_NEAR(extLitUse * 3 / 3.6e6, return_val, 0.01) << "Failed for query: " << query; - - + ASSERT_EQ(6u, result.size()) << "Failed for query: " << query; } - } From e00552ccbb93d525bd3c7f62502c2cedfb25b1b4 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 12 Dec 2019 19:03:25 +0100 Subject: [PATCH 34/86] Update markdown --- .../OutputChanges9-2-0-to-9-3-0.md | 60 +++++++++++++------ 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md index 89786448a9c..4d36d8845db 100644 --- a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md +++ b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md @@ -81,26 +81,52 @@ See [#PR7577](https://github.com/NREL/EnergyPlus/pull/7577) ### End Use By Subcategory in SQL In the SQL Output file, for `ReportName = "AnnualBuildingUtilityPerformanceSummary"` and `ReportName = "DemandEndUseComponentsSummary"`, -the tables `TableName = "End Uses by Subcategory"` no longer have blank `RowName` corresponding to the End Use (eg: Heating, Interior Lighting, etc) for additional End Use Subcategories. -This will allow querying a specific End Use Subcategory in the SQL file. +the tables `TableName = "End Uses by Subcategory"` have been refactored. `RowName` is now in the format `:`. +This will allow querying a specific End Use Subcategory in the SQL file more easily. -Example SQL Query to return all rows (one row per fuel type) for End Use "Interior Lighting", Subcategory "GeneralLights": +Example SQL Queries: +* Get the Value corresponding to a specific Fuel Type "Electricity", End Use "Interior Lighting", Subcategory "GeneralLights": + +```sql +SELECT Value FROM TabularDataWithStrings + WHERE TableName = 'End Uses By Subcategory' + AND ReportName = 'AnnualBuildingUtilityPerformanceSummary' + AND ColumnName = 'Electricity' + AND RowName = 'Interior Lighting:GeneralLights' +``` + +* Return all rows (one row per fuel type) for End Use "Interior Lighting", Subcategory "GeneralLights": + +```sql +SELECT ColumnName as FuelType, Value FROM TabularDataWithStrings + WHERE TableName = 'End Uses By Subcategory' + AND ReportName = 'AnnualBuildingUtilityPerformanceSummary' + AND RowName = 'Interior Lighting:AnotherEndUseSubCat' ``` -SELECT * FROM TabularDataWithStrings - WHERE TableName = "End Uses By Subcategory" - AND ReportName = "AnnualBuildingUtilityPerformanceSummary" - AND RowName = "Interior Lighting" - AND (TabularDataIndex - (SELECT TabularDataIndex FROM TabularDataWithStrings - WHERE TableName = "End Uses By Subcategory" - AND ReportName = "AnnualBuildingUtilityPerformanceSummary" - AND ColumnName = "Subcategory" - AND RowName = "Interior Lighting" - AND Value = "GeneralLights")) - % (SELECT COUNT(Value) FROM TabularDataWithStrings - WHERE TableName = "End Uses By Subcategory" - AND ReportName = "AnnualBuildingUtilityPerformanceSummary" - AND ColumnName = "Subcategory") + +| FuelType | Value | +|------------------|-------| +| Electricity | 83.33 | +| Natural Gas | 0.00 | +| Additional Fuel | 0.00 | +| District Cooling | 0.00 | +| District Heating | 0.00 | +| Water | 0.00 | + +* Get all rows related to Electricity usage by Interior Lighting: + +```sql +SELECT RowName as "End Use&Subcategory", Value FROM TabularDataWithStrings + WHERE TableName = 'End Uses By Subcategory' + AND ReportName = 'AnnualBuildingUtilityPerformanceSummary' + AND ColumnName = 'Electricity' + AND RowName LIKE 'Interior Lighting:%' ``` +| End Use&Subcategory | Value | +|---------------------------------------|--------| +| Interior Lighting:GeneralLights | 166.67 | +| Interior Lighting:AnotherEndUseSubCat | 83.33 | + See [PR#7584](https://github.com/NREL/EnergyPlus/pull/7584). From 5d09fa2a7d39eae8b05c0ada3a344102eb4f7331 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 12 Dec 2019 19:04:03 +0100 Subject: [PATCH 35/86] Typo --- src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md index 4d36d8845db..35f8be61b1a 100644 --- a/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md +++ b/src/Transition/OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md @@ -102,7 +102,7 @@ SELECT Value FROM TabularDataWithStrings SELECT ColumnName as FuelType, Value FROM TabularDataWithStrings WHERE TableName = 'End Uses By Subcategory' AND ReportName = 'AnnualBuildingUtilityPerformanceSummary' - AND RowName = 'Interior Lighting:AnotherEndUseSubCat' + AND RowName = 'Interior Lighting:GeneralLights' ``` | FuelType | Value | From 2db4b856fd29988a9012e7d3d8e6592f7e1ec7c6 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 12 Dec 2019 16:30:04 -0700 Subject: [PATCH 36/86] cleanup mixedAir factory usage --- src/EnergyPlus/MixedAir.cc | 11 ++-- .../PhotovoltaicThermalCollectors.cc | 43 ++++++++++--- .../PhotovoltaicThermalCollectors.hh | 61 ++++++++++--------- 3 files changed, 71 insertions(+), 44 deletions(-) diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index ff81a4f396c..7c9aa8b23bf 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -459,7 +459,7 @@ namespace MixedAir { OACoolCoil, OAHX); } - // now simulate again propogate current temps back through OA system + // now simulate again propigate current temps back through OA system for (CompNum = 1; CompNum <= OutsideAirSys(OASysNum).NumComponents; ++CompNum) { CompType = OutsideAirSys(OASysNum).ComponentType(CompNum); CompName = OutsideAirSys(OASysNum).ComponentName(CompNum); @@ -830,11 +830,10 @@ namespace MixedAir { // Air-based Photovoltaic-thermal flat plate collector } else if (SELECT_CASE_var == PVT_AirBased) { // 'SolarCollector:FlatPlate:PhotovoltaicThermal' if (Sim) { - auto thisPVT = PhotovoltaicThermalCollectors::PVTCollectorStruct::factory(CompName); - PlantLocation dummyCalledFrom(0, 0, 0, 0); - Real64 dummyCurLoad(0.0); - bool dummyRunFlag(true); - thisPVT->simulate(dummyCalledFrom, FirstHVACIteration, dummyCurLoad, dummyRunFlag); + if (CompIndex == 0) { + CompIndex = PhotovoltaicThermalCollectors::getPVTindexFromName(CompName); + } + PhotovoltaicThermalCollectors::simPVTfromOASys(CompIndex, FirstHVACIteration); } // Evaporative Cooler Types diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 71bd4c92c5d..b91ae05e454 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -73,6 +73,7 @@ #include #include #include +#include #include #include #include @@ -124,11 +125,13 @@ namespace PhotovoltaicThermalCollectors { GetPVTcollectorsInput(); GetInputFlag = false; } + for (auto &thisComp : PVT) { if (thisComp.Name == objectName) { return &thisComp; } } + // If we didn't find it, fatal ShowFatalError("Solar Thermal Collector Factory: Error getting inputs for object named: " + objectName); // Shut up the compiler @@ -1043,9 +1046,7 @@ namespace PhotovoltaicThermalCollectors { } } - void GetPVTThermalPowerProduction(int const PVindex, // index of PV generator (not PVT collector) - Real64 &ThermalPower, - Real64 &ThermalEnergy) + void GetPVTThermalPowerProduction(int const PVindex, Real64 &ThermalPower, Real64 &ThermalEnergy) { // SUBROUTINE INFORMATION: @@ -1073,9 +1074,7 @@ namespace PhotovoltaicThermalCollectors { } } - int GetAirInletNodeNum(std::string const &PVTName, - bool &ErrorsFound - ) + int GetAirInletNodeNum(std::string const &PVTName, bool &ErrorsFound) { // FUNCTION INFORMATION: // AUTHOR Lixing Gu @@ -1106,9 +1105,7 @@ namespace PhotovoltaicThermalCollectors { return NodeNum; } - int GetAirOutletNodeNum(std::string const &PVTName, - bool &ErrorsFound - ) + int GetAirOutletNodeNum(std::string const &PVTName, bool &ErrorsFound) { // FUNCTION INFORMATION: // AUTHOR Lixing Gu @@ -1140,6 +1137,34 @@ namespace PhotovoltaicThermalCollectors { return NodeNum; } + int getPVTindexFromName(std::string const &objectName) + { + if (GetInputFlag) { + GetPVTcollectorsInput(); + GetInputFlag = false; + } + + for (auto it = PVT.begin(); it != PVT.end(); ++it) { + if (it->Name == objectName) { + return static_cast (std::distance(PVT.begin(), it) + 1); + } + } + + // If we didn't find it, fatal + ShowFatalError("Solar Thermal Collector GetIndexFromName: Error getting inputs for object named: " + objectName); + assert(false); + return 0; // Shutup compiler + } + + void simPVTfromOASys(int const index, bool const FirstHVACIteration) + { + PlantLocation dummyLoc(0, 0, 0, 0); + Real64 dummyCurLoad(0.0); + bool dummyRunFlag(true); + + PVT(index).simulate(dummyLoc, FirstHVACIteration, dummyCurLoad, dummyRunFlag); + } + } // namespace PhotovoltaicThermalCollectors } // namespace EnergyPlus diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index cfb4adc670e..80ee6456f93 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -74,18 +74,18 @@ namespace PhotovoltaicThermalCollectors { { // Members std::string Name; - Real64 ThermalActiveFract; // fraction of surface area with active thermal collection - ThermEfficEnum ThermEfficMode; // setting for how therm effic is determined - Real64 ThermEffic; // fixed or current Therm efficiency - int ThermEffSchedNum; // pointer to schedule for therm effic (if any) - Real64 SurfEmissivity; // surface emittance in long wave IR - Real64 LastCollectorTemp; // store previous temperature - Real64 CollectorTemp; // average solar collector temp. + Real64 ThermalActiveFract; // fraction of surface area with active thermal collection + ThermEfficEnum ThermEfficMode; // setting for how therm effic is determined + Real64 ThermEffic; // fixed or current Therm efficiency + int ThermEffSchedNum; // pointer to schedule for therm effic (if any) + Real64 SurfEmissivity; // surface emittance in long wave IR + Real64 LastCollectorTemp; // store previous temperature + Real64 CollectorTemp; // average solar collector temp. // Default Constructor SimplePVTModelStruct() - : ThermalActiveFract(0.0), ThermEfficMode(ThermEfficEnum::FIXED), ThermEffic(0.0), ThermEffSchedNum(0), SurfEmissivity(0.0), LastCollectorTemp(0.0), - CollectorTemp(0.0) + : ThermalActiveFract(0.0), ThermEfficMode(ThermEfficEnum::FIXED), ThermEffic(0.0), ThermEffSchedNum(0), SurfEmissivity(0.0), + LastCollectorTemp(0.0), CollectorTemp(0.0) { } }; @@ -114,20 +114,20 @@ namespace PhotovoltaicThermalCollectors { struct PVTCollectorStruct : PlantComponent { // Members - std::string Name; // Name of PVT collector - int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant - int WLoopNum; // Water plant loop index number - int WLoopSideNum; // Water plant loop side index - int WLoopBranchNum; // Water plant loop branch index - int WLoopCompNum; // Water plant loop component index - bool EnvrnInit; // manage begin environment inits - bool SizingInit; // manage when sizing is complete - std::string PVTModelName; // Name of PVT performance object - int PVTModelType; // model type indicator, only simple avail now - int SurfNum; // surface index - std::string PVname; // named Generator:Photovoltaic object - int PVnum; // PV index - bool PVfound; // init, need to delay get input until PV gotten + std::string Name; // Name of PVT collector + int TypeNum; // Plant Side Connection: 'TypeOf_Num' assigned in DataPlant + int WLoopNum; // Water plant loop index number + int WLoopSideNum; // Water plant loop side index + int WLoopBranchNum; // Water plant loop branch index + int WLoopCompNum; // Water plant loop component index + bool EnvrnInit; // manage begin environment inits + bool SizingInit; // manage when sizing is complete + std::string PVTModelName; // Name of PVT performance object + int PVTModelType; // model type indicator, only simple avail now + int SurfNum; // surface index + std::string PVname; // named Generator:Photovoltaic object + int PVnum; // PV index + bool PVfound; // init, need to delay get input until PV gotten SimplePVTModelStruct Simple; // performance data structure. WorkingFluidEnum WorkingFluidType; int PlantInletNodeNum; @@ -149,11 +149,11 @@ namespace PhotovoltaicThermalCollectors { // Default Constructor PVTCollectorStruct() - : TypeNum(0), WLoopNum(0), WLoopSideNum(0), WLoopBranchNum(0), WLoopCompNum(0), EnvrnInit(true), SizingInit(true), PVTModelType(0), SurfNum(0), - PVnum(0), PVfound(false), WorkingFluidType(WorkingFluidEnum::LIQUID), PlantInletNodeNum(0), PlantOutletNodeNum(0), HVACInletNodeNum(0), HVACOutletNodeNum(0), - DesignVolFlowRate(0.0), DesignVolFlowRateWasAutoSized(false), MaxMassFlowRate(0.0), MassFlowRate(0.0), AreaCol(0.0), - BypassDamperOff(true), CoolingUseful(false), HeatingUseful(false), MySetPointCheckFlag(true), MyOneTimeFlag(true), - SetLoopIndexFlag(true) + : TypeNum(0), WLoopNum(0), WLoopSideNum(0), WLoopBranchNum(0), WLoopCompNum(0), EnvrnInit(true), SizingInit(true), PVTModelType(0), + SurfNum(0), PVnum(0), PVfound(false), WorkingFluidType(WorkingFluidEnum::LIQUID), PlantInletNodeNum(0), PlantOutletNodeNum(0), + HVACInletNodeNum(0), HVACOutletNodeNum(0), DesignVolFlowRate(0.0), DesignVolFlowRateWasAutoSized(false), MaxMassFlowRate(0.0), + MassFlowRate(0.0), AreaCol(0.0), BypassDamperOff(true), CoolingUseful(false), HeatingUseful(false), MySetPointCheckFlag(true), + MyOneTimeFlag(true), SetLoopIndexFlag(true) { } @@ -174,7 +174,6 @@ namespace PhotovoltaicThermalCollectors { void calculate(); void update(); - }; extern Array1D PVT; @@ -183,6 +182,10 @@ namespace PhotovoltaicThermalCollectors { void GetPVTcollectorsInput(); + void simPVTfromOASys(int index, bool FirstHVACIteration); + + int getPVTindexFromName(std::string const &name); + void GetPVTThermalPowerProduction(int PVindex, Real64 &ThermalPower, Real64 &ThermalEnergy); int GetAirInletNodeNum(std::string const &PVTName, bool &ErrorsFound); From 41ffe358c1c9fa27833d95b9465e4460395ad937 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 12 Dec 2019 16:30:39 -0700 Subject: [PATCH 37/86] apply style --- .../PhotovoltaicThermalCollectors.cc | 266 +++++++++--------- 1 file changed, 140 insertions(+), 126 deletions(-) diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index b91ae05e454..2807fe7bdb9 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -72,8 +72,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -108,7 +108,7 @@ namespace PhotovoltaicThermalCollectors { static bool GetInputFlag(true); // First time, input is "gotten" - int NumPVT(0); // count of all types of PVT in input file + int NumPVT(0); // count of all types of PVT in input file Array1D PVT; @@ -145,9 +145,9 @@ namespace PhotovoltaicThermalCollectors { } void PVTCollectorStruct::simulate(const PlantLocation &EP_UNUSED(calledFromLocation), - bool const FirstHVACIteration, - Real64 &EP_UNUSED(CurLoad), - bool const EP_UNUSED(RunFlag)) + bool const FirstHVACIteration, + Real64 &EP_UNUSED(CurLoad), + bool const EP_UNUSED(RunFlag)) { this->initialize(FirstHVACIteration); @@ -168,11 +168,11 @@ namespace PhotovoltaicThermalCollectors { // PURPOSE OF THIS SUBROUTINE: // Get input for PVT objects - int Item; // Item to be "gotten" - int NumAlphas; // Number of Alphas for each GetObjectItem call - int NumNumbers; // Number of Numbers for each GetObjectItem call - int IOStatus; // Used in GetObjectItem - bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine + int Item; // Item to be "gotten" + int NumAlphas; // Number of Alphas for each GetObjectItem call + int NumNumbers; // Number of Numbers for each GetObjectItem call + int IOStatus; // Used in GetObjectItem + bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine // Object Data Array1D tmpSimplePVTperf; @@ -267,7 +267,8 @@ namespace PhotovoltaicThermalCollectors { ShowWarningError("Suspected input problem with " + DataIPShortCuts::cAlphaFieldNames(2) + " = " + DataIPShortCuts::cAlphaArgs(2)); ShowContinueError("Entered in " + DataIPShortCuts::cCurrentModuleObject + " = " + DataIPShortCuts::cAlphaArgs(1)); ShowContinueError("Surface used for solar collector faces down"); - ShowContinueError("Surface tilt angle (degrees from ground outward normal) = " + General::RoundSigDigits(DataSurfaces::Surface(PVT(Item).SurfNum).Tilt, 2)); + ShowContinueError("Surface tilt angle (degrees from ground outward normal) = " + + General::RoundSigDigits(DataSurfaces::Surface(PVT(Item).SurfNum).Tilt, 2)); } } // check surface @@ -325,23 +326,55 @@ namespace PhotovoltaicThermalCollectors { } if (PVT(Item).WorkingFluidType == WorkingFluidEnum::LIQUID) { - PVT(Item).PlantInletNodeNum = NodeInputManager::GetOnlySingleNode( - DataIPShortCuts::cAlphaArgs(6), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); - PVT(Item).PlantOutletNodeNum = NodeInputManager::GetOnlySingleNode( - DataIPShortCuts::cAlphaArgs(7), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); - - BranchNodeConnections::TestCompSet(DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cAlphaArgs(6), DataIPShortCuts::cAlphaArgs(7), "Water Nodes"); + PVT(Item).PlantInletNodeNum = NodeInputManager::GetOnlySingleNode(DataIPShortCuts::cAlphaArgs(6), + ErrorsFound, + DataIPShortCuts::cCurrentModuleObject, + DataIPShortCuts::cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); + PVT(Item).PlantOutletNodeNum = NodeInputManager::GetOnlySingleNode(DataIPShortCuts::cAlphaArgs(7), + ErrorsFound, + DataIPShortCuts::cCurrentModuleObject, + DataIPShortCuts::cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); + + BranchNodeConnections::TestCompSet(DataIPShortCuts::cCurrentModuleObject, + DataIPShortCuts::cAlphaArgs(1), + DataIPShortCuts::cAlphaArgs(6), + DataIPShortCuts::cAlphaArgs(7), + "Water Nodes"); PVT(Item).WLoopSideNum = DataPlant::DemandSupply_No; } if (PVT(Item).WorkingFluidType == WorkingFluidEnum::AIR) { - PVT(Item).HVACInletNodeNum = NodeInputManager::GetOnlySingleNode( - DataIPShortCuts::cAlphaArgs(8), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); - PVT(Item).HVACOutletNodeNum = NodeInputManager::GetOnlySingleNode( - DataIPShortCuts::cAlphaArgs(9), ErrorsFound, DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataLoopNode::NodeType_Air, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); - - BranchNodeConnections::TestCompSet(DataIPShortCuts::cCurrentModuleObject, DataIPShortCuts::cAlphaArgs(1), DataIPShortCuts::cAlphaArgs(8), DataIPShortCuts::cAlphaArgs(9), "Air Nodes"); + PVT(Item).HVACInletNodeNum = NodeInputManager::GetOnlySingleNode(DataIPShortCuts::cAlphaArgs(8), + ErrorsFound, + DataIPShortCuts::cCurrentModuleObject, + DataIPShortCuts::cAlphaArgs(1), + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); + PVT(Item).HVACOutletNodeNum = NodeInputManager::GetOnlySingleNode(DataIPShortCuts::cAlphaArgs(9), + ErrorsFound, + DataIPShortCuts::cCurrentModuleObject, + DataIPShortCuts::cAlphaArgs(1), + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); + + BranchNodeConnections::TestCompSet(DataIPShortCuts::cCurrentModuleObject, + DataIPShortCuts::cAlphaArgs(1), + DataIPShortCuts::cAlphaArgs(8), + DataIPShortCuts::cAlphaArgs(9), + "Air Nodes"); } PVT(Item).DesignVolFlowRate = DataIPShortCuts::rNumericArgs(1); @@ -397,34 +430,18 @@ namespace PhotovoltaicThermalCollectors { _, "System"); - SetupOutputVariable("Generator PVT Fluid Bypass Status", - OutputProcessor::Unit::None, - this->Report.BypassStatus, - "System", - "Average", - this->Name); + SetupOutputVariable( + "Generator PVT Fluid Bypass Status", OutputProcessor::Unit::None, this->Report.BypassStatus, "System", "Average", this->Name); } - SetupOutputVariable("Generator PVT Fluid Inlet Temperature", - OutputProcessor::Unit::C, - this->Report.TinletWorkFluid, - "System", - "Average", - this->Name); - - SetupOutputVariable("Generator PVT Fluid Outlet Temperature", - OutputProcessor::Unit::C, - this->Report.ToutletWorkFluid, - "System", - "Average", - this->Name); - - SetupOutputVariable("Generator PVT Fluid Mass Flow Rate", - OutputProcessor::Unit::kg_s, - this->Report.MdotWorkFluid, - "System", - "Average", - this->Name); + SetupOutputVariable( + "Generator PVT Fluid Inlet Temperature", OutputProcessor::Unit::C, this->Report.TinletWorkFluid, "System", "Average", this->Name); + + SetupOutputVariable( + "Generator PVT Fluid Outlet Temperature", OutputProcessor::Unit::C, this->Report.ToutletWorkFluid, "System", "Average", this->Name); + + SetupOutputVariable( + "Generator PVT Fluid Mass Flow Rate", OutputProcessor::Unit::kg_s, this->Report.MdotWorkFluid, "System", "Average", this->Name); } void PVTCollectorStruct::initialize(bool const FirstHVACIteration) @@ -450,18 +467,8 @@ namespace PhotovoltaicThermalCollectors { if (this->SetLoopIndexFlag) { if (allocated(DataPlant::PlantLoop) && (this->PlantInletNodeNum > 0)) { bool errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(this->Name, - this->TypeNum, - this->WLoopNum, - this->WLoopSideNum, - this->WLoopBranchNum, - this->WLoopCompNum, - errFlag, - _, - _, - _, - _, - _); + PlantUtilities::ScanPlantLoopsForObject( + this->Name, this->TypeNum, this->WLoopNum, this->WLoopSideNum, this->WLoopBranchNum, this->WLoopCompNum, errFlag, _, _, _, _, _); if (errFlag) { ShowFatalError("InitPVTcollectors: Program terminated for previous conditions."); } @@ -497,7 +504,8 @@ namespace PhotovoltaicThermalCollectors { DataHVACGlobals::SetPointErrorFlag = true; } else { // need call to EMS to check node - EMSManager::CheckIfNodeSetPointManagedByEMS(PVT(PVTindex).HVACOutletNodeNum, EMSManager::iTemperatureSetPoint, DataHVACGlobals::SetPointErrorFlag); + EMSManager::CheckIfNodeSetPointManagedByEMS( + PVT(PVTindex).HVACOutletNodeNum, EMSManager::iTemperatureSetPoint, DataHVACGlobals::SetPointErrorFlag); if (DataHVACGlobals::SetPointErrorFlag) { ShowSevereError("Missing temperature setpoint for PVT outlet node "); ShowContinueError("Add a setpoint manager to outlet node of PVT named " + PVT(PVTindex).Name); @@ -554,20 +562,20 @@ namespace PhotovoltaicThermalCollectors { if (SELECT_CASE_var == WorkingFluidEnum::LIQUID) { Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->WLoopNum).FluidName, - DataGlobals::HWInitConvTemp, - DataPlant::PlantLoop(this->WLoopNum).FluidIndex, - RoutineName); + DataGlobals::HWInitConvTemp, + DataPlant::PlantLoop(this->WLoopNum).FluidIndex, + RoutineName); this->MaxMassFlowRate = this->DesignVolFlowRate * rho; PlantUtilities::InitComponentNodes(0.0, - this->MaxMassFlowRate, - InletNode, - OutletNode, - this->WLoopNum, - this->WLoopSideNum, - this->WLoopBranchNum, - this->WLoopCompNum); + this->MaxMassFlowRate, + InletNode, + OutletNode, + this->WLoopNum, + this->WLoopSideNum, + this->WLoopBranchNum, + this->WLoopCompNum); this->Simple.LastCollectorTemp = 23.0; @@ -591,13 +599,8 @@ namespace PhotovoltaicThermalCollectors { this->MassFlowRate = 0.0; } - PlantUtilities::SetComponentFlowRate(this->MassFlowRate, - InletNode, - OutletNode, - this->WLoopNum, - this->WLoopSideNum, - this->WLoopBranchNum, - this->WLoopCompNum); + PlantUtilities::SetComponentFlowRate( + this->MassFlowRate, InletNode, OutletNode, this->WLoopNum, this->WLoopSideNum, this->WLoopBranchNum, this->WLoopCompNum); } else if (SELECT_CASE_var == WorkingFluidEnum::AIR) { this->MassFlowRate = DataLoopNode::Node(InletNode).MassFlowRate; } @@ -620,7 +623,7 @@ namespace PhotovoltaicThermalCollectors { // METHODOLOGY EMPLOYED: // Obtains hot water flow rate from the plant sizing array. - bool SizingDesRunThisAirSys; // true if a particular air system had a Sizing:System object and system sizing done + bool SizingDesRunThisAirSys; // true if a particular air system had a Sizing:System object and system sizing done // Indicator to hardsize and no sizing run bool HardSizeNoDesRun = !(DataSizing::SysSizingRunDone || DataSizing::ZoneSizingRunDone); @@ -631,8 +634,8 @@ namespace PhotovoltaicThermalCollectors { SizingDesRunThisAirSys = false; } - Real64 DesignVolFlowRateDes = 0.0; // Autosize design volume flow for reporting - int PltSizNum = 0; // Plant Sizing index corresponding to CurLoopNum + Real64 DesignVolFlowRateDes = 0.0; // Autosize design volume flow for reporting + int PltSizNum = 0; // Plant Sizing index corresponding to CurLoopNum bool ErrorsFound = false; if (this->WorkingFluidType == WorkingFluidEnum::LIQUID) { @@ -660,9 +663,9 @@ namespace PhotovoltaicThermalCollectors { } else { // Hardsized if (DataPlant::PlantFinalSizesOkayToReport && this->DesignVolFlowRate > 0.0) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "User-Specified Design Flow Rate [m3/s]", - this->DesignVolFlowRate); + this->Name, + "User-Specified Design Flow Rate [m3/s]", + this->DesignVolFlowRate); } } } @@ -672,16 +675,14 @@ namespace PhotovoltaicThermalCollectors { if (this->DesignVolFlowRateWasAutoSized) { this->DesignVolFlowRate = DesignVolFlowRateDes; if (DataPlant::PlantFinalSizesOkayToReport) { - ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "Design Size Design Flow Rate [m3/s]", - DesignVolFlowRateDes); + ReportSizingManager::ReportSizingOutput( + "SolarCollector:FlatPlate:PhotovoltaicThermal", this->Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "Initial Design Size Design Flow Rate [m3/s]", - DesignVolFlowRateDes); + this->Name, + "Initial Design Size Design Flow Rate [m3/s]", + DesignVolFlowRateDes); } PlantUtilities::RegisterPlantCompDesignFlow(this->PlantInletNodeNum, this->DesignVolFlowRate); @@ -689,16 +690,18 @@ namespace PhotovoltaicThermalCollectors { if (this->DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0 && DataPlant::PlantFinalSizesOkayToReport) { Real64 DesignVolFlowRateUser = this->DesignVolFlowRate; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "Design Size Design Flow Rate [m3/s]", - DesignVolFlowRateDes, - "User-Specified Design Flow Rate [m3/s]", - DesignVolFlowRateUser); + this->Name, + "Design Size Design Flow Rate [m3/s]", + DesignVolFlowRateDes, + "User-Specified Design Flow Rate [m3/s]", + DesignVolFlowRateUser); if (DataGlobals::DisplayExtraWarnings) { - if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > DataSizing::AutoVsHardSizingThreshold) { + if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > + DataSizing::AutoVsHardSizingThreshold) { ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + this->Name); ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); - ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); + ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + + " [W]"); ShowContinueError("This may, or may not, indicate mismatched component sizes."); ShowContinueError("Verify that the value entered is intended and is consistent with other components."); } @@ -714,9 +717,9 @@ namespace PhotovoltaicThermalCollectors { HardSizeNoDesRun = true; if (this->DesignVolFlowRate > 0.0) { ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "User-Specified Design Flow Rate [m3/s]", - this->DesignVolFlowRate); + this->Name, + "User-Specified Design Flow Rate [m3/s]", + this->DesignVolFlowRate); } } else { CheckSysSizing("SolarCollector:FlatPlate:PhotovoltaicThermal", this->Name); @@ -726,9 +729,11 @@ namespace PhotovoltaicThermalCollectors { { auto const SELECT_CASE_var(DataSizing::CurDuctType); if (SELECT_CASE_var == DataHVACGlobals::Main) { - DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * + DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesMainVolFlow; } else if (SELECT_CASE_var == DataHVACGlobals::Cooling) { - DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesCoolVolFlow; + DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).SysAirMinFlowRat * + DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesCoolVolFlow; } else if (SELECT_CASE_var == DataHVACGlobals::Heating) { DesignVolFlowRateDes = DataSizing::FinalSysSizing(DataSizing::CurSysNum).DesHeatVolFlow; } else { @@ -742,26 +747,26 @@ namespace PhotovoltaicThermalCollectors { if (!HardSizeNoDesRun) { if (this->DesignVolFlowRateWasAutoSized) { this->DesignVolFlowRate = DesignVolFlowRateDes; - ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "Design Size Design Flow Rate [m3/s]", - DesignVolFlowRateDes); + ReportSizingManager::ReportSizingOutput( + "SolarCollector:FlatPlate:PhotovoltaicThermal", this->Name, "Design Size Design Flow Rate [m3/s]", DesignVolFlowRateDes); this->SizingInit = false; } else { if (this->DesignVolFlowRate > 0.0 && DesignVolFlowRateDes > 0.0) { Real64 DesignVolFlowRateUser = this->DesignVolFlowRate; ReportSizingManager::ReportSizingOutput("SolarCollector:FlatPlate:PhotovoltaicThermal", - this->Name, - "Design Size Design Flow Rate [m3/s]", - DesignVolFlowRateDes, - "User-Specified Design Flow Rate [m3/s]", - DesignVolFlowRateUser); + this->Name, + "Design Size Design Flow Rate [m3/s]", + DesignVolFlowRateDes, + "User-Specified Design Flow Rate [m3/s]", + DesignVolFlowRateUser); if (DataGlobals::DisplayExtraWarnings) { - if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > DataSizing::AutoVsHardSizingThreshold) { + if ((std::abs(DesignVolFlowRateDes - DesignVolFlowRateUser) / DesignVolFlowRateUser) > + DataSizing::AutoVsHardSizingThreshold) { ShowMessage("SizeSolarCollector: Potential issue with equipment sizing for " + this->Name); - ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); - ShowContinueError("differs from Design Size Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateDes, 5) + + ShowContinueError("User-Specified Design Flow Rate of " + General::RoundSigDigits(DesignVolFlowRateUser, 5) + " [W]"); + ShowContinueError("differs from Design Size Design Flow Rate of " + + General::RoundSigDigits(DesignVolFlowRateDes, 5) + " [W]"); ShowContinueError("This may, or may not, indicate mismatched component sizes."); ShowContinueError("Verify that the value entered is intended and is consistent with other components."); } @@ -942,8 +947,15 @@ namespace PhotovoltaicThermalCollectors { Real64 HcExt(0.0); Real64 HrSky(0.0); - ConvectionCoefficients::InitExteriorConvectionCoeff( - this->SurfNum, 0.0, DataHeatBalance::VerySmooth, this->Simple.SurfEmissivity, this->Simple.LastCollectorTemp, HcExt, HrSky, HrGround, HrAir); + ConvectionCoefficients::InitExteriorConvectionCoeff(this->SurfNum, + 0.0, + DataHeatBalance::VerySmooth, + this->Simple.SurfEmissivity, + this->Simple.LastCollectorTemp, + HcExt, + HrSky, + HrGround, + HrAir); Real64 WetBulbInlet(0.0); Real64 DewPointInlet(0.0); @@ -958,10 +970,11 @@ namespace PhotovoltaicThermalCollectors { CpInlet = Psychrometrics::CPHW(Tinlet); } - Real64 Tcollector = (2.0 * mdot * CpInlet * Tinlet + - this->AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + HrAir * DataSurfaces::Surface(this->SurfNum).OutDryBulbTemp + - HcExt * DataSurfaces::Surface(this->SurfNum).OutDryBulbTemp)) / - (2.0 * mdot * CpInlet + this->AreaCol * (HrGround + HrSky + HrAir + HcExt)); + Real64 Tcollector = + (2.0 * mdot * CpInlet * Tinlet + this->AreaCol * (HrGround * DataEnvironment::OutDryBulbTemp + HrSky * DataEnvironment::SkyTemp + + HrAir * DataSurfaces::Surface(this->SurfNum).OutDryBulbTemp + + HcExt * DataSurfaces::Surface(this->SurfNum).OutDryBulbTemp)) / + (2.0 * mdot * CpInlet + this->AreaCol * (HrGround + HrSky + HrAir + HcExt)); PotentialOutletTemp = 2.0 * Tcollector - Tinlet; this->Report.ToutletWorkFluid = PotentialOutletTemp; @@ -1041,7 +1054,8 @@ namespace PhotovoltaicThermalCollectors { // Set outlet node variables that are possibly changed DataLoopNode::Node(OutletNode).Temp = this->Report.ToutletWorkFluid; DataLoopNode::Node(OutletNode).HumRat = DataLoopNode::Node(InletNode).HumRat; // assumes dewpoint bound on cooling .... - DataLoopNode::Node(OutletNode).Enthalpy = Psychrometrics::PsyHFnTdbW(this->Report.ToutletWorkFluid, DataLoopNode::Node(OutletNode).HumRat); + DataLoopNode::Node(OutletNode).Enthalpy = + Psychrometrics::PsyHFnTdbW(this->Report.ToutletWorkFluid, DataLoopNode::Node(OutletNode).HumRat); } } } @@ -1074,7 +1088,7 @@ namespace PhotovoltaicThermalCollectors { } } - int GetAirInletNodeNum(std::string const &PVTName, bool &ErrorsFound) + int GetAirInletNodeNum(std::string const &PVTName, bool &ErrorsFound) { // FUNCTION INFORMATION: // AUTHOR Lixing Gu @@ -1146,14 +1160,14 @@ namespace PhotovoltaicThermalCollectors { for (auto it = PVT.begin(); it != PVT.end(); ++it) { if (it->Name == objectName) { - return static_cast (std::distance(PVT.begin(), it) + 1); + return static_cast(std::distance(PVT.begin(), it) + 1); } } // If we didn't find it, fatal ShowFatalError("Solar Thermal Collector GetIndexFromName: Error getting inputs for object named: " + objectName); assert(false); - return 0; // Shutup compiler + return 0; // Shutup compiler } void simPVTfromOASys(int const index, bool const FirstHVACIteration) From 07b0074fca6c9b4ce391edb48a63c28dc630931a Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 10:59:28 -0700 Subject: [PATCH 38/86] step 1 - cleanup comments --- src/EnergyPlus/RefrigeratedCase.cc | 546 ----------------------------- src/EnergyPlus/RefrigeratedCase.hh | 100 ------ 2 files changed, 646 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index cac6a8794e7..7b588728b7a 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -195,13 +195,6 @@ namespace RefrigeratedCase { // REFERENCES: // Specific references are provided for the equipment simulation subroutines below. - // OTHER NOTES: - // na - - // USE STATEMENTS: - - // Using/Aliasing - using namespace DataPrecisionGlobals; using DataHeatBalance::HeatReclaimRefrigCondenser; using DataHeatBalance::HeatReclaimRefrigeratedRack; using DataHeatBalance::NumRefrigChillerSets; @@ -225,8 +218,6 @@ namespace RefrigeratedCase { using namespace DataEnvironment; using namespace FluidProperties; - // Data - // MODULE PARAMETER DEFINITIONS: static std::string const BlankString; // Anti-sweat heater control type @@ -248,11 +239,6 @@ namespace RefrigeratedCase { // Refrigerated display case rack heat rejection location int const LocationOutdoors(1); int const LocationZone(2); - // Condenser cooling type -- See DataHeatBalance - RefrigxxxTypexxx - // INTEGER, PARAMETER :: CondenserCoolingAir = 1 - // INTEGER, PARAMETER :: CondenserCoolingEvap = 2 - // INTEGER, PARAMETER :: CondenserCoolingWater = 3 - // INTEGER, PARAMETER :: CondenserCascade = 4 // Air- and evap-cooled condenser fan speed control types int const FanVariableSpeed(1); int const FanConstantSpeedLinear(2); @@ -300,9 +286,6 @@ namespace RefrigeratedCase { int const RatedReturnGasTemperature(2); int const RatedSubcooling(1); int const RatedLiquidTemperature(2); - // System service types (applies to system, cascade condenser, and secondary loops) - // INTEGER, PARAMETER :: SupermarketService =1 - // INTEGER, PARAMETER :: WarehouseService =2 // Warehouse coil Defrost type int const DefrostFluid(1); int const DefrostElec(2); @@ -362,10 +345,6 @@ namespace RefrigeratedCase { Array1D const EuropeanEvapTemp(5, {0.0, -8.0, -25.0, -31.0, -40.0}); Array1D const EuropeanDT1(5, {10.0, 8.0, 7.0, 7.0, 6.0}); - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: - int NumSimulationCondAir(0); // Number of air-cooled condensers in simulation int NumSimulationCondEvap(0); // Number of evaporative condensers in simulation int NumSimulationCondWater(0); // Number of water-cooled condensers in simulation @@ -464,7 +443,6 @@ namespace RefrigeratedCase { // refrigerated cases or walkins exist in the input deck bool HaveChillers(true); // Is initialized as TRUE and remains true when // chillers exist in the input deck - // SUBROUTINE SPECIFICATIONS FOR MODULE RefrigeratedCase: // Object Data Array1D RefrigCase; @@ -487,8 +465,6 @@ namespace RefrigeratedCase { Array1D CoilSysCredit; Array1D CaseWIZoneReport; - // Functions - void clear_state() { UniqueCondenserNames.clear(); @@ -518,26 +494,8 @@ namespace RefrigeratedCase { // Inter-system heat transfer via subcoolers and cascade condensers can be accomodated. // Secondary refrigeration cycles are also available. - // REFERENCES: - // na - - // Using/Aliasing using General::RoundSigDigits; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - int RackNum; // Index to the refrigerated compressor rack being modeled static bool MyOneTimeFlag(true); // flag to skip first pass on next begin environment flag @@ -597,7 +555,6 @@ namespace RefrigeratedCase { // METHODOLOGY EMPLOYED: // GetObjectItem is called to read refrigerated case information - // Using/Aliasing using BranchNodeConnections::TestCompSet; using CurveManager::CurveValue; using CurveManager::GetCurveIndex; @@ -618,16 +575,12 @@ namespace RefrigeratedCase { using Psychrometrics::PsyWFnTdbRhPb; using WaterManager::SetupTankDemandComponent; - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const TrackMessage("from refrigerated case"); static std::string const RoutineName("GetRefrigerationInput: "); static std::string const TrackMessageAlt("GetInput in RefrigeratedCase"); static std::string const RoutineNameNoColon("GetRefrigerationInput"); int const AlwaysOn(-1); // -1 pointer sent to schedule manager returns a value of 1.0 - // unused INTEGER, Parameter :: InputTypeSecond = 1 ! Indicator that flow used to specify capacity of secondary heat exchanger - // unused INTEGER, Parameter :: InputTypeFirst = 2 ! Indicator that capacity of secondary heat exchanger is input directly - // unused INTEGER, Parameter :: InputTypeBoth = 3 ! Indicator that capacity of secondary heat exchanger is // input in both watts and flow rate int const NumWIAlphaFieldsBeforeZoneInput(9); // Used to cycle through zones on input for walk in coolers int const NumWIAlphaFieldsPerZone(4); // Used to cycle through zones on input for walk in coolers @@ -642,9 +595,6 @@ namespace RefrigeratedCase { Real64 const SecondsPerHour(3600.0); Real64 const DefaultCascadeCondApproach(3.0); // Cascade condenser approach temperature difference (deltaC) Real64 const DefaultCircRate(2.5); // Phase change liquid overfeed circulating rate (ASHRAE definition) - // unused REAL(r64), PARAMETER :: DefaultVarSpdCoeffA = 0.9d0 !Variable speed pump power curve coefficients based - // unused REAL(r64), PARAMETER :: DefaultVarSpdCoeffB = -0.1d0 ! upon paper by John Bittner of Hill Phoenix - // unused REAL(r64), PARAMETER :: DefaultVarSpdCoeffC = 0.2d0 ! A is cube term, B square term, C linear term Real64 const DefaultWISurfaceUValue(0.3154); // equiv R18 in Archaic American units (W/m2-delta T) Real64 const DefaultWIUValueGlassDr(1.136); // equiv R5 in Archaic American units (W/m2-delta T) Real64 const DefaultWIUValueStockDr(0.3785); // equiv R15 in Archaic American units (W/m2-delta T) @@ -652,9 +602,7 @@ namespace RefrigeratedCase { Real64 const DefaultWIHeightStockDr(3.0); // stock door height in walk-in cooler (m) Real64 const PumpImpellerEfficiency(0.78); // same as used in pump auto-sizing, dimensionless Real64 const PumpMotorEfficiency(0.85); // suggested as average value in ITT/Gould pump references, - // dimensionless - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Array1D_string Alphas; // Alpha items for object Array1D_string cAlphaFieldNames; // Alpha field names (from input processor) Array1D_string cNumericFieldNames; // Numeric field names (from input processor) @@ -670,7 +618,6 @@ namespace RefrigeratedCase { static int AlphaNum(0); // Used to cycle through input static int AlphaStartList(0); static int AStart(0); // Used to cycle through zones on input for walk in coolers - // INTEGER :: CascadeCondenserID= 0 ! Used to match load on system to Condenser absolute index static int CascadeLoadNum(0); // counters while associating cascade loads with systems static int CascadeLoadIndex(0); // Counters while inputting cascade loads static int CaseID(0); // ID of refrigerated case in rack @@ -687,7 +634,6 @@ namespace RefrigeratedCase { static int CondIndex(0); // Index of refrigeration condenser attached to a system static int CondNum(0); // Index of refrigeration condenser static int DefType(0); // Local value for case defrost type - // INTEGER :: FlowIndex = 0 ! Index of pump flow numeric field static int GCNum(0); // Index of refrigeration gas cooler static int HRNum(0); // Counter for hours in day static int IOStatus(0); // Used in GetObjectItem @@ -713,7 +659,6 @@ namespace RefrigeratedCase { static int MaxNumAlphasCase(0); // Maximum number of alphas for case object static int MaxNumAlphasCaseAndWalkInList(0); // Maximum number of alphas in CaseAndWalkInList static int MaxNumAlphasWalkIn(0); // Maximum number of alphas for walkin object - // INTEGER :: MaxNumAlphasWalkInList = 0 ! Maximum number of alphas for walkin list object static int MaxNumAlphasSecond(0); // Maximum number of alphas for air chiller object static int MaxNumNumbersAirChiller(0); // Maximum number of numbers for air chiller object static int MaxNumNumbersSecond(0); // Maximum number of numbers for secondary system object @@ -775,10 +720,7 @@ namespace RefrigeratedCase { static int SecondaryID(0); // Index of secondary loops static int SetID(0); // Index of refrigerated chilller SETS static int SecondaryNum(0); // Index of secondary loops - // INTEGER :: TransferLoadListIndex = 0 ! Index of TransferLoad lists - // INTEGER :: TransferLoadListID = 0 ! Index of TransferLoad lists static int TransferLoadListNum(0); // Index of TransferLoad lists - // INTEGER :: InputType = 0 ! Type of inlet, capcity in W or brine flow rate in m3/s static int SubcoolerNum(0); // Index of subcooler static int TSNum(0); // Counter for time steps in hour static int WalkInIndex(0); // Index of walk ins @@ -6474,9 +6416,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - //*************************************************************************************************** - void SetupReportInput() { // SUBROUTINE INFORMATION: @@ -6507,21 +6446,6 @@ namespace RefrigeratedCase { using DataHeatBalance::IntGainTypeOf_RefrigerationWalkIn; using DataHeatBalance::Zone; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // LOGICAL, SAVE :: MyBeginEnvrnFlag = .TRUE. - // INTEGER :: SystemID static int CaseNum(0); static int CoilNum(0); static int SecondNum(0); @@ -9064,26 +8988,9 @@ namespace RefrigeratedCase { // addition/subtraction to/from each accumulating variable. If the time step is repeated, // this most recent addition/subtraction is reversed before the rest of the refrigeration simulation begins. - // REFERENCES: - // na - - // Using/Aliasing using DataGlobals::AnyEnergyManagementSystemInModel; using DataHVACGlobals::SysTimeElapsed; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyBeginEnvrnFlag(true); static int SystemID(0); static int CaseID(0); @@ -9431,33 +9338,12 @@ namespace RefrigeratedCase { // do inits that should only occur when component model routines // are entered from plant, for water cooled Condensers and Refrigeration Racks - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataPlant::PlantLoop; using DataPlant::TypeOf_RefrigerationWaterCoolRack; using DataPlant::TypeOf_RefrigSystemWaterCondenser; using PlantUtilities::InitComponentNodes; using PlantUtilities::ScanPlantLoopsForObject; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("InitRefrigerationPlantConnections"); static bool MyBeginEnvrnFlag(true); static bool errFlag(false); @@ -9594,9 +9480,6 @@ namespace RefrigeratedCase { if (!BeginEnvrnFlag) MyBeginEnvrnFlag = true; } - //*************************************************************************************************** - //*************************************************************************************************** - void CalcRackSystem(int const RackNum) { @@ -9616,7 +9499,6 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - // Using/Aliasing using CurveManager::CurveValue; using DataEnvironment::OutBaroPress; using DataEnvironment::OutDryBulbTemp; @@ -9627,23 +9509,8 @@ namespace RefrigeratedCase { using Psychrometrics::PsyWFnTdbTwbPb; using Psychrometrics::RhoH2O; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CaseID; // Index to absolute case ID int CaseNum; // Index to refrigerated case attached to rack - // INTEGER :: SecondID ! Index to absolute secondary loop ID - // INTEGER :: SecondIndex ! Index to secondary loop attached to rack int WalkInID; // Index to absolute walk-in ID int WalkInIndex; // Index to walk-in attached to rack int NumCases; // Total number of refrigerated cases attached to rack @@ -9897,8 +9764,6 @@ namespace RefrigeratedCase { } // rack heat rejection to zone } - //*************************************************************************************************** - void ReportRackSystem(int const RackNum) { @@ -9911,29 +9776,9 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report compressor rack variables - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // Using/Aliasing using DataHVACGlobals::TimeStepSys; using DataWater::WaterStorage; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems static int DemandARRID(0); // Index to water tank Demand used for evap condenser on rack static int RackTankID(0); // Index to water tank used for evap condenser on rack @@ -9977,8 +9822,6 @@ namespace RefrigeratedCase { SumZoneImpacts(); } - //*************************************************************************************************** - void CalculateCase(int const CaseID) // Absolute pointer to refrigerated case { @@ -10016,27 +9859,14 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - // Using/Aliasing using CurveManager::CurveValue; using namespace DataLoopNode; using DataEnvironment::OutBaroPress; // , Month using Psychrometrics::PsyRhFnTdbWPb; using Psychrometrics::PsyTdpFnWPb; - // Locals static Real64 CaseRAFraction(0.0); // Fraction of case credits applied to return air - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static int ActualZoneNum(0); // Index to zone static int DefCapCurvePtr(0); static int DefrostEnergyCurveType(0); @@ -10509,7 +10339,6 @@ namespace RefrigeratedCase { // Called from SimPlantEquip in PlantLoopEquipment , previously was called from Non-Zone Equipment Manager // Flow is requested and the actual available flow is set. The outlet temperature is calculated. - // Using/Aliasing using DataPlant::PlantLoop; using DataPlant::TypeOf_RefrigerationWaterCoolRack; using DataPlant::TypeOf_RefrigSystemWaterCondenser; @@ -10518,7 +10347,6 @@ namespace RefrigeratedCase { using General::TrimSigDigits; using PlantUtilities::SetComponentFlowRate; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("SimRefrigCondenser"); static Real64 DeltaT(0.0); static Real64 InletTemp(0.0); @@ -10529,8 +10357,6 @@ namespace RefrigeratedCase { static Real64 VolFlowRate(0.0); static Real64 OutletTemp(0.0); static int FlowType(0); - // INTEGER :: HighFlowWarn = 0 - // INTEGER :: HighTempWarn = 0 static int NoFlowWarnIndex(0); static int HighFlowWarnIndex(0); static int HighInletWarnIndex(0); @@ -10599,15 +10425,6 @@ namespace RefrigeratedCase { } } - // this next block may not be necessary, should only get called from plant now. - // SELECT CASE (SysType) - // CASE (TypeOf_RefrigerationWaterCoolRack) - // IF(RefrigRack(Num)%CondenserType/=RefrigCondenserTypeWater) RETURN - // CASE (TypeOf_RefrigSystemWaterCondenser) - // IF(Condenser(Num)%CondenserType/=RefrigCondenserTypeWater) RETURN - // END SELECT - // Return if not water cooled condenser - if (InitLoopEquip) { InitRefrigeration(); InitRefrigerationPlantConnections(); @@ -10782,9 +10599,6 @@ namespace RefrigeratedCase { UpdateRefrigCondenser(Num, SysType); } - //*************************************************************************************************** - //*************************************************************************************************** - void UpdateRefrigCondenser(int const Num, int const SysType) { @@ -10797,21 +10611,11 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Updates the node variables with local variables. - // METHODOLOGY EMPLOYED: - // Standard EnergyPlus methodology. - - // Using/Aliasing using DataLoopNode::Node; using DataPlant::TypeOf_RefrigerationWaterCoolRack; using DataPlant::TypeOf_RefrigSystemWaterCondenser; using PlantUtilities::SafeCopyPlantNode; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - - // FLOW: { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { @@ -10837,9 +10641,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - //*************************************************************************************************** - void SimulateDetailedRefrigerationSystems() { @@ -10861,31 +10662,12 @@ namespace RefrigeratedCase { // The logical variable, UseSysTimeStep, determines whether we are evaluating only systems driven by // ZoneEquipmentManager on the system time step, or only system driven by HVACManager on the zone time step. - // REFERENCES: - // na - - // USE STATEMENTS: - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("SimulateDetailedRefrigerationSystems"); int SysNum; // Index to the detailed refrigerated system being modeled static bool DeRate(false); // If true, need to derate aircoils because load can't be met by system static bool FirstSCLoop(true); // Flag first time through multi-system loop used when mech subcoolers present static int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, - // don't loop static int LoopNum(0); // Index to overall repeat necessary for mechanical subcoolers static int SubcoolID(0); // Subcooler ID number static int SubcoolerIndex(0); // Subcooler ID number @@ -11323,25 +11105,6 @@ namespace RefrigeratedCase { // the load on the compressors. Iterations are used here to account for sharing of gas coolers // between independent refrigeration systems. - // REFERENCES: - // na - - // USE STATEMENTS: - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("SimulateDetailedTransRefrigSystems"); int SysNum; // Index to the detailed transcritical refrigeration system being modeled static bool FirstSCLoop(true); // Flag first time through multi-system loop used when mech subcoolers present @@ -11562,9 +11325,6 @@ namespace RefrigeratedCase { SumZoneImpacts(); } - //*************************************************************************************************** - //*************************************************************************************************** - void CalcDetailedSystem(int const SysNum) { @@ -11598,22 +11358,8 @@ namespace RefrigeratedCase { // A thesis submitted in partial fulfillment of the requirements for the degree of // Master of Science, University of Wisconsin-Madison, 1999 - // USE STATEMENTS: - // na - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: Real64 const ErrorTol(0.001); // Iterative solution tolerance - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int NumIter; bool NotBalanced; Real64 TCondStart; @@ -11661,9 +11407,6 @@ namespace RefrigeratedCase { } // error check } - //*************************************************************************************************** - //*************************************************************************************************** - void CalcDetailedTransSystem(int const SysNum) { @@ -11686,25 +11429,10 @@ namespace RefrigeratedCase { // calculated refrigerant mass flow through the receiver bypass converges, which typically // requires less than 5 iterations. - // REFERENCES: - // na - - // Using/Aliasing using General::RoundSigDigits; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: Real64 const ErrorTol(0.001); // Iterative solution tolerance - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int NumIter; // Iteration counter bool NotBalanced; // Flag to indicate convergence, based on system balance Real64 MassFlowStart; // Initial refrigerant mass flow through receiver bypass @@ -11736,9 +11464,6 @@ namespace RefrigeratedCase { } // error check } - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateCondensers(int const SysNum) { @@ -11776,7 +11501,6 @@ namespace RefrigeratedCase { // Lawrence Berkeley Laboratory and Resource Dynamics, Improving Fan Systrem Performance, // A Sourcebook for Industry, DOE/GO-102003-1294, April 2003 - // Using/Aliasing using CurveManager::CurveValue; using DataEnvironment::OutBaroPress; using DataEnvironment::OutDryBulbTemp; @@ -11791,20 +11515,9 @@ namespace RefrigeratedCase { using Psychrometrics::PsyWFnTdpPb; using Psychrometrics::RhoH2O; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: Real64 const BleedRateConstant(5.0E-10); // water purge rate for evaporative // condensers (m3/W-s) equal to 3 GPM per 100 tons (BAC Engineering Reference) - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CondID; // Condenser Number int CondCreditWarnIndex1; // Used to sum up warning count int CondCreditWarnIndex2; // Used to sum up warning count @@ -12204,25 +11917,8 @@ namespace RefrigeratedCase { // Part II: System modifications and comparisons of different solutions. International Journal of // Refrigeration 31: 525-534. - // Using/Aliasing using DataEnvironment::OutDryBulbTemp; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("RefrigeratedCase:CalcGasCooler"); int GasCoolerCreditWarnIndex; // Warning counter @@ -12398,12 +12094,8 @@ namespace RefrigeratedCase { // ARI Standard 540, 2004, Standard for Performance Rating of Positive Displacement Refrigerant // Comprssors and Compressor Units, Air-Conditionig & Refrigeration Institute,Arlington VA - // Using/Aliasing using CurveManager::CurveValue; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // SUBROUTINE PARAMETER DEFINITIONS: // Following constants approp for R22, R134a, R404a, R507, R410a, R407c, future allow input? // May want to allow input to reflect larger pipes selected to reduce delta P and increase compressor efficiency. @@ -12411,13 +12103,6 @@ namespace RefrigeratedCase { Real64 const DelTSuctPipes(1.0); // Tsat drop corresponding to P drop in suction pipes, ASHRAE 2006 p 2.4 (C) Real64 const DelTDischPipes(0.5); // Tsat drop corresponding to P drop in discharge pipes, ASHRAE 2006 p 2.5 (C) - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("RefrigeratedCase:CalculateCompressors"); int CompIndex; // Compressor index within system int CompID; // Compressor index within all compressors @@ -12773,12 +12458,7 @@ namespace RefrigeratedCase { // Part II: System modifications and comparisons of different solutions. International Journal of // Refrigeration 31: 525-534. - // Using/Aliasing using CurveManager::CurveValue; - // unused USE DataEnvironment, ONLY : OutDryBulbTemp - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: // SUBROUTINE PARAMETER DEFINITIONS: // Following constants approp for R22, R134a, R404a, R507, R410a, R407c. @@ -12789,13 +12469,6 @@ namespace RefrigeratedCase { // REAL(r64), PARAMETER ::DelTDischPipes = 0.5d0 ! Tsat drop corresponding to P drop in discharge pipes, ASHRAE 2006 p 2.5 (C) Real64 const ErrorTol(0.001); // Iterative solution tolerance - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("RefrigeratedCase:CalculateTransCompressors"); int CompIndex; // Compressor index within system int CompID; // Compressor index within all compressors @@ -13186,9 +12859,6 @@ namespace RefrigeratedCase { (TransSystem(SysNum).TotCompCapacityLP + TransSystem(SysNum).TotCompCapacityHP) * LocalTimeStep * SecInHour; } - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateSubcoolers(int const SysNum) { @@ -13209,22 +12879,8 @@ namespace RefrigeratedCase { // REFERENCES: // ASHRAE 1006 Section 2: Refrigeration Accessories - // Using/Aliasing using CurveManager::CurveValue; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("CalculateSubcoolers"); int SubcoolerIndex; // Counter through number of subcoolers on this system int SubcoolerID; // ID number for each unique subcooler @@ -13337,10 +12993,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - - //*************************************************************************************************** - void GetRefrigeratedRackIndex(std::string const &Name, int &IndexPtr, int const SysType, @@ -13408,30 +13060,9 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report information from the input deck for refrigerated cases and racks to the eio and err file. - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // Using/Aliasing using DataLoopNode::NodeID; using General::RoundSigDigits; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS - // na - - // DERIVED TYPE DEFINITIONS - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CascadeLoadID; int CascadeLoadNum; int CaseID; @@ -13458,7 +13089,6 @@ namespace RefrigeratedCase { std::string ChrOut; std::string ChrOut2; - // Formats static ObjexxFCL::gio::Fmt Format_101("(A)"); static ObjexxFCL::gio::Fmt Format_102("(4X,A)"); static ObjexxFCL::gio::Fmt Format_103("(2X,A)"); @@ -13516,21 +13146,6 @@ namespace RefrigeratedCase { static ObjexxFCL::gio::Fmt Format_160("('!',2x,',Gas Cooler Number, Gas Cooler Name, Rated Outlet Pressure " "(Pa),','Rated Outlet Temperature (C), Rated Approach Temperature (C), Rated Capacity (W), Rated Fan Power (W)')"); - // 111 FORMAT(',',1X,F6.3) ! compressor rack output line - // 112 FORMAT(',',1X,F16.0)! compressor output line - // 113 FORMAT(',',1X,F7.1,',',1X,F6.2,6(',',1X,F6.1)) !refrigerated case output line - // 135 FORMAT (6x,6(',',1X,F16.1),',',2x,I5) - // 136 FORMAT (6x,8(',',1X,F16.1)) - // 137 FORMAT (2x, 2(',',1X,F12.1))!condenser output - // 138 FORMAT (2x, 3(',',1X,F12.1))!condenser output - // 139 FORMAT (2x, 4(',',1X,F12.1))!condenser output - // 140 FORMAT(7(',',1X,F8.1),1X,',',I5) !walkin output line - // 143 FORMAT(',',1X,F8.1,',',1X,F8.4,2(1X,',',F8.2,',',1x,F8.2,',',1x,F8.4)) !walkin/zone output line - // 144 FORMAT(',',1X,F7.1) !mech subcooler output line - // 145 FORMAT(3(',',1X,F7.1)) !lshx output line - // 147 FORMAT(',',1X,F7.1,1X,2(',',F6.2),2(',',1X,F9.3)) !secondary system output line - // 150 FORMAT('! <#Refrigeration Air Chiller>,Number of Refrigeration Air Chillers') - // write all headers applicable to this simulation if (NumRefrigeratedRacks > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_109); // Intro to refrigeration case racks @@ -14052,7 +13667,6 @@ namespace RefrigeratedCase { // Gosney, W.B., Olama, G.A.-L., Heat and Enthalpy Gains through Cold Room Doorways, // Proceedings of the Institute of Refrigeration, vol. 72, pp 31-41, 1975 - // Using/Aliasing using CurveManager::CurveValue; using namespace DataLoopNode; using Psychrometrics::PsyHFnTdbRhPb; @@ -14065,23 +13679,11 @@ namespace RefrigeratedCase { using Psychrometrics::PsyWFnTdbH; using Psychrometrics::PsyWFnTdbTwbPb; using Psychrometrics::PsyWFnTdpPb; - // USE DataEnvironment, ONLY: OutBaroPress, OutDryBulbTemp using DataEnvironment::OutBaroPress; using General::CreateSysTimeIntervalString; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: Real64 const DefaultWalkInDoorOpenFactor(0.05); // walk in door open factor (fraction time open) - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static std::string const RoutineName("CalculateWalkIn"); static int ZoneNodeNum(0); // Zone node number static int ZoneNum(0); // Index to zone @@ -14524,7 +14126,6 @@ namespace RefrigeratedCase { // SCE report // others - // Using/Aliasing using CurveManager::CurveValue; using Psychrometrics::PsyHFnTdbRhPb; using Psychrometrics::PsyHFnTdbW; @@ -14533,21 +14134,9 @@ namespace RefrigeratedCase { using Psychrometrics::PsyTwbFnTdbWPb; using Psychrometrics::PsyWFnTdbTwbPb; using Psychrometrics::PsyWFnTdpPb; - // unused USE DataWater, ONLY: WaterStorage - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // SUBROUTINE PARAMETER DEFINITIONS: Real64 const ErrorTol(0.001); // Iterative solution tolerance - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: bool AtPartLoad; // Whether or not need to iterate on pump power bool DeRate; // If true, need to derate aircoils because don't carry over unmet energy int CaseID; // used in summing case loads on loop @@ -14837,22 +14426,6 @@ namespace RefrigeratedCase { // heat absorbed by suction piping, secondary loop distribution piping, and // secondary receiver shells - // REFERENCES: - - // USE STATEMENTS: - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static int ZoneNum(0); // used calculating total refrigeration interactions for zone if (UseSysTimeStep) { // air chillers @@ -14924,30 +14497,6 @@ namespace RefrigeratedCase { // Provides the structure to get Refrigeration input so that // it can be called from internally or outside the module. - // METHODOLOGY EMPLOYED: - // na - - // REFERENCES: - // na - - // USE STATEMENTS: - // na - - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // na - if (GetRefrigerationInputFlag) { GetRefrigerationInput(); @@ -14965,9 +14514,6 @@ namespace RefrigeratedCase { } // GetRefrigerationInputFlag } - //*************************************************************************************************** - //*************************************************************************************************** - void SimAirChillerSet(std::string const &AirChillerSetName, int const ZoneNum, bool const FirstHVACIteration, @@ -14989,13 +14535,11 @@ namespace RefrigeratedCase { // METHODOLOGY EMPLOYED: // Called from Zone Equipment Manager. - // Using/Aliasing using DataHeatBalFanSys::TempControlType; using DataHVACGlobals::SingleHeatingSetPoint; using DataZoneEnergyDemands::ZoneSysEnergyDemand; using General::TrimSigDigits; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int ChillerSetID; Real64 RemainingOutputToCoolingSP; // Remaining requested load in zone @@ -15070,14 +14614,6 @@ namespace RefrigeratedCase { // Called from Zone Equipment Manager. // have however done the variable definitions for in and out. - // USE STATEMENTS: - // unused USE DataZoneEnergyDemands, ONLY: ZoneSysEnergyDemand - // unused USE InputProcessor, ONLY: UtilityRoutines::FindItemInList( - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static int CoilID(0); // Index to coil static int CoilIndex(0); // rank of coils within system static Real64 AirChillerSetSchedule(0.0); // Schedule value for air chiller SET @@ -15127,25 +14663,10 @@ namespace RefrigeratedCase { // Note that the coil fan, heater, and defrost would be unaffected because they // would still be running at level calculated previously - // METHODOLOGY EMPLOYED: - - // Using/Aliasing using CurveManager::CurveValue; using namespace DataLoopNode; using General::CreateSysTimeIntervalString; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static int NumCoils(0); // Number of coils on this system or secondary loop static int CoilID(0); // Index to coil static int CoilIndex(0); // rank of coils within system @@ -15208,10 +14729,6 @@ namespace RefrigeratedCase { } // DeRate == true } - //*************************************************************************************************** - - //*************************************************************************************************** - void CalculateCoil(int const CoilID, Real64 const QZnReq // sensible load required ) @@ -15248,7 +14765,6 @@ namespace RefrigeratedCase { // Unit Load Factor, Total Capacity Map, or a set of European standards. // Correction factors for material and refrigerant are applied to all of these ratings. - // Using/Aliasing using CurveManager::CurveValue; using namespace DataLoopNode; using General::CreateSysTimeIntervalString; @@ -15264,23 +14780,10 @@ namespace RefrigeratedCase { using Psychrometrics::PsyWFnTdbTwbPb; using Psychrometrics::PsyWFnTdpPb; - // Locals static Real64 UnitLoadFactorSens(0.0); // Rated capacity divided by rated DT1 (T air in - Tevap) (W/delta C) - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // unused REAL(r64), PARAMETER ::ErrorTol = 0.001d0 !Iterative solution tolerance static std::string const TrackMessage("from RefrigeratedCase:CalculateCoil"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // INTEGER :: Iter =0 ! counter for loop to solve for total coil capacity as a function of inlet air conditions static int FanSpeedControlType(0); // from input static int SHRCorrectionCurvePtr(0); // Points to curve entered by user to specify total/sensible capacity as a function of SHR static int SHRCorrectionType(0); // SHR60, QuadraticSHR, European, or TabularRH_DT1_TRoom @@ -15763,29 +15266,8 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // initialize zone gain terms at begin environment - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataGlobals::BeginEnvrnFlag; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyEnvrnFlag(true); int loop; @@ -15842,14 +15324,8 @@ namespace RefrigeratedCase { return; - // should model above terms for use during sizing here - // IF(DoingSizing)THEN - - // ENDIF } - //*************************************************************************************************** - void ZeroHVACValues() { @@ -15864,31 +15340,9 @@ namespace RefrigeratedCase { // to zero when called on zone timestep. Otherwise, values may be held over when // no HVAC load calls module during that zone time step. - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataWater::WaterStorage; using PlantUtilities::SetComponentFlowRate; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // na - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - static int DemandARRID(0); // Index to water tank Demand used for evap condenser static int TankID(0); // Index to water tank used for evap condenser static int RackNum(0); // Index to refrigerated rack diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 23745a2a6ad..4873bb89a4c 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -84,11 +84,6 @@ namespace RefrigeratedCase { // Refrigerated display case rack heat rejection location extern int const LocationOutdoors; extern int const LocationZone; - // Condenser cooling type -- See DataHeatBalance - RefrigxxxTypexxx - // INTEGER, PARAMETER :: CondenserCoolingAir = 1 - // INTEGER, PARAMETER :: CondenserCoolingEvap = 2 - // INTEGER, PARAMETER :: CondenserCoolingWater = 3 - // INTEGER, PARAMETER :: CondenserCascade = 4 // Air- and evap-cooled condenser fan speed control types extern int const FanVariableSpeed; extern int const FanConstantSpeedLinear; @@ -136,9 +131,6 @@ namespace RefrigeratedCase { extern int const RatedReturnGasTemperature; extern int const RatedSubcooling; extern int const RatedLiquidTemperature; - // System service types (applies to system, cascade condenser, and secondary loops) - // INTEGER, PARAMETER :: SupermarketService =1 - // INTEGER, PARAMETER :: WarehouseService =2 // Warehouse coil Defrost type extern int const DefrostFluid; extern int const DefrostElec; @@ -198,10 +190,6 @@ namespace RefrigeratedCase { extern Array1D const EuropeanEvapTemp; extern Array1D const EuropeanDT1; - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: - extern int NumSimulationCondAir; // Number of air-cooled condensers in simulation extern int NumSimulationCondEvap; // Number of evaporative condensers in simulation extern int NumSimulationCondWater; // Number of water-cooled condensers in simulation @@ -300,9 +288,6 @@ namespace RefrigeratedCase { // refrigerated cases or walkins exist in the input deck extern bool HaveChillers; // Is initialized as TRUE and remains true when // chillers exist in the input deck - // SUBROUTINE SPECIFICATIONS FOR MODULE RefrigeratedCase: - - // Types struct RefrigCaseData { @@ -490,9 +475,7 @@ namespace RefrigeratedCase { Array1D_int CoilNum; Array1D_int WalkInNum; int HeatRejectionLocation; // Refrigeration Compressor Rack heat rejection location - // (1=LocationOutdoors or 2=LocationZone) int CondenserType; // Specifies cooling mode for outdoor condenser - // (1=Dry air, 2=Evap cooling, 3=Water-cooled) Real64 LaggedUsedWaterHeater; // Heat reclaim used to heat water in previous zone/load time step(W) Real64 LaggedUsedHVACCoil; // Heat reclaim used to heat HVAC coil in previous zone/load time step(W) Real64 EvapEffect; // Effectiveness of evaporative condenser @@ -602,7 +585,6 @@ namespace RefrigeratedCase { // Members std::string Name; // Name of refrigeration system std::string RefrigerantName; // Name of refrigerant, must match name in FluidName - // (see fluidpropertiesrefdata.idf) std::string EndUseSubcategory; // Used for reporting purposes bool SystemRejectHeatToZone; // Flag to show air-cooled condenser located inside zone bool CoilFlag; // Flag to show if coil type load on system (even if below in a secondary) @@ -617,9 +599,6 @@ namespace RefrigeratedCase { Array1D_int SubcoolerNum; // Absolute Index of subcoolers (allocated NumSubcoolers) Array1D_int WalkInNum; // absolute Index of walk ins (allocated NumWalkIns) int CompSuctControl; // Index to suction control - // 2 =fixed, 1=floating - // INTEGER :: ServiceType = 1 ! Index to warehouse or supermarket - // 1 = supermarket, 2=warehouse int HiStageWarnIndex1; // Recurring warning index when hi stage compressors unable to meet coil loads int HiStageWarnIndex2; // Recurring warning index when hi stage compressors unable to meet coil loads int InsuffCapWarn; // Recurring warning index when refrigeration system unable to meet coil loads @@ -1115,10 +1094,6 @@ namespace RefrigeratedCase { Real64 TotalHeatRecoveredEnergy; // All recovered heat for defrost purposes, J Real64 TotalHeatRecoveredLoad; // All recovered heat for defrost purposes [W] Real64 TransitionTemperature; // Transition temperature between subcritical and transcritical operation (C) - // REAL(r64) :: ExternalEnergyRecovered = 0.0d0 ! ExternalHeatRecovered, J - // REAL(r64) :: ExternalHeatRecoveredLoad = 0.0d0 ! Sum of LaggedUsedWaterHeater and LaggedUsedHVACCoil [W] - // REAL(r64) :: LaggedUsedWaterHeater =0.0d0 ! Heat reclaim used to heat water in previous zone/load time step(W) - // REAL(r64) :: LaggedUsedHVACCoil =0.0d0 ! Heat reclaim used to heat HVAC coil in previous zone/load time step(W) // Default Constructor RefrigGasCoolerData() @@ -1249,8 +1224,6 @@ namespace RefrigeratedCase { int ReceiverZoneNum; // ID number for zone where receiver gains heat int ReceiverZoneNodeNum; // ID number for zone node where receiver gains heat Real64 ReceiverZoneHeatGain; // sensible heat gain rate to zone with receiver - // INTEGER :: ServiceType = 1 ! Index to warehouse or supermarket - // 1 = supermarket, 2=warehouse int VarSpeedCurvePtr; // Pointer for variable speed pump power curve Real64 AvailLoadCoils; // Used to determine amount of avail heat for warehouse coils Real64 CpBrineRated; // Specific heat of secondary loop fluid at rated average @@ -1724,94 +1697,42 @@ namespace RefrigeratedCase { void ManageRefrigeratedCaseRacks(); - //*************************************************************************************************** - void GetRefrigerationInput(); - //*************************************************************************************************** - //*************************************************************************************************** - void SetupReportInput(); - //*************************************************************************************************** - //*************************************************************************************************** - void InitRefrigeration(); void InitRefrigerationPlantConnections(); - //*************************************************************************************************** - //*************************************************************************************************** - void CalcRackSystem(int const RackNum); - //*************************************************************************************************** - void ReportRackSystem(int const RackNum); - //*************************************************************************************************** - void CalculateCase(int const CaseID); // Absolute pointer to refrigerated case - //*************************************************************************************************** - //*************************************************************************************************** - void SimRefrigCondenser(int const SysType, std::string const &CompName, int &CompIndex, bool const FirstHVACIteration, bool const InitLoopEquip); - //*************************************************************************************************** - //*************************************************************************************************** - void UpdateRefrigCondenser(int const Num, int const SysType); - //*************************************************************************************************** - //*************************************************************************************************** - void SimulateDetailedRefrigerationSystems(); - //*************************************************************************************************** - //*************************************************************************************************** - void SimulateDetailedTransRefrigSystems(); - //*************************************************************************************************** - //*************************************************************************************************** - void CalcDetailedSystem(int const SysNum); - //*************************************************************************************************** - //*************************************************************************************************** - void CalcDetailedTransSystem(int const SysNum); - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateCondensers(int const SysNum); - //*************************************************************************************************** - //*************************************************************************************************** - void CalcGasCooler(int const SysNum); - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateCompressors(int const SysNum); - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateTransCompressors(int const SysNum); - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateSubcoolers(int const SysNum); - //*************************************************************************************************** - - //*************************************************************************************************** - void GetRefrigeratedRackIndex(std::string const &Name, int &IndexPtr, int const SysType, @@ -1821,23 +1742,14 @@ namespace RefrigeratedCase { void ReportRefrigerationComponents(); - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateWalkIn(int const WalkInID); // Absolute pointer to Walk In - //*************************************************************************************************** - //*************************************************************************************************** - void CalculateSecondary(int const SecondaryNum); void SumZoneImpacts(); void CheckRefrigerationInput(); - //*************************************************************************************************** - //*************************************************************************************************** - void SimAirChillerSet(std::string const &AirChillerSetName, int const ZoneNum, bool const FirstHVACIteration, @@ -1846,12 +1758,8 @@ namespace RefrigeratedCase { int &AirChillerSetPtr // from ZoneEquipList(CurZoneEqNum)%EquipIndex(EquipPtr) ); - //*************************************************************************************************** - void CalculateAirChillerSets(int const AirChillerSetID); - //*************************************************************************************************** - void FinalRateCoils(bool const DeRate, // True if compressor rack or secondary ht exchanger unable to provide capacity int const SystemSourceType, // Secondarysystem or DetailedSystem int const SystemID, // ID for Secondary loop or detailed system calling for derate @@ -1859,20 +1767,12 @@ namespace RefrigeratedCase { Real64 const AvailableTotalLoad // Load that system or secondary loop is able to serve [W] ); - //*************************************************************************************************** - - //*************************************************************************************************** - void CalculateCoil(int const CoilID, Real64 const QZnReq // sensible load required ); - //*************************************************************************************************** - void FigureRefrigerationZoneGains(); - //*************************************************************************************************** - void ZeroHVACValues(); } // namespace RefrigeratedCase From 05cdae970469656f67a32d0b0ea1dbc0ffcbc4e8 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 11:29:07 -0700 Subject: [PATCH 39/86] step 2 - partial cleanup usings --- src/EnergyPlus/RefrigeratedCase.cc | 595 ++++++++++++++--------------- 1 file changed, 280 insertions(+), 315 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 7b588728b7a..bb4401511f0 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -195,19 +195,6 @@ namespace RefrigeratedCase { // REFERENCES: // Specific references are provided for the equipment simulation subroutines below. - using DataHeatBalance::HeatReclaimRefrigCondenser; - using DataHeatBalance::HeatReclaimRefrigeratedRack; - using DataHeatBalance::NumRefrigChillerSets; - using DataHeatBalance::NumRefrigCondensers; - using DataHeatBalance::NumRefrigeratedRacks; - using DataHeatBalance::NumRefrigSystems; - using DataHeatBalance::RefrigCaseCredit; - using DataHeatBalance::RefrigCondenserTypeAir; - using DataHeatBalance::RefrigCondenserTypeCascade; - using DataHeatBalance::RefrigCondenserTypeEvap; - using DataHeatBalance::RefrigCondenserTypeWater; - using DataHeatBalance::RefrigSystemTypeDetailed; - using DataHeatBalance::RefrigSystemTypeRack; using DataHVACGlobals::TimeStepSys; // used when operating for warehouse coil using namespace DataGlobals; // includes LOGICAL :: BeginTimeStepFlag =.FALSE. // True at the start of each time step, False after first subtime step of time step @@ -416,7 +403,6 @@ namespace RefrigeratedCase { // compressor input error regarding secondary loop heat exchanger capacity // Refrigerated warehouse coil variables Array1D_bool CheckChillerName; // used when simrefrigcoil called for a zone - // LOGICAL, ALLOCATABLE,DIMENSION(:) :: CheckZoneNum !used when simrefrigcoil called for a zone Array1D_bool ShowCoilFrostWarning; // Used for one-time warning message if defrost cycles insufficient to melt ice // Refrigeration Plant connections checks @@ -491,7 +477,7 @@ namespace RefrigeratedCase { // condensing temperature is used to determine rack power and energy consumption. // For the detailed system approach, the compressors and condensers are modeled individually // using manufacturer's data and rated performance curves. - // Inter-system heat transfer via subcoolers and cascade condensers can be accomodated. + // Inter-system heat transfer via subcoolers and cascade condensers can be accommodated. // Secondary refrigeration cycles are also available. using General::RoundSigDigits; @@ -525,7 +511,7 @@ namespace RefrigeratedCase { if (!BeginEnvrnFlag) MyOneTimeFlag = true; if (HaveRefrigRacks) { - for (RackNum = 1; RackNum <= NumRefrigeratedRacks; ++RackNum) { + for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { CalcRackSystem(RackNum); ReportRackSystem(RackNum); } @@ -561,9 +547,6 @@ namespace RefrigeratedCase { using CurveManager::GetCurveMinMaxValues; using DataEnvironment::StdBaroPress; using DataGlobals::AnyEnergyManagementSystemInModel; - using DataHeatBalance::NumRefrigeratedRacks; - using DataHeatBalance::NumRefrigSystems; - using DataHeatBalance::Zone; // , & using DataZoneEquipment::GetReturnAirNodeForZone; using DataZoneEquipment::GetSystemNodeNumberForZone; using FluidProperties::GetSupHeatEnthalpyRefrig; @@ -790,39 +773,39 @@ namespace RefrigeratedCase { NumSimulationCascadeCondensers = inputProcessor->getNumObjectsFound("Refrigeration:Condenser:Cascade"); NumSimulationCases = inputProcessor->getNumObjectsFound("Refrigeration:Case"); NumSimulationCaseAndWalkInLists = inputProcessor->getNumObjectsFound("Refrigeration:CaseAndWalkInList"); - NumRefrigeratedRacks = inputProcessor->getNumObjectsFound("Refrigeration:CompressorRack"); + DataHeatBalance::NumRefrigeratedRacks = inputProcessor->getNumObjectsFound("Refrigeration:CompressorRack"); NumSimulationSecondarySystems = inputProcessor->getNumObjectsFound("Refrigeration:SecondarySystem"); NumSimulationTransferLoadLists = inputProcessor->getNumObjectsFound("Refrigeration:TransferLoadList"); NumSimulationWalkIns = inputProcessor->getNumObjectsFound("Refrigeration:WalkIn"); - NumRefrigSystems = inputProcessor->getNumObjectsFound("Refrigeration:System"); + DataHeatBalance::NumRefrigSystems = inputProcessor->getNumObjectsFound("Refrigeration:System"); NumTransRefrigSystems = inputProcessor->getNumObjectsFound("Refrigeration:TranscriticalSystem"); NumSimulationCondAir = inputProcessor->getNumObjectsFound("Refrigeration:Condenser:AirCooled"); NumSimulationCondEvap = inputProcessor->getNumObjectsFound("Refrigeration:Condenser:EvaporativeCooled"); NumSimulationCondWater = inputProcessor->getNumObjectsFound("Refrigeration:Condenser:WaterCooled"); NumSimulationGasCooler = inputProcessor->getNumObjectsFound("Refrigeration:GasCooler:AirCooled"); - NumRefrigCondensers = NumSimulationCondAir + NumSimulationCondEvap + NumSimulationCondWater + NumSimulationCascadeCondensers; + DataHeatBalance::NumRefrigCondensers = NumSimulationCondAir + NumSimulationCondEvap + NumSimulationCondWater + NumSimulationCascadeCondensers; NumSimulationCompressors = inputProcessor->getNumObjectsFound("Refrigeration:Compressor"); NumSimulationSubcoolers = inputProcessor->getNumObjectsFound("Refrigeration:Subcooler"); NumCompressorLists = inputProcessor->getNumObjectsFound("Refrigeration:CompressorList"); - NumRefrigChillerSets = inputProcessor->getNumObjectsFound("ZoneHVAC:RefrigerationChillerSet"); + DataHeatBalance::NumRefrigChillerSets = inputProcessor->getNumObjectsFound("ZoneHVAC:RefrigerationChillerSet"); NumSimulationRefrigAirChillers = inputProcessor->getNumObjectsFound("Refrigeration:AirChiller"); // Set flags used later to avoid unnecessary steps. - if (NumRefrigeratedRacks == 0) HaveRefrigRacks = false; - if (NumRefrigSystems == 0) HaveDetailedRefrig = false; + if (DataHeatBalance::NumRefrigeratedRacks == 0) HaveRefrigRacks = false; + if (DataHeatBalance::NumRefrigSystems == 0) HaveDetailedRefrig = false; if (NumTransRefrigSystems == 0) HaveDetailedTransRefrig = false; if (NumSimulationCases == 0 && NumSimulationWalkIns == 0) HaveCasesOrWalkins = false; if (NumSimulationRefrigAirChillers == 0) HaveChillers = false; - if (NumRefrigeratedRacks > 0) { - RefrigRack.allocate(NumRefrigeratedRacks); - HeatReclaimRefrigeratedRack.allocate(NumRefrigeratedRacks); - ShowCOPWarning.dimension(NumRefrigeratedRacks, true); + if (DataHeatBalance::NumRefrigeratedRacks > 0) { + RefrigRack.allocate(DataHeatBalance::NumRefrigeratedRacks); + DataHeatBalance::HeatReclaimRefrigeratedRack.allocate(DataHeatBalance::NumRefrigeratedRacks); + ShowCOPWarning.dimension(DataHeatBalance::NumRefrigeratedRacks, true); } - if (NumRefrigSystems > 0) { - System.allocate(NumRefrigSystems); - ShowUnmetEnergyWarning.allocate(NumRefrigSystems); - ShowHiStageUnmetEnergyWarning.allocate(NumRefrigSystems); + if (DataHeatBalance::NumRefrigSystems > 0) { + System.allocate(DataHeatBalance::NumRefrigSystems); + ShowUnmetEnergyWarning.allocate(DataHeatBalance::NumRefrigSystems); + ShowHiStageUnmetEnergyWarning.allocate(DataHeatBalance::NumRefrigSystems); ShowUnmetEnergyWarning = true; ShowHiStageUnmetEnergyWarning = true; } @@ -830,11 +813,11 @@ namespace RefrigeratedCase { TransSystem.allocate(NumTransRefrigSystems); ShowUnmetEnergyWarningTrans.dimension(NumTransRefrigSystems, true); } - if (NumRefrigChillerSets > 0) AirChillerSet.allocate(NumRefrigChillerSets); - if (NumRefrigCondensers > 0) { - HeatReclaimRefrigCondenser.allocate(NumRefrigCondensers); - Condenser.allocate(NumRefrigCondensers); - UniqueCondenserNames.reserve(static_cast(NumRefrigCondensers)); + if (DataHeatBalance::NumRefrigChillerSets > 0) AirChillerSet.allocate(DataHeatBalance::NumRefrigChillerSets); + if (DataHeatBalance::NumRefrigCondensers > 0) { + DataHeatBalance::HeatReclaimRefrigCondenser.allocate(DataHeatBalance::NumRefrigCondensers); + Condenser.allocate(DataHeatBalance::NumRefrigCondensers); + UniqueCondenserNames.reserve(static_cast(DataHeatBalance::NumRefrigCondensers)); } if (NumSimulationGasCooler > 0) { GasCooler.allocate(NumSimulationGasCooler); @@ -976,7 +959,7 @@ namespace RefrigeratedCase { // Get the Zone node number from the zone name entered by the user RefrigCase(CaseNum).ZoneName = Alphas(3); - RefrigCase(CaseNum).ActualZoneNum = UtilityRoutines::FindItemInList(Alphas(3), Zone); + RefrigCase(CaseNum).ActualZoneNum = UtilityRoutines::FindItemInList(Alphas(3), DataHeatBalance::Zone); if (RefrigCase(CaseNum).ActualZoneNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(3) + @@ -1440,7 +1423,7 @@ namespace RefrigeratedCase { // set flag in Zone Data if RAFrac > 0 if (RefrigCase(CaseNum).RAFrac > 0.0) { - Zone(RefrigCase(CaseNum).ActualZoneNum).RefrigCaseRA = true; + DataHeatBalance::Zone(RefrigCase(CaseNum).ActualZoneNum).RefrigCaseRA = true; } // Make sure RA node exists for display cases with under case HVAC returns @@ -1862,7 +1845,7 @@ namespace RefrigeratedCase { // Get the Zone node number from the zone name // The Zone Node is needed to get the zone's ambient conditions, NumOfZones from dataglobals WalkIn(WalkInID).ZoneName(ZoneID) = Alphas(AStart); - WalkIn(WalkInID).ZoneNum(ZoneID) = UtilityRoutines::FindItemInList(Alphas(AStart), Zone); + WalkIn(WalkInID).ZoneNum(ZoneID) = UtilityRoutines::FindItemInList(Alphas(AStart), DataHeatBalance::Zone); if (WalkIn(WalkInID).ZoneNum(ZoneID) == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + @@ -2574,12 +2557,12 @@ namespace RefrigeratedCase { //************ START Warehouse Coil SET INPUT ************** // One Set allowed per zone, but indiv coils within zone can be served by different compressor/condenser systems - if (NumRefrigChillerSets > 0) { + if (DataHeatBalance::NumRefrigChillerSets > 0) { - CheckChillerSetName.dimension(NumRefrigChillerSets, true); + CheckChillerSetName.dimension(DataHeatBalance::NumRefrigChillerSets, true); CurrentModuleObject = "ZoneHVAC:RefrigerationChillerSet"; - for (SetID = 1; SetID <= NumRefrigChillerSets; ++SetID) { + for (SetID = 1; SetID <= DataHeatBalance::NumRefrigChillerSets; ++SetID) { inputProcessor->getObjectItem(CurrentModuleObject, SetID, Alphas, @@ -2620,7 +2603,7 @@ namespace RefrigeratedCase { ++AlphaNum; AirChillerSet(SetID).ZoneName = Alphas(AlphaNum); - AirChillerSet(SetID).ZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Zone); + AirChillerSet(SetID).ZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); if (AirChillerSet(SetID).ZoneNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + AirChillerSet(SetID).Name + "\", invalid " + @@ -2756,11 +2739,11 @@ namespace RefrigeratedCase { //************** Start RefrigerationRacks - if (NumRefrigeratedRacks > 0) { + if (DataHeatBalance::NumRefrigeratedRacks > 0) { CurrentModuleObject = "Refrigeration:CompressorRack"; - for (RackNum = 1; RackNum <= NumRefrigeratedRacks; ++RackNum) { + for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { inputProcessor->getObjectItem(CurrentModuleObject, RackNum, @@ -2776,8 +2759,8 @@ namespace RefrigeratedCase { UtilityRoutines::IsNameEmpty(Alphas(1), CurrentModuleObject, ErrorsFound); RefrigRack(RackNum).Name = Alphas(1); - HeatReclaimRefrigeratedRack(RackNum).Name = Alphas(1); - HeatReclaimRefrigeratedRack(RackNum).SourceType = CurrentModuleObject; + DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).Name = Alphas(1); + DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).SourceType = CurrentModuleObject; if (UtilityRoutines::SameString(Alphas(2), "Outdoors")) { RefrigRack(RackNum).HeatRejectionLocation = LocationOutdoors; } else if (UtilityRoutines::SameString(Alphas(2), "Zone")) { @@ -2839,26 +2822,26 @@ namespace RefrigeratedCase { } if (UtilityRoutines::SameString(Alphas(5), "EvaporativelyCooled")) { - RefrigRack(RackNum).CondenserType = RefrigCondenserTypeEvap; + RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserTypeEvap; if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { ShowWarningError(CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\" Evap cooled " + cAlphaFieldNames(5) + " not available with " + cAlphaFieldNames(2) + " = Zone."); ShowContinueError(cAlphaFieldNames(5) + " reset to Air Cooled and simulation continues."); - RefrigRack(RackNum).CondenserType = RefrigCondenserTypeAir; + RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserTypeAir; } } else if (UtilityRoutines::SameString(Alphas(5), "WaterCooled")) { - RefrigRack(RackNum).CondenserType = RefrigCondenserTypeWater; + RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserTypeWater; if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { ShowWarningError(CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\" Water cooled " + cAlphaFieldNames(5) + " not available with " + cAlphaFieldNames(2) + " = Zone."); ShowContinueError(cAlphaFieldNames(5) + " reset to Air Cooled and simulation continues."); - RefrigRack(RackNum).CondenserType = RefrigCondenserTypeAir; + RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserTypeAir; } } else { - RefrigRack(RackNum).CondenserType = RefrigCondenserTypeAir; + RefrigRack(RackNum).CondenserType = DataHeatBalance::RefrigCondenserTypeAir; } // Get water-cooled condenser input, if applicable - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeWater) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { RefrigRack(RackNum).InletNode = GetOnlySingleNode( Alphas(6), ErrorsFound, CurrentModuleObject, Alphas(1), NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent); RefrigRack(RackNum).OutletNode = GetOnlySingleNode( @@ -2944,7 +2927,7 @@ namespace RefrigeratedCase { } RefrigRack(RackNum).CondenserAirFlowRate = Numbers(8); - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && RefrigRack(RackNum).CondenserAirFlowRate != AutoCalculate) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(8) + " cannot be less than or equal to zero."); @@ -2953,20 +2936,20 @@ namespace RefrigeratedCase { // Basin heater power as a function of temperature must be greater than or equal to 0 RefrigRack(RackNum).BasinHeaterPowerFTempDiff = Numbers(9); - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && Numbers(9) < 0.0) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && Numbers(9) < 0.0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(9) + " must be >= 0"); ErrorsFound = true; } RefrigRack(RackNum).BasinHeaterSetPointTemp = Numbers(10); - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && RefrigRack(RackNum).BasinHeaterSetPointTemp < 2.0) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).BasinHeaterSetPointTemp < 2.0) { ShowWarningError(CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(10) + " is less than 2 deg C. Freezing could occur."); } RefrigRack(RackNum).EvapPumpPower = Numbers(11); - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower < 0.0 && + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower < 0.0 && RefrigRack(RackNum).EvapPumpPower != AutoCalculate) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(11) + " cannot be less than zero."); @@ -3136,7 +3119,7 @@ namespace RefrigeratedCase { " must be input if walkins or AirChillers connected to rack and heat rejection location = zone."); ErrorsFound = true; } else { // alpha (15) not blank - RefrigRack(RackNum).HeatRejectionZoneNum = UtilityRoutines::FindItemInList(Alphas(15), Zone); + RefrigRack(RackNum).HeatRejectionZoneNum = UtilityRoutines::FindItemInList(Alphas(15), DataHeatBalance::Zone); RefrigRack(RackNum).HeatRejectionZoneNodeNum = GetSystemNodeNumberForZone(Alphas(15)); if (RefrigRack(RackNum).HeatRejectionZoneNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", invalid " + @@ -3151,22 +3134,22 @@ namespace RefrigeratedCase { // set condenser air flow and evap water pump power if autocalculated // autocalculate condenser evap water pump if needed - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower == AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower == AutoCalculate) { RefrigRack(RackNum).EvapPumpPower = CondPumpRatePower * RefrigRack(RackNum).TotalRackLoad; } // autocalculate evap condenser air volume flow rate if needed - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate == AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate == AutoCalculate) { RefrigRack(RackNum).CondenserAirFlowRate = AirVolRateEvapCond * RefrigRack(RackNum).TotalRackLoad; } } // RackNum=1,NumRefrigeratedRacks - CheckEquipNameRackWaterCondenser.dimension(NumRefrigeratedRacks, true); + CheckEquipNameRackWaterCondenser.dimension(DataHeatBalance::NumRefrigeratedRacks, true); } //(NumRefrigeratedRacks > 0) - if (NumRefrigSystems > 0 || NumTransRefrigSystems > 0) { + if (DataHeatBalance::NumRefrigSystems > 0 || NumTransRefrigSystems > 0) { - if (NumRefrigSystems > 0 && NumRefrigCondensers == 0) { + if (DataHeatBalance::NumRefrigSystems > 0 && DataHeatBalance::NumRefrigCondensers == 0) { ShowSevereError("Refrigeration:System objects were found during input processing, however no Rrefrigeration condenser objects (which " "may be either: "); ShowContinueError(" Refrigeration:Condenser:AirCooled, Refrigeration:Condenser:WaterCooled, " @@ -3202,7 +3185,7 @@ namespace RefrigeratedCase { cNumericFieldNames); GlobalNames::VerifyUniqueInterObjectName(UniqueCondenserNames, Alphas(1), CurrentModuleObject, cAlphaFieldNames(1), ErrorsFound); Condenser(CondNum).Name = Alphas(1); - HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); Condenser(CondNum).CapCurvePtr = GetCurveIndex(Alphas(2)); // convert curve name to number if (Condenser(CondNum).CapCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", invalid " + cAlphaFieldNames(2) + @@ -3212,11 +3195,11 @@ namespace RefrigeratedCase { // set start of count for number of systems attached to this condenser Condenser(CondNum).NumSysAttach = 0; - if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(NumRefrigSystems); + if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(DataHeatBalance::NumRefrigSystems); // set CondenserType and rated temperature difference (51.7 - 35)C per ARI 460 - Condenser(CondNum).CondenserType = RefrigCondenserTypeAir; - HeatReclaimRefrigCondenser(CondNum).SourceType = CurrentModuleObject; + Condenser(CondNum).CondenserType = DataHeatBalance::RefrigCondenserTypeAir; + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).SourceType = CurrentModuleObject; Condenser(CondNum).RatedDelT = CondARI460DelT; //= 16.7d0 ,Rated sat cond temp - dry bulb air T for air-cooled Condensers, ARI460 Condenser(CondNum).RatedTCondense = CondARI460Tcond; if (Condenser(CondNum).CapCurvePtr > 0) { @@ -3271,7 +3254,7 @@ namespace RefrigeratedCase { Condenser(CondNum).InletAirNodeNum = 0; } else { // see if it's an outside air node name or an indoor zone name, // have to check inside first because outside check automatically generates an error message - Condenser(CondNum).InletAirZoneNum = UtilityRoutines::FindItemInList(Alphas(4), Zone); + Condenser(CondNum).InletAirZoneNum = UtilityRoutines::FindItemInList(Alphas(4), DataHeatBalance::Zone); // need to clearly id node number for air inlet conditions and zone number for casecredit assignment if (Condenser(CondNum).InletAirZoneNum != 0) { // set condenser flag (later used to set system flag) and zone flag @@ -3328,15 +3311,15 @@ namespace RefrigeratedCase { GlobalNames::VerifyUniqueInterObjectName(UniqueCondenserNames, Alphas(1), CurrentModuleObject, cAlphaFieldNames(1), ErrorsFound); Condenser(CondNum).Name = Alphas(1); - HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); // set start of count for number of systems attached to this condenser Condenser(CondNum).NumSysAttach = 0; - if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(NumRefrigSystems); + if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(DataHeatBalance::NumRefrigSystems); // set CondenserType and rated Heat Rejection per ARI 490 rating - Condenser(CondNum).CondenserType = RefrigCondenserTypeEvap; - HeatReclaimRefrigCondenser(CondNum).SourceType = CurrentModuleObject; + Condenser(CondNum).CondenserType = DataHeatBalance::RefrigCondenserTypeEvap; + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).SourceType = CurrentModuleObject; Condenser(CondNum).RatedTCondense = CondARI490Tcond; Condenser(CondNum).RatedDelT = CondARI490DelT; @@ -3555,15 +3538,15 @@ namespace RefrigeratedCase { GlobalNames::VerifyUniqueInterObjectName(UniqueCondenserNames, Alphas(1), CurrentModuleObject, cAlphaFieldNames(1), ErrorsFound); Condenser(CondNum).Name = Alphas(1); - HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); // set start of count for number of systems attached to this condenser Condenser(CondNum).NumSysAttach = 0; - if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(NumRefrigSystems); + if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(DataHeatBalance::NumRefrigSystems); // set CondenserType and rated Heat Rejection per ARI 450 rating - Condenser(CondNum).CondenserType = RefrigCondenserTypeWater; - HeatReclaimRefrigCondenser(CondNum).SourceType = CurrentModuleObject; + Condenser(CondNum).CondenserType = DataHeatBalance::RefrigCondenserTypeWater; + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).SourceType = CurrentModuleObject; if ((!lNumericBlanks(1)) && (Numbers(1) > 0.0)) { Condenser(CondNum).RatedCapacity = Numbers(1); } else { @@ -3680,7 +3663,7 @@ namespace RefrigeratedCase { } // Read input for CONDENSER:REFRIGERATION:WaterCooled - CheckEquipNameWaterCondenser.dimension(NumRefrigCondensers, true); + CheckEquipNameWaterCondenser.dimension(DataHeatBalance::NumRefrigCondensers, true); } // NumSimulationCondWater > 0 // cascade condensers assumed to provide zero subcooling @@ -3702,14 +3685,14 @@ namespace RefrigeratedCase { GlobalNames::VerifyUniqueInterObjectName(UniqueCondenserNames, Alphas(1), CurrentModuleObject, cAlphaFieldNames(1), ErrorsFound); Condenser(CondNum).Name = Alphas(1); - HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); + DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); // set start of count for number of systems attached to this condenser Condenser(CondNum).NumSysAttach = 0; - if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(NumRefrigSystems); + if (!allocated(Condenser(CondNum).SysNum)) Condenser(CondNum).SysNum.allocate(DataHeatBalance::NumRefrigSystems); // set CondenserType - Condenser(CondNum).CondenserType = RefrigCondenserTypeCascade; + Condenser(CondNum).CondenserType = DataHeatBalance::RefrigCondenserTypeCascade; if (!lNumericBlanks(1)) { Condenser(CondNum).RatedTCondense = Numbers(1); @@ -3896,7 +3879,7 @@ namespace RefrigeratedCase { GasCooler(GCNum).InletAirNodeNum = 0; } else { // see if it's an outside air node name or an indoor zone name, // have to check inside first because outside check automatically generates an error message - GasCooler(GCNum).InletAirZoneNum = UtilityRoutines::FindItemInList(Alphas(4), Zone); + GasCooler(GCNum).InletAirZoneNum = UtilityRoutines::FindItemInList(Alphas(4), DataHeatBalance::Zone); // need to clearly id node number for air inlet conditions and zone number for casecredit assignment if (GasCooler(GCNum).InletAirZoneNum != 0) { // set condenser flag (later used to set system flag) and zone flag @@ -4355,7 +4338,7 @@ namespace RefrigeratedCase { NumNum = 12; if (!lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { Secondary(SecondaryNum).SumUADistPiping = Numbers(NumNum); - Secondary(SecondaryNum).DistPipeZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Zone); + Secondary(SecondaryNum).DistPipeZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); Secondary(SecondaryNum).DistPipeZoneNodeNum = GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (Secondary(SecondaryNum).DistPipeZoneNum == 0) { @@ -4397,7 +4380,7 @@ namespace RefrigeratedCase { NumNum = 13; if (!lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { Secondary(SecondaryNum).SumUAReceiver = Numbers(NumNum); - Secondary(SecondaryNum).ReceiverZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Zone); + Secondary(SecondaryNum).ReceiverZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); Secondary(SecondaryNum).ReceiverZoneNodeNum = GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (Secondary(SecondaryNum).ReceiverZoneNum == 0) { @@ -4727,7 +4710,7 @@ namespace RefrigeratedCase { AlphaListNum = 1 + NumLoad; LoadCascadeNum = 0; LoadSecondaryNum = 0; - if (NumRefrigCondensers > 0) LoadCascadeNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Condenser); + if (DataHeatBalance::NumRefrigCondensers > 0) LoadCascadeNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Condenser); if (NumSimulationSecondarySystems > 0) LoadSecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Secondary); if ((LoadCascadeNum == 0) && (LoadSecondaryNum == 0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + cAlphaFieldNames(AlphaListNum) + @@ -4738,7 +4721,7 @@ namespace RefrigeratedCase { "\" : has a non-unique name : " + Alphas(AlphaListNum)); ErrorsFound = true; } else if (LoadCascadeNum != 0) { - if (Condenser(LoadCascadeNum).CondenserType != RefrigCondenserTypeCascade) { + if (Condenser(LoadCascadeNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { ShowSevereError( RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\" : has a condenser listed as a transfer load that is not a cascade condenser: " + Alphas(AlphaListNum)); @@ -4797,7 +4780,7 @@ namespace RefrigeratedCase { // ********READ REFRIGERATION SYSTEMS *********** CurrentModuleObject = "Refrigeration:System"; - for (RefrigSysNum = 1; RefrigSysNum <= NumRefrigSystems; ++RefrigSysNum) { + for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { inputProcessor->getObjectItem(CurrentModuleObject, RefrigSysNum, @@ -4984,7 +4967,7 @@ namespace RefrigeratedCase { CascadeLoadNum = 0; if (NumSimulationTransferLoadLists > 0) TransferLoadListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), TransferLoadList); if (NumSimulationSecondarySystems > 0) SecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Secondary); - if (NumRefrigCondensers > 0) CascadeLoadNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Condenser); + if (DataHeatBalance::NumRefrigCondensers > 0) CascadeLoadNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Condenser); NumNameMatches = 0; if (TransferLoadListNum != 0) ++NumNameMatches; if (SecondaryNum != 0) ++NumNameMatches; @@ -5060,7 +5043,7 @@ namespace RefrigeratedCase { if (NumCascadeLoad > 0) { for (CascadeLoadIndex = 1; CascadeLoadIndex <= NumCascadeLoad; ++CascadeLoadIndex) { CondID = System(RefrigSysNum).CascadeLoadNum(CascadeLoadIndex); - if (Condenser(CondID).CondenserType != RefrigCondenserTypeCascade) { + if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", has a " + cAlphaFieldNames(AlphaNum) + ": " + Alphas(AlphaNum) + " cascade load that is not a cascade condenser."); @@ -5131,12 +5114,12 @@ namespace RefrigeratedCase { System(RefrigSysNum).RefInventory += Condenser(CondNum).RefReceiverInventory + Condenser(CondNum).RefPipingInventory + Condenser(CondNum).RefOpCharge; - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeCascade) Condenser(CondNum).CascadeSysID = RefrigSysNum; - if ((Condenser(CondNum).CondenserType == RefrigCondenserTypeAir) && (Condenser(CondNum).CondenserRejectHeatToZone)) + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) Condenser(CondNum).CascadeSysID = RefrigSysNum; + if ((Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) && (Condenser(CondNum).CondenserRejectHeatToZone)) System(RefrigSysNum).SystemRejectHeatToZone = true; // Now do evaporative condenser auto sizing because it is a function of the system's cooling load - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeEvap) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (Condenser(CondNum).RatedAirFlowRate == AutoCalculate) { Condenser(CondNum).RatedAirFlowRate = AirVolRateEvapCond * Condenser(CondNum).RatedCapacity; } @@ -5211,7 +5194,7 @@ namespace RefrigeratedCase { " must be defined."); ErrorsFound = true; } - if ((Condenser(CondNum).CondenserType == RefrigCondenserTypeCascade) && + if ((Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) && (System(RefrigSysNum).TCondenseMin > Condenser(CondNum).RatedTCondense)) ShowWarningError(CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", The system specified minimum condensing temperature is greater than the rated condensing temperature for " @@ -5289,7 +5272,7 @@ namespace RefrigeratedCase { System(RefrigSysNum).SumUASuctionPiping = 0.0; if (!lNumericBlanks(2) && !lAlphaBlanks(AlphaNum)) { System(RefrigSysNum).SumUASuctionPiping = Numbers(2); - System(RefrigSysNum).SuctionPipeActualZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Zone); + System(RefrigSysNum).SuctionPipeActualZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); System(RefrigSysNum).SuctionPipeZoneNodeNum = GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (System(RefrigSysNum).SuctionPipeZoneNodeNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + @@ -5495,7 +5478,7 @@ namespace RefrigeratedCase { // Assign coilflags to compressors, condensers, and subcoolers (coils calc on sys time step, all other refrig loads on zone time step, so // can't mix on one system) need to do here once again after all cascade condensers and cascade sink systems have been identified - for (RefrigSysNum = 1; RefrigSysNum <= NumRefrigSystems; ++RefrigSysNum) { + for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { // assign flags to all condensers to match system below condenser (system rejecting heat to cascade condenser) CondNum = System(RefrigSysNum).CondenserNum(1); // right now only have one condenser per system Condenser(CondNum).CoilFlag = System(RefrigSysNum).CoilFlag; @@ -5510,11 +5493,11 @@ namespace RefrigeratedCase { // Now have to see if there's a mismatch in the coilflag with the system absorbing heat from the cascade condenser // Note a system can cool multiple cascade condensers. If so, need to be sure all are consistent - all coil or all non-coil(called case // here) check for consistency of loads (coils calc on sys time step, all others on zone time step, so can't mix on one system) - for (RefrigSysNum = 1; RefrigSysNum <= NumRefrigSystems; ++RefrigSysNum) { // check flags for systems reflect all cascade loads + for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { // check flags for systems reflect all cascade loads if (System(RefrigSysNum).NumCascadeLoads == 0) continue; if (System(RefrigSysNum).CoilFlag) { // system already identified as serving coils - for (CondID = 1; CondID <= NumRefrigCondensers; ++CondID) { - if (Condenser(CondID).CondenserType != RefrigCondenserTypeCascade) continue; + for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { + if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) continue; if (RefrigSysNum != Condenser(CondID).CascadeSinkSystemID) continue; // this condenser is not a cascade load on this system if (!Condenser(CondID).CoilFlag) { // would mean system already serving coil loads and this condenser cooling system with case-type loads @@ -5528,8 +5511,8 @@ namespace RefrigeratedCase { } else { // %coilflag == false, so no coil loads prev identified directly or through secondary loop CaseLoads = false; NumCascadeLoadsChecked = 0; - for (CondID = 1; CondID <= NumRefrigCondensers; ++CondID) { // look at All cascade condenser loads on system - if (Condenser(CondID).CondenserType != RefrigCondenserTypeCascade) continue; + for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { // look at All cascade condenser loads on system + if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) continue; if (RefrigSysNum != Condenser(CondID).CascadeSinkSystemID) continue; // this condenser is not a cascade load on this system ++NumCascadeLoadsChecked; if ((CaseLoads) && (!Condenser(CondID).CoilFlag) && (!System(RefrigSysNum).CoilFlag)) continue; @@ -5581,7 +5564,7 @@ namespace RefrigeratedCase { } // error check } // numsubcoolers - for (RefrigSysNum = 1; RefrigSysNum <= NumRefrigSystems; ++RefrigSysNum) { + for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { if (Subcooler(SubcoolerNum).SubcoolerType == LiquidSuction) continue; if (Subcooler(SubcoolerNum).MechSourceSysID == RefrigSysNum) { @@ -6088,7 +6071,7 @@ namespace RefrigeratedCase { TransSystem(TransRefrigSysNum).SumUASuctionPipingMT = 0.0; if (!lNumericBlanks(3) && !lAlphaBlanks(AlphaNum)) { TransSystem(TransRefrigSysNum).SumUASuctionPipingMT = Numbers(3); - TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Zone); + TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT = GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + @@ -6115,7 +6098,7 @@ namespace RefrigeratedCase { TransSystem(TransRefrigSysNum).SumUASuctionPipingLT = 0.0; if (!lNumericBlanks(4) && !lAlphaBlanks(AlphaNum)) { TransSystem(TransRefrigSysNum).SumUASuctionPipingLT = Numbers(4); - TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Zone); + TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT = GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + @@ -6348,13 +6331,13 @@ namespace RefrigeratedCase { } // NumUnusedSecondarys } // NumSimulationSecondarySystems > 0 - if (NumRefrigCondensers > 0) { + if (DataHeatBalance::NumRefrigCondensers > 0) { // Check for presence of shared condensers and for unused condensers // - determines number of loops through refrigeration simulation // because of dependence of performance on total condenser load NumSimulationSharedCondensers = 0; NumUnusedCondensers = 0; - for (CondNum = 1; CondNum <= NumRefrigCondensers; ++CondNum) { + for (CondNum = 1; CondNum <= DataHeatBalance::NumRefrigCondensers; ++CondNum) { if (Condenser(CondNum).NumSysAttach == 1) continue; if (Condenser(CondNum).NumSysAttach < 1) { ++NumUnusedCondensers; @@ -6377,7 +6360,7 @@ namespace RefrigeratedCase { ShowContinueError(" These unused refrigeration condensers will not be simulated."); ShowContinueError(" Use Output:Diagnostics,DisplayUnusedObjects; to see them. "); } // NumUnusedCondensers and displayextra warnings - } // NumRefrigCondensers > 0 + } // DataHeatBalance::NumRefrigCondensers > 0 if (NumSimulationGasCooler > 0) { // Check for presence of shared gas coolers and for unused gas coolers @@ -6428,24 +6411,6 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Set up the report variables. - // METHODOLOGY EMPLOYED: - - // REFERENCES: - // na - - // Using/Aliasing - using DataHeatBalance::IntGainTypeOf_RefrigerationCase; - using DataHeatBalance::IntGainTypeOf_RefrigerationCompressorRack; - using DataHeatBalance::IntGainTypeOf_RefrigerationSecondaryPipe; - using DataHeatBalance::IntGainTypeOf_RefrigerationSecondaryReceiver; - using DataHeatBalance::IntGainTypeOf_RefrigerationSystemAirCooledCondenser; - using DataHeatBalance::IntGainTypeOf_RefrigerationSystemSuctionPipe; - using DataHeatBalance::IntGainTypeOf_RefrigerationTransSysAirCooledGasCooler; - using DataHeatBalance::IntGainTypeOf_RefrigerationTransSysSuctionPipeLT; - using DataHeatBalance::IntGainTypeOf_RefrigerationTransSysSuctionPipeMT; - using DataHeatBalance::IntGainTypeOf_RefrigerationWalkIn; - using DataHeatBalance::Zone; - static int CaseNum(0); static int CoilNum(0); static int SecondNum(0); @@ -6689,7 +6654,7 @@ namespace RefrigeratedCase { SetupZoneInternalGain(RefrigCase(CaseNum).ActualZoneNum, "Refrigeration:Case", RefrigCase(CaseNum).Name, - IntGainTypeOf_RefrigerationCase, + DataHeatBalance::IntGainTypeOf_RefrigerationCase, RefrigCase(CaseNum).SensZoneCreditRate, RefrigCase(CaseNum).SensHVACCreditRate, _, @@ -6878,7 +6843,7 @@ namespace RefrigeratedCase { SetupZoneInternalGain(WalkIn(WalkInNum).ZoneNum(ZoneID), "Refrigeration:WalkIn", Walkin_and_zone_name, - IntGainTypeOf_RefrigerationWalkIn, + DataHeatBalance::IntGainTypeOf_RefrigerationWalkIn, WalkIn(WalkInNum).SensZoneCreditRate(ZoneID), _, _, @@ -7066,76 +7031,76 @@ namespace RefrigeratedCase { if (HaveCasesOrWalkins) { SetupOutputVariable("Refrigeration Zone Case and Walk In Total Sensible Cooling Rate", OutputProcessor::Unit::W, - RefrigCaseCredit(ZoneID).SenCaseCreditToZone, + DataHeatBalance::RefrigCaseCredit(ZoneID).SenCaseCreditToZone, "Zone", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Sensible Cooling Energy", OutputProcessor::Unit::J, CaseWIZoneReport(ZoneID).SenCaseCreditToZoneEnergy, "Zone", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Heating Rate", OutputProcessor::Unit::W, CaseWIZoneReport(ZoneID).HeatingToZoneRate, "Zone", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Heating Energy", OutputProcessor::Unit::J, CaseWIZoneReport(ZoneID).HeatingToZoneEnergy, "Zone", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Sensible Cooling Rate", OutputProcessor::Unit::W, CaseWIZoneReport(ZoneID).SenCoolingToZoneRate, "Zone", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Sensible Cooling Energy", OutputProcessor::Unit::J, CaseWIZoneReport(ZoneID).SenCoolingToZoneEnergy, "Zone", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Latent Cooling Rate", OutputProcessor::Unit::W, CaseWIZoneReport(ZoneID).LatCoolingToZoneRate, "Zone", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Latent Cooling Energy", OutputProcessor::Unit::J, CaseWIZoneReport(ZoneID).LatCoolingToZoneEnergy, "Zone", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Cooling Rate", OutputProcessor::Unit::W, CaseWIZoneReport(ZoneID).TotCoolingToZoneRate, "Zone", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Cooling Energy", OutputProcessor::Unit::J, CaseWIZoneReport(ZoneID).TotCoolingToZoneEnergy, "Zone", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Heat Transfer Rate", OutputProcessor::Unit::W, CaseWIZoneReport(ZoneID).TotHtXferToZoneRate, "Zone", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Heat Transfer Energy", OutputProcessor::Unit::J, CaseWIZoneReport(ZoneID).TotHtXferToZoneEnergy, "Zone", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); } // HaveCasesOrWalkIns if (HaveChillers) { @@ -7144,67 +7109,67 @@ namespace RefrigeratedCase { CoilSysCredit(ZoneID).SenCreditToZoneRate, "HVAC", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Heat Transfer Energy", OutputProcessor::Unit::J, CoilSysCredit(ZoneID).SenCreditToZoneEnergy, "HVAC", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Cooling Rate", OutputProcessor::Unit::W, CoilSysCredit(ZoneID).ReportSenCoolingToZoneRate, "HVAC", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Cooling Energy", OutputProcessor::Unit::J, CoilSysCredit(ZoneID).ReportSenCoolingToZoneEnergy, "HVAC", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Latent Cooling Rate", OutputProcessor::Unit::W, CoilSysCredit(ZoneID).ReportLatCreditToZoneRate, "HVAC", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Latent Cooling Energy", OutputProcessor::Unit::J, CoilSysCredit(ZoneID).ReportLatCreditToZoneEnergy, "HVAC", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Water Removed Mass Flow Rate", OutputProcessor::Unit::kg_s, CoilSysCredit(ZoneID).ReportH20RemovedKgPerS_FromZoneRate, "HVAC", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Cooling Rate", OutputProcessor::Unit::W, CoilSysCredit(ZoneID).ReportTotCoolingToZoneRate, "HVAC", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Cooling Energy", OutputProcessor::Unit::J, CoilSysCredit(ZoneID).ReportTotCoolingToZoneEnergy, "HVAC", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Heating Rate", OutputProcessor::Unit::W, CoilSysCredit(ZoneID).ReportHeatingToZoneRate, "HVAC", "Average", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Heating Energy", OutputProcessor::Unit::J, CoilSysCredit(ZoneID).ReportHeatingToZoneEnergy, "HVAC", "Sum", - Zone(ZoneID).Name); + DataHeatBalance::Zone(ZoneID).Name); } // HaveChillers } // RefrigPresentInZone(ZoneID) } // ZoneID @@ -7374,14 +7339,14 @@ namespace RefrigeratedCase { SetupZoneInternalGain(Secondary(SecondNum).ReceiverZoneNum, "Refrigeration:SecondarySystem:Receiver", Secondary(SecondNum).Name, - IntGainTypeOf_RefrigerationSecondaryReceiver, + DataHeatBalance::IntGainTypeOf_RefrigerationSecondaryReceiver, Secondary(SecondNum).ReceiverZoneHeatGain); } if (Secondary(SecondNum).DistPipeZoneNum > 0) { SetupZoneInternalGain(Secondary(SecondNum).DistPipeZoneNum, "Refrigeration:SecondarySystem:Pipe", Secondary(SecondNum).Name, - IntGainTypeOf_RefrigerationSecondaryPipe, + DataHeatBalance::IntGainTypeOf_RefrigerationSecondaryPipe, Secondary(SecondNum).DistPipeZoneHeatGain); } } // not an unused @@ -7389,9 +7354,9 @@ namespace RefrigeratedCase { } // NumSimulationSecondarySystems > 0 // Setup Report Variables for Refrigeration Compressor Rack - if (NumRefrigeratedRacks > 0) { + if (DataHeatBalance::NumRefrigeratedRacks > 0) { // CurrentModuleObject='Refrigeration:CompressorRack' - for (RackNum = 1; RackNum <= NumRefrigeratedRacks; ++RackNum) { + for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).CoilFlag) { // rack serves chillers and is solved on HVAC time step SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Electric Power", OutputProcessor::Unit::W, @@ -7451,7 +7416,7 @@ namespace RefrigeratedCase { "Average", RefrigRack(RackNum).Name); - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Pump Electric Power", OutputProcessor::Unit::W, RefrigRack(RackNum).ActualEvapPumpPower, @@ -7535,7 +7500,7 @@ namespace RefrigeratedCase { SetupZoneInternalGain(RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum, "Refrigeration:CompressorRack", RefrigRack(RackNum).Name, - IntGainTypeOf_RefrigerationCompressorRack, + DataHeatBalance::IntGainTypeOf_RefrigerationCompressorRack, RefrigRack(RackNum).SensZoneCreditHeatRate, RefrigRack(RackNum).SensHVACCreditHeatRate); @@ -7601,7 +7566,7 @@ namespace RefrigeratedCase { "Average", RefrigRack(RackNum).Name); - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Pump Electric Power", OutputProcessor::Unit::W, RefrigRack(RackNum).ActualEvapPumpPower, @@ -7684,14 +7649,14 @@ namespace RefrigeratedCase { SetupZoneInternalGain(RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum, "Refrigeration:CompressorRack", RefrigRack(RackNum).Name, - IntGainTypeOf_RefrigerationCompressorRack, + DataHeatBalance::IntGainTypeOf_RefrigerationCompressorRack, RefrigRack(RackNum).SensZoneCreditHeatRate, RefrigRack(RackNum).SensHVACCreditHeatRate); } // location zone } // Serves coils or case/walkin loads - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeWater) { // on HVAC time step no matter what + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { // on HVAC time step no matter what SetupOutputVariable("Refrigeration Compressor Rack Condenser Mass Flow Rate", OutputProcessor::Unit::kg_s, RefrigRack(RackNum).MassFlowRate, @@ -7722,9 +7687,9 @@ namespace RefrigeratedCase { } // Refrigerated Racks } // NumRefrigeratedRacks > 0 - if (NumRefrigSystems > 0) { + if (DataHeatBalance::NumRefrigSystems > 0) { // CurrentModuleObject='Refrigeration:System' - for (RefrigSysNum = 1; RefrigSysNum <= NumRefrigSystems; ++RefrigSysNum) { + for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { if (System(RefrigSysNum).CoilFlag) { // system serves chillers and is solved on HVAC time step if (System(RefrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration Air Chiller System Total Compressor Electric Power", @@ -8164,14 +8129,14 @@ namespace RefrigeratedCase { SetupZoneInternalGain(Condenser(System(RefrigSysNum).CondenserNum(1)).InletAirZoneNum, "Refrigeration:System:Condenser:AirCooled", System(RefrigSysNum).Name, - IntGainTypeOf_RefrigerationSystemAirCooledCondenser, + DataHeatBalance::IntGainTypeOf_RefrigerationSystemAirCooledCondenser, System(RefrigSysNum).NetHeatRejectLoad); if (System(RefrigSysNum).SuctionPipeActualZoneNum > 0) SetupZoneInternalGain(System(RefrigSysNum).SuctionPipeActualZoneNum, "Refrigeration:System:SuctionPipe", System(RefrigSysNum).Name, - IntGainTypeOf_RefrigerationSystemSuctionPipe, + DataHeatBalance::IntGainTypeOf_RefrigerationSystemSuctionPipe, System(RefrigSysNum).PipeHeatLoad); } } // numrefrigsystems @@ -8257,7 +8222,7 @@ namespace RefrigeratedCase { } // CompNum on NumSimulationCompressors // Report Variables for Refrigeration Condensers - for (CondNum = 1; CondNum <= NumRefrigCondensers; ++CondNum) { + for (CondNum = 1; CondNum <= DataHeatBalance::NumRefrigCondensers; ++CondNum) { // CurrentModuleObject='Refrigeration:Condenser:*' if (Condenser(CondNum).CoilFlag) { // Condenser serving system with chillers on HVAC time step SetupOutputVariable("Refrigeration Air Chiller System Condenser Heat Transfer Rate", @@ -8273,7 +8238,7 @@ namespace RefrigeratedCase { "Sum", Condenser(CondNum).Name); - if (Condenser(CondNum).CondenserType != RefrigCondenserTypeCascade) { + if (Condenser(CondNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Total Recovered Heat Transfer Rate", OutputProcessor::Unit::W, Condenser(CondNum).TotalHeatRecoveredLoad, @@ -8312,7 +8277,7 @@ namespace RefrigeratedCase { Condenser(CondNum).Name); } // not cascade because recovered energy on cascade systems passed up to higher temperature system - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeAir) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Fan Electric Power", OutputProcessor::Unit::W, Condenser(CondNum).ActualFanPower, @@ -8332,7 +8297,7 @@ namespace RefrigeratedCase { "Plant"); } // Air cooled - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeEvap) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Fan Electric Power", OutputProcessor::Unit::W, Condenser(CondNum).ActualFanPower, @@ -8403,7 +8368,7 @@ namespace RefrigeratedCase { "Plant"); } // Evaporative Condenser Variables - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeWater) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Fluid Mass Flow Rate", OutputProcessor::Unit::kg_s, Condenser(CondNum).MassFlowRate, @@ -8428,7 +8393,7 @@ namespace RefrigeratedCase { "Sum", Condenser(CondNum).Name); - if (Condenser(CondNum).CondenserType != RefrigCondenserTypeCascade) { + if (Condenser(CondNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { SetupOutputVariable("Refrigeration System Condenser Total Recovered Heat Transfer Rate", OutputProcessor::Unit::W, Condenser(CondNum).TotalHeatRecoveredLoad, @@ -8467,7 +8432,7 @@ namespace RefrigeratedCase { Condenser(CondNum).Name); } // not cascade because recovered energy on cascade systems passed up to higher temperature system - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeAir) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { SetupOutputVariable("Refrigeration System Condenser Fan Electric Power", OutputProcessor::Unit::W, Condenser(CondNum).ActualFanPower, @@ -8487,7 +8452,7 @@ namespace RefrigeratedCase { "Plant"); } // Air cooled - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeEvap) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration System Condenser Fan Electric Power", OutputProcessor::Unit::W, Condenser(CondNum).ActualFanPower, @@ -8558,7 +8523,7 @@ namespace RefrigeratedCase { "Plant"); } // Evaporative Condenser Variables - if (Condenser(CondNum).CondenserType == RefrigCondenserTypeWater) { + if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { SetupOutputVariable("Refrigeration System Condenser Water Mass Flow Rate", OutputProcessor::Unit::kg_s, Condenser(CondNum).MassFlowRate, @@ -8568,7 +8533,7 @@ namespace RefrigeratedCase { } // Water-cooled Condenser variables } // Condenser%CoilFlag to distinguish HVAC vs Zone time steps - } // CondNum on NumRefrigCondensers + } // CondNum on DataHeatBalance::NumRefrigCondensers if (NumSimulationSubcoolers > 0) { for (SubcoolNum = 1; SubcoolNum <= NumSimulationSubcoolers; ++SubcoolNum) { @@ -8783,21 +8748,21 @@ namespace RefrigeratedCase { SetupZoneInternalGain(GasCooler(TransSystem(RefrigSysNum).GasCoolerNum(1)).InletAirZoneNum, "Refrigeration:TranscriticalSystem:GasCooler:AirCooled", TransSystem(RefrigSysNum).Name, - IntGainTypeOf_RefrigerationTransSysAirCooledGasCooler, + DataHeatBalance::IntGainTypeOf_RefrigerationTransSysAirCooledGasCooler, TransSystem(RefrigSysNum).NetHeatRejectLoad); } // (TransSystem(RefrigSysNum)%SystemRejectHeatToZone) if (TransSystem(RefrigSysNum).SuctionPipeActualZoneNumMT > 0) { SetupZoneInternalGain(TransSystem(RefrigSysNum).SuctionPipeActualZoneNumMT, "Refrigeration:TranscriticalSystem:SuctionPipeMT", TransSystem(RefrigSysNum).Name, - IntGainTypeOf_RefrigerationTransSysSuctionPipeMT, + DataHeatBalance::IntGainTypeOf_RefrigerationTransSysSuctionPipeMT, TransSystem(RefrigSysNum).PipeHeatLoadMT); } // TransSystem(RefrigSysNum)%SuctionPipeActualZoneNumMT > 0 if (TransSystem(RefrigSysNum).SuctionPipeActualZoneNumLT > 0) { SetupZoneInternalGain(TransSystem(RefrigSysNum).SuctionPipeActualZoneNumLT, "Refrigeration:TranscriticalSystem:SuctionPipeLT", TransSystem(RefrigSysNum).Name, - IntGainTypeOf_RefrigerationTransSysSuctionPipeLT, + DataHeatBalance::IntGainTypeOf_RefrigerationTransSysSuctionPipeLT, TransSystem(RefrigSysNum).PipeHeatLoadLT); } // TransSystem(RefrigSysNum)%SuctionPipeActualZoneNumLT > 0 @@ -9020,8 +8985,8 @@ namespace RefrigeratedCase { // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is false if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - for (int i = RefrigCaseCredit.l(), e = RefrigCaseCredit.u(); i <= e; ++i) { - RefrigCaseCredit(i).reset(); + for (int i = DataHeatBalance::RefrigCaseCredit.l(), e = DataHeatBalance::RefrigCaseCredit.u(); i <= e; ++i) { + DataHeatBalance::RefrigCaseCredit(i).reset(); } for (int i = CaseWIZoneReport.l(), e = CaseWIZoneReport.u(); i <= e; ++i) { CaseWIZoneReport(i).reset(); @@ -9057,20 +9022,20 @@ namespace RefrigeratedCase { for (int i = RefrigRack.l(), e = RefrigRack.u(); i <= e; ++i) { RefrigRack(i).reset_init(); } - for (auto &e : HeatReclaimRefrigeratedRack) + for (auto &e : DataHeatBalance::HeatReclaimRefrigeratedRack) e.AvailCapacity = 0.0; // Note don't reset basin heat to zero when no load because heater would remain on // RefrigRack.BasinHeaterPower = 0.0; // RefrigRack.BasinHeaterConsumption = 0.0; } - if (NumRefrigCondensers > 0) { - // Condenser ALLOCATED to NumRefrigCondensers + if (DataHeatBalance::NumRefrigCondensers > 0) { + // Condenser ALLOCATED to DataHeatBalance::NumRefrigCondensers for (int i = Condenser.l(), e = Condenser.u(); i <= e; ++i) { Condenser(i).reset_init(); } // N don't reset basin heat to zero when no load because heater would remain on - for (auto &e : HeatReclaimRefrigCondenser) { + for (auto &e : DataHeatBalance::HeatReclaimRefrigCondenser) { e.AvailCapacity = 0.0; e.AvailTemperature = 0.0; } @@ -9120,7 +9085,7 @@ namespace RefrigeratedCase { RefrigCase(i).reset_init_accum(); } } - if (NumRefrigSystems > 0) { + if (DataHeatBalance::NumRefrigSystems > 0) { for (auto &e : System) e.UnmetEnergy = 0.0; } @@ -9147,8 +9112,8 @@ namespace RefrigeratedCase { for (auto &e : Secondary) e.UnmetEnergy = 0.0; } - if (NumRefrigeratedRacks > 0) { - for (auto &e : HeatReclaimRefrigeratedRack) { + if (DataHeatBalance::NumRefrigeratedRacks > 0) { + for (auto &e : DataHeatBalance::HeatReclaimRefrigeratedRack) { e.UsedHVACCoil = 0.0; e.UsedWaterHeater = 0.0; } @@ -9157,8 +9122,8 @@ namespace RefrigeratedCase { e.LaggedUsedHVACCoil = 0.0; } } - if (NumRefrigCondensers > 0) { - for (auto &e : HeatReclaimRefrigCondenser) { + if (DataHeatBalance::NumRefrigCondensers > 0) { + for (auto &e : DataHeatBalance::HeatReclaimRefrigCondenser) { e.UsedHVACCoil = 0.0; e.UsedWaterHeater = 0.0; } @@ -9167,7 +9132,7 @@ namespace RefrigeratedCase { e.LaggedUsedHVACCoil = 0.0; } } - for (SystemID = 1; SystemID <= NumRefrigSystems; ++SystemID) { + for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { if (allocated(System(SystemID).MechSCLoad)) System(SystemID).MechSCLoad = 0.0; System(SystemID).LSHXTrans = 0.0; System(SystemID).LSHXTransEnergy = 0.0; @@ -9203,8 +9168,8 @@ namespace RefrigeratedCase { WalkIn(WalkInID).IceTemp = WalkIn(WalkInID).IceTempSaved; } } - if (NumRefrigSystems > 0) { - for (SystemID = 1; SystemID <= NumRefrigSystems; ++SystemID) { + if (DataHeatBalance::NumRefrigSystems > 0) { + for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { if (System(SystemID).CoilFlag) continue; System(SystemID).UnmetEnergy = System(SystemID).UnmetEnergySaved; } @@ -9241,8 +9206,8 @@ namespace RefrigeratedCase { WalkIn(WalkInID).IceTempSaved = WalkIn(WalkInID).IceTemp; } } - if (NumRefrigSystems > 0) { - for (SystemID = 1; SystemID <= NumRefrigSystems; ++SystemID) { + if (DataHeatBalance::NumRefrigSystems > 0) { + for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { if (System(SystemID).CoilFlag) continue; System(SystemID).UnmetEnergySaved = System(SystemID).UnmetEnergy; } @@ -9260,16 +9225,16 @@ namespace RefrigeratedCase { } } // Following lagged variables set for consistency to value calculated prev time through HVAC time step loops - if (allocated(HeatReclaimRefrigeratedRack)) { - for (IRack = 1; IRack <= NumRefrigeratedRacks; ++IRack) { - RefrigRack(IRack).LaggedUsedHVACCoil = HeatReclaimRefrigeratedRack(IRack).UsedHVACCoil; - RefrigRack(IRack).LaggedUsedWaterHeater = HeatReclaimRefrigeratedRack(IRack).UsedWaterHeater; + if (allocated(DataHeatBalance::HeatReclaimRefrigeratedRack)) { + for (IRack = 1; IRack <= DataHeatBalance::NumRefrigeratedRacks; ++IRack) { + RefrigRack(IRack).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedHVACCoil; + RefrigRack(IRack).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedWaterHeater; } } - if (allocated(HeatReclaimRefrigCondenser)) { - for (ICond = 1; ICond <= NumRefrigCondensers; ++ICond) { - Condenser(ICond).LaggedUsedHVACCoil = HeatReclaimRefrigCondenser(ICond).UsedHVACCoil; - Condenser(ICond).LaggedUsedWaterHeater = HeatReclaimRefrigCondenser(ICond).UsedWaterHeater; + if (allocated(DataHeatBalance::HeatReclaimRefrigCondenser)) { + for (ICond = 1; ICond <= DataHeatBalance::NumRefrigCondensers; ++ICond) { + Condenser(ICond).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedHVACCoil; + Condenser(ICond).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedWaterHeater; } } } // repeating same time step @@ -9295,16 +9260,16 @@ namespace RefrigeratedCase { } } // Following lagged variables set for consistency to value calculated prev time through HVAC time step loops - if (allocated(HeatReclaimRefrigeratedRack)) { - for (IRack = 1; IRack <= NumRefrigeratedRacks; ++IRack) { - RefrigRack(IRack).LaggedUsedHVACCoil = HeatReclaimRefrigeratedRack(IRack).UsedHVACCoil; - RefrigRack(IRack).LaggedUsedWaterHeater = HeatReclaimRefrigeratedRack(IRack).UsedWaterHeater; + if (allocated(DataHeatBalance::HeatReclaimRefrigeratedRack)) { + for (IRack = 1; IRack <= DataHeatBalance::NumRefrigeratedRacks; ++IRack) { + RefrigRack(IRack).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedHVACCoil; + RefrigRack(IRack).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedWaterHeater; } } - if (allocated(HeatReclaimRefrigCondenser)) { - for (ICond = 1; ICond <= NumRefrigCondensers; ++ICond) { - Condenser(ICond).LaggedUsedHVACCoil = HeatReclaimRefrigCondenser(ICond).UsedHVACCoil; - Condenser(ICond).LaggedUsedWaterHeater = HeatReclaimRefrigCondenser(ICond).UsedWaterHeater; + if (allocated(DataHeatBalance::HeatReclaimRefrigCondenser)) { + for (ICond = 1; ICond <= DataHeatBalance::NumRefrigCondensers; ++ICond) { + Condenser(ICond).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedHVACCoil; + Condenser(ICond).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedWaterHeater; } } } // if first time @@ -9313,8 +9278,8 @@ namespace RefrigeratedCase { } // warm up flag if (AnyEnergyManagementSystemInModel) { - if (NumRefrigSystems > 0) { - for (SystemID = 1; SystemID <= NumRefrigSystems; ++SystemID) { + if (DataHeatBalance::NumRefrigSystems > 0) { + for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { if (System(SystemID).EMSOverrideOnTCondenseMin) { System(SystemID).TCondenseMin = System(SystemID).EMSOverrideValueTCondenseMin; } else { @@ -9353,8 +9318,8 @@ namespace RefrigeratedCase { // initialize plant topology information, if applicable if (MyReferPlantScanFlag && allocated(PlantLoop)) { - for (RefCondLoop = 1; RefCondLoop <= NumRefrigCondensers; ++RefCondLoop) { - if (Condenser(RefCondLoop).CondenserType != RefrigCondenserTypeWater) continue; + for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { + if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; errFlag = false; ScanPlantLoopsForObject(Condenser(RefCondLoop).Name, @@ -9385,8 +9350,8 @@ namespace RefrigeratedCase { } } - for (RefCompRackLoop = 1; RefCompRackLoop <= NumRefrigeratedRacks; ++RefCompRackLoop) { - if (RefrigRack(RefCompRackLoop).CondenserType != RefrigCondenserTypeWater) continue; + for (RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { + if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; errFlag = false; ScanPlantLoopsForObject(RefrigRack(RefCompRackLoop).Name, @@ -9426,8 +9391,8 @@ namespace RefrigeratedCase { // do plant inits, if applicable if (!MyReferPlantScanFlag) { - for (RefCondLoop = 1; RefCondLoop <= NumRefrigCondensers; ++RefCondLoop) { - if (Condenser(RefCondLoop).CondenserType != RefrigCondenserTypeWater) continue; + for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { + if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; rho = GetDensityGlycol(PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, @@ -9449,8 +9414,8 @@ namespace RefrigeratedCase { Condenser(RefCondLoop).PlantBranchNum, Condenser(RefCondLoop).PlantCompNum); } - for (RefCompRackLoop = 1; RefCompRackLoop <= NumRefrigeratedRacks; ++RefCompRackLoop) { - if (RefrigRack(RefCompRackLoop).CondenserType != RefrigCondenserTypeWater) continue; + for (RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { + if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; rho = GetDensityGlycol(PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, @@ -9563,7 +9528,7 @@ namespace RefrigeratedCase { // however, be repeated when the last chiller set is called from ZoneEquipmentManager // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { - for (CoilSetIndex = 1; CoilSetIndex <= NumRefrigChillerSets; ++CoilSetIndex) { + for (CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { CoilSetID = CoilSetIndex; CalculateAirChillerSets(CoilSetID); } @@ -9645,7 +9610,7 @@ namespace RefrigeratedCase { // check. if (OutDbTemp < EvapCutOutTdb) EvapAvail = false; - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && EvapAvail) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { // determine temps for evap cooling if (RefrigRack(RackNum).OutsideAirNodeNum != 0) { HumRatIn = Node(RefrigRack(RackNum).OutsideAirNodeNum).HumRat; @@ -9657,7 +9622,7 @@ namespace RefrigeratedCase { } // evapAvail // Obtain water-cooled condenser inlet/outlet temps - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeWater) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { InletNode = RefrigRack(RackNum).InletNode; OutletNode = RefrigRack(RackNum).OutletNode; RefrigRack(RackNum).InletTemp = Node(InletNode).Temp; @@ -9674,7 +9639,7 @@ namespace RefrigeratedCase { RefrigRack(RackNum).LowTempWarnIndex); // END IF !LowTempWarn } // InletTempMin - } // RefrigCondenserTypeWater + } // DataHeatBalance::RefrigCondenserTypeWater COPFTempOutput = CurveValue(RefrigRack(RackNum).COPFTempPtr, EffectTemp); } // Location Zone @@ -9695,12 +9660,12 @@ namespace RefrigeratedCase { // calculate condenser fan usage here if not water-cooled; if water-cooled, fan is in separate tower object // fan loads > 0 only if the connected cases are operating - if (TotalRackDeliveredCapacity > 0.0 && RefrigRack(RackNum).CondenserType != RefrigCondenserTypeWater) { + if (TotalRackDeliveredCapacity > 0.0 && RefrigRack(RackNum).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) { if (RefrigRack(RackNum).TotCondFTempPtr != 0) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { CondenserFrac = max(0.0, min(1.0, CurveValue(RefrigRack(RackNum).TotCondFTempPtr, Node(HeatRejectZoneNodeNum).Temp))); TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; - RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RefrigRack(RackNum).CondenserFanPower * CondenserFrac; + DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RefrigRack(RackNum).CondenserFanPower * CondenserFrac; } else { CondenserFrac = max(0.0, min(1.0, CurveValue(RefrigRack(RackNum).TotCondFTempPtr, EffectTemp))); TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; @@ -9713,14 +9678,14 @@ namespace RefrigeratedCase { // calculate evap water use and water pump power, if applicable // assumes pump runs whenever evap cooling is available to minimize scaling - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap && EvapAvail) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { TotalCondenserPumpPower = RefrigRack(RackNum).EvapPumpPower; HumRatOut = PsyWFnTdbTwbPb(EffectTemp, OutWbTemp, BPress); TotalEvapWaterUseRate = RefrigRack(RackNum).CondenserAirFlowRate * CondenserFrac * PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn) * (HumRatOut - HumRatIn) / RhoH2O(EffectTemp); } // evapAvail // calculate basin water heater load - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if ((TotalRackDeliveredCapacity == 0.0) && (EvapAvail) && (OutDbTemp < RefrigRack(RackNum).BasinHeaterSetPointTemp)) { TotalBasinHeatPower = max(0.0, RefrigRack(RackNum).BasinHeaterPowerFTempDiff * (RefrigRack(RackNum).BasinHeaterSetPointTemp - OutDbTemp)); @@ -9757,9 +9722,9 @@ namespace RefrigeratedCase { RackSenCreditToHVAC = 0.0; } // walkins present // Update globals for use in Air Heat Balance and Zone Equipment Manager - RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RackSenCreditToZone; + DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RackSenCreditToZone; - RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToHVAC += RackSenCreditToHVAC; + DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToHVAC += RackSenCreditToHVAC; } // zone # > 0 and tot del cap > 0 } // rack heat rejection to zone } @@ -9807,9 +9772,9 @@ namespace RefrigeratedCase { RefrigRack(RackNum).CondEnergy = TotalCondenserHeat * LocalTimeStep * SecInHour; // Set total rack heat rejection used for heat reclaim. Do not allow heat reclaim on stand alone (indoor) display cases. if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = 0.0; + DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = 0.0; } else { - HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = TotalRackDeliveredCapacity * (1.0 + 1.0 / CompressorCOPactual); + DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = TotalRackDeliveredCapacity * (1.0 + 1.0 / CompressorCOPactual); } // set water system demand request (if needed) @@ -10195,10 +10160,10 @@ namespace RefrigeratedCase { CaseSenCreditToHVAC = SensibleCaseCredit * CaseRAFactor; CaseLatCreditToHVAC = LatentCaseCredit * CaseRAFactor; - RefrigCaseCredit(ActualZoneNum).SenCaseCreditToZone += CaseSenCreditToZone; - RefrigCaseCredit(ActualZoneNum).LatCaseCreditToZone += CaseLatCreditToZone; - RefrigCaseCredit(ActualZoneNum).SenCaseCreditToHVAC += CaseSenCreditToHVAC; - RefrigCaseCredit(ActualZoneNum).LatCaseCreditToHVAC += CaseLatCreditToHVAC; + DataHeatBalance::RefrigCaseCredit(ActualZoneNum).SenCaseCreditToZone += CaseSenCreditToZone; + DataHeatBalance::RefrigCaseCredit(ActualZoneNum).LatCaseCreditToZone += CaseLatCreditToZone; + DataHeatBalance::RefrigCaseCredit(ActualZoneNum).SenCaseCreditToHVAC += CaseSenCreditToHVAC; + DataHeatBalance::RefrigCaseCredit(ActualZoneNum).LatCaseCreditToHVAC += CaseLatCreditToHVAC; // ReportRefrigeratedCase(CaseID) RefrigCase(CaseID).TotalCoolingLoad = TotalCap_Actual; @@ -10397,9 +10362,9 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { - if (Num > NumRefrigeratedRacks || Num < 1) { + if (Num > DataHeatBalance::NumRefrigeratedRacks || Num < 1) { ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + TrimSigDigits(Num) + - ", Number of Units=" + TrimSigDigits(NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); + ", Number of Units=" + TrimSigDigits(DataHeatBalance::NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); } if (CheckEquipNameRackWaterCondenser(Num)) { if (CompName != RefrigRack(Num).Name) { @@ -10410,9 +10375,9 @@ namespace RefrigeratedCase { } } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { - if (Num > NumRefrigCondensers || Num < 1) { + if (Num > DataHeatBalance::NumRefrigCondensers || Num < 1) { ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + TrimSigDigits(Num) + - ", Number of Units=" + TrimSigDigits(NumRefrigCondensers) + ", Entered Unit name=" + CompName); + ", Number of Units=" + TrimSigDigits(DataHeatBalance::NumRefrigCondensers) + ", Entered Unit name=" + CompName); } if (CheckEquipNameWaterCondenser(Num)) { if (CompName != Condenser(Num).Name) { @@ -10445,7 +10410,7 @@ namespace RefrigeratedCase { PlantCompIndex = RefrigRack(Num).PlantCompNum; TotalCondenserHeat = - HeatReclaimRefrigeratedRack(Num).AvailCapacity - RefrigRack(Num).LaggedUsedWaterHeater - RefrigRack(Num).LaggedUsedHVACCoil; + DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - RefrigRack(Num).LaggedUsedWaterHeater - RefrigRack(Num).LaggedUsedHVACCoil; FlowType = RefrigRack(Num).FlowType; InletTemp = RefrigRack(Num).InletTemp; // HighFlowWarn = RefrigRack(Num)%HighFlowWarn @@ -10712,7 +10677,7 @@ namespace RefrigeratedCase { // however, be repeated when the last chiller set is called from ZoneEquipmentManager // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { - for (CoilSetIndex = 1; CoilSetIndex <= NumRefrigChillerSets; ++CoilSetIndex) { + for (CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { CoilSetID = CoilSetIndex; CalculateAirChillerSets(CoilSetID); } @@ -10721,7 +10686,7 @@ namespace RefrigeratedCase { // Do refrigeration system loop outside of iterative solution to initialize time step and // calculate case, walk-in, and secondary loop loads (that won't change during balance // of refrigeration system iterations) and prepare initial estimates for the iterative system solution - for (SysNum = 1; SysNum <= NumRefrigSystems; ++SysNum) { + for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if (((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) { if (System(SysNum).NumCases > 0) { @@ -10833,7 +10798,7 @@ namespace RefrigeratedCase { } // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= System(SysNum).PipeHeatLoad; + DataHeatBalance::RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= System(SysNum).PipeHeatLoad; } // UseSysTimeStep } } //(((.NOT. UseSysTimeStep).AND.(.NOT. System(SysNum)%CoilFlag)).OR.((UseSysTimeStep).AND.(System(SysNum)%CoilFlag))) @@ -10852,7 +10817,7 @@ namespace RefrigeratedCase { for (LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { // Note, for cascade cond loads compared requiring 5 iterations to 3, no difference. - for (SysNum = 1; SysNum <= NumRefrigSystems; ++SysNum) { + for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if (((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) { System(SysNum).SumMechSCLoad = 0.0; @@ -10927,16 +10892,16 @@ namespace RefrigeratedCase { // Establish estimates to start solution loop { auto const SELECT_CASE_var(Condenser(System(SysNum).CondenserNum(1)).CondenserType); // only one condenser allowed now - if (SELECT_CASE_var == RefrigCondenserTypeAir) { + if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { System(SysNum).TCondense = OutDryBulbTemp + 16.7; // 16.7C is delta T at rating point for air-cooled condensers, just estimate, so ok for zone-located condensers - } else if (SELECT_CASE_var == RefrigCondenserTypeEvap) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { System(SysNum).TCondense = OutDryBulbTemp + 15.0; // 15C is delta T at rating point for evap-cooled condensers - } else if (SELECT_CASE_var == RefrigCondenserTypeWater) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { // define starting estimate at temperature of water exiting condenser System(SysNum).TCondense = Node(Condenser(System(SysNum).CondenserNum(1)).OutletNode).Temp; - } else if (SELECT_CASE_var == RefrigCondenserTypeCascade) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeCascade) { //?Don't need estimate for cascade condenser because it doesn't iterate? } } @@ -11001,7 +10966,7 @@ namespace RefrigeratedCase { // or cascade condensers or shared condensers or warehouse coils that might need to be de-rated // Dealing with unmet load has to be done outside iterative loop - for (SysNum = 1; SysNum <= NumRefrigSystems; ++SysNum) { + for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && (!WarmupFlag)) { CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet @@ -11051,7 +11016,7 @@ namespace RefrigeratedCase { } // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += System(SysNum).NetHeatRejectLoad; // Adding heat is positive + DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += System(SysNum).NetHeatRejectLoad; // Adding heat is positive } // UseSystimestep } // Reject heat to zone @@ -11195,7 +11160,7 @@ namespace RefrigeratedCase { SuctionPipeActualZoneNum = TransSystem(SysNum).SuctionPipeActualZoneNumMT; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= TransSystem(SysNum).PipeHeatLoadMT; + DataHeatBalance::RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= TransSystem(SysNum).PipeHeatLoadMT; } // UseSysTimeStep } @@ -11209,7 +11174,7 @@ namespace RefrigeratedCase { SuctionPipeActualZoneNum = TransSystem(SysNum).SuctionPipeActualZoneNumLT; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= TransSystem(SysNum).PipeHeatLoadLT; + DataHeatBalance::RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= TransSystem(SysNum).PipeHeatLoadLT; } // UseSysTimeStep } @@ -11308,7 +11273,7 @@ namespace RefrigeratedCase { CondInletAirZoneNum = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).InletAirZoneNum; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += TransSystem(SysNum).NetHeatRejectLoad; // Adding heat is positive + DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += TransSystem(SysNum).NetHeatRejectLoad; // Adding heat is positive } // UseSystimestep } // Reject heat to zone @@ -11606,7 +11571,7 @@ namespace RefrigeratedCase { } // Sysloop over every system connected to this condenser // for cascade condensers, condenser defrost credit gets passed on to the primary system condenser - if (condenser.CondenserType == RefrigCondenserTypeCascade) TotalCondDefrostCredit = 0.0; + if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) TotalCondDefrostCredit = 0.0; // Calculate Total Heat rejection needed. Assume hermetic compressors - conservative assumption // Note that heat rejection load carried by desuperheater hvac coils or water heaters is the @@ -11644,7 +11609,7 @@ namespace RefrigeratedCase { // Here, we just need load and condensing temperatures. // Condensing temperature a fixed delta (the rated approach temperature) from inlet water temp so long as above minimum. // Note, if condensing temperature falls below minimum, get warning and reset but no change in water-side calculations. - if (condenser.CondenserType == RefrigCondenserTypeWater) { + if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { // Obtain water-cooled condenser inlet/outlet temps InletNode = condenser.InletNode; condenser.InletTemp = Node(InletNode).Temp; @@ -11665,7 +11630,7 @@ namespace RefrigeratedCase { System(SysNum).TCondense = TCondCalc; } - } else if ((condenser.CondenserType == RefrigCondenserTypeAir) || (condenser.CondenserType == RefrigCondenserTypeEvap)) { + } else if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) || (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap)) { // Condensing Temp, fan and other aux loads for air-cooled or evap-cooled // The rated capacity of air-cooled condenser was adjusted for elevation in get input step @@ -11696,12 +11661,12 @@ namespace RefrigeratedCase { // Check schedule to determine evap condenser availability // IF schedule exists, evap condenser can be scheduled OFF - if ((condenser.CondenserType == RefrigCondenserTypeEvap) && (condenser.EvapSchedPtr > 0) && + if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) && (condenser.EvapSchedPtr > 0) && (GetCurrentScheduleValue(condenser.EvapSchedPtr) == 0)) EvapAvail = false; // Calculate condensing temperatures for air-cooled and evap-cooled - if (condenser.CondenserType == RefrigCondenserTypeEvap) { + if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { // Manufacturer's HRCF regressed to produce a function of the form: // (Tcondense-Twb)=A1 + A2*hrcf + A3/hrcf + A4*Twb // HRCF defined as rated capacity divided by load @@ -11741,12 +11706,12 @@ namespace RefrigeratedCase { System(SysNum).TCondense = System(SysNum).TCondenseMin; TCondCalc = System(SysNum).TCondenseMin; // recalculate CapFac at current delta T - if (condenser.CondenserType == RefrigCondenserTypeAir) { + if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { CurMaxCapacity = CurveValue(condenser.CapCurvePtr, (System(SysNum).TCondenseMin - OutDbTemp)); CapFac = TotalCondenserHeat / CurMaxCapacity; AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, CondAirVolExponentDry)); // Fans limited by minimum air flow ratio AirVolRatio = min(AirVolRatio, 1.0); - } else { // condenser.CondenserType == RefrigCondenserTypeEvap + } else { // condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap HRCFFullFlow = HRCF; // if evap condenser need to back calculate the operating capacity using HRCF relationship, given known Tcond QuadBterm = condenser.EvapCoeff1 - (System(SysNum).TCondense - SinkTemp) + condenser.EvapCoeff4 * SinkTemp; @@ -11768,7 +11733,7 @@ namespace RefrigeratedCase { AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, CondAirVolExponentDry)); // Fans limited by minimum air flow ratio } // evap available AirVolRatio = min(AirVolRatio, 1.0); - } // condenser type = RefrigCondenserTypeAir with else for evap + } // condenser type = DataHeatBalance::RefrigCondenserTypeAir with else for evap { auto const SELECT_CASE_var(condenser.FanSpeedControlType); @@ -11790,7 +11755,7 @@ namespace RefrigeratedCase { } // fan speed control type } // Tcondense >= Tcondense minimum - if ((condenser.CondenserType == RefrigCondenserTypeEvap) && (EvapAvail)) { + if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) && (EvapAvail)) { // calculate evap water use, need to include bleed down/purge water as well as water // actually evaporated. Use BAC Engineering Reference value of 3 gpm/100 tons because it's more // conservative than the ASHRAE value. @@ -11831,7 +11796,7 @@ namespace RefrigeratedCase { } // no load and cold outside } // EvapAvail - } else if (condenser.CondenserType == RefrigCondenserTypeCascade) { // continuing Condenser type = water, (evap or air), or cascade + } else if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) { // continuing Condenser type = water, (evap or air), or cascade // Cascade condenser does not iterate. Condensing temperature specified as a load on higher temp system // or floats to meet other loads on that system // therese ** future - here and for new phase change heat exchanger - need to handle unmet loads! @@ -12400,16 +12365,16 @@ namespace RefrigeratedCase { HSatVapCondense = GetSatEnthalpyRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); CpSatVapCondense = GetSatSpecificHeatRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); if (NumStages == 1) { // Single-stage systems - HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowComps * (System_SysNum.HCompOut - HSatVapCondense); + DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowComps * (System_SysNum.HCompOut - HSatVapCondense); } else { // Two-stage systems - HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowHiStageComps * (System_SysNum.HCompOut - HSatVapCondense); + DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowHiStageComps * (System_SysNum.HCompOut - HSatVapCondense); } // NumStages // No function available to get Tout as f(Pout, Hout), so use estimate based on constant cp in superheat range... // Use average of Tcondense and Tout of condenser as check for whether heat reclaim is reasonable. TCompOutEstimate = System_SysNum.TCondense + (System_SysNum.HCompOut - HSatVapCondense) / CpSatVapCondense; - HeatReclaimRefrigCondenser(CondID).AvailTemperature = (TsatforPdisch + TCompOutEstimate) / 2.0; + DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailTemperature = (TsatforPdisch + TCompOutEstimate) / 2.0; System_SysNum.AverageCompressorCOP = System_SysNum.TotCompCapacity / (System_SysNum.TotCompPower + System_SysNum.TotHiStageCompPower); System_SysNum.TotCompElecConsump = System_SysNum.TotCompPower * LocalTimeStepSec; if (NumStages == 2) { @@ -13014,7 +12979,7 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == RefrigSystemTypeRack) { + if (SELECT_CASE_var == DataHeatBalance::RefrigSystemTypeRack) { IndexPtr = UtilityRoutines::FindItemInList(Name, RefrigRack); if (IndexPtr == 0) { if (present(SuppressWarning)) { @@ -13028,7 +12993,7 @@ namespace RefrigeratedCase { } ErrorsFound = true; } - } else if (SELECT_CASE_var == RefrigSystemTypeDetailed) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigSystemTypeDetailed) { IndexPtr = UtilityRoutines::FindItemInList(Name, Condenser); if (IndexPtr == 0) { if (present(SuppressWarning)) { @@ -13147,11 +13112,11 @@ namespace RefrigeratedCase { "(Pa),','Rated Outlet Temperature (C), Rated Approach Temperature (C), Rated Capacity (W), Rated Fan Power (W)')"); // write all headers applicable to this simulation - if (NumRefrigeratedRacks > 0) { + if (DataHeatBalance::NumRefrigeratedRacks > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_109); // Intro to refrigeration case racks ObjexxFCL::gio::write(OutputFileInits, Format_104); // Refrigeration Rack header } //(NumRefrigeratedRacks > 0) - if (NumRefrigSystems > 0) { + if (DataHeatBalance::NumRefrigSystems > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_117); // Intro to detailed systems ObjexxFCL::gio::write(OutputFileInits, Format_118); // Detailed system header ObjexxFCL::gio::write(OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) @@ -13172,7 +13137,7 @@ namespace RefrigeratedCase { } ObjexxFCL::gio::write(OutputFileInits, Format_123); // Secondary system load header } //(NumSimulationSecondarySystems > 0) - if (NumRefrigChillerSets > 0) { + if (DataHeatBalance::NumRefrigChillerSets > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_148); // Intro to Chiller set ObjexxFCL::gio::write(OutputFileInits, Format_149); // Chiller set header ObjexxFCL::gio::write(OutputFileInits, Format_151); // Intro to Air Chiller @@ -13222,9 +13187,9 @@ namespace RefrigeratedCase { } //(NumSimulationGasCooler > 0) } //(NumTransRefrigSystems > 0) - if (NumRefrigeratedRacks > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + RoundSigDigits(NumRefrigeratedRacks); - for (RackNum = 1; RackNum <= NumRefrigeratedRacks; ++RackNum) { + if (DataHeatBalance::NumRefrigeratedRacks > 0) { + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); + for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationOutdoors) { ChrOut = "Outdoors"; } else { @@ -13232,11 +13197,11 @@ namespace RefrigeratedCase { } { auto const SELECT_CASE_var(RefrigRack(RackNum).CondenserType); - if (SELECT_CASE_var == RefrigCondenserTypeAir) { + if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { ChrOut2 = "Air-Cooled"; - } else if (SELECT_CASE_var == RefrigCondenserTypeEvap) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { ChrOut2 = "Evap-Cooled"; - } else if (SELECT_CASE_var == RefrigCondenserTypeWater) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { ChrOut2 = "Water-Cooled"; } } @@ -13288,9 +13253,9 @@ namespace RefrigeratedCase { } // numracks } //(NumRefrigeratedRacks > 0) - if (NumRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + RoundSigDigits(NumRefrigSystems); - for (SystemNum = 1; SystemNum <= NumRefrigSystems; ++SystemNum) { + if (DataHeatBalance::NumRefrigSystems > 0) { + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + RoundSigDigits(DataHeatBalance::NumRefrigSystems); + for (SystemNum = 1; SystemNum <= DataHeatBalance::NumRefrigSystems; ++SystemNum) { ObjexxFCL::gio::write(OutputFileInits, Format_101) << " Detailed Refrigeration System," + System(SystemNum).Name + ',' + System(SystemNum).RefrigerantName + ',' + RoundSigDigits(System(SystemNum).NumCases) + ',' + RoundSigDigits(System(SystemNum).NumWalkIns) + ',' + @@ -13382,21 +13347,21 @@ namespace RefrigeratedCase { CondID = System(SystemNum).CondenserNum(1); { auto const SELECT_CASE_var(Condenser(CondID).CondenserType); - if (SELECT_CASE_var == RefrigCondenserTypeAir) { + if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Condenser:Air-Cooled," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedFanPower, 1); - } else if (SELECT_CASE_var == RefrigCondenserTypeEvap) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Condenser:Evaporative-Cooled," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedFanPower, 1); - } else if (SELECT_CASE_var == RefrigCondenserTypeWater) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Condenser:Water-Cooled," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + RoundSigDigits(Condenser(CondID).InletTemp, 1) + ',' + RoundSigDigits(Condenser(CondID).DesVolFlowRate, 1); - } else if (SELECT_CASE_var == RefrigCondenserTypeCascade) { + } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeCascade) { { auto const SELECT_CASE_var1(Condenser(CondID).CascadeTempControl); @@ -13606,9 +13571,9 @@ namespace RefrigeratedCase { } // secondary } // numsimulationsecondarys - if (NumRefrigChillerSets > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + RoundSigDigits(NumRefrigChillerSets); - for (ChillerSetNum = 1; ChillerSetNum <= NumRefrigChillerSets; ++ChillerSetNum) { + if (DataHeatBalance::NumRefrigChillerSets > 0) { + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); + for (ChillerSetNum = 1; ChillerSetNum <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetNum) { ObjexxFCL::gio::write(OutputFileInits, Format_101) << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + RoundSigDigits(ChillerSetNum) + ',' + RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; @@ -13626,8 +13591,8 @@ namespace RefrigeratedCase { ',' + RoundSigDigits(WarehouseCoil(CoilID).DefrostCapacity, 1) + ',' + RoundSigDigits(WarehouseCoil(CoilID).RatedAirVolumeFlow, 1); } // numairchillers - } // numrefrigchillersets - } // numrefrigchillersets + } // DataHeatBalance::NumRefrigChillerSets + } // DataHeatBalance::NumRefrigChillerSets } //*************************************************************************************************** @@ -13905,8 +13870,8 @@ namespace RefrigeratedCase { // Zone Equipment Manager. Sum walk-in credits to zone using existing 'casecredit' variable // No return air fractions are applied to walk-ins, and no latent in stocking - - RefrigCaseCredit(ZoneNum).SenCaseCreditToZone += ZoneSensLoad; - RefrigCaseCredit(ZoneNum).LatCaseCreditToZone += ZoneLatentLoad; + DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone += ZoneSensLoad; + DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone += ZoneLatentLoad; // Set up report variables for each zone for this walk-in // Sensible heat exchange can be positive or negative, split into separate output variables and always report positive value @@ -14230,7 +14195,7 @@ namespace RefrigeratedCase { // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) Secondary(SecondaryNum).DistPipeZoneHeatGain = -DistPipeHeatGain; - RefrigCaseCredit(DistPipeZoneNum).SenCaseCreditToZone -= DistPipeHeatGain; + DataHeatBalance::RefrigCaseCredit(DistPipeZoneNum).SenCaseCreditToZone -= DistPipeHeatGain; } // calc distribution piping heat gains ReceiverHeatGain = 0.0; @@ -14242,7 +14207,7 @@ namespace RefrigeratedCase { // receiver heat load is a positive number (ie. heat absorbed by receiver, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) Secondary(SecondaryNum).ReceiverZoneHeatGain = -ReceiverHeatGain; - RefrigCaseCredit(ReceiverZoneNum).SenCaseCreditToZone -= ReceiverHeatGain; + DataHeatBalance::RefrigCaseCredit(ReceiverZoneNum).SenCaseCreditToZone -= ReceiverHeatGain; } // calc receiver heat gains // Sum up all the case and walk-in loads served by the secondary loop @@ -14456,29 +14421,29 @@ namespace RefrigeratedCase { // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { for (ZoneNum = 1; ZoneNum <= NumOfZones; ++ZoneNum) { - CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; // Latent always negative - CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate = -RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; + CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; CaseWIZoneReport(ZoneNum).LatCoolingToZoneEnergy = CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate * TimeStepZoneSec; // Sensible rate can be positive or negative, split into separate output variables and // always report positive value - if (RefrigCaseCredit(ZoneNum).SenCaseCreditToZone <= 0.0) { - CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = -RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; - CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = -RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; + if (DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone <= 0.0) { + CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; + CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; CaseWIZoneReport(ZoneNum).HeatingToZoneRate = 0.0; CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = 0.0; } else { CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = 0.0; CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = 0.0; - CaseWIZoneReport(ZoneNum).HeatingToZoneRate = RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; - CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).HeatingToZoneRate = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; + CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; } CaseWIZoneReport(ZoneNum).TotCoolingToZoneRate = CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate + CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate; CaseWIZoneReport(ZoneNum).TotCoolingToZoneEnergy = CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy + CaseWIZoneReport(ZoneNum).LatCoolingToZoneEnergy; CaseWIZoneReport(ZoneNum).TotHtXferToZoneRate = - RefrigCaseCredit(ZoneNum).SenCaseCreditToZone + RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; + DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone + DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; CaseWIZoneReport(ZoneNum).TotHtXferToZoneEnergy = CaseWIZoneReport(ZoneNum).TotHtXferToZoneRate * TimeStepZoneSec; } // over zones for cases and walkins } @@ -14554,9 +14519,9 @@ namespace RefrigeratedCase { AirChillerSetPtr = ChillerSetID; } else { // airchllersetpointer passed in call to subroutine not ==0 ChillerSetID = AirChillerSetPtr; - if (ChillerSetID > NumRefrigChillerSets || ChillerSetID < 1) { + if (ChillerSetID > DataHeatBalance::NumRefrigChillerSets || ChillerSetID < 1) { ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + TrimSigDigits(ChillerSetID) + - ", Number of Units=" + TrimSigDigits(NumRefrigChillerSets) + ", Entered Unit name=" + AirChillerSetName); + ", Number of Units=" + TrimSigDigits(DataHeatBalance::NumRefrigChillerSets) + ", Entered Unit name=" + AirChillerSetName); } // ChillerSetID makes no sense if (CheckChillerSetName(ChillerSetID)) { if (AirChillerSetName != AirChillerSet(ChillerSetID).Name) { @@ -14568,7 +14533,7 @@ namespace RefrigeratedCase { } //(AirChillerSetPtr == 0 or else not == 0 if (FirstHVACIteration) { - for (ChillerSetID = 1; ChillerSetID <= NumRefrigChillerSets; + for (ChillerSetID = 1; ChillerSetID <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetID) { // bbb what point of do loop, only set one (airchillersetptr) to zero AirChillerSet(AirChillerSetPtr).QZnReqSens = 0.0; } @@ -15275,7 +15240,7 @@ namespace RefrigeratedCase { if (BeginEnvrnFlag && MyEnvrnFlag) { - if (NumRefrigSystems > 0) { + if (DataHeatBalance::NumRefrigSystems > 0) { for (auto &e : System) { e.PipeHeatLoad = 0.0; e.NetHeatRejectLoad = 0.0; @@ -15290,7 +15255,7 @@ namespace RefrigeratedCase { } } - if (NumRefrigeratedRacks > 0) { + if (DataHeatBalance::NumRefrigeratedRacks > 0) { for (auto &e : RefrigRack) { e.SensZoneCreditHeatRate = 0.0; e.SensHVACCreditHeatRate = 0.0; @@ -15358,8 +15323,8 @@ namespace RefrigeratedCase { if (HaveRefrigRacks) { // HaveRefrigRacks is TRUE when NumRefrigeratedRAcks > 0 // RefrigRack ALLOCATED to NumRefrigeratedRacks - for (RackNum = 1; RackNum <= NumRefrigeratedRacks; ++RackNum) { - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeWater) { + for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { PlantInletNode = RefrigRack(RackNum).InletNode; PlantOutletNode = RefrigRack(RackNum).OutletNode; PlantLoopIndex = RefrigRack(RackNum).PlantLoopNum; @@ -15370,7 +15335,7 @@ namespace RefrigeratedCase { SetComponentFlowRate( MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); } - if (RefrigRack(RackNum).CondenserType == RefrigCondenserTypeEvap) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; TankID = RefrigRack(RackNum).EvapWaterSupTankID; @@ -15380,10 +15345,10 @@ namespace RefrigeratedCase { } // RackNum } // HaveRefrigRacks - if (NumRefrigCondensers > 0) { - // Condenser ALLOCATED to NumRefrigCondensers - for (CondID = 1; CondID <= NumRefrigCondensers; ++CondID) { - if (Condenser(CondID).CondenserType == RefrigCondenserTypeWater) { + if (DataHeatBalance::NumRefrigCondensers > 0) { + // Condenser ALLOCATED to DataHeatBalance::NumRefrigCondensers + for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { + if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { PlantInletNode = Condenser(CondID).InletNode; PlantOutletNode = Condenser(CondID).OutletNode; PlantLoopIndex = Condenser(CondID).PlantLoopNum; @@ -15394,7 +15359,7 @@ namespace RefrigeratedCase { SetComponentFlowRate( MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); } - if (Condenser(CondID).CondenserType == RefrigCondenserTypeEvap) { + if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (Condenser(CondID).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = Condenser(CondID).EvapWaterTankDemandARRID; TankID = Condenser(CondID).EvapWaterSupTankID; @@ -15402,7 +15367,7 @@ namespace RefrigeratedCase { } } } // ICond - } // NumRefrigCondensers>0 + } // DataHeatBalance::NumRefrigCondensers>0 } } // namespace RefrigeratedCase From 833af096c6c90a76f35f0a679fee0cdf3a3b844d Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 11:51:16 -0700 Subject: [PATCH 40/86] step 2 - partial cleanup usings --- src/EnergyPlus/RefrigeratedCase.cc | 892 +++++++++++++---------------- 1 file changed, 394 insertions(+), 498 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index bb4401511f0..0093c060567 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -195,7 +195,6 @@ namespace RefrigeratedCase { // REFERENCES: // Specific references are provided for the equipment simulation subroutines below. - using DataHVACGlobals::TimeStepSys; // used when operating for warehouse coil using namespace DataGlobals; // includes LOGICAL :: BeginTimeStepFlag =.FALSE. // True at the start of each time step, False after first subtime step of time step // includes CurrentTime, in fractional hours, from start of day. Uses Loads time step. @@ -480,8 +479,6 @@ namespace RefrigeratedCase { // Inter-system heat transfer via subcoolers and cascade condensers can be accommodated. // Secondary refrigeration cycles are also available. - using General::RoundSigDigits; - int RackNum; // Index to the refrigerated compressor rack being modeled static bool MyOneTimeFlag(true); // flag to skip first pass on next begin environment flag @@ -542,20 +539,12 @@ namespace RefrigeratedCase { // GetObjectItem is called to read refrigerated case information using BranchNodeConnections::TestCompSet; - using CurveManager::CurveValue; - using CurveManager::GetCurveIndex; - using CurveManager::GetCurveMinMaxValues; - using DataEnvironment::StdBaroPress; using DataGlobals::AnyEnergyManagementSystemInModel; using DataZoneEquipment::GetReturnAirNodeForZone; using DataZoneEquipment::GetSystemNodeNumberForZone; using FluidProperties::GetSupHeatEnthalpyRefrig; - using General::RoundSigDigits; using NodeInputManager::GetOnlySingleNode; using OutAirNodeManager::CheckOutAirNodeNumber; - using PlantUtilities::RegisterPlantCompDesignFlow; - using Psychrometrics::PsyTdpFnWPb; - using Psychrometrics::PsyWFnTdbRhPb; using WaterManager::SetupTankDemandComponent; static std::string const TrackMessage("from refrigerated case"); @@ -984,8 +973,8 @@ namespace RefrigeratedCase { " must be greater than 0% and less than 100%"); ErrorsFound = true; } - RefrigCase(CaseNum).RatedAmbientDewPoint = PsyTdpFnWPb( - PsyWFnTdbRhPb(RefrigCase(CaseNum).RatedAmbientTemp, (RefrigCase(CaseNum).RatedAmbientRH / 100.0), StdBaroPress), StdBaroPress); + RefrigCase(CaseNum).RatedAmbientDewPoint = Psychrometrics::PsyTdpFnWPb( + Psychrometrics::PsyWFnTdbRhPb(RefrigCase(CaseNum).RatedAmbientTemp, (RefrigCase(CaseNum).RatedAmbientRH / 100.0), StdBaroPress), StdBaroPress); RefrigCase(CaseNum).RateTotCapPerLength = Numbers(3); if (Numbers(3) <= 0.0) { @@ -1034,7 +1023,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } - RefrigCase(CaseNum).LatCapCurvePtr = GetCurveIndex(Alphas(5)); // convert curve name to number + RefrigCase(CaseNum).LatCapCurvePtr = CurveManager::GetCurveIndex(Alphas(5)); // convert curve name to number if (RefrigCase(CaseNum).LatCapCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(5) + " not found:" + Alphas(5)); @@ -1195,7 +1184,7 @@ namespace RefrigeratedCase { if (RefrigCase(CaseNum).Height <= 0.0 && RefrigCase(CaseNum).AntiSweatControlType == ASHeatBalance) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", " + cNumericFieldNames(NumNum) + " must be greater than 0 when " + cAlphaFieldNames(7) + " is Heat Balance Method."); - ShowContinueError("..given " + cNumericFieldNames(NumNum) + " was: " + RoundSigDigits(RefrigCase(CaseNum).Height, 3)); + ShowContinueError("..given " + cNumericFieldNames(NumNum) + " was: " + General::RoundSigDigits(RefrigCase(CaseNum).Height, 3)); ErrorsFound = true; } @@ -1358,7 +1347,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } - RefrigCase(CaseNum).DefCapCurvePtr = GetCurveIndex(Alphas(12)); // convert curve name to number + RefrigCase(CaseNum).DefCapCurvePtr = CurveManager::GetCurveIndex(Alphas(12)); // convert curve name to number if ((RefrigCase(CaseNum).DefrostType == DefElectricTerm || RefrigCase(CaseNum).DefrostType == DefHotFluidTerm) && (RefrigCase(CaseNum).DefCapCurvePtr == 0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(12) + @@ -2322,10 +2311,10 @@ namespace RefrigeratedCase { cNumericFieldNames(NumNum) + " must be between 1 and 1.67, 1.00 will be used."); } } else if (SELECT_CASE_var == European) { - // WarehouseCoil(CoilID)%SHRCorrectionCurvePtr = GetCurveIndex('ChillerEuropeanWetCoilFactor') + // WarehouseCoil(CoilID)%SHRCorrectionCurvePtr = CurveManager::GetCurveIndex('ChillerEuropeanWetCoilFactor') // This is a place holder, currently use embedded constants for European ratings, future may want a curve } else if (SELECT_CASE_var == QuadraticSHR) { - WarehouseCoil(CoilID).SHRCorrectionCurvePtr = GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number + WarehouseCoil(CoilID).SHRCorrectionCurvePtr = CurveManager::GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number if (lAlphaBlanks(AlphaNum)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " is blank, required."); @@ -2344,7 +2333,7 @@ namespace RefrigeratedCase { WarehouseCoil(CoilID).Name, // Object Name cAlphaFieldNames(AlphaNum)); // Field Name } else if (SELECT_CASE_var == TabularRH_DT1_TRoom) { - WarehouseCoil(CoilID).SHRCorrectionCurvePtr = GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number + WarehouseCoil(CoilID).SHRCorrectionCurvePtr = CurveManager::GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number if (lAlphaBlanks(AlphaNum)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " is blank, required."); @@ -2782,7 +2771,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } - RefrigRack(RackNum).COPFTempPtr = GetCurveIndex(Alphas(3)); // convert curve name to number + RefrigRack(RackNum).COPFTempPtr = CurveManager::GetCurveIndex(Alphas(3)); // convert curve name to number if (RefrigRack(RackNum).COPFTempPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", invalid " + cAlphaFieldNames(3) + " not found:" + Alphas(3)); @@ -2804,7 +2793,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } - RefrigRack(RackNum).TotCondFTempPtr = GetCurveIndex(Alphas(4)); // convert curve name to number + RefrigRack(RackNum).TotCondFTempPtr = CurveManager::GetCurveIndex(Alphas(4)); // convert curve name to number if ((!lAlphaBlanks(4)) && RefrigRack(RackNum).TotCondFTempPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", invalid " + cAlphaFieldNames(4) + " not found:" + Alphas(4)); @@ -2895,7 +2884,7 @@ namespace RefrigeratedCase { // Node(RefrigRack(RackNum)%InletNode)%MassFlowRateMax = RefrigRack(RackNum)%MassFlowRateMax !CR7425 // Node(RefrigRack(RackNum)%InletNode)%MassFlowRateMin = 0.0D0 !CR7435 // set flow request for plant sizing. - RegisterPlantCompDesignFlow(RefrigRack(RackNum).InletNode, RefrigRack(RackNum).VolFlowRateMax); + PlantUtilities::RegisterPlantCompDesignFlow(RefrigRack(RackNum).InletNode, RefrigRack(RackNum).VolFlowRateMax); } // Water cooled condenser data // Get evaporative cooled condenser input @@ -3186,7 +3175,7 @@ namespace RefrigeratedCase { GlobalNames::VerifyUniqueInterObjectName(UniqueCondenserNames, Alphas(1), CurrentModuleObject, cAlphaFieldNames(1), ErrorsFound); Condenser(CondNum).Name = Alphas(1); DataHeatBalance::HeatReclaimRefrigCondenser(CondNum).Name = Alphas(1); - Condenser(CondNum).CapCurvePtr = GetCurveIndex(Alphas(2)); // convert curve name to number + Condenser(CondNum).CapCurvePtr = CurveManager::GetCurveIndex(Alphas(2)); // convert curve name to number if (Condenser(CondNum).CapCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", invalid " + cAlphaFieldNames(2) + " not found:" + Alphas(2)); @@ -3203,14 +3192,14 @@ namespace RefrigeratedCase { Condenser(CondNum).RatedDelT = CondARI460DelT; //= 16.7d0 ,Rated sat cond temp - dry bulb air T for air-cooled Condensers, ARI460 Condenser(CondNum).RatedTCondense = CondARI460Tcond; if (Condenser(CondNum).CapCurvePtr > 0) { - Condenser(CondNum).RatedCapacity = CurveValue(Condenser(CondNum).CapCurvePtr, CondARI460DelT); + Condenser(CondNum).RatedCapacity = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, CondARI460DelT); } // elevation capacity correction on air-cooled condensers, Carrier correlation more conservative than Trane Condenser(CondNum).RatedCapacity *= (1.0 - 7.17e-5 * Elevation); if (Condenser(CondNum).RatedCapacity > 0.0) { - GetCurveMinMaxValues(Condenser(CondNum).CapCurvePtr, DelTempMin, DelTempMax); - Capmin = CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * Elevation); // Mar 2011 bug fix - Capmax = CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * Elevation); // Mar 2011 bug + CurveManager::GetCurveMinMaxValues(Condenser(CondNum).CapCurvePtr, DelTempMin, DelTempMax); + Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * Elevation); // Mar 2011 bug fix + Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * Elevation); // Mar 2011 bug Condenser(CondNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); // * ( 1.0 - 7.17e-5 * Elevation ) ) //Mar 2011 bug fix Condenser(CondNum).MinCondLoad = Capmax - DelTempMax / Condenser(CondNum).TempSlope; @@ -3628,7 +3617,7 @@ namespace RefrigeratedCase { ShowContinueError("Revise flow rates."); ErrorsFound = true; } - RegisterPlantCompDesignFlow(Condenser(CondNum).InletNode, Condenser(CondNum).DesVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(Condenser(CondNum).InletNode, Condenser(CondNum).DesVolFlowRate); } // Get maximum flow rates @@ -3772,7 +3761,7 @@ namespace RefrigeratedCase { UtilityRoutines::IsNameEmpty(Alphas(1), CurrentModuleObject, ErrorsFound); GasCooler(GCNum).Name = Alphas(1); - GasCooler(GCNum).CapCurvePtr = GetCurveIndex(Alphas(2)); // convert curve name to number + GasCooler(GCNum).CapCurvePtr = CurveManager::GetCurveIndex(Alphas(2)); // convert curve name to number if (GasCooler(GCNum).CapCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + GasCooler(GCNum).Name + "\", invalid " + cAlphaFieldNames(2) + " not found:" + Alphas(2)); @@ -3785,14 +3774,14 @@ namespace RefrigeratedCase { GasCooler(GCNum).RatedApproachT = 3.0; // rated CO2 gas cooler approach temperature if (GasCooler(GCNum).CapCurvePtr > 0) { - GasCooler(GCNum).RatedCapacity = CurveValue(GasCooler(GCNum).CapCurvePtr, GasCooler(GCNum).RatedApproachT); + GasCooler(GCNum).RatedCapacity = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, GasCooler(GCNum).RatedApproachT); } // elevation capacity correction on air-cooled condensers, Carrier correlation more conservative than Trane GasCooler(GCNum).RatedCapacity *= (1.0 - 7.17e-5 * Elevation); if (GasCooler(GCNum).RatedCapacity > 0.0) { - GetCurveMinMaxValues(GasCooler(GCNum).CapCurvePtr, DelTempMin, DelTempMax); - Capmin = CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * Elevation); - Capmax = CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * Elevation); + CurveManager::GetCurveMinMaxValues(GasCooler(GCNum).CapCurvePtr, DelTempMin, DelTempMax); + Capmin = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * Elevation); + Capmax = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * Elevation); GasCooler(GCNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); GasCooler(GCNum).MinCondLoad = Capmax - DelTempMax / GasCooler(GCNum).TempSlope; } else { @@ -4151,8 +4140,8 @@ namespace RefrigeratedCase { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + " You may wish to check the system definition. Based upon the design flow rate and range " "temperature difference, The nominal secondary loop heat exchanger capacity is, " + - RoundSigDigits(NominalSecondaryCapacity, 0) + " but the specified design capacity is, " + - RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0)); + General::RoundSigDigits(NominalSecondaryCapacity, 0) + " but the specified design capacity is, " + + General::RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0)); } } else if (!lNumericBlanks(1)) { Secondary(SecondaryNum).CoolingLoadRated = Numbers(1); @@ -4179,7 +4168,7 @@ namespace RefrigeratedCase { if (Secondary(SecondaryNum).HeatExchangeEta > 0.99) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + " You may wish to check the system definition. The heat exchanger effectiveness is, " + - RoundSigDigits(Secondary(SecondaryNum).HeatExchangeEta, 2)); + General::RoundSigDigits(Secondary(SecondaryNum).HeatExchangeEta, 2)); Secondary(SecondaryNum).HeatExchangeEta = 0.99; } } else { @@ -4228,9 +4217,9 @@ namespace RefrigeratedCase { DiffCircRates = (CalcCircRate - Secondary(SecondaryNum).CircRate) / Secondary(SecondaryNum).CircRate; if (std::abs(DiffCircRates) > 0.3) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + ' ' + cNumericFieldNames(7) + - " Produces a circulating rate of " + RoundSigDigits(CalcCircRate, 2) + " ; A circulating rate of " + - RoundSigDigits(Secondary(SecondaryNum).CircRate, 2) + " would need a " + cNumericFieldNames(7) + - " of " + RoundSigDigits(CalcTotFlowVol, 2) + " m3/s"); + " Produces a circulating rate of " + General::RoundSigDigits(CalcCircRate, 2) + " ; A circulating rate of " + + General::RoundSigDigits(Secondary(SecondaryNum).CircRate, 2) + " would need a " + cNumericFieldNames(7) + + " of " + General::RoundSigDigits(CalcTotFlowVol, 2) + " m3/s"); } // warning check on pump flow rate vs circ rate input } // blank pump flow rate SecondaryFlowVolRated = PumpTotRatedFlowVol; @@ -4299,7 +4288,7 @@ namespace RefrigeratedCase { Secondary(SecondaryNum).PumpIncrementPower = Secondary(SecondaryNum).PumpTotRatedPower / NumPumps; } else { // Variable speed drive need to read in power curve AlphaNum = 6; - Secondary(SecondaryNum).VarSpeedCurvePtr = GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number + Secondary(SecondaryNum).VarSpeedCurvePtr = CurveManager::GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number if (Secondary(SecondaryNum).VarSpeedCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found:" + Alphas(AlphaNum)); @@ -4324,7 +4313,7 @@ namespace RefrigeratedCase { } else { ShowWarningError( RoutineName + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" " + cNumericFieldNames(NumNum) + - " must be between 0.5 and 1.0. Default value of : " + RoundSigDigits(PumpMotorEfficiency, 3) + " will be used"); + " must be between 0.5 and 1.0. Default value of : " + General::RoundSigDigits(PumpMotorEfficiency, 3) + " will be used"); } // range of pump moter heat to fluid } // blank input for pumppowertoheat @@ -4432,9 +4421,9 @@ namespace RefrigeratedCase { if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { if (TBrineOutRated > (Secondary(SecondaryNum).TMinNeeded + 0.5)) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + - " The design brine temperature to the refrigeration loads: " + RoundSigDigits(TBrineOutRated, 1) + " ;"); + " The design brine temperature to the refrigeration loads: " + General::RoundSigDigits(TBrineOutRated, 1) + " ;"); ShowContinueError(" is greater than the design inlet temperature for at least one of the cases or walkins: " + - RoundSigDigits(Secondary(SecondaryNum).TMinNeeded, 1)); + General::RoundSigDigits(Secondary(SecondaryNum).TMinNeeded, 1)); ShowContinueError( " Compare your Approach and Evaporating Temperature to the design inlet temperatures needed for the loads."); // ErrorsFound = .TRUE. @@ -4447,8 +4436,8 @@ namespace RefrigeratedCase { if (DeltaCap1 > (0.3)) { // diff between chiller rating and capacity at max flow > 30% ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" You may wish to check the system sizing. The nominal secondary loop heat exchanger capacity is " + - RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0) + - " But the capacity based upon the maximum flow rate is " + RoundSigDigits(CapacityAtMaxVolFlow, 0)); + General::RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0) + + " But the capacity based upon the maximum flow rate is " + General::RoundSigDigits(CapacityAtMaxVolFlow, 0)); } // DeltaCap1 > .3 } else { // Fluid type phase change !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if (lNumericBlanks(1)) { // Chiller/evaporator capacity was not specified @@ -4477,16 +4466,16 @@ namespace RefrigeratedCase { if (DeltaCap2 > (0.3)) { // diff between chiller rating and sum of nominal loads > 30% ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" You may wish to check the system sizing. Total nominal refrigerating load is " + - RoundSigDigits(NominalSecondaryRefLoad, 0) + + General::RoundSigDigits(NominalSecondaryRefLoad, 0) + " (Including cases, walk-ins, and pump heat). The nominal secondary loop heat exchanger capacity is " + - RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0)); + General::RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0)); } // compare rated xt xchanger brine flow to the total rated pump flow if (SecondaryFlowVolRated > (1.1 * PumpTotRatedFlowVol)) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" You may wish to check the pump sizing. Total nominal brine flow is " + - RoundSigDigits(SecondaryFlowVolRated, 0) + - " m3/s, but the total nominal pump flow rate is: " + RoundSigDigits(PumpTotRatedFlowVol, 0) + " m3/s. "); + General::RoundSigDigits(SecondaryFlowVolRated, 0) + + " m3/s, but the total nominal pump flow rate is: " + General::RoundSigDigits(PumpTotRatedFlowVol, 0) + " m3/s. "); } } // Secondary Loops @@ -4513,14 +4502,14 @@ namespace RefrigeratedCase { Compressor(CompNum).Name = Alphas(1); - Compressor(CompNum).ElecPowerCurvePtr = GetCurveIndex(Alphas(2)); // convert curve name to number + Compressor(CompNum).ElecPowerCurvePtr = CurveManager::GetCurveIndex(Alphas(2)); // convert curve name to number if ((!lAlphaBlanks(2)) && Compressor(CompNum).ElecPowerCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Compressor(CompNum).Name + "\", invalid " + cAlphaFieldNames(2) + " not found = " + Alphas(2)); ErrorsFound = true; } - Compressor(CompNum).CapacityCurvePtr = GetCurveIndex(Alphas(3)); // convert curve name to number + Compressor(CompNum).CapacityCurvePtr = CurveManager::GetCurveIndex(Alphas(3)); // convert curve name to number if ((!lAlphaBlanks(3)) && Compressor(CompNum).CapacityCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Compressor(CompNum).Name + "\", invalid " + cAlphaFieldNames(3) + " not found = " + Alphas(3)); @@ -4561,13 +4550,13 @@ namespace RefrigeratedCase { // If the compressor is a transcritical CO compressor, get transcritical power and capacity curves if (UtilityRoutines::SameString(Alphas(5), "Transcritical")) { // Mode of Operation = Transcritical Compressor(CompNum).TransFlag = true; - Compressor(CompNum).TransElecPowerCurvePtr = GetCurveIndex(Alphas(6)); // convert curve name to number + Compressor(CompNum).TransElecPowerCurvePtr = CurveManager::GetCurveIndex(Alphas(6)); // convert curve name to number if (lAlphaBlanks(6) && Compressor(CompNum).TransElecPowerCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + '=' + Compressor(CompNum).Name + ": " + cAlphaFieldNames(6) + " not found."); ErrorsFound = true; } - Compressor(CompNum).TransCapacityCurvePtr = GetCurveIndex(Alphas(7)); // convert curve name to number + Compressor(CompNum).TransCapacityCurvePtr = CurveManager::GetCurveIndex(Alphas(7)); // convert curve name to number if (lAlphaBlanks(7) && Compressor(CompNum).TransCapacityCurvePtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + '=' + Compressor(CompNum).Name + ": " + cAlphaFieldNames(7) + " not found."); @@ -5348,7 +5337,7 @@ namespace RefrigeratedCase { System(RefrigSysNum).IntercoolerEffectiveness = Numbers(4); if (System(RefrigSysNum).IntercoolerEffectiveness < 0.0 || System(RefrigSysNum).IntercoolerEffectiveness > 1.0) { ShowWarningError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", The specified value for the"); - ShowContinueError(cNumericFieldNames(4) + " = " + RoundSigDigits(System(RefrigSysNum).IntercoolerEffectiveness, 2) + + ShowContinueError(cNumericFieldNames(4) + " = " + General::RoundSigDigits(System(RefrigSysNum).IntercoolerEffectiveness, 2) + " is invalid. This value must be"); ShowContinueError("between 0.0 and 1.0. The default value of 0.8 will be used."); System(RefrigSysNum).IntercoolerEffectiveness = 0.8; @@ -5414,14 +5403,14 @@ namespace RefrigeratedCase { CompNum = System(RefrigSysNum).CompressorNum(CompIndex); if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor if (System(RefrigSysNum).NumStages == 1) { // Single-stage compression - Compressor(CompNum).NomCap = CurveValue(Compressor(CompNum).CapacityCurvePtr, + Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TEvapDesign, Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense); NominalTotalCompCap += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Two-stage compression, low-stage compressors Compressor(CompNum).NomCap = - CurveValue(Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).TIntercooler); + CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).TIntercooler); NominalTotalCompCap += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } // NumStages @@ -5439,7 +5428,7 @@ namespace RefrigeratedCase { for (CompIndex = 1; CompIndex <= NumHiStageCompressorsSys; ++CompIndex) { CompNum = System(RefrigSysNum).HiStageCompressorNum(CompIndex); if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor - Compressor(CompNum).NomCap = CurveValue(Compressor(CompNum).CapacityCurvePtr, + Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TIntercooler, Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense); NominalTotalHiStageCompCap += Compressor(CompNum).NomCap; @@ -5462,15 +5451,15 @@ namespace RefrigeratedCase { if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", You may wish to check the system sizing. Total nominal cooling capacity is " + - RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + RoundSigDigits(NominalCondCap, 0) + - "W. Nominal compressor capacity is " + RoundSigDigits(NominalTotalCompCap, 0) + "W."); + General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + General::RoundSigDigits(NominalCondCap, 0) + + "W. Nominal compressor capacity is " + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); } } else if (System(RefrigSysNum).NumStages == 2) { // Two-stage system if ((NominalTotalHiStageCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", You may wish to check the system sizing. Total nominal cooling capacity is " + - RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + RoundSigDigits(NominalCondCap, 0) + - "W. Nominal compressor capacity is " + RoundSigDigits(NominalTotalCompCap, 0) + "W."); + General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + General::RoundSigDigits(NominalCondCap, 0) + + "W. Nominal compressor capacity is " + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); } } // NumStages @@ -5934,7 +5923,7 @@ namespace RefrigeratedCase { RefrigIndex, RoutineNameNoColon); Compressor(CompNum).NomCap = - CurveValue(Compressor(CompNum).TransCapacityCurvePtr, TransSystem(TransRefrigSysNum).TEvapDesignMT, GCOutletH); + CurveManager::CurveValue(Compressor(CompNum).TransCapacityCurvePtr, TransSystem(TransRefrigSysNum).TEvapDesignMT, GCOutletH); NominalTotalCompCapHP += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Subcritical compressor attached to transcritical system - show error @@ -5992,7 +5981,7 @@ namespace RefrigeratedCase { for (CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { CompNum = TransSystem(TransRefrigSysNum).CompressorNumLP(CompIndex); if (TransSystem(TransRefrigSysNum).TransSysType == 2) { // Calculate capacity of LP compressors - Compressor(CompNum).NomCap = CurveValue(Compressor(CompNum).CapacityCurvePtr, + Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, TransSystem(TransRefrigSysNum).TEvapDesignLT, TransSystem(TransRefrigSysNum).TEvapDesignMT); NominalTotalCompCapLP += Compressor(CompNum).NomCap; @@ -6013,9 +6002,9 @@ namespace RefrigeratedCase { TransSystem(TransRefrigSysNum).RefrigerantName, TransSystem(TransRefrigSysNum).PReceiver, RefrigIndex, RoutineNameNoColon); if (TransSystem(TransRefrigSysNum).TReceiver > GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp) { ShowWarningError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + - ": The receiver temperature (" + RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + + ": The receiver temperature (" + General::RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + "C) is greater than the minimum condensing temperature specified for subcritical operation (" + - RoundSigDigits(GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp, 2) + "C)."); + General::RoundSigDigits(GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp, 2) + "C)."); ShowContinueError(" The minimum condensing temperature will be set at 5C greater than the receiver temperature."); GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp = TransSystem(TransRefrigSysNum).TReceiver + 5.0; @@ -6023,9 +6012,9 @@ namespace RefrigeratedCase { if (NominalTotalCompCapLP > 0.0) { if (TransSystem(TransRefrigSysNum).TReceiver <= TransSystem(TransRefrigSysNum).TEvapDesignLT) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + - ": The receiver temperature (" + RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + + ": The receiver temperature (" + General::RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + "C) is less than the design evaporator temperature for the low temperature loads (" + - RoundSigDigits(TransSystem(TransRefrigSysNum).TEvapDesignLT, 2) + "C)."); + General::RoundSigDigits(TransSystem(TransRefrigSysNum).TEvapDesignLT, 2) + "C)."); ShowContinueError(" Ensure that the receiver temperature is sufficiently greater than the design evaporator temperature for " "the low temperature loads."); ShowContinueError( @@ -6036,9 +6025,9 @@ namespace RefrigeratedCase { if (NominalTotalCompCapHP > 0.0) { if (TransSystem(TransRefrigSysNum).TReceiver <= TransSystem(TransRefrigSysNum).TEvapDesignMT) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + - ": The receiver temperature (" + RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + + ": The receiver temperature (" + General::RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + "C) is less than the design evaporator temperature for the medium temperature loads (" + - RoundSigDigits(TransSystem(TransRefrigSysNum).TEvapDesignMT, 2) + "C)."); + General::RoundSigDigits(TransSystem(TransRefrigSysNum).TEvapDesignMT, 2) + "C)."); ShowContinueError(" Ensure that the receiver temperature is sufficiently greater than the design evaporator temperature for " "the medium temperature loads."); ShowContinueError( @@ -6131,9 +6120,9 @@ namespace RefrigeratedCase { if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", You may wish to check the system sizing."); - ShowContinueError("Total nominal cooling capacity is " + RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + - RoundSigDigits(NominalCondCap, 0) + "W. Nominal compressor capacity is " + - RoundSigDigits(NominalTotalCompCap, 0) + "W."); + ShowContinueError("Total nominal cooling capacity is " + General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + + General::RoundSigDigits(NominalCondCap, 0) + "W. Nominal compressor capacity is " + + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); } } // Transcritical refrigeration systems @@ -6192,7 +6181,7 @@ namespace RefrigeratedCase { if ((NumUnusedRefrigCases > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused cases given if DisplayExtraWarnings option not selected - ShowWarningError("Refrigeration:Case -> " + RoundSigDigits(NumUnusedRefrigCases) + + ShowWarningError("Refrigeration:Case -> " + General::RoundSigDigits(NumUnusedRefrigCases) + " unused refrigerated case(s) found during input processing."); ShowContinueError(" These refrigerated cases are in the input file but are not connected to a "); ShowContinueError(" Refrigeration:CompressorRack, Refrigeration:System, or Refrigeration:SecondarySystem object."); @@ -6225,7 +6214,7 @@ namespace RefrigeratedCase { if ((NumUnusedCompressors > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused compressors given if DisplayExtraWarnings option not selected - ShowWarningError("Refrigeration:Compressor -> " + RoundSigDigits(NumUnusedCompressors) + + ShowWarningError("Refrigeration:Compressor -> " + General::RoundSigDigits(NumUnusedCompressors) + " unused refrigeration compressor(s) found during input processing."); ShowContinueError(" Those refrigeration compressors are in the input file but are not connected to a Refrigeration:System object."); ShowContinueError(" These unused refrigeration compressors will not be simulated."); @@ -6257,7 +6246,7 @@ namespace RefrigeratedCase { if ((NumUnusedWalkIns > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused walkins given if DisplayExtraWarnings option not selected - ShowWarningError(RoutineName + "Refrigeration:WalkIn -> " + RoundSigDigits(NumUnusedWalkIns) + + ShowWarningError(RoutineName + "Refrigeration:WalkIn -> " + General::RoundSigDigits(NumUnusedWalkIns) + " unused refrigeration WalkIns found during input processing."); ShowContinueError(" Those refrigeration WalkIns are in the input file but are not connected to a "); ShowContinueError(" Refrigeration:CompressorRack, Refrigeration:System or Refrigeration:SecondarySystem object."); @@ -6290,7 +6279,7 @@ namespace RefrigeratedCase { if ((NumUnusedCoils > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused air chillers given if DisplayExtraWarnings option not selected - ShowWarningError(RoutineName + "Refrigeration:AirChiller -> " + RoundSigDigits(NumUnusedCoils) + + ShowWarningError(RoutineName + "Refrigeration:AirChiller -> " + General::RoundSigDigits(NumUnusedCoils) + " unused refrigeration air chillers found during input processing."); ShowContinueError(" Those refrigeration air chillers are in the input file but are not connected to a "); ShowContinueError(" Refrigeration:CompressorRack, Refrigeration:System or Refrigeration:SecondarySystem object."); @@ -6323,7 +6312,7 @@ namespace RefrigeratedCase { if ((NumUnusedSecondarys > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused secondaries given if DisplayExtraWarnings option not selected - ShowWarningError(RoutineName + "Refrigeration:Secondary -> " + RoundSigDigits(NumUnusedSecondarys) + + ShowWarningError(RoutineName + "Refrigeration:Secondary -> " + General::RoundSigDigits(NumUnusedSecondarys) + " unused refrigeration Secondary Loops found during input processing."); ShowContinueError(" Those refrigeration Secondary Loops are in the input file but are not connected to a refrigeration system."); ShowContinueError(" These unused refrigeration secondaries will not be simulated."); @@ -6354,7 +6343,7 @@ namespace RefrigeratedCase { if ((NumUnusedCondensers > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused condensers given if DisplayExtraWarnings option not selected - ShowWarningError(RoutineName + "Refrigeration condenser -> " + RoundSigDigits(NumUnusedCondensers) + + ShowWarningError(RoutineName + "Refrigeration condenser -> " + General::RoundSigDigits(NumUnusedCondensers) + " unused refrigeration condensers found during input processing."); ShowContinueError(" Those refrigeration condensers are in the input file but are not connected to a refrigeration system."); ShowContinueError(" These unused refrigeration condensers will not be simulated."); @@ -6383,7 +6372,7 @@ namespace RefrigeratedCase { if ((NumUnusedGasCoolers > 0) && (!DisplayExtraWarnings)) { // write to error file, // summary number of unused gas coolers given if DisplayExtraWarnings option not selected - ShowWarningError(RoutineName + "Refrigeration gas cooler -> " + RoundSigDigits(NumUnusedGasCoolers) + + ShowWarningError(RoutineName + "Refrigeration gas cooler -> " + General::RoundSigDigits(NumUnusedGasCoolers) + " unused refrigeration gas cooler(s) found during input processing."); ShowContinueError(" These refrigeration gas coolers are in the input file but are not connected to a refrigeration system."); ShowContinueError(" These unused refrigeration gas coolers will not be simulated."); @@ -8954,7 +8943,6 @@ namespace RefrigeratedCase { // this most recent addition/subtraction is reversed before the rest of the refrigeration simulation begins. using DataGlobals::AnyEnergyManagementSystemInModel; - using DataHVACGlobals::SysTimeElapsed; static bool MyBeginEnvrnFlag(true); static int SystemID(0); @@ -9241,7 +9229,7 @@ namespace RefrigeratedCase { } else { // using UseSysTimeStep as a flag for a chiller system - MyStepStartTime = CurrentTime - TimeStepZone + SysTimeElapsed; + MyStepStartTime = CurrentTime - TimeStepZone + DataHVACGlobals::SysTimeElapsed; if (std::abs(MyStepStartTime - MyStepStartTimeSaved) < MySmallNumber) { // If the time step is repeated, need to return to correct values at start of time step if (NumSimulationRefrigAirChillers > 0) { @@ -9303,12 +9291,6 @@ namespace RefrigeratedCase { // do inits that should only occur when component model routines // are entered from plant, for water cooled Condensers and Refrigeration Racks - using DataPlant::PlantLoop; - using DataPlant::TypeOf_RefrigerationWaterCoolRack; - using DataPlant::TypeOf_RefrigSystemWaterCondenser; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::ScanPlantLoopsForObject; - static std::string const RoutineName("InitRefrigerationPlantConnections"); static bool MyBeginEnvrnFlag(true); static bool errFlag(false); @@ -9317,13 +9299,13 @@ namespace RefrigeratedCase { Real64 rho; // local fluid property for cooling water // initialize plant topology information, if applicable - if (MyReferPlantScanFlag && allocated(PlantLoop)) { + if (MyReferPlantScanFlag && allocated(DataPlant::PlantLoop)) { for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; errFlag = false; - ScanPlantLoopsForObject(Condenser(RefCondLoop).Name, - TypeOf_RefrigSystemWaterCondenser, + PlantUtilities::ScanPlantLoopsForObject(Condenser(RefCondLoop).Name, + DataPlant::TypeOf_RefrigSystemWaterCondenser, Condenser(RefCondLoop).PlantLoopNum, Condenser(RefCondLoop).PlantLoopSideNum, Condenser(RefCondLoop).PlantBranchNum, @@ -9338,9 +9320,9 @@ namespace RefrigeratedCase { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } - rho = GetDensityGlycol(PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, + rho = GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, - PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, + DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, RoutineName); if (Condenser(RefCondLoop).FlowType == ConstantFlow) { @@ -9354,8 +9336,8 @@ namespace RefrigeratedCase { if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; errFlag = false; - ScanPlantLoopsForObject(RefrigRack(RefCompRackLoop).Name, - TypeOf_RefrigerationWaterCoolRack, + PlantUtilities::ScanPlantLoopsForObject(RefrigRack(RefCompRackLoop).Name, + DataPlant::TypeOf_RefrigerationWaterCoolRack, RefrigRack(RefCompRackLoop).PlantLoopNum, RefrigRack(RefCompRackLoop).PlantLoopSideNum, RefrigRack(RefCompRackLoop).PlantBranchNum, @@ -9370,9 +9352,9 @@ namespace RefrigeratedCase { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } - rho = GetDensityGlycol(PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, + rho = GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, - PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, + DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, RoutineName); if (RefrigRack(RefCompRackLoop).FlowType == ConstantFlow) { @@ -9394,9 +9376,9 @@ namespace RefrigeratedCase { for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - rho = GetDensityGlycol(PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, + rho = GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, - PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, + DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, RoutineName); if (Condenser(RefCondLoop).FlowType == ConstantFlow) { @@ -9405,7 +9387,7 @@ namespace RefrigeratedCase { Condenser(RefCondLoop).MassFlowRateMax = Condenser(RefCondLoop).VolFlowRateMax * rho; } - InitComponentNodes(0.0, + PlantUtilities::InitComponentNodes(0.0, Condenser(RefCondLoop).MassFlowRateMax, Condenser(RefCondLoop).InletNode, Condenser(RefCondLoop).OutletNode, @@ -9417,9 +9399,9 @@ namespace RefrigeratedCase { for (RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - rho = GetDensityGlycol(PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, + rho = GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, - PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, + DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, RoutineName); if (RefrigRack(RefCompRackLoop).FlowType == ConstantFlow) { @@ -9428,7 +9410,7 @@ namespace RefrigeratedCase { RefrigRack(RefCompRackLoop).MassFlowRateMax = RefrigRack(RefCompRackLoop).VolFlowRateMax * rho; } - InitComponentNodes(0.0, + PlantUtilities::InitComponentNodes(0.0, RefrigRack(RefCompRackLoop).MassFlowRateMax, RefrigRack(RefCompRackLoop).InletNode, RefrigRack(RefCompRackLoop).OutletNode, @@ -9464,16 +9446,6 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - using CurveManager::CurveValue; - using DataEnvironment::OutBaroPress; - using DataEnvironment::OutDryBulbTemp; - using DataEnvironment::OutHumRat; - using DataHVACGlobals::TimeStepSys; - using Psychrometrics::PsyRhoAirFnPbTdbW; - using Psychrometrics::PsyTwbFnTdbWPb; - using Psychrometrics::PsyWFnTdbTwbPb; - using Psychrometrics::RhoH2O; - int CaseID; // Index to absolute case ID int CaseNum; // Index to refrigerated case attached to rack int WalkInID; // Index to absolute walk-in ID @@ -9491,7 +9463,7 @@ namespace RefrigeratedCase { Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] bool EvapAvail; // Control for evap condenser availability - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems static int CoilSetIndex(0); // Index to set of coils in a single zone static int CoilSetID(0); // Index to set of coils in a single zone (shared inlet and outlet nodes) static int CoilIndex(0); // Index to a single air chiller/coil @@ -9515,7 +9487,7 @@ namespace RefrigeratedCase { HeatRejectZoneNodeNum = 0; LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Loads for chiller sets are set in call to zone equipment element "SimAirChillerSet" // (all chiller coils within a set are located in the same zone) @@ -9586,7 +9558,7 @@ namespace RefrigeratedCase { } // NumWalkIns>0 if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - COPFTempOutput = CurveValue(RefrigRack(RackNum).COPFTempPtr, Node(HeatRejectZoneNodeNum).Temp); + COPFTempOutput = CurveManager::CurveValue(RefrigRack(RackNum).COPFTempPtr, Node(HeatRejectZoneNodeNum).Temp); EvapAvail = false; } else { if (RefrigRack(RackNum).OutsideAirNodeNum != 0) { @@ -9617,7 +9589,7 @@ namespace RefrigeratedCase { } else { HumRatIn = OutHumRat; } // outsideairnode - OutWbTemp = PsyTwbFnTdbWPb(OutDbTemp, HumRatIn, BPress); + OutWbTemp = Psychrometrics::PsyTwbFnTdbWPb(OutDbTemp, HumRatIn, BPress); EffectTemp = OutWbTemp + (1.0 - RefrigRack(RackNum).EvapEffect) * (OutDbTemp - OutWbTemp); } // evapAvail @@ -9641,7 +9613,7 @@ namespace RefrigeratedCase { } // InletTempMin } // DataHeatBalance::RefrigCondenserTypeWater - COPFTempOutput = CurveValue(RefrigRack(RackNum).COPFTempPtr, EffectTemp); + COPFTempOutput = CurveManager::CurveValue(RefrigRack(RackNum).COPFTempPtr, EffectTemp); } // Location Zone CompressorCOPactual = RefrigRack(RackNum).RatedCOP * COPFTempOutput; @@ -9663,11 +9635,11 @@ namespace RefrigeratedCase { if (TotalRackDeliveredCapacity > 0.0 && RefrigRack(RackNum).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) { if (RefrigRack(RackNum).TotCondFTempPtr != 0) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - CondenserFrac = max(0.0, min(1.0, CurveValue(RefrigRack(RackNum).TotCondFTempPtr, Node(HeatRejectZoneNodeNum).Temp))); + CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(RefrigRack(RackNum).TotCondFTempPtr, Node(HeatRejectZoneNodeNum).Temp))); TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RefrigRack(RackNum).CondenserFanPower * CondenserFrac; } else { - CondenserFrac = max(0.0, min(1.0, CurveValue(RefrigRack(RackNum).TotCondFTempPtr, EffectTemp))); + CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(RefrigRack(RackNum).TotCondFTempPtr, EffectTemp))); TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; } // location zone } else { @@ -9680,9 +9652,9 @@ namespace RefrigeratedCase { // assumes pump runs whenever evap cooling is available to minimize scaling if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { TotalCondenserPumpPower = RefrigRack(RackNum).EvapPumpPower; - HumRatOut = PsyWFnTdbTwbPb(EffectTemp, OutWbTemp, BPress); - TotalEvapWaterUseRate = RefrigRack(RackNum).CondenserAirFlowRate * CondenserFrac * PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn) * - (HumRatOut - HumRatIn) / RhoH2O(EffectTemp); + HumRatOut = Psychrometrics::PsyWFnTdbTwbPb(EffectTemp, OutWbTemp, BPress); + TotalEvapWaterUseRate = RefrigRack(RackNum).CondenserAirFlowRate * CondenserFrac * Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn) * + (HumRatOut - HumRatIn) / Psychrometrics::RhoH2O(EffectTemp); } // evapAvail // calculate basin water heater load if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { @@ -9741,15 +9713,14 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report compressor rack variables - using DataHVACGlobals::TimeStepSys; using DataWater::WaterStorage; - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems static int DemandARRID(0); // Index to water tank Demand used for evap condenser on rack static int RackTankID(0); // Index to water tank used for evap condenser on rack LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; RefrigRack(RackNum).RackCompressorPower = TotalCompressorPower; RefrigRack(RackNum).RackElecConsumption = TotalCompressorPower * LocalTimeStep * SecInHour; @@ -9824,11 +9795,7 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - using CurveManager::CurveValue; using namespace DataLoopNode; - using DataEnvironment::OutBaroPress; // , Month - using Psychrometrics::PsyRhFnTdbWPb; - using Psychrometrics::PsyTdpFnWPb; static Real64 CaseRAFraction(0.0); // Fraction of case credits applied to return air @@ -9935,8 +9902,8 @@ namespace RefrigeratedCase { // Set local subroutine variables for convenience ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; - ZoneRHPercent = PsyRhFnTdbWPb(Node(ZoneNodeNum).Temp, Node(ZoneNodeNum).HumRat, OutBaroPress) * 100.0; - ZoneDewPoint = PsyTdpFnWPb(Node(ZoneNodeNum).HumRat, OutBaroPress); + ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(Node(ZoneNodeNum).Temp, Node(ZoneNodeNum).HumRat, OutBaroPress) * 100.0; + ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(Node(ZoneNodeNum).HumRat, OutBaroPress); Length = RefrigCase(CaseID).Length; TCase = RefrigCase(CaseID).Temperature; DesignRatedCap = RefrigCase(CaseID).DesignRatedCap; @@ -10035,12 +10002,12 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(RefrigCase(CaseID).LatentEnergyCurveType); if (SELECT_CASE_var == CaseTemperatureMethod) { - LatCapModFrac = CurveValue(RefrigCase(CaseID).LatCapCurvePtr, TCase); + LatCapModFrac = CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, TCase); LatentRatio = max(0.0, (1.0 - (RatedAmbientRH - ZoneRHPercent) * LatCapModFrac)); } else if (SELECT_CASE_var == RHCubic) { - LatentRatio = max(0.0, CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneRHPercent)); + LatentRatio = max(0.0, CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneRHPercent)); } else if (SELECT_CASE_var == DPCubic) { - LatentRatio = max(0.0, CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneDewPoint)); + LatentRatio = max(0.0, CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneDewPoint)); } } @@ -10078,12 +10045,12 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(DefrostEnergyCurveType); if (SELECT_CASE_var == CaseTemperatureMethod) { - DefCapModFrac = CurveValue(DefCapCurvePtr, TCase); + DefCapModFrac = CurveManager::CurveValue(DefCapCurvePtr, TCase); DefrostRatio = max(0.0, (1.0 - (RatedAmbientRH - ZoneRHPercent) * DefCapModFrac)); } else if (SELECT_CASE_var == RHCubic) { - DefrostRatio = max(0.0, CurveValue(DefCapCurvePtr, ZoneRHPercent)); + DefrostRatio = max(0.0, CurveManager::CurveValue(DefCapCurvePtr, ZoneRHPercent)); } else if (SELECT_CASE_var == DPCubic) { - DefrostRatio = max(0.0, CurveValue(DefCapCurvePtr, ZoneDewPoint)); + DefrostRatio = max(0.0, CurveManager::CurveValue(DefCapCurvePtr, ZoneDewPoint)); } else if (SELECT_CASE_var == None) { DefrostRatio = 1.0; } @@ -10304,13 +10271,8 @@ namespace RefrigeratedCase { // Called from SimPlantEquip in PlantLoopEquipment , previously was called from Non-Zone Equipment Manager // Flow is requested and the actual available flow is set. The outlet temperature is calculated. - using DataPlant::PlantLoop; - using DataPlant::TypeOf_RefrigerationWaterCoolRack; - using DataPlant::TypeOf_RefrigSystemWaterCondenser; using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; - using General::TrimSigDigits; - using PlantUtilities::SetComponentFlowRate; static std::string const RoutineName("SimRefrigCondenser"); static Real64 DeltaT(0.0); @@ -10342,10 +10304,10 @@ namespace RefrigeratedCase { if (CompIndex == 0) { { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { + if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { Num = UtilityRoutines::FindItemInList(CompName, RefrigRack); - } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { + } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { Num = UtilityRoutines::FindItemInList(CompName, Condenser); } else { ShowFatalError("SimRefrigCondenser: invalid system type passed"); @@ -10361,27 +10323,27 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { + if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { if (Num > DataHeatBalance::NumRefrigeratedRacks || Num < 1) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + TrimSigDigits(Num) + - ", Number of Units=" + TrimSigDigits(DataHeatBalance::NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + + ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); } if (CheckEquipNameRackWaterCondenser(Num)) { if (CompName != RefrigRack(Num).Name) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + TrimSigDigits(Num) + ", Entered Unit name=" + CompName + + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + ", stored Unit name for that index=" + RefrigRack(Num).Name); } CheckEquipNameRackWaterCondenser(Num) = false; } - } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { + } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { if (Num > DataHeatBalance::NumRefrigCondensers || Num < 1) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + TrimSigDigits(Num) + - ", Number of Units=" + TrimSigDigits(DataHeatBalance::NumRefrigCondensers) + ", Entered Unit name=" + CompName); + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + + ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigCondensers) + ", Entered Unit name=" + CompName); } if (CheckEquipNameWaterCondenser(Num)) { if (CompName != Condenser(Num).Name) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + TrimSigDigits(Num) + ", Entered Unit name=" + CompName + + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + ", stored Unit name for that index=" + Condenser(Num).Name); } CheckEquipNameWaterCondenser(Num) = false; @@ -10401,7 +10363,7 @@ namespace RefrigeratedCase { // set variables depending upon system type { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { + if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { PlantInletNode = RefrigRack(Num).InletNode; PlantOutletNode = RefrigRack(Num).OutletNode; PlantLoopIndex = RefrigRack(Num).PlantLoopNum; @@ -10428,7 +10390,7 @@ namespace RefrigeratedCase { HighFlowWarnIndex = RefrigRack(Num).HighFlowWarnIndex; HighTempWarnIndex = RefrigRack(Num).HighTempWarnIndex; HighInletWarnIndex = RefrigRack(Num).HighInletWarnIndex; - } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { + } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { // InletNode = Condenser(Num)%InletNode PlantInletNode = Condenser(Num).InletNode; PlantOutletNode = Condenser(Num).OutletNode; @@ -10462,14 +10424,14 @@ namespace RefrigeratedCase { // Make demand request on first HVAC iteration // get cooling fluid properties - rho = GetDensityGlycol(PlantLoop(PlantLoopIndex).FluidName, InletTemp, PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Cp = GetSpecificHeatGlycol(PlantLoop(PlantLoopIndex).FluidName, InletTemp, PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + rho = GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Cp = GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); // first determine desired flow if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { - if (SysType == TypeOf_RefrigerationWaterCoolRack) { + if (SysType == DataPlant::TypeOf_RefrigerationWaterCoolRack) { OutletTemp = GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); - } else if (SysType == TypeOf_RefrigSystemWaterCondenser) { + } else if (SysType == DataPlant::TypeOf_RefrigSystemWaterCondenser) { OutletTemp = GetCurrentScheduleValue(Condenser(Num).OutletTempSchedPtr); } if (OutletTemp == InletTemp) { @@ -10509,7 +10471,7 @@ namespace RefrigeratedCase { } // on flow type // check against plant, might get changed. - SetComponentFlowRate(MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + PlantUtilities::SetComponentFlowRate(MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); VolFlowRate = MassFlowRate / rho; @@ -10538,7 +10500,7 @@ namespace RefrigeratedCase { // set up output variables { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { + if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { // RefrigRack(Num)%HighFlowWarn = HighFlowWarn // RefrigRack(Num)%HighTempWarn = HighTempWarn RefrigRack(Num).MassFlowRate = MassFlowRate; @@ -10548,7 +10510,7 @@ namespace RefrigeratedCase { RefrigRack(Num).HighTempWarnIndex = HighTempWarnIndex; RefrigRack(Num).HighInletWarnIndex = HighInletWarnIndex; RefrigRack(Num).NoFlowWarnIndex = NoFlowWarnIndex; - } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { + } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { // Condenser(Num)%HighFlowWarn = HighFlowWarn // Condenser(Num)%HighTempWarn = HighTempWarn Condenser(Num).MassFlowRate = MassFlowRate; @@ -10577,30 +10539,27 @@ namespace RefrigeratedCase { // Updates the node variables with local variables. using DataLoopNode::Node; - using DataPlant::TypeOf_RefrigerationWaterCoolRack; - using DataPlant::TypeOf_RefrigSystemWaterCondenser; - using PlantUtilities::SafeCopyPlantNode; { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { + if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { InletNode = RefrigRack(Num).InletNode; OutletNode = RefrigRack(Num).OutletNode; - } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { + } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { InletNode = Condenser(Num).InletNode; OutletNode = Condenser(Num).OutletNode; } } // Pass all variables from inlet to outlet node - SafeCopyPlantNode(InletNode, OutletNode); // Node(OutletNode) = Node(InletNode) + PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); // Node(OutletNode) = Node(InletNode) // Set outlet node variables that are possibly changed { auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == TypeOf_RefrigerationWaterCoolRack) { + if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { Node(OutletNode).Temp = RefrigRack(Num).OutletTemp; - } else if (SELECT_CASE_var == TypeOf_RefrigSystemWaterCondenser) { + } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { Node(OutletNode).Temp = Condenser(Num).OutletTemp; } } @@ -10652,7 +10611,7 @@ namespace RefrigeratedCase { static int CascadeLoadIndex(0); // Index to Cascade Condenser Load static int CascadeLoadID(0); // Absolute reference to Cascade Condenser static Real64 LoadFrac(1.0); // case load/design case load - static Real64 LocalTimeStep(0.0); // Set equal to either TimeStepSys or TimeStepZone + static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps static Real64 CurrentHiStageLoads(0.0); // Current loads on high-stage compressor, exclusive of unmet loads from // prev time steps (two-stage systems only) @@ -10662,7 +10621,7 @@ namespace RefrigeratedCase { Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Cascade condenser assumes a constant approach delta T (Tcond - Tevap), not f(load) @@ -11081,12 +11040,12 @@ namespace RefrigeratedCase { static int SuctionPipeActualZoneNum(0); // Index to zone exchanging heat with suction pipes static int WalkInID(0); // Absolute reference to WalkIn static int WalkInIndex(0); // Index to WalkIn - static Real64 LocalTimeStep(0.0); // Set equal to either TimeStepSys or TimeStepZone + static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Do transcritical CO2 refrigeration system loop outside of iterative solution to initialize time step and // calculate case and and walk-ins (that won't change during balance of refrigeration system iterations) @@ -11394,8 +11353,6 @@ namespace RefrigeratedCase { // calculated refrigerant mass flow through the receiver bypass converges, which typically // requires less than 5 iterations. - using General::RoundSigDigits; - Real64 const ErrorTol(0.001); // Iterative solution tolerance int NumIter; // Iteration counter @@ -11418,7 +11375,7 @@ namespace RefrigeratedCase { if ((TransSystem(SysNum).RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { ShowSevereError("Refrigeration:TranscriticalSystem: " + TransSystem(SysNum).Name + " showing zero refrigerant flow through receiver bypass."); - ShowContinueError("Receiver Bypass Flow = " + RoundSigDigits(TransSystem(SysNum).RefMassFlowReceiverBypass, 6)); + ShowContinueError("Receiver Bypass Flow = " + General::RoundSigDigits(TransSystem(SysNum).RefMassFlowReceiverBypass, 6)); ShowContinueError("Check input file to ensure that refrigeration loads on this system are not zero."); } else { ErrorMassFlow = std::abs(MassFlowStart - TransSystem(SysNum).RefMassFlowReceiverBypass) / MassFlowStart; @@ -11466,19 +11423,7 @@ namespace RefrigeratedCase { // Lawrence Berkeley Laboratory and Resource Dynamics, Improving Fan Systrem Performance, // A Sourcebook for Industry, DOE/GO-102003-1294, April 2003 - using CurveManager::CurveValue; - using DataEnvironment::OutBaroPress; - using DataEnvironment::OutDryBulbTemp; - using DataEnvironment::OutHumRat; using DataWater::WaterStorage; - using Psychrometrics::PsyHFnTdbRhPb; - using Psychrometrics::PsyHFnTdbW; - using Psychrometrics::PsyRhoAirFnPbTdbW; - using Psychrometrics::PsyTsatFnHPb; - using Psychrometrics::PsyTwbFnTdbWPb; - using Psychrometrics::PsyWFnTdbTwbPb; - using Psychrometrics::PsyWFnTdpPb; - using Psychrometrics::RhoH2O; Real64 const BleedRateConstant(5.0E-10); // water purge rate for evaporative // condensers (m3/W-s) equal to 3 GPM per 100 tons (BAC Engineering Reference) @@ -11511,7 +11456,7 @@ namespace RefrigeratedCase { Real64 HRCFFullFlow; // Heat Rejection Capacity Factor at full air flow Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] - Real64 LocalTimeStep; // Set equal to either TimeStepSys or TimeStepZone + Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone Real64 OutWbTemp(0.0); // Outdoor wet bulb temp at condenser air inlet node [C] Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenseer (m3/s) @@ -11531,7 +11476,7 @@ namespace RefrigeratedCase { Real64 CurMaxCapacity; // current maximum condenser capacity at delta T present for minimum condensing temperature [W] LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Initialize this condenser for this time step TotalCondenserPumpPower = 0.0; @@ -11648,8 +11593,8 @@ namespace RefrigeratedCase { BPress = OutBaroPress; HumRatIn = OutHumRat; } - AirDensity = PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn); - AirDensityDry = PsyRhoAirFnPbTdbW(BPress, OutDbTemp, 0.0); + AirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn); + AirDensityDry = Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, 0.0); // Evaporative condensers will have their water flow shut off in cold months to avoid // 'spectacular' icing problems. Ideally, the user will use the evaporative schedule input // to set such a schedule. However, sometimes, users will use a single input deck to model @@ -11680,7 +11625,7 @@ namespace RefrigeratedCase { HRCF = min(HRCF, condenser.MaxCapFacEvap); HRCF = max(HRCF, condenser.MinCapFacEvap); if (EvapAvail) { - OutWbTemp = PsyTwbFnTdbWPb(OutDbTemp, HumRatIn, BPress); + OutWbTemp = Psychrometrics::PsyTwbFnTdbWPb(OutDbTemp, HumRatIn, BPress); SinkTemp = OutWbTemp; } else { // evaporative condenser with water spray scheduled off so use Tdb HRCF /= 3.0; // reference Menske, cap of evap cond operating dry about 1/3 of rated cap @@ -11707,7 +11652,7 @@ namespace RefrigeratedCase { TCondCalc = System(SysNum).TCondenseMin; // recalculate CapFac at current delta T if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { - CurMaxCapacity = CurveValue(condenser.CapCurvePtr, (System(SysNum).TCondenseMin - OutDbTemp)); + CurMaxCapacity = CurveManager::CurveValue(condenser.CapCurvePtr, (System(SysNum).TCondenseMin - OutDbTemp)); CapFac = TotalCondenserHeat / CurMaxCapacity; AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, CondAirVolExponentDry)); // Fans limited by minimum air flow ratio AirVolRatio = min(AirVolRatio, 1.0); @@ -11763,17 +11708,17 @@ namespace RefrigeratedCase { // leads to 'spectacular' ice, so schedule evap off when Tdb <=4 C. // Calculate bleed/purge rate of water loss as a function of capacity, 3 gpm/100 tons refrigeration PurgeRate = TotalCondenserHeat * BleedRateConstant; - EnthalpyAirIn = PsyHFnTdbW(OutDbTemp, HumRatIn); + EnthalpyAirIn = Psychrometrics::PsyHFnTdbW(OutDbTemp, HumRatIn); // calculate effectiveness at rated conditions, so use Tcondcalc) - EnthalpyAtTcond = PsyHFnTdbRhPb(TCondCalc, 1.0, BPress); + EnthalpyAtTcond = Psychrometrics::PsyHFnTdbRhPb(TCondCalc, 1.0, BPress); Effectiveness = TotalCondenserHeat / (RatedAirFlowRate * AirDensity * (EnthalpyAtTcond - EnthalpyAirIn)); // need to limit max effectiveness for errors due to working beyond limits of HRCF in manuf data Effectiveness = min(Effectiveness, 0.9); EnthalpyAirOut = EnthalpyAirIn + Effectiveness * (EnthalpyAtTcond - EnthalpyAirIn); // Air leaving the evaporative condenser is saturated - TAirOut = PsyTsatFnHPb(EnthalpyAirOut, BPress); - HumRatOut = PsyWFnTdpPb(TAirOut, BPress); - TotalEvapWaterUseRate = PurgeRate + RatedAirFlowRate * AirVolRatio * AirDensityDry * (HumRatOut - HumRatIn) / RhoH2O(OutWbTemp); + TAirOut = Psychrometrics::PsyTsatFnHPb(EnthalpyAirOut, BPress); + HumRatOut = Psychrometrics::PsyWFnTdpPb(TAirOut, BPress); + TotalEvapWaterUseRate = PurgeRate + RatedAirFlowRate * AirVolRatio * AirDensityDry * (HumRatOut - HumRatIn) / Psychrometrics::RhoH2O(OutWbTemp); // assumes evap water pump runs whenever evap cooling is available to minimize scaling TotalCondenserPumpPower = condenser.EvapPumpPower; // calculate basin water heater load @@ -11882,8 +11827,6 @@ namespace RefrigeratedCase { // Part II: System modifications and comparisons of different solutions. International Journal of // Refrigeration 31: 525-534. - using DataEnvironment::OutDryBulbTemp; - static std::string const RoutineName("RefrigeratedCase:CalcGasCooler"); int GasCoolerCreditWarnIndex; // Warning counter @@ -11895,7 +11838,7 @@ namespace RefrigeratedCase { Real64 CapFac; // Capacity factor Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio Real64 FanPowerRatio; // Calculated fan power ratio - Real64 LocalTimeStep; // Set equal to either TimeStepSys or TimeStepZone + Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone Real64 OutDbTemp; // Outdoor dry bulb temperature at gas cooler air inlet node [C] Real64 RatedFanPower; // Rated fan power for this gas cooler [W] Real64 TotalCondDefCredfromSysID; // Gas cooler defrost credit for single system [W] @@ -11907,7 +11850,7 @@ namespace RefrigeratedCase { Real64 TotalLoadFromThisSystem(0.0); // Total heat rejection load from the detailed system identified in subroutine call [W] LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; //! Initialize this gas cooler for this time step TotalGasCoolerHeat = 0.0; @@ -12057,9 +12000,7 @@ namespace RefrigeratedCase { // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 // ARI Standard 540, 2004, Standard for Performance Rating of Positive Displacement Refrigerant - // Comprssors and Compressor Units, Air-Conditionig & Refrigeration Institute,Arlington VA - - using CurveManager::CurveValue; + // Compressors and Compressor Units, Air-Conditioning & Refrigeration Institute,Arlington VA // SUBROUTINE PARAMETER DEFINITIONS: // Following constants approp for R22, R134a, R404a, R507, R410a, R407c, future allow input? @@ -12082,7 +12023,7 @@ namespace RefrigeratedCase { Real64 HSatVapCondense; // Enthalpy of saturated vapor at T condense, J/kg Real64 HsatVaporforTevapneeded; // Enthalpy saturated vapor at temperature needed at evaporator Real64 LFLastComp; // Load factor for last compressor dispatched - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MassCorrection; // Mass flow at existing subcool/superheat over cap at rated conditions Real64 NeededCapacity; // Sum of case loads and mech subcooler loads on suction group Real64 PSuction; // Suction Pressure @@ -12099,7 +12040,7 @@ namespace RefrigeratedCase { Real64 HCaseInRated_base(0.0), HCompInRated_base(0.0); // Autodesk:Tuned Intermediate values for performance tuning LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; Real64 const LocalTimeStepSec(LocalTimeStep * SecInHour); auto &System_SysNum(System(SysNum)); @@ -12302,8 +12243,8 @@ namespace RefrigeratedCase { // the increase in capacity due to extra subcooling MassCorrection = DensityActual / DensityRated; CapacityCorrection = MassCorrection * TotalEnthalpyChangeActual / CaseEnthalpyChangeRated; - Compressor_CompID.Power = CurveValue(Compressor_CompID.ElecPowerCurvePtr, TsatforPsuct, TsatforPdisch); - Compressor_CompID.Capacity = CapacityCorrection * CurveValue(Compressor_CompID.CapacityCurvePtr, TsatforPsuct, TsatforPdisch); + Compressor_CompID.Power = CurveManager::CurveValue(Compressor_CompID.ElecPowerCurvePtr, TsatforPsuct, TsatforPdisch); + Compressor_CompID.Capacity = CapacityCorrection * CurveManager::CurveValue(Compressor_CompID.CapacityCurvePtr, TsatforPsuct, TsatforPdisch); Compressor_CompID.MassFlow = Compressor_CompID.Capacity / TotalEnthalpyChangeActual; // calculate load factor for last compressor addded @@ -12423,8 +12364,6 @@ namespace RefrigeratedCase { // Part II: System modifications and comparisons of different solutions. International Journal of // Refrigeration 31: 525-534. - using CurveManager::CurveValue; - // SUBROUTINE PARAMETER DEFINITIONS: // Following constants approp for R22, R134a, R404a, R507, R410a, R407c. // For the same pressure drop, CO2 has a corresponding temperature penalty 5 to 10 times smaller than @@ -12462,7 +12401,7 @@ namespace RefrigeratedCase { Real64 HsatVaporforTevapneededMT; // Enthlapy of saturated vapor at MT evaporator (transcritical cycle), J/kg Real64 HsatVaporforTevapneededLT; // Enthlapy of saturated vapor at LT evaporator (transcritical cycle), J/kg Real64 LFLastComp; // Load factor for last compressor dispatched - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MassCorrectionLT; // Mass flow at existing subcool/superheat over cap at rated conditions for LT loads Real64 MassCorrectionMT; // Mass flow at existing subcool/superheat over cap at rated conditions for MT loads Real64 NeededCapacityLT; // Sum of LT case loads and mech subcooler loads (transcritical cycle), W @@ -12487,7 +12426,7 @@ namespace RefrigeratedCase { Real64 Xnew; // New guess for iterative search LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; GasCoolerID = TransSystem(SysNum).GasCoolerNum(1); @@ -12579,8 +12518,8 @@ namespace RefrigeratedCase { // the increase in capacity due to extra subcooling MassCorrectionLT = DensityActualLT / DensityRatedLP; CapacityCorrectionLT = MassCorrectionLT * TotalEnthalpyChangeActualLT / CaseEnthalpyChangeRatedLT; - Compressor(CompID).Power = CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucLT, TsatforPdisLT); - Compressor(CompID).Capacity = CapacityCorrectionLT * CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucLT, TsatforPdisLT); + Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucLT, TsatforPdisLT); + Compressor(CompID).Capacity = CapacityCorrectionLT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucLT, TsatforPdisLT); Compressor(CompID).MassFlow = Compressor(CompID).Capacity / TotalEnthalpyChangeActualLT; Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * SecInHour; @@ -12777,11 +12716,11 @@ namespace RefrigeratedCase { CapacityCorrectionMT = MassCorrectionMT * TotalEnthalpyChangeActualMT / CaseEnthalpyChangeRatedMT; if (GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TransOpFlag) { // System is operating in transcritical region - Compressor(CompID).Power = CurveValue(Compressor(CompID).TransElecPowerCurvePtr, TsatforPsucMT, PGCOutlet); - Compressor(CompID).Capacity = CapacityCorrectionMT * CurveValue(Compressor(CompID).TransCapacityCurvePtr, TsatforPsucMT, HGCOutlet); + Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).TransElecPowerCurvePtr, TsatforPsucMT, PGCOutlet); + Compressor(CompID).Capacity = CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).TransCapacityCurvePtr, TsatforPsucMT, HGCOutlet); } else { // System is operating in subcritical region - Compressor(CompID).Power = CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucMT, TsatforPdisMT); - Compressor(CompID).Capacity = CapacityCorrectionMT * CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucMT, TsatforPdisMT); + Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucMT, TsatforPdisMT); + Compressor(CompID).Capacity = CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucMT, TsatforPdisMT); } // (GasCooler(SysNum)%TransOpFlag) // Mass flow through HP compressors is HP compressor refrigerating capacity divided by MT load, LT load and LP compressor power Compressor(CompID).MassFlow = @@ -12844,8 +12783,6 @@ namespace RefrigeratedCase { // REFERENCES: // ASHRAE 1006 Section 2: Refrigeration Accessories - using CurveManager::CurveValue; - static std::string const RoutineName("CalculateSubcoolers"); int SubcoolerIndex; // Counter through number of subcoolers on this system int SubcoolerID; // ID number for each unique subcooler @@ -12855,7 +12792,7 @@ namespace RefrigeratedCase { Real64 ControlTLiqOut; // Controlled temperature of liquid leaving Mechanical subcooler Real64 DelTempActual; // Actual subcooling, T liquid in - T liquid out Real64 DelTLiqDes; // Design Temperature Change on liquid side of LSHX - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 LSHXeffectiveness; // EFfectiveness of liquid suction heat exchanger (LSHX) Real64 MechSCLoad; // Mechanical subcooler load Real64 SubcoolLoad; // energy transferred from warmer liquid to cool vapor @@ -12866,7 +12803,7 @@ namespace RefrigeratedCase { Real64 TVapInActual; // Vapor T in, after any superheat added by case control LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // HCaseIn has to be recalculated as the starting point for the subcoolers here because // of the multiple number of iterations through this subroutine and because Tcondense is evolving. @@ -13026,7 +12963,6 @@ namespace RefrigeratedCase { // To report information from the input deck for refrigerated cases and racks to the eio and err file. using DataLoopNode::NodeID; - using General::RoundSigDigits; int CascadeLoadID; int CascadeLoadNum; @@ -13188,7 +13124,7 @@ namespace RefrigeratedCase { } //(NumTransRefrigSystems > 0) if (DataHeatBalance::NumRefrigeratedRacks > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + General::RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationOutdoors) { ChrOut = "Outdoors"; @@ -13206,141 +13142,141 @@ namespace RefrigeratedCase { } } ObjexxFCL::gio::write(OutputFileInits, Format_101) << " Refrigeration Compressor Rack," + RefrigRack(RackNum).Name + ',' + - RoundSigDigits(RefrigRack(RackNum).NumCases) + ',' + - RoundSigDigits(RefrigRack(RackNum).NumWalkIns) + ',' + ChrOut + ',' + ChrOut2 + ',' + - RoundSigDigits(RefrigRack(RackNum).RatedCOP, 3); + General::RoundSigDigits(RefrigRack(RackNum).NumCases) + ',' + + General::RoundSigDigits(RefrigRack(RackNum).NumWalkIns) + ',' + ChrOut + ',' + ChrOut2 + ',' + + General::RoundSigDigits(RefrigRack(RackNum).RatedCOP, 3); for (CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { CaseID = RefrigRack(RackNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Case," + RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + - RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + - ',' + RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).Length, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); // Installed lighting power, may not be rated power + << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); // Installed lighting power, may not be rated power } } // numcases for (WalkInNum = 1; WalkInNum <= RefrigRack(RackNum).NumWalkIns; ++WalkInNum) { WalkInID = RefrigRack(RackNum).WalkInNum(WalkInNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Walk In Cooler, " + RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).ElecFanPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).NumZones); + << " Refrigeration Walk In Cooler, " + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).ElecFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // zones for walk ins on rack } // walk ins on rack for (CoilNum = 1; CoilNum <= RefrigRack(RackNum).NumCoils; ++CoilNum) { CoilID = RefrigRack(RackNum).CoilNum(CoilNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; + << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers } // numracks } //(NumRefrigeratedRacks > 0) if (DataHeatBalance::NumRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + RoundSigDigits(DataHeatBalance::NumRefrigSystems); + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + General::RoundSigDigits(DataHeatBalance::NumRefrigSystems); for (SystemNum = 1; SystemNum <= DataHeatBalance::NumRefrigSystems; ++SystemNum) { ObjexxFCL::gio::write(OutputFileInits, Format_101) << " Detailed Refrigeration System," + System(SystemNum).Name + ',' + System(SystemNum).RefrigerantName + ',' + - RoundSigDigits(System(SystemNum).NumCases) + ',' + RoundSigDigits(System(SystemNum).NumWalkIns) + ',' + - RoundSigDigits(System(SystemNum).NumCoils) + ',' + RoundSigDigits(System(SystemNum).NumSecondarys) + ',' + - RoundSigDigits(System(SystemNum).NumCascadeLoads) + ',' + RoundSigDigits(System(SystemNum).NumMechSCServed) + ',' + - RoundSigDigits(System(SystemNum).NumCompressors + System(SystemNum).NumHiStageCompressors) + ',' + - RoundSigDigits(System(SystemNum).NumStages) + ',' + RoundSigDigits(System(SystemNum).IntercoolerType) + ',' + - RoundSigDigits(System(SystemNum).IntercoolerEffectiveness, 2) + ',' + RoundSigDigits(System(SystemNum).NumSubcoolers) + - ',' + RoundSigDigits(System(SystemNum).TCondenseMin, 1); + General::RoundSigDigits(System(SystemNum).NumCases) + ',' + General::RoundSigDigits(System(SystemNum).NumWalkIns) + ',' + + General::RoundSigDigits(System(SystemNum).NumCoils) + ',' + General::RoundSigDigits(System(SystemNum).NumSecondarys) + ',' + + General::RoundSigDigits(System(SystemNum).NumCascadeLoads) + ',' + General::RoundSigDigits(System(SystemNum).NumMechSCServed) + ',' + + General::RoundSigDigits(System(SystemNum).NumCompressors + System(SystemNum).NumHiStageCompressors) + ',' + + General::RoundSigDigits(System(SystemNum).NumStages) + ',' + General::RoundSigDigits(System(SystemNum).IntercoolerType) + ',' + + General::RoundSigDigits(System(SystemNum).IntercoolerEffectiveness, 2) + ',' + General::RoundSigDigits(System(SystemNum).NumSubcoolers) + + ',' + General::RoundSigDigits(System(SystemNum).TCondenseMin, 1); for (CaseNum = 1; CaseNum <= System(SystemNum).NumCases; ++CaseNum) { CaseID = System(SystemNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Case," + RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + - RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + - ',' + RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).Length, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCases on system for (WalkInNum = 1; WalkInNum <= System(SystemNum).NumWalkIns; ++WalkInNum) { WalkInID = System(SystemNum).WalkInNum(WalkInNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Walk In Cooler," + RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).NumZones); + << " Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkIns on system for (CoilNum = 1; CoilNum <= System(SystemNum).NumCoils; ++CoilNum) { CoilID = System(SystemNum).CoilNum(CoilNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; + << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers for (CascadeLoadNum = 1; CascadeLoadNum <= System(SystemNum).NumCascadeLoads; ++CascadeLoadNum) { CascadeLoadID = System(SystemNum).CascadeLoadNum(CascadeLoadNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Cascade Load," + System(Condenser(CascadeLoadID).CascadeSysID).Name + ',' + - RoundSigDigits(CascadeLoadID) + ',' + Condenser(CascadeLoadID).Name; + General::RoundSigDigits(CascadeLoadID) + ',' + Condenser(CascadeLoadID).Name; } // cascade load on detailed system for (SecondaryNum = 1; SecondaryNum <= System(SystemNum).NumSecondarys; ++SecondaryNum) { SecondaryID = System(SystemNum).SecondaryNum(SecondaryNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Secondary Load," + Secondary(SecondaryID).Name + ',' + RoundSigDigits(SecondaryID); + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Secondary Load," + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(SecondaryID); } // secondary load on detailed system for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { if (Subcooler(SubcoolerNum).MechSourceSysID != SystemNum) continue; ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Mechanical Subcooler Load, " + RoundSigDigits(SubcoolerNum) + ',' + Subcooler(SubcoolerNum).Name; + << " Mechanical Subcooler Load, " + General::RoundSigDigits(SubcoolerNum) + ',' + Subcooler(SubcoolerNum).Name; } // Num sim subcoolers, looking only for NumSMech Subcoolers served by this system if (System(SystemNum).NumStages == 1) { // Single-stage compression system for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { CompID = System(SystemNum).CompressorNum(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Compressor," + RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors } else if (System(SystemNum).NumStages == 2) { // Two-stage compression system // Low-stage compressors for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { CompID = System(SystemNum).CompressorNum(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Low-Stage Compressor," + RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Low-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors // High-stage compressors for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumHiStageCompressors; ++CompressorNum) { CompID = System(SystemNum).HiStageCompressorNum(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration High-Stage Compressor," + RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration High-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumHiStageCompressors } // NumStages @@ -13349,18 +13285,18 @@ namespace RefrigeratedCase { auto const SELECT_CASE_var(Condenser(CondID).CondenserType); if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Condenser:Air-Cooled," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + - RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + - ',' + RoundSigDigits(Condenser(CondID).RatedFanPower, 1); + << " Refrigeration Condenser:Air-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + + ',' + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Condenser:Evaporative-Cooled," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + - RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedFanPower, 1); + << " Refrigeration Condenser:Evaporative-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Condenser:Water-Cooled," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + - RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + - ',' + RoundSigDigits(Condenser(CondID).InletTemp, 1) + ',' + RoundSigDigits(Condenser(CondID).DesVolFlowRate, 1); + << " Refrigeration Condenser:Water-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + + ',' + General::RoundSigDigits(Condenser(CondID).InletTemp, 1) + ',' + General::RoundSigDigits(Condenser(CondID).DesVolFlowRate, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeCascade) { { @@ -13372,9 +13308,9 @@ namespace RefrigeratedCase { } } // cascade temperature control ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Condenser:Cascade," + RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + ChrOut + ',' + - RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + - ',' + RoundSigDigits(Condenser(CondID).RatedApproachT, 1); + << " Refrigeration Condenser:Cascade," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + ChrOut + ',' + + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + + ',' + General::RoundSigDigits(Condenser(CondID).RatedApproachT, 1); } } // condenser type @@ -13383,15 +13319,15 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(Subcooler(SubcoolerID).SubcoolerType); if (SELECT_CASE_var == LiquidSuction) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Liquid Suction Subcooler," + RoundSigDigits(SubcoolerID) + + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Liquid Suction Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + Subcooler(SubcoolerID).Name + ',' + - RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignDelT, 1) + ',' + - RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTliqIn, 1) + ',' + - RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTvapIn, 1); + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignDelT, 1) + ',' + + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTliqIn, 1) + ',' + + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTvapIn, 1); } else if (SELECT_CASE_var == Mechanical) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Mechanical Subcooler," + RoundSigDigits(SubcoolerID) + ',' + + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Mechanical Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + Subcooler(SubcoolerID).Name + ',' + Subcooler(SubcoolerID).MechSourceSys + - ',' + RoundSigDigits(Subcooler(SubcoolerID).MechControlTliqOut, 1); + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).MechControlTliqOut, 1); } } } // NumSubcoolers @@ -13400,196 +13336,196 @@ namespace RefrigeratedCase { } //(NumRefrigSystems > 0) if (NumTransRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Transcritical Refrigeration Systems," + RoundSigDigits(NumTransRefrigSystems); + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Transcritical Refrigeration Systems," + General::RoundSigDigits(NumTransRefrigSystems); for (TransSystemNum = 1; TransSystemNum <= NumTransRefrigSystems; ++TransSystemNum) { ObjexxFCL::gio::write(OutputFileInits, Format_101) << " Detailed Transcritical Refrigeration System," + TransSystem(TransSystemNum).Name + ',' + - TransSystem(TransSystemNum).RefrigerantName + ',' + RoundSigDigits(TransSystem(TransSystemNum).NumCasesMT) + ',' + - RoundSigDigits(TransSystem(TransSystemNum).NumCasesLT) + ',' + RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsMT) + - ',' + RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsLT) + ',' + - RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsHP) + ',' + - RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsLP) + ',' + - RoundSigDigits(GasCooler(TransSystem(TransSystemNum).GasCoolerNum(1)).MinCondTemp, 1); + TransSystem(TransSystemNum).RefrigerantName + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesMT) + ',' + + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesLT) + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsMT) + + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsLT) + ',' + + General::RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsHP) + ',' + + General::RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsLP) + ',' + + General::RoundSigDigits(GasCooler(TransSystem(TransSystemNum).GasCoolerNum(1)).MinCondTemp, 1); for (CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesMT; ++CaseNum) { CaseID = TransSystem(TransSystemNum).CaseNumMT(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Medium Temperature Refrigeration Case," + RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + - RefrigCase(CaseID).ZoneName + ',' + RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + - NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + << " Medium Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCasesMT on system for (CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesLT; ++CaseNum) { CaseID = TransSystem(TransSystemNum).CaseNumLT(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Low Temperature Refrigeration Case," + RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + - RefrigCase(CaseID).ZoneName + ',' + RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + - NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + << " Low Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCasesLT on system for (WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsMT; ++WalkInNum) { WalkInID = TransSystem(TransSystemNum).WalkInNumMT(WalkInNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Medium Temperature Refrigeration Walk In Cooler," + RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).NumZones); + << " Medium Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkInsMT on system for (WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsLT; ++WalkInNum) { WalkInID = TransSystem(TransSystemNum).WalkInNumLT(WalkInNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Low Temperature Refrigeration Walk In Cooler," + RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).NumZones); + << " Low Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkInsLT on system for (CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsHP; ++CompressorNum) { CompID = TransSystem(TransSystemNum).CompressorNumHP(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " High Pressure Refrigeration Compressor," + RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " High Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsHP for (CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsLP; ++CompressorNum) { CompID = TransSystem(TransSystemNum).CompressorNumLP(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Low Pressure Refrigeration Compressor," + RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Low Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsLP if (TransSystem(TransSystemNum).NumGasCoolers >= 1) { GasCoolerID = TransSystem(TransSystemNum).GasCoolerNum(1); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration GasCooler:Air-Cooled," + RoundSigDigits(GasCoolerID) + ',' + GasCooler(GasCoolerID).Name + ',' + - RoundSigDigits(GasCooler(GasCoolerID).RatedOutletP, 1) + ',' + RoundSigDigits(GasCooler(GasCoolerID).RatedOutletT, 1) + - ',' + RoundSigDigits(GasCooler(GasCoolerID).RatedApproachT, 1) + ',' + - RoundSigDigits(GasCooler(GasCoolerID).RatedCapacity, 1) + ',' + - RoundSigDigits(GasCooler(GasCoolerID).RatedFanPower, 1); + << " Refrigeration GasCooler:Air-Cooled," + General::RoundSigDigits(GasCoolerID) + ',' + GasCooler(GasCoolerID).Name + ',' + + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletP, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletT, 1) + + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedApproachT, 1) + ',' + + General::RoundSigDigits(GasCooler(GasCoolerID).RatedCapacity, 1) + ',' + + General::RoundSigDigits(GasCooler(GasCoolerID).RatedFanPower, 1); } // System(SystemNum)%NumGasCoolers >= 1 } // NumTransRefrigSystems } //(NumTransRefrigSystems > 0) if (NumSimulationSecondarySystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Secondary Refrigeration Systems," + RoundSigDigits(NumSimulationSecondarySystems); + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Secondary Refrigeration Systems," + General::RoundSigDigits(NumSimulationSecondarySystems); for (SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { { auto const SELECT_CASE_var(Secondary(SecondaryID).FluidType); if (SELECT_CASE_var == SecFluidTypeAlwaysLiquid) { ObjexxFCL::gio::write(OutputFileInits, Format_101) - << "Secondary Refrigeration System: Fluid Always Liquid," + RoundSigDigits(SecondaryID) + ',' + - Secondary(SecondaryID).Name + ',' + RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + - RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + ',' + Secondary(SecondaryID).FluidName + ',' + - RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + - RoundSigDigits(Secondary(SecondaryID).TEvapDesign, 2) + ',' + - RoundSigDigits(Secondary(SecondaryID).TApproachDifRated, 2) + ',' + - RoundSigDigits(Secondary(SecondaryID).TRangeDifRated, 3) + ',' + - RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); + << "Secondary Refrigeration System: Fluid Always Liquid," + General::RoundSigDigits(SecondaryID) + ',' + + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + ',' + Secondary(SecondaryID).FluidName + ',' + + General::RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).TEvapDesign, 2) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).TApproachDifRated, 2) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).TRangeDifRated, 3) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); } else if (SELECT_CASE_var == SecFluidTypePhaseChange) { ObjexxFCL::gio::write(OutputFileInits, Format_101) - << "Secondary Refrigeration System: Liquid Overfeed," + RoundSigDigits(SecondaryID) + ',' + Secondary(SecondaryID).Name + - ',' + RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + - ',' + Secondary(SecondaryID).FluidName + ',' + RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + - RoundSigDigits(Secondary(SecondaryID).TEvapDesign, 2) + ',' + - RoundSigDigits(Secondary(SecondaryID).TApproachDifRated, 2) + ',' + - RoundSigDigits(Secondary(SecondaryID).CircRate, 3) + ',' + - RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); + << "Secondary Refrigeration System: Liquid Overfeed," + General::RoundSigDigits(SecondaryID) + ',' + Secondary(SecondaryID).Name + + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + + ',' + Secondary(SecondaryID).FluidName + ',' + General::RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).TEvapDesign, 2) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).TApproachDifRated, 2) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).CircRate, 3) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); } } for (CaseNum = 1; CaseNum <= Secondary(SecondaryID).NumCases; ++CaseNum) { CaseID = Secondary(SecondaryID).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(OutputFileInits, Format_103) - << "Refrigeration Case," + RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + - RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + - ',' + RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).Length, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + - RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + - ',' + RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + << "Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCases on secondary on secondary system for (WalkInNum = 1; WalkInNum <= Secondary(SecondaryID).NumWalkIns; ++WalkInNum) { WalkInID = Secondary(SecondaryID).WalkInNum(WalkInNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << "Walk In," + RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1); + << "Walk In," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(OutputFileInits, Format_102) << "Walk In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // zones for walk ins on secondary } // walk ins on secondary for (CoilNum = 1; CoilNum <= Secondary(SecondaryID).NumCoils; ++CoilNum) { CoilID = Secondary(SecondaryID).CoilNum(CoilNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; + << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers } // secondary } // numsimulationsecondarys if (DataHeatBalance::NumRefrigChillerSets > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); + ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + General::RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); for (ChillerSetNum = 1; ChillerSetNum <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetNum) { ObjexxFCL::gio::write(OutputFileInits, Format_101) - << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + RoundSigDigits(ChillerSetNum) + ',' + - RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; + << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + General::RoundSigDigits(ChillerSetNum) + ',' + + General::RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; for (CoilNum = 1; CoilNum <= AirChillerSet(ChillerSetNum).NumCoils; ++CoilNum) { CoilID = AirChillerSet(ChillerSetNum).CoilNum(CoilNum); ObjexxFCL::gio::write(OutputFileInits, Format_103) - << " Refrigeration Air Chiller," + RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).Name + ',' + - WarehouseCoil(CoilID).ZoneName + ',' + RoundSigDigits(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + - NodeID(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + RoundSigDigits(WarehouseCoil(CoilID).UnitLoadFactorSens, 1) + ',' + - RoundSigDigits(WarehouseCoil(CoilID).RatedSensibleCap, 2) + ',' + - RoundSigDigits(WarehouseCoil(CoilID).TEvapDesign, 1) + ',' + - RoundSigDigits(WarehouseCoil(CoilID).RatedTemperatureDif, 1) + ',' + - RoundSigDigits(WarehouseCoil(CoilID).RatedFanPower, 1) + ',' + RoundSigDigits(WarehouseCoil(CoilID).HeaterPower, 1) + - ',' + RoundSigDigits(WarehouseCoil(CoilID).DefrostCapacity, 1) + ',' + - RoundSigDigits(WarehouseCoil(CoilID).RatedAirVolumeFlow, 1); + << " Refrigeration Air Chiller," + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).Name + ',' + + WarehouseCoil(CoilID).ZoneName + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + + NodeID(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).UnitLoadFactorSens, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).RatedSensibleCap, 2) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).TEvapDesign, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).RatedTemperatureDif, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).RatedFanPower, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).HeaterPower, 1) + + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).RatedAirVolumeFlow, 1); } // numairchillers } // DataHeatBalance::NumRefrigChillerSets } // DataHeatBalance::NumRefrigChillerSets @@ -13632,20 +13568,7 @@ namespace RefrigeratedCase { // Gosney, W.B., Olama, G.A.-L., Heat and Enthalpy Gains through Cold Room Doorways, // Proceedings of the Institute of Refrigeration, vol. 72, pp 31-41, 1975 - using CurveManager::CurveValue; using namespace DataLoopNode; - using Psychrometrics::PsyHFnTdbRhPb; - using Psychrometrics::PsyHFnTdbW; - using Psychrometrics::PsyRhFnTdbWPb; - using Psychrometrics::PsyRhoAirFnPbTdbW; - using Psychrometrics::PsyTdpFnWPb; - using Psychrometrics::PsyTsatFnHPb; - using Psychrometrics::PsyTwbFnTdbWPb; - using Psychrometrics::PsyWFnTdbH; - using Psychrometrics::PsyWFnTdbTwbPb; - using Psychrometrics::PsyWFnTdpPb; - using DataEnvironment::OutBaroPress; - using General::CreateSysTimeIntervalString; Real64 const DefaultWalkInDoorOpenFactor(0.05); // walk in door open factor (fraction time open) @@ -13746,9 +13669,9 @@ namespace RefrigeratedCase { DefrostCap = WalkIn(WalkInID).DefrostCapacity; // %DefrostCapacity already set to zero for WalkInDefrostNone , WalkInDefrostOffCycle DesignLighting = WalkIn(WalkInID).DesignLighting; - EnthalpyAirWalkIn = PsyHFnTdbRhPb(TWalkIn, 0.9, OutBaroPress); // assume 90%RH in cooler - HumRatioAirWalkIn = PsyWFnTdbH(TWalkIn, EnthalpyAirWalkIn); - DensityAirWalkIn = PsyRhoAirFnPbTdbW(OutBaroPress, TWalkIn, HumRatioAirWalkIn); + EnthalpyAirWalkIn = Psychrometrics::PsyHFnTdbRhPb(TWalkIn, 0.9, OutBaroPress); // assume 90%RH in cooler + HumRatioAirWalkIn = Psychrometrics::PsyWFnTdbH(TWalkIn, EnthalpyAirWalkIn); + DensityAirWalkIn = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, TWalkIn, HumRatioAirWalkIn); Conv = Latitude * 2.0 * Pi / 360.0; // Convert Latitude to radians Gravity = 9.780373 * (1.0 + 0.0052891 * pow_2(std::sin(Conv)) - 0.0000059 * pow_2(std::sin(2.0 * Conv))); @@ -13780,10 +13703,10 @@ namespace RefrigeratedCase { // Get infiltration loads if either type of door is present in this zone if (StockDoorArea > 0.0 || GlassDoorArea > 0.0) { - ZoneRHFrac = PsyRhFnTdbWPb(Node(ZoneNodeNum).Temp, Node(ZoneNodeNum).HumRat, OutBaroPress, RoutineName); - EnthalpyZoneAir = PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, OutBaroPress, RoutineName); - HumRatioZoneAir = PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); - DensityZoneAir = PsyRhoAirFnPbTdbW(OutBaroPress, ZoneDryBulb, HumRatioZoneAir, RoutineName); + ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(Node(ZoneNodeNum).Temp, Node(ZoneNodeNum).HumRat, OutBaroPress, RoutineName); + EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, OutBaroPress, RoutineName); + HumRatioZoneAir = Psychrometrics::PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); + DensityZoneAir = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, ZoneDryBulb, HumRatioZoneAir, RoutineName); if (DensityZoneAir < DensityAirWalkIn) { // usual case when walk in is colder than zone DensitySqRtFactor = std::sqrt(1.0 - DensityZoneAir / DensityAirWalkIn); DensityFactorFm = std::pow(2.0 / (1.0 + std::pow(DensityAirWalkIn / DensityZoneAir, 0.333)), 1.5); @@ -14044,7 +13967,7 @@ namespace RefrigeratedCase { if (ShowUnmetWIEnergyWarning(WalkInID)) { ShowWarningError("Refrigeration:WalkIn: " + WalkIn(WalkInID).Name); ShowContinueError(" This walk-in cooler has insufficient capacity to meet the loads"); - ShowContinueError("... Occurrence info = " + EnvironmentName + ", " + CurMnDy + ' ' + CreateSysTimeIntervalString()); + ShowContinueError("... Occurrence info = " + EnvironmentName + ", " + CurMnDy + ' ' + General::CreateSysTimeIntervalString()); ShowContinueError(" Refer to documentation for further explanation of Total Cooling Capacity."); ShowUnmetWIEnergyWarning(WalkInID) = false; } // ShowStoreEnergyWarning @@ -14055,7 +13978,7 @@ namespace RefrigeratedCase { ShowWarningError("Refrigeration:WalkIn: " + WalkIn(WalkInID).Name); ShowContinueError(" This walkin cooler has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(" Check the defrost schedule or defrost capacity. "); - ShowContinueError("... Occurrence info = " + EnvironmentName + ", " + CurMnDy + ' ' + CreateSysTimeIntervalString()); + ShowContinueError("... Occurrence info = " + EnvironmentName + ", " + CurMnDy + ' ' + General::CreateSysTimeIntervalString()); ShowWIFrostWarning(WalkInID) = false; } } @@ -14091,15 +14014,6 @@ namespace RefrigeratedCase { // SCE report // others - using CurveManager::CurveValue; - using Psychrometrics::PsyHFnTdbRhPb; - using Psychrometrics::PsyHFnTdbW; - using Psychrometrics::PsyRhoAirFnPbTdbW; - using Psychrometrics::PsyTsatFnHPb; - using Psychrometrics::PsyTwbFnTdbWPb; - using Psychrometrics::PsyWFnTdbTwbPb; - using Psychrometrics::PsyWFnTdpPb; - Real64 const ErrorTol(0.001); // Iterative solution tolerance bool AtPartLoad; // Whether or not need to iterate on pump power @@ -14125,7 +14039,7 @@ namespace RefrigeratedCase { Real64 Eta; // Secondary loop heat exchanger eta, dimensionless Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) static Real64 LoadRequested(0.0); // Load necessary to meet current and all stored energy needs (W) - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MaxLoad; // Secondary loop capacity can be limited by heat exchanger or pumps (W) Real64 MaxVolFlow; // Flow can be limited by either total pump capacity or heat exchanger design (m3/s) Real64 PartLdFrac; // Used to ratio pump power @@ -14150,7 +14064,7 @@ namespace RefrigeratedCase { Real64 UnmetEnergy; // Cumulative, grows and shrinks with defrost cycles on loads served by loop (J) LocalTimeStep = TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = TimeStepSys; + if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; NumPumps = Secondary(SecondaryNum).NumPumps; TEvap = Secondary(SecondaryNum).TEvapDesign; @@ -14302,7 +14216,7 @@ namespace RefrigeratedCase { } // fluid type >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> } // Dispatching pumps until fluid flow need is met } else { // pump type variable - VarFrac = max(0.1, CurveValue(Secondary(SecondaryNum).VarSpeedCurvePtr, PartLdFrac)); + VarFrac = max(0.1, CurveManager::CurveValue(Secondary(SecondaryNum).VarSpeedCurvePtr, PartLdFrac)); TotalPumpPower = Secondary(SecondaryNum).PumpTotRatedPower * VarFrac; VolFlowRate = MaxVolFlow * PartLdFrac; } // pump type @@ -14501,9 +14415,7 @@ namespace RefrigeratedCase { // Called from Zone Equipment Manager. using DataHeatBalFanSys::TempControlType; - using DataHVACGlobals::SingleHeatingSetPoint; using DataZoneEnergyDemands::ZoneSysEnergyDemand; - using General::TrimSigDigits; int ChillerSetID; Real64 RemainingOutputToCoolingSP; // Remaining requested load in zone @@ -14520,12 +14432,12 @@ namespace RefrigeratedCase { } else { // airchllersetpointer passed in call to subroutine not ==0 ChillerSetID = AirChillerSetPtr; if (ChillerSetID > DataHeatBalance::NumRefrigChillerSets || ChillerSetID < 1) { - ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + TrimSigDigits(ChillerSetID) + - ", Number of Units=" + TrimSigDigits(DataHeatBalance::NumRefrigChillerSets) + ", Entered Unit name=" + AirChillerSetName); + ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + General::TrimSigDigits(ChillerSetID) + + ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigChillerSets) + ", Entered Unit name=" + AirChillerSetName); } // ChillerSetID makes no sense if (CheckChillerSetName(ChillerSetID)) { if (AirChillerSetName != AirChillerSet(ChillerSetID).Name) { - ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + TrimSigDigits(ChillerSetID) + + ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + General::TrimSigDigits(ChillerSetID) + ", Unit name=" + AirChillerSetName + ", stored Unit Name for that index=" + AirChillerSet(ChillerSetID).Name); } // name not equal correct name CheckChillerSetName(ChillerSetID) = false; @@ -14542,7 +14454,7 @@ namespace RefrigeratedCase { RemainingOutputToCoolingSP = ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; // RemainingOutputToCoolingSP in Watts, < 0 for cooling demand - if (RemainingOutputToCoolingSP < 0.0 && TempControlType(ZoneNum) != SingleHeatingSetPoint) { + if (RemainingOutputToCoolingSP < 0.0 && TempControlType(ZoneNum) != DataHVACGlobals::SingleHeatingSetPoint) { AirChillerSet(AirChillerSetPtr).QZnReqSens = RemainingOutputToCoolingSP; } else { AirChillerSet(AirChillerSetPtr).QZnReqSens = 0.0; @@ -14628,9 +14540,7 @@ namespace RefrigeratedCase { // Note that the coil fan, heater, and defrost would be unaffected because they // would still be running at level calculated previously - using CurveManager::CurveValue; using namespace DataLoopNode; - using General::CreateSysTimeIntervalString; static int NumCoils(0); // Number of coils on this system or secondary loop static int CoilID(0); // Index to coil @@ -14656,7 +14566,7 @@ namespace RefrigeratedCase { System(SystemID).InsuffCapWarn); DeRateFactor = AvailableTotalLoad / InitialTotalLoad; - Real64 const time_step_sec(TimeStepSys * SecInHour); + Real64 const time_step_sec(DataHVACGlobals::TimeStepSys * SecInHour); for (CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { CoilID = System(SystemID).CoilNum(CoilIndex); auto &warehouse_coil(WarehouseCoil(CoilID)); @@ -14730,20 +14640,7 @@ namespace RefrigeratedCase { // Unit Load Factor, Total Capacity Map, or a set of European standards. // Correction factors for material and refrigerant are applied to all of these ratings. - using CurveManager::CurveValue; using namespace DataLoopNode; - using General::CreateSysTimeIntervalString; - using Psychrometrics::PsyCpAirFnWTdb; - using Psychrometrics::PsyHFnTdbRhPb; - using Psychrometrics::PsyHFnTdbW; - using Psychrometrics::PsyRhFnTdbWPb; - using Psychrometrics::PsyRhoAirFnPbTdbW; - using Psychrometrics::PsyTdpFnWPb; - using Psychrometrics::PsyTsatFnHPb; - using Psychrometrics::PsyTwbFnTdbWPb; - using Psychrometrics::PsyWFnTdbH; - using Psychrometrics::PsyWFnTdbTwbPb; - using Psychrometrics::PsyWFnTdpPb; static Real64 UnitLoadFactorSens(0.0); // Rated capacity divided by rated DT1 (T air in - Tevap) (W/delta C) @@ -14886,11 +14783,11 @@ namespace RefrigeratedCase { SensLoadRequestedGross = SensLoadRequested + HeaterLoad + FanPowerRated; ZoneMixedAirDryBulb = Node(ZoneNodeNum).Temp; ZoneMixedAirHumRatio = Node(ZoneNodeNum).HumRat; - ZoneMixedAirRHFrac = PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, OutBaroPress, TrackMessage); - ZoneMixedAirEnthalpy = PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, OutBaroPress, TrackMessage); - ZoneMixedAirDensity = PsyRhoAirFnPbTdbW(OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); - ZoneDryAirDensity = PsyRhoAirFnPbTdbW(OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); - ZoneMixedAirCp = PsyCpAirFnWTdb(ZoneMixedAirHumRatio, ZoneMixedAirDryBulb); + ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, OutBaroPress, TrackMessage); + ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, OutBaroPress, TrackMessage); + ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); + ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); + ZoneMixedAirCp = Psychrometrics::PsyCpAirFnWTdb(ZoneMixedAirHumRatio, ZoneMixedAirDryBulb); DryAirMassFlowRated = AirVolumeFlowRated * ZoneDryAirDensity; // calc t inlet to coil assuming at middle/mixed point in room bbb - // later need to do for hottest/coolest in room where Tin /= Tzonemixed @@ -14909,7 +14806,7 @@ namespace RefrigeratedCase { CoilInletCp = ZoneMixedAirCp; CoilInletHumRatio = ZoneMixedAirHumRatio; CoilInletDryAirDensity = ZoneDryAirDensity; - CoilInletDryAirCp = PsyCpAirFnWTdb(0.0, CoilInletTemp); + CoilInletDryAirCp = Psychrometrics::PsyCpAirFnWTdb(0.0, CoilInletTemp); break; } AirVolumeFlowMax = AirVolumeFlowRated * (1.0 - DefrostDripDownSchedule) * CoilSchedule; @@ -14928,7 +14825,7 @@ namespace RefrigeratedCase { // In the table, X1== inlet air dry bulb temperature // X2== Difference between inlet T and evap T // X3== RH expressed as decimal - CoilCapTotEstimate = CurveValue(SHRCorrectionCurvePtr, CoilInletTemp, TemperatureDif, CoilInletRHFrac) * + CoilCapTotEstimate = CurveManager::CurveValue(SHRCorrectionCurvePtr, CoilInletTemp, TemperatureDif, CoilInletRHFrac) * warehouse_coil.RatedCapTotal * (1.0 - DefrostDripDownSchedule) * CoilSchedule; } else { // work with unit load factor (sensible only), function of DT1 (Tair in drybulb-Tevap) @@ -14940,12 +14837,12 @@ namespace RefrigeratedCase { ShowWarningError(TrackMessage + "Refrigeration:AirCoil: " + warehouse_coil.Name); ShowContinueError(" The estimated air outlet temperature is less than the evaporating temperature."); } - ExitEnthalpyEstimate = PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, OutBaroPress, TrackMessage); + ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, OutBaroPress, TrackMessage); if (ExitEnthalpyEstimate <= CoilInletEnthalpy) { CoilCapTotEstimate = (CoilInletEnthalpy - ExitEnthalpyEstimate) * AirVolumeFlowMax * CoilInletDensity; } else { // Assume no water is extracted from flow - ExitEnthalpyEstimate = PsyHFnTdbW(ExitTemperatureEstimate, CoilInletHumRatio); + ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbW(ExitTemperatureEstimate, CoilInletHumRatio); CoilCapTotEstimate = (CoilInletEnthalpy - ExitEnthalpyEstimate) * AirVolumeFlowMax * CoilInletDensity; } if (SensibleCapacityMax > CoilCapTotEstimate) SensibleCapacityMax = CoilCapTotEstimate; @@ -14964,7 +14861,7 @@ namespace RefrigeratedCase { Yint = SHRCorrection60 - (Slope * 0.6); SHRCorrection = Slope * SHR + Yint; } else if (SELECT_CASE_var == QuadraticSHR) { - SHRCorrection = CurveValue(SHRCorrectionCurvePtr, SHR); + SHRCorrection = CurveManager::CurveValue(SHRCorrectionCurvePtr, SHR); } else if (SELECT_CASE_var == European) { // With European ratings, either start with rated total sensible capacity or rated total capacity // If rated total capacity is used, 'get input' @@ -15002,8 +14899,8 @@ namespace RefrigeratedCase { if (CoilCapTotEstimate > 0.0) { ExitEnthalpy = CoilInletEnthalpy - (CoilCapTotEstimate / (AirVolumeFlowMax * CoilInletDensity)); - ExitTemperature = PsyTsatFnHPb(ExitEnthalpy, OutBaroPress, TrackMessage); // RH =1.0 at Tsat - ExitHumRatio = PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); + ExitTemperature = Psychrometrics::PsyTsatFnHPb(ExitEnthalpy, OutBaroPress, TrackMessage); // RH =1.0 at Tsat + ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); if (ExitHumRatio > CoilInletHumRatio) ExitHumRatio = CoilInletHumRatio; WaterRemovRate = DryAirMassFlowMax * (CoilInletHumRatio - ExitHumRatio); LatLoadServed = WaterRemovRate * IcetoVaporEnthalpy; @@ -15071,7 +14968,7 @@ namespace RefrigeratedCase { // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem if (!WarmupFlag) { - FrostChangekg = (WaterRemovRate * TimeStepSys * SecInHour); + FrostChangekg = (WaterRemovRate * DataHVACGlobals::TimeStepSys * SecInHour); warehouse_coil.KgFrost += FrostChangekg; } @@ -15091,7 +14988,7 @@ namespace RefrigeratedCase { // a certain temperature (such as when there's no load and no ice) if ((DefrostSchedule > 0.0) && (warehouse_coil.DefrostType != DefrostNone) && (warehouse_coil.DefrostType != DefrostOffCycle)) { DefrostLoad = DefrostCap * DefrostSchedule; // W - DefrostEnergy = DefrostLoad * TimeStepSys * SecInHour; // Joules + DefrostEnergy = DefrostLoad * DataHVACGlobals::TimeStepSys * SecInHour; // Joules StartFrostKg = warehouse_coil.KgFrost; if (warehouse_coil.DefrostControlType == DefrostContTempTerm) { @@ -15119,7 +15016,7 @@ namespace RefrigeratedCase { // Reduce defrost heat load on walkin by amount of ice melted during time step FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); if (FrostChangekg < StartFrostKg) { - DefrostLoad -= FrostChangekg * IceMeltEnthalpy / TimeStepSys / SecInHour; + DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / SecInHour; if (!WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed because ice not all melted, temp term not triggered } else { // all frost melted during time step, so need to terminate defrost @@ -15127,9 +15024,9 @@ namespace RefrigeratedCase { warehouse_coil.KgFrost = 0.0; DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DefEnergyFraction; // Joules - energy needed including E unavail to melt ice - DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * TimeStepSys * SecInHour))); + DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * SecInHour))); // reduce heat load on warehouse by energy put into ice melting - DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (TimeStepSys * SecInHour); + DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * SecInHour); DefrostLoad = max(0.0, (DefrostSchedule * DefrostCap - DefrostRateNeeded)); warehouse_coil.IceTemp = warehouse_coil.TEvapDesign; } // frost melted during time step less than amount of ice at start @@ -15146,7 +15043,7 @@ namespace RefrigeratedCase { // Reduce defrost heat load on the zone by amount of ice melted during time step // But DefrostSchedule not changed FrostChangekg = max(0.0, min((DefrostEnergy / IceMeltEnthalpy), StartFrostKg)); - DefrostLoad -= FrostChangekg * IceMeltEnthalpy / TimeStepSys / SecInHour; + DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / SecInHour; if (!WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; } // Temperature termination vs. time-clock control type @@ -15160,7 +15057,7 @@ namespace RefrigeratedCase { // ReportWarehouseCoil(CoilID) warehouse_coil.ThermalDefrostPower = DefrostLoad; if (warehouse_coil.DefrostType == DefrostElec) { - warehouse_coil.ElecDefrostConsumption = DefrostCap * DefrostSchedule * TimeStepSys * SecInHour; + warehouse_coil.ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.ElecDefrostPower = DefrostCap * DefrostSchedule; } else { warehouse_coil.ElecDefrostConsumption = 0.0; @@ -15172,22 +15069,22 @@ namespace RefrigeratedCase { // LatentLoadServed is positive for latent heat removed from zone // SensLoadFromZone positive for heat REMOVED from zone, switch when do credit to zone warehouse_coil.SensCreditRate = SensLoadFromZone; - warehouse_coil.SensCreditEnergy = SensLoadFromZone * TimeStepSys * SecInHour; + warehouse_coil.SensCreditEnergy = SensLoadFromZone * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.LatCreditRate = LatLoadServed; - warehouse_coil.LatCreditEnergy = LatLoadServed * TimeStepSys * SecInHour; + warehouse_coil.LatCreditEnergy = LatLoadServed * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.LatKgPerS_ToZone = WaterRemovRate; warehouse_coil.TotalCoolingLoad = CoilCapTotal; - warehouse_coil.TotalCoolingEnergy = CoilCapTotal * TimeStepSys * SecInHour; + warehouse_coil.TotalCoolingEnergy = CoilCapTotal * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.SensCoolingEnergyRate = SensLoadGross; - warehouse_coil.SensCoolingEnergy = SensLoadGross * TimeStepSys * SecInHour; + warehouse_coil.SensCoolingEnergy = SensLoadGross * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.SensHeatRatio = SHR; warehouse_coil.ElecFanPower = FanPowerActual; - warehouse_coil.ElecFanConsumption = FanPowerActual * TimeStepSys * SecInHour; + warehouse_coil.ElecFanConsumption = FanPowerActual * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.ElecHeaterPower = HeaterLoad; - warehouse_coil.ElecHeaterConsumption = HeaterLoad * TimeStepSys * SecInHour; + warehouse_coil.ElecHeaterConsumption = HeaterLoad * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.TotalElecPower = FanPowerActual + HeaterLoad + warehouse_coil.ElecDefrostPower; - warehouse_coil.TotalElecConsumption = warehouse_coil.TotalElecPower * TimeStepSys * SecInHour; + warehouse_coil.TotalElecConsumption = warehouse_coil.TotalElecPower * DataHVACGlobals::TimeStepSys * SecInHour; if (warehouse_coil.SensCreditRate >= 0.0) { warehouse_coil.ReportSensCoolCreditRate = warehouse_coil.SensCreditRate; @@ -15196,8 +15093,8 @@ namespace RefrigeratedCase { warehouse_coil.ReportSensCoolCreditRate = 0.0; warehouse_coil.ReportHeatingCreditRate = -warehouse_coil.SensCreditRate; } - warehouse_coil.ReportSensCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditRate * TimeStepSys * SecInHour; - warehouse_coil.ReportHeatingCreditEnergy = warehouse_coil.ReportHeatingCreditRate * TimeStepSys * SecInHour; + warehouse_coil.ReportSensCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditRate * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.ReportHeatingCreditEnergy = warehouse_coil.ReportHeatingCreditRate * DataHVACGlobals::TimeStepSys * SecInHour; warehouse_coil.ReportTotalCoolCreditRate = warehouse_coil.ReportSensCoolCreditRate + warehouse_coil.LatCreditRate; warehouse_coil.ReportTotalCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditEnergy + warehouse_coil.LatCreditEnergy; @@ -15306,7 +15203,6 @@ namespace RefrigeratedCase { // no HVAC load calls module during that zone time step. using DataWater::WaterStorage; - using PlantUtilities::SetComponentFlowRate; static int DemandARRID(0); // Index to water tank Demand used for evap condenser static int TankID(0); // Index to water tank used for evap condenser @@ -15332,7 +15228,7 @@ namespace RefrigeratedCase { PlantBranchIndex = RefrigRack(RackNum).PlantBranchNum; PlantCompIndex = RefrigRack(RackNum).PlantCompNum; MassFlowRate = 0.0; - SetComponentFlowRate( + PlantUtilities::SetComponentFlowRate( MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); } if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { @@ -15356,7 +15252,7 @@ namespace RefrigeratedCase { PlantBranchIndex = Condenser(CondID).PlantBranchNum; PlantCompIndex = Condenser(CondID).PlantCompNum; MassFlowRate = 0.0; - SetComponentFlowRate( + PlantUtilities::SetComponentFlowRate( MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); } if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { From 8502047b7a08d4c235ea6a26e988411b6d66ae66 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 12:16:46 -0700 Subject: [PATCH 41/86] step 2 - cleanup usings --- src/EnergyPlus/RefrigeratedCase.cc | 1195 ++++++++++++++-------------- 1 file changed, 576 insertions(+), 619 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 0093c060567..4eace08e6d0 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -65,7 +65,6 @@ #include #include #include -#include #include #include #include @@ -93,7 +92,7 @@ namespace RefrigeratedCase { // AUTHOR Richard Raustad, FSEC // DATE WRITTEN Oct/Nov 2004 // MODIFIED Shirey, FSEC Dec 2004; Hudson, ORNL Feb 2007, July 2007 - // MODIFIED Stovall, ORNL, April 2008 added detailed refrigerations systems + // MODIFIED Stovall, ORNL, April 2008 added detailed refrigeration systems // MODIFIED Stovall, ORNL, Fall 2009 added cascade condensers, secondary loops, and walk-ins. // MODIFIED Griffith, NREL, 2010, Plant upgrade, generalize plant fluid properties. // MODIFIED Fricke, ORNL, Fall 2011, added detailed transcritical CO2 refrigeration system. @@ -195,14 +194,9 @@ namespace RefrigeratedCase { // REFERENCES: // Specific references are provided for the equipment simulation subroutines below. - using namespace DataGlobals; // includes LOGICAL :: BeginTimeStepFlag =.FALSE. // True at the start of each time step, False after first subtime step of time step - // includes CurrentTime, in fractional hours, from start of day. Uses Loads time step. - // includes NumOfZones - using namespace ScheduleManager; - using namespace DataLoopNode; - using namespace DataEnvironment; - using namespace FluidProperties; + // includes DataGlobals::CurrentTime, in fractional hours, from start of day. Uses Loads time step. + // includes DataGlobals::NumOfZones static std::string const BlankString; @@ -501,11 +495,11 @@ namespace RefrigeratedCase { if ((!HaveChillers) && (UseSysTimeStep)) return; // Refrigerated cases are not simulated the first time through, replicate this on beginning of next environment - if (BeginEnvrnFlag && MyOneTimeFlag) { + if (DataGlobals::BeginEnvrnFlag && MyOneTimeFlag) { MyOneTimeFlag = false; return; } - if (!BeginEnvrnFlag) MyOneTimeFlag = true; + if (!DataGlobals::BeginEnvrnFlag) MyOneTimeFlag = true; if (HaveRefrigRacks) { for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { @@ -538,15 +532,6 @@ namespace RefrigeratedCase { // METHODOLOGY EMPLOYED: // GetObjectItem is called to read refrigerated case information - using BranchNodeConnections::TestCompSet; - using DataGlobals::AnyEnergyManagementSystemInModel; - using DataZoneEquipment::GetReturnAirNodeForZone; - using DataZoneEquipment::GetSystemNodeNumberForZone; - using FluidProperties::GetSupHeatEnthalpyRefrig; - using NodeInputManager::GetOnlySingleNode; - using OutAirNodeManager::CheckOutAirNodeNumber; - using WaterManager::SetupTankDemandComponent; - static std::string const TrackMessage("from refrigerated case"); static std::string const RoutineName("GetRefrigerationInput: "); static std::string const TrackMessageAlt("GetInput in RefrigeratedCase"); @@ -812,7 +797,7 @@ namespace RefrigeratedCase { GasCooler.allocate(NumSimulationGasCooler); } if (NumSimulationCases > 0) { - CaseRAFraction.allocate(NumOfZones); + CaseRAFraction.allocate(DataGlobals::NumOfZones); RefrigCase.allocate(NumSimulationCases); ShowStockingWarning.dimension(NumSimulationCases, true); ShowFrostWarning.dimension(NumSimulationCases, true); @@ -824,7 +809,7 @@ namespace RefrigeratedCase { ShowWIFrostWarning.dimension(NumSimulationWalkIns, true); } if ((NumSimulationWalkIns > 0) || (NumSimulationCases > 0)) { - CaseWIZoneReport.allocate(NumOfZones); + CaseWIZoneReport.allocate(DataGlobals::NumOfZones); } else { UseSysTimeStep = true; // needed to avoid accessing unallocated caseWIZoneReport on early call to SumZones @@ -836,7 +821,7 @@ namespace RefrigeratedCase { if (NumSimulationRefrigAirChillers > 0) { WarehouseCoil.allocate(NumSimulationRefrigAirChillers); ShowCoilFrostWarning.allocate(NumSimulationRefrigAirChillers); - CoilSysCredit.allocate(NumOfZones); + CoilSysCredit.allocate(DataGlobals::NumOfZones); ShowCoilFrostWarning = true; } if (NumSimulationCompressors > 0) Compressor.allocate(NumSimulationCompressors); @@ -845,8 +830,8 @@ namespace RefrigeratedCase { if (NumCompressorLists > 0) CompressorLists.allocate(NumCompressorLists); if (NumSimulationTransferLoadLists > 0) TransferLoadList.allocate(NumSimulationTransferLoadLists); - DayValues.allocate(NumOfTimeStepInHour, 24); - RefrigPresentInZone.dimension(NumOfZones, false); + DayValues.allocate(DataGlobals::NumOfTimeStepInHour, 24); + RefrigPresentInZone.dimension(DataGlobals::NumOfZones, false); inputProcessor->getObjectDefMaxArgs("Refrigeration:Case", MaxNumArgs, MaxNumAlphasCase, MaxNumNumbersCase); inputProcessor->getObjectDefMaxArgs( @@ -926,7 +911,7 @@ namespace RefrigeratedCase { AlphaNum = 2; if (!lAlphaBlanks(AlphaNum)) { - RefrigCase(CaseNum).SchedPtr = GetScheduleIndex(Alphas(AlphaNum)); // convert schedule name to pointer + RefrigCase(CaseNum).SchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert schedule name to pointer if (RefrigCase(CaseNum).SchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -938,7 +923,7 @@ namespace RefrigeratedCase { // check availability schedule for values between 0 and 1 if (RefrigCase(CaseNum).SchedPtr > 0) { - if (!CheckScheduleValueMinMax(RefrigCase(CaseNum).SchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(RefrigCase(CaseNum).SchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -958,7 +943,7 @@ namespace RefrigeratedCase { RefrigPresentInZone(RefrigCase(CaseNum).ActualZoneNum) = true; } - RefrigCase(CaseNum).ZoneNodeNum = GetSystemNodeNumberForZone(RefrigCase(CaseNum).ZoneName); + RefrigCase(CaseNum).ZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(RefrigCase(CaseNum).ZoneName); RefrigCase(CaseNum).RatedAmbientTemp = Numbers(1); if (Numbers(1) <= 0.0) { @@ -974,7 +959,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } RefrigCase(CaseNum).RatedAmbientDewPoint = Psychrometrics::PsyTdpFnWPb( - Psychrometrics::PsyWFnTdbRhPb(RefrigCase(CaseNum).RatedAmbientTemp, (RefrigCase(CaseNum).RatedAmbientRH / 100.0), StdBaroPress), StdBaroPress); + Psychrometrics::PsyWFnTdbRhPb(RefrigCase(CaseNum).RatedAmbientTemp, (RefrigCase(CaseNum).RatedAmbientRH / 100.0), DataEnvironment::StdBaroPress), DataEnvironment::StdBaroPress); RefrigCase(CaseNum).RateTotCapPerLength = Numbers(3); if (Numbers(3) <= 0.0) { @@ -1087,7 +1072,7 @@ namespace RefrigeratedCase { } // blank input if (!lAlphaBlanks(6)) { - RefrigCase(CaseNum).LightingSchedPtr = GetScheduleIndex(Alphas(6)); // convert schedule name to pointer + RefrigCase(CaseNum).LightingSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(6)); // convert schedule name to pointer if (RefrigCase(CaseNum).LightingSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(6) + " not found: " + Alphas(6)); @@ -1099,7 +1084,7 @@ namespace RefrigeratedCase { // check lighting schedule for values between 0 and 1 if (RefrigCase(CaseNum).LightingSchedPtr > 0) { - if (!CheckScheduleValueMinMax(RefrigCase(CaseNum).LightingSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(RefrigCase(CaseNum).LightingSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(6) + " = " + Alphas(6)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1266,7 +1251,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } - RefrigCase(CaseNum).DefrostSchedPtr = GetScheduleIndex(Alphas(9)); // convert schedule name to pointer + RefrigCase(CaseNum).DefrostSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(9)); // convert schedule name to pointer if (RefrigCase(CaseNum).DefrostSchedPtr == 0 && RefrigCase(CaseNum).DefrostType != DefNone) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(9) + " not found: " + Alphas(9)); @@ -1276,7 +1261,7 @@ namespace RefrigeratedCase { // check defrost schedule for values between 0 and 1 if (RefrigCase(CaseNum).DefrostSchedPtr > 0) { - if (!CheckScheduleValueMinMax(RefrigCase(CaseNum).DefrostSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(RefrigCase(CaseNum).DefrostSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\"."); ShowContinueError("Error found in " + cAlphaFieldNames(9) + " = " + Alphas(9)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1288,9 +1273,9 @@ namespace RefrigeratedCase { StartCycle = false; NumDefCycles = 0; DayValues = 0.0; - GetScheduleValuesForDay(RefrigCase(CaseNum).DefrostSchedPtr, DayValues, 1); + ScheduleManager::GetScheduleValuesForDay(RefrigCase(CaseNum).DefrostSchedPtr, DayValues, 1); for (HRNum = 1; HRNum <= 24; ++HRNum) { - for (TSNum = 1; TSNum <= NumOfTimeStepInHour; ++TSNum) { + for (TSNum = 1; TSNum <= DataGlobals::NumOfTimeStepInHour; ++TSNum) { if (DayValues(TSNum, HRNum) > 0.0) { if (!StartCycle) { ++NumDefCycles; @@ -1313,7 +1298,7 @@ namespace RefrigeratedCase { // some defrost types do not use drip-down schedules, use same defrost schedule pointer in that case if (!lAlphaBlanks(10)) { - RefrigCase(CaseNum).DefrostDripDownSchedPtr = GetScheduleIndex(Alphas(10)); // convert schedule name to pointer + RefrigCase(CaseNum).DefrostDripDownSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(10)); // convert schedule name to pointer if (RefrigCase(CaseNum).DefrostDripDownSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + cAlphaFieldNames(10) + " not found: " + Alphas(10)); @@ -1325,7 +1310,7 @@ namespace RefrigeratedCase { // check defrost drip-down schedule for values between 0 and 1 if (RefrigCase(CaseNum).DefrostDripDownSchedPtr > 0 && (!lAlphaBlanks(10))) { - if (!CheckScheduleValueMinMax(RefrigCase(CaseNum).DefrostDripDownSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(RefrigCase(CaseNum).DefrostDripDownSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\"."); ShowContinueError("Error found in " + cAlphaFieldNames(10) + " = " + Alphas(10)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1390,7 +1375,7 @@ namespace RefrigeratedCase { } if (RefrigCase(CaseNum).RAFrac > 0.0) { std::string callDescription = CurrentModuleObject + "=" + RefrigCase(CaseNum).Name; - RefrigCase(CaseNum).ZoneRANode = GetReturnAirNodeForZone(RefrigCase(CaseNum).ZoneName, retNodeName, callDescription); + RefrigCase(CaseNum).ZoneRANode = DataZoneEquipment::GetReturnAirNodeForZone(RefrigCase(CaseNum).ZoneName, retNodeName, callDescription); } if (RefrigCase(CaseNum).ActualZoneNum >= 0) { @@ -1427,7 +1412,7 @@ namespace RefrigeratedCase { CaseRAFraction(RefrigCase(CaseNum).ActualZoneNum).ZoneName = RefrigCase(CaseNum).ZoneName; } - RefrigCase(CaseNum).StockingSchedPtr = GetScheduleIndex(Alphas(13)); // convert schedule name to pointer + RefrigCase(CaseNum).StockingSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(13)); // convert schedule name to pointer if (!lAlphaBlanks(13)) { if (RefrigCase(CaseNum).StockingSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + @@ -1457,7 +1442,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } - RefrigCase(CaseNum).CaseCreditFracSchedPtr = GetScheduleIndex(Alphas(14)); // convert schedule name to pointer + RefrigCase(CaseNum).CaseCreditFracSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(14)); // convert schedule name to pointer if (!lAlphaBlanks(14)) { if (RefrigCase(CaseNum).CaseCreditFracSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\", invalid " + @@ -1470,7 +1455,7 @@ namespace RefrigeratedCase { // check case credit fraction schedule for values between 0 and 1 if (RefrigCase(CaseNum).CaseCreditFracSchedPtr > 0) { - if (!CheckScheduleValueMinMax(RefrigCase(CaseNum).CaseCreditFracSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(RefrigCase(CaseNum).CaseCreditFracSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigCase(CaseNum).Name + "\"."); ShowContinueError("Error found in " + cAlphaFieldNames(14) + " = " + Alphas(14)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1537,7 +1522,7 @@ namespace RefrigeratedCase { WalkIn(WalkInID).Name = Alphas(1); if (!lAlphaBlanks(2)) { - WalkIn(WalkInID).SchedPtr = GetScheduleIndex(Alphas(2)); // convert schedule name to pointer + WalkIn(WalkInID).SchedPtr = ScheduleManager::GetScheduleIndex(Alphas(2)); // convert schedule name to pointer if (WalkIn(WalkInID).SchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(2) + " not found: " + Alphas(2)); @@ -1549,7 +1534,7 @@ namespace RefrigeratedCase { // check availability schedule for values between 0 and 1 if (WalkIn(WalkInID).SchedPtr > 0) { - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).SchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).SchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(2) + " = " + Alphas(2)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1590,7 +1575,7 @@ namespace RefrigeratedCase { AlphaNum = 3; if (!lAlphaBlanks(AlphaNum)) { - WalkIn(WalkInID).HeaterSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); // convert heater schedule name to pointer + WalkIn(WalkInID).HeaterSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert heater schedule name to pointer if (WalkIn(WalkInID).HeaterSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -1602,7 +1587,7 @@ namespace RefrigeratedCase { // check heater schedule for values between 0 and 1 if (WalkIn(WalkInID).HeaterSchedPtr > 0) { - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).HeaterSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).HeaterSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1639,7 +1624,7 @@ namespace RefrigeratedCase { AlphaNum = 4; if (!lAlphaBlanks(AlphaNum)) { - WalkIn(WalkInID).LightingSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); // convert lighting schedule name to pointer + WalkIn(WalkInID).LightingSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert lighting schedule name to pointer if (WalkIn(WalkInID).LightingSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -1650,7 +1635,7 @@ namespace RefrigeratedCase { } // schedule name not blank // check Lighting schedule for values between 0 and 1 if (WalkIn(WalkInID).LightingSchedPtr > 0) { - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).LightingSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).LightingSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1691,7 +1676,7 @@ namespace RefrigeratedCase { // convert defrost schedule name to pointer AlphaNum = 7; - WalkIn(WalkInID).DefrostSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); + WalkIn(WalkInID).DefrostSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); if (WalkIn(WalkInID).DefrostSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -1699,7 +1684,7 @@ namespace RefrigeratedCase { } // check defrost schedule for values between 0 and 1 if (WalkIn(WalkInID).DefrostSchedPtr > 0) { - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).DefrostSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).DefrostSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + " = \"" + WalkIn(WalkInID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + '=' + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1711,7 +1696,7 @@ namespace RefrigeratedCase { // some defrost types do not use drip-down schedules, use same defrost schedule pointer in that case AlphaNum = 8; if (!lAlphaBlanks(AlphaNum)) { - WalkIn(WalkInID).DefrostDripDownSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); + WalkIn(WalkInID).DefrostDripDownSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); if (WalkIn(WalkInID).DefrostDripDownSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -1719,7 +1704,7 @@ namespace RefrigeratedCase { } // check schedule for values between 0 and 1 if (WalkIn(WalkInID).DefrostDripDownSchedPtr > 0) { - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).DefrostDripDownSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).DefrostDripDownSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -1761,7 +1746,7 @@ namespace RefrigeratedCase { if (lAlphaBlanks(AlphaNum)) { WalkIn(WalkInID).StockingSchedPtr = 0; } else { - WalkIn(WalkInID).StockingSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); + WalkIn(WalkInID).StockingSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); if (WalkIn(WalkInID).StockingSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -1832,7 +1817,7 @@ namespace RefrigeratedCase { NStart = NumWINumberFieldsBeforeZoneInput + 1; for (ZoneID = 1; ZoneID <= NumZones; ++ZoneID) { // Get the Zone node number from the zone name - // The Zone Node is needed to get the zone's ambient conditions, NumOfZones from dataglobals + // The Zone Node is needed to get the zone's ambient conditions, DataGlobals::NumOfZones from dataglobals WalkIn(WalkInID).ZoneName(ZoneID) = Alphas(AStart); WalkIn(WalkInID).ZoneNum(ZoneID) = UtilityRoutines::FindItemInList(Alphas(AStart), DataHeatBalance::Zone); @@ -1843,7 +1828,7 @@ namespace RefrigeratedCase { } else { RefrigPresentInZone(WalkIn(WalkInID).ZoneNum(ZoneID)) = true; } - WalkIn(WalkInID).ZoneNodeNum(ZoneID) = GetSystemNodeNumberForZone(WalkIn(WalkInID).ZoneName(ZoneID)); + WalkIn(WalkInID).ZoneNodeNum(ZoneID) = DataZoneEquipment::GetSystemNodeNumberForZone(WalkIn(WalkInID).ZoneName(ZoneID)); if (WalkIn(WalkInID).ZoneNum(ZoneID) >= 0) { if (WalkIn(WalkInID).ZoneNodeNum(ZoneID) == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + @@ -1889,7 +1874,7 @@ namespace RefrigeratedCase { if (lAlphaBlanks(AStart + 1)) { WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) = 0; } else { - WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) = GetScheduleIndex(Alphas(AStart + 1)); + WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) = ScheduleManager::GetScheduleIndex(Alphas(AStart + 1)); if (WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", Zone=\"" + WalkIn(WalkInID).ZoneName(ZoneID) + "\", invalid " + cAlphaFieldNames(AStart + 1) + @@ -1897,7 +1882,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } else { // check schedule for values between 0 and 1 - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", Zone=\"" + WalkIn(WalkInID).ZoneName(ZoneID) + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AStart + 1) + " = " + Alphas(AStart + 1)); @@ -1925,7 +1910,7 @@ namespace RefrigeratedCase { if (lAlphaBlanks(AStart + 2)) { WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) = 0; } else { - WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) = GetScheduleIndex(Alphas(AStart + 2)); + WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) = ScheduleManager::GetScheduleIndex(Alphas(AStart + 2)); if (WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", Zone=\"" + WalkIn(WalkInID).ZoneName(ZoneID) + "\", invalid " + cAlphaFieldNames(AStart + 2) + @@ -1933,7 +1918,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } else { // check schedule for values between 0 and 1 - if (!CheckScheduleValueMinMax(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", Zone=\"" + WalkIn(WalkInID).ZoneName(ZoneID) + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AStart + 2) + " = " + Alphas(AStart + 2)); @@ -1990,7 +1975,7 @@ namespace RefrigeratedCase { // A2 ++AlphaNum; if (!lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).SchedPtr = GetScheduleIndex(Alphas(AlphaNum)); // convert schedule name to pointer + WarehouseCoil(CoilID).SchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert schedule name to pointer if (WarehouseCoil(CoilID).SchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -2002,7 +1987,7 @@ namespace RefrigeratedCase { // check availability schedule for values between 0 and 1 if (WarehouseCoil(CoilID).SchedPtr > 0) { - if (!CheckScheduleValueMinMax(WarehouseCoil(CoilID).SchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WarehouseCoil(CoilID).SchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -2369,13 +2354,13 @@ namespace RefrigeratedCase { ++AlphaNum; // A6 if (!lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).HeaterSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); // convert heater schedule name to pointer + WarehouseCoil(CoilID).HeaterSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert heater schedule name to pointer if (WarehouseCoil(CoilID).HeaterSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); ErrorsFound = true; } else { // check heater schedule for values between 0 and 1 - if (!CheckScheduleValueMinMax(WarehouseCoil(CoilID).HeaterSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WarehouseCoil(CoilID).HeaterSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -2458,13 +2443,13 @@ namespace RefrigeratedCase { // convert defrost schedule name to pointer ++AlphaNum; // A10 - WarehouseCoil(CoilID).DefrostSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); + WarehouseCoil(CoilID).DefrostSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); if (WarehouseCoil(CoilID).DefrostSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); ErrorsFound = true; } else { // check defrost schedule for values between 0 and 1 - if (!CheckScheduleValueMinMax(WarehouseCoil(CoilID).DefrostSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WarehouseCoil(CoilID).DefrostSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + " = \"" + WarehouseCoil(CoilID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + '=' + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -2476,13 +2461,13 @@ namespace RefrigeratedCase { // some defrost types do not use drip-down schedules, use same defrost schedule pointer in that case ++AlphaNum; // A11 if (!lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).DefrostDripDownSchedPtr = GetScheduleIndex(Alphas(AlphaNum)); + WarehouseCoil(CoilID).DefrostDripDownSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); if (WarehouseCoil(CoilID).DefrostDripDownSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); ErrorsFound = true; } else { // check schedule for values between 0 and 1 - if (!CheckScheduleValueMinMax(WarehouseCoil(CoilID).DefrostDripDownSchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(WarehouseCoil(CoilID).DefrostDripDownSchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -2570,7 +2555,7 @@ namespace RefrigeratedCase { AlphaNum = 2; if (!lAlphaBlanks(AlphaNum)) { - AirChillerSet(SetID).SchedPtr = GetScheduleIndex(Alphas(AlphaNum)); // convert schedule name to pointer + AirChillerSet(SetID).SchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert schedule name to pointer if (AirChillerSet(SetID).SchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + AirChillerSet(SetID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -2582,7 +2567,7 @@ namespace RefrigeratedCase { // check availability schedule for values between 0 and 1 if (AirChillerSet(SetID).SchedPtr > 0) { - if (!CheckScheduleValueMinMax(AirChillerSet(SetID).SchedPtr, ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(AirChillerSet(SetID).SchedPtr, ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + AirChillerSet(SetID).Name + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); ShowContinueError("schedule values must be (>=0., <=1.)"); @@ -2599,7 +2584,7 @@ namespace RefrigeratedCase { cAlphaFieldNames(AlphaNum) + " not valid: " + Alphas(AlphaNum)); ErrorsFound = true; } - AirChillerSet(SetID).ZoneNodeNum = GetSystemNodeNumberForZone(AirChillerSet(SetID).ZoneName); + AirChillerSet(SetID).ZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(AirChillerSet(SetID).ZoneName); if (AirChillerSet(SetID).ZoneNodeNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + AirChillerSet(SetID).Name + "\" System Node Number not found for " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum)); @@ -2615,8 +2600,8 @@ namespace RefrigeratedCase { " is not used. This is not an error. Energy is exchanged directly with the zone independent of any air system. "); // Node identification reserved for future use. Currently exchange energy directly with zone outside any air system // AirChillerSet(SetID)%NodeNumInlet = & - // GetOnlySingleNode(Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & - // AirChillerSet(SetID)%Name,NodeType_Air,NodeConnectionType_Inlet,1,ObjectIsNotParent) + // NodeInputManager::GetOnlySingleNode(Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & + // AirChillerSet(SetID)%Name,DataLoopNode::NodeType_Air,DataLoopNode::NodeConnectionType_Inlet,1,DataLoopNode::ObjectIsNotParent) } ++AlphaNum; @@ -2625,8 +2610,8 @@ namespace RefrigeratedCase { " is not used. This is not an error. Energy is exchanged directly with the zone independent of any air system. "); // Node identification reserved for future use. Currently exchange energy directly with zone outside any air system // AirChillerSet(SetID)%NodeNumOutlet = & - // GetOnlySingleNode(Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & - // AirChillerSet(SetID)%Name,NodeType_Air,NodeConnectionType_Outlet,1,ObjectIsNotParent) + // NodeInputManager::GetOnlySingleNode(Alphas(AlphaNum),ErrorsFound,TRIM(CurrentModuleObject), & + // AirChillerSet(SetID)%Name,DataLoopNode::NodeType_Air,DataLoopNode::NodeConnectionType_Outlet,1,DataLoopNode::ObjectIsNotParent) } // An extensible list is used to enter the individual names of each chiller in the set. @@ -2831,12 +2816,12 @@ namespace RefrigeratedCase { } // Get water-cooled condenser input, if applicable if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { - RefrigRack(RackNum).InletNode = GetOnlySingleNode( - Alphas(6), ErrorsFound, CurrentModuleObject, Alphas(1), NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent); - RefrigRack(RackNum).OutletNode = GetOnlySingleNode( - Alphas(7), ErrorsFound, CurrentModuleObject, Alphas(1), NodeType_Water, NodeConnectionType_Outlet, 1, ObjectIsNotParent); + RefrigRack(RackNum).InletNode = NodeInputManager::GetOnlySingleNode( + Alphas(6), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); + RefrigRack(RackNum).OutletNode = NodeInputManager::GetOnlySingleNode( + Alphas(7), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); // Check node connections - TestCompSet(CurrentModuleObject, Alphas(1), Alphas(6), Alphas(7), "RefrigRack Nodes"); + BranchNodeConnections::TestCompSet(CurrentModuleObject, Alphas(1), Alphas(6), Alphas(7), "RefrigRack Nodes"); // Get loop flow type if (UtilityRoutines::SameString(Alphas(8), "VariableFlow")) { RefrigRack(RackNum).FlowType = VariableFlow; @@ -2853,7 +2838,7 @@ namespace RefrigeratedCase { if (lAlphaBlanks(9)) { RefrigRack(RackNum).OutletTempSchedPtr = 0; } else { - RefrigRack(RackNum).OutletTempSchedPtr = GetScheduleIndex(Alphas(9)); // convert schedule name to pointer + RefrigRack(RackNum).OutletTempSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(9)); // convert schedule name to pointer } if (RefrigRack(RackNum).OutletTempSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", invalid " + @@ -2891,10 +2876,10 @@ namespace RefrigeratedCase { if (lAlphaBlanks(10)) { RefrigRack(RackNum).EvapSchedPtr = 0; } else { - RefrigRack(RackNum).EvapSchedPtr = GetScheduleIndex(Alphas(10)); // convert schedule name to pointer + RefrigRack(RackNum).EvapSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(10)); // convert schedule name to pointer // check availability schedule for values >= 0 if (RefrigRack(RackNum).EvapSchedPtr > 0) { - if (!CheckScheduleValueMinMax(RefrigRack(RackNum).EvapSchedPtr, ">=", 0.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(RefrigRack(RackNum).EvapSchedPtr, ">=", 0.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\" ."); ShowContinueError("Error found in " + cAlphaFieldNames(10) + " = " + Alphas(10)); ShowContinueError("schedule values must be (>=0.)."); @@ -2917,7 +2902,7 @@ namespace RefrigeratedCase { RefrigRack(RackNum).CondenserAirFlowRate = Numbers(8); if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && - RefrigRack(RackNum).CondenserAirFlowRate != AutoCalculate) { + RefrigRack(RackNum).CondenserAirFlowRate != DataGlobals::AutoCalculate) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(8) + " cannot be less than or equal to zero."); ErrorsFound = true; @@ -2939,7 +2924,7 @@ namespace RefrigeratedCase { RefrigRack(RackNum).EvapPumpPower = Numbers(11); if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower < 0.0 && - RefrigRack(RackNum).EvapPumpPower != AutoCalculate) { + RefrigRack(RackNum).EvapPumpPower != DataGlobals::AutoCalculate) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(11) + " cannot be less than zero."); ErrorsFound = true; @@ -2951,7 +2936,7 @@ namespace RefrigeratedCase { RefrigRack(RackNum).EvapWaterSupplyMode = WaterSupplyFromMains; } else { RefrigRack(RackNum).EvapWaterSupplyMode = WaterSupplyFromTank; - SetupTankDemandComponent(RefrigRack(RackNum).Name, + WaterManager::SetupTankDemandComponent(RefrigRack(RackNum).Name, CurrentModuleObject, RefrigRack(RackNum).SupplyTankName, ErrorsFound, @@ -2963,15 +2948,15 @@ namespace RefrigeratedCase { if (lAlphaBlanks(12)) { RefrigRack(RackNum).OutsideAirNodeNum = 0; } else { - RefrigRack(RackNum).OutsideAirNodeNum = GetOnlySingleNode(Alphas(12), + RefrigRack(RackNum).OutsideAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(12), ErrorsFound, CurrentModuleObject, Alphas(1), - NodeType_Air, - NodeConnectionType_OutsideAirReference, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, 1, - ObjectIsParent); - if (!CheckOutAirNodeNumber(RefrigRack(RackNum).OutsideAirNodeNum)) { + DataLoopNode::ObjectIsParent); + if (!OutAirNodeManager::CheckOutAirNodeNumber(RefrigRack(RackNum).OutsideAirNodeNum)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cAlphaFieldNames(12) + " not found: " + Alphas(12)); ShowContinueError("...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); @@ -3109,7 +3094,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } else { // alpha (15) not blank RefrigRack(RackNum).HeatRejectionZoneNum = UtilityRoutines::FindItemInList(Alphas(15), DataHeatBalance::Zone); - RefrigRack(RackNum).HeatRejectionZoneNodeNum = GetSystemNodeNumberForZone(Alphas(15)); + RefrigRack(RackNum).HeatRejectionZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(15)); if (RefrigRack(RackNum).HeatRejectionZoneNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", invalid " + cAlphaFieldNames(15) + " not valid: " + Alphas(15)); @@ -3123,11 +3108,11 @@ namespace RefrigeratedCase { // set condenser air flow and evap water pump power if autocalculated // autocalculate condenser evap water pump if needed - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower == AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower == DataGlobals::AutoCalculate) { RefrigRack(RackNum).EvapPumpPower = CondPumpRatePower * RefrigRack(RackNum).TotalRackLoad; } // autocalculate evap condenser air volume flow rate if needed - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate == AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate == DataGlobals::AutoCalculate) { RefrigRack(RackNum).CondenserAirFlowRate = AirVolRateEvapCond * RefrigRack(RackNum).TotalRackLoad; } @@ -3195,13 +3180,13 @@ namespace RefrigeratedCase { Condenser(CondNum).RatedCapacity = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, CondARI460DelT); } // elevation capacity correction on air-cooled condensers, Carrier correlation more conservative than Trane - Condenser(CondNum).RatedCapacity *= (1.0 - 7.17e-5 * Elevation); + Condenser(CondNum).RatedCapacity *= (1.0 - 7.17e-5 * DataEnvironment::Elevation); if (Condenser(CondNum).RatedCapacity > 0.0) { CurveManager::GetCurveMinMaxValues(Condenser(CondNum).CapCurvePtr, DelTempMin, DelTempMax); - Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * Elevation); // Mar 2011 bug fix - Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * Elevation); // Mar 2011 bug + Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug fix + Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug Condenser(CondNum).TempSlope = - (DelTempMax - DelTempMin) / ((Capmax - Capmin)); // * ( 1.0 - 7.17e-5 * Elevation ) ) //Mar 2011 bug fix + (DelTempMax - DelTempMin) / ((Capmax - Capmin)); // * ( 1.0 - 7.17e-5 * DataEnvironment::Elevation ) ) //Mar 2011 bug fix Condenser(CondNum).MinCondLoad = Capmax - DelTempMax / Condenser(CondNum).TempSlope; } else { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + @@ -3247,19 +3232,19 @@ namespace RefrigeratedCase { // need to clearly id node number for air inlet conditions and zone number for casecredit assignment if (Condenser(CondNum).InletAirZoneNum != 0) { // set condenser flag (later used to set system flag) and zone flag - Condenser(CondNum).InletAirNodeNum = GetSystemNodeNumberForZone(Alphas(4)); + Condenser(CondNum).InletAirNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(4)); Condenser(CondNum).CondenserRejectHeatToZone = true; RefrigPresentInZone(Condenser(CondNum).InletAirZoneNum) = true; } else { // not in a conditioned zone, so see if it's outside - Condenser(CondNum).InletAirNodeNum = GetOnlySingleNode(Alphas(4), + Condenser(CondNum).InletAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(4), ErrorsFound, CurrentModuleObject, Alphas(1), - NodeType_Air, - NodeConnectionType_OutsideAirReference, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, 1, - ObjectIsParent); - if (!CheckOutAirNodeNumber(Condenser(CondNum).InletAirNodeNum)) { + DataLoopNode::ObjectIsParent); + if (!OutAirNodeManager::CheckOutAirNodeNumber(Condenser(CondNum).InletAirNodeNum)) { // not outside and not a zone ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", " + cAlphaFieldNames(4) + " not found: " + Alphas(4)); @@ -3320,7 +3305,7 @@ namespace RefrigeratedCase { ErrorsFound = true; } // Calculate capacity elevation derate factor per ARI 490 barometric pressure correction factor - Condenser(CondNum).EvapElevFact = 1.0 - 3.074e-5 * Elevation; + Condenser(CondNum).EvapElevFact = 1.0 - 3.074e-5 * DataEnvironment::Elevation; Condenser(CondNum).RatedSubcool = 0.0; // default value if ((!lNumericBlanks(2)) && (Numbers(2) > 0.0)) Condenser(CondNum).RatedSubcool = Numbers(2); @@ -3416,15 +3401,15 @@ namespace RefrigeratedCase { if (lAlphaBlanks(3)) { Condenser(CondNum).InletAirNodeNum = 0; } else { - Condenser(CondNum).InletAirNodeNum = GetOnlySingleNode(Alphas(3), + Condenser(CondNum).InletAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(3), ErrorsFound, CurrentModuleObject, Alphas(1), - NodeType_Air, - NodeConnectionType_OutsideAirReference, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, 1, - ObjectIsParent); - if (!CheckOutAirNodeNumber(Condenser(CondNum).InletAirNodeNum)) { + DataLoopNode::ObjectIsParent); + if (!OutAirNodeManager::CheckOutAirNodeNumber(Condenser(CondNum).InletAirNodeNum)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", " + cAlphaFieldNames(3) + " not found: " + Alphas(3)); ShowContinueError("...does not appear in an OutdoorAir:NodeList or as an OutdoorAir:Node."); @@ -3466,7 +3451,7 @@ namespace RefrigeratedCase { Condenser(CondNum).EvapWaterSupplyMode = WaterSupplyFromMains; } else { Condenser(CondNum).EvapWaterSupplyMode = WaterSupplyFromTank; - SetupTankDemandComponent(Condenser(CondNum).Name, + WaterManager::SetupTankDemandComponent(Condenser(CondNum).Name, CurrentModuleObject, Condenser(CondNum).SupplyTankName, ErrorsFound, @@ -3477,10 +3462,10 @@ namespace RefrigeratedCase { if (lAlphaBlanks(5)) { Condenser(CondNum).EvapSchedPtr = 0; } else { - Condenser(CondNum).EvapSchedPtr = GetScheduleIndex(Alphas(5)); // convert schedule name to pointer + Condenser(CondNum).EvapSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(5)); // convert schedule name to pointer // check availability schedule for values >= 0 if (Condenser(CondNum).EvapSchedPtr > 0) { - if (!CheckScheduleValueMinMax(Condenser(CondNum).EvapSchedPtr, ">=", 0.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax(Condenser(CondNum).EvapSchedPtr, ">=", 0.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\" ."); ShowContinueError("Error found in " + cAlphaFieldNames(5) + " = " + Alphas(5)); ShowContinueError("schedule values must be (>=0.)."); @@ -3573,12 +3558,12 @@ namespace RefrigeratedCase { ErrorsFound = true; } - Condenser(CondNum).InletNode = GetOnlySingleNode( - Alphas(2), ErrorsFound, CurrentModuleObject, Alphas(1), NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent); - Condenser(CondNum).OutletNode = GetOnlySingleNode( - Alphas(3), ErrorsFound, CurrentModuleObject, Alphas(1), NodeType_Water, NodeConnectionType_Outlet, 1, ObjectIsNotParent); + Condenser(CondNum).InletNode = NodeInputManager::GetOnlySingleNode( + Alphas(2), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); + Condenser(CondNum).OutletNode = NodeInputManager::GetOnlySingleNode( + Alphas(3), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); // Check node connections - TestCompSet(CurrentModuleObject, Alphas(1), Alphas(2), Alphas(3), "Water Cooled Condenser Nodes"); + BranchNodeConnections::TestCompSet(CurrentModuleObject, Alphas(1), Alphas(2), Alphas(3), "Water Cooled Condenser Nodes"); // Get loop flow type if (UtilityRoutines::SameString(Alphas(4), "VariableFlow")) { // set FlowType Condenser(CondNum).FlowType = VariableFlow; @@ -3596,7 +3581,7 @@ namespace RefrigeratedCase { if (lAlphaBlanks(5)) { Condenser(CondNum).OutletTempSchedPtr = 0; } else { - Condenser(CondNum).OutletTempSchedPtr = GetScheduleIndex(Alphas(5)); // convert schedule name to pointer + Condenser(CondNum).OutletTempSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(5)); // convert schedule name to pointer } if (Condenser(CondNum).OutletTempSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", invalid " + @@ -3777,11 +3762,11 @@ namespace RefrigeratedCase { GasCooler(GCNum).RatedCapacity = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, GasCooler(GCNum).RatedApproachT); } // elevation capacity correction on air-cooled condensers, Carrier correlation more conservative than Trane - GasCooler(GCNum).RatedCapacity *= (1.0 - 7.17e-5 * Elevation); + GasCooler(GCNum).RatedCapacity *= (1.0 - 7.17e-5 * DataEnvironment::Elevation); if (GasCooler(GCNum).RatedCapacity > 0.0) { CurveManager::GetCurveMinMaxValues(GasCooler(GCNum).CapCurvePtr, DelTempMin, DelTempMax); - Capmin = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * Elevation); - Capmax = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * Elevation); + Capmin = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); + Capmax = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); GasCooler(GCNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); GasCooler(GCNum).MinCondLoad = Capmax - DelTempMax / GasCooler(GCNum).TempSlope; } else { @@ -3872,19 +3857,19 @@ namespace RefrigeratedCase { // need to clearly id node number for air inlet conditions and zone number for casecredit assignment if (GasCooler(GCNum).InletAirZoneNum != 0) { // set condenser flag (later used to set system flag) and zone flag - GasCooler(GCNum).InletAirNodeNum = GetSystemNodeNumberForZone(Alphas(4)); + GasCooler(GCNum).InletAirNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(4)); GasCooler(GCNum).GasCoolerRejectHeatToZone = true; RefrigPresentInZone(GasCooler(GCNum).InletAirZoneNum) = true; } else { // not in a conditioned zone, so see if it's outside - GasCooler(GCNum).InletAirNodeNum = GetOnlySingleNode(Alphas(4), + GasCooler(GCNum).InletAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(4), ErrorsFound, CurrentModuleObject, Alphas(1), - NodeType_Air, - NodeConnectionType_OutsideAirReference, + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, 1, - ObjectIsParent); - if (!CheckOutAirNodeNumber(GasCooler(GCNum).InletAirNodeNum)) { + DataLoopNode::ObjectIsParent); + if (!OutAirNodeManager::CheckOutAirNodeNumber(GasCooler(GCNum).InletAirNodeNum)) { // not outside and not a zone ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + GasCooler(GCNum).Name + "\", " + cAlphaFieldNames(4) + " not found: " + Alphas(4)); @@ -4120,10 +4105,10 @@ namespace RefrigeratedCase { TBrineAverage = (TBrineOutRated + TBrineInRated) / 2.0; Secondary(SecondaryNum).TBrineAverage = TBrineAverage; DensityBrineRated = - GetDensityGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); + FluidProperties::GetDensityGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); Secondary(SecondaryNum).DensityBrineRated = DensityBrineRated; CpBrineRated = - GetSpecificHeatGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); + FluidProperties::GetSpecificHeatGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); Secondary(SecondaryNum).CpBrineRated = CpBrineRated; // Users can input either design brine flow (m3/s), or capacity in W, or both. Now have @@ -4191,17 +4176,17 @@ namespace RefrigeratedCase { Secondary(SecondaryNum).CircRate = DefaultCircRate; if (!lNumericBlanks(10)) Secondary(SecondaryNum).CircRate = Numbers(10); - DensityPhaseChange = GetSatDensityRefrig(Secondary(SecondaryNum).FluidName, + DensityPhaseChange = FluidProperties::GetSatDensityRefrig(Secondary(SecondaryNum).FluidName, Secondary(SecondaryNum).TCondense, 0.0, Secondary(SecondaryNum).FluidID, TrackMessageAlt); - DeltaHPhaseChange = GetSatEnthalpyRefrig(Secondary(SecondaryNum).FluidName, + DeltaHPhaseChange = FluidProperties::GetSatEnthalpyRefrig(Secondary(SecondaryNum).FluidName, Secondary(SecondaryNum).TCondense, 1.0, Secondary(SecondaryNum).FluidID, TrackMessageAlt) - - GetSatEnthalpyRefrig(Secondary(SecondaryNum).FluidName, + FluidProperties::GetSatEnthalpyRefrig(Secondary(SecondaryNum).FluidName, Secondary(SecondaryNum).TCondense, 0.0, Secondary(SecondaryNum).FluidID, @@ -4328,7 +4313,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { Secondary(SecondaryNum).SumUADistPiping = Numbers(NumNum); Secondary(SecondaryNum).DistPipeZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); - Secondary(SecondaryNum).DistPipeZoneNodeNum = GetSystemNodeNumberForZone(Alphas(AlphaNum)); + Secondary(SecondaryNum).DistPipeZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (Secondary(SecondaryNum).DistPipeZoneNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\", invalid " + @@ -4370,7 +4355,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(NumNum) && !lAlphaBlanks(AlphaNum)) { Secondary(SecondaryNum).SumUAReceiver = Numbers(NumNum); Secondary(SecondaryNum).ReceiverZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); - Secondary(SecondaryNum).ReceiverZoneNodeNum = GetSystemNodeNumberForZone(Alphas(AlphaNum)); + Secondary(SecondaryNum).ReceiverZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (Secondary(SecondaryNum).ReceiverZoneNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\", invalid " + @@ -5109,7 +5094,7 @@ namespace RefrigeratedCase { // Now do evaporative condenser auto sizing because it is a function of the system's cooling load if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { - if (Condenser(CondNum).RatedAirFlowRate == AutoCalculate) { + if (Condenser(CondNum).RatedAirFlowRate == DataGlobals::AutoCalculate) { Condenser(CondNum).RatedAirFlowRate = AirVolRateEvapCond * Condenser(CondNum).RatedCapacity; } if (Condenser(CondNum).RatedAirFlowRate <= 0.0) { @@ -5117,7 +5102,7 @@ namespace RefrigeratedCase { "\", Evaporative Condenser Air Volume Flow Rate cannot be less than or equal to zero."); ErrorsFound = true; } - if (Condenser(CondNum).EvapPumpPower == AutoCalculate) { + if (Condenser(CondNum).EvapPumpPower == DataGlobals::AutoCalculate) { Condenser(CondNum).EvapPumpPower = CondPumpRatePower * Condenser(CondNum).RatedCapacity; } if (Condenser(CondNum).EvapPumpPower < 0.0) { @@ -5170,7 +5155,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(1)) { System(RefrigSysNum).TCondenseMin = Numbers(1); System(RefrigSysNum).TCondenseMinInput = System(RefrigSysNum).TCondenseMin; - if (AnyEnergyManagementSystemInModel) { + if (DataGlobals::AnyEnergyManagementSystemInModel) { SetupEMSActuator("Refrigeration:System", System(RefrigSysNum).Name, "Minimum Condensing Temperature", @@ -5262,7 +5247,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(2) && !lAlphaBlanks(AlphaNum)) { System(RefrigSysNum).SumUASuctionPiping = Numbers(2); System(RefrigSysNum).SuctionPipeActualZoneNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); - System(RefrigSysNum).SuctionPipeZoneNodeNum = GetSystemNodeNumberForZone(Alphas(AlphaNum)); + System(RefrigSysNum).SuctionPipeZoneNodeNum = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (System(RefrigSysNum).SuctionPipeZoneNodeNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", System Node Number not found for " + cAlphaFieldNames(AlphaNum) + " = " + Alphas(AlphaNum) + @@ -5386,14 +5371,14 @@ namespace RefrigeratedCase { // Determine intercooler pressure and temperature at design conditions if (System(RefrigSysNum).NumStages == 2) { - PCond = GetSatPressureRefrig(System(RefrigSysNum).RefrigerantName, + PCond = FluidProperties::GetSatPressureRefrig(System(RefrigSysNum).RefrigerantName, Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense, System(RefrigSysNum).RefIndex, RoutineName); - PEvap = GetSatPressureRefrig( + PEvap = FluidProperties::GetSatPressureRefrig( System(RefrigSysNum).RefrigerantName, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).RefIndex, RoutineName); System(RefrigSysNum).PIntercooler = std::sqrt(PCond * PEvap); - System(RefrigSysNum).TIntercooler = GetSatTemperatureRefrig( + System(RefrigSysNum).TIntercooler = FluidProperties::GetSatTemperatureRefrig( System(RefrigSysNum).RefrigerantName, System(RefrigSysNum).PIntercooler, System(RefrigSysNum).RefIndex, RoutineName); } // NumStages @@ -5917,7 +5902,7 @@ namespace RefrigeratedCase { CompNum = TransSystem(TransRefrigSysNum).CompressorNumHP(CompIndex); if (Compressor(CompNum).TransFlag) { // Calculate nominal capacity of transcritical Compressor - GCOutletH = GetSupHeatEnthalpyRefrig(TransSystem(TransRefrigSysNum).RefrigerantName, + GCOutletH = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(TransRefrigSysNum).RefrigerantName, GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletT, GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletP, RefrigIndex, @@ -5998,7 +5983,7 @@ namespace RefrigeratedCase { } // Check receiver temperature against minimum condensing temperature (from gas cooler input) and design evaporator temperatures - TransSystem(TransRefrigSysNum).TReceiver = GetSatTemperatureRefrig( + TransSystem(TransRefrigSysNum).TReceiver = FluidProperties::GetSatTemperatureRefrig( TransSystem(TransRefrigSysNum).RefrigerantName, TransSystem(TransRefrigSysNum).PReceiver, RefrigIndex, RoutineNameNoColon); if (TransSystem(TransRefrigSysNum).TReceiver > GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp) { ShowWarningError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + @@ -6061,7 +6046,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(3) && !lAlphaBlanks(AlphaNum)) { TransSystem(TransRefrigSysNum).SumUASuctionPipingMT = Numbers(3); TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); - TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT = GetSystemNodeNumberForZone(Alphas(AlphaNum)); + TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", System Node Number not found for " + cAlphaFieldNames(AlphaNum) + " = \"" + Alphas(AlphaNum) + @@ -6088,7 +6073,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(4) && !lAlphaBlanks(AlphaNum)) { TransSystem(TransRefrigSysNum).SumUASuctionPipingLT = Numbers(4); TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); - TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT = GetSystemNodeNumberForZone(Alphas(AlphaNum)); + TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", System Node Number not found for " + cAlphaFieldNames(AlphaNum) + " = \"" + Alphas(AlphaNum) + @@ -6140,7 +6125,7 @@ namespace RefrigeratedCase { if (NumSimulationCases > 0) { // Find unused and non-unique display case objects to report in eio and err file and sum // all HVAC RA fractions and write error message if greater than 1 for any zone - for (ZoneIndex = 1; ZoneIndex <= NumOfZones; ++ZoneIndex) { // numofzones from dataglobals + for (ZoneIndex = 1; ZoneIndex <= DataGlobals::NumOfZones; ++ZoneIndex) { // numofzones from dataglobals TempRAFraction = CaseRAFraction(ZoneIndex).TotalCaseRAFraction; for (CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { // TempRaFraction already includes contributions from ALL cases in zone @@ -6154,7 +6139,7 @@ namespace RefrigeratedCase { // check in comment, can't use "currentModuleObject" because not in get input subroutine where that is known ErrorsFound = true; } - } // ZoneIndex=1,NumOfZones + } // ZoneIndex=1,DataGlobals::NumOfZones CaseRAFraction.deallocate(); // only used for input check just completed // check for cases not connected to systems and cases connected @@ -6165,8 +6150,8 @@ namespace RefrigeratedCase { if (RefrigCase(CaseNum).NumSysAttach == 1) continue; if (RefrigCase(CaseNum).NumSysAttach < 1) { ++NumUnusedRefrigCases; - if (DisplayExtraWarnings) { - // individual case names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual case names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:Case=\"" + RefrigCase(CaseNum).Name + "\" unused. "); } // display extra warnings - give a list of unused cases } // unused case @@ -6178,9 +6163,9 @@ namespace RefrigeratedCase { } // if looking for same case attached to multiple systems/racks } // NumSimulationCases - if ((NumUnusedRefrigCases > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedRefrigCases > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused cases given if DisplayExtraWarnings option not selected + // summary number of unused cases given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError("Refrigeration:Case -> " + General::RoundSigDigits(NumUnusedRefrigCases) + " unused refrigerated case(s) found during input processing."); ShowContinueError(" These refrigerated cases are in the input file but are not connected to a "); @@ -6198,8 +6183,8 @@ namespace RefrigeratedCase { if (Compressor(CompNum).NumSysAttach == 1) continue; if (Compressor(CompNum).NumSysAttach < 1) { ++NumUnusedCompressors; - if (DisplayExtraWarnings) { - // individual compressor names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual compressor names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:Compressor=\"" + Compressor(CompNum).Name + "\" unused. "); } // display extra warnings - give a list of unused compressors } // unused compressor @@ -6211,9 +6196,9 @@ namespace RefrigeratedCase { } // looking for same compressor attached to multiple systems/racks } // NumSimulationCompressors - if ((NumUnusedCompressors > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedCompressors > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused compressors given if DisplayExtraWarnings option not selected + // summary number of unused compressors given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError("Refrigeration:Compressor -> " + General::RoundSigDigits(NumUnusedCompressors) + " unused refrigeration compressor(s) found during input processing."); ShowContinueError(" Those refrigeration compressors are in the input file but are not connected to a Refrigeration:System object."); @@ -6230,8 +6215,8 @@ namespace RefrigeratedCase { if (WalkIn(WalkInNum).NumSysAttach == 1) continue; if (WalkIn(WalkInNum).NumSysAttach < 1) { ++NumUnusedWalkIns; - if (DisplayExtraWarnings) { - // individual walkin names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual walkin names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:WalkIn=\"" + WalkIn(WalkInNum).Name + "\" unused. "); } // display extra warnings - give a list of unused WalkIns } // unused walkin @@ -6243,9 +6228,9 @@ namespace RefrigeratedCase { } // if looking for same walk in attached to multiple systems/racks } // NumSimulationWalkIns - if ((NumUnusedWalkIns > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedWalkIns > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused walkins given if DisplayExtraWarnings option not selected + // summary number of unused walkins given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(RoutineName + "Refrigeration:WalkIn -> " + General::RoundSigDigits(NumUnusedWalkIns) + " unused refrigeration WalkIns found during input processing."); ShowContinueError(" Those refrigeration WalkIns are in the input file but are not connected to a "); @@ -6263,8 +6248,8 @@ namespace RefrigeratedCase { if (WarehouseCoil(CoilNum).NumSysAttach == 1) continue; if (WarehouseCoil(CoilNum).NumSysAttach < 1) { ++NumUnusedWalkIns; - if (DisplayExtraWarnings) { - // individual walkin names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual walkin names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:AirChiller=\"" + WarehouseCoil(CoilNum).Name + "\" unused. "); } // display extra warnings - give a list of unused chillers } // unused chiller @@ -6276,9 +6261,9 @@ namespace RefrigeratedCase { } // if looking for same walk in attached to multiple systems/racks } // NumSimulationRefrigAirchillers - if ((NumUnusedCoils > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedCoils > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused air chillers given if DisplayExtraWarnings option not selected + // summary number of unused air chillers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(RoutineName + "Refrigeration:AirChiller -> " + General::RoundSigDigits(NumUnusedCoils) + " unused refrigeration air chillers found during input processing."); ShowContinueError(" Those refrigeration air chillers are in the input file but are not connected to a "); @@ -6296,8 +6281,8 @@ namespace RefrigeratedCase { if (Secondary(SecondaryNum).NumSysAttach == 1) continue; if (Secondary(SecondaryNum).NumSysAttach < 1) { ++NumUnusedSecondarys; - if (DisplayExtraWarnings) { - // individual secondary names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual secondary names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:Secondary=\"" + Secondary(SecondaryNum).Name + "\" unused. "); } // display extra warnings - give a list of unused Secondaries } // unused secondary @@ -6309,9 +6294,9 @@ namespace RefrigeratedCase { } // looking for same secondary loop attached to multiple systems/racks } // NumSimulationSecondarys - if ((NumUnusedSecondarys > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedSecondarys > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused secondaries given if DisplayExtraWarnings option not selected + // summary number of unused secondaries given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(RoutineName + "Refrigeration:Secondary -> " + General::RoundSigDigits(NumUnusedSecondarys) + " unused refrigeration Secondary Loops found during input processing."); ShowContinueError(" Those refrigeration Secondary Loops are in the input file but are not connected to a refrigeration system."); @@ -6330,8 +6315,8 @@ namespace RefrigeratedCase { if (Condenser(CondNum).NumSysAttach == 1) continue; if (Condenser(CondNum).NumSysAttach < 1) { ++NumUnusedCondensers; - if (DisplayExtraWarnings) { - // individual condenser names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual condenser names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:Condenser=\"" + Condenser(CondNum).Name + "\" unused. "); } // display extra warnings - give a list of unused condensers } // unused condenser @@ -6340,9 +6325,9 @@ namespace RefrigeratedCase { } // looking for shared condensers } // CondNum - if ((NumUnusedCondensers > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedCondensers > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused condensers given if DisplayExtraWarnings option not selected + // summary number of unused condensers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(RoutineName + "Refrigeration condenser -> " + General::RoundSigDigits(NumUnusedCondensers) + " unused refrigeration condensers found during input processing."); ShowContinueError(" Those refrigeration condensers are in the input file but are not connected to a refrigeration system."); @@ -6359,8 +6344,8 @@ namespace RefrigeratedCase { if (GasCooler(GCNum).NumSysAttach == 1) continue; if (GasCooler(GCNum).NumSysAttach < 1) { ++NumUnusedGasCoolers; - if (DisplayExtraWarnings) { - // individual gas cooler names listed if DisplayExtraWarnings option selected + if (DataGlobals::DisplayExtraWarnings) { + // individual gas cooler names listed if DataGlobals::DisplayExtraWarnings option selected ShowWarningError(RoutineName + ": Refrigeration:GasCooler=\"" + GasCooler(GCNum).Name + "\" unused. "); } // display extra warnings - give a list of unused gas coolers } // unused gas cooler @@ -6369,9 +6354,9 @@ namespace RefrigeratedCase { } // looking for shared gas coolers } // GCNum - if ((NumUnusedGasCoolers > 0) && (!DisplayExtraWarnings)) { + if ((NumUnusedGasCoolers > 0) && (!DataGlobals::DisplayExtraWarnings)) { // write to error file, - // summary number of unused gas coolers given if DisplayExtraWarnings option not selected + // summary number of unused gas coolers given if DataGlobals::DisplayExtraWarnings option not selected ShowWarningError(RoutineName + "Refrigeration gas cooler -> " + General::RoundSigDigits(NumUnusedGasCoolers) + " unused refrigeration gas cooler(s) found during input processing."); ShowContinueError(" These refrigeration gas coolers are in the input file but are not connected to a refrigeration system."); @@ -7015,7 +7000,7 @@ namespace RefrigeratedCase { // Report sum of all refrigeration interactions with each zone - for (ZoneID = 1; ZoneID <= NumOfZones; ++ZoneID) { + for (ZoneID = 1; ZoneID <= DataGlobals::NumOfZones; ++ZoneID) { if (RefrigPresentInZone(ZoneID)) { if (HaveCasesOrWalkins) { SetupOutputVariable("Refrigeration Zone Case and Walk In Total Sensible Cooling Rate", @@ -8942,8 +8927,6 @@ namespace RefrigeratedCase { // addition/subtraction to/from each accumulating variable. If the time step is repeated, // this most recent addition/subtraction is reversed before the rest of the refrigeration simulation begins. - using DataGlobals::AnyEnergyManagementSystemInModel; - static bool MyBeginEnvrnFlag(true); static int SystemID(0); static int CaseID(0); @@ -8964,7 +8947,7 @@ namespace RefrigeratedCase { // These 'casecredit' variables are also used to transfer energy from zone-located // compressor-rack condenser heat rejection, heat absorption by distribution piping, // suction piping, and receiver shells to zone - if (NumOfZones > 0) { + if (DataGlobals::NumOfZones > 0) { if (UseSysTimeStep) { for (int i = CoilSysCredit.l(), e = CoilSysCredit.u(); i <= e; ++i) { CoilSysCredit(i).reset(); @@ -9067,7 +9050,7 @@ namespace RefrigeratedCase { } // Accumulative and carry-over variables are not zeroed at start of each time step, only at begining of environment - if (BeginEnvrnFlag && MyBeginEnvrnFlag) { + if (DataGlobals::BeginEnvrnFlag && MyBeginEnvrnFlag) { if (NumSimulationCases > 0) { for (int i = RefrigCase.l(), e = RefrigCase.u(); i <= e; ++i) { RefrigCase(i).reset_init_accum(); @@ -9126,18 +9109,18 @@ namespace RefrigeratedCase { System(SystemID).LSHXTransEnergy = 0.0; } - if (NumOfTimeStepInHour > 0.0) TimeStepFraction = 1.0 / double(NumOfTimeStepInHour); + if (DataGlobals::NumOfTimeStepInHour > 0.0) TimeStepFraction = 1.0 / double(DataGlobals::NumOfTimeStepInHour); MyBeginEnvrnFlag = false; - } // ( BeginEnvrnFlag && MyBeginEnvrnFlag ) + } // ( DataGlobals::BeginEnvrnFlag && MyBeginEnvrnFlag ) - if (!BeginEnvrnFlag) MyBeginEnvrnFlag = true; + if (!DataGlobals::BeginEnvrnFlag) MyBeginEnvrnFlag = true; // Avoid multiplying accumulation if go through zone/load time step more than once. - if (!WarmupFlag) { // because no accumulation is done during warm up + if (!DataGlobals::WarmupFlag) { // because no accumulation is done during warm up // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - MyCurrentTime = (HourOfDay - 1) + TimeStep * TimeStepFraction; + MyCurrentTime = (DataGlobals::HourOfDay - 1) + DataGlobals::TimeStep * TimeStepFraction; if (std::abs(MyCurrentTime - MyCurrentTimeSaved) < MySmallNumber) { // If the time step is repeated, need to return to correct values at start of time step if (NumSimulationCases > 0) { @@ -9229,7 +9212,7 @@ namespace RefrigeratedCase { } else { // using UseSysTimeStep as a flag for a chiller system - MyStepStartTime = CurrentTime - TimeStepZone + DataHVACGlobals::SysTimeElapsed; + MyStepStartTime = DataGlobals::CurrentTime - DataGlobals::TimeStepZone + DataHVACGlobals::SysTimeElapsed; if (std::abs(MyStepStartTime - MyStepStartTimeSaved) < MySmallNumber) { // If the time step is repeated, need to return to correct values at start of time step if (NumSimulationRefrigAirChillers > 0) { @@ -9265,7 +9248,7 @@ namespace RefrigeratedCase { } // warm up flag - if (AnyEnergyManagementSystemInModel) { + if (DataGlobals::AnyEnergyManagementSystemInModel) { if (DataHeatBalance::NumRefrigSystems > 0) { for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { if (System(SystemID).EMSOverrideOnTCondenseMin) { @@ -9320,7 +9303,7 @@ namespace RefrigeratedCase { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } - rho = GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9352,7 +9335,7 @@ namespace RefrigeratedCase { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } - rho = GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9365,18 +9348,18 @@ namespace RefrigeratedCase { } MyReferPlantScanFlag = false; - } else if (MyReferPlantScanFlag && !AnyPlantInModel) { + } else if (MyReferPlantScanFlag && !DataGlobals::AnyPlantInModel) { MyReferPlantScanFlag = false; } - if (BeginEnvrnFlag && MyBeginEnvrnFlag) { + if (DataGlobals::BeginEnvrnFlag && MyBeginEnvrnFlag) { // do plant inits, if applicable if (!MyReferPlantScanFlag) { for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - rho = GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9399,7 +9382,7 @@ namespace RefrigeratedCase { for (RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - rho = GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9422,9 +9405,9 @@ namespace RefrigeratedCase { } MyBeginEnvrnFlag = false; - } //(BeginEnvrnFlag .AND. MyBeginEnvrnFlag) + } //(DataGlobals::BeginEnvrnFlag .AND. MyBeginEnvrnFlag) - if (!BeginEnvrnFlag) MyBeginEnvrnFlag = true; + if (!DataGlobals::BeginEnvrnFlag) MyBeginEnvrnFlag = true; } void CalcRackSystem(int const RackNum) @@ -9463,7 +9446,7 @@ namespace RefrigeratedCase { Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] bool EvapAvail; // Control for evap condenser availability - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems static int CoilSetIndex(0); // Index to set of coils in a single zone static int CoilSetID(0); // Index to set of coils in a single zone (shared inlet and outlet nodes) static int CoilIndex(0); // Index to a single air chiller/coil @@ -9486,7 +9469,7 @@ namespace RefrigeratedCase { HeatRejectZoneNum = 0; HeatRejectZoneNodeNum = 0; - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Loads for chiller sets are set in call to zone equipment element "SimAirChillerSet" @@ -9558,21 +9541,21 @@ namespace RefrigeratedCase { } // NumWalkIns>0 if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - COPFTempOutput = CurveManager::CurveValue(RefrigRack(RackNum).COPFTempPtr, Node(HeatRejectZoneNodeNum).Temp); + COPFTempOutput = CurveManager::CurveValue(RefrigRack(RackNum).COPFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp); EvapAvail = false; } else { if (RefrigRack(RackNum).OutsideAirNodeNum != 0) { - OutDbTemp = Node(RefrigRack(RackNum).OutsideAirNodeNum).Temp; - BPress = Node(RefrigRack(RackNum).OutsideAirNodeNum).Press; + OutDbTemp = DataLoopNode::Node(RefrigRack(RackNum).OutsideAirNodeNum).Temp; + BPress = DataLoopNode::Node(RefrigRack(RackNum).OutsideAirNodeNum).Press; } else { - OutDbTemp = OutDryBulbTemp; - BPress = OutBaroPress; + OutDbTemp = DataEnvironment::OutDryBulbTemp; + BPress = DataEnvironment::OutBaroPress; } EffectTemp = OutDbTemp; // IF schedule exists, evap condenser can be scheduled OFF // Check schedule to determine evap condenser availability - if (RefrigRack(RackNum).EvapSchedPtr > 0 && GetCurrentScheduleValue(RefrigRack(RackNum).EvapSchedPtr) == 0) EvapAvail = false; + if (RefrigRack(RackNum).EvapSchedPtr > 0 && ScheduleManager::GetCurrentScheduleValue(RefrigRack(RackNum).EvapSchedPtr) == 0) EvapAvail = false; // Evaporative condensers will have their water flow shut off in cold months to avoid // 'spectacular' icing problems. Ideally, the user will use the evaporative schedule input @@ -9585,9 +9568,9 @@ namespace RefrigeratedCase { if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { // determine temps for evap cooling if (RefrigRack(RackNum).OutsideAirNodeNum != 0) { - HumRatIn = Node(RefrigRack(RackNum).OutsideAirNodeNum).HumRat; + HumRatIn = DataLoopNode::Node(RefrigRack(RackNum).OutsideAirNodeNum).HumRat; } else { - HumRatIn = OutHumRat; + HumRatIn = DataEnvironment::OutHumRat; } // outsideairnode OutWbTemp = Psychrometrics::PsyTwbFnTdbWPb(OutDbTemp, HumRatIn, BPress); EffectTemp = OutWbTemp + (1.0 - RefrigRack(RackNum).EvapEffect) * (OutDbTemp - OutWbTemp); @@ -9597,8 +9580,8 @@ namespace RefrigeratedCase { if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { InletNode = RefrigRack(RackNum).InletNode; OutletNode = RefrigRack(RackNum).OutletNode; - RefrigRack(RackNum).InletTemp = Node(InletNode).Temp; - EffectTemp = Node(InletNode).Temp + 5.0; // includes approach temp + RefrigRack(RackNum).InletTemp = DataLoopNode::Node(InletNode).Temp; + EffectTemp = DataLoopNode::Node(InletNode).Temp + 5.0; // includes approach temp if (RefrigRack(RackNum).InletTemp < RefrigRack(RackNum).InletTempMin) { // RefrigRack(RackNum)%LowTempWarn = RefrigRack(RackNum)%LowTempWarn +1 if (RefrigRack(RackNum).LowTempWarnIndex == 0) { @@ -9635,7 +9618,7 @@ namespace RefrigeratedCase { if (TotalRackDeliveredCapacity > 0.0 && RefrigRack(RackNum).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) { if (RefrigRack(RackNum).TotCondFTempPtr != 0) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(RefrigRack(RackNum).TotCondFTempPtr, Node(HeatRejectZoneNodeNum).Temp))); + CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(RefrigRack(RackNum).TotCondFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp))); TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RefrigRack(RackNum).CondenserFanPower * CondenserFrac; } else { @@ -9713,34 +9696,32 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report compressor rack variables - using DataWater::WaterStorage; - - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems static int DemandARRID(0); // Index to water tank Demand used for evap condenser on rack static int RackTankID(0); // Index to water tank used for evap condenser on rack - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; RefrigRack(RackNum).RackCompressorPower = TotalCompressorPower; - RefrigRack(RackNum).RackElecConsumption = TotalCompressorPower * LocalTimeStep * SecInHour; + RefrigRack(RackNum).RackElecConsumption = TotalCompressorPower * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).ActualCondenserFanPower = TotalCondenserFanPower; - RefrigRack(RackNum).CondenserFanConsumption = TotalCondenserFanPower * LocalTimeStep * SecInHour; + RefrigRack(RackNum).CondenserFanConsumption = TotalCondenserFanPower * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).RackCapacity = TotalRackDeliveredCapacity; - RefrigRack(RackNum).RackCoolingEnergy = TotalRackDeliveredCapacity * LocalTimeStep * SecInHour; + RefrigRack(RackNum).RackCoolingEnergy = TotalRackDeliveredCapacity * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).RackCompressorCOP = CompressorCOPactual; RefrigRack(RackNum).SensHVACCreditHeatRate = RackSenCreditToHVAC; - RefrigRack(RackNum).SensHVACCreditHeat = RackSenCreditToHVAC * LocalTimeStep * SecInHour; + RefrigRack(RackNum).SensHVACCreditHeat = RackSenCreditToHVAC * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).SensZoneCreditHeatRate = RackSenCreditToZone; - RefrigRack(RackNum).SensZoneCreditHeat = RackSenCreditToZone * LocalTimeStep * SecInHour; + RefrigRack(RackNum).SensZoneCreditHeat = RackSenCreditToZone * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).EvapWaterConsumpRate = TotalEvapWaterUseRate; - RefrigRack(RackNum).EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * SecInHour; + RefrigRack(RackNum).EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).ActualEvapPumpPower = TotalCondenserPumpPower; - RefrigRack(RackNum).EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * SecInHour; + RefrigRack(RackNum).EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).BasinHeaterPower = TotalBasinHeatPower; - RefrigRack(RackNum).BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * SecInHour; + RefrigRack(RackNum).BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * DataGlobals::SecInHour; RefrigRack(RackNum).CondLoad = TotalCondenserHeat; - RefrigRack(RackNum).CondEnergy = TotalCondenserHeat * LocalTimeStep * SecInHour; + RefrigRack(RackNum).CondEnergy = TotalCondenserHeat * LocalTimeStep * DataGlobals::SecInHour; // Set total rack heat rejection used for heat reclaim. Do not allow heat reclaim on stand alone (indoor) display cases. if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = 0.0; @@ -9752,7 +9733,7 @@ namespace RefrigeratedCase { if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; RackTankID = RefrigRack(RackNum).EvapWaterSupTankID; - WaterStorage(RackTankID).VdotRequestDemand(DemandARRID) = RefrigRack(RackNum).EvapWaterConsumpRate; + DataWater::WaterStorage(RackTankID).VdotRequestDemand(DemandARRID) = RefrigRack(RackNum).EvapWaterConsumpRate; } SumZoneImpacts(); @@ -9795,8 +9776,6 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - using namespace DataLoopNode; - static Real64 CaseRAFraction(0.0); // Fraction of case credits applied to return air static int ActualZoneNum(0); // Index to zone @@ -9902,8 +9881,8 @@ namespace RefrigeratedCase { // Set local subroutine variables for convenience ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; - ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(Node(ZoneNodeNum).Temp, Node(ZoneNodeNum).HumRat, OutBaroPress) * 100.0; - ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(Node(ZoneNodeNum).HumRat, OutBaroPress); + ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; + ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); Length = RefrigCase(CaseID).Length; TCase = RefrigCase(CaseID).Temperature; DesignRatedCap = RefrigCase(CaseID).DesignRatedCap; @@ -9917,12 +9896,12 @@ namespace RefrigeratedCase { // GET ALL SCHEDULES (note all schedules can be fractions if on/off a portion of time step) // case schedule should be coincident with the zone time step otherwise the simulation proceeds - CaseSchedule = GetCurrentScheduleValue(RefrigCase(CaseID).SchedPtr); + CaseSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).SchedPtr); if (CaseSchedule <= 0) return; // get defrost schedule if (DefrostType > DefNone) { - DefrostSchedule = GetCurrentScheduleValue(RefrigCase(CaseID).DefrostSchedPtr); - DefrostDripDownSchedule = GetCurrentScheduleValue(RefrigCase(CaseID).DefrostDripDownSchedPtr); + DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).DefrostSchedPtr); + DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).DefrostDripDownSchedPtr); // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); } else { @@ -9931,17 +9910,17 @@ namespace RefrigeratedCase { } // get product stocking schedule and load due to product stocking, if no schedule exists load is 0 if (RefrigCase(CaseID).StockingSchedPtr > 0) { - StockingSchedule = GetCurrentScheduleValue(RefrigCase(CaseID).StockingSchedPtr); + StockingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).StockingSchedPtr); } else { StockingSchedule = 0.0; } // get lighting schedule and total load due to lighting - LightingSchedule = GetCurrentScheduleValue(RefrigCase(CaseID).LightingSchedPtr); + LightingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).LightingSchedPtr); // if case credit reduction fraction schedule exists, modify both sensible and latent case credits // according to schedule - used to account for variable case envelope, such as night covers. if (RefrigCase(CaseID).CaseCreditFracSchedPtr != 0) { - CaseCreditFraction = GetCurrentScheduleValue(RefrigCase(CaseID).CaseCreditFracSchedPtr); + CaseCreditFraction = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).CaseCreditFracSchedPtr); } else { CaseCreditFraction = 1.0; } @@ -9961,8 +9940,8 @@ namespace RefrigeratedCase { // accumulate stocking loads for reporting to help evaluate any cumulative unmet loads problems // only accumulate energy during actual simulation (so same if DD's are switched) StockingLoad = StockingSchedule * Length; - if (!WarmupFlag) { - DeltaStockingEnergy = (StockingLoad * TimeStepZoneSec); + if (!DataGlobals::WarmupFlag) { + DeltaStockingEnergy = (StockingLoad * DataGlobals::TimeStepZoneSec); RefrigCase(CaseID).StockingEnergy += DeltaStockingEnergy; } // warm up // CALCULTE ALL LOADS INFLUENCED BY ZONE TEMPERATURE AND RH @@ -9983,7 +9962,7 @@ namespace RefrigeratedCase { TotalAntiSweat = max(RefrigCase(CaseID).MinimumASPower, TotalAntiSweat); } else if (SELECT_CASE_var == ASHeatBalance) { if (RefrigCase(CaseID).Rcase > 0.0) { - TotalAntiSweat = (((ZoneDewPoint - Node(ZoneNodeNum).Temp) * RefrigCase(CaseID).Height / Rair) + + TotalAntiSweat = (((ZoneDewPoint - DataLoopNode::Node(ZoneNodeNum).Temp) * RefrigCase(CaseID).Height / Rair) + ((ZoneDewPoint - TCase) * RefrigCase(CaseID).Height / RefrigCase(CaseID).Rcase)); TotalAntiSweat = min(RefrigCase(CaseID).AntiSweatPower, max(RefrigCase(CaseID).MinimumASPower, TotalAntiSweat)); } else { @@ -10020,7 +9999,7 @@ namespace RefrigeratedCase { // If zone temp rises above rated ambient temperature, total load can exceed case design capacity, // so unmet cooling loads are accumulated to meet in the next time step. (Case credit fraction allows // extra insulation, e.g. night covers, or imitating a better insulated walk-in cooler) - ZoneTempFactor = (Node(ZoneNodeNum).Temp - TCase) / (RefrigCase(CaseID).RatedAmbientTemp - TCase); + ZoneTempFactor = (DataLoopNode::Node(ZoneNodeNum).Temp - TCase) / (RefrigCase(CaseID).RatedAmbientTemp - TCase); SensibleLoadPrime = RefrigCase(CaseID).DesignSensCaseCredit * ZoneTempFactor * CaseCreditFraction; SensibleLoadAux = TotalLightToCase + TotalASHeaterToCase + TotalFan + StockingLoad; SensibleLoadTotal = SensibleLoadPrime + SensibleLoadAux; @@ -10029,8 +10008,8 @@ namespace RefrigeratedCase { // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem - if (!WarmupFlag) { - DeltaFreezeKgFrost = LatentLoad * TimeStepZoneSec / IcetoVaporEnthalpy; + if (!DataGlobals::WarmupFlag) { + DeltaFreezeKgFrost = LatentLoad * DataGlobals::TimeStepZoneSec / IcetoVaporEnthalpy; RefrigCase(CaseID).KgFrost += DeltaFreezeKgFrost; } @@ -10058,16 +10037,16 @@ namespace RefrigeratedCase { DefrostCap_Actual *= DefrostRatio; } StartFrostKg = RefrigCase(CaseID).KgFrost; - DefrostEnergy = DefrostCap_Actual * TimeStepZoneSec; + DefrostEnergy = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; FrostMeltedKg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); RefrigCase(CaseID).KgFrost -= FrostMeltedKg; // Reduce defrost heat load on case by amount of ice melted during time step // However, don't reduce the defrost capacity applied - DefrostLoad_Actual = DefrostCap_Actual - FrostMeltedKg * IceMeltEnthalpy / TimeStepZone / SecInHour; + DefrostLoad_Actual = DefrostCap_Actual - FrostMeltedKg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; - if (!WarmupFlag) { // avoid reverse dd test problems + if (!DataGlobals::WarmupFlag) { // avoid reverse dd test problems // keep running total of defrost energy above that needed to melt frost for use in evaluating // problems of excessive unmet loads RefrigCase(CaseID).DeltaDefrostEnergy = max(0.0, (DefrostEnergy - (FrostMeltedKg * IceMeltEnthalpy))); @@ -10091,7 +10070,7 @@ namespace RefrigeratedCase { //*** See if capacity meets load and manage accumulated stored energy *********************************** TotalLoad_Actual = SensibleLoadTotal + LatentLoad + DefrostLoad_Actual; - StoredEnergyRate = RefrigCase(CaseID).StoredEnergy / TimeStepZone / SecInHour; + StoredEnergyRate = RefrigCase(CaseID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; LoadRequested = TotalLoad_Actual + StoredEnergyRate; // prorate available cooling capacity for portion of time off due to drip down. @@ -10107,7 +10086,7 @@ namespace RefrigeratedCase { TotalCap_Actual = CapAvail; LatentCap_Actual = min(LatentLoad, CapAvail); // Latent load should never be > capavail, but just in case... SensibleCap_Actual = TotalCap_Actual - LatentCap_Actual; - if (!WarmupFlag) RefrigCase(CaseID).StoredEnergy += (TotalLoad_Actual - CapAvail) * TimeStepZoneSec; + if (!DataGlobals::WarmupFlag) RefrigCase(CaseID).StoredEnergy += (TotalLoad_Actual - CapAvail) * DataGlobals::TimeStepZoneSec; } // CapAvail vs Load requested // Reset DefrostLoad_Actual to zero for non-electric defrost types, for reporting purposes @@ -10134,56 +10113,56 @@ namespace RefrigeratedCase { // ReportRefrigeratedCase(CaseID) RefrigCase(CaseID).TotalCoolingLoad = TotalCap_Actual; - RefrigCase(CaseID).TotalCoolingEnergy = TotalCap_Actual * TimeStepZoneSec; + RefrigCase(CaseID).TotalCoolingEnergy = TotalCap_Actual * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensCoolingEnergyRate = SensibleCap_Actual; - RefrigCase(CaseID).SensCoolingEnergy = SensibleCap_Actual * TimeStepZoneSec; + RefrigCase(CaseID).SensCoolingEnergy = SensibleCap_Actual * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).LatCoolingEnergyRate = LatentCap_Actual; - RefrigCase(CaseID).LatCoolingEnergy = LatentCap_Actual * TimeStepZoneSec; + RefrigCase(CaseID).LatCoolingEnergy = LatentCap_Actual * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensZoneCreditRate = CaseSenCreditToZone; // both positive or negative // This rate can be positive or negative, split into separate output variables and always report positive value if (CaseSenCreditToZone <= 0.0) { RefrigCase(CaseID).SensZoneCreditCoolRate = -CaseSenCreditToZone; - RefrigCase(CaseID).SensZoneCreditCool = -CaseSenCreditToZone * TimeStepZoneSec; + RefrigCase(CaseID).SensZoneCreditCool = -CaseSenCreditToZone * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensZoneCreditHeatRate = 0.0; RefrigCase(CaseID).SensZoneCreditHeat = 0.0; } else { RefrigCase(CaseID).SensZoneCreditHeatRate = CaseSenCreditToZone; - RefrigCase(CaseID).SensZoneCreditHeat = CaseSenCreditToZone * TimeStepZoneSec; + RefrigCase(CaseID).SensZoneCreditHeat = CaseSenCreditToZone * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensZoneCreditCoolRate = 0.0; RefrigCase(CaseID).SensZoneCreditCool = 0.0; } // This rate should always be negative RefrigCase(CaseID).LatZoneCreditRate = CaseLatCreditToZone; - RefrigCase(CaseID).LatZoneCredit = CaseLatCreditToZone * TimeStepZoneSec; + RefrigCase(CaseID).LatZoneCredit = CaseLatCreditToZone * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensHVACCreditRate = CaseSenCreditToHVAC; // This rate can be positive or negative, split into separate output variables and always report positive value if (CaseSenCreditToHVAC <= 0.0) { RefrigCase(CaseID).SensHVACCreditCoolRate = -CaseSenCreditToHVAC; - RefrigCase(CaseID).SensHVACCreditCool = -CaseSenCreditToHVAC * TimeStepZoneSec; + RefrigCase(CaseID).SensHVACCreditCool = -CaseSenCreditToHVAC * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensHVACCreditHeatRate = 0.0; RefrigCase(CaseID).SensHVACCreditHeat = 0.0; } else { RefrigCase(CaseID).SensHVACCreditHeatRate = CaseSenCreditToHVAC; - RefrigCase(CaseID).SensHVACCreditHeat = CaseSenCreditToHVAC * TimeStepZoneSec; + RefrigCase(CaseID).SensHVACCreditHeat = CaseSenCreditToHVAC * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).SensHVACCreditCoolRate = 0.0; RefrigCase(CaseID).SensHVACCreditCool = 0.0; } // This rate should always be negative RefrigCase(CaseID).LatHVACCreditRate = CaseLatCreditToHVAC; - RefrigCase(CaseID).LatHVACCredit = CaseLatCreditToHVAC * TimeStepZoneSec; + RefrigCase(CaseID).LatHVACCredit = CaseLatCreditToHVAC * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).ElecFanPower = TotalFan; - RefrigCase(CaseID).ElecFanConsumption = TotalFan * TimeStepZoneSec; + RefrigCase(CaseID).ElecFanConsumption = TotalFan * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).ElecAntiSweatPower = TotalAntiSweat; - RefrigCase(CaseID).ElecAntiSweatConsumption = TotalAntiSweat * TimeStepZoneSec; + RefrigCase(CaseID).ElecAntiSweatConsumption = TotalAntiSweat * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).ElecLightingPower = TotalLightingLoad; - RefrigCase(CaseID).ElecLightingConsumption = TotalLightingLoad * TimeStepZoneSec; + RefrigCase(CaseID).ElecLightingConsumption = TotalLightingLoad * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).ElecDefrostPower = DefrostCap_Actual; - RefrigCase(CaseID).ElecDefrostConsumption = DefrostCap_Actual * TimeStepZoneSec; + RefrigCase(CaseID).ElecDefrostConsumption = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).DefEnergyCurveValue = DefrostRatio; RefrigCase(CaseID).LatEnergyCurveValue = LatentRatio; @@ -10195,8 +10174,8 @@ namespace RefrigeratedCase { // Collect extra sensible load above design for possible warning if that is determining factor in // excessively large stored energy if ((ZoneTempFactor * CaseCreditFraction) > 1.0) { - if (!WarmupFlag) { - DeltaWarmEnvEnergy = (SensibleLoadPrime - RefrigCase(CaseID).DesignSensCaseCredit) * TimeStepZoneSec; + if (!DataGlobals::WarmupFlag) { + DeltaWarmEnvEnergy = (SensibleLoadPrime - RefrigCase(CaseID).DesignSensCaseCredit) * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).WarmEnvEnergy += DeltaWarmEnvEnergy; } } @@ -10271,9 +10250,6 @@ namespace RefrigeratedCase { // Called from SimPlantEquip in PlantLoopEquipment , previously was called from Non-Zone Equipment Manager // Flow is requested and the actual available flow is set. The outlet temperature is calculated. - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - static std::string const RoutineName("SimRefrigCondenser"); static Real64 DeltaT(0.0); static Real64 InletTemp(0.0); @@ -10424,15 +10400,15 @@ namespace RefrigeratedCase { // Make demand request on first HVAC iteration // get cooling fluid properties - rho = GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Cp = GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); // first determine desired flow if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { if (SysType == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - OutletTemp = GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); + OutletTemp = ScheduleManager::GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); } else if (SysType == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - OutletTemp = GetCurrentScheduleValue(Condenser(Num).OutletTempSchedPtr); + OutletTemp = ScheduleManager::GetCurrentScheduleValue(Condenser(Num).OutletTempSchedPtr); } if (OutletTemp == InletTemp) { @@ -10476,7 +10452,7 @@ namespace RefrigeratedCase { VolFlowRate = MassFlowRate / rho; if (MassFlowRate > 0) { - OutletTemp = TotalCondenserHeat / (MassFlowRate * Cp) + Node(PlantInletNode).Temp; + OutletTemp = TotalCondenserHeat / (MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; } else { OutletTemp = InletTemp; if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { @@ -10538,8 +10514,6 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Updates the node variables with local variables. - using DataLoopNode::Node; - { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { @@ -10552,15 +10526,15 @@ namespace RefrigeratedCase { } // Pass all variables from inlet to outlet node - PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); // Node(OutletNode) = Node(InletNode) + PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); // DataLoopNode::Node(OutletNode) = DataLoopNode::Node(InletNode) // Set outlet node variables that are possibly changed { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - Node(OutletNode).Temp = RefrigRack(Num).OutletTemp; + DataLoopNode::Node(OutletNode).Temp = RefrigRack(Num).OutletTemp; } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - Node(OutletNode).Temp = Condenser(Num).OutletTemp; + DataLoopNode::Node(OutletNode).Temp = Condenser(Num).OutletTemp; } } } @@ -10611,7 +10585,7 @@ namespace RefrigeratedCase { static int CascadeLoadIndex(0); // Index to Cascade Condenser Load static int CascadeLoadID(0); // Absolute reference to Cascade Condenser static Real64 LoadFrac(1.0); // case load/design case load - static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone + static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps static Real64 CurrentHiStageLoads(0.0); // Current loads on high-stage compressor, exclusive of unmet loads from // prev time steps (two-stage systems only) @@ -10620,7 +10594,7 @@ namespace RefrigeratedCase { // relative to design temperature difference Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Cascade condenser assumes a constant approach delta T (Tcond - Tevap), not f(load) @@ -10745,7 +10719,7 @@ namespace RefrigeratedCase { // in the total secondary system loads. System(SysNum).PipeHeatLoad = 0.0; if (System(SysNum).SumUASuctionPiping > MySmallNumber) { - SuctionPipeZoneTemp = Node(System(SysNum).SuctionPipeZoneNodeNum).Temp; + SuctionPipeZoneTemp = DataLoopNode::Node(System(SysNum).SuctionPipeZoneNodeNum).Temp; System(SysNum).PipeHeatLoad = System(SysNum).SumUASuctionPiping * (SuctionPipeZoneTemp - System(SysNum).TEvapNeeded); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) @@ -10842,24 +10816,24 @@ namespace RefrigeratedCase { System(SysNum).TotalSystemLoad = System(SysNum).TotalCoolingLoad + System(SysNum).SumSecondaryLoopLoad + System(SysNum).SumMechSCLoad + System(SysNum).SumCascadeLoad; if (System(SysNum).TotalSystemLoad > 0.0) { - System(SysNum).CpSatVapEvap = GetSatSpecificHeatRefrig( + System(SysNum).CpSatVapEvap = FluidProperties::GetSatSpecificHeatRefrig( System(SysNum).RefrigerantName, System(SysNum).TEvapNeeded, 1.0, System(SysNum).RefIndex, RoutineName); System(SysNum).HCaseOut = - GetSatEnthalpyRefrig( + FluidProperties::GetSatEnthalpyRefrig( System(SysNum).RefrigerantName, System(SysNum).TEvapNeeded, 1.0, System(SysNum).RefIndex, RoutineName) + System(SysNum).CpSatVapEvap * CaseSuperheat; // Establish estimates to start solution loop { auto const SELECT_CASE_var(Condenser(System(SysNum).CondenserNum(1)).CondenserType); // only one condenser allowed now if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { - System(SysNum).TCondense = OutDryBulbTemp + 16.7; + System(SysNum).TCondense = DataEnvironment::OutDryBulbTemp + 16.7; // 16.7C is delta T at rating point for air-cooled condensers, just estimate, so ok for zone-located condensers } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { - System(SysNum).TCondense = OutDryBulbTemp + 15.0; + System(SysNum).TCondense = DataEnvironment::OutDryBulbTemp + 15.0; // 15C is delta T at rating point for evap-cooled condensers } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { // define starting estimate at temperature of water exiting condenser - System(SysNum).TCondense = Node(Condenser(System(SysNum).CondenserNum(1)).OutletNode).Temp; + System(SysNum).TCondense = DataLoopNode::Node(Condenser(System(SysNum).CondenserNum(1)).OutletNode).Temp; } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeCascade) { //?Don't need estimate for cascade condenser because it doesn't iterate? } @@ -10867,8 +10841,8 @@ namespace RefrigeratedCase { // Produce first time step estimates, assume no subcoolers System(SysNum).HSatLiqCond = - GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).CpSatLiqCond = GetSatSpecificHeatRefrig( + FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + System(SysNum).CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig( System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).HCaseIn = System(SysNum).HSatLiqCond - System(SysNum).CpSatLiqCond * Condenser(System(SysNum).CondenserNum(1)).RatedSubcool; @@ -10927,7 +10901,7 @@ namespace RefrigeratedCase { // Dealing with unmet load has to be done outside iterative loop for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step - if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && (!WarmupFlag)) { + if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && (!DataGlobals::WarmupFlag)) { CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet if (System(SysNum).NumStages == 2) { CurrentHiStageLoads = CurrentLoads + System(SysNum).TotCompPower; @@ -10941,9 +10915,9 @@ namespace RefrigeratedCase { // perhaps future interest in reporting percent of installed capacity used(or number of compressors) ? // If the system compressors were unable to meet the current loads, save energy to be met in succeeding time step // Note the unmet energy is turned into a rate and applied to the system load at the start of calccompressor - System(SysNum).UnmetEnergy += (CurrentLoads - System(SysNum).TotCompCapacity) * TimeStepZoneSec; + System(SysNum).UnmetEnergy += (CurrentLoads - System(SysNum).TotCompCapacity) * DataGlobals::TimeStepZoneSec; if (System(SysNum).NumStages == 2) { - System(SysNum).UnmetHiStageEnergy += (CurrentHiStageLoads - System(SysNum).TotHiStageCompCapacity) * TimeStepZoneSec; + System(SysNum).UnmetHiStageEnergy += (CurrentHiStageLoads - System(SysNum).TotHiStageCompCapacity) * DataGlobals::TimeStepZoneSec; } if (System(SysNum).UnmetEnergy > MyLargeNumber) { System(SysNum).UnmetEnergy = MyLargeNumber; @@ -10982,10 +10956,10 @@ namespace RefrigeratedCase { // Report variables System(SysNum).TotTransferLoad = System(SysNum).SumMechSCLoad - System(SysNum).SumMechSCBenefit + System(SysNum).SumSecondaryLoopLoad + System(SysNum).SumCascadeLoad; - System(SysNum).TotTransferEnergy = System(SysNum).TotTransferLoad * LocalTimeStep * SecInHour; - System(SysNum).PipeHeatEnergy = System(SysNum).PipeHeatLoad * LocalTimeStep * SecInHour; - System(SysNum).TotalCoolingEnergy = System(SysNum).TotalCoolingLoad * LocalTimeStep * SecInHour; - } //(((.NOT. UseSysTimeStep).AND.(.NOT. System(SysNum)%CoilFlag)).OR.((UseSysTimeStep).AND.(System(SysNum)%CoilFlag))).and.not WarmupFlag + System(SysNum).TotTransferEnergy = System(SysNum).TotTransferLoad * LocalTimeStep * DataGlobals::SecInHour; + System(SysNum).PipeHeatEnergy = System(SysNum).PipeHeatLoad * LocalTimeStep * DataGlobals::SecInHour; + System(SysNum).TotalCoolingEnergy = System(SysNum).TotalCoolingLoad * LocalTimeStep * DataGlobals::SecInHour; + } //(((.NOT. UseSysTimeStep).AND.(.NOT. System(SysNum)%CoilFlag)).OR.((UseSysTimeStep).AND.(System(SysNum)%CoilFlag))).and.not DataGlobals::WarmupFlag } // SysNum = 1,NumRefrigSystems // Update for sending to zone equipment manager. (note report variables are summed elsewhere) @@ -10994,11 +10968,11 @@ namespace RefrigeratedCase { // Note that case credit is negative for cooling, thus subtract positive value calculated for coil // Note this is done whether or not the coils are derated. if (UseSysTimeStep) { - for (ZoneNum = 1; ZoneNum <= NumOfZones; ++ZoneNum) { + for (ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { for (CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { if (WarehouseCoil(CoilID).ZoneNum != ZoneNum) continue; CoilSysCredit(ZoneNum).SenCreditToZoneRate -= WarehouseCoil(CoilID).SensCreditRate; - CoilSysCredit(ZoneNum).SenCreditToZoneEnergy = CoilSysCredit(ZoneNum).SenCreditToZoneRate * LocalTimeStep * SecInHour; + CoilSysCredit(ZoneNum).SenCreditToZoneEnergy = CoilSysCredit(ZoneNum).SenCreditToZoneRate * LocalTimeStep * DataGlobals::SecInHour; CoilSysCredit(ZoneNum).LatKgPerS_ToZoneRate -= WarehouseCoil(CoilID).LatKgPerS_ToZone; CoilSysCredit(ZoneNum).LatCreditToZoneRate -= WarehouseCoil(CoilID).LatCreditRate; CoilSysCredit(ZoneNum).LatCreditToZoneEnergy -= WarehouseCoil(CoilID).LatCreditEnergy; @@ -11040,11 +11014,11 @@ namespace RefrigeratedCase { static int SuctionPipeActualZoneNum(0); // Index to zone exchanging heat with suction pipes static int WalkInID(0); // Absolute reference to WalkIn static int WalkInIndex(0); // Index to WalkIn - static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone + static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Do transcritical CO2 refrigeration system loop outside of iterative solution to initialize time step and @@ -11111,7 +11085,7 @@ namespace RefrigeratedCase { // gas cooler and compressor loads. TransSystem(SysNum).PipeHeatLoadMT = 0.0; if (TransSystem(SysNum).SumUASuctionPipingMT > MySmallNumber) { - SuctionPipeZoneTemp = Node(TransSystem(SysNum).SuctionPipeZoneNodeNumMT).Temp; + SuctionPipeZoneTemp = DataLoopNode::Node(TransSystem(SysNum).SuctionPipeZoneNodeNumMT).Temp; TransSystem(SysNum).PipeHeatLoadMT = TransSystem(SysNum).SumUASuctionPipingMT * (SuctionPipeZoneTemp - TransSystem(SysNum).TEvapNeededMT); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted @@ -11125,7 +11099,7 @@ namespace RefrigeratedCase { TransSystem(SysNum).PipeHeatLoadLT = 0.0; if (TransSystem(SysNum).SumUASuctionPipingLT > MySmallNumber) { - SuctionPipeZoneTemp = Node(TransSystem(SysNum).SuctionPipeZoneNodeNumLT).Temp; + SuctionPipeZoneTemp = DataLoopNode::Node(TransSystem(SysNum).SuctionPipeZoneNodeNumLT).Temp; TransSystem(SysNum).PipeHeatLoadLT = TransSystem(SysNum).SumUASuctionPipingLT * (SuctionPipeZoneTemp - TransSystem(SysNum).TEvapNeededLT); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted @@ -11159,29 +11133,29 @@ namespace RefrigeratedCase { TransSystem(SysNum).TotalSystemLoad = TransSystem(SysNum).TotalSystemLoadLT + TransSystem(SysNum).TotalSystemLoadMT; if (TransSystem(SysNum).TotalSystemLoad > 0.0) { if (TransSystem(SysNum).TransSysType == 2) { - TransSystem(SysNum).CpSatVapEvapLT = GetSatSpecificHeatRefrig( + TransSystem(SysNum).CpSatVapEvapLT = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededLT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); - TransSystem(SysNum).HCaseOutLT = GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + TransSystem(SysNum).HCaseOutLT = FluidProperties::GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededLT, 1.0, TransSystem(SysNum).RefIndex, RoutineName) + TransSystem(SysNum).CpSatVapEvapLT * TransCaseSuperheat; } - TransSystem(SysNum).CpSatVapEvapMT = GetSatSpecificHeatRefrig( + TransSystem(SysNum).CpSatVapEvapMT = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); TransSystem(SysNum).HCaseOutMT = - GetSatEnthalpyRefrig( + FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 1.0, TransSystem(SysNum).RefIndex, RoutineName) + TransSystem(SysNum).CpSatVapEvapMT * TransCaseSuperheat; // Produce first time step estimates. // Assume no subcoolers and neglect flow through bypass. - TransSystem(SysNum).TReceiver = GetSatTemperatureRefrig( + TransSystem(SysNum).TReceiver = FluidProperties::GetSatTemperatureRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).PReceiver, TransSystem(SysNum).RefIndex, RoutineName); - TransSystem(SysNum).HSatLiqReceiver = GetSatEnthalpyRefrig( + TransSystem(SysNum).HSatLiqReceiver = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 0.0, TransSystem(SysNum).RefIndex, RoutineName); - TransSystem(SysNum).CpSatLiqReceiver = GetSatSpecificHeatRefrig( + TransSystem(SysNum).CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 0.0, TransSystem(SysNum).RefIndex, RoutineName); TransSystem(SysNum).HCaseInMT = TransSystem(SysNum).HSatLiqReceiver; TransSystem(SysNum).HCaseInLT = TransSystem(SysNum).HSatLiqReceiver; @@ -11209,13 +11183,13 @@ namespace RefrigeratedCase { // Unmet load is done outside iterative loop for (SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step - if ((!UseSysTimeStep) && (!WarmupFlag)) { + if ((!UseSysTimeStep) && (!DataGlobals::WarmupFlag)) { CurrentLoads = TransSystem(SysNum).TotalSystemLoad; // Meeting current and possibly some portion of the previously unmet energy // perhaps future interest in reporting percent of installed capacity used(or number of compressors) ? // If the system compressors were unable to meet the current loads, save energy to be met in succeeding time step // Note the unmet energy is turned into a rate and applied to the system load at the start of calccompressor - TransSystem(SysNum).UnmetEnergy += (CurrentLoads - TransSystem(SysNum).TotCompCapacity) * TimeStepZoneSec; + TransSystem(SysNum).UnmetEnergy += (CurrentLoads - TransSystem(SysNum).TotCompCapacity) * DataGlobals::TimeStepZoneSec; if (TransSystem(SysNum).UnmetEnergy > MyLargeNumber) { TransSystem(SysNum).UnmetEnergy = MyLargeNumber; @@ -11238,10 +11212,10 @@ namespace RefrigeratedCase { // Report variables TransSystem(SysNum).PipeHeatEnergy = - (TransSystem(SysNum).PipeHeatLoadMT + TransSystem(SysNum).PipeHeatLoadLT) * LocalTimeStep * SecInHour; + (TransSystem(SysNum).PipeHeatLoadMT + TransSystem(SysNum).PipeHeatLoadLT) * LocalTimeStep * DataGlobals::SecInHour; TransSystem(SysNum).TotalCoolingEnergy = - (TransSystem(SysNum).TotalCoolingLoadMT + TransSystem(SysNum).TotalCoolingLoadMT) * LocalTimeStep * SecInHour; - } //(.NOT. UseSysTimeStep).AND. (.not. WarmupFlag) + (TransSystem(SysNum).TotalCoolingLoadMT + TransSystem(SysNum).TotalCoolingLoadMT) * LocalTimeStep * DataGlobals::SecInHour; + } //(.NOT. UseSysTimeStep).AND. (.not. DataGlobals::WarmupFlag) } // SysNum = 1,NumTransRefrigSystems // Update for sending to zone equipment manager. (note report variables are summed elsewhere) @@ -11423,8 +11397,6 @@ namespace RefrigeratedCase { // Lawrence Berkeley Laboratory and Resource Dynamics, Improving Fan Systrem Performance, // A Sourcebook for Industry, DOE/GO-102003-1294, April 2003 - using DataWater::WaterStorage; - Real64 const BleedRateConstant(5.0E-10); // water purge rate for evaporative // condensers (m3/W-s) equal to 3 GPM per 100 tons (BAC Engineering Reference) @@ -11456,7 +11428,7 @@ namespace RefrigeratedCase { Real64 HRCFFullFlow; // Heat Rejection Capacity Factor at full air flow Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] - Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone + Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone Real64 OutWbTemp(0.0); // Outdoor wet bulb temp at condenser air inlet node [C] Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenseer (m3/s) @@ -11475,7 +11447,7 @@ namespace RefrigeratedCase { Real64 TotalLoadFromSystems; // total heat rejection load from all systems served by this condenser [W] Real64 CurMaxCapacity; // current maximum condenser capacity at delta T present for minimum condensing temperature [W] - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Initialize this condenser for this time step @@ -11530,7 +11502,7 @@ namespace RefrigeratedCase { if (TotalCondenserHeat < 0.0) { TotalCondenserHeat = 0.0; - if (!WarmupFlag) { + if (!DataGlobals::WarmupFlag) { ShowRecurringWarningErrorAtEnd("Refrigeration:System: " + System(SysNum).Name + ":heat reclaimed(defrost,other purposes) >current condenser load. ", CondCreditWarnIndex1); @@ -11557,8 +11529,8 @@ namespace RefrigeratedCase { if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { // Obtain water-cooled condenser inlet/outlet temps InletNode = condenser.InletNode; - condenser.InletTemp = Node(InletNode).Temp; - TCondCalc = Node(InletNode).Temp + condenser.RatedApproachT; + condenser.InletTemp = DataLoopNode::Node(InletNode).Temp; + TCondCalc = DataLoopNode::Node(InletNode).Temp + condenser.RatedApproachT; if ((condenser.InletTemp < condenser.InletTempMin) || (TCondCalc < System(SysNum).TCondenseMin)) { System(SysNum).TCondense = System(SysNum).TCondenseMin; // condenser.LowTempWarn += 1; @@ -11585,13 +11557,13 @@ namespace RefrigeratedCase { // But evaporative condensers cannot. // Provides effective condensing temperature for air-cooled condenser (or evap if evap is scheduled off) if (condenser.InletAirNodeNum != 0) { - OutDbTemp = Node(condenser.InletAirNodeNum).Temp; - BPress = Node(condenser.InletAirNodeNum).Press; - HumRatIn = Node(condenser.InletAirNodeNum).HumRat; + OutDbTemp = DataLoopNode::Node(condenser.InletAirNodeNum).Temp; + BPress = DataLoopNode::Node(condenser.InletAirNodeNum).Press; + HumRatIn = DataLoopNode::Node(condenser.InletAirNodeNum).HumRat; } else { - OutDbTemp = OutDryBulbTemp; - BPress = OutBaroPress; - HumRatIn = OutHumRat; + OutDbTemp = DataEnvironment::OutDryBulbTemp; + BPress = DataEnvironment::OutBaroPress; + HumRatIn = DataEnvironment::OutHumRat; } AirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn); AirDensityDry = Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, 0.0); @@ -11607,7 +11579,7 @@ namespace RefrigeratedCase { // Check schedule to determine evap condenser availability // IF schedule exists, evap condenser can be scheduled OFF if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) && (condenser.EvapSchedPtr > 0) && - (GetCurrentScheduleValue(condenser.EvapSchedPtr) == 0)) + (ScheduleManager::GetCurrentScheduleValue(condenser.EvapSchedPtr) == 0)) EvapAvail = false; // Calculate condensing temperatures for air-cooled and evap-cooled @@ -11618,7 +11590,7 @@ namespace RefrigeratedCase { // Apply ARI490 elevation correction factor here for evap condenser, then apply hrcf limits if (CapFac > 0.0) { HRCF = condenser.EvapElevFact / CapFac; - // Condenser(CondNum)%EvapElevFact=1.0d0-3.074D-5*Elevation + // Condenser(CondNum)%EvapElevFact=1.0d0-3.074D-5*DataEnvironment::Elevation } else { HRCF = MyLargeNumber; } @@ -11762,15 +11734,15 @@ namespace RefrigeratedCase { } // Condenser type = water, (evap or air), or cascade condenser.ActualFanPower = ActualFanPower; - condenser.FanElecEnergy = ActualFanPower * LocalTimeStep * SecInHour; + condenser.FanElecEnergy = ActualFanPower * LocalTimeStep * DataGlobals::SecInHour; condenser.EvapWaterConsumpRate = TotalEvapWaterUseRate; - condenser.EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * SecInHour; + condenser.EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * DataGlobals::SecInHour; condenser.ActualEvapPumpPower = TotalCondenserPumpPower; - condenser.EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * SecInHour; + condenser.EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * DataGlobals::SecInHour; condenser.BasinHeaterPower = TotalBasinHeatPower; - condenser.BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * SecInHour; + condenser.BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * DataGlobals::SecInHour; condenser.CondLoad = TotalCondenserHeat; - condenser.CondEnergy = TotalCondenserHeat * LocalTimeStep * SecInHour; + condenser.CondEnergy = TotalCondenserHeat * LocalTimeStep * DataGlobals::SecInHour; condenser.CondCreditWarnIndex1 = CondCreditWarnIndex1; condenser.CondCreditWarnIndex2 = CondCreditWarnIndex2; condenser.CondCreditWarnIndex3 = CondCreditWarnIndex3; @@ -11778,15 +11750,15 @@ namespace RefrigeratedCase { condenser.CondCreditWarnIndex5 = CondCreditWarnIndex5; condenser.CondCreditWarnIndex6 = CondCreditWarnIndex6; condenser.CondCreditWarnIndex7 = CondCreditWarnIndex7; - condenser.ExternalEnergyRecovered = condenser.ExternalHeatRecoveredLoad * LocalTimeStep * SecInHour; - condenser.InternalEnergyRecovered = condenser.InternalHeatRecoveredLoad * LocalTimeStep * SecInHour; - condenser.TotalHeatRecoveredEnergy = condenser.TotalHeatRecoveredLoad * LocalTimeStep * SecInHour; + condenser.ExternalEnergyRecovered = condenser.ExternalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; + condenser.InternalEnergyRecovered = condenser.InternalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; + condenser.TotalHeatRecoveredEnergy = condenser.TotalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; System(SysNum).NetHeatRejectLoad = TotalCondenserHeat * TotalLoadFromThisSystem / TotalLoadFromSystems; - System(SysNum).NetHeatRejectEnergy = System(SysNum).NetHeatRejectLoad * LocalTimeStep * SecInHour; + System(SysNum).NetHeatRejectEnergy = System(SysNum).NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; // set water system demand request (if needed) if (condenser.EvapWaterSupplyMode == WaterSupplyFromTank) { - WaterStorage(condenser.EvapWaterSupTankID).VdotRequestDemand(condenser.EvapWaterTankDemandARRID) = condenser.EvapWaterConsumpRate; + DataWater::WaterStorage(condenser.EvapWaterSupTankID).VdotRequestDemand(condenser.EvapWaterTankDemandARRID) = condenser.EvapWaterConsumpRate; } } @@ -11838,7 +11810,7 @@ namespace RefrigeratedCase { Real64 CapFac; // Capacity factor Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio Real64 FanPowerRatio; // Calculated fan power ratio - Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or TimeStepZone + Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone Real64 OutDbTemp; // Outdoor dry bulb temperature at gas cooler air inlet node [C] Real64 RatedFanPower; // Rated fan power for this gas cooler [W] Real64 TotalCondDefCredfromSysID; // Gas cooler defrost credit for single system [W] @@ -11849,7 +11821,7 @@ namespace RefrigeratedCase { Real64 TotalLoadFromSystems; // Total heat rejection load from all systems served by this condenser [W] Real64 TotalLoadFromThisSystem(0.0); // Total heat rejection load from the detailed system identified in subroutine call [W] - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; //! Initialize this gas cooler for this time step @@ -11881,7 +11853,7 @@ namespace RefrigeratedCase { if (TotalGasCoolerHeat < 0.0) { TotalGasCoolerHeat = 0.0; - if (!WarmupFlag) + if (!DataGlobals::WarmupFlag) ShowRecurringWarningErrorAtEnd("Refrigeration:TranscriticalSystem: " + TransSystem(SysNum).Name + ":heat reclaimed (defrost,other purposes) is greater than current gas cooler load. ASHRAE rule of " "thumb: <= 25% of the load on a system should be in defrost at the same time. Consider " @@ -11894,9 +11866,9 @@ namespace RefrigeratedCase { // See whether gas cooler is at ground level or if other air conditions (ie node) have been specified. // Note that air-cooled gas coolers can draw air from, and reject heat to, a conditioned zone. if (GasCooler(GasCoolerID).InletAirNodeNum != 0) { - OutDbTemp = Node(GasCooler(GasCoolerID).InletAirNodeNum).Temp; + OutDbTemp = DataLoopNode::Node(GasCooler(GasCoolerID).InletAirNodeNum).Temp; } else { - OutDbTemp = OutDryBulbTemp; + OutDbTemp = DataEnvironment::OutDryBulbTemp; } // Determine gas cooler outlet temperature and pressure // Transcritical: Gas cooler outlet temperature based on ambient temperature and approach temperature. @@ -11905,11 +11877,11 @@ namespace RefrigeratedCase { // transition temperature. if (OutDbTemp > GasCooler(GasCoolerID).TransitionTemperature) { // Gas cooler in transcritical operation GasCooler(GasCoolerID).TGasCoolerOut = OutDbTemp + GasCooler(GasCoolerID).GasCoolerApproachT; - GasCooler(GasCoolerID).PGasCoolerOut = 1.0e5 * (2.3083 * OutDryBulbTemp + 11.9); + GasCooler(GasCoolerID).PGasCoolerOut = 1.0e5 * (2.3083 * DataEnvironment::OutDryBulbTemp + 11.9); if (GasCooler(GasCoolerID).PGasCoolerOut < 7.5e6) { // Ensure gas cooler pressure is at least 7.5 MPa for transcritical operation GasCooler(GasCoolerID).PGasCoolerOut = 7.5e6; } - GasCooler(GasCoolerID).HGasCoolerOut = GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, GasCooler(GasCoolerID).PGasCoolerOut, TransSystem(SysNum).RefIndex, @@ -11919,24 +11891,24 @@ namespace RefrigeratedCase { GasCooler(GasCoolerID).TGasCoolerOut = OutDbTemp + GasCooler(GasCoolerID).SubcriticalTempDiff; if (GasCooler(GasCoolerID).TGasCoolerOut > 30.978) { // Gas temperature should be less than critical temperature GasCooler(GasCoolerID).PGasCoolerOut = 7.2e6; // Fix the pressure to be subcritical - GasCooler(GasCoolerID).TGasCoolerOut = GetSatTemperatureRefrig( + GasCooler(GasCoolerID).TGasCoolerOut = FluidProperties::GetSatTemperatureRefrig( TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).PGasCoolerOut, TransSystem(SysNum).RefIndex, RoutineName); } else if (GasCooler(GasCoolerID).TGasCoolerOut > GasCooler(GasCoolerID).MinCondTemp) { // Allow condensing temperature to float above the minimum - GasCooler(GasCoolerID).PGasCoolerOut = GetSatPressureRefrig( + GasCooler(GasCoolerID).PGasCoolerOut = FluidProperties::GetSatPressureRefrig( TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, TransSystem(SysNum).RefIndex, RoutineName); } else { // Don't allow condensing temperature to drop below minimum GasCooler(GasCoolerID).TGasCoolerOut = GasCooler(GasCoolerID).MinCondTemp; - GasCooler(GasCoolerID).PGasCoolerOut = GetSatPressureRefrig( + GasCooler(GasCoolerID).PGasCoolerOut = FluidProperties::GetSatPressureRefrig( TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, TransSystem(SysNum).RefIndex, RoutineName); } - GasCooler(GasCoolerID).HGasCoolerOut = GetSatEnthalpyRefrig( + GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, TransSystem(SysNum).RefIndex, RoutineName); GasCooler(GasCoolerID).TransOpFlag = false; } // (OutDbTemp > TransitionTemperature) if (GasCooler(GasCoolerID).TGasCoolerOut < 30.978) { - GasCooler(GasCoolerID).CpGasCoolerOut = GetSatSpecificHeatRefrig( + GasCooler(GasCoolerID).CpGasCoolerOut = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, TransSystem(SysNum).RefIndex, RoutineName); } else { GasCooler(GasCoolerID).CpGasCoolerOut = 0.0; @@ -11965,14 +11937,14 @@ namespace RefrigeratedCase { } // fan speed control type GasCooler(GasCoolerID).ActualFanPower = ActualFanPower; - GasCooler(GasCoolerID).FanElecEnergy = ActualFanPower * LocalTimeStep * SecInHour; + GasCooler(GasCoolerID).FanElecEnergy = ActualFanPower * LocalTimeStep * DataGlobals::SecInHour; GasCooler(GasCoolerID).GasCoolerLoad = TotalGasCoolerHeat; - GasCooler(GasCoolerID).GasCoolerEnergy = TotalGasCoolerHeat * LocalTimeStep * SecInHour; + GasCooler(GasCoolerID).GasCoolerEnergy = TotalGasCoolerHeat * LocalTimeStep * DataGlobals::SecInHour; GasCooler(GasCoolerID).GasCoolerCreditWarnIndex = GasCoolerCreditWarnIndex; - GasCooler(GasCoolerID).InternalEnergyRecovered = GasCooler(GasCoolerID).InternalHeatRecoveredLoad * LocalTimeStep * SecInHour; - GasCooler(GasCoolerID).TotalHeatRecoveredEnergy = GasCooler(GasCoolerID).TotalHeatRecoveredLoad * LocalTimeStep * SecInHour; + GasCooler(GasCoolerID).InternalEnergyRecovered = GasCooler(GasCoolerID).InternalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; + GasCooler(GasCoolerID).TotalHeatRecoveredEnergy = GasCooler(GasCoolerID).TotalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; TransSystem(SysNum).NetHeatRejectLoad = TotalGasCoolerHeat * TotalLoadFromThisSystem / TotalLoadFromSystems; - TransSystem(SysNum).NetHeatRejectEnergy = TransSystem(SysNum).NetHeatRejectLoad * LocalTimeStep * SecInHour; + TransSystem(SysNum).NetHeatRejectEnergy = TransSystem(SysNum).NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; } //*************************************************************************************************** @@ -12023,7 +11995,7 @@ namespace RefrigeratedCase { Real64 HSatVapCondense; // Enthalpy of saturated vapor at T condense, J/kg Real64 HsatVaporforTevapneeded; // Enthalpy saturated vapor at temperature needed at evaporator Real64 LFLastComp; // Load factor for last compressor dispatched - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MassCorrection; // Mass flow at existing subcool/superheat over cap at rated conditions Real64 NeededCapacity; // Sum of case loads and mech subcooler loads on suction group Real64 PSuction; // Suction Pressure @@ -12039,9 +12011,9 @@ namespace RefrigeratedCase { Real64 HHiStageCompIn; // Enthalpy at inlet of high-stage compressor (J/kg) Real64 HCaseInRated_base(0.0), HCompInRated_base(0.0); // Autodesk:Tuned Intermediate values for performance tuning - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; - Real64 const LocalTimeStepSec(LocalTimeStep * SecInHour); + Real64 const LocalTimeStepSec(LocalTimeStep * DataGlobals::SecInHour); auto &System_SysNum(System(SysNum)); auto const NumStages(System_SysNum.NumStages); @@ -12097,9 +12069,9 @@ namespace RefrigeratedCase { NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet TsatforPdisch = TCondense + DelTDischPipes; // need (Psat of (Tcond + delT corresponding to delP disch Pipes)) TsatforPsuct = TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) - HsatVaporforTevapneeded = GetSatEnthalpyRefrig(RefrigerantName, TEvapNeeded, 1.0, RefIndex, RoutineName); - HSatLiqCond = GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); - CpSatLiqCond = GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); + HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TEvapNeeded, 1.0, RefIndex, RoutineName); + HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); + CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); // HCaseIn is a function of the condenser rated subcooling, not the compressor rated subcooling // TCompIn needs to include case superheat as well as Temp change from lshx subcoolers // Calculate both here unless set previously by subcooler subroutine @@ -12114,26 +12086,26 @@ namespace RefrigeratedCase { System_SysNum.HCompIn = System_SysNum.HCaseOut + System_SysNum.CpSatVapEvap * (System_SysNum.TCompIn - (TEvapNeeded + CaseSuperheat)); } // whether or not subcooler routine used - PSuction = GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); + PSuction = FluidProperties::GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); NumComps = System_SysNum.NumCompressors; } else { // Low-stage side of two-stage system - PCond = GetSatPressureRefrig(RefrigerantName, TCondense, RefIndex, RoutineName); - PEvap = GetSatPressureRefrig(RefrigerantName, TEvapNeeded, RefIndex, RoutineName); + PCond = FluidProperties::GetSatPressureRefrig(RefrigerantName, TCondense, RefIndex, RoutineName); + PEvap = FluidProperties::GetSatPressureRefrig(RefrigerantName, TEvapNeeded, RefIndex, RoutineName); System_SysNum.PIntercooler = std::sqrt(PCond * PEvap); - TIntercooler = GetSatTemperatureRefrig(RefrigerantName, System_SysNum.PIntercooler, RefIndex, RoutineName); + TIntercooler = FluidProperties::GetSatTemperatureRefrig(RefrigerantName, System_SysNum.PIntercooler, RefIndex, RoutineName); NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet TsatforPdisch = TIntercooler + DelTDischPipes; // need (Psat of (Tinter + delT corresponding to delP disch Pipes)) TsatforPsuct = TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) - HsatVaporforTevapneeded = GetSatEnthalpyRefrig(RefrigerantName, TEvapNeeded, 1.0, RefIndex, RoutineName); - HSatLiqCond = GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); - CpSatLiqCond = GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); + HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TEvapNeeded, 1.0, RefIndex, RoutineName); + HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); + CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); // HCaseIn is a function of the condenser rated subcooling, not the compressor rated subcooling // TCompIn needs to include case superheat as well as Temp change from lshx subcoolers // Calculate both here unless set previously by subcooler subroutine // HCaseOut corresponds to (tevapneeded + case superheat) if (System_SysNum.NumSubcoolers == 0) { // No subcooler on this system if (System_SysNum.IntercoolerType == 1) { // Flash Intercooler - System_SysNum.HCaseIn = GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 0.0, RefIndex, RoutineName); + System_SysNum.HCaseIn = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 0.0, RefIndex, RoutineName); System_SysNum.TLiqInActual = TIntercooler; } else if (System_SysNum.IntercoolerType == 2) { // Shell-and-Coil Intercooler System_SysNum.TLiqInActual = @@ -12147,28 +12119,28 @@ namespace RefrigeratedCase { System_SysNum.HCompIn = System_SysNum.HCaseOut + System_SysNum.CpSatVapEvap * (System_SysNum.TCompIn - (TEvapNeeded + CaseSuperheat)); } // whether or not subcooler routine used - PSuction = GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); + PSuction = FluidProperties::GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); NumComps = System_SysNum.NumCompressors; } // NumStages } else { // Two-stage system, high-stage side NeededCapacity = NeededCapacity_base + System_SysNum.TotCompPower; TsatforPdisch = TCondense + DelTDischPipes; TsatforPsuct = TIntercooler; - HsatVaporforTevapneeded = GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); - // HSatLiqCond = GetSatEnthalpyRefrig( RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); + HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); + // HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig( RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); ////Autodesk:Tuned These don't change for 2nd stage - // CpSatLiqCond = GetSatSpecificHeatRefrig( RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); + // CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig( RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); ////Autodesk:Tuned These don't change for 2nd stage System_SysNum.HCaseIn = HSatLiqCond - CpSatLiqCond * Condenser1.RatedSubcool; System_SysNum.TCompIn = TIntercooler; // System(SysNum)%TLiqInActual = System(SysNum)%TCondense-Condenser(System(SysNum)%CondenserNum(1))%RatedSubcool System_SysNum.HCompIn = HsatVaporforTevapneeded; - PSuction = GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); + PSuction = FluidProperties::GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); NumComps = System_SysNum.NumHiStageCompressors; } // StageIndex // dispatch compressors to meet load, note they were listed in compressor list in dispatch order - DensityActual = GetSupHeatDensityRefrig(RefrigerantName, + DensityActual = FluidProperties::GetSupHeatDensityRefrig(RefrigerantName, System_SysNum.TCompIn, PSuction, RefIndex, @@ -12176,9 +12148,9 @@ namespace RefrigeratedCase { TotalEnthalpyChangeActual = System_SysNum.HCompIn - System_SysNum.HCaseIn; // Autodesk:Tuned Hoisted out of CompIndex loop if (NumStages == 2) { // Autodesk:Tuned Hoisted out of CompIndex loop if (StageIndex == 1) { - HCaseInRated_base = GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 0.0, RefIndex, RoutineName); + HCaseInRated_base = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 0.0, RefIndex, RoutineName); } else if (StageIndex == 2) { - HCompInRated_base = GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); + HCompInRated_base = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); } } for (CompIndex = 1; CompIndex <= NumComps; ++CompIndex) { @@ -12238,7 +12210,7 @@ namespace RefrigeratedCase { } // Compressor SuperheatRatingType CaseEnthalpyChangeRated = HCompInRated - HCaseInRated; - DensityRated = GetSupHeatDensityRefrig(RefrigerantName, TempInRated, PSuction, RefIndex, RoutineName); + DensityRated = FluidProperties::GetSupHeatDensityRefrig(RefrigerantName, TempInRated, PSuction, RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling MassCorrection = DensityActual / DensityRated; @@ -12296,15 +12268,15 @@ namespace RefrigeratedCase { // Calculate enthalpy at compressor discharge if (NumStages == 1) { // Single-stage or low-stage compressors System_SysNum.HCompOut = System_SysNum.HCompIn + System_SysNum.TotCompPower / System_SysNum.RefMassFlowComps; - // error found 9/19/2011, was System(SysNum)%TotCompPower*LocalTimeStep*SecInHour/System(SysNum)%RefMassFlowComps + // error found 9/19/2011, was System(SysNum)%TotCompPower*LocalTimeStep*DataGlobals::SecInHour/System(SysNum)%RefMassFlowComps } else { // High-stage compressors (only for two-stage systems) - HHiStageCompIn = GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); + HHiStageCompIn = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); System_SysNum.HCompOut = HHiStageCompIn + System_SysNum.TotHiStageCompPower / System_SysNum.RefMassFlowHiStageComps; } // Calculate superheat energy available for desuperheaters - HSatVapCondense = GetSatEnthalpyRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); - CpSatVapCondense = GetSatSpecificHeatRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); + HSatVapCondense = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); + CpSatVapCondense = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); if (NumStages == 1) { // Single-stage systems DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowComps * (System_SysNum.HCompOut - HSatVapCondense); } else { // Two-stage systems @@ -12401,7 +12373,7 @@ namespace RefrigeratedCase { Real64 HsatVaporforTevapneededMT; // Enthlapy of saturated vapor at MT evaporator (transcritical cycle), J/kg Real64 HsatVaporforTevapneededLT; // Enthlapy of saturated vapor at LT evaporator (transcritical cycle), J/kg Real64 LFLastComp; // Load factor for last compressor dispatched - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MassCorrectionLT; // Mass flow at existing subcool/superheat over cap at rated conditions for LT loads Real64 MassCorrectionMT; // Mass flow at existing subcool/superheat over cap at rated conditions for MT loads Real64 NeededCapacityLT; // Sum of LT case loads and mech subcooler loads (transcritical cycle), W @@ -12425,7 +12397,7 @@ namespace RefrigeratedCase { Real64 Xl; // Initial lower guess for iterative search Real64 Xnew; // New guess for iterative search - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; GasCoolerID = TransSystem(SysNum).GasCoolerNum(1); @@ -12434,17 +12406,17 @@ namespace RefrigeratedCase { AccumLoadLT = 0.0; NeededCapacityLT = 0.0; if (TransSystem(SysNum).TransSysType == 2) { - AccumLoadLT = max(0.0, (TransSystem(SysNum).UnmetEnergyLT / LocalTimeStep / SecInHour)); + AccumLoadLT = max(0.0, (TransSystem(SysNum).UnmetEnergyLT / LocalTimeStep / DataGlobals::SecInHour)); NeededCapacityLT = TransSystem(SysNum).TotalSystemLoadLT + AccumLoadLT + TransSystem(SysNum).PipeHeatLoadLT; } // (TransSystem(SysNum)%TransSysType == 2) - AccumLoadMT = max(0.0, (TransSystem(SysNum).UnmetEnergyMT / LocalTimeStep / SecInHour)); + AccumLoadMT = max(0.0, (TransSystem(SysNum).UnmetEnergyMT / LocalTimeStep / DataGlobals::SecInHour)); NeededCapacityMT = TransSystem(SysNum).TotalSystemLoadMT + AccumLoadMT + TransSystem(SysNum).PipeHeatLoadMT; // Determine refrigerant properties at receiver - TransSystem(SysNum).CpSatLiqReceiver = GetSatSpecificHeatRefrig( + TransSystem(SysNum).CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 0.0, TransSystem(SysNum).RefIndex, RoutineName); HReceiverBypass = - GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 1.0, TransSystem(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 1.0, TransSystem(SysNum).RefIndex, RoutineName); // Determine refrigerant properties at low temperature (LT) loads (if present) // Dispatch low pressure (LP) compressors as necessary @@ -12458,12 +12430,12 @@ namespace RefrigeratedCase { TransSystem(SysNum).HCaseOutLT + TransSystem(SysNum).PipeHeatLoadLT / TransSystem(SysNum).RefMassFlowtoLTLoads; TsatforPsucLT = TransSystem(SysNum).TEvapNeededLT; TsatforPdisLT = TransSystem(SysNum).TEvapNeededMT; - HsatVaporforTevapneededLT = GetSatEnthalpyRefrig( + HsatVaporforTevapneededLT = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededLT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); - HsatLiqforTevapNeededMT = GetSatEnthalpyRefrig( + HsatLiqforTevapNeededMT = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 0.0, TransSystem(SysNum).RefIndex, RoutineName); - PSuctionLT = GetSatPressureRefrig(TransSystem(SysNum).RefrigerantName, TsatforPsucLT, TransSystem(SysNum).RefIndex, RoutineName); - DensityActualLT = GetSupHeatDensityRefrig( + PSuctionLT = FluidProperties::GetSatPressureRefrig(TransSystem(SysNum).RefrigerantName, TsatforPsucLT, TransSystem(SysNum).RefIndex, RoutineName); + DensityActualLT = FluidProperties::GetSupHeatDensityRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TCompInLP, PSuctionLT, TransSystem(SysNum).RefIndex, RoutineName); TotalEnthalpyChangeActualLT = TransSystem(SysNum).HCompInLP - TransSystem(SysNum).HCaseInLT; @@ -12491,7 +12463,7 @@ namespace RefrigeratedCase { if (SELECT_CASE_var == RatedSubcooling) { HCaseInRatedLT = HsatLiqforTevapNeededMT - TransSystem(SysNum).CpSatLiqReceiver * Compressor(CompID).RatedSubcool; } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" - HCaseInRatedLT = GetSatEnthalpyRefrig( + HCaseInRatedLT = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, TransSystem(SysNum).RefIndex, RoutineName); } } @@ -12502,7 +12474,7 @@ namespace RefrigeratedCase { TempInRatedLP = TransSystem(SysNum).TEvapNeededLT + Compressor(CompID).RatedSuperheat; } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" TempInRatedLP = Compressor(CompID).RatedSuperheat; - HCompInRatedLP = GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + HCompInRatedLP = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Compressor(CompID).RatedSuperheat, PSuctionLT, TransSystem(SysNum).RefIndex, @@ -12511,7 +12483,7 @@ namespace RefrigeratedCase { } CaseEnthalpyChangeRatedLT = HCompInRatedLP - HCaseInRatedLT; - DensityRatedLP = GetSupHeatDensityRefrig( + DensityRatedLP = FluidProperties::GetSupHeatDensityRefrig( TransSystem(SysNum).RefrigerantName, TempInRatedLP, PSuctionLT, TransSystem(SysNum).RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and @@ -12521,8 +12493,8 @@ namespace RefrigeratedCase { Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucLT, TsatforPdisLT); Compressor(CompID).Capacity = CapacityCorrectionLT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucLT, TsatforPdisLT); Compressor(CompID).MassFlow = Compressor(CompID).Capacity / TotalEnthalpyChangeActualLT; - Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * SecInHour; - Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * SecInHour; + Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; + Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = 1.0; if ((TransSystem(SysNum).TotCompCapacityLP + Compressor(CompID).Capacity) >= NeededCapacityLT) { LFLastComp = (NeededCapacityLT - TransSystem(SysNum).TotCompCapacityLP) / Compressor(CompID).Capacity; @@ -12532,8 +12504,8 @@ namespace RefrigeratedCase { TransSystem(SysNum).TotCompCapacityLP += Compressor(CompID).Capacity; TransSystem(SysNum).RefMassFlowCompsLP += Compressor(CompID).MassFlow; TransSystem(SysNum).TotCompPowerLP += Compressor(CompID).Power; - Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * SecInHour; - Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * SecInHour; + Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; + Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = LFLastComp; break; } else { @@ -12554,9 +12526,9 @@ namespace RefrigeratedCase { } else { // Transcritical system is operating in subcritical region TsatforPdisMT = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TGasCoolerOut; } - PSuctionMT = GetSatPressureRefrig(TransSystem(SysNum).RefrigerantName, TsatforPsucMT, TransSystem(SysNum).RefIndex, RoutineName); + PSuctionMT = FluidProperties::GetSatPressureRefrig(TransSystem(SysNum).RefrigerantName, TsatforPsucMT, TransSystem(SysNum).RefIndex, RoutineName); PGCOutlet = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).PGasCoolerOut; - HsatVaporforTevapneededMT = GetSatEnthalpyRefrig( + HsatVaporforTevapneededMT = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); TransSystem(SysNum).HCaseInMT = TransSystem(SysNum).HSatLiqReceiver; // Enthalpy of refrigerant after leaving medium temperature loads and low pressure compressors @@ -12573,7 +12545,7 @@ namespace RefrigeratedCase { TransSystem(SysNum).HSatLiqReceiver) { for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations to find receiver quality QualityReceiver = (Xu + Xl) / 2.0; - Hnew = GetSatEnthalpyRefrig( + Hnew = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, QualityReceiver, TransSystem(SysNum).RefIndex, RoutineName); // estimated QualityReceiver is too high @@ -12599,11 +12571,11 @@ namespace RefrigeratedCase { (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads + TransSystem(SysNum).RefMassFlowReceiverBypass); // Iterate to find the suction temperature entering subcooler - Xl = GetSatTemperatureRefrig(TransSystem(SysNum).RefrigerantName, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + Xl = FluidProperties::GetSatTemperatureRefrig(TransSystem(SysNum).RefrigerantName, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); Xu = Xl + 50.0; for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations Xnew = (Xu + Xl) / 2.0; - Hnew = GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Xnew, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Xnew, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); if (Hnew > TransSystem(SysNum).HCompInHP) { // xnew is too high Xu = Xnew; } else { // xnew is too low @@ -12614,7 +12586,7 @@ namespace RefrigeratedCase { TSubcoolerColdIn = Xnew; // Modify receiver inlet enthlapy and HP compressor inlet enthalpy to account for subcooler - HIdeal = GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + HIdeal = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TGasCoolerOut, PSuctionMT, TransSystem(SysNum).RefIndex, @@ -12630,11 +12602,11 @@ namespace RefrigeratedCase { TransSystem(SysNum).DelHSubcoolerDis = -TransSystem(SysNum).DelHSubcoolerSuc; // Iterate to find the temperature at the inlet of the high pressure (HP) compressors - Xl = GetSatTemperatureRefrig(TransSystem(SysNum).RefrigerantName, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + Xl = FluidProperties::GetSatTemperatureRefrig(TransSystem(SysNum).RefrigerantName, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); Xu = Xl + 50.0; for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations Xnew = (Xu + Xl) / 2.0; - Hnew = GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Xnew, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Xnew, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); if (Hnew > TransSystem(SysNum).HCompInHP) { // xnew is too high Xu = Xnew; } else { // xnew is too low @@ -12647,7 +12619,7 @@ namespace RefrigeratedCase { // For capacity correction of HP compressors, consider subcooler, receiver, MT loads, LT loads and LP compressors // to constitute the "load". The actual and rated conditions at the exit of the gas cooler and the inlet of the // HP compressors are used for capacity correction calculations. - DensityActualMT = GetSupHeatDensityRefrig( + DensityActualMT = FluidProperties::GetSupHeatDensityRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TCompInHP, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); TotalEnthalpyChangeActualMT = TransSystem(SysNum).HCompInHP - GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut; @@ -12685,7 +12657,7 @@ namespace RefrigeratedCase { } // (.NOT.GasCooler(SysNum)%TransOpFlag) } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" if (!GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TransOpFlag) { // Subcritical operation - HCaseInRatedMT = GetSatEnthalpyRefrig( + HCaseInRatedMT = FluidProperties::GetSatEnthalpyRefrig( TransSystem(SysNum).RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, TransSystem(SysNum).RefIndex, RoutineName); } else { // Transcritical operation HCaseInRatedMT = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut; @@ -12699,7 +12671,7 @@ namespace RefrigeratedCase { TempInRatedHP = TransSystem(SysNum).TEvapNeededMT + Compressor(CompID).RatedSuperheat; } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" TempInRatedHP = Compressor(CompID).RatedSuperheat; - HCompInRatedHP = GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + HCompInRatedHP = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Compressor(CompID).RatedSuperheat, PSuctionMT, TransSystem(SysNum).RefIndex, @@ -12709,7 +12681,7 @@ namespace RefrigeratedCase { CaseEnthalpyChangeRatedMT = HCompInRatedHP - HCaseInRatedMT; DensityRatedHP = - GetSupHeatDensityRefrig(TransSystem(SysNum).RefrigerantName, TempInRatedHP, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + FluidProperties::GetSupHeatDensityRefrig(TransSystem(SysNum).RefrigerantName, TempInRatedHP, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling MassCorrectionMT = DensityActualMT / DensityRatedHP; @@ -12725,8 +12697,8 @@ namespace RefrigeratedCase { // Mass flow through HP compressors is HP compressor refrigerating capacity divided by MT load, LT load and LP compressor power Compressor(CompID).MassFlow = TotalRefMassFlow * Compressor(CompID).Capacity / (NeededCapacityMT + NeededCapacityLT + TransSystem(SysNum).TotCompPowerLP); - Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * SecInHour; - Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * SecInHour; + Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; + Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = 1.0; // calculate load factor for last compressor addded // assumes either cycling or part load eff = full load eff for last compressor @@ -12740,8 +12712,8 @@ namespace RefrigeratedCase { TransSystem(SysNum).TotCompCapacityHP += Compressor(CompID).Capacity; TransSystem(SysNum).RefMassFlowCompsHP += Compressor(CompID).MassFlow; TransSystem(SysNum).TotCompPowerHP += Compressor(CompID).Power; - Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * SecInHour; - Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * SecInHour; + Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; + Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = LFLastComp; break; } else { @@ -12758,9 +12730,9 @@ namespace RefrigeratedCase { TransSystem(SysNum).AverageCompressorCOP = (TransSystem(SysNum).TotCompCapacityHP - TransSystem(SysNum).TotCompPowerLP) / (TransSystem(SysNum).TotCompPowerLP + TransSystem(SysNum).TotCompPowerHP); TransSystem(SysNum).TotCompElecConsump = - (TransSystem(SysNum).TotCompPowerLP + TransSystem(SysNum).TotCompPowerHP) * LocalTimeStep * SecInHour; + (TransSystem(SysNum).TotCompPowerLP + TransSystem(SysNum).TotCompPowerHP) * LocalTimeStep * DataGlobals::SecInHour; TransSystem(SysNum).TotCompCoolingEnergy = - (TransSystem(SysNum).TotCompCapacityLP + TransSystem(SysNum).TotCompCapacityHP) * LocalTimeStep * SecInHour; + (TransSystem(SysNum).TotCompCapacityLP + TransSystem(SysNum).TotCompCapacityHP) * LocalTimeStep * DataGlobals::SecInHour; } void CalculateSubcoolers(int const SysNum) @@ -12792,7 +12764,7 @@ namespace RefrigeratedCase { Real64 ControlTLiqOut; // Controlled temperature of liquid leaving Mechanical subcooler Real64 DelTempActual; // Actual subcooling, T liquid in - T liquid out Real64 DelTLiqDes; // Design Temperature Change on liquid side of LSHX - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 LSHXeffectiveness; // EFfectiveness of liquid suction heat exchanger (LSHX) Real64 MechSCLoad; // Mechanical subcooler load Real64 SubcoolLoad; // energy transferred from warmer liquid to cool vapor @@ -12802,27 +12774,27 @@ namespace RefrigeratedCase { Real64 TLiqInActual; // Liquid T in, after condenser, before any mechanical subcooler Real64 TVapInActual; // Vapor T in, after any superheat added by case control - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // HCaseIn has to be recalculated as the starting point for the subcoolers here because // of the multiple number of iterations through this subroutine and because Tcondense is evolving. if (System(SysNum).NumStages == 1) { // Single-stage compression system System(SysNum).HSatLiqCond = - GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).CpSatLiqCond = - GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).HCaseIn = System(SysNum).HSatLiqCond - System(SysNum).CpSatLiqCond * Condenser(System(SysNum).CondenserNum(1)).RatedSubcool; // Two-stage compression with flash intercooler } else if (System(SysNum).NumStages == 2 && System(SysNum).IntercoolerType == 1) { System(SysNum).HSatLiqCond = - GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).CpSatLiqCond = - GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).HCaseIn = - GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TIntercooler, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TIntercooler, 0.0, System(SysNum).RefIndex, RoutineName); // Two-stage compression with shell-and-coil intercooler } else if (System(SysNum).NumStages == 2 && System(SysNum).IntercoolerType == 2) { @@ -12830,9 +12802,9 @@ namespace RefrigeratedCase { System(SysNum).IntercoolerEffectiveness * (System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool - System(SysNum).TIntercooler); System(SysNum).HSatLiqCond = - GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).CpSatLiqCond = - GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).HCaseIn = System(SysNum).HSatLiqCond - System(SysNum).CpSatLiqCond * (System(SysNum).TCondense - TLiqInActual); } // NumStages and IntercoolerType @@ -12872,7 +12844,7 @@ namespace RefrigeratedCase { SysProvideID = Subcooler(SubcoolerID).MechSourceSysID; System(SysProvideID).MechSCLoad(SubcoolerID) = MechSCLoad; Subcooler(SubcoolerID).MechSCTransLoad = MechSCLoad; - Subcooler(SubcoolerID).MechSCTransEnergy = MechSCLoad * LocalTimeStep * SecInHour; + Subcooler(SubcoolerID).MechSCTransEnergy = MechSCLoad * LocalTimeStep * DataGlobals::SecInHour; // Reset inlet temperature for any LSHX that follows this mech subcooler TLiqInActual = ControlTLiqOut; System(SysNum).TCompIn = System(SysNum).TEvapNeeded + CaseSuperheat; @@ -12887,7 +12859,7 @@ namespace RefrigeratedCase { System(SysNum).TCompIn = TVapInActual + SubcoolerSupHeat; System(SysNum).HCaseIn -= SubcoolLoad / System(SysNum).RefMassFlowtoLoads; System(SysNum).LSHXTrans = SubcoolLoad; - System(SysNum).LSHXTransEnergy = SubcoolLoad * LocalTimeStep * SecInHour; + System(SysNum).LSHXTransEnergy = SubcoolLoad * LocalTimeStep * DataGlobals::SecInHour; } } @@ -12962,8 +12934,6 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report information from the input deck for refrigerated cases and racks to the eio and err file. - using DataLoopNode::NodeID; - int CascadeLoadID; int CascadeLoadNum; int CaseID; @@ -13049,82 +13019,82 @@ namespace RefrigeratedCase { // write all headers applicable to this simulation if (DataHeatBalance::NumRefrigeratedRacks > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_109); // Intro to refrigeration case racks - ObjexxFCL::gio::write(OutputFileInits, Format_104); // Refrigeration Rack header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_109); // Intro to refrigeration case racks + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_104); // Refrigeration Rack header } //(NumRefrigeratedRacks > 0) if (DataHeatBalance::NumRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_117); // Intro to detailed systems - ObjexxFCL::gio::write(OutputFileInits, Format_118); // Detailed system header - ObjexxFCL::gio::write(OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_117); // Intro to detailed systems + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_118); // Detailed system header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) } //(NumRefrigSystems > 0) if (NumSimulationSecondarySystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_142); // Intro to Secondary systems + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_142); // Intro to Secondary systems CountSecPhase = 0; CountSecBrine = 0; for (SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { if ((Secondary(SecondaryID).FluidType == SecFluidTypeAlwaysLiquid) && (CountSecBrine == 0)) { - ObjexxFCL::gio::write(OutputFileInits, Format_133); // Secondary system header for brine type systems + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_133); // Secondary system header for brine type systems ++CountSecBrine; } if ((Secondary(SecondaryID).FluidType == SecFluidTypePhaseChange) && (CountSecPhase == 0)) { - ObjexxFCL::gio::write(OutputFileInits, Format_146); // Secondary system header for liquid overfeed/phase change systems + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_146); // Secondary system header for liquid overfeed/phase change systems ++CountSecPhase; } } - ObjexxFCL::gio::write(OutputFileInits, Format_123); // Secondary system load header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_123); // Secondary system load header } //(NumSimulationSecondarySystems > 0) if (DataHeatBalance::NumRefrigChillerSets > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_148); // Intro to Chiller set - ObjexxFCL::gio::write(OutputFileInits, Format_149); // Chiller set header - ObjexxFCL::gio::write(OutputFileInits, Format_151); // Intro to Air Chiller - ObjexxFCL::gio::write(OutputFileInits, Format_152); // Air chiller header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_148); // Intro to Chiller set + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_149); // Chiller set header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_151); // Intro to Air Chiller + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_152); // Air chiller header } //(NumRefrigSystems > 0) if (NumSimulationCases > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_105); // Case header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_105); // Case header } //(NumSimulationCases > 0) if (NumSimulationWalkIns > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_119); // Walk-in header - ObjexxFCL::gio::write(OutputFileInits, Format_134); // Walk-in zone-specific header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_119); // Walk-in header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_134); // Walk-in zone-specific header } //(NumSimulationWalkIns > 0) if (NumSimulationCondAir > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_129); // Condenser, Air-Cooled header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_129); // Condenser, Air-Cooled header } //(NumSimulationCondAir > 0) if (NumSimulationCondEvap > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_131); // Condenser, Evaporative-Cooled header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_131); // Condenser, Evaporative-Cooled header } //(NumSimulationCondEvap > 0) if (NumSimulationCondWater > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_130); // Condenser, Water-Cooled header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_130); // Condenser, Water-Cooled header } //(NumSimulationCondWater > 0) if (NumSimulationCascadeCondensers > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_132); // Condenser, Cascade header - ObjexxFCL::gio::write(OutputFileInits, Format_128); // Cascade Load header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_132); // Condenser, Cascade header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_128); // Cascade Load header } //(NumSimulationCascadeCondensers > 0) if (NumSimulationMechSubcoolers > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_141); // Mech subcooler loads served header - ObjexxFCL::gio::write(OutputFileInits, Format_126); // Mechanical Subcooler header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_141); // Mech subcooler loads served header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_126); // Mechanical Subcooler header } //(NumSimulationMechSubcoolers > 0) if ((NumSimulationSubcoolers - NumSimulationMechSubcoolers) > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_127); // LSHX Subcooler header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_127); // LSHX Subcooler header } //((NumSimulationSubcoolers - NumSimulationMechSubcoolers) > 0) if (NumTransRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_120); // Intro to detailed transcriticial refrigeration system - ObjexxFCL::gio::write(OutputFileInits, Format_121); // Detailed system header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_120); // Intro to detailed transcriticial refrigeration system + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_121); // Detailed system header if (NumSimulationCases > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_105); // Case header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_105); // Case header } //(NumSimulationCases > 0) if (NumSimulationWalkIns > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_119); // Walk-in header - ObjexxFCL::gio::write(OutputFileInits, Format_134); // Walk-in zone-specific header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_119); // Walk-in header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_134); // Walk-in zone-specific header } //(NumSimulationWalkIns > 0) - ObjexxFCL::gio::write(OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) if (NumSimulationGasCooler > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_160); // Gas Cooler, Air-Cooled header + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_160); // Gas Cooler, Air-Cooled header } //(NumSimulationGasCooler > 0) } //(NumTransRefrigSystems > 0) if (DataHeatBalance::NumRefrigeratedRacks > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + General::RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + General::RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationOutdoors) { ChrOut = "Outdoors"; @@ -13141,16 +13111,16 @@ namespace RefrigeratedCase { ChrOut2 = "Water-Cooled"; } } - ObjexxFCL::gio::write(OutputFileInits, Format_101) << " Refrigeration Compressor Rack," + RefrigRack(RackNum).Name + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Refrigeration Compressor Rack," + RefrigRack(RackNum).Name + ',' + General::RoundSigDigits(RefrigRack(RackNum).NumCases) + ',' + General::RoundSigDigits(RefrigRack(RackNum).NumWalkIns) + ',' + ChrOut + ',' + ChrOut2 + ',' + General::RoundSigDigits(RefrigRack(RackNum).RatedCOP, 3); for (CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { CaseID = RefrigRack(RackNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + @@ -13161,7 +13131,7 @@ namespace RefrigeratedCase { for (WalkInNum = 1; WalkInNum <= RefrigRack(RackNum).NumWalkIns; ++WalkInNum) { WalkInID = RefrigRack(RackNum).WalkInNum(WalkInNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Walk In Cooler, " + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + @@ -13169,7 +13139,7 @@ namespace RefrigeratedCase { General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + @@ -13183,16 +13153,16 @@ namespace RefrigeratedCase { for (CoilNum = 1; CoilNum <= RefrigRack(RackNum).NumCoils; ++CoilNum) { CoilID = RefrigRack(RackNum).CoilNum(CoilNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers } // numracks } //(NumRefrigeratedRacks > 0) if (DataHeatBalance::NumRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + General::RoundSigDigits(DataHeatBalance::NumRefrigSystems); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + General::RoundSigDigits(DataHeatBalance::NumRefrigSystems); for (SystemNum = 1; SystemNum <= DataHeatBalance::NumRefrigSystems; ++SystemNum) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Detailed Refrigeration System," + System(SystemNum).Name + ',' + System(SystemNum).RefrigerantName + ',' + General::RoundSigDigits(System(SystemNum).NumCases) + ',' + General::RoundSigDigits(System(SystemNum).NumWalkIns) + ',' + General::RoundSigDigits(System(SystemNum).NumCoils) + ',' + General::RoundSigDigits(System(SystemNum).NumSecondarys) + ',' + @@ -13205,9 +13175,9 @@ namespace RefrigeratedCase { for (CaseNum = 1; CaseNum <= System(SystemNum).NumCases; ++CaseNum) { CaseID = System(SystemNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + @@ -13217,14 +13187,14 @@ namespace RefrigeratedCase { } // NumCases on system for (WalkInNum = 1; WalkInNum <= System(SystemNum).NumWalkIns; ++WalkInNum) { WalkInID = System(SystemNum).WalkInNum(WalkInNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + @@ -13238,44 +13208,44 @@ namespace RefrigeratedCase { for (CoilNum = 1; CoilNum <= System(SystemNum).NumCoils; ++CoilNum) { CoilID = System(SystemNum).CoilNum(CoilNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers for (CascadeLoadNum = 1; CascadeLoadNum <= System(SystemNum).NumCascadeLoads; ++CascadeLoadNum) { CascadeLoadID = System(SystemNum).CascadeLoadNum(CascadeLoadNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Cascade Load," + System(Condenser(CascadeLoadID).CascadeSysID).Name + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Cascade Load," + System(Condenser(CascadeLoadID).CascadeSysID).Name + ',' + General::RoundSigDigits(CascadeLoadID) + ',' + Condenser(CascadeLoadID).Name; } // cascade load on detailed system for (SecondaryNum = 1; SecondaryNum <= System(SystemNum).NumSecondarys; ++SecondaryNum) { SecondaryID = System(SystemNum).SecondaryNum(SecondaryNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Secondary Load," + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(SecondaryID); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Secondary Load," + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(SecondaryID); } // secondary load on detailed system for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { if (Subcooler(SubcoolerNum).MechSourceSysID != SystemNum) continue; - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Mechanical Subcooler Load, " + General::RoundSigDigits(SubcoolerNum) + ',' + Subcooler(SubcoolerNum).Name; } // Num sim subcoolers, looking only for NumSMech Subcoolers served by this system if (System(SystemNum).NumStages == 1) { // Single-stage compression system for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { CompID = System(SystemNum).CompressorNum(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors } else if (System(SystemNum).NumStages == 2) { // Two-stage compression system // Low-stage compressors for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { CompID = System(SystemNum).CompressorNum(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Low-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Low-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors // High-stage compressors for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumHiStageCompressors; ++CompressorNum) { CompID = System(SystemNum).HiStageCompressorNum(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration High-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration High-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumHiStageCompressors } // NumStages @@ -13284,16 +13254,16 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(Condenser(CondID).CondenserType); if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Air-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Evaporative-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Water-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + General::RoundSigDigits(Condenser(CondID).InletTemp, 1) + ',' + General::RoundSigDigits(Condenser(CondID).DesVolFlowRate, 1); @@ -13307,7 +13277,7 @@ namespace RefrigeratedCase { ChrOut = "Floating"; } } // cascade temperature control - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Cascade," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + ChrOut + ',' + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedApproachT, 1); @@ -13319,13 +13289,13 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(Subcooler(SubcoolerID).SubcoolerType); if (SELECT_CASE_var == LiquidSuction) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Liquid Suction Subcooler," + General::RoundSigDigits(SubcoolerID) + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Liquid Suction Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + Subcooler(SubcoolerID).Name + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignDelT, 1) + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTliqIn, 1) + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTvapIn, 1); } else if (SELECT_CASE_var == Mechanical) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Refrigeration Mechanical Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Mechanical Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + Subcooler(SubcoolerID).Name + ',' + Subcooler(SubcoolerID).MechSourceSys + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).MechControlTliqOut, 1); } @@ -13336,9 +13306,9 @@ namespace RefrigeratedCase { } //(NumRefrigSystems > 0) if (NumTransRefrigSystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Detailed Transcritical Refrigeration Systems," + General::RoundSigDigits(NumTransRefrigSystems); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Detailed Transcritical Refrigeration Systems," + General::RoundSigDigits(NumTransRefrigSystems); for (TransSystemNum = 1; TransSystemNum <= NumTransRefrigSystems; ++TransSystemNum) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Detailed Transcritical Refrigeration System," + TransSystem(TransSystemNum).Name + ',' + TransSystem(TransSystemNum).RefrigerantName + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesMT) + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesLT) + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsMT) + @@ -13350,10 +13320,10 @@ namespace RefrigeratedCase { for (CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesMT; ++CaseNum) { CaseID = TransSystem(TransSystemNum).CaseNumMT(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Medium Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + - NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + @@ -13363,10 +13333,10 @@ namespace RefrigeratedCase { for (CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesLT; ++CaseNum) { CaseID = TransSystem(TransSystemNum).CaseNumLT(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + - NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + @@ -13375,14 +13345,14 @@ namespace RefrigeratedCase { } // NumCasesLT on system for (WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsMT; ++WalkInNum) { WalkInID = TransSystem(TransSystemNum).WalkInNumMT(WalkInNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Medium Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + @@ -13395,14 +13365,14 @@ namespace RefrigeratedCase { } // NumWalkInsMT on system for (WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsLT; ++WalkInNum) { WalkInID = TransSystem(TransSystemNum).WalkInNumLT(WalkInNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + @@ -13416,18 +13386,18 @@ namespace RefrigeratedCase { for (CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsHP; ++CompressorNum) { CompID = TransSystem(TransSystemNum).CompressorNumHP(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " High Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " High Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsHP for (CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsLP; ++CompressorNum) { CompID = TransSystem(TransSystemNum).CompressorNumLP(CompressorNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) << " Low Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsLP if (TransSystem(TransSystemNum).NumGasCoolers >= 1) { GasCoolerID = TransSystem(TransSystemNum).GasCoolerNum(1); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration GasCooler:Air-Cooled," + General::RoundSigDigits(GasCoolerID) + ',' + GasCooler(GasCoolerID).Name + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletP, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletT, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedApproachT, 1) + ',' + @@ -13439,12 +13409,12 @@ namespace RefrigeratedCase { } //(NumTransRefrigSystems > 0) if (NumSimulationSecondarySystems > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#Secondary Refrigeration Systems," + General::RoundSigDigits(NumSimulationSecondarySystems); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Secondary Refrigeration Systems," + General::RoundSigDigits(NumSimulationSecondarySystems); for (SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { { auto const SELECT_CASE_var(Secondary(SecondaryID).FluidType); if (SELECT_CASE_var == SecFluidTypeAlwaysLiquid) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "Secondary Refrigeration System: Fluid Always Liquid," + General::RoundSigDigits(SecondaryID) + ',' + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + ',' + Secondary(SecondaryID).FluidName + ',' + @@ -13454,7 +13424,7 @@ namespace RefrigeratedCase { General::RoundSigDigits(Secondary(SecondaryID).TRangeDifRated, 3) + ',' + General::RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); } else if (SELECT_CASE_var == SecFluidTypePhaseChange) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "Secondary Refrigeration System: Liquid Overfeed," + General::RoundSigDigits(SecondaryID) + ',' + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + ',' + Secondary(SecondaryID).FluidName + ',' + General::RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + @@ -13467,9 +13437,9 @@ namespace RefrigeratedCase { for (CaseNum = 1; CaseNum <= Secondary(SecondaryID).NumCases; ++CaseNum) { CaseID = Secondary(SecondaryID).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << "Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + @@ -13480,14 +13450,14 @@ namespace RefrigeratedCase { for (WalkInNum = 1; WalkInNum <= Secondary(SecondaryID).NumWalkIns; ++WalkInNum) { WalkInID = Secondary(SecondaryID).WalkInNum(WalkInNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << "Walk In," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1); for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(OutputFileInits, Format_102) << "Walk In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << "Walk In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + @@ -13501,25 +13471,25 @@ namespace RefrigeratedCase { for (CoilNum = 1; CoilNum <= Secondary(SecondaryID).NumCoils; ++CoilNum) { CoilID = Secondary(SecondaryID).CoilNum(CoilNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers } // secondary } // numsimulationsecondarys if (DataHeatBalance::NumRefrigChillerSets > 0) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + General::RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + General::RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); for (ChillerSetNum = 1; ChillerSetNum <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetNum) { - ObjexxFCL::gio::write(OutputFileInits, Format_101) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + General::RoundSigDigits(ChillerSetNum) + ',' + General::RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; for (CoilNum = 1; CoilNum <= AirChillerSet(ChillerSetNum).NumCoils; ++CoilNum) { CoilID = AirChillerSet(ChillerSetNum).CoilNum(CoilNum); - ObjexxFCL::gio::write(OutputFileInits, Format_103) + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Air Chiller," + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).Name + ',' + WarehouseCoil(CoilID).ZoneName + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + - NodeID(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).UnitLoadFactorSens, 1) + ',' + + DataLoopNode::NodeID(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).UnitLoadFactorSens, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).RatedSensibleCap, 2) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).TEvapDesign, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).RatedTemperatureDif, 1) + ',' + @@ -13568,8 +13538,6 @@ namespace RefrigeratedCase { // Gosney, W.B., Olama, G.A.-L., Heat and Enthalpy Gains through Cold Room Doorways, // Proceedings of the Institute of Refrigeration, vol. 72, pp 31-41, 1975 - using namespace DataLoopNode; - Real64 const DefaultWalkInDoorOpenFactor(0.05); // walk in door open factor (fraction time open) static std::string const RoutineName("CalculateWalkIn"); @@ -13645,11 +13613,11 @@ namespace RefrigeratedCase { static Real64 ZInfilSensLoad(0.0); // Sensible load due to infiltration in one zone static Real64 ZdoorSensLoad(0.0); // Sensible load due to UA delta T through closed door in one zone - WalkInSchedule = GetCurrentScheduleValue(WalkIn(WalkInID).SchedPtr); + WalkInSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).SchedPtr); if (WalkInSchedule <= 0) return; // GET OTHER SCHEDULES - DefrostSchedule = GetCurrentScheduleValue(WalkIn(WalkInID).DefrostSchedPtr); - DefrostDripDownSchedule = GetCurrentScheduleValue(WalkIn(WalkInID).DefrostDripDownSchedPtr); + DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostSchedPtr); + DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostDripDownSchedPtr); // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); @@ -13658,10 +13626,10 @@ namespace RefrigeratedCase { LightingSchedule = 1.0; HeaterSchedule = 1.0; CircFanSchedule = 1.0; - if (WalkIn(WalkInID).StockingSchedPtr > 0) StockingLoad = GetCurrentScheduleValue(WalkIn(WalkInID).StockingSchedPtr); - if (WalkIn(WalkInID).LightingSchedPtr > 0) LightingSchedule = GetCurrentScheduleValue(WalkIn(WalkInID).LightingSchedPtr); - if (WalkIn(WalkInID).HeaterSchedPtr > 0) HeaterSchedule = GetCurrentScheduleValue(WalkIn(WalkInID).HeaterSchedPtr); - if (WalkIn(WalkInID).CircFanSchedPtr > 0) CircFanSchedule = GetCurrentScheduleValue(WalkIn(WalkInID).CircFanSchedPtr); + if (WalkIn(WalkInID).StockingSchedPtr > 0) StockingLoad = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).StockingSchedPtr); + if (WalkIn(WalkInID).LightingSchedPtr > 0) LightingSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).LightingSchedPtr); + if (WalkIn(WalkInID).HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).HeaterSchedPtr); + if (WalkIn(WalkInID).CircFanSchedPtr > 0) CircFanSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).CircFanSchedPtr); // Set local subroutine variables for convenience TWalkIn = WalkIn(WalkInID).Temperature; @@ -13669,10 +13637,10 @@ namespace RefrigeratedCase { DefrostCap = WalkIn(WalkInID).DefrostCapacity; // %DefrostCapacity already set to zero for WalkInDefrostNone , WalkInDefrostOffCycle DesignLighting = WalkIn(WalkInID).DesignLighting; - EnthalpyAirWalkIn = Psychrometrics::PsyHFnTdbRhPb(TWalkIn, 0.9, OutBaroPress); // assume 90%RH in cooler + EnthalpyAirWalkIn = Psychrometrics::PsyHFnTdbRhPb(TWalkIn, 0.9, DataEnvironment::OutBaroPress); // assume 90%RH in cooler HumRatioAirWalkIn = Psychrometrics::PsyWFnTdbH(TWalkIn, EnthalpyAirWalkIn); - DensityAirWalkIn = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, TWalkIn, HumRatioAirWalkIn); - Conv = Latitude * 2.0 * Pi / 360.0; // Convert Latitude to radians + DensityAirWalkIn = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, TWalkIn, HumRatioAirWalkIn); + Conv = DataEnvironment::Latitude * 2.0 * DataGlobals::Pi / 360.0; // Convert DataEnvironment::Latitude to radians Gravity = 9.780373 * (1.0 + 0.0052891 * pow_2(std::sin(Conv)) - 0.0000059 * pow_2(std::sin(2.0 * Conv))); // CALCULATE ALL LOADS INFLUENCED BY ZONE TEMPERATURE AND RH @@ -13693,7 +13661,7 @@ namespace RefrigeratedCase { StockDoorSensHeat = 0.0; ZoneNum = WalkIn(WalkInID).ZoneNum(ZoneID); ZoneNodeNum = WalkIn(WalkInID).ZoneNodeNum(ZoneID); - ZoneDryBulb = Node(ZoneNodeNum).Temp; + ZoneDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; DelTemp = ZoneDryBulb - TWalkIn; StockDoorArea = WalkIn(WalkInID).AreaStockDr(ZoneID); GlassDoorArea = WalkIn(WalkInID).AreaGlassDr(ZoneID); @@ -13703,10 +13671,10 @@ namespace RefrigeratedCase { // Get infiltration loads if either type of door is present in this zone if (StockDoorArea > 0.0 || GlassDoorArea > 0.0) { - ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(Node(ZoneNodeNum).Temp, Node(ZoneNodeNum).HumRat, OutBaroPress, RoutineName); - EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, OutBaroPress, RoutineName); + ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); + EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, DataEnvironment::OutBaroPress, RoutineName); HumRatioZoneAir = Psychrometrics::PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); - DensityZoneAir = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, ZoneDryBulb, HumRatioZoneAir, RoutineName); + DensityZoneAir = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneDryBulb, HumRatioZoneAir, RoutineName); if (DensityZoneAir < DensityAirWalkIn) { // usual case when walk in is colder than zone DensitySqRtFactor = std::sqrt(1.0 - DensityZoneAir / DensityAirWalkIn); DensityFactorFm = std::pow(2.0 / (1.0 + std::pow(DensityAirWalkIn / DensityZoneAir, 0.333)), 1.5); @@ -13738,7 +13706,7 @@ namespace RefrigeratedCase { // if exists, get Stock Door Zone schedule DoorOpenFactor = DefaultWalkInDoorOpenFactor; if (WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) > 0) - DoorOpenFactor = GetCurrentScheduleValue(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID)); + DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID)); FullFlowInfLoad = 0.221 * DrArea * (EnthalpyZoneAir - EnthalpyAirWalkIn) * DensityAirWalkIn * DensitySqRtFactor * std::sqrt(Gravity * DrHeight) * DensityFactorFm; @@ -13753,7 +13721,7 @@ namespace RefrigeratedCase { // get Glass Door Zone schedule DoorOpenFactor = DefaultWalkInDoorOpenFactor; // default value if (WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) > 0) - DoorOpenFactor = GetCurrentScheduleValue(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID)); + DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID)); FullFlowInfLoad = 0.221 * DrArea * (EnthalpyZoneAir - EnthalpyAirWalkIn) * DensityAirWalkIn * DensitySqRtFactor * std::sqrt(Gravity * DrHeight) * DensityFactorFm; @@ -13779,8 +13747,8 @@ namespace RefrigeratedCase { WalkInLatLoad = WaterRemovRate * IcetoVaporEnthalpy * (1.0 - DefrostDripDownSchedule); // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem - if (!WarmupFlag) { - FrostChangekg = (WaterRemovRate * TimeStepZoneSec) * (1.0 - DefrostDripDownSchedule); + if (!DataGlobals::WarmupFlag) { + FrostChangekg = (WaterRemovRate * DataGlobals::TimeStepZoneSec) * (1.0 - DefrostDripDownSchedule); WalkIn(WalkInID).KgFrost += FrostChangekg; } } // water to ice @@ -13801,18 +13769,18 @@ namespace RefrigeratedCase { WalkIn(WalkInID).SensZoneCreditRate(ZoneID) = ZoneSensLoad; if (ZoneSensLoad <= 0.0) { WalkIn(WalkInID).SensZoneCreditCoolRate(ZoneID) = -ZoneSensLoad; - WalkIn(WalkInID).SensZoneCreditCool(ZoneID) = -ZoneSensLoad * TimeStepZoneSec; + WalkIn(WalkInID).SensZoneCreditCool(ZoneID) = -ZoneSensLoad * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).SensZoneCreditHeatRate(ZoneID) = 0.0; WalkIn(WalkInID).SensZoneCreditHeat(ZoneID) = 0.0; } else { WalkIn(WalkInID).SensZoneCreditHeatRate(ZoneID) = ZoneSensLoad; - WalkIn(WalkInID).SensZoneCreditHeat(ZoneID) = ZoneSensLoad * TimeStepZoneSec; + WalkIn(WalkInID).SensZoneCreditHeat(ZoneID) = ZoneSensLoad * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).SensZoneCreditCoolRate(ZoneID) = 0.0; WalkIn(WalkInID).SensZoneCreditCool(ZoneID) = 0.0; } // This rate should always be negative WalkIn(WalkInID).LatZoneCreditRate(ZoneID) = ZoneLatentLoad; - WalkIn(WalkInID).LatZoneCredit(ZoneID) = ZoneLatentLoad * TimeStepZoneSec; + WalkIn(WalkInID).LatZoneCredit(ZoneID) = ZoneLatentLoad * DataGlobals::TimeStepZoneSec; // Running total over all zones, use later to dispatch capacity SensibleLoadTotal += WalkInSensLoad; @@ -13827,16 +13795,16 @@ namespace RefrigeratedCase { // turn coil fan off during defrost/drip - down period FanLoad = WalkIn(WalkInID).CircFanPower * CircFanSchedule + WalkIn(WalkInID).CoilFanPower * (1.0 - DefrostDripDownSchedule); HeaterLoad = WalkIn(WalkInID).HeaterPower * HeaterSchedule; - // Calculate floor load - using 'GroundTemp' assigned in weather manager (can be entered by user if desired) + // Calculate floor load - using 'DataEnvironment::GroundTemp' assigned in weather manager (can be entered by user if desired) // Default value is 18C. - FloorLoad = WalkIn(WalkInID).FloorArea * WalkIn(WalkInID).FloorUValue * (GroundTemp - TWalkIn); + FloorLoad = WalkIn(WalkInID).FloorArea * WalkIn(WalkInID).FloorUValue * (DataEnvironment::GroundTemp - TWalkIn); // DEFROST CALCULATIONS if ((DefrostSchedule > 0.0) && (WalkIn(WalkInID).DefrostType != WalkInDefrostNone) && (WalkIn(WalkInID).DefrostType != WalkInDefrostOffCycle)) { DefrostLoad = DefrostCap * DefrostSchedule; // W StartFrostKg = WalkIn(WalkInID).KgFrost; - DefrostEnergy = DefrostLoad * TimeStepZoneSec; // Joules + DefrostEnergy = DefrostLoad * DataGlobals::TimeStepZoneSec; // Joules if (WalkIn(WalkInID).DefrostControlType == DefrostContTempTerm) { // Need to turn defrost system off early if controlled by temperature and all ice melted // For temperature termination, need to recognize not all defrost heat goes to melt ice @@ -13862,18 +13830,18 @@ namespace RefrigeratedCase { // Reduce defrost heat load on walkin by amount of ice melted during time step FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); if (FrostChangekg < StartFrostKg) { - DefrostLoad -= FrostChangekg * IceMeltEnthalpy / TimeStepZone / SecInHour; - if (!WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; + DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; + if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed } else { // all frost melted during time step, so need to terminate defrost // see Aug 8 page 3 notes WalkIn(WalkInID).KgFrost = 0.0; DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DefEnergyFraction; // Joules - energy needed including E unavail to melt ice - DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * TimeStepZoneSec))); + DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataGlobals::TimeStepZoneSec))); // reduce load on walkin by energy put into ice melting DefrostLoad = - max(0.0, (DefrostSchedule * DefrostCap - (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / TimeStepZoneSec)); + max(0.0, (DefrostSchedule * DefrostCap - (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DataGlobals::TimeStepZoneSec)); WalkIn(WalkInID).IceTemp = WalkIn(WalkInID).TEvapDesign; } // frost melted during time step less than amount of ice at start @@ -13886,8 +13854,8 @@ namespace RefrigeratedCase { } else { // Not temperature control type FrostChangekg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); // Reduce defrost heat load on walkin by amount of ice melted during time step - DefrostLoad -= FrostChangekg * IceMeltEnthalpy / TimeStepZone / SecInHour; - if (!WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; + DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; + if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed } // Temperature termination control type @@ -13896,7 +13864,7 @@ namespace RefrigeratedCase { } // Defrost calculations if (WalkIn(WalkInID).DefrostType == WalkInDefrostElec) { - WalkIn(WalkInID).ElecDefrostConsumption = DefrostCap * DefrostSchedule * TimeStepZoneSec; + WalkIn(WalkInID).ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).ElecDefrostPower = DefrostCap * DefrostSchedule; } else { WalkIn(WalkInID).ElecDefrostConsumption = 0.0; @@ -13923,7 +13891,7 @@ namespace RefrigeratedCase { // temperature will increase by a small amount during defrost and the system will have to // run full out until the temperature is brought back down. - StoredEnergyRate = WalkIn(WalkInID).StoredEnergy / TimeStepZone / SecInHour; + StoredEnergyRate = WalkIn(WalkInID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; LoadRequested = LoadTotal + StoredEnergyRate; // prorate available cooling capacity for portion of time off due to drip down. @@ -13939,25 +13907,25 @@ namespace RefrigeratedCase { CapApplied = MaxCap; LatentCapApplied = min(LatentLoadTotal, MaxCap); // Latent load should never be > capavail, but just in case... SensibleCapApplied = CapApplied - LatentCapApplied; - if (!WarmupFlag) WalkIn(WalkInID).StoredEnergy += (LoadTotal - MaxCap) * TimeStepZoneSec; + if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).StoredEnergy += (LoadTotal - MaxCap) * DataGlobals::TimeStepZoneSec; } // CapAvail vs Load requested // ReportWalkIn( WalkInID) WalkIn(WalkInID).TotalCoolingLoad = CapApplied; - WalkIn(WalkInID).TotalCoolingEnergy = CapApplied * TimeStepZoneSec; + WalkIn(WalkInID).TotalCoolingEnergy = CapApplied * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).TotSensCoolingEnergyRate = SensibleCapApplied; - WalkIn(WalkInID).TotSensCoolingEnergy = SensibleCapApplied * TimeStepZoneSec; + WalkIn(WalkInID).TotSensCoolingEnergy = SensibleCapApplied * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).TotLatCoolingEnergyRate = LatentCapApplied; - WalkIn(WalkInID).TotLatCoolingEnergy = LatentCapApplied * TimeStepZoneSec; + WalkIn(WalkInID).TotLatCoolingEnergy = LatentCapApplied * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).ElecFanPower = FanLoad; - WalkIn(WalkInID).ElecFanConsumption = FanLoad * TimeStepZoneSec; + WalkIn(WalkInID).ElecFanConsumption = FanLoad * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).ElecHeaterPower = HeaterLoad; - WalkIn(WalkInID).ElecHeaterConsumption = HeaterLoad * TimeStepZoneSec; + WalkIn(WalkInID).ElecHeaterConsumption = HeaterLoad * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).ElecLightingPower = LightLoad; - WalkIn(WalkInID).ElecLightingConsumption = LightLoad * TimeStepZoneSec; + WalkIn(WalkInID).ElecLightingConsumption = LightLoad * DataGlobals::TimeStepZoneSec; WalkIn(WalkInID).TotalElecPower = FanLoad + HeaterLoad + LightLoad + WalkIn(WalkInID).ElecDefrostPower; - WalkIn(WalkInID).TotalElecConsumption = WalkIn(WalkInID).TotalElecPower * TimeStepZoneSec; + WalkIn(WalkInID).TotalElecConsumption = WalkIn(WalkInID).TotalElecPower * DataGlobals::TimeStepZoneSec; //************************************************************************************************** // Cap Energy and Kg Frost to avoid floating overflow errors @@ -13967,7 +13935,7 @@ namespace RefrigeratedCase { if (ShowUnmetWIEnergyWarning(WalkInID)) { ShowWarningError("Refrigeration:WalkIn: " + WalkIn(WalkInID).Name); ShowContinueError(" This walk-in cooler has insufficient capacity to meet the loads"); - ShowContinueError("... Occurrence info = " + EnvironmentName + ", " + CurMnDy + ' ' + General::CreateSysTimeIntervalString()); + ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + General::CreateSysTimeIntervalString()); ShowContinueError(" Refer to documentation for further explanation of Total Cooling Capacity."); ShowUnmetWIEnergyWarning(WalkInID) = false; } // ShowStoreEnergyWarning @@ -13978,7 +13946,7 @@ namespace RefrigeratedCase { ShowWarningError("Refrigeration:WalkIn: " + WalkIn(WalkInID).Name); ShowContinueError(" This walkin cooler has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(" Check the defrost schedule or defrost capacity. "); - ShowContinueError("... Occurrence info = " + EnvironmentName + ", " + CurMnDy + ' ' + General::CreateSysTimeIntervalString()); + ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + General::CreateSysTimeIntervalString()); ShowWIFrostWarning(WalkInID) = false; } } @@ -14039,7 +14007,7 @@ namespace RefrigeratedCase { Real64 Eta; // Secondary loop heat exchanger eta, dimensionless Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) static Real64 LoadRequested(0.0); // Load necessary to meet current and all stored energy needs (W) - static Real64 LocalTimeStep(0.0); // TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems + static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MaxLoad; // Secondary loop capacity can be limited by heat exchanger or pumps (W) Real64 MaxVolFlow; // Flow can be limited by either total pump capacity or heat exchanger design (m3/s) Real64 PartLdFrac; // Used to ratio pump power @@ -14063,7 +14031,7 @@ namespace RefrigeratedCase { Real64 VolFlowRate; // Used in dispatching pumps to meet load (m3/s) Real64 UnmetEnergy; // Cumulative, grows and shrinks with defrost cycles on loads served by loop (J) - LocalTimeStep = TimeStepZone; + LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; NumPumps = Secondary(SecondaryNum).NumPumps; @@ -14103,7 +14071,7 @@ namespace RefrigeratedCase { DistPipeHeatGain = 0.0; if (Secondary(SecondaryNum).SumUADistPiping > MySmallNumber) { ZoneNodeNum = Secondary(SecondaryNum).DistPipeZoneNodeNum; - DiffTemp = Node(ZoneNodeNum).Temp - TPipesReceiver; + DiffTemp = DataLoopNode::Node(ZoneNodeNum).Temp - TPipesReceiver; DistPipeHeatGain = DiffTemp * Secondary(SecondaryNum).SumUADistPiping; DistPipeZoneNum = Secondary(SecondaryNum).DistPipeZoneNum; // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted @@ -14115,7 +14083,7 @@ namespace RefrigeratedCase { ReceiverHeatGain = 0.0; if (Secondary(SecondaryNum).SumUAReceiver > MySmallNumber) { ZoneNodeNum = Secondary(SecondaryNum).ReceiverZoneNodeNum; - DiffTemp = Node(ZoneNodeNum).Temp - TPipesReceiver; + DiffTemp = DataLoopNode::Node(ZoneNodeNum).Temp - TPipesReceiver; ReceiverHeatGain = DiffTemp * Secondary(SecondaryNum).SumUAReceiver; ReceiverZoneNum = Secondary(SecondaryNum).ReceiverZoneNum; // receiver heat load is a positive number (ie. heat absorbed by receiver, so needs to be subtracted @@ -14226,9 +14194,9 @@ namespace RefrigeratedCase { if (Error < ErrorTol) break; } // end iteration on pump energy convergence - // IF (Iter >=10 .AND. .NOT. WarmupFlag)THEN - // If( .not. WarmupFlag) Then - // Write(OutputFileDebug,707)Month, CurrentTime, Iter, TotalLoad, TotalPumpPower + // IF (Iter >=10 .AND. .NOT. DataGlobals::WarmupFlag)THEN + // If( .not. DataGlobals::WarmupFlag) Then + // Write(OutputFileDebug,707)Month, DataGlobals::CurrentTime, Iter, TotalLoad, TotalPumpPower // End If // 707 format(' in iter loop at 707: ',1x,I2,1x,F5.2,1x,I5,7(F10.5,1x)) // END IF !didn't converge @@ -14242,7 +14210,7 @@ namespace RefrigeratedCase { // (e.g. as it may be following defrost cycles on cases or walk-ins served by secondary loop) // save the unmet/stored load to be met in succeeding time steps. if (Secondary(SecondaryNum).NumCoils == 0) { - StoredEnergyRate = max(0.0, (UnmetEnergy / TimeStepZone / SecInHour)); + StoredEnergyRate = max(0.0, (UnmetEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour)); LoadRequested = TotalLoad + StoredEnergyRate; if (MaxLoad > LoadRequested) { // Have at least as much capacity avail as needed, even counting stored energy @@ -14253,7 +14221,7 @@ namespace RefrigeratedCase { // Don't have as much capacity as needed (likely following defrost periods) TotalCoolingLoad = MaxLoad; RefrigerationLoad -= (TotalLoad - MaxLoad); - if (!WarmupFlag) UnmetEnergy += ((TotalLoad - MaxLoad) * TimeStepZoneSec); + if (!DataGlobals::WarmupFlag) UnmetEnergy += ((TotalLoad - MaxLoad) * DataGlobals::TimeStepZoneSec); } // load requested greater than MaxLoad if (Secondary(SecondaryNum).UnmetEnergy > MyLargeNumber) { Secondary(SecondaryNum).UnmetEnergy = MyLargeNumber; @@ -14274,17 +14242,17 @@ namespace RefrigeratedCase { // Bug TotalCoolingLoad not set but used below } // no air coils on secondary loop Secondary(SecondaryNum).PumpPowerTotal = TotalPumpPower; - Secondary(SecondaryNum).PumpElecEnergyTotal = TotalPumpPower * LocalTimeStep * SecInHour; + Secondary(SecondaryNum).PumpElecEnergyTotal = TotalPumpPower * LocalTimeStep * DataGlobals::SecInHour; Secondary(SecondaryNum).TotalRefrigLoad = RefrigerationLoad; - Secondary(SecondaryNum).TotalRefrigEnergy = RefrigerationLoad * LocalTimeStep * SecInHour; + Secondary(SecondaryNum).TotalRefrigEnergy = RefrigerationLoad * LocalTimeStep * DataGlobals::SecInHour; Secondary(SecondaryNum).TotalCoolingLoad = TotalCoolingLoad; - Secondary(SecondaryNum).TotalCoolingEnergy = TotalCoolingLoad * LocalTimeStep * SecInHour; + Secondary(SecondaryNum).TotalCoolingEnergy = TotalCoolingLoad * LocalTimeStep * DataGlobals::SecInHour; Secondary(SecondaryNum).FlowVolActual = VolFlowRate; Secondary(SecondaryNum).HotDefrostCondCredit = TotalHotDefrostCondCredit; Secondary(SecondaryNum).DistPipeHeatGain = DistPipeHeatGain; - Secondary(SecondaryNum).DistPipeHeatGainEnergy = DistPipeHeatGain * LocalTimeStep * SecInHour; + Secondary(SecondaryNum).DistPipeHeatGainEnergy = DistPipeHeatGain * LocalTimeStep * DataGlobals::SecInHour; Secondary(SecondaryNum).ReceiverHeatGain = ReceiverHeatGain; - Secondary(SecondaryNum).ReceiverHeatGainEnergy = ReceiverHeatGain * LocalTimeStep * SecInHour; + Secondary(SecondaryNum).ReceiverHeatGainEnergy = ReceiverHeatGain * LocalTimeStep * DataGlobals::SecInHour; } void SumZoneImpacts() @@ -14308,7 +14276,7 @@ namespace RefrigeratedCase { static int ZoneNum(0); // used calculating total refrigeration interactions for zone if (UseSysTimeStep) { // air chillers - for (ZoneNum = 1; ZoneNum <= NumOfZones; ++ZoneNum) { + for (ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { CoilSysCredit(ZoneNum).ReportH20RemovedKgPerS_FromZoneRate = -CoilSysCredit(ZoneNum).LatKgPerS_ToZoneRate; CoilSysCredit(ZoneNum).ReportLatCreditToZoneRate = -CoilSysCredit(ZoneNum).LatCreditToZoneRate; CoilSysCredit(ZoneNum).ReportLatCreditToZoneEnergy = -CoilSysCredit(ZoneNum).LatCreditToZoneEnergy; @@ -14334,23 +14302,23 @@ namespace RefrigeratedCase { // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - for (ZoneNum = 1; ZoneNum <= NumOfZones; ++ZoneNum) { - CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; + for (ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { + CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; // Latent always negative CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; - CaseWIZoneReport(ZoneNum).LatCoolingToZoneEnergy = CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate * TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).LatCoolingToZoneEnergy = CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate * DataGlobals::TimeStepZoneSec; // Sensible rate can be positive or negative, split into separate output variables and // always report positive value if (DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone <= 0.0) { CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; - CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; CaseWIZoneReport(ZoneNum).HeatingToZoneRate = 0.0; CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = 0.0; } else { CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = 0.0; CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = 0.0; CaseWIZoneReport(ZoneNum).HeatingToZoneRate = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; - CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; } CaseWIZoneReport(ZoneNum).TotCoolingToZoneRate = CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate + CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate; @@ -14358,7 +14326,7 @@ namespace RefrigeratedCase { CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy + CaseWIZoneReport(ZoneNum).LatCoolingToZoneEnergy; CaseWIZoneReport(ZoneNum).TotHtXferToZoneRate = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone + DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; - CaseWIZoneReport(ZoneNum).TotHtXferToZoneEnergy = CaseWIZoneReport(ZoneNum).TotHtXferToZoneRate * TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).TotHtXferToZoneEnergy = CaseWIZoneReport(ZoneNum).TotHtXferToZoneRate * DataGlobals::TimeStepZoneSec; } // over zones for cases and walkins } } @@ -14414,9 +14382,6 @@ namespace RefrigeratedCase { // METHODOLOGY EMPLOYED: // Called from Zone Equipment Manager. - using DataHeatBalFanSys::TempControlType; - using DataZoneEnergyDemands::ZoneSysEnergyDemand; - int ChillerSetID; Real64 RemainingOutputToCoolingSP; // Remaining requested load in zone @@ -14451,10 +14416,10 @@ namespace RefrigeratedCase { } } // FirstHVACIteration - RemainingOutputToCoolingSP = ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; + RemainingOutputToCoolingSP = DataZoneEnergyDemands::ZoneSysEnergyDemand(ZoneNum).RemainingOutputReqToCoolSP; // RemainingOutputToCoolingSP in Watts, < 0 for cooling demand - if (RemainingOutputToCoolingSP < 0.0 && TempControlType(ZoneNum) != DataHVACGlobals::SingleHeatingSetPoint) { + if (RemainingOutputToCoolingSP < 0.0 && DataHeatBalFanSys::TempControlType(ZoneNum) != DataHVACGlobals::SingleHeatingSetPoint) { AirChillerSet(AirChillerSetPtr).QZnReqSens = RemainingOutputToCoolingSP; } else { AirChillerSet(AirChillerSetPtr).QZnReqSens = 0.0; @@ -14500,7 +14465,7 @@ namespace RefrigeratedCase { // Note, all coils in a coil set are in the same zone // the coils may be served by different detailed systems // The coils are dispatched to meet the load specified in the previous time step in order listed in coilset object - AirChillerSetSchedule = GetCurrentScheduleValue(AirChillerSet(AirChillerSetID).SchedPtr); + AirChillerSetSchedule = ScheduleManager::GetCurrentScheduleValue(AirChillerSet(AirChillerSetID).SchedPtr); if (AirChillerSetSchedule <= 0.0) return; QZNReqSens = AirChillerSet(AirChillerSetID).QZnReqSens; @@ -14540,8 +14505,6 @@ namespace RefrigeratedCase { // Note that the coil fan, heater, and defrost would be unaffected because they // would still be running at level calculated previously - using namespace DataLoopNode; - static int NumCoils(0); // Number of coils on this system or secondary loop static int CoilID(0); // Index to coil static int CoilIndex(0); // rank of coils within system @@ -14566,7 +14529,7 @@ namespace RefrigeratedCase { System(SystemID).InsuffCapWarn); DeRateFactor = AvailableTotalLoad / InitialTotalLoad; - Real64 const time_step_sec(DataHVACGlobals::TimeStepSys * SecInHour); + Real64 const time_step_sec(DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); for (CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { CoilID = System(SystemID).CoilNum(CoilIndex); auto &warehouse_coil(WarehouseCoil(CoilID)); @@ -14640,8 +14603,6 @@ namespace RefrigeratedCase { // Unit Load Factor, Total Capacity Map, or a set of European standards. // Correction factors for material and refrigerant are applied to all of these ratings. - using namespace DataLoopNode; - static Real64 UnitLoadFactorSens(0.0); // Rated capacity divided by rated DT1 (T air in - Tevap) (W/delta C) static std::string const TrackMessage("from RefrigeratedCase:CalculateCoil"); @@ -14721,17 +14682,17 @@ namespace RefrigeratedCase { // GET SCHEDULES auto &warehouse_coil(WarehouseCoil(CoilID)); - CoilSchedule = GetCurrentScheduleValue(warehouse_coil.SchedPtr); + CoilSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.SchedPtr); if (CoilSchedule <= 0.0) return; - DefrostSchedule = GetCurrentScheduleValue(warehouse_coil.DefrostSchedPtr); - DefrostDripDownSchedule = GetCurrentScheduleValue(warehouse_coil.DefrostDripDownSchedPtr); + DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostSchedPtr); + DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostDripDownSchedPtr); // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); // next value optional, so set to default before checking for schedule HeaterSchedule = 1.0; - if (warehouse_coil.HeaterSchedPtr > 0) HeaterSchedule = GetCurrentScheduleValue(warehouse_coil.HeaterSchedPtr); + if (warehouse_coil.HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.HeaterSchedPtr); AirVolRatio = 0.0; AirVolumeFlowMax = 0.0; @@ -14781,12 +14742,12 @@ namespace RefrigeratedCase { DryAirMassFlowMax = 0.0; } else { SensLoadRequestedGross = SensLoadRequested + HeaterLoad + FanPowerRated; - ZoneMixedAirDryBulb = Node(ZoneNodeNum).Temp; - ZoneMixedAirHumRatio = Node(ZoneNodeNum).HumRat; - ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, OutBaroPress, TrackMessage); - ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, OutBaroPress, TrackMessage); - ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); - ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); + ZoneMixedAirDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; + ZoneMixedAirHumRatio = DataLoopNode::Node(ZoneNodeNum).HumRat; + ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, DataEnvironment::OutBaroPress, TrackMessage); + ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, DataEnvironment::OutBaroPress, TrackMessage); + ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); + ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); ZoneMixedAirCp = Psychrometrics::PsyCpAirFnWTdb(ZoneMixedAirHumRatio, ZoneMixedAirDryBulb); DryAirMassFlowRated = AirVolumeFlowRated * ZoneDryAirDensity; // calc t inlet to coil assuming at middle/mixed point in room bbb - @@ -14837,7 +14798,7 @@ namespace RefrigeratedCase { ShowWarningError(TrackMessage + "Refrigeration:AirCoil: " + warehouse_coil.Name); ShowContinueError(" The estimated air outlet temperature is less than the evaporating temperature."); } - ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, OutBaroPress, TrackMessage); + ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, DataEnvironment::OutBaroPress, TrackMessage); if (ExitEnthalpyEstimate <= CoilInletEnthalpy) { CoilCapTotEstimate = (CoilInletEnthalpy - ExitEnthalpyEstimate) * AirVolumeFlowMax * CoilInletDensity; } else { @@ -14899,7 +14860,7 @@ namespace RefrigeratedCase { if (CoilCapTotEstimate > 0.0) { ExitEnthalpy = CoilInletEnthalpy - (CoilCapTotEstimate / (AirVolumeFlowMax * CoilInletDensity)); - ExitTemperature = Psychrometrics::PsyTsatFnHPb(ExitEnthalpy, OutBaroPress, TrackMessage); // RH =1.0 at Tsat + ExitTemperature = Psychrometrics::PsyTsatFnHPb(ExitEnthalpy, DataEnvironment::OutBaroPress, TrackMessage); // RH =1.0 at Tsat ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); if (ExitHumRatio > CoilInletHumRatio) ExitHumRatio = CoilInletHumRatio; WaterRemovRate = DryAirMassFlowMax * (CoilInletHumRatio - ExitHumRatio); @@ -14967,8 +14928,8 @@ namespace RefrigeratedCase { // now handle ice on coil and defrost because defrost energy not into melting ice goes into sensible load // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem - if (!WarmupFlag) { - FrostChangekg = (WaterRemovRate * DataHVACGlobals::TimeStepSys * SecInHour); + if (!DataGlobals::WarmupFlag) { + FrostChangekg = (WaterRemovRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); warehouse_coil.KgFrost += FrostChangekg; } @@ -14988,7 +14949,7 @@ namespace RefrigeratedCase { // a certain temperature (such as when there's no load and no ice) if ((DefrostSchedule > 0.0) && (warehouse_coil.DefrostType != DefrostNone) && (warehouse_coil.DefrostType != DefrostOffCycle)) { DefrostLoad = DefrostCap * DefrostSchedule; // W - DefrostEnergy = DefrostLoad * DataHVACGlobals::TimeStepSys * SecInHour; // Joules + DefrostEnergy = DefrostLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; // Joules StartFrostKg = warehouse_coil.KgFrost; if (warehouse_coil.DefrostControlType == DefrostContTempTerm) { @@ -15016,17 +14977,17 @@ namespace RefrigeratedCase { // Reduce defrost heat load on walkin by amount of ice melted during time step FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); if (FrostChangekg < StartFrostKg) { - DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / SecInHour; - if (!WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; + DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / DataGlobals::SecInHour; + if (!DataGlobals::WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed because ice not all melted, temp term not triggered } else { // all frost melted during time step, so need to terminate defrost // see Aug 8 2010 page 3 notes warehouse_coil.KgFrost = 0.0; DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DefEnergyFraction; // Joules - energy needed including E unavail to melt ice - DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * SecInHour))); + DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour))); // reduce heat load on warehouse by energy put into ice melting - DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * SecInHour); + DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); DefrostLoad = max(0.0, (DefrostSchedule * DefrostCap - DefrostRateNeeded)); warehouse_coil.IceTemp = warehouse_coil.TEvapDesign; } // frost melted during time step less than amount of ice at start @@ -15043,8 +15004,8 @@ namespace RefrigeratedCase { // Reduce defrost heat load on the zone by amount of ice melted during time step // But DefrostSchedule not changed FrostChangekg = max(0.0, min((DefrostEnergy / IceMeltEnthalpy), StartFrostKg)); - DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / SecInHour; - if (!WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; + DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / DataGlobals::SecInHour; + if (!DataGlobals::WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; } // Temperature termination vs. time-clock control type } else { // DefrostSchedule <= 0 or have None or OffCycle @@ -15057,7 +15018,7 @@ namespace RefrigeratedCase { // ReportWarehouseCoil(CoilID) warehouse_coil.ThermalDefrostPower = DefrostLoad; if (warehouse_coil.DefrostType == DefrostElec) { - warehouse_coil.ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.ElecDefrostPower = DefrostCap * DefrostSchedule; } else { warehouse_coil.ElecDefrostConsumption = 0.0; @@ -15069,22 +15030,22 @@ namespace RefrigeratedCase { // LatentLoadServed is positive for latent heat removed from zone // SensLoadFromZone positive for heat REMOVED from zone, switch when do credit to zone warehouse_coil.SensCreditRate = SensLoadFromZone; - warehouse_coil.SensCreditEnergy = SensLoadFromZone * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.SensCreditEnergy = SensLoadFromZone * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.LatCreditRate = LatLoadServed; - warehouse_coil.LatCreditEnergy = LatLoadServed * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.LatCreditEnergy = LatLoadServed * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.LatKgPerS_ToZone = WaterRemovRate; warehouse_coil.TotalCoolingLoad = CoilCapTotal; - warehouse_coil.TotalCoolingEnergy = CoilCapTotal * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.TotalCoolingEnergy = CoilCapTotal * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.SensCoolingEnergyRate = SensLoadGross; - warehouse_coil.SensCoolingEnergy = SensLoadGross * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.SensCoolingEnergy = SensLoadGross * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.SensHeatRatio = SHR; warehouse_coil.ElecFanPower = FanPowerActual; - warehouse_coil.ElecFanConsumption = FanPowerActual * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.ElecFanConsumption = FanPowerActual * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.ElecHeaterPower = HeaterLoad; - warehouse_coil.ElecHeaterConsumption = HeaterLoad * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.ElecHeaterConsumption = HeaterLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.TotalElecPower = FanPowerActual + HeaterLoad + warehouse_coil.ElecDefrostPower; - warehouse_coil.TotalElecConsumption = warehouse_coil.TotalElecPower * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.TotalElecConsumption = warehouse_coil.TotalElecPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; if (warehouse_coil.SensCreditRate >= 0.0) { warehouse_coil.ReportSensCoolCreditRate = warehouse_coil.SensCreditRate; @@ -15093,8 +15054,8 @@ namespace RefrigeratedCase { warehouse_coil.ReportSensCoolCreditRate = 0.0; warehouse_coil.ReportHeatingCreditRate = -warehouse_coil.SensCreditRate; } - warehouse_coil.ReportSensCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditRate * DataHVACGlobals::TimeStepSys * SecInHour; - warehouse_coil.ReportHeatingCreditEnergy = warehouse_coil.ReportHeatingCreditRate * DataHVACGlobals::TimeStepSys * SecInHour; + warehouse_coil.ReportSensCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + warehouse_coil.ReportHeatingCreditEnergy = warehouse_coil.ReportHeatingCreditRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; warehouse_coil.ReportTotalCoolCreditRate = warehouse_coil.ReportSensCoolCreditRate + warehouse_coil.LatCreditRate; warehouse_coil.ReportTotalCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditEnergy + warehouse_coil.LatCreditEnergy; @@ -15128,14 +15089,12 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // initialize zone gain terms at begin environment - using DataGlobals::BeginEnvrnFlag; - static bool MyEnvrnFlag(true); int loop; CheckRefrigerationInput(); - if (BeginEnvrnFlag && MyEnvrnFlag) { + if (DataGlobals::BeginEnvrnFlag && MyEnvrnFlag) { if (DataHeatBalance::NumRefrigSystems > 0) { for (auto &e : System) { @@ -15182,7 +15141,7 @@ namespace RefrigeratedCase { } MyEnvrnFlag = false; } - if (!BeginEnvrnFlag) MyEnvrnFlag = true; + if (!DataGlobals::BeginEnvrnFlag) MyEnvrnFlag = true; return; @@ -15202,8 +15161,6 @@ namespace RefrigeratedCase { // to zero when called on zone timestep. Otherwise, values may be held over when // no HVAC load calls module during that zone time step. - using DataWater::WaterStorage; - static int DemandARRID(0); // Index to water tank Demand used for evap condenser static int TankID(0); // Index to water tank used for evap condenser static int RackNum(0); // Index to refrigerated rack @@ -15235,7 +15192,7 @@ namespace RefrigeratedCase { if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; TankID = RefrigRack(RackNum).EvapWaterSupTankID; - WaterStorage(TankID).VdotRequestDemand(DemandARRID) = 0.0; + DataWater::WaterStorage(TankID).VdotRequestDemand(DemandARRID) = 0.0; } } } // RackNum @@ -15259,7 +15216,7 @@ namespace RefrigeratedCase { if (Condenser(CondID).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = Condenser(CondID).EvapWaterTankDemandARRID; TankID = Condenser(CondID).EvapWaterSupTankID; - WaterStorage(TankID).VdotRequestDemand(DemandARRID) = 0.0; + DataWater::WaterStorage(TankID).VdotRequestDemand(DemandARRID) = 0.0; } } } // ICond From 7a81a54910d3d79a5a2ccc2502ff8975ec8e00e8 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 14:22:30 -0700 Subject: [PATCH 42/86] step 3 - partial cleanup warnings --- src/EnergyPlus/RefrigeratedCase.cc | 4 +- src/EnergyPlus/RefrigeratedCase.hh | 67 +++++++++++++----------------- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 4eace08e6d0..50f9593aa39 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -179,7 +179,7 @@ namespace RefrigeratedCase { // requirements. The gas cooler fans can be described as single-speed, two-speed, or variable speed. During // transcritical operation, the optimal gas cooler pressure, which maximizes the system's COP, is determined as // a function of the ambient air temperature. During subcritical operation, the condensing pressure is allowed to - // float with ambient temperature in order to acheive maximum performance. + // float with ambient temperature in order to achieve maximum performance. // This module was designed to be accessed once for each time step. It uses several accumulating variables // to carry unmet loads from one time step to the next (cases/walk-ins and compressors. Also, it meets @@ -1369,7 +1369,7 @@ namespace RefrigeratedCase { // Set return air node number RefrigCase(CaseNum).ZoneRANode = 0; - std::string retNodeName = ""; + std::string retNodeName; if (!lAlphaBlanks(15)) { retNodeName = Alphas(15); } diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 4873bb89a4c..315c5eee130 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -60,11 +60,6 @@ namespace EnergyPlus { namespace RefrigeratedCase { - // Using/Aliasing - - // Data - // MODULE PARAMETER DEFINITIONS: - // Anti-sweat heater control type extern int const ASNone; extern int const ASConstant; @@ -136,7 +131,6 @@ namespace RefrigeratedCase { extern int const DefrostElec; extern int const DefrostNone; extern int const DefrostOffCycle; - extern int const RatedCapacityTotal; extern int const EuropeanSC1Std; extern int const EuropeanSC1Nom; @@ -293,7 +287,6 @@ namespace RefrigeratedCase { { // Members std::string Name; // Name of refrigerated display case - // CHARACTER(len=MaxNameLength) :: Schedule=' ' ! Display case availability schedule name std::string ZoneName; // Zone or Location of Display Case int NumSysAttach; // Number of systems attached to case, error if /=1 int SchedPtr; // Index to the correct availability schedule @@ -414,8 +407,6 @@ namespace RefrigeratedCase { { } - void clear_state(); - // Reset Initialization Values to Zeros void reset_init() { @@ -546,7 +537,8 @@ namespace RefrigeratedCase { // Default Constructor RefrigRackData() - : CoilFlag(false), EndUseSubcategory("General"), HeatRejectionLocation(0), CondenserType(0), EvapEffect(0.9), CondenserAirFlowRate(0.0), + : CoilFlag(false), EndUseSubcategory("General"), HeatRejectionLocation(0), CondenserType(0), LaggedUsedWaterHeater(0.0), + LaggedUsedHVACCoil(0.0), EvapEffect(0.9), CondenserAirFlowRate(0.0), EvapPumpPower(0.0), ActualEvapPumpPower(0.0), EvapPumpConsumption(0.0), EvapWaterConsumpRate(0.0), EvapWaterConsumption(0.0), EvapSchedPtr(0), BasinHeaterPowerFTempDiff(0.0), BasinHeaterSetPointTemp(2.0), BasinHeaterPower(0.0), BasinHeaterConsumption(0.0), RatedCOP(0.0), COPFTempPtr(0), NumCases(0), NumCoils(0), NumWalkIns(0), EvapWaterSupplyMode(WaterSupplyFromMains), @@ -1334,7 +1326,6 @@ namespace RefrigeratedCase { Array1D_int StockDoorProtectType; // Index to door protection type Array1D_int ZoneNodeNum; // Index to Zone Node Array1D_int ZoneNum; // Index to Zone - Real64 CircFanConsumption; // Operating energy of Walk In fan [J] Real64 CircFanPower; // Operating power of Walk In fan [W] Real64 CoilFanPower; // Operating power of Walk In evap coil fan [W] Real64 IceTemp; // Temperature of Ice Mass [C] @@ -1558,7 +1549,7 @@ namespace RefrigeratedCase { WarehouseCoilData() : SecStatusFirst(false), SecStatusLast(false), SysStatusFirst(false), SysStatusLast(false), CoilFanSchedPtr(0), DefrostDripDownSchedPtr(0), DefrostSchedPtr(0), DefrostControlType(0), DefrostType(0), FanType(0), HeaterSchedPtr(0), NumSysAttach(0), - RatingType(0), SchedPtr(0), SCIndex(0), SecServeID(0), SysServeID(0), VerticalLocation(0), ZoneNodeNum(0), ZoneNum(0), + RatingType(0), SchedPtr(0), SCIndex(0), SecServeID(0), SHRCorrectionType(0), SHRCorrectionCurvePtr(0), SysServeID(0), VerticalLocation(0), ZoneNodeNum(0), ZoneNum(0), CorrMaterial(0.0), CorrRefrigerant(0.0), DefrostCapacity(0.0), DefrostPower(0.0), DeltaFreezeKgFrost(0.0), DefEnergyFraction(0.0), DesignRefrigInventory(0.0), FanMinAirFlowRatio(0.0), HeaterPower(0.0), HotDefrostCondCredit(0.0), IceTemp(0.0), IceTempSaved(0.0), KgFrost(0.0), KgFrostSaved(0.0), MaxTemperatureDif(0.0), RatedAirVolumeFlow(0.0), RatedCapTotal(0.0), RatedFanPower(0.0), RatedRH(0.0), @@ -1610,7 +1601,7 @@ namespace RefrigeratedCase { std::string ZoneName; // Name of zone where chiller set is located Array1D_int CoilNum; // ID number of Individual Chiller in set int ChillerSetID; // ID number for this set of chillers (all serving one zone, - // but can be chilled by mult systems) + // but can be chilled by multi systems) int SchedPtr; // Schedule to take whole set off-line if needed int NodeNumInlet; // Node ID Number of inlet for chiller set as a whole, not identified for specific coils int NodeNumOutlet; // Node ID Number of outlet for chiller set as a whole, not identified for specific coils @@ -1705,70 +1696,70 @@ namespace RefrigeratedCase { void InitRefrigerationPlantConnections(); - void CalcRackSystem(int const RackNum); + void CalcRackSystem(int RackNum); - void ReportRackSystem(int const RackNum); + void ReportRackSystem(int RackNum); - void CalculateCase(int const CaseID); // Absolute pointer to refrigerated case + void CalculateCase(int CaseID); // Absolute pointer to refrigerated case - void SimRefrigCondenser(int const SysType, std::string const &CompName, int &CompIndex, bool const FirstHVACIteration, bool const InitLoopEquip); + void SimRefrigCondenser(int SysType, std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); - void UpdateRefrigCondenser(int const Num, int const SysType); + void UpdateRefrigCondenser(int Num, int SysType); void SimulateDetailedRefrigerationSystems(); void SimulateDetailedTransRefrigSystems(); - void CalcDetailedSystem(int const SysNum); + void CalcDetailedSystem(int SysNum); - void CalcDetailedTransSystem(int const SysNum); + void CalcDetailedTransSystem(int SysNum); - void CalculateCondensers(int const SysNum); + void CalculateCondensers(int SysNum); - void CalcGasCooler(int const SysNum); + void CalcGasCooler(int SysNum); - void CalculateCompressors(int const SysNum); + void CalculateCompressors(int SysNum); - void CalculateTransCompressors(int const SysNum); + void CalculateTransCompressors(int SysNum); - void CalculateSubcoolers(int const SysNum); + void CalculateSubcoolers(int SysNum); void GetRefrigeratedRackIndex(std::string const &Name, int &IndexPtr, - int const SysType, + int SysType, bool &ErrorsFound, Optional_string_const ThisObjectType = _, Optional_bool_const SuppressWarning = _); void ReportRefrigerationComponents(); - void CalculateWalkIn(int const WalkInID); // Absolute pointer to Walk In + void CalculateWalkIn(int WalkInID); // Absolute pointer to Walk In - void CalculateSecondary(int const SecondaryNum); + void CalculateSecondary(int SecondaryNum); void SumZoneImpacts(); void CheckRefrigerationInput(); void SimAirChillerSet(std::string const &AirChillerSetName, - int const ZoneNum, - bool const FirstHVACIteration, + int ZoneNum, + bool FirstHVACIteration, Real64 &SysOutputProvided, Real64 &LatOutputProvided, int &AirChillerSetPtr // from ZoneEquipList(CurZoneEqNum)%EquipIndex(EquipPtr) ); - void CalculateAirChillerSets(int const AirChillerSetID); + void CalculateAirChillerSets(int AirChillerSetID); - void FinalRateCoils(bool const DeRate, // True if compressor rack or secondary ht exchanger unable to provide capacity - int const SystemSourceType, // Secondarysystem or DetailedSystem - int const SystemID, // ID for Secondary loop or detailed system calling for derate - Real64 const InitialTotalLoad, // Load on system or secondary loop as initially calculated [W] - Real64 const AvailableTotalLoad // Load that system or secondary loop is able to serve [W] + void FinalRateCoils(bool DeRate, // True if compressor rack or secondary ht exchanger unable to provide capacity + int SystemSourceType, // SecondarySystem or DetailedSystem + int SystemID, // ID for Secondary loop or detailed system calling for derate + Real64 InitialTotalLoad, // Load on system or secondary loop as initially calculated [W] + Real64 AvailableTotalLoad // Load that system or secondary loop is able to serve [W] ); - void CalculateCoil(int const CoilID, - Real64 const QZnReq // sensible load required + void CalculateCoil(int CoilID, + Real64 QZnReq // sensible load required ); void FigureRefrigerationZoneGains(); From 627e630f71ec62f8b1825128339e78669aa9fe50 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 14:38:30 -0700 Subject: [PATCH 43/86] step 4 - partial remove statics --- src/EnergyPlus/RefrigeratedCase.cc | 1562 ++++++++++++++-------------- 1 file changed, 775 insertions(+), 787 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 50f9593aa39..6678f7ef40e 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -567,7 +567,6 @@ namespace RefrigeratedCase { Array1D_bool lAlphaBlanks; // Logic array, alpha input blank = .TRUE. Array1D_bool lNumericBlanks; // Logic array, numeric input blank = .TRUE. - static bool CaseLoads(false); // Flag to help verify load type with loads served by systems cooled by cascade condensers static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine static bool StartCycle(false); // Flag for counting defrost cycles @@ -5483,7 +5482,8 @@ namespace RefrigeratedCase { } } // CondID } else { // %coilflag == false, so no coil loads prev identified directly or through secondary loop - CaseLoads = false; + // Flag to help verify load type with loads served by systems cooled by cascade condensers + bool CaseLoads = false; NumCascadeLoadsChecked = 0; for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { // look at All cascade condenser loads on system if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) continue; @@ -6385,258 +6385,246 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Set up the report variables. - static int CaseNum(0); - static int CoilNum(0); - static int SecondNum(0); - static int WalkInNum(0); - static int RackNum(0); - static int RefrigSysNum(0); - static int CompNum(0); - static int CompIndex(0); - static int CondNum(0); - static int GCNum(0); - static int SubcoolNum(0); - static int ZoneID(0); static std::string Walkin_and_zone_name; // concat name for walk-in/zone credit reporting if (NumSimulationCases > 0) { // Setup Report Variables for simulated Refrigerated Case (do not report unused cases) // CurrentModuleObject='Refrigeration:Case' - for (CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { - if (RefrigCase(CaseNum).NumSysAttach == 1) { + for (int caseNum = 1; caseNum <= NumSimulationCases; ++caseNum) { + if (RefrigCase(caseNum).NumSysAttach == 1) { SetupOutputVariable("Refrigeration Case Evaporator Total Cooling Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).TotalCoolingLoad, + RefrigCase(caseNum).TotalCoolingLoad, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Evaporator Total Cooling Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).TotalCoolingEnergy, + RefrigCase(caseNum).TotalCoolingEnergy, "Zone", "Sum", - RefrigCase(CaseNum).Name, + RefrigCase(caseNum).Name, _, "ENERGYTRANSFER", "REFRIGERATION", _, "Building", - RefrigCase(CaseNum).ZoneName); + RefrigCase(caseNum).ZoneName); SetupOutputVariable("Refrigeration Case Evaporator Sensible Cooling Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).SensCoolingEnergyRate, + RefrigCase(caseNum).SensCoolingEnergyRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Evaporator Sensible Cooling Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).SensCoolingEnergy, + RefrigCase(caseNum).SensCoolingEnergy, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Evaporator Latent Cooling Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).LatCoolingEnergyRate, + RefrigCase(caseNum).LatCoolingEnergyRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Evaporator Latent Cooling Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).LatCoolingEnergy, + RefrigCase(caseNum).LatCoolingEnergy, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Zone Sensible Cooling Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).SensZoneCreditCoolRate, + RefrigCase(caseNum).SensZoneCreditCoolRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Zone Sensible Cooling Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).SensZoneCreditCool, + RefrigCase(caseNum).SensZoneCreditCool, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Zone Sensible Heating Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).SensZoneCreditHeatRate, + RefrigCase(caseNum).SensZoneCreditHeatRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Zone Sensible Heating Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).SensZoneCreditHeat, + RefrigCase(caseNum).SensZoneCreditHeat, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Zone Latent Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).LatZoneCreditRate, + RefrigCase(caseNum).LatZoneCreditRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Zone Latent Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).LatZoneCredit, + RefrigCase(caseNum).LatZoneCredit, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Return Air Sensible Cooling Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).SensHVACCreditCoolRate, + RefrigCase(caseNum).SensHVACCreditCoolRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Return Air Sensible Cooling Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).SensHVACCreditCool, + RefrigCase(caseNum).SensHVACCreditCool, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Return Air Sensible Heating Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).SensHVACCreditHeatRate, + RefrigCase(caseNum).SensHVACCreditHeatRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Return Air Sensible Heating Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).SensHVACCreditHeat, + RefrigCase(caseNum).SensHVACCreditHeat, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Return Air Latent Rate", OutputProcessor::Unit::W, - RefrigCase(CaseNum).LatHVACCreditRate, + RefrigCase(caseNum).LatHVACCreditRate, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Return Air Latent Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).LatHVACCredit, + RefrigCase(caseNum).LatHVACCredit, "Zone", "Sum", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Evaporator Fan Electric Power", OutputProcessor::Unit::W, - RefrigCase(CaseNum).ElecFanPower, + RefrigCase(caseNum).ElecFanPower, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Evaporator Fan Electric Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).ElecFanConsumption, + RefrigCase(caseNum).ElecFanConsumption, "Zone", "Sum", - RefrigCase(CaseNum).Name, + RefrigCase(caseNum).Name, _, "ELECTRICITY", "REFRIGERATION", "General", "Building", - RefrigCase(CaseNum).ZoneName); + RefrigCase(caseNum).ZoneName); SetupOutputVariable("Refrigeration Case Lighting Electric Power", OutputProcessor::Unit::W, - RefrigCase(CaseNum).ElecLightingPower, + RefrigCase(caseNum).ElecLightingPower, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Lighting Electric Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).ElecLightingConsumption, + RefrigCase(caseNum).ElecLightingConsumption, "Zone", "Sum", - RefrigCase(CaseNum).Name, + RefrigCase(caseNum).Name, _, "ELECTRICITY", "REFRIGERATION", "General", "Building", - RefrigCase(CaseNum).ZoneName); + RefrigCase(caseNum).ZoneName); // Report defrost energy curve value only for cases having electric or hot-gas defrost with temperature termination - if (RefrigCase(CaseNum).DefrostType == DefElectricTerm || RefrigCase(CaseNum).DefrostType == DefHotFluidTerm) { + if (RefrigCase(caseNum).DefrostType == DefElectricTerm || RefrigCase(caseNum).DefrostType == DefHotFluidTerm) { SetupOutputVariable("Refrigeration Case Defrost Energy Correction Curve Value", OutputProcessor::Unit::None, - RefrigCase(CaseNum).DefEnergyCurveValue, + RefrigCase(caseNum).DefEnergyCurveValue, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); } SetupOutputVariable("Refrigeration Case Latent Credit Curve Value", OutputProcessor::Unit::None, - RefrigCase(CaseNum).LatEnergyCurveValue, + RefrigCase(caseNum).LatEnergyCurveValue, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); // Report only for cases having anti-sweat heaters - if (RefrigCase(CaseNum).AntiSweatControlType > ASNone) { + if (RefrigCase(caseNum).AntiSweatControlType > ASNone) { SetupOutputVariable("Refrigeration Case Anti Sweat Electric Power", OutputProcessor::Unit::W, - RefrigCase(CaseNum).ElecAntiSweatPower, + RefrigCase(caseNum).ElecAntiSweatPower, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Anti Sweat Electric Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).ElecAntiSweatConsumption, + RefrigCase(caseNum).ElecAntiSweatConsumption, "Zone", "Sum", - RefrigCase(CaseNum).Name, + RefrigCase(caseNum).Name, _, "ELECTRICITY", "REFRIGERATION", "General", "Building", - RefrigCase(CaseNum).ZoneName); + RefrigCase(caseNum).ZoneName); } // Report only for cases using electric defrost - if (RefrigCase(CaseNum).DefrostType == DefElectric || RefrigCase(CaseNum).DefrostType == DefElectricOnDemand || - RefrigCase(CaseNum).DefrostType == DefElectricTerm) { + if (RefrigCase(caseNum).DefrostType == DefElectric || RefrigCase(caseNum).DefrostType == DefElectricOnDemand || + RefrigCase(caseNum).DefrostType == DefElectricTerm) { SetupOutputVariable("Refrigeration Case Defrost Electric Power", OutputProcessor::Unit::W, - RefrigCase(CaseNum).ElecDefrostPower, + RefrigCase(caseNum).ElecDefrostPower, "Zone", "Average", - RefrigCase(CaseNum).Name); + RefrigCase(caseNum).Name); SetupOutputVariable("Refrigeration Case Defrost Electric Energy", OutputProcessor::Unit::J, - RefrigCase(CaseNum).ElecDefrostConsumption, + RefrigCase(caseNum).ElecDefrostConsumption, "Zone", "Sum", - RefrigCase(CaseNum).Name, + RefrigCase(caseNum).Name, _, "ELECTRICITY", "REFRIGERATION", "General", "Building", - RefrigCase(CaseNum).ZoneName); + RefrigCase(caseNum).ZoneName); } // register refrigeration case credits as internal gains - if (RefrigCase(CaseNum).ActualZoneNum > 0) { - SetupZoneInternalGain(RefrigCase(CaseNum).ActualZoneNum, + if (RefrigCase(caseNum).ActualZoneNum > 0) { + SetupZoneInternalGain(RefrigCase(caseNum).ActualZoneNum, "Refrigeration:Case", - RefrigCase(CaseNum).Name, + RefrigCase(caseNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationCase, - RefrigCase(CaseNum).SensZoneCreditRate, - RefrigCase(CaseNum).SensHVACCreditRate, + RefrigCase(caseNum).SensZoneCreditRate, + RefrigCase(caseNum).SensHVACCreditRate, _, - RefrigCase(CaseNum).LatZoneCreditRate, - RefrigCase(CaseNum).LatHVACCreditRate, + RefrigCase(caseNum).LatZoneCreditRate, + RefrigCase(caseNum).LatHVACCreditRate, _, _, - RefrigCase(CaseNum).ZoneRANode); + RefrigCase(caseNum).ZoneRANode); } } // END IF (.NOT. RefrigCase(CaseNum)%unusedCase) } @@ -6645,68 +6633,68 @@ namespace RefrigeratedCase { if (NumSimulationWalkIns > 0) { // Setup Report Variables for simulated Walk In (do not report unused WalkIns) // CurrentModuleObject='Refrigeration:WalkIn' - for (WalkInNum = 1; WalkInNum <= NumSimulationWalkIns; ++WalkInNum) { - if (WalkIn(WalkInNum).NumSysAttach == 1) { // ensure no unuseds reported + for (int walkInNum = 1; walkInNum <= NumSimulationWalkIns; ++walkInNum) { + if (WalkIn(walkInNum).NumSysAttach == 1) { // ensure no unuseds reported SetupOutputVariable("Refrigeration Walk In Evaporator Total Cooling Rate", OutputProcessor::Unit::W, - WalkIn(WalkInNum).TotalCoolingLoad, + WalkIn(walkInNum).TotalCoolingLoad, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Evaporator Total Cooling Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).TotalCoolingEnergy, + WalkIn(walkInNum).TotalCoolingEnergy, "Zone", "Sum", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Evaporator Sensible Cooling Rate", OutputProcessor::Unit::W, - WalkIn(WalkInNum).TotSensCoolingEnergyRate, + WalkIn(walkInNum).TotSensCoolingEnergyRate, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Evaporator Sensible Cooling Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).TotSensCoolingEnergy, + WalkIn(walkInNum).TotSensCoolingEnergy, "Zone", "Sum", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Evaporator Latent Cooling Rate", OutputProcessor::Unit::W, - WalkIn(WalkInNum).TotLatCoolingEnergyRate, + WalkIn(walkInNum).TotLatCoolingEnergyRate, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Evaporator Latent Cooling Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).TotLatCoolingEnergy, + WalkIn(walkInNum).TotLatCoolingEnergy, "Zone", "Sum", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Ancillary Electric Power", OutputProcessor::Unit::W, - WalkIn(WalkInNum).TotalElecPower, + WalkIn(walkInNum).TotalElecPower, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Ancillary Electric Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).TotalElecConsumption, + WalkIn(walkInNum).TotalElecConsumption, "Zone", "Sum", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Fan Electric Power", OutputProcessor::Unit::W, - WalkIn(WalkInNum).ElecFanPower, + WalkIn(walkInNum).ElecFanPower, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Fan Electric Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).ElecFanConsumption, + WalkIn(walkInNum).ElecFanConsumption, "Zone", "Sum", - WalkIn(WalkInNum).Name, + WalkIn(walkInNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -6714,16 +6702,16 @@ namespace RefrigeratedCase { "Building"); SetupOutputVariable("Refrigeration Walk In Lighting Electric Power", OutputProcessor::Unit::W, - WalkIn(WalkInNum).ElecLightingPower, + WalkIn(walkInNum).ElecLightingPower, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Lighting Electric Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).ElecLightingConsumption, + WalkIn(walkInNum).ElecLightingConsumption, "Zone", "Sum", - WalkIn(WalkInNum).Name, + WalkIn(walkInNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -6731,16 +6719,16 @@ namespace RefrigeratedCase { "Building"); SetupOutputVariable("Refrigeration Walk In Heater Electric Power", OutputProcessor::Unit::W, - WalkIn(WalkInNum).ElecHeaterPower, + WalkIn(walkInNum).ElecHeaterPower, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Heater Electric Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).ElecHeaterConsumption, + WalkIn(walkInNum).ElecHeaterConsumption, "Zone", "Sum", - WalkIn(WalkInNum).Name, + WalkIn(walkInNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -6748,19 +6736,19 @@ namespace RefrigeratedCase { "Building"); // Report only for WalkIns using electric defrost - if (WalkIn(WalkInNum).DefrostType == WalkInDefrostElec) { + if (WalkIn(walkInNum).DefrostType == WalkInDefrostElec) { SetupOutputVariable("Refrigeration Walk In Defrost Electric Power", OutputProcessor::Unit::W, - WalkIn(WalkInNum).ElecDefrostPower, + WalkIn(walkInNum).ElecDefrostPower, "Zone", "Average", - WalkIn(WalkInNum).Name); + WalkIn(walkInNum).Name); SetupOutputVariable("Refrigeration Walk In Defrost Electric Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).ElecDefrostConsumption, + WalkIn(walkInNum).ElecDefrostConsumption, "Zone", "Sum", - WalkIn(WalkInNum).Name, + WalkIn(walkInNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -6772,56 +6760,56 @@ namespace RefrigeratedCase { // For "IDOut" variable in SetupOutputVariable, need to create a single name that includes // both the walk-in name and the zone name - see "Walkin_and_zone_name" concatination // This new variable name is important if using an rvi file! - for (ZoneID = 1; ZoneID <= WalkIn(WalkInNum).NumZones; ++ZoneID) { + for (int zoneId = 1; zoneId <= WalkIn(walkInNum).NumZones; ++zoneId) { - Walkin_and_zone_name = WalkIn(WalkInNum).Name + "InZone" + WalkIn(WalkInNum).ZoneName(ZoneID); + Walkin_and_zone_name = WalkIn(walkInNum).Name + "InZone" + WalkIn(walkInNum).ZoneName(zoneId); SetupOutputVariable("Refrigeration Walk In Zone Sensible Cooling Rate", OutputProcessor::Unit::W, - WalkIn(WalkInNum).SensZoneCreditCoolRate(ZoneID), + WalkIn(walkInNum).SensZoneCreditCoolRate(zoneId), "Zone", "Average", Walkin_and_zone_name); SetupOutputVariable("Refrigeration Walk In Zone Sensible Cooling Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).SensZoneCreditCool(ZoneID), + WalkIn(walkInNum).SensZoneCreditCool(zoneId), "Zone", "Sum", Walkin_and_zone_name); SetupOutputVariable("Refrigeration Walk In Zone Sensible Heating Rate", OutputProcessor::Unit::W, - WalkIn(WalkInNum).SensZoneCreditHeatRate(ZoneID), + WalkIn(walkInNum).SensZoneCreditHeatRate(zoneId), "Zone", "Average", Walkin_and_zone_name); SetupOutputVariable("Refrigeration Walk In Zone Sensible Heating Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).SensZoneCreditHeat(ZoneID), + WalkIn(walkInNum).SensZoneCreditHeat(zoneId), "Zone", "Sum", Walkin_and_zone_name); SetupOutputVariable("Refrigeration Walk In Zone Latent Rate", OutputProcessor::Unit::W, - WalkIn(WalkInNum).LatZoneCreditRate(ZoneID), + WalkIn(walkInNum).LatZoneCreditRate(zoneId), "Zone", "Average", Walkin_and_zone_name); SetupOutputVariable("Refrigeration Walk In Zone Latent Energy", OutputProcessor::Unit::J, - WalkIn(WalkInNum).LatZoneCredit(ZoneID), + WalkIn(walkInNum).LatZoneCredit(zoneId), "Zone", "Sum", Walkin_and_zone_name); - if (WalkIn(WalkInNum).ZoneNum(ZoneID) > 0) - SetupZoneInternalGain(WalkIn(WalkInNum).ZoneNum(ZoneID), + if (WalkIn(walkInNum).ZoneNum(zoneId) > 0) + SetupZoneInternalGain(WalkIn(walkInNum).ZoneNum(zoneId), "Refrigeration:WalkIn", Walkin_and_zone_name, DataHeatBalance::IntGainTypeOf_RefrigerationWalkIn, - WalkIn(WalkInNum).SensZoneCreditRate(ZoneID), + WalkIn(walkInNum).SensZoneCreditRate(zoneId), _, _, - WalkIn(WalkInNum).LatZoneCreditRate(ZoneID)); + WalkIn(walkInNum).LatZoneCreditRate(zoneId)); } // ZoneID } //(.NOT. WalkIn( WalkInNum)%unusedWalkIn) @@ -6831,74 +6819,74 @@ namespace RefrigeratedCase { if (NumSimulationRefrigAirChillers > 0) { // Setup Report Variables for simulated Warehouse coils (do not report unused warehouse coils) // CurrentModuleObject='Refrigeration:AirChiller' - for (CoilNum = 1; CoilNum <= NumSimulationRefrigAirChillers; ++CoilNum) { - if (WarehouseCoil(CoilNum).NumSysAttach == 1) { // ensure no unuseds reported + for (int coilNum = 1; coilNum <= NumSimulationRefrigAirChillers; ++coilNum) { + if (WarehouseCoil(coilNum).NumSysAttach == 1) { // ensure no unuseds reported SetupOutputVariable("Refrigeration Zone Air Chiller Total Cooling Rate", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).TotalCoolingLoad, + WarehouseCoil(coilNum).TotalCoolingLoad, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Cooling Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).TotalCoolingEnergy, + WarehouseCoil(coilNum).TotalCoolingEnergy, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Cooling Rate", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).SensCoolingEnergyRate, + WarehouseCoil(coilNum).SensCoolingEnergyRate, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Cooling Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).SensCoolingEnergy, + WarehouseCoil(coilNum).SensCoolingEnergy, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Latent Cooling Rate", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).LatCreditRate, + WarehouseCoil(coilNum).LatCreditRate, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Latent Cooling Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).LatCreditEnergy, + WarehouseCoil(coilNum).LatCreditEnergy, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Water Removed Mass Flow Rate", OutputProcessor::Unit::kg_s, - WarehouseCoil(CoilNum).LatKgPerS_ToZone, + WarehouseCoil(coilNum).LatKgPerS_ToZone, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Electric Power", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).TotalElecPower, + WarehouseCoil(coilNum).TotalElecPower, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Electric Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).TotalElecConsumption, + WarehouseCoil(coilNum).TotalElecConsumption, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); // components are metered seperately + WarehouseCoil(coilNum).Name); // components are metered seperately SetupOutputVariable("Refrigeration Zone Air Chiller Fan Electric Power", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).ElecFanPower, + WarehouseCoil(coilNum).ElecFanPower, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Fan Electric Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).ElecFanConsumption, + WarehouseCoil(coilNum).ElecFanConsumption, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name, + WarehouseCoil(coilNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -6906,16 +6894,16 @@ namespace RefrigeratedCase { "Building"); SetupOutputVariable("Refrigeration Zone Air Chiller Heater Electric Power", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).ElecHeaterPower, + WarehouseCoil(coilNum).ElecHeaterPower, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Heater Electric Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).ElecHeaterConsumption, + WarehouseCoil(coilNum).ElecHeaterConsumption, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name, + WarehouseCoil(coilNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -6923,67 +6911,67 @@ namespace RefrigeratedCase { "Building"); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Heat Ratio", OutputProcessor::Unit::None, - WarehouseCoil(CoilNum).SensHeatRatio, + WarehouseCoil(coilNum).SensHeatRatio, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Frost Accumulation Mass", OutputProcessor::Unit::kg, - WarehouseCoil(CoilNum).KgFrost, + WarehouseCoil(coilNum).KgFrost, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Zone Total Cooling Rate", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).ReportTotalCoolCreditRate, + WarehouseCoil(coilNum).ReportTotalCoolCreditRate, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Zone Total Cooling Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).ReportTotalCoolCreditEnergy, + WarehouseCoil(coilNum).ReportTotalCoolCreditEnergy, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Zone Sensible Cooling Rate", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).ReportSensCoolCreditRate, + WarehouseCoil(coilNum).ReportSensCoolCreditRate, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Zone Sensible Cooling Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).ReportSensCoolCreditEnergy, + WarehouseCoil(coilNum).ReportSensCoolCreditEnergy, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Zone Heating Rate", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).ReportHeatingCreditRate, + WarehouseCoil(coilNum).ReportHeatingCreditRate, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Zone Heating Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).ReportHeatingCreditEnergy, + WarehouseCoil(coilNum).ReportHeatingCreditEnergy, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); // Report only for Warehouse coils using electric defrost - if (WarehouseCoil(CoilNum).DefrostType == DefrostElec) { + if (WarehouseCoil(coilNum).DefrostType == DefrostElec) { SetupOutputVariable("Refrigeration Zone Air Chiller Defrost Electric Power", OutputProcessor::Unit::W, - WarehouseCoil(CoilNum).ElecDefrostPower, + WarehouseCoil(coilNum).ElecDefrostPower, "HVAC", "Average", - WarehouseCoil(CoilNum).Name); + WarehouseCoil(coilNum).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Defrost Electric Energy", OutputProcessor::Unit::J, - WarehouseCoil(CoilNum).ElecDefrostConsumption, + WarehouseCoil(coilNum).ElecDefrostConsumption, "HVAC", "Sum", - WarehouseCoil(CoilNum).Name, + WarehouseCoil(coilNum).Name, _, "ELECTRICITY", "REFRIGERATION", @@ -7000,328 +6988,328 @@ namespace RefrigeratedCase { // Report sum of all refrigeration interactions with each zone - for (ZoneID = 1; ZoneID <= DataGlobals::NumOfZones; ++ZoneID) { - if (RefrigPresentInZone(ZoneID)) { + for (int zoneID = 1; zoneID <= DataGlobals::NumOfZones; ++zoneID) { + if (RefrigPresentInZone(zoneID)) { if (HaveCasesOrWalkins) { SetupOutputVariable("Refrigeration Zone Case and Walk In Total Sensible Cooling Rate", OutputProcessor::Unit::W, - DataHeatBalance::RefrigCaseCredit(ZoneID).SenCaseCreditToZone, + DataHeatBalance::RefrigCaseCredit(zoneID).SenCaseCreditToZone, "Zone", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Sensible Cooling Energy", OutputProcessor::Unit::J, - CaseWIZoneReport(ZoneID).SenCaseCreditToZoneEnergy, + CaseWIZoneReport(zoneID).SenCaseCreditToZoneEnergy, "Zone", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Heating Rate", OutputProcessor::Unit::W, - CaseWIZoneReport(ZoneID).HeatingToZoneRate, + CaseWIZoneReport(zoneID).HeatingToZoneRate, "Zone", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Heating Energy", OutputProcessor::Unit::J, - CaseWIZoneReport(ZoneID).HeatingToZoneEnergy, + CaseWIZoneReport(zoneID).HeatingToZoneEnergy, "Zone", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Sensible Cooling Rate", OutputProcessor::Unit::W, - CaseWIZoneReport(ZoneID).SenCoolingToZoneRate, + CaseWIZoneReport(zoneID).SenCoolingToZoneRate, "Zone", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Sensible Cooling Energy", OutputProcessor::Unit::J, - CaseWIZoneReport(ZoneID).SenCoolingToZoneEnergy, + CaseWIZoneReport(zoneID).SenCoolingToZoneEnergy, "Zone", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Latent Cooling Rate", OutputProcessor::Unit::W, - CaseWIZoneReport(ZoneID).LatCoolingToZoneRate, + CaseWIZoneReport(zoneID).LatCoolingToZoneRate, "Zone", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Latent Cooling Energy", OutputProcessor::Unit::J, - CaseWIZoneReport(ZoneID).LatCoolingToZoneEnergy, + CaseWIZoneReport(zoneID).LatCoolingToZoneEnergy, "Zone", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Cooling Rate", OutputProcessor::Unit::W, - CaseWIZoneReport(ZoneID).TotCoolingToZoneRate, + CaseWIZoneReport(zoneID).TotCoolingToZoneRate, "Zone", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Cooling Energy", OutputProcessor::Unit::J, - CaseWIZoneReport(ZoneID).TotCoolingToZoneEnergy, + CaseWIZoneReport(zoneID).TotCoolingToZoneEnergy, "Zone", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Heat Transfer Rate", OutputProcessor::Unit::W, - CaseWIZoneReport(ZoneID).TotHtXferToZoneRate, + CaseWIZoneReport(zoneID).TotHtXferToZoneRate, "Zone", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Case and Walk In Total Heat Transfer Energy", OutputProcessor::Unit::J, - CaseWIZoneReport(ZoneID).TotHtXferToZoneEnergy, + CaseWIZoneReport(zoneID).TotHtXferToZoneEnergy, "Zone", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); } // HaveCasesOrWalkIns if (HaveChillers) { SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Heat Transfer Rate", OutputProcessor::Unit::W, - CoilSysCredit(ZoneID).SenCreditToZoneRate, + CoilSysCredit(zoneID).SenCreditToZoneRate, "HVAC", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Heat Transfer Energy", OutputProcessor::Unit::J, - CoilSysCredit(ZoneID).SenCreditToZoneEnergy, + CoilSysCredit(zoneID).SenCreditToZoneEnergy, "HVAC", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Cooling Rate", OutputProcessor::Unit::W, - CoilSysCredit(ZoneID).ReportSenCoolingToZoneRate, + CoilSysCredit(zoneID).ReportSenCoolingToZoneRate, "HVAC", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Sensible Cooling Energy", OutputProcessor::Unit::J, - CoilSysCredit(ZoneID).ReportSenCoolingToZoneEnergy, + CoilSysCredit(zoneID).ReportSenCoolingToZoneEnergy, "HVAC", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Latent Cooling Rate", OutputProcessor::Unit::W, - CoilSysCredit(ZoneID).ReportLatCreditToZoneRate, + CoilSysCredit(zoneID).ReportLatCreditToZoneRate, "HVAC", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Latent Cooling Energy", OutputProcessor::Unit::J, - CoilSysCredit(ZoneID).ReportLatCreditToZoneEnergy, + CoilSysCredit(zoneID).ReportLatCreditToZoneEnergy, "HVAC", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Water Removed Mass Flow Rate", OutputProcessor::Unit::kg_s, - CoilSysCredit(ZoneID).ReportH20RemovedKgPerS_FromZoneRate, + CoilSysCredit(zoneID).ReportH20RemovedKgPerS_FromZoneRate, "HVAC", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Cooling Rate", OutputProcessor::Unit::W, - CoilSysCredit(ZoneID).ReportTotCoolingToZoneRate, + CoilSysCredit(zoneID).ReportTotCoolingToZoneRate, "HVAC", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Total Cooling Energy", OutputProcessor::Unit::J, - CoilSysCredit(ZoneID).ReportTotCoolingToZoneEnergy, + CoilSysCredit(zoneID).ReportTotCoolingToZoneEnergy, "HVAC", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Heating Rate", OutputProcessor::Unit::W, - CoilSysCredit(ZoneID).ReportHeatingToZoneRate, + CoilSysCredit(zoneID).ReportHeatingToZoneRate, "HVAC", "Average", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); SetupOutputVariable("Refrigeration Zone Air Chiller Heating Energy", OutputProcessor::Unit::J, - CoilSysCredit(ZoneID).ReportHeatingToZoneEnergy, + CoilSysCredit(zoneID).ReportHeatingToZoneEnergy, "HVAC", "Sum", - DataHeatBalance::Zone(ZoneID).Name); + DataHeatBalance::Zone(zoneID).Name); } // HaveChillers } // RefrigPresentInZone(ZoneID) } // ZoneID if (NumSimulationSecondarySystems > 0) { // CurrentModuleObject='Refrigeration:SecondarySystem' - for (SecondNum = 1; SecondNum <= NumSimulationSecondarySystems; ++SecondNum) { - if (Secondary(SecondNum).NumSysAttach == 1) { - if (Secondary(SecondNum).CoilFlag) { // secondary system serves chillers and is solved on HVAC time step + for (int secondNum = 1; secondNum <= NumSimulationSecondarySystems; ++secondNum) { + if (Secondary(secondNum).NumSysAttach == 1) { + if (Secondary(secondNum).CoilFlag) { // secondary system serves chillers and is solved on HVAC time step SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Pump Electric Power", OutputProcessor::Unit::W, - Secondary(SecondNum).PumpPowerTotal, + Secondary(secondNum).PumpPowerTotal, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Pump Electric Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).PumpElecEnergyTotal, + Secondary(secondNum).PumpElecEnergyTotal, "HVAC", "Sum", - Secondary(SecondNum).Name, + Secondary(secondNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Secondary(SecondNum).EndUseSubcategory, + Secondary(secondNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Load Heat Transfer Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).TotalRefrigLoad, + Secondary(secondNum).TotalRefrigLoad, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Load Heat Transfer Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).TotalRefrigEnergy, + Secondary(secondNum).TotalRefrigEnergy, "HVAC", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Total Heat Transfer Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).TotalCoolingLoad, + Secondary(secondNum).TotalCoolingLoad, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Total Heat Transfer Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).TotalCoolingEnergy, + Secondary(secondNum).TotalCoolingEnergy, "HVAC", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Estimated Refrigerant Inventory Mass", OutputProcessor::Unit::kg, - Secondary(SecondNum).RefInventory, + Secondary(secondNum).RefInventory, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Volume Flow Rate", OutputProcessor::Unit::m3_s, - Secondary(SecondNum).FlowVolActual, + Secondary(secondNum).FlowVolActual, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Pipe Heat Gain Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).DistPipeHeatGain, + Secondary(secondNum).DistPipeHeatGain, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Pipe Heat Gain Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).DistPipeHeatGainEnergy, + Secondary(secondNum).DistPipeHeatGainEnergy, "HVAC", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Receiver Heat Gain Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).ReceiverHeatGain, + Secondary(secondNum).ReceiverHeatGain, "HVAC", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Air Chiller Secondary Loop Receiver Heat Gain Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).ReceiverHeatGainEnergy, + Secondary(secondNum).ReceiverHeatGainEnergy, "HVAC", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); } else { // Secondary loop serves cases and walk-ins on zone(load) time step SetupOutputVariable("Refrigeration Secondary Loop Pump Electric Power", OutputProcessor::Unit::W, - Secondary(SecondNum).PumpPowerTotal, + Secondary(secondNum).PumpPowerTotal, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Pump Electric Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).PumpElecEnergyTotal, + Secondary(secondNum).PumpElecEnergyTotal, "Zone", "Sum", - Secondary(SecondNum).Name, + Secondary(secondNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Secondary(SecondNum).EndUseSubcategory, + Secondary(secondNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Secondary Loop Load Heat Transfer Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).TotalRefrigLoad, + Secondary(secondNum).TotalRefrigLoad, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Load Heat Transfer Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).TotalRefrigEnergy, + Secondary(secondNum).TotalRefrigEnergy, "Zone", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Total Heat Transfer Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).TotalCoolingLoad, + Secondary(secondNum).TotalCoolingLoad, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Total Heat Transfer Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).TotalCoolingEnergy, + Secondary(secondNum).TotalCoolingEnergy, "Zone", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Estimated Refrigerant Inventory Mass", OutputProcessor::Unit::kg, - Secondary(SecondNum).RefInventory, + Secondary(secondNum).RefInventory, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Volume Flow Rate", OutputProcessor::Unit::m3_s, - Secondary(SecondNum).FlowVolActual, + Secondary(secondNum).FlowVolActual, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Pipe Heat Gain Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).DistPipeHeatGain, + Secondary(secondNum).DistPipeHeatGain, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Pipe Heat Gain Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).DistPipeHeatGainEnergy, + Secondary(secondNum).DistPipeHeatGainEnergy, "Zone", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Receiver Heat Gain Rate", OutputProcessor::Unit::W, - Secondary(SecondNum).ReceiverHeatGain, + Secondary(secondNum).ReceiverHeatGain, "Zone", "Average", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); SetupOutputVariable("Refrigeration Secondary Loop Receiver Heat Gain Energy", OutputProcessor::Unit::J, - Secondary(SecondNum).ReceiverHeatGainEnergy, + Secondary(secondNum).ReceiverHeatGainEnergy, "Zone", "Sum", - Secondary(SecondNum).Name); + Secondary(secondNum).Name); } // NOT coilflag so on Zone timestep - if (Secondary(SecondNum).ReceiverZoneNum > 0) { - SetupZoneInternalGain(Secondary(SecondNum).ReceiverZoneNum, + if (Secondary(secondNum).ReceiverZoneNum > 0) { + SetupZoneInternalGain(Secondary(secondNum).ReceiverZoneNum, "Refrigeration:SecondarySystem:Receiver", - Secondary(SecondNum).Name, + Secondary(secondNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationSecondaryReceiver, - Secondary(SecondNum).ReceiverZoneHeatGain); + Secondary(secondNum).ReceiverZoneHeatGain); } - if (Secondary(SecondNum).DistPipeZoneNum > 0) { - SetupZoneInternalGain(Secondary(SecondNum).DistPipeZoneNum, + if (Secondary(secondNum).DistPipeZoneNum > 0) { + SetupZoneInternalGain(Secondary(secondNum).DistPipeZoneNum, "Refrigeration:SecondarySystem:Pipe", - Secondary(SecondNum).Name, + Secondary(secondNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationSecondaryPipe, - Secondary(SecondNum).DistPipeZoneHeatGain); + Secondary(secondNum).DistPipeZoneHeatGain); } } // not an unused } // NumSimulationSecondarySystems @@ -7330,153 +7318,153 @@ namespace RefrigeratedCase { // Setup Report Variables for Refrigeration Compressor Rack if (DataHeatBalance::NumRefrigeratedRacks > 0) { // CurrentModuleObject='Refrigeration:CompressorRack' - for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { - if (RefrigRack(RackNum).CoilFlag) { // rack serves chillers and is solved on HVAC time step + for (int rackNum = 1; rackNum <= DataHeatBalance::NumRefrigeratedRacks; ++rackNum) { + if (RefrigRack(rackNum).CoilFlag) { // rack serves chillers and is solved on HVAC time step SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).RackCompressorPower, + RefrigRack(rackNum).RackCompressorPower, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).RackElecConsumption, + RefrigRack(rackNum).RackElecConsumption, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Condenser Fan Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).ActualCondenserFanPower, + RefrigRack(rackNum).ActualCondenserFanPower, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Condenser Fan Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).CondenserFanConsumption, + RefrigRack(rackNum).CondenserFanConsumption, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Total Heat Transfer Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).RackCapacity, + RefrigRack(rackNum).RackCapacity, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Total Heat Transfer Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).RackCoolingEnergy, + RefrigRack(rackNum).RackCoolingEnergy, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ENERGYTRANSFER", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack COP", OutputProcessor::Unit::W_W, - RefrigRack(RackNum).RackCompressorCOP, + RefrigRack(rackNum).RackCompressorCOP, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { + if (RefrigRack(rackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Pump Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).ActualEvapPumpPower, + RefrigRack(rackNum).ActualEvapPumpPower, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Pump Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).EvapPumpConsumption, + RefrigRack(rackNum).EvapPumpConsumption, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Basin Heater Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).BasinHeaterPower, + RefrigRack(rackNum).BasinHeaterPower, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Basin Heater Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).BasinHeaterConsumption, + RefrigRack(rackNum).BasinHeaterConsumption, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Water Volume Flow Rate", OutputProcessor::Unit::m3_s, - RefrigRack(RackNum).EvapWaterConsumpRate, + RefrigRack(rackNum).EvapWaterConsumpRate, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Evaporative Condenser Water Volume", OutputProcessor::Unit::m3, - RefrigRack(RackNum).EvapWaterConsumption, + RefrigRack(rackNum).EvapWaterConsumption, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "Water", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); } // Evap condenser - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { + if (RefrigRack(rackNum).HeatRejectionLocation == LocationZone) { SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Zone Sensible Heating Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).SensZoneCreditHeatRate, + RefrigRack(rackNum).SensZoneCreditHeatRate, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Zone Sensible Heating Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).SensZoneCreditHeat, + RefrigRack(rackNum).SensZoneCreditHeat, "HVAC", "Sum", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Return Air Sensible Heating Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).SensHVACCreditHeatRate, + RefrigRack(rackNum).SensHVACCreditHeatRate, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Air Chiller Compressor Rack Return Air Sensible Heating Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).SensHVACCreditHeat, + RefrigRack(rackNum).SensHVACCreditHeat, "HVAC", "Sum", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); - SetupZoneInternalGain(RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum, + SetupZoneInternalGain(RefrigCase(RefrigRack(rackNum).CaseNum(1)).ActualZoneNum, "Refrigeration:CompressorRack", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationCompressorRack, - RefrigRack(RackNum).SensZoneCreditHeatRate, - RefrigRack(RackNum).SensHVACCreditHeatRate); + RefrigRack(rackNum).SensZoneCreditHeatRate, + RefrigRack(rackNum).SensHVACCreditHeatRate); } // LocationZone @@ -7484,173 +7472,173 @@ namespace RefrigeratedCase { SetupOutputVariable("Refrigeration Compressor Rack Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).RackCompressorPower, + RefrigRack(rackNum).RackCompressorPower, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).RackElecConsumption, + RefrigRack(rackNum).RackElecConsumption, "Zone", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Rack Condenser Fan Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).ActualCondenserFanPower, + RefrigRack(rackNum).ActualCondenserFanPower, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Condenser Fan Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).CondenserFanConsumption, + RefrigRack(rackNum).CondenserFanConsumption, "Zone", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Rack Total Heat Transfer Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).RackCapacity, + RefrigRack(rackNum).RackCapacity, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Total Heat Transfer Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).RackCoolingEnergy, + RefrigRack(rackNum).RackCoolingEnergy, "Zone", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ENERGYTRANSFER", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Rack COP", OutputProcessor::Unit::W_W, - RefrigRack(RackNum).RackCompressorCOP, + RefrigRack(rackNum).RackCompressorCOP, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { + if (RefrigRack(rackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Pump Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).ActualEvapPumpPower, + RefrigRack(rackNum).ActualEvapPumpPower, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Pump Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).EvapPumpConsumption, + RefrigRack(rackNum).EvapPumpConsumption, "Zone", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Basin Heater Electric Power", OutputProcessor::Unit::W, - RefrigRack(RackNum).BasinHeaterPower, + RefrigRack(rackNum).BasinHeaterPower, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Basin Heater Electric Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).BasinHeaterConsumption, + RefrigRack(rackNum).BasinHeaterConsumption, "Zone", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ELECTRICITY", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Water Volume Flow Rate", OutputProcessor::Unit::m3_s, - RefrigRack(RackNum).EvapWaterConsumpRate, + RefrigRack(rackNum).EvapWaterConsumpRate, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Evaporative Condenser Water Volume", OutputProcessor::Unit::m3, - RefrigRack(RackNum).EvapWaterConsumption, + RefrigRack(rackNum).EvapWaterConsumption, "Zone", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "Water", "REFRIGERATION", - RefrigRack(RackNum).EndUseSubcategory, + RefrigRack(rackNum).EndUseSubcategory, "Plant"); } // condenser evap - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { + if (RefrigRack(rackNum).HeatRejectionLocation == LocationZone) { SetupOutputVariable("Refrigeration Compressor Rack Zone Sensible Heating Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).SensZoneCreditHeatRate, + RefrigRack(rackNum).SensZoneCreditHeatRate, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Zone Sensible Heating Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).SensZoneCreditHeat, + RefrigRack(rackNum).SensZoneCreditHeat, "Zone", "Sum", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Return Air Sensible Heating Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).SensHVACCreditHeatRate, + RefrigRack(rackNum).SensHVACCreditHeatRate, "Zone", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Return Air Sensible Heating Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).SensHVACCreditHeat, + RefrigRack(rackNum).SensHVACCreditHeat, "Zone", "Sum", - RefrigRack(RackNum).Name); - SetupZoneInternalGain(RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum, + RefrigRack(rackNum).Name); + SetupZoneInternalGain(RefrigCase(RefrigRack(rackNum).CaseNum(1)).ActualZoneNum, "Refrigeration:CompressorRack", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationCompressorRack, - RefrigRack(RackNum).SensZoneCreditHeatRate, - RefrigRack(RackNum).SensHVACCreditHeatRate); + RefrigRack(rackNum).SensZoneCreditHeatRate, + RefrigRack(rackNum).SensHVACCreditHeatRate); } // location zone } // Serves coils or case/walkin loads - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { // on HVAC time step no matter what + if (RefrigRack(rackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { // on HVAC time step no matter what SetupOutputVariable("Refrigeration Compressor Rack Condenser Mass Flow Rate", OutputProcessor::Unit::kg_s, - RefrigRack(RackNum).MassFlowRate, + RefrigRack(rackNum).MassFlowRate, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Condenser Heat Transfer Rate", OutputProcessor::Unit::W, - RefrigRack(RackNum).CondLoad, + RefrigRack(rackNum).CondLoad, "HVAC", "Average", - RefrigRack(RackNum).Name); + RefrigRack(rackNum).Name); SetupOutputVariable("Refrigeration Compressor Rack Condenser Heat Transfer Energy", OutputProcessor::Unit::J, - RefrigRack(RackNum).CondEnergy, + RefrigRack(rackNum).CondEnergy, "HVAC", "Sum", - RefrigRack(RackNum).Name, + RefrigRack(rackNum).Name, _, "ENERGYTRANSFER", "Heating", @@ -7663,692 +7651,692 @@ namespace RefrigeratedCase { if (DataHeatBalance::NumRefrigSystems > 0) { // CurrentModuleObject='Refrigeration:System' - for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { - if (System(RefrigSysNum).CoilFlag) { // system serves chillers and is solved on HVAC time step - if (System(RefrigSysNum).NumStages == 1) { + for (int refrigSysNum = 1; refrigSysNum <= DataHeatBalance::NumRefrigSystems; ++refrigSysNum) { + if (System(refrigSysNum).CoilFlag) { // system serves chillers and is solved on HVAC time step + if (System(refrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration Air Chiller System Total Compressor Electric Power", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompPower, + System(refrigSysNum).TotCompPower, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompElecConsump, + System(refrigSysNum).TotCompElecConsump, "HVAC", "Sum", - System(RefrigSysNum).Name); - } else if (System(RefrigSysNum).NumStages == 2) { + System(refrigSysNum).Name); + } else if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration Air Chiller System Total Low Stage Compressor Electric Power", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompPower, + System(refrigSysNum).TotCompPower, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Low Stage Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompElecConsump, + System(refrigSysNum).TotCompElecConsump, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total High Stage Compressor Electric Power", OutputProcessor::Unit::W, - System(RefrigSysNum).TotHiStageCompPower, + System(refrigSysNum).TotHiStageCompPower, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total High Stage Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotHiStageCompElecConsump, + System(refrigSysNum).TotHiStageCompElecConsump, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Low and High Stage Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompElecConsumpTwoStage, + System(refrigSysNum).TotCompElecConsumpTwoStage, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } // NumStages SetupOutputVariable("Refrigeration Air Chiller System Average Compressor COP", OutputProcessor::Unit::W_W, - System(RefrigSysNum).AverageCompressorCOP, + System(refrigSysNum).AverageCompressorCOP, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Air Chiller Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotalCoolingLoad, + System(refrigSysNum).TotalCoolingLoad, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Case and Walk In Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotalCoolingEnergy, + System(refrigSysNum).TotalCoolingEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Transferred Load Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotTransferLoad, + System(refrigSysNum).TotTransferLoad, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Transferred Load Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotTransferEnergy, + System(refrigSysNum).TotTransferEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Suction Pipe Heat Gain Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).PipeHeatLoad, + System(refrigSysNum).PipeHeatLoad, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Suction Pipe Heat Gain Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).PipeHeatEnergy, + System(refrigSysNum).PipeHeatEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); - if (System(RefrigSysNum).NumStages == 1) { + System(refrigSysNum).Name); + if (System(refrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration Air Chiller System Total Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompCapacity, + System(refrigSysNum).TotCompCapacity, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompCoolingEnergy, + System(refrigSysNum).TotCompCoolingEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); // indiv compressors go to meter, not system sum - } else if (System(RefrigSysNum).NumStages == 2) { + System(refrigSysNum).Name); // indiv compressors go to meter, not system sum + } else if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration Air Chiller System Total Low Stage Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompCapacity, + System(refrigSysNum).TotCompCapacity, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total Low Stage Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompCoolingEnergy, + System(refrigSysNum).TotCompCoolingEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); // indiv compressors go to meter, not system sum + System(refrigSysNum).Name); // indiv compressors go to meter, not system sum SetupOutputVariable("Refrigeration Air Chiller System Total High Stage Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotHiStageCompCapacity, + System(refrigSysNum).TotHiStageCompCapacity, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Total High Stage Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotHiStageCompCoolingEnergy, + System(refrigSysNum).TotHiStageCompCoolingEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); // indiv compressors go to meter, not system sum + System(refrigSysNum).Name); // indiv compressors go to meter, not system sum } // NumStages SetupOutputVariable("Refrigeration Air Chiller System Net Rejected Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).NetHeatRejectLoad, + System(refrigSysNum).NetHeatRejectLoad, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Net Rejected Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).NetHeatRejectEnergy, + System(refrigSysNum).NetHeatRejectEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Estimated Refrigerant Inventory Mass", OutputProcessor::Unit::kg, - System(RefrigSysNum).RefInventory, + System(refrigSysNum).RefInventory, "HVAC", "Average", - System(RefrigSysNum).Name); - if (System(RefrigSysNum).NumStages == 1) { + System(refrigSysNum).Name); + if (System(refrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration Air Chiller System Estimated Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - System(RefrigSysNum).RefMassFlowComps, + System(refrigSysNum).RefMassFlowComps, "HVAC", "Average", - System(RefrigSysNum).Name); - } else if (System(RefrigSysNum).NumStages == 2) { + System(refrigSysNum).Name); + } else if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration Air Chiller System Estimated Low Stage Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - System(RefrigSysNum).RefMassFlowComps, + System(refrigSysNum).RefMassFlowComps, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Estimated High Stage Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - System(RefrigSysNum).RefMassFlowHiStageComps, + System(refrigSysNum).RefMassFlowHiStageComps, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } // NumStages - if (System(RefrigSysNum).NumStages == 2) { + if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration Air Chiller System Intercooler Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TIntercooler, + System(refrigSysNum).TIntercooler, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Intercooler Pressure", OutputProcessor::Unit::Pa, - System(RefrigSysNum).PIntercooler, + System(refrigSysNum).PIntercooler, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } SetupOutputVariable("Refrigeration Air Chiller System Condensing Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TCondense, + System(refrigSysNum).TCondense, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Evaporating Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TEvapNeeded, + System(refrigSysNum).TEvapNeeded, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Suction Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TCompIn, + System(refrigSysNum).TCompIn, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System TXV Liquid Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TLiqInActual, + System(refrigSysNum).TLiqInActual, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Liquid Suction Subcooler Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).LSHXTrans, + System(refrigSysNum).LSHXTrans, "HVAC", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Liquid Suction Subcooler Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).LSHXTransEnergy, + System(refrigSysNum).LSHXTransEnergy, "HVAC", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } else { // NOT System(SysNum)%CoilFlag, so serving loads on zone timestep - if (System(RefrigSysNum).NumStages == 1) { + if (System(refrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration System Total Compressor Electric Power", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompPower, + System(refrigSysNum).TotCompPower, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompElecConsump, + System(refrigSysNum).TotCompElecConsump, "Zone", "Sum", - System(RefrigSysNum).Name); - } else if (System(RefrigSysNum).NumStages == 2) { + System(refrigSysNum).Name); + } else if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration System Total Low Stage Compressor Electric Power", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompPower, + System(refrigSysNum).TotCompPower, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Low Stage Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompElecConsump, + System(refrigSysNum).TotCompElecConsump, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total High Stage Compressor Electric Power", OutputProcessor::Unit::W, - System(RefrigSysNum).TotHiStageCompPower, + System(refrigSysNum).TotHiStageCompPower, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total High Stage Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotHiStageCompElecConsump, + System(refrigSysNum).TotHiStageCompElecConsump, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Low and High Stage Compressor Electric Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompElecConsumpTwoStage, + System(refrigSysNum).TotCompElecConsumpTwoStage, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } // NumStages SetupOutputVariable("Refrigeration System Average Compressor COP", OutputProcessor::Unit::W_W, - System(RefrigSysNum).AverageCompressorCOP, + System(refrigSysNum).AverageCompressorCOP, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Cases and Walk Ins Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotalCoolingLoad, + System(refrigSysNum).TotalCoolingLoad, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Cases and Walk Ins Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotalCoolingEnergy, + System(refrigSysNum).TotalCoolingEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Transferred Load Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotTransferLoad, + System(refrigSysNum).TotTransferLoad, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Transferred Load Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotTransferEnergy, + System(refrigSysNum).TotTransferEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Suction Pipe Heat Gain Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).PipeHeatLoad, + System(refrigSysNum).PipeHeatLoad, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Suction Pipe Heat Gain Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).PipeHeatEnergy, + System(refrigSysNum).PipeHeatEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); - if (System(RefrigSysNum).NumStages == 1) { + System(refrigSysNum).Name); + if (System(refrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration System Total Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompCapacity, + System(refrigSysNum).TotCompCapacity, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompCoolingEnergy, + System(refrigSysNum).TotCompCoolingEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); // indiv compressors go to meter, not system sum - } else if (System(RefrigSysNum).NumStages == 2) { + System(refrigSysNum).Name); // indiv compressors go to meter, not system sum + } else if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration System Total Low Stage Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotCompCapacity, + System(refrigSysNum).TotCompCapacity, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total Low Stage Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotCompCoolingEnergy, + System(refrigSysNum).TotCompCoolingEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); // indiv compressors go to meter, not system sum + System(refrigSysNum).Name); // indiv compressors go to meter, not system sum SetupOutputVariable("Refrigeration System Total High Stage Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).TotHiStageCompCapacity, + System(refrigSysNum).TotHiStageCompCapacity, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Total High Stage Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).TotHiStageCompCoolingEnergy, + System(refrigSysNum).TotHiStageCompCoolingEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); // indiv compressors go to meter, not system sum + System(refrigSysNum).Name); // indiv compressors go to meter, not system sum } // NumStages SetupOutputVariable("Refrigeration System Net Rejected Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).NetHeatRejectLoad, + System(refrigSysNum).NetHeatRejectLoad, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Net Rejected Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).NetHeatRejectEnergy, + System(refrigSysNum).NetHeatRejectEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Estimated Refrigerant Inventory Mass", OutputProcessor::Unit::kg, - System(RefrigSysNum).RefInventory, + System(refrigSysNum).RefInventory, "Zone", "Average", - System(RefrigSysNum).Name); - if (System(RefrigSysNum).NumStages == 1) { + System(refrigSysNum).Name); + if (System(refrigSysNum).NumStages == 1) { SetupOutputVariable("Refrigeration System Estimated Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - System(RefrigSysNum).RefMassFlowComps, + System(refrigSysNum).RefMassFlowComps, "Zone", "Average", - System(RefrigSysNum).Name); - } else if (System(RefrigSysNum).NumStages == 2) { + System(refrigSysNum).Name); + } else if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration System Estimated Low Stage Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - System(RefrigSysNum).RefMassFlowComps, + System(refrigSysNum).RefMassFlowComps, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Estimated High Stage Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - System(RefrigSysNum).RefMassFlowHiStageComps, + System(refrigSysNum).RefMassFlowHiStageComps, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } // NumStages - if (System(RefrigSysNum).NumStages == 2) { + if (System(refrigSysNum).NumStages == 2) { SetupOutputVariable("Refrigeration System Intercooler Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TIntercooler, + System(refrigSysNum).TIntercooler, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Intercooler Pressure", OutputProcessor::Unit::Pa, - System(RefrigSysNum).PIntercooler, + System(refrigSysNum).PIntercooler, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } SetupOutputVariable("Refrigeration System Condensing Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TCondense, + System(refrigSysNum).TCondense, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Evaporating Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TEvapNeeded, + System(refrigSysNum).TEvapNeeded, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Suction Pipe Suction Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TCompIn, + System(refrigSysNum).TCompIn, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Thermostatic Expansion Valve Liquid Temperature", OutputProcessor::Unit::C, - System(RefrigSysNum).TLiqInActual, + System(refrigSysNum).TLiqInActual, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Liquid Suction Subcooler Heat Transfer Rate", OutputProcessor::Unit::W, - System(RefrigSysNum).LSHXTrans, + System(refrigSysNum).LSHXTrans, "Zone", "Average", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); SetupOutputVariable("Refrigeration System Liquid Suction Subcooler Heat Transfer Energy", OutputProcessor::Unit::J, - System(RefrigSysNum).LSHXTransEnergy, + System(refrigSysNum).LSHXTransEnergy, "Zone", "Sum", - System(RefrigSysNum).Name); + System(refrigSysNum).Name); } // System(coilflag) - if (System(RefrigSysNum).SystemRejectHeatToZone) { - if (Condenser(System(RefrigSysNum).CondenserNum(1)).InletAirZoneNum > 0) - SetupZoneInternalGain(Condenser(System(RefrigSysNum).CondenserNum(1)).InletAirZoneNum, + if (System(refrigSysNum).SystemRejectHeatToZone) { + if (Condenser(System(refrigSysNum).CondenserNum(1)).InletAirZoneNum > 0) + SetupZoneInternalGain(Condenser(System(refrigSysNum).CondenserNum(1)).InletAirZoneNum, "Refrigeration:System:Condenser:AirCooled", - System(RefrigSysNum).Name, + System(refrigSysNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationSystemAirCooledCondenser, - System(RefrigSysNum).NetHeatRejectLoad); + System(refrigSysNum).NetHeatRejectLoad); - if (System(RefrigSysNum).SuctionPipeActualZoneNum > 0) - SetupZoneInternalGain(System(RefrigSysNum).SuctionPipeActualZoneNum, + if (System(refrigSysNum).SuctionPipeActualZoneNum > 0) + SetupZoneInternalGain(System(refrigSysNum).SuctionPipeActualZoneNum, "Refrigeration:System:SuctionPipe", - System(RefrigSysNum).Name, + System(refrigSysNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationSystemSuctionPipe, - System(RefrigSysNum).PipeHeatLoad); + System(refrigSysNum).PipeHeatLoad); } } // numrefrigsystems // Report Compressor ENERGY here, not on system level for meters. - for (CompNum = 1; CompNum <= NumSimulationCompressors; ++CompNum) { + for (int compNum = 1; compNum <= NumSimulationCompressors; ++compNum) { // CurrentModuleObject='Refrigeration:Compressor' - if (Compressor(CompNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once - if (Compressor(CompNum).CoilFlag) { // Compressor serving system with chillers on HVAC time step + if (Compressor(compNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once + if (Compressor(compNum).CoilFlag) { // Compressor serving system with chillers on HVAC time step SetupOutputVariable("Refrigeration Air Chiller System Compressor Electric Power", OutputProcessor::Unit::W, - Compressor(CompNum).Power, + Compressor(compNum).Power, "HVAC", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Compressor Electric Energy", OutputProcessor::Unit::J, - Compressor(CompNum).ElecConsumption, + Compressor(compNum).ElecConsumption, "HVAC", "Sum", - Compressor(CompNum).Name, + Compressor(compNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Compressor(CompNum).EndUseSubcategory, + Compressor(compNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller System Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - Compressor(CompNum).Capacity, + Compressor(compNum).Capacity, "HVAC", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - Compressor(CompNum).CoolingEnergy, + Compressor(compNum).CoolingEnergy, "HVAC", "Sum", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Compressor Runtime Fraction", OutputProcessor::Unit::None, - Compressor(CompNum).LoadFactor, + Compressor(compNum).LoadFactor, "HVAC", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); } else { // serve cases/walkins on zone time step SetupOutputVariable("Refrigeration Compressor Electric Power", OutputProcessor::Unit::W, - Compressor(CompNum).Power, + Compressor(compNum).Power, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Electric Energy", OutputProcessor::Unit::J, - Compressor(CompNum).ElecConsumption, + Compressor(compNum).ElecConsumption, "Zone", "Sum", - Compressor(CompNum).Name, + Compressor(compNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Compressor(CompNum).EndUseSubcategory, + Compressor(compNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - Compressor(CompNum).Capacity, + Compressor(compNum).Capacity, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - Compressor(CompNum).CoolingEnergy, + Compressor(compNum).CoolingEnergy, "Zone", "Sum", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Runtime Fraction", OutputProcessor::Unit::None, - Compressor(CompNum).LoadFactor, + Compressor(compNum).LoadFactor, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); } // Serve coils on HVAC time step or cases/walkins on Zone time step } // NumSysAttach } // CompNum on NumSimulationCompressors // Report Variables for Refrigeration Condensers - for (CondNum = 1; CondNum <= DataHeatBalance::NumRefrigCondensers; ++CondNum) { + for (int condNum = 1; condNum <= DataHeatBalance::NumRefrigCondensers; ++condNum) { // CurrentModuleObject='Refrigeration:Condenser:*' - if (Condenser(CondNum).CoilFlag) { // Condenser serving system with chillers on HVAC time step + if (Condenser(condNum).CoilFlag) { // Condenser serving system with chillers on HVAC time step SetupOutputVariable("Refrigeration Air Chiller System Condenser Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).CondLoad, + Condenser(condNum).CondLoad, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).CondEnergy, + Condenser(condNum).CondEnergy, "HVAC", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); - if (Condenser(CondNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { + if (Condenser(condNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Total Recovered Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).TotalHeatRecoveredLoad, + Condenser(condNum).TotalHeatRecoveredLoad, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Total Recovered Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).TotalHeatRecoveredEnergy, + Condenser(condNum).TotalHeatRecoveredEnergy, "HVAC", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Non Refrigeration Recovered Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).ExternalHeatRecoveredLoad, + Condenser(condNum).ExternalHeatRecoveredLoad, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Non Refrigeration Recovered Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).ExternalEnergyRecovered, + Condenser(condNum).ExternalEnergyRecovered, "HVAC", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Defrost Recovered Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).InternalHeatRecoveredLoad, + Condenser(condNum).InternalHeatRecoveredLoad, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Defrost Recovered Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).InternalEnergyRecovered, + Condenser(condNum).InternalEnergyRecovered, "HVAC", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); } // not cascade because recovered energy on cascade systems passed up to higher temperature system - if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { + if (Condenser(condNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Fan Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).ActualFanPower, + Condenser(condNum).ActualFanPower, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Fan Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).FanElecEnergy, + Condenser(condNum).FanElecEnergy, "HVAC", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); } // Air cooled - if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { + if (Condenser(condNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Fan Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).ActualFanPower, + Condenser(condNum).ActualFanPower, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Fan Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).FanElecEnergy, + Condenser(condNum).FanElecEnergy, "HVAC", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller System Condenser Pump Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).ActualEvapPumpPower, + Condenser(condNum).ActualEvapPumpPower, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Pump Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).EvapPumpConsumption, + Condenser(condNum).EvapPumpConsumption, "HVAC", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller System Condenser Basin Heater Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).BasinHeaterPower, + Condenser(condNum).BasinHeaterPower, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Basin Heater Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).BasinHeaterConsumption, + Condenser(condNum).BasinHeaterConsumption, "HVAC", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Air Chiller System Condenser Evaporated Water Volume Flow Rate", OutputProcessor::Unit::m3_s, - Condenser(CondNum).EvapWaterConsumpRate, + Condenser(condNum).EvapWaterConsumpRate, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Condenser Evaporated Water Volume", OutputProcessor::Unit::m3, - Condenser(CondNum).EvapWaterConsumption, + Condenser(condNum).EvapWaterConsumption, "HVAC", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "Water", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); } // Evaporative Condenser Variables - if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { + if (Condenser(condNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { SetupOutputVariable("Refrigeration Air Chiller System Condenser Fluid Mass Flow Rate", OutputProcessor::Unit::kg_s, - Condenser(CondNum).MassFlowRate, + Condenser(condNum).MassFlowRate, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); } // Water-cooled Condenser variables @@ -8356,191 +8344,191 @@ namespace RefrigeratedCase { SetupOutputVariable("Refrigeration System Condenser Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).CondLoad, + Condenser(condNum).CondLoad, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).CondEnergy, + Condenser(condNum).CondEnergy, "Zone", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); - if (Condenser(CondNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { + if (Condenser(condNum).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { SetupOutputVariable("Refrigeration System Condenser Total Recovered Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).TotalHeatRecoveredLoad, + Condenser(condNum).TotalHeatRecoveredLoad, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Total Recovered Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).TotalHeatRecoveredEnergy, + Condenser(condNum).TotalHeatRecoveredEnergy, "Zone", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Non Refrigeration Recovered Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).ExternalHeatRecoveredLoad, + Condenser(condNum).ExternalHeatRecoveredLoad, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Non Refrigeration Recovered Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).ExternalEnergyRecovered, + Condenser(condNum).ExternalEnergyRecovered, "Zone", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Defrost Recovered Heat Transfer Rate", OutputProcessor::Unit::W, - Condenser(CondNum).InternalHeatRecoveredLoad, + Condenser(condNum).InternalHeatRecoveredLoad, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Defrost Recovered Heat Transfer Energy", OutputProcessor::Unit::J, - Condenser(CondNum).InternalEnergyRecovered, + Condenser(condNum).InternalEnergyRecovered, "Zone", "Sum", - Condenser(CondNum).Name); + Condenser(condNum).Name); } // not cascade because recovered energy on cascade systems passed up to higher temperature system - if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { + if (Condenser(condNum).CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { SetupOutputVariable("Refrigeration System Condenser Fan Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).ActualFanPower, + Condenser(condNum).ActualFanPower, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Fan Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).FanElecEnergy, + Condenser(condNum).FanElecEnergy, "Zone", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); } // Air cooled - if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { + if (Condenser(condNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { SetupOutputVariable("Refrigeration System Condenser Fan Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).ActualFanPower, + Condenser(condNum).ActualFanPower, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Fan Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).FanElecEnergy, + Condenser(condNum).FanElecEnergy, "Zone", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration System Condenser Pump Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).ActualEvapPumpPower, + Condenser(condNum).ActualEvapPumpPower, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Pump Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).EvapPumpConsumption, + Condenser(condNum).EvapPumpConsumption, "Zone", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration System Condenser Basin Heater Electric Power", OutputProcessor::Unit::W, - Condenser(CondNum).BasinHeaterPower, + Condenser(condNum).BasinHeaterPower, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Basin Heater Electric Energy", OutputProcessor::Unit::J, - Condenser(CondNum).BasinHeaterConsumption, + Condenser(condNum).BasinHeaterConsumption, "Zone", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration System Condenser Evaporated Water Volume Flow Rate", OutputProcessor::Unit::m3_s, - Condenser(CondNum).EvapWaterConsumpRate, + Condenser(condNum).EvapWaterConsumpRate, "Zone", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); SetupOutputVariable("Refrigeration System Condenser Evaporated Water Volume", OutputProcessor::Unit::m3, - Condenser(CondNum).EvapWaterConsumption, + Condenser(condNum).EvapWaterConsumption, "Zone", "Sum", - Condenser(CondNum).Name, + Condenser(condNum).Name, _, "Water", "REFRIGERATION", - Condenser(CondNum).EndUseSubcategory, + Condenser(condNum).EndUseSubcategory, "Plant"); } // Evaporative Condenser Variables - if (Condenser(CondNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { + if (Condenser(condNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { SetupOutputVariable("Refrigeration System Condenser Water Mass Flow Rate", OutputProcessor::Unit::kg_s, - Condenser(CondNum).MassFlowRate, + Condenser(condNum).MassFlowRate, "HVAC", "Average", - Condenser(CondNum).Name); + Condenser(condNum).Name); } // Water-cooled Condenser variables } // Condenser%CoilFlag to distinguish HVAC vs Zone time steps } // CondNum on DataHeatBalance::NumRefrigCondensers if (NumSimulationSubcoolers > 0) { - for (SubcoolNum = 1; SubcoolNum <= NumSimulationSubcoolers; ++SubcoolNum) { + for (int subcoolNum = 1; subcoolNum <= NumSimulationSubcoolers; ++subcoolNum) { // CurrentModuleObject='Refrigeration:Subcooler' - if (Subcooler(SubcoolNum).CoilFlag) { // Subcooler serving system with chillers on HVAC time step - if (Subcooler(SubcoolNum).SubcoolerType == Mechanical) { + if (Subcooler(subcoolNum).CoilFlag) { // Subcooler serving system with chillers on HVAC time step + if (Subcooler(subcoolNum).SubcoolerType == Mechanical) { SetupOutputVariable("Refrigeration Air Chiller System Mechanical Subcooler Heat Transfer Rate", OutputProcessor::Unit::W, - Subcooler(SubcoolNum).MechSCTransLoad, + Subcooler(subcoolNum).MechSCTransLoad, "Zone", "Average", - Subcooler(SubcoolNum).Name); + Subcooler(subcoolNum).Name); SetupOutputVariable("Refrigeration Air Chiller System Mechanical Subcooler Heat Transfer Energy", OutputProcessor::Unit::J, - Subcooler(SubcoolNum).MechSCTransEnergy, + Subcooler(subcoolNum).MechSCTransEnergy, "Zone", "Sum", - Subcooler(SubcoolNum).Name); + Subcooler(subcoolNum).Name); } } else { // Subcooler on system serving cases and/or walkins - if (Subcooler(SubcoolNum).SubcoolerType == Mechanical) { + if (Subcooler(subcoolNum).SubcoolerType == Mechanical) { SetupOutputVariable("Refrigeration System Mechanical Subcooler Heat Transfer Rate", OutputProcessor::Unit::W, - Subcooler(SubcoolNum).MechSCTransLoad, + Subcooler(subcoolNum).MechSCTransLoad, "HVAC", "Average", - Subcooler(SubcoolNum).Name); + Subcooler(subcoolNum).Name); SetupOutputVariable("Refrigeration System Mechanical Subcooler Heat Transfer Energy", OutputProcessor::Unit::J, - Subcooler(SubcoolNum).MechSCTransEnergy, + Subcooler(subcoolNum).MechSCTransEnergy, "HVAC", "Sum", - Subcooler(SubcoolNum).Name); + Subcooler(subcoolNum).Name); } } // Subcoolers on system serving chillers } // Subcoolnum on NumSimulationSubcoolers @@ -8550,280 +8538,280 @@ namespace RefrigeratedCase { if (NumTransRefrigSystems > 0) { // CurrentModuleObject='Refrigeration:TranscriticalSystem' - for (RefrigSysNum = 1; RefrigSysNum <= NumTransRefrigSystems; ++RefrigSysNum) { + for (int refrigSysNum = 1; refrigSysNum <= NumTransRefrigSystems; ++refrigSysNum) { // for both SingleStage and TwoStage systems (medium temperature loads present) SetupOutputVariable("Refrigeration Transcritical System Total High Pressure Compressor Electric Power", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).TotCompPowerHP, + TransSystem(refrigSysNum).TotCompPowerHP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Total High Pressure Compressor Electric Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotCompElecConsumpHP, + TransSystem(refrigSysNum).TotCompElecConsumpHP, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Total Compressor Electric Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotCompElecConsump, + TransSystem(refrigSysNum).TotCompElecConsump, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Average COP", OutputProcessor::Unit::W_W, - TransSystem(RefrigSysNum).AverageCompressorCOP, + TransSystem(refrigSysNum).AverageCompressorCOP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Medium Temperature Cases and Walk Ins Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).TotalCoolingLoadMT, + TransSystem(refrigSysNum).TotalCoolingLoadMT, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Medium Temperature Cases and Walk Ins Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotalCoolingEnergyMT, + TransSystem(refrigSysNum).TotalCoolingEnergyMT, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Total Cases and Walk Ins Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotalCoolingEnergy, + TransSystem(refrigSysNum).TotalCoolingEnergy, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Medium Temperature Suction Pipe Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).PipeHeatLoadMT, + TransSystem(refrigSysNum).PipeHeatLoadMT, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Medium Temperature Suction Pipe Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).PipeHeatEnergyMT, + TransSystem(refrigSysNum).PipeHeatEnergyMT, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System High Pressure Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).TotCompCapacityHP, + TransSystem(refrigSysNum).TotCompCapacityHP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System High Pressure Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotCompCoolingEnergyHP, + TransSystem(refrigSysNum).TotCompCoolingEnergyHP, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); // indiv compressors go to meter, not system sum + TransSystem(refrigSysNum).Name); // indiv compressors go to meter, not system sum SetupOutputVariable("Refrigeration Transcritical System Net Rejected Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).NetHeatRejectLoad, + TransSystem(refrigSysNum).NetHeatRejectLoad, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Net Rejected Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).NetHeatRejectEnergy, + TransSystem(refrigSysNum).NetHeatRejectEnergy, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Estimated Refrigerant Inventory Mass", OutputProcessor::Unit::kg, - TransSystem(RefrigSysNum).RefInventory, + TransSystem(refrigSysNum).RefInventory, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Refrigerant Mass Flow Rate", OutputProcessor::Unit::kg_s, - TransSystem(RefrigSysNum).RefMassFlowComps, + TransSystem(refrigSysNum).RefMassFlowComps, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Medium Temperature Evaporating Temperature", OutputProcessor::Unit::C, - TransSystem(RefrigSysNum).TEvapNeededMT, + TransSystem(refrigSysNum).TEvapNeededMT, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Medium Temperature Suction Temperature", OutputProcessor::Unit::C, - TransSystem(RefrigSysNum).TCompInHP, + TransSystem(refrigSysNum).TCompInHP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); - if (TransSystem(RefrigSysNum).TransSysType == 2) { // for TwoStage system only (low temperature loads present) + TransSystem(refrigSysNum).Name); + if (TransSystem(refrigSysNum).TransSysType == 2) { // for TwoStage system only (low temperature loads present) SetupOutputVariable("Refrigeration Transcritical System Low Pressure Compressor Electric Power", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).TotCompPowerLP, + TransSystem(refrigSysNum).TotCompPowerLP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Pressure Compressor Electric Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotCompElecConsumpLP, + TransSystem(refrigSysNum).TotCompElecConsumpLP, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Temperature Cases and Walk Ins Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).TotalCoolingLoadLT, + TransSystem(refrigSysNum).TotalCoolingLoadLT, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Temperature Cases and Walk Ins Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotalCoolingEnergyLT, + TransSystem(refrigSysNum).TotalCoolingEnergyLT, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Temperature Suction Pipe Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).PipeHeatLoadLT, + TransSystem(refrigSysNum).PipeHeatLoadLT, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Temperature Suction Pipe Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).PipeHeatEnergyLT, + TransSystem(refrigSysNum).PipeHeatEnergyLT, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Pressure Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - TransSystem(RefrigSysNum).TotCompCapacityLP, + TransSystem(refrigSysNum).TotCompCapacityLP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Pressure Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - TransSystem(RefrigSysNum).TotCompCoolingEnergyLP, + TransSystem(refrigSysNum).TotCompCoolingEnergyLP, "Zone", "Sum", - TransSystem(RefrigSysNum).Name); // indiv compressors go to meter, not system sum + TransSystem(refrigSysNum).Name); // indiv compressors go to meter, not system sum SetupOutputVariable("Refrigeration Transcritical System Low Temperature Evaporating Temperature", OutputProcessor::Unit::C, - TransSystem(RefrigSysNum).TEvapNeededLT, + TransSystem(refrigSysNum).TEvapNeededLT, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); SetupOutputVariable("Refrigeration Transcritical System Low Temperature Suction Temperature", OutputProcessor::Unit::C, - TransSystem(RefrigSysNum).TCompInLP, + TransSystem(refrigSysNum).TCompInLP, "Zone", "Average", - TransSystem(RefrigSysNum).Name); + TransSystem(refrigSysNum).Name); } // (TransSystem(RefrigSysNum)%TransSysType == 2) - if (TransSystem(RefrigSysNum).SystemRejectHeatToZone) { - if (GasCooler(TransSystem(RefrigSysNum).GasCoolerNum(1)).InletAirZoneNum > 0) - SetupZoneInternalGain(GasCooler(TransSystem(RefrigSysNum).GasCoolerNum(1)).InletAirZoneNum, + if (TransSystem(refrigSysNum).SystemRejectHeatToZone) { + if (GasCooler(TransSystem(refrigSysNum).GasCoolerNum(1)).InletAirZoneNum > 0) + SetupZoneInternalGain(GasCooler(TransSystem(refrigSysNum).GasCoolerNum(1)).InletAirZoneNum, "Refrigeration:TranscriticalSystem:GasCooler:AirCooled", - TransSystem(RefrigSysNum).Name, + TransSystem(refrigSysNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationTransSysAirCooledGasCooler, - TransSystem(RefrigSysNum).NetHeatRejectLoad); + TransSystem(refrigSysNum).NetHeatRejectLoad); } // (TransSystem(RefrigSysNum)%SystemRejectHeatToZone) - if (TransSystem(RefrigSysNum).SuctionPipeActualZoneNumMT > 0) { - SetupZoneInternalGain(TransSystem(RefrigSysNum).SuctionPipeActualZoneNumMT, + if (TransSystem(refrigSysNum).SuctionPipeActualZoneNumMT > 0) { + SetupZoneInternalGain(TransSystem(refrigSysNum).SuctionPipeActualZoneNumMT, "Refrigeration:TranscriticalSystem:SuctionPipeMT", - TransSystem(RefrigSysNum).Name, + TransSystem(refrigSysNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationTransSysSuctionPipeMT, - TransSystem(RefrigSysNum).PipeHeatLoadMT); + TransSystem(refrigSysNum).PipeHeatLoadMT); } // TransSystem(RefrigSysNum)%SuctionPipeActualZoneNumMT > 0 - if (TransSystem(RefrigSysNum).SuctionPipeActualZoneNumLT > 0) { - SetupZoneInternalGain(TransSystem(RefrigSysNum).SuctionPipeActualZoneNumLT, + if (TransSystem(refrigSysNum).SuctionPipeActualZoneNumLT > 0) { + SetupZoneInternalGain(TransSystem(refrigSysNum).SuctionPipeActualZoneNumLT, "Refrigeration:TranscriticalSystem:SuctionPipeLT", - TransSystem(RefrigSysNum).Name, + TransSystem(refrigSysNum).Name, DataHeatBalance::IntGainTypeOf_RefrigerationTransSysSuctionPipeLT, - TransSystem(RefrigSysNum).PipeHeatLoadLT); + TransSystem(refrigSysNum).PipeHeatLoadLT); } // TransSystem(RefrigSysNum)%SuctionPipeActualZoneNumLT > 0 // Report Compressor ENERGY here, not on system level for meters. // LP compressors - for (CompIndex = 1; CompIndex <= TransSystem(RefrigSysNum).NumCompressorsLP; ++CompIndex) { - CompNum = TransSystem(RefrigSysNum).CompressorNumLP(CompIndex); + for (int compIndex = 1; compIndex <= TransSystem(refrigSysNum).NumCompressorsLP; ++compIndex) { + int compNum = TransSystem(refrigSysNum).CompressorNumLP(compIndex); // CurrentModuleObject='Refrigeration:Compressor' - if (Compressor(CompNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once + if (Compressor(compNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once SetupOutputVariable("Refrigeration Compressor Electric Power", OutputProcessor::Unit::W, - Compressor(CompNum).Power, + Compressor(compNum).Power, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Electric Energy", OutputProcessor::Unit::J, - Compressor(CompNum).ElecConsumption, + Compressor(compNum).ElecConsumption, "Zone", "Sum", - Compressor(CompNum).Name, + Compressor(compNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Compressor(CompNum).EndUseSubcategory, + Compressor(compNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - Compressor(CompNum).Capacity, + Compressor(compNum).Capacity, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - Compressor(CompNum).CoolingEnergy, + Compressor(compNum).CoolingEnergy, "Zone", "Sum", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Runtime Fraction", OutputProcessor::Unit::None, - Compressor(CompNum).LoadFactor, + Compressor(compNum).LoadFactor, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); } // NumSysAttach } // TransSystem(RefrigSysNum)%NumCompressorsLP // HP compressors - for (CompIndex = 1; CompIndex <= TransSystem(RefrigSysNum).NumCompressorsHP; ++CompIndex) { - CompNum = TransSystem(RefrigSysNum).CompressorNumHP(CompIndex); + for (int compIndex = 1; compIndex <= TransSystem(refrigSysNum).NumCompressorsHP; ++compIndex) { + int compNum = TransSystem(refrigSysNum).CompressorNumHP(compIndex); // CurrentModuleObject='Refrigeration:Compressor' - if (Compressor(CompNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once + if (Compressor(compNum).NumSysAttach == 1) { // only set up reports for compressors that are used once and only once SetupOutputVariable("Refrigeration Compressor Electric Power", OutputProcessor::Unit::W, - Compressor(CompNum).Power, + Compressor(compNum).Power, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Electric Energy", OutputProcessor::Unit::J, - Compressor(CompNum).ElecConsumption, + Compressor(compNum).ElecConsumption, "Zone", "Sum", - Compressor(CompNum).Name, + Compressor(compNum).Name, _, "ELECTRICITY", "REFRIGERATION", - Compressor(CompNum).EndUseSubcategory, + Compressor(compNum).EndUseSubcategory, "Plant"); SetupOutputVariable("Refrigeration Compressor Heat Transfer Rate", OutputProcessor::Unit::W, - Compressor(CompNum).Capacity, + Compressor(compNum).Capacity, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Heat Transfer Energy", OutputProcessor::Unit::J, - Compressor(CompNum).CoolingEnergy, + Compressor(compNum).CoolingEnergy, "Zone", "Sum", - Compressor(CompNum).Name); + Compressor(compNum).Name); SetupOutputVariable("Refrigeration Compressor Runtime Fraction", OutputProcessor::Unit::None, - Compressor(CompNum).LoadFactor, + Compressor(compNum).LoadFactor, "Zone", "Average", - Compressor(CompNum).Name); + Compressor(compNum).Name); } // NumSysAttach } // TransSystem(RefrigSysNum)%NumCompressorsHP @@ -8831,7 +8819,7 @@ namespace RefrigeratedCase { } // (NumTransRefrigSystems > 0) if (NumSimulationGasCooler > 0) { - for (GCNum = 1; GCNum <= NumSimulationGasCooler; ++GCNum) { + for (int GCNum = 1; GCNum <= NumSimulationGasCooler; ++GCNum) { // CurrentModuleObject='Refrigeration:GasCooler:AirCooled' SetupOutputVariable("Refrigeration Transcritical System Gas Cooler Heat Transfer Rate", OutputProcessor::Unit::W, From 6920d8813d7ebbd376a88874e245e7d6d4cc98c3 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 15:47:33 -0700 Subject: [PATCH 44/86] step 4 - partial remove statics --- src/EnergyPlus/RefrigeratedCase.cc | 250 ++++++++++++----------------- 1 file changed, 107 insertions(+), 143 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 6678f7ef40e..f574f231b27 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -210,7 +210,6 @@ namespace RefrigeratedCase { int const DefNone(0); int const DefOffCycle(1); int const DefHotFluid(2); - int const DefHotFluidOnDemand(3); int const DefHotFluidTerm(4); int const DefElectric(5); int const DefElectricOnDemand(6); @@ -308,7 +307,6 @@ namespace RefrigeratedCase { Real64 const IceMeltEnthalpy(335000.0); // heat of fusion of water J/kg Real64 const TempTooHotToFrost(5.0); // C, used to check for frosting conditions on evaporator coils Real64 const IcetoVaporEnthalpy(2833000.0); // J/kg to freeze water vapor to ice - Real64 const WatertoVaporEnthalpy(2.5e6); // at 0C Real64 const SpecificHeatIce(2000.0); // in the likely range (2040 at 0C and 1950 at -20C) (J/kg-C) Real64 const CondAirVolExponentDry(1.58); // exponent for forced air over a cylinder, = 1/.633 // per ASHRAE 2005 (page 3.15) @@ -322,8 +320,6 @@ namespace RefrigeratedCase { Array1D const EuropeanWetCoilFactor(5, {1.35, 1.15, 1.05, 1.01, 1.0}); Array1D const EuropeanAirInletTemp(5, {10.0, 0.0, -18.0, -25.0, -34.0}); - Array1D const EuropeanEvapTemp(5, {0.0, -8.0, -25.0, -31.0, -40.0}); - Array1D const EuropeanDT1(5, {10.0, 8.0, 7.0, 7.0, 6.0}); int NumSimulationCondAir(0); // Number of air-cooled condensers in simulation int NumSimulationCondEvap(0); // Number of evaporative condensers in simulation @@ -387,7 +383,6 @@ namespace RefrigeratedCase { // high-stage compressor input error regarding high-stage compressor capacity // Transcritical refrigeration system variables - bool TransCritSysFlag(false); // Used to indicate whether or not a transcritical refrigeration system has been defined. Array1D_bool ShowUnmetEnergyWarningTrans; // Used for one-time warning message for possible // compressor input error regarding total system compressor capacity @@ -395,7 +390,6 @@ namespace RefrigeratedCase { Array1D_bool ShowUnmetSecondEnergyWarning; // Used for one-time warning message for possible // compressor input error regarding secondary loop heat exchanger capacity // Refrigerated warehouse coil variables - Array1D_bool CheckChillerName; // used when simrefrigcoil called for a zone Array1D_bool ShowCoilFrostWarning; // Used for one-time warning message if defrost cycles insufficient to melt ice // Refrigeration Plant connections checks @@ -444,10 +438,6 @@ namespace RefrigeratedCase { Array1D CoilSysCredit; Array1D CaseWIZoneReport; - void clear_state() - { - UniqueCondenserNames.clear(); - } void ManageRefrigeratedCaseRacks() { @@ -568,17 +558,8 @@ namespace RefrigeratedCase { Array1D_bool lAlphaBlanks; // Logic array, alpha input blank = .TRUE. Array1D_bool lNumericBlanks; // Logic array, numeric input blank = .TRUE. static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine - static bool StartCycle(false); // Flag for counting defrost cycles - - static int AlphaListNum(0); // Index of Names in Case, Compressor et al Lists - static int AlphaNum(0); // Used to cycle through input - static int AlphaStartList(0); - static int AStart(0); // Used to cycle through zones on input for walk in coolers - static int CascadeLoadNum(0); // counters while associating cascade loads with systems - static int CascadeLoadIndex(0); // Counters while inputting cascade loads - static int CaseID(0); // ID of refrigerated case in rack - static int CaseIndex(0); // Index of refrigerated case attached to a system - static int CaseNum(0); // Index of refrigerated case + + int AlphaNum(0); // Used to cycle through input static int CaseAndWalkInListNum(0); // ID of refrigerated CaseAndWalkInList static int ChillerIndex(0); static int CoilID(0); // Index of warehouse coil attached to a system @@ -889,7 +870,7 @@ namespace RefrigeratedCase { // bbb stovall note for future - for all curve entries, see if need fail on type or if can allow table input if (NumSimulationCases > 0) { CurrentModuleObject = "Refrigeration:Case"; - for (CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { + for (int CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { inputProcessor->getObjectItem(CurrentModuleObject, CaseNum, Alphas, @@ -1269,7 +1250,9 @@ namespace RefrigeratedCase { } // Note that next section counting number cycles and setting maxkgfrost not used now, but may be in the future. // count the number of defrost cycles - StartCycle = false; + + // Flag for counting defrost cycles + bool StartCycle = false; NumDefCycles = 0; DayValues = 0.0; ScheduleManager::GetScheduleValuesForDay(RefrigCase(CaseNum).DefrostSchedPtr, DayValues, 1); @@ -1812,7 +1795,7 @@ namespace RefrigeratedCase { if (!allocated(WalkIn(WalkInID).LatZoneCreditRate)) WalkIn(WalkInID).LatZoneCreditRate.allocate(NumZones) = 0.0; if (!allocated(WalkIn(WalkInID).LatZoneCredit)) WalkIn(WalkInID).LatZoneCredit.allocate(NumZones) = 0.0; - AStart = NumWIAlphaFieldsBeforeZoneInput + 1; + int AStart = NumWIAlphaFieldsBeforeZoneInput + 1; NStart = NumWINumberFieldsBeforeZoneInput + 1; for (ZoneID = 1; ZoneID <= NumZones; ++ZoneID) { // Get the Zone node number from the zone name @@ -2616,11 +2599,11 @@ namespace RefrigeratedCase { // An extensible list is used to enter the individual names of each chiller in the set. // These chillers will be dispatched in this list order to meet the required zone load NumChillersInSet = NumAlphas - AlphaNum; - AlphaStartList = AlphaNum; //+ 1 + int AlphaStartList = AlphaNum; //+ 1 AirChillerSet(SetID).NumCoils = NumChillersInSet; if (!allocated(AirChillerSet(SetID).CoilNum)) AirChillerSet(SetID).CoilNum.allocate(NumChillersInSet); for (ChillerIndex = 1; ChillerIndex <= NumChillersInSet; ++ChillerIndex) { - AlphaListNum = AlphaStartList + ChillerIndex; + int AlphaListNum = AlphaStartList + ChillerIndex; if (!lAlphaBlanks(AlphaListNum)) { CoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), WarehouseCoil); if (CoilNum == 0) { @@ -2668,7 +2651,7 @@ namespace RefrigeratedCase { NumWalkInsOnList = 0; LoadCount = 0; for (NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { - AlphaListNum = 1 + NumLoad; + int AlphaListNum = 1 + NumLoad; if (!lAlphaBlanks(AlphaListNum)) { ++LoadCount; LoadWalkInNum = 0; @@ -2984,7 +2967,7 @@ namespace RefrigeratedCase { } else { // (.NOT. lAlphaBlanks(AlphaNum)) // Entry for Alphas(AlphaNum) can be either a Case, WalkIn, Coil, or CaseAndWalkInList name CaseAndWalkInListNum = 0; - CaseNum = 0; + int CaseNum = 0; WalkInNum = 0; CoilNum = 0; if (NumSimulationCaseAndWalkInLists > 0) @@ -3040,20 +3023,20 @@ namespace RefrigeratedCase { } // blank input for loads on rack if (NumCases > 0) { - for (CaseIndex = 1; CaseIndex <= NumCases; ++CaseIndex) { - CaseID = RefrigRack(RackNum).CaseNum(CaseIndex); + for (int caseIndex = 1; caseIndex <= NumCases; ++caseIndex) { + int caseID = RefrigRack(RackNum).CaseNum(caseIndex); // mark all cases on rack as used by this system (checking for unused or non-unique cases) - ++RefrigCase(CaseID).NumSysAttach; + ++RefrigCase(caseID).NumSysAttach; // determine total capacity on rack - RefrigRack(RackNum).TotalRackLoad += RefrigCase(CaseID).DesignRatedCap; + RefrigRack(RackNum).TotalRackLoad += RefrigCase(caseID).DesignRatedCap; } // CaseIndex=1,NumCases // check that all refrigerated cases attached to a rack are to the same zone if heat rejection location is "Zone" // however, won't matter if walk-in specified if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone && RefrigRack(RackNum).NumCases > 1 && RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum != 0 && NumWalkIns < 1 && NumCoils < 1) { ZoneNum = RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum; - for (CaseIndex = 2; CaseIndex <= RefrigRack(RackNum).NumCases; ++CaseIndex) { - if (RefrigCase(RefrigRack(RackNum).CaseNum(CaseIndex)).ActualZoneNum == ZoneNum) continue; + for (int caseIndex = 2; caseIndex <= RefrigRack(RackNum).NumCases; ++caseIndex) { + if (RefrigCase(RefrigRack(RackNum).CaseNum(caseIndex)).ActualZoneNum == ZoneNum) continue; ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\" : All cases attached to a rack must be in the same zone when " + cAlphaFieldNames(2) + " equals \"Zone\"."); @@ -3932,7 +3915,7 @@ namespace RefrigeratedCase { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn Coil, or CaseAndWalkInList name CaseAndWalkInListNum = 0; - CaseNum = 0; + int CaseNum = 0; WalkInNum = 0; CoilNum = 0; if (NumSimulationCaseAndWalkInLists > 0) @@ -3991,13 +3974,13 @@ namespace RefrigeratedCase { if (NumCases > 0) { // Find lowest design T loop fluid out of secondary chiller // Sum rated capacity of all cases on Secondary - for (CaseIndex = 1; CaseIndex <= NumCases; ++CaseIndex) { + for (int caseIndex = 1; caseIndex <= NumCases; ++caseIndex) { // mark all cases on Secondary as used by this Secondary - checking for unused or non-unique cases - CaseNum = Secondary(SecondaryNum).CaseNum(CaseIndex); + int CaseNum = Secondary(SecondaryNum).CaseNum(caseIndex); ++RefrigCase(CaseNum).NumSysAttach; NominalTotalCaseCap += RefrigCase(CaseNum).DesignRatedCap * RefrigCase(CaseNum).RatedRTF; Secondary(SecondaryNum).RefInventory += RefrigCase(CaseNum).DesignRefrigInventory; - if (CaseIndex == 1) { // look for lowest case design evap T for Secondary + if (caseIndex == 1) { // look for lowest case design evap T for Secondary Secondary(SecondaryNum).TMinNeeded = RefrigCase(CaseNum).EvapTempDesign; } else { Secondary(SecondaryNum).TMinNeeded = min(RefrigCase(CaseNum).EvapTempDesign, Secondary(SecondaryNum).TMinNeeded); @@ -4680,7 +4663,7 @@ namespace RefrigeratedCase { NumSecondarysOnList = 0; NumCascadeLoadsOnList = 0; for (NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { - AlphaListNum = 1 + NumLoad; + int AlphaListNum = 1 + NumLoad; LoadCascadeNum = 0; LoadSecondaryNum = 0; if (DataHeatBalance::NumRefrigCondensers > 0) LoadCascadeNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Condenser); @@ -4737,7 +4720,7 @@ namespace RefrigeratedCase { CompressorLists(ListNum).CompItemNum.allocate(CompressorLists(ListNum).NumCompressors); for (CompIndex = 1; CompIndex <= CompressorLists(ListNum).NumCompressors; ++CompIndex) { - AlphaListNum = CompIndex + 1; // same as do loop from 2 to end of list + int AlphaListNum = CompIndex + 1; // same as do loop from 2 to end of list if (!lAlphaBlanks(AlphaListNum)) { CompressorLists(ListNum).CompItemNum(CompIndex) = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Compressor); if (CompressorLists(ListNum).CompItemNum(CompIndex) == 0) { @@ -4803,7 +4786,7 @@ namespace RefrigeratedCase { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn or CaseAndWalkInList name CaseAndWalkInListNum = 0; - CaseNum = 0; + int CaseNum = 0; WalkInNum = 0; CoilNum = 0; if (NumSimulationCaseAndWalkInLists > 0) @@ -4867,13 +4850,13 @@ namespace RefrigeratedCase { if (NumCases > 0) { // Find lowest design evap T // Sum rated capacity of all cases on system - for (CaseIndex = 1; CaseIndex <= NumCases; ++CaseIndex) { + for (int caseIndex = 1; caseIndex <= NumCases; ++caseIndex) { // mark all cases on system as used by this system - checking for unused or non-unique cases - CaseNum = System(RefrigSysNum).CaseNum(CaseIndex); + int CaseNum = System(RefrigSysNum).CaseNum(caseIndex); ++RefrigCase(CaseNum).NumSysAttach; NominalTotalCaseCap += RefrigCase(CaseNum).DesignRatedCap; System(RefrigSysNum).RefInventory += RefrigCase(CaseNum).DesignRefrigInventory; - if (CaseIndex == 1) { // look for lowest case design evap T for system + if (caseIndex == 1) { // look for lowest case design evap T for system System(RefrigSysNum).TEvapDesign = RefrigCase(CaseNum).EvapTempDesign; } else { System(RefrigSysNum).TEvapDesign = min(RefrigCase(CaseNum).EvapTempDesign, System(RefrigSysNum).TEvapDesign); @@ -4937,7 +4920,7 @@ namespace RefrigeratedCase { // Entry for Alphas(AlphaNum) can be either a Secondary, CascadeLoad name or a TransferLoadList name TransferLoadListNum = 0; SecondaryNum = 0; - CascadeLoadNum = 0; + int CascadeLoadNum = 0; if (NumSimulationTransferLoadLists > 0) TransferLoadListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), TransferLoadList); if (NumSimulationSecondarySystems > 0) SecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Secondary); if (DataHeatBalance::NumRefrigCondensers > 0) CascadeLoadNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Condenser); @@ -5014,8 +4997,8 @@ namespace RefrigeratedCase { } // numsecondary > 0 if (NumCascadeLoad > 0) { - for (CascadeLoadIndex = 1; CascadeLoadIndex <= NumCascadeLoad; ++CascadeLoadIndex) { - CondID = System(RefrigSysNum).CascadeLoadNum(CascadeLoadIndex); + for (int cascadeLoadIndex = 1; cascadeLoadIndex <= NumCascadeLoad; ++cascadeLoadIndex) { + CondID = System(RefrigSysNum).CascadeLoadNum(cascadeLoadIndex); if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", has a " + cAlphaFieldNames(AlphaNum) + ": " + Alphas(AlphaNum) + @@ -5027,7 +5010,7 @@ namespace RefrigeratedCase { NominalTotalCascadeLoad += Condenser(CondID).RatedCapacity; // Find design evaporating temperature for system by getting min design evap for ALL loads if (System(RefrigSysNum).NumNonCascadeLoads == 0) { - if (CascadeLoadIndex == 1) { + if (cascadeLoadIndex == 1) { // note use cascadeload index above, not condid here to get // first cascade condenser served by this suction group/system System(RefrigSysNum).TEvapDesign = Condenser(CondID).CascadeRatedEvapTemp; @@ -5638,7 +5621,7 @@ namespace RefrigeratedCase { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn or CaseAndWalkInList name CaseAndWalkInListNum = 0; - CaseNum = 0; + int CaseNum = 0; WalkInNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); @@ -5691,13 +5674,13 @@ namespace RefrigeratedCase { if (NumCasesMT > 0) { // Find lowest design evap T // Sum rated capacity of all MT cases on system - for (CaseIndex = 1; CaseIndex <= NumCasesMT; ++CaseIndex) { + for (int caseIndex = 1; caseIndex <= NumCasesMT; ++caseIndex) { // mark all cases on system as used by this system - checking for unused or non-unique cases - CaseNum = TransSystem(TransRefrigSysNum).CaseNumMT(CaseIndex); + int CaseNum = TransSystem(TransRefrigSysNum).CaseNumMT(caseIndex); ++RefrigCase(CaseNum).NumSysAttach; NominalTotalCaseCapMT += RefrigCase(CaseNum).DesignRatedCap; TransSystem(TransRefrigSysNum).RefInventory += RefrigCase(CaseNum).DesignRefrigInventory; - if (CaseIndex == 1) { // look for lowest case design evap T for system + if (caseIndex == 1) { // look for lowest case design evap T for system TransSystem(TransRefrigSysNum).TEvapDesignMT = RefrigCase(CaseNum).EvapTempDesign; } else { TransSystem(TransRefrigSysNum).TEvapDesignMT = @@ -5741,7 +5724,7 @@ namespace RefrigeratedCase { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn or CaseAndWalkInList name CaseAndWalkInListNum = 0; - CaseNum = 0; + int CaseNum = 0; WalkInNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); @@ -5794,13 +5777,13 @@ namespace RefrigeratedCase { if (NumCasesLT > 0) { // Find lowest design evap T // Sum rated capacity of all LT cases on system - for (CaseIndex = 1; CaseIndex <= NumCasesLT; ++CaseIndex) { + for (int caseIndex = 1; caseIndex <= NumCasesLT; ++caseIndex) { // mark all cases on system as used by this system - checking for unused or non-unique cases - CaseNum = TransSystem(TransRefrigSysNum).CaseNumLT(CaseIndex); + int CaseNum = TransSystem(TransRefrigSysNum).CaseNumLT(caseIndex); ++RefrigCase(CaseNum).NumSysAttach; NominalTotalCaseCapLT += RefrigCase(CaseNum).DesignRatedCap; TransSystem(TransRefrigSysNum).RefInventory += RefrigCase(CaseNum).DesignRefrigInventory; - if (CaseIndex == 1) { // look for lowest case design evap T for system + if (caseIndex == 1) { // look for lowest case design evap T for system TransSystem(TransRefrigSysNum).TEvapDesignLT = RefrigCase(CaseNum).EvapTempDesign; } else { TransSystem(TransRefrigSysNum).TEvapDesignLT = @@ -6127,7 +6110,7 @@ namespace RefrigeratedCase { // all HVAC RA fractions and write error message if greater than 1 for any zone for (ZoneIndex = 1; ZoneIndex <= DataGlobals::NumOfZones; ++ZoneIndex) { // numofzones from dataglobals TempRAFraction = CaseRAFraction(ZoneIndex).TotalCaseRAFraction; - for (CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { + for (int CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { // TempRaFraction already includes contributions from ALL cases in zone // Want to delete portion from unused cases (numsysattach = 0)that will never be simulated if (RefrigCase(CaseNum).ActualZoneNum != ZoneIndex || RefrigCase(CaseNum).NumSysAttach > 0) continue; @@ -6146,7 +6129,7 @@ namespace RefrigeratedCase { // more than once (twice in a system or to more than one system) NumUnusedRefrigCases = 0; - for (CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { + for (int CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { if (RefrigCase(CaseNum).NumSysAttach == 1) continue; if (RefrigCase(CaseNum).NumSysAttach < 1) { ++NumUnusedRefrigCases; @@ -8916,17 +8899,8 @@ namespace RefrigeratedCase { // this most recent addition/subtraction is reversed before the rest of the refrigeration simulation begins. static bool MyBeginEnvrnFlag(true); - static int SystemID(0); - static int CaseID(0); - static int WalkInID(0); - static int CoilID(0); - static int ICond(0); - static int IRack(0); - static int SecondID(0); // Used to adjust accumulative variables when time step is repeated - static Real64 MyCurrentTime(0.0); // Used to determine whether the zone time step is a repetition static Real64 MyCurrentTimeSaved(0.0); // Used to determine whether the zone time step is a repetition - static Real64 MyStepStartTime(0.0); // Used to determine whether the system time step is a repetition static Real64 MyStepStartTimeSaved(0.0); // Used to determine whether the system time step is a repetition static Real64 TimeStepFraction(0.0); // Used to calculate my current time @@ -9053,8 +9027,8 @@ namespace RefrigeratedCase { e.KgFrost = 0.0; e.StoredEnergy = 0.0; } - for (WalkInID = 1; WalkInID <= NumSimulationWalkIns; ++WalkInID) { - WalkIn(WalkInID).IceTemp = WalkIn(WalkInID).TEvapDesign; + for (int walkInID = 1; walkInID <= NumSimulationWalkIns; ++walkInID) { + WalkIn(walkInID).IceTemp = WalkIn(walkInID).TEvapDesign; } } if (NumSimulationRefrigAirChillers > 0) { @@ -9062,9 +9036,9 @@ namespace RefrigeratedCase { e.KgFrost = 0.0; e.KgFrostSaved = 0.0; } - for (CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { - WarehouseCoil(CoilID).IceTemp = WarehouseCoil(CoilID).TEvapDesign; - WarehouseCoil(CoilID).IceTempSaved = WarehouseCoil(CoilID).TEvapDesign; + for (int coilID = 1; coilID <= NumSimulationRefrigAirChillers; ++coilID) { + WarehouseCoil(coilID).IceTemp = WarehouseCoil(coilID).TEvapDesign; + WarehouseCoil(coilID).IceTempSaved = WarehouseCoil(coilID).TEvapDesign; } } if (NumSimulationSecondarySystems > 0) { @@ -9091,10 +9065,10 @@ namespace RefrigeratedCase { e.LaggedUsedHVACCoil = 0.0; } } - for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { - if (allocated(System(SystemID).MechSCLoad)) System(SystemID).MechSCLoad = 0.0; - System(SystemID).LSHXTrans = 0.0; - System(SystemID).LSHXTransEnergy = 0.0; + for (int systemId = 1; systemId <= DataHeatBalance::NumRefrigSystems; ++systemId) { + if (allocated(System(systemId).MechSCLoad)) System(systemId).MechSCLoad = 0.0; + System(systemId).LSHXTrans = 0.0; + System(systemId).LSHXTransEnergy = 0.0; } if (DataGlobals::NumOfTimeStepInHour > 0.0) TimeStepFraction = 1.0 / double(DataGlobals::NumOfTimeStepInHour); @@ -9108,41 +9082,42 @@ namespace RefrigeratedCase { if (!DataGlobals::WarmupFlag) { // because no accumulation is done during warm up // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - MyCurrentTime = (DataGlobals::HourOfDay - 1) + DataGlobals::TimeStep * TimeStepFraction; + // Used to determine whether the zone time step is a repetition + Real64 MyCurrentTime = (DataGlobals::HourOfDay - 1) + DataGlobals::TimeStep * TimeStepFraction; if (std::abs(MyCurrentTime - MyCurrentTimeSaved) < MySmallNumber) { // If the time step is repeated, need to return to correct values at start of time step if (NumSimulationCases > 0) { - for (CaseID = 1; CaseID <= NumSimulationCases; ++CaseID) { - RefrigCase(CaseID).DefrostEnergy = RefrigCase(CaseID).DefrostEnergySaved; - RefrigCase(CaseID).StockingEnergy = RefrigCase(CaseID).StockingEnergySaved; - RefrigCase(CaseID).WarmEnvEnergy = RefrigCase(CaseID).WarmEnvEnergySaved; - RefrigCase(CaseID).KgFrost = RefrigCase(CaseID).KgFrostSaved; - RefrigCase(CaseID).StoredEnergy = RefrigCase(CaseID).StoredEnergySaved; + for (int caseID = 1; caseID <= NumSimulationCases; ++caseID) { + RefrigCase(caseID).DefrostEnergy = RefrigCase(caseID).DefrostEnergySaved; + RefrigCase(caseID).StockingEnergy = RefrigCase(caseID).StockingEnergySaved; + RefrigCase(caseID).WarmEnvEnergy = RefrigCase(caseID).WarmEnvEnergySaved; + RefrigCase(caseID).KgFrost = RefrigCase(caseID).KgFrostSaved; + RefrigCase(caseID).StoredEnergy = RefrigCase(caseID).StoredEnergySaved; } // CaseID } // NumSimulationCases if (NumSimulationWalkIns > 0) { - for (WalkInID = 1; WalkInID <= NumSimulationWalkIns; ++WalkInID) { - WalkIn(WalkInID).KgFrost = WalkIn(WalkInID).KgFrostSaved; - WalkIn(WalkInID).StoredEnergy = WalkIn(WalkInID).StoredEnergySaved; - WalkIn(WalkInID).IceTemp = WalkIn(WalkInID).IceTempSaved; + for (int walkInID = 1; walkInID <= NumSimulationWalkIns; ++walkInID) { + WalkIn(walkInID).KgFrost = WalkIn(walkInID).KgFrostSaved; + WalkIn(walkInID).StoredEnergy = WalkIn(walkInID).StoredEnergySaved; + WalkIn(walkInID).IceTemp = WalkIn(walkInID).IceTempSaved; } } if (DataHeatBalance::NumRefrigSystems > 0) { - for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { - if (System(SystemID).CoilFlag) continue; - System(SystemID).UnmetEnergy = System(SystemID).UnmetEnergySaved; + for (int systemID = 1; systemID <= DataHeatBalance::NumRefrigSystems; ++systemID) { + if (System(systemID).CoilFlag) continue; + System(systemID).UnmetEnergy = System(systemID).UnmetEnergySaved; } } if (NumTransRefrigSystems > 0) { - for (SystemID = 1; SystemID <= NumTransRefrigSystems; ++SystemID) { - TransSystem(SystemID).UnmetEnergyMT = TransSystem(SystemID).UnmetEnergySavedMT; - TransSystem(SystemID).UnmetEnergyLT = TransSystem(SystemID).UnmetEnergySavedLT; + for (int systemID = 1; systemID <= NumTransRefrigSystems; ++systemID) { + TransSystem(systemID).UnmetEnergyMT = TransSystem(systemID).UnmetEnergySavedMT; + TransSystem(systemID).UnmetEnergyLT = TransSystem(systemID).UnmetEnergySavedLT; } } if (NumSimulationSecondarySystems > 0) { - for (SecondID = 1; SecondID <= NumSimulationSecondarySystems; ++SecondID) { - if (Secondary(SecondID).CoilFlag) continue; - Secondary(SecondID).UnmetEnergy = Secondary(SecondID).UnmetEnergySaved; + for (int secondID = 1; secondID <= NumSimulationSecondarySystems; ++secondID) { + if (Secondary(secondID).CoilFlag) continue; + Secondary(secondID).UnmetEnergy = Secondary(secondID).UnmetEnergySaved; } } @@ -9150,48 +9125,48 @@ namespace RefrigeratedCase { // First time through this Zone time step, so set saved values to those in place at start of this time step MyCurrentTimeSaved = MyCurrentTime; if (NumSimulationCases > 0) { - for (CaseID = 1; CaseID <= NumSimulationCases; ++CaseID) { - RefrigCase(CaseID).DefrostEnergySaved = RefrigCase(CaseID).DefrostEnergy; - RefrigCase(CaseID).StockingEnergySaved = RefrigCase(CaseID).StockingEnergy; - RefrigCase(CaseID).WarmEnvEnergySaved = RefrigCase(CaseID).WarmEnvEnergy; - RefrigCase(CaseID).KgFrostSaved = RefrigCase(CaseID).KgFrost; - RefrigCase(CaseID).StoredEnergySaved = RefrigCase(CaseID).StoredEnergy; + for (int caseID = 1; caseID <= NumSimulationCases; ++caseID) { + RefrigCase(caseID).DefrostEnergySaved = RefrigCase(caseID).DefrostEnergy; + RefrigCase(caseID).StockingEnergySaved = RefrigCase(caseID).StockingEnergy; + RefrigCase(caseID).WarmEnvEnergySaved = RefrigCase(caseID).WarmEnvEnergy; + RefrigCase(caseID).KgFrostSaved = RefrigCase(caseID).KgFrost; + RefrigCase(caseID).StoredEnergySaved = RefrigCase(caseID).StoredEnergy; } // caseid } // numsimulationcases if (NumSimulationWalkIns > 0) { - for (WalkInID = 1; WalkInID <= NumSimulationWalkIns; ++WalkInID) { - WalkIn(WalkInID).KgFrostSaved = WalkIn(WalkInID).KgFrost; - WalkIn(WalkInID).StoredEnergySaved = WalkIn(WalkInID).StoredEnergy; - WalkIn(WalkInID).IceTempSaved = WalkIn(WalkInID).IceTemp; + for (int walkInID = 1; walkInID <= NumSimulationWalkIns; ++walkInID) { + WalkIn(walkInID).KgFrostSaved = WalkIn(walkInID).KgFrost; + WalkIn(walkInID).StoredEnergySaved = WalkIn(walkInID).StoredEnergy; + WalkIn(walkInID).IceTempSaved = WalkIn(walkInID).IceTemp; } } if (DataHeatBalance::NumRefrigSystems > 0) { - for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { - if (System(SystemID).CoilFlag) continue; - System(SystemID).UnmetEnergySaved = System(SystemID).UnmetEnergy; + for (int systemID = 1; systemID <= DataHeatBalance::NumRefrigSystems; ++systemID) { + if (System(systemID).CoilFlag) continue; + System(systemID).UnmetEnergySaved = System(systemID).UnmetEnergy; } } if (NumTransRefrigSystems > 0) { - for (SystemID = 1; SystemID <= NumTransRefrigSystems; ++SystemID) { - TransSystem(SystemID).UnmetEnergySavedMT = TransSystem(SystemID).UnmetEnergyMT; - TransSystem(SystemID).UnmetEnergySavedLT = TransSystem(SystemID).UnmetEnergyLT; + for (int systemID = 1; systemID <= NumTransRefrigSystems; ++systemID) { + TransSystem(systemID).UnmetEnergySavedMT = TransSystem(systemID).UnmetEnergyMT; + TransSystem(systemID).UnmetEnergySavedLT = TransSystem(systemID).UnmetEnergyLT; } } if (NumSimulationSecondarySystems > 0) { - for (SecondID = 1; SecondID <= NumSimulationSecondarySystems; ++SecondID) { - if (Secondary(SecondID).CoilFlag) continue; - Secondary(SecondID).UnmetEnergySaved = Secondary(SecondID).UnmetEnergy; + for (int secondID = 1; secondID <= NumSimulationSecondarySystems; ++secondID) { + if (Secondary(secondID).CoilFlag) continue; + Secondary(secondID).UnmetEnergySaved = Secondary(secondID).UnmetEnergy; } } // Following lagged variables set for consistency to value calculated prev time through HVAC time step loops if (allocated(DataHeatBalance::HeatReclaimRefrigeratedRack)) { - for (IRack = 1; IRack <= DataHeatBalance::NumRefrigeratedRacks; ++IRack) { + for (int IRack = 1; IRack <= DataHeatBalance::NumRefrigeratedRacks; ++IRack) { RefrigRack(IRack).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedHVACCoil; RefrigRack(IRack).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedWaterHeater; } } if (allocated(DataHeatBalance::HeatReclaimRefrigCondenser)) { - for (ICond = 1; ICond <= DataHeatBalance::NumRefrigCondensers; ++ICond) { + for (int ICond = 1; ICond <= DataHeatBalance::NumRefrigCondensers; ++ICond) { Condenser(ICond).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedHVACCoil; Condenser(ICond).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedWaterHeater; } @@ -9200,33 +9175,34 @@ namespace RefrigeratedCase { } else { // using UseSysTimeStep as a flag for a chiller system - MyStepStartTime = DataGlobals::CurrentTime - DataGlobals::TimeStepZone + DataHVACGlobals::SysTimeElapsed; + // Used to determine whether the system time step is a repetition + Real64 MyStepStartTime = DataGlobals::CurrentTime - DataGlobals::TimeStepZone + DataHVACGlobals::SysTimeElapsed; if (std::abs(MyStepStartTime - MyStepStartTimeSaved) < MySmallNumber) { // If the time step is repeated, need to return to correct values at start of time step if (NumSimulationRefrigAirChillers > 0) { - for (CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { - WarehouseCoil(CoilID).KgFrost = WarehouseCoil(CoilID).KgFrostSaved; - WarehouseCoil(CoilID).IceTemp = WarehouseCoil(CoilID).IceTempSaved; + for (int coilID = 1; coilID <= NumSimulationRefrigAirChillers; ++coilID) { + WarehouseCoil(coilID).KgFrost = WarehouseCoil(coilID).KgFrostSaved; + WarehouseCoil(coilID).IceTemp = WarehouseCoil(coilID).IceTempSaved; } } } else { // First time through this system time step or hvac loop, // so set saved values to those in place at start of this time step MyStepStartTimeSaved = MyStepStartTime; if (NumSimulationRefrigAirChillers > 0) { - for (CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { - WarehouseCoil(CoilID).KgFrostSaved = WarehouseCoil(CoilID).KgFrost; - WarehouseCoil(CoilID).IceTempSaved = WarehouseCoil(CoilID).IceTemp; + for (int coilID = 1; coilID <= NumSimulationRefrigAirChillers; ++coilID) { + WarehouseCoil(coilID).KgFrostSaved = WarehouseCoil(coilID).KgFrost; + WarehouseCoil(coilID).IceTempSaved = WarehouseCoil(coilID).IceTemp; } } // Following lagged variables set for consistency to value calculated prev time through HVAC time step loops if (allocated(DataHeatBalance::HeatReclaimRefrigeratedRack)) { - for (IRack = 1; IRack <= DataHeatBalance::NumRefrigeratedRacks; ++IRack) { + for (int IRack = 1; IRack <= DataHeatBalance::NumRefrigeratedRacks; ++IRack) { RefrigRack(IRack).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedHVACCoil; RefrigRack(IRack).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigeratedRack(IRack).UsedWaterHeater; } } if (allocated(DataHeatBalance::HeatReclaimRefrigCondenser)) { - for (ICond = 1; ICond <= DataHeatBalance::NumRefrigCondensers; ++ICond) { + for (int ICond = 1; ICond <= DataHeatBalance::NumRefrigCondensers; ++ICond) { Condenser(ICond).LaggedUsedHVACCoil = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedHVACCoil; Condenser(ICond).LaggedUsedWaterHeater = DataHeatBalance::HeatReclaimRefrigCondenser(ICond).UsedWaterHeater; } @@ -9238,11 +9214,11 @@ namespace RefrigeratedCase { if (DataGlobals::AnyEnergyManagementSystemInModel) { if (DataHeatBalance::NumRefrigSystems > 0) { - for (SystemID = 1; SystemID <= DataHeatBalance::NumRefrigSystems; ++SystemID) { - if (System(SystemID).EMSOverrideOnTCondenseMin) { - System(SystemID).TCondenseMin = System(SystemID).EMSOverrideValueTCondenseMin; + for (int systemID = 1; systemID <= DataHeatBalance::NumRefrigSystems; ++systemID) { + if (System(systemID).EMSOverrideOnTCondenseMin) { + System(systemID).TCondenseMin = System(systemID).EMSOverrideValueTCondenseMin; } else { - System(SystemID).TCondenseMin = System(SystemID).TCondenseMinInput; + System(systemID).TCondenseMin = System(systemID).TCondenseMinInput; } } } @@ -9434,7 +9410,6 @@ namespace RefrigeratedCase { Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] bool EvapAvail; // Control for evap condenser availability - static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems static int CoilSetIndex(0); // Index to set of coils in a single zone static int CoilSetID(0); // Index to set of coils in a single zone (shared inlet and outlet nodes) static int CoilIndex(0); // Index to a single air chiller/coil @@ -9457,9 +9432,6 @@ namespace RefrigeratedCase { HeatRejectZoneNum = 0; HeatRejectZoneNodeNum = 0; - LocalTimeStep = DataGlobals::TimeStepZone; - if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; - // Loads for chiller sets are set in call to zone equipment element "SimAirChillerSet" // (all chiller coils within a set are located in the same zone) // (note non-zone, such as refrigeration, and zone equip, such as airchillersets, called at diff times) @@ -9467,7 +9439,7 @@ namespace RefrigeratedCase { // In that subroutine, dispatch coils within each set in order specified for each zone // Below will assign loads to refrigeration system or secondary loop // Note that this routine will go through all refrigeration systems, but loads for multiple systems - // with interactions will not be known for the intitial calls with first HVAC time step. They will, + // with interactions will not be known for the intital calls with first HVAC time step. They will, // however, be repeated when the last chiller set is called from ZoneEquipmentManager // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { @@ -10993,7 +10965,6 @@ namespace RefrigeratedCase { static std::string const RoutineName("SimulateDetailedTransRefrigSystems"); int SysNum; // Index to the detailed transcritical refrigeration system being modeled - static bool FirstSCLoop(true); // Flag first time through multi-system loop used when mech subcoolers present static int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, don't loop static int LoopNum(0); // Index to overall repeat necessary for mechanical subcoolers static int CaseID(0); // Absolute reference to case @@ -11108,7 +11079,6 @@ namespace RefrigeratedCase { StartMechSubcoolLoop = 3; if (NumSimulationSharedGasCoolers > 0) StartMechSubcoolLoop = 1; - FirstSCLoop = true; for (LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { for (SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { @@ -11165,7 +11135,6 @@ namespace RefrigeratedCase { } // TransSystem(SysNum)%TotalSystemLoad > 0 } // SysNum over NumRefrigSystems - FirstSCLoop = false; } // LoopNum, three times for buildings with multiple detailed systems connected with shared gas coolers // Unmet load is done outside iterative loop @@ -11248,7 +11217,6 @@ namespace RefrigeratedCase { int NumIter; bool NotBalanced; - Real64 TCondStart; static Real64 MassFlowCompsStart(0.0); // Mass flow through (low-stage) compressors (single- or two-stage systems) static Real64 MassFlowHiStageCompsStart(0.0); // Mass flow through high-stage comrpessors (two-stage systems only) static Real64 ErrorMassFlowComps(0.0); // Error in calculated (low stage) compressor mass flow (single- or two-stage systems) @@ -11262,7 +11230,6 @@ namespace RefrigeratedCase { while (NotBalanced) { // Set values for iteration convergence tolerance check ++NumIter; - TCondStart = refrig_system.TCondense; MassFlowCompsStart = refrig_system.RefMassFlowComps; if (refrig_system.NumStages == 2) { // Two-stage systems MassFlowHiStageCompsStart = refrig_system.RefMassFlowHiStageComps; @@ -15130,9 +15097,6 @@ namespace RefrigeratedCase { MyEnvrnFlag = false; } if (!DataGlobals::BeginEnvrnFlag) MyEnvrnFlag = true; - - return; - } void ZeroHVACValues() From 83f8b85857ab3bbe89215d63f99351dd380b1675 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 31 Dec 2019 15:59:10 -0700 Subject: [PATCH 45/86] step 4 - partial remove statics --- src/EnergyPlus/RefrigeratedCase.cc | 45 +++++++++++------------------- src/EnergyPlus/RefrigeratedCase.hh | 2 +- 2 files changed, 17 insertions(+), 30 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index f574f231b27..c2f592343a3 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -2242,7 +2242,7 @@ namespace RefrigeratedCase { ShowContinueError("The \"CapacityTotalSpecificConditions\" Capacity Rating Type has been specified for this air chiller. " "This rating type requires "); ShowContinueError( - "the \"TabularRHxDT1xTRoom\" correction curve. Verify that a valid \"TabularRHxDT1xTRoom\" curve is specified in \"" + + R"(the "TabularRHxDT1xTRoom" correction curve. Verify that a valid "TabularRHxDT1xTRoom" curve is specified in ")" + cAlphaFieldNames(AlphaNum + 1) + "\"."); } } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "LinearSHR60")) { @@ -4539,7 +4539,7 @@ namespace RefrigeratedCase { } } else { // Invalid Mode of Operation ShowSevereError(RoutineName + CurrentModuleObject + ": " + cAlphaFieldNames(5) + " for " + Compressor(CompNum).Name + '=' + - Alphas(5) + " is invalid. Valid choices are \"Subcritical\" or \"Transcritical\"."); + Alphas(5) + R"( is invalid. Valid choices are "Subcritical" or "Transcritical".)"); ErrorsFound = true; } @@ -5259,7 +5259,7 @@ namespace RefrigeratedCase { System(RefrigSysNum).NumStages = Numbers(3); if (System(RefrigSysNum).NumStages < 1 || System(RefrigSysNum).NumStages > 2) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", " + cNumericFieldNames(3) + - " has an invalid value. Only \"1\" or \"2\" compressor stages are allowed."); + R"( has an invalid value. Only \"1\" or \"2\" compressor stages are allowed.)"); ErrorsFound = true; } } else { @@ -11284,17 +11284,11 @@ namespace RefrigeratedCase { Real64 const ErrorTol(0.001); // Iterative solution tolerance - int NumIter; // Iteration counter - bool NotBalanced; // Flag to indicate convergence, based on system balance - Real64 MassFlowStart; // Initial refrigerant mass flow through receiver bypass + int NumIter(0); // Iteration counter + bool NotBalanced(true); // Flag to indicate convergence, based on system balance + Real64 MassFlowStart(0.5); // Initial refrigerant mass flow through receiver bypass Real64 ErrorMassFlow; // Error in calculated refrigerant mass flow trhough receiver bypass - // Balance this refrigeration system using calculated refrigerant flow - NotBalanced = true; - NumIter = 0; - - // Set initial guess for receiver bypass refrigerant flow rate - MassFlowStart = 0.5; while (NotBalanced) { ++NumIter; @@ -11410,7 +11404,6 @@ namespace RefrigeratedCase { TotalBasinHeatPower = 0.0; TotalCondenserHeat = 0.0; TotalEvapWaterUseRate = 0.0; - AirVolRatio = 1.0; ActualFanPower = 0.0; TotalCondDefrostCredit = 0.0; TotalLoadFromSystems = 0.0; @@ -11780,7 +11773,6 @@ namespace RefrigeratedCase { if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; //! Initialize this gas cooler for this time step - TotalGasCoolerHeat = 0.0; AirVolRatio = 1.0; ActualFanPower = 0.0; TotalCondDefrostCredit = 0.0; @@ -11960,7 +11952,7 @@ namespace RefrigeratedCase { Real64 TempInRated(0.0); // Temperature entering compressor at rated superheat, C //Autodesk:Init Real64 TotalEnthalpyChangeActual; // Actual enthalpy change in cases and cold side of LSHX, J/kg Real64 TsatforPsuct; // Tsat for PSuction, C - Real64 TsatforPdisch; // Tsat for Pdischarge, c + Real64 TsatforPdisch(0.0); // Tsat for Pdischarge, c int StageIndex; // Compression stage index int NumComps; // Number of low-stage or high-stage compressors in system Real64 HHiStageCompIn; // Enthalpy at inlet of high-stage compressor (J/kg) @@ -12303,7 +12295,6 @@ namespace RefrigeratedCase { static std::string const RoutineName("RefrigeratedCase:CalculateTransCompressors"); int CompIndex; // Compressor index within system int CompID; // Compressor index within all compressors - int GasCoolerID; // Gas cooler index for this refrigeration system int Iter; // Iteration counter static Real64 AccumLoadMT(0.0); // Load due to previously unmet medium temperature compressor loads (transcritical system) static Real64 AccumLoadLT(0.0); // Load due to previously unmet low temperature compressor loads (transcritical system) @@ -12318,7 +12309,7 @@ namespace RefrigeratedCase { Real64 HCaseInRatedLT; // Enthalpy entering low temperature cases at rated subcooling, J/kg Real64 HCaseInRatedMT; // Enthalpy entering medium temperature cases at rated subcooling, J/kg static Real64 HCaseOutLTMT(0.0); // Combined enthalpy from the outlets of the LP compressor and MT loads, J/kg - Real64 HCompInRatedHP; // Enthalpy entering high pressure compressor at rated superheat, J/kg + Real64 HCompInRatedHP(0.0); // Enthalpy entering high pressure compressor at rated superheat, J/kg Real64 HCompInRatedLP; // Enthalpy entering low pressure compressor at rated superheat, J/kg Real64 HGCOutlet; // Enthalpy at gas cooler outlet, J/kg Real64 HIdeal; // Ideal enthalpy at subcooler (for 100% effectiveness) @@ -12336,7 +12327,7 @@ namespace RefrigeratedCase { Real64 PSuctionLT; // Suction pressure in low temperature cases, Pa Real64 PSuctionMT; // Suction pressure in medium temperature cases, Pa Real64 PGCOutlet; // Gas cooler outlet pressure, Pa - Real64 QualityReceiver; // Refrigerant quality in the receiver + Real64 QualityReceiver(0.0); // Refrigerant quality in the receiver Real64 SubcoolEffect; // Heat exchanger effectiveness of the subcooler Real64 TempInRatedHP; // Temperature entering high pressure compressor at rated superheat, C Real64 TempInRatedLP; // Temperature entering low pressure compressor at rated superheat, C @@ -12350,13 +12341,11 @@ namespace RefrigeratedCase { Real64 TotalRefMassFlow; // Total mass flow through high pressure side of system, kg/s Real64 Xu; // Initial upper guess for iterative search Real64 Xl; // Initial lower guess for iterative search - Real64 Xnew; // New guess for iterative search + Real64 Xnew(0.0); // New guess for iterative search LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; - GasCoolerID = TransSystem(SysNum).GasCoolerNum(1); - // Determine refrigerating capacity needed AccumLoadLT = 0.0; NeededCapacityLT = 0.0; @@ -12540,7 +12529,7 @@ namespace RefrigeratedCase { } TSubcoolerColdIn = Xnew; - // Modify receiver inlet enthlapy and HP compressor inlet enthalpy to account for subcooler + // Modify receiver inlet enthalpy and HP compressor inlet enthalpy to account for subcooler HIdeal = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TGasCoolerOut, PSuctionMT, @@ -12726,7 +12715,7 @@ namespace RefrigeratedCase { Real64 SubcoolerSupHeat; // additional superheat added to vapor going to compressor from LSHX Real64 TVapInDes; // Design Vapor Inlet temperature for LSHX Real64 TLiqInDes; // Design Liquid Inlet temperature for LSHX - Real64 TLiqInActual; // Liquid T in, after condenser, before any mechanical subcooler + Real64 TLiqInActual(0.0); // Liquid T in, after condenser, before any mechanical subcooler Real64 TVapInActual; // Vapor T in, after any superheat added by case control LocalTimeStep = DataGlobals::TimeStepZone; @@ -12827,7 +12816,7 @@ namespace RefrigeratedCase { int const SysType, bool &ErrorsFound, Optional_string_const ThisObjectType, - Optional_bool_const SuppressWarning) + const Optional_bool_const& SuppressWarning) { // SUBROUTINE INFORMATION: @@ -13954,12 +13943,11 @@ namespace RefrigeratedCase { int WalkInIndex; // used in summing walk-in loads on loop int ZoneNodeNum; // used to establish environmental temperature for dist piping heat gains Real64 CpBrine; // Specific heat (W/kg) - Real64 CircRatio; // Per ASHRAE definition = mass flow at pump/mass flow to condenser Real64 DensityBrine; // Density (kg/m3) Real64 DiffTemp; // (C) Real64 DistPipeHeatGain; // Optional (W) Real64 Error; // Used in iterative soln for pumps needed to meet load (that has to include pump energy) - Real64 Eta; // Secondary loop heat exchanger eta, dimensionless + Real64 Eta(0.0); // Secondary loop heat exchanger eta, dimensionless Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) static Real64 LoadRequested(0.0); // Load necessary to meet current and all stored energy needs (W) static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems @@ -13977,11 +13965,11 @@ namespace RefrigeratedCase { Real64 TBrineIn; // Brine temperature going to heat exchanger, C Real64 TCondense; // Condensing temperature for a phase change secondary loop, C Real64 TEvap; // Evaporating temperature in secondary loop heat exchanger (C) - Real64 TotalCoolingLoad(0); // Cooling load reported back to compressor rack or detailed system (W) + Real64 TotalCoolingLoad(0.0); // Cooling load reported back to compressor rack or detailed system (W) Real64 TotalHotDefrostCondCredit; // Used to credit condenser when heat reclaim used for hot gas/brine defrost (W) Real64 TotalPumpPower; // Total Pumping power for loop, W Real64 TotalLoad; // Total Cooling Load on secondary loop, W - Real64 TPipesReceiver; // Temperature used for contents of pipes and/or receiver in calculating shell losses (C) + Real64 TPipesReceiver(0.0); // Temperature used for contents of pipes and/or receiver in calculating shell losses (C) Real64 VarFrac; // Pump power fraction for variable speed pump, dimensionless Real64 VolFlowRate; // Used in dispatching pumps to meet load (m3/s) Real64 UnmetEnergy; // Cumulative, grows and shrinks with defrost cycles on loads served by loop (J) @@ -14004,7 +13992,6 @@ namespace RefrigeratedCase { TBrineIn = Secondary(SecondaryNum).TBrineInRated; TPipesReceiver = TBrineAverage; } else if (SELECT_CASE_var == SecFluidTypePhaseChange) { - CircRatio = Secondary(SecondaryNum).CircRate; TCondense = Secondary(SecondaryNum).TCondense; TPipesReceiver = TCondense; } diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 315c5eee130..9d47c768fca 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -1729,7 +1729,7 @@ namespace RefrigeratedCase { int SysType, bool &ErrorsFound, Optional_string_const ThisObjectType = _, - Optional_bool_const SuppressWarning = _); + const Optional_bool_const& SuppressWarning = _); void ReportRefrigerationComponents(); From 7734bdb675bb03792dbe92d437fdd4b69271a3b5 Mon Sep 17 00:00:00 2001 From: "Jason W. DeGraw" Date: Wed, 1 Jan 2020 15:48:56 -0700 Subject: [PATCH 46/86] Minor updates --- scripts/dev/licensetext.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/dev/licensetext.py b/scripts/dev/licensetext.py index cc24a9a1d14..72e2a9df9d6 100644 --- a/scripts/dev/licensetext.py +++ b/scripts/dev/licensetext.py @@ -7,7 +7,7 @@ # # The previous year that is in the license. It should be a string # -_previous_year = '2018' +_previous_year = '2019' # # From file "EnergyPlus License DRAFT 112015 100 fixed.txt" # @@ -187,7 +187,7 @@ def mergeParagraphs(text): class Visitor: def __init__(self): - self.count = 0 + self.checked_files = [] def filecheck(self, filepath): pass def files(self, path): @@ -195,7 +195,7 @@ def files(self, path): def check(self, path): for file in self.files(path): self.filecheck(file) - self.count += 1 + self.checked_files.append(file) class CodeChecker(Visitor): def __init__(self): @@ -293,7 +293,7 @@ def filecheck(self,filepath): fp.close() self.replaced += 1 def summary(self): - txt = ['Checked %d files' % self.count] + txt = ['Checked %d files' % len(self.checked_files)] if self.dryrun: txt.append('Would have replaced text in %d files' % self.replaced) else: From 73216c52816cb9b58072691182bd485d0c3b442d Mon Sep 17 00:00:00 2001 From: "Jason W. DeGraw" Date: Wed, 1 Jan 2020 19:52:40 -0700 Subject: [PATCH 47/86] Move toward Python 3 --- scripts/dev/license-update.py | 3 - scripts/dev/licensetext.py | 123 +++++++++++++++++++++++----------- 2 files changed, 85 insertions(+), 41 deletions(-) diff --git a/scripts/dev/license-update.py b/scripts/dev/license-update.py index 89158ccbf5a..5bffa8d89e2 100755 --- a/scripts/dev/license-update.py +++ b/scripts/dev/license-update.py @@ -72,9 +72,6 @@ # Check files for base in dirs: - #subdirs = glob.glob(base + '*/') replacer.check(base) - #for sub in subdirs: - # replacer.check(sub) print(replacer.summary()) diff --git a/scripts/dev/licensetext.py b/scripts/dev/licensetext.py index 72e2a9df9d6..cddadfa4ffc 100644 --- a/scripts/dev/licensetext.py +++ b/scripts/dev/licensetext.py @@ -192,6 +192,8 @@ def filecheck(self, filepath): pass def files(self, path): return glob.glob(path+'*') + def error(self, file, line_number, mesg): + pass def check(self, path): for file in self.files(path): self.filecheck(file) @@ -201,6 +203,15 @@ class CodeChecker(Visitor): def __init__(self): Visitor.__init__(self) def files(self, path): + # This is the Python 3 version, switch to it after + # the switch is made to require Python 3 + extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] + results = [] + for ext in extensions: + results.extend(glob.glob(path+'**/*.'+ext, recursive=True)) + return results + def files27(self, path): + # This is the old Python 2.7 version extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] results = [] for ext in extensions: @@ -211,13 +222,20 @@ def files(self, path): return results class Checker(CodeChecker): - def __init__(self, boilerplate, toolname='unspecified', message=error): + def __init__(self, boilerplate, toolname='unspecified'): CodeChecker.__init__(self) lines = boilerplate.splitlines() self.n = len(lines) self.text = boilerplate self.toolname = toolname - self.message = message + def error(self, file, line_number, mesg): + dictionary = {'tool':self.toolname, + 'filename':file, + 'file':file, + 'line':line_number, + 'messagetype':'error', + 'message':mesg} + print(json.dumps(dictionary)) def filecheck(self, filepath): fp = codecs.open(filepath,'r',encoding='utf-8',errors='ignore') try: @@ -228,12 +246,7 @@ def filecheck(self, filepath): fp = codecs.open(filepath,'r',encoding='utf8') txt = fp.read() except: - self.message({'tool':self.toolname, - 'filename':filepath, - 'file':filepath, - 'line':0, - 'messagetype':'error', - 'message':'UnicodeDecodeError: '+ str(exc)}) + self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) fp.close() return fp.close() @@ -242,22 +255,12 @@ def filecheck(self, filepath): lines = txt.splitlines()[:self.n] shortened = '\n'.join(lines)+'\n' checkLicense(filepath,shortened,self.text,offset=3, - toolname=self.toolname,message=self.message) + toolname=self.toolname,message=error) else: if n > 1: - self.message({'tool':self.toolname, - 'filename':filepath, - 'file':filepath, - 'line':1, - 'messagetype':'error', - 'message':'Multiple instances of license text'}) + self.error(filepath, 1, 'Multiple instances of license text') if not txt.startswith(self.text): - self.message({'tool':self.toolname, - 'filename':filepath, - 'file':filepath, - 'line':1, - 'messagetype':'error', - 'message':'License text is not at top of file'}) + self.error(filepath, 1, 'License text is not at top of file') class Replacer(CodeChecker): @@ -266,43 +269,87 @@ def __init__(self, oldtext, newtext, dryrun=True): self.oldtxt = oldtext self.newtxt = newtext self.dryrun = dryrun - self.replaced = 0 + self.replaced = [] self.failures = [] - def filecheck(self,filepath): + def error(self, file, line, mesg): + self.failures.append(file + ', ' + mesg) + def readtext(self, filepath): + # This is the Python 3 version, move it up to the base class after + # the switch is made to require Python 3 + fp = open(filepath, 'r', encoding='utf-8') + try: + txt = fp.read() + except UnicodeDecodeError as exc: + self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) + txt = None + #fp.close() + #fp = open(filepath, 'r', encoding='utf-8') #errors='ignore') + #try: + # txt = fp.read() + #except: + # self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) + # txt = None + except Exception as exc: + self.error(filepath, 0, 'Exception: '+ str(exc)) + txt = None + fp.close() + return txt + def readtext27(self, filepath): + # This is the old version for Python 2.7 fp = codecs.open(filepath,'r',encoding='utf-8',errors='ignore') try: txt = fp.read() except UnicodeDecodeError as exc: - message = filepath + ', UnicodeDecodeError: '+ str(exc) + mesg = 'UnicodeDecodeError: '+ str(exc) try: fp.close() fp = codecs.open(filepath,'r',encoding='utf8') txt = fp.read() except: - self.failures.append(message) - return + self.error(filepath, 0, mesg) + txt = None fp.close() - if self.dryrun: - if self.oldtxt in txt: - self.replaced += 1 - else: - txt = txt.replace(self.oldtxt, self.newtxt) - if self.newtxt in txt: - fp = codecs.open(filepath,'w',encoding='utf-8',errors='ignore') - fp.write(txt) - fp.close() - self.replaced += 1 + return txt + def writetext(self, filepath, txt): + fp = open(filepath, 'w', encoding='utf-8') + fp.write(txt) + fp.close() + def writetext27(self, filepath, txt): + fp = codecs.open(filepath,'w',encoding='utf-8', errors='ignore') + fp.write(txt) + fp.close() + def filecheck(self,filepath): + txt = self.readtext(filepath) + if txt != None: + if self.dryrun: + if self.oldtxt in txt: + self.replaced.append(filepath) + else: + txt = txt.replace(self.oldtxt, self.newtxt) + if self.newtxt in txt: + self.writetext(filepath, txt) + self.replaced.append(filepath) def summary(self): txt = ['Checked %d files' % len(self.checked_files)] if self.dryrun: - txt.append('Would have replaced text in %d files' % self.replaced) + txt.append('Would have replaced text in %d files' % len(self.replaced)) else: - txt.append('Replaced text in %d files' % self.replaced) + txt.append('Replaced text in %d files' % len(self.replaced)) if len(self.failures): txt.append('Failures in %d files' % len(self.failures)) for message in self.failures: txt.append('\t' + message) return '\n'.join(txt) + def report(self): + remaining = self.checked_files[:] + txt = ['Replaced text in the following files'] + for file in self.replaced: + remaining.remove(file) + txt.append('\t'+file) + txt.append('No changes made to the following files') + for file in remaining: + txt.append('\t'+file) + return self.summary() + '\n\n' + '\n'.join(txt) if __name__ == '__main__': text = current() From f8026b37b1bac7a8f8a1e5c58a850cc7ae86eb04 Mon Sep 17 00:00:00 2001 From: "Jason W. DeGraw" Date: Wed, 1 Jan 2020 19:56:41 -0700 Subject: [PATCH 48/86] Update the license year --- LICENSE.txt | 2 +- scripts/dev/licensetext.py | 4 ++-- src/EnergyPlus/AirLoopHVACDOAS.cc | 2 +- src/EnergyPlus/AirLoopHVACDOAS.hh | 2 +- src/EnergyPlus/AirTerminalUnit.hh | 2 +- .../AirflowNetwork/include/AirflowNetwork/Elements.hpp | 2 +- .../AirflowNetwork/include/AirflowNetwork/Properties.hpp | 2 +- .../AirflowNetwork/include/AirflowNetwork/Solver.hpp | 2 +- src/EnergyPlus/AirflowNetwork/src/Elements.cpp | 2 +- src/EnergyPlus/AirflowNetwork/src/Properties.cpp | 2 +- src/EnergyPlus/AirflowNetwork/src/Solver.cpp | 2 +- src/EnergyPlus/AirflowNetworkBalanceManager.cc | 2 +- src/EnergyPlus/AirflowNetworkBalanceManager.hh | 2 +- src/EnergyPlus/BaseboardElectric.cc | 2 +- src/EnergyPlus/BaseboardElectric.hh | 2 +- src/EnergyPlus/BaseboardRadiator.cc | 2 +- src/EnergyPlus/BaseboardRadiator.hh | 2 +- src/EnergyPlus/BoilerSteam.cc | 2 +- src/EnergyPlus/BoilerSteam.hh | 2 +- src/EnergyPlus/Boilers.cc | 2 +- src/EnergyPlus/Boilers.hh | 2 +- src/EnergyPlus/BranchInputManager.cc | 2 +- src/EnergyPlus/BranchInputManager.hh | 2 +- src/EnergyPlus/BranchNodeConnections.cc | 2 +- src/EnergyPlus/BranchNodeConnections.hh | 2 +- src/EnergyPlus/CTElectricGenerator.cc | 2 +- src/EnergyPlus/CTElectricGenerator.hh | 2 +- src/EnergyPlus/ChilledCeilingPanelSimple.cc | 2 +- src/EnergyPlus/ChilledCeilingPanelSimple.hh | 2 +- src/EnergyPlus/ChillerAbsorption.cc | 2 +- src/EnergyPlus/ChillerAbsorption.hh | 2 +- src/EnergyPlus/ChillerElectricEIR.cc | 2 +- src/EnergyPlus/ChillerElectricEIR.hh | 2 +- src/EnergyPlus/ChillerExhaustAbsorption.cc | 2 +- src/EnergyPlus/ChillerExhaustAbsorption.hh | 2 +- src/EnergyPlus/ChillerGasAbsorption.cc | 2 +- src/EnergyPlus/ChillerGasAbsorption.hh | 2 +- src/EnergyPlus/ChillerIndirectAbsorption.cc | 2 +- src/EnergyPlus/ChillerIndirectAbsorption.hh | 2 +- src/EnergyPlus/ChillerReformulatedEIR.cc | 2 +- src/EnergyPlus/ChillerReformulatedEIR.hh | 2 +- src/EnergyPlus/CommandLineInterface.cc | 2 +- src/EnergyPlus/CommandLineInterface.hh | 2 +- src/EnergyPlus/CondenserLoopTowers.cc | 2 +- src/EnergyPlus/CondenserLoopTowers.hh | 2 +- src/EnergyPlus/ConductionTransferFunctionCalc.cc | 2 +- src/EnergyPlus/ConductionTransferFunctionCalc.hh | 2 +- src/EnergyPlus/ConfiguredFunctions.hh | 2 +- src/EnergyPlus/ConfiguredFunctions.in.cc | 2 +- src/EnergyPlus/ConvectionCoefficients.cc | 2 +- src/EnergyPlus/ConvectionCoefficients.hh | 2 +- src/EnergyPlus/CoolTower.cc | 2 +- src/EnergyPlus/CoolTower.hh | 2 +- src/EnergyPlus/CostEstimateManager.cc | 2 +- src/EnergyPlus/CostEstimateManager.hh | 2 +- src/EnergyPlus/CrossVentMgr.cc | 2 +- src/EnergyPlus/CrossVentMgr.hh | 2 +- src/EnergyPlus/CurveManager.cc | 2 +- src/EnergyPlus/CurveManager.hh | 2 +- src/EnergyPlus/DElightManagerF.cc | 2 +- src/EnergyPlus/DElightManagerF.hh | 2 +- src/EnergyPlus/DXCoils.cc | 2 +- src/EnergyPlus/DXCoils.hh | 2 +- src/EnergyPlus/DXFEarClipping.cc | 2 +- src/EnergyPlus/DXFEarClipping.hh | 2 +- src/EnergyPlus/DataAirLoop.cc | 2 +- src/EnergyPlus/DataAirLoop.hh | 2 +- src/EnergyPlus/DataAirSystems.cc | 2 +- src/EnergyPlus/DataAirSystems.hh | 2 +- src/EnergyPlus/DataBSDFWindow.cc | 2 +- src/EnergyPlus/DataBSDFWindow.hh | 2 +- src/EnergyPlus/DataBranchAirLoopPlant.cc | 2 +- src/EnergyPlus/DataBranchAirLoopPlant.hh | 2 +- src/EnergyPlus/DataBranchNodeConnections.cc | 2 +- src/EnergyPlus/DataBranchNodeConnections.hh | 2 +- src/EnergyPlus/DataComplexFenestration.cc | 2 +- src/EnergyPlus/DataComplexFenestration.hh | 2 +- src/EnergyPlus/DataContaminantBalance.cc | 2 +- src/EnergyPlus/DataContaminantBalance.hh | 2 +- src/EnergyPlus/DataConvergParams.cc | 2 +- src/EnergyPlus/DataConvergParams.hh | 2 +- src/EnergyPlus/DataConversions.cc | 2 +- src/EnergyPlus/DataConversions.hh | 2 +- src/EnergyPlus/DataCostEstimate.cc | 2 +- src/EnergyPlus/DataCostEstimate.hh | 2 +- src/EnergyPlus/DataDElight.cc | 2 +- src/EnergyPlus/DataDElight.hh | 2 +- src/EnergyPlus/DataDaylighting.cc | 2 +- src/EnergyPlus/DataDaylighting.hh | 2 +- src/EnergyPlus/DataDaylightingDevices.cc | 2 +- src/EnergyPlus/DataDaylightingDevices.hh | 2 +- src/EnergyPlus/DataDefineEquip.cc | 2 +- src/EnergyPlus/DataDefineEquip.hh | 2 +- src/EnergyPlus/DataEnvironment.cc | 2 +- src/EnergyPlus/DataEnvironment.hh | 2 +- src/EnergyPlus/DataErrorTracking.cc | 2 +- src/EnergyPlus/DataErrorTracking.hh | 2 +- src/EnergyPlus/DataGenerators.cc | 2 +- src/EnergyPlus/DataGenerators.hh | 2 +- src/EnergyPlus/DataGlobalConstants.cc | 2 +- src/EnergyPlus/DataGlobalConstants.hh | 2 +- src/EnergyPlus/DataGlobals.cc | 2 +- src/EnergyPlus/DataGlobals.hh | 2 +- src/EnergyPlus/DataHVACControllers.cc | 2 +- src/EnergyPlus/DataHVACControllers.hh | 2 +- src/EnergyPlus/DataHVACGlobals.cc | 2 +- src/EnergyPlus/DataHVACGlobals.hh | 2 +- src/EnergyPlus/DataHeatBalFanSys.cc | 2 +- src/EnergyPlus/DataHeatBalFanSys.hh | 2 +- src/EnergyPlus/DataHeatBalSurface.cc | 2 +- src/EnergyPlus/DataHeatBalSurface.hh | 2 +- src/EnergyPlus/DataHeatBalance.cc | 2 +- src/EnergyPlus/DataHeatBalance.hh | 2 +- src/EnergyPlus/DataIPShortCuts.cc | 2 +- src/EnergyPlus/DataIPShortCuts.hh | 2 +- src/EnergyPlus/DataLoopNode.cc | 2 +- src/EnergyPlus/DataLoopNode.hh | 2 +- src/EnergyPlus/DataMoistureBalance.cc | 2 +- src/EnergyPlus/DataMoistureBalance.hh | 2 +- src/EnergyPlus/DataMoistureBalanceEMPD.cc | 2 +- src/EnergyPlus/DataMoistureBalanceEMPD.hh | 2 +- src/EnergyPlus/DataOutputs.cc | 2 +- src/EnergyPlus/DataOutputs.hh | 2 +- src/EnergyPlus/DataPhotovoltaics.cc | 2 +- src/EnergyPlus/DataPhotovoltaics.hh | 2 +- src/EnergyPlus/DataPlant.cc | 2 +- src/EnergyPlus/DataPlant.hh | 2 +- src/EnergyPlus/DataPlantPipingSystems.cc | 2 +- src/EnergyPlus/DataPlantPipingSystems.hh | 2 +- src/EnergyPlus/DataPrecisionGlobals.cc | 2 +- src/EnergyPlus/DataPrecisionGlobals.hh | 2 +- src/EnergyPlus/DataReportingFlags.cc | 2 +- src/EnergyPlus/DataReportingFlags.hh | 2 +- src/EnergyPlus/DataRoomAirModel.cc | 2 +- src/EnergyPlus/DataRoomAirModel.hh | 2 +- src/EnergyPlus/DataRootFinder.cc | 2 +- src/EnergyPlus/DataRootFinder.hh | 2 +- src/EnergyPlus/DataRuntimeLanguage.cc | 2 +- src/EnergyPlus/DataRuntimeLanguage.hh | 2 +- src/EnergyPlus/DataShadowingCombinations.cc | 2 +- src/EnergyPlus/DataShadowingCombinations.hh | 2 +- src/EnergyPlus/DataSizing.cc | 2 +- src/EnergyPlus/DataSizing.hh | 2 +- src/EnergyPlus/DataStringGlobals.hh | 2 +- src/EnergyPlus/DataStringGlobals.in.cc | 2 +- src/EnergyPlus/DataSurfaceColors.cc | 2 +- src/EnergyPlus/DataSurfaceColors.hh | 2 +- src/EnergyPlus/DataSurfaceLists.cc | 2 +- src/EnergyPlus/DataSurfaceLists.hh | 2 +- src/EnergyPlus/DataSurfaces.cc | 2 +- src/EnergyPlus/DataSurfaces.hh | 2 +- src/EnergyPlus/DataSystemVariables.cc | 2 +- src/EnergyPlus/DataSystemVariables.hh | 2 +- src/EnergyPlus/DataTimings.cc | 2 +- src/EnergyPlus/DataTimings.hh | 2 +- src/EnergyPlus/DataUCSDSharedData.cc | 2 +- src/EnergyPlus/DataUCSDSharedData.hh | 2 +- src/EnergyPlus/DataVectorTypes.hh | 2 +- src/EnergyPlus/DataViewFactorInformation.cc | 2 +- src/EnergyPlus/DataViewFactorInformation.hh | 2 +- src/EnergyPlus/DataWater.cc | 2 +- src/EnergyPlus/DataWater.hh | 2 +- src/EnergyPlus/DataWindowEquivalentLayer.cc | 2 +- src/EnergyPlus/DataWindowEquivalentLayer.hh | 2 +- src/EnergyPlus/DataZoneControls.cc | 2 +- src/EnergyPlus/DataZoneControls.hh | 2 +- src/EnergyPlus/DataZoneEnergyDemands.cc | 2 +- src/EnergyPlus/DataZoneEnergyDemands.hh | 2 +- src/EnergyPlus/DataZoneEquipment.cc | 2 +- src/EnergyPlus/DataZoneEquipment.hh | 2 +- src/EnergyPlus/DaylightingDevices.cc | 2 +- src/EnergyPlus/DaylightingDevices.hh | 2 +- src/EnergyPlus/DaylightingManager.cc | 2 +- src/EnergyPlus/DaylightingManager.hh | 2 +- src/EnergyPlus/DemandManager.cc | 2 +- src/EnergyPlus/DemandManager.hh | 2 +- src/EnergyPlus/DesiccantDehumidifiers.cc | 2 +- src/EnergyPlus/DesiccantDehumidifiers.hh | 2 +- src/EnergyPlus/DirectAirManager.cc | 2 +- src/EnergyPlus/DirectAirManager.hh | 2 +- src/EnergyPlus/DisplacementVentMgr.cc | 2 +- src/EnergyPlus/DisplacementVentMgr.hh | 2 +- src/EnergyPlus/DisplayRoutines.cc | 2 +- src/EnergyPlus/DisplayRoutines.hh | 2 +- src/EnergyPlus/DualDuct.cc | 2 +- src/EnergyPlus/DualDuct.hh | 2 +- src/EnergyPlus/EMSManager.cc | 2 +- src/EnergyPlus/EMSManager.hh | 2 +- src/EnergyPlus/EarthTube.cc | 2 +- src/EnergyPlus/EarthTube.hh | 2 +- src/EnergyPlus/EcoRoofManager.cc | 2 +- src/EnergyPlus/EcoRoofManager.hh | 2 +- src/EnergyPlus/EconomicLifeCycleCost.cc | 2 +- src/EnergyPlus/EconomicLifeCycleCost.hh | 2 +- src/EnergyPlus/EconomicTariff.cc | 2 +- src/EnergyPlus/EconomicTariff.hh | 2 +- src/EnergyPlus/ElectricBaseboardRadiator.cc | 2 +- src/EnergyPlus/ElectricBaseboardRadiator.hh | 2 +- src/EnergyPlus/ElectricPowerServiceManager.cc | 2 +- src/EnergyPlus/ElectricPowerServiceManager.hh | 2 +- src/EnergyPlus/EnergyPlus.hh | 2 +- src/EnergyPlus/EnergyPlusPgm.cc | 2 +- src/EnergyPlus/EvaporativeCoolers.cc | 2 +- src/EnergyPlus/EvaporativeCoolers.hh | 2 +- src/EnergyPlus/EvaporativeFluidCoolers.cc | 2 +- src/EnergyPlus/EvaporativeFluidCoolers.hh | 2 +- src/EnergyPlus/ExteriorEnergyUse.cc | 2 +- src/EnergyPlus/ExteriorEnergyUse.hh | 2 +- src/EnergyPlus/ExternalInterface.cc | 2 +- src/EnergyPlus/ExternalInterface.hh | 2 +- src/EnergyPlus/FanCoilUnits.cc | 2 +- src/EnergyPlus/FanCoilUnits.hh | 2 +- src/EnergyPlus/Fans.cc | 2 +- src/EnergyPlus/Fans.hh | 2 +- src/EnergyPlus/FaultsManager.cc | 2 +- src/EnergyPlus/FaultsManager.hh | 2 +- src/EnergyPlus/FileSystem.cc | 2 +- src/EnergyPlus/FileSystem.hh | 2 +- src/EnergyPlus/FluidCoolers.cc | 2 +- src/EnergyPlus/FluidCoolers.hh | 2 +- src/EnergyPlus/FluidProperties.cc | 2 +- src/EnergyPlus/FluidProperties.hh | 2 +- src/EnergyPlus/FuelCellElectricGenerator.cc | 2 +- src/EnergyPlus/FuelCellElectricGenerator.hh | 2 +- src/EnergyPlus/Furnaces.cc | 2 +- src/EnergyPlus/Furnaces.hh | 2 +- src/EnergyPlus/General.cc | 2 +- src/EnergyPlus/General.hh | 2 +- src/EnergyPlus/GeneralRoutines.cc | 2 +- src/EnergyPlus/GeneralRoutines.hh | 2 +- src/EnergyPlus/GeneratorDynamicsManager.cc | 2 +- src/EnergyPlus/GeneratorDynamicsManager.hh | 2 +- src/EnergyPlus/GeneratorFuelSupply.cc | 2 +- src/EnergyPlus/GeneratorFuelSupply.hh | 2 +- src/EnergyPlus/GlobalNames.cc | 2 +- src/EnergyPlus/GlobalNames.hh | 2 +- src/EnergyPlus/GroundHeatExchangers.cc | 2 +- src/EnergyPlus/GroundHeatExchangers.hh | 2 +- .../GroundTemperatureModeling/BaseGroundTemperatureModel.hh | 2 +- .../FiniteDifferenceGroundTemperatureModel.cc | 2 +- .../FiniteDifferenceGroundTemperatureModel.hh | 2 +- .../GroundTemperatureModelManager.cc | 2 +- .../GroundTemperatureModelManager.hh | 2 +- .../KusudaAchenbachGroundTemperatureModel.cc | 2 +- .../KusudaAchenbachGroundTemperatureModel.hh | 2 +- .../SiteBuildingSurfaceGroundTemperatures.cc | 2 +- .../SiteBuildingSurfaceGroundTemperatures.hh | 2 +- .../GroundTemperatureModeling/SiteDeepGroundTemperatures.cc | 2 +- .../GroundTemperatureModeling/SiteDeepGroundTemperatures.hh | 2 +- .../SiteFCFactorMethodGroundTemperatures.cc | 2 +- .../SiteFCFactorMethodGroundTemperatures.hh | 2 +- .../SiteShallowGroundTemperatures.cc | 2 +- .../SiteShallowGroundTemperatures.hh | 2 +- .../GroundTemperatureModeling/XingGroundTemperatureModel.cc | 2 +- .../GroundTemperatureModeling/XingGroundTemperatureModel.hh | 2 +- src/EnergyPlus/HVACControllers.cc | 2 +- src/EnergyPlus/HVACControllers.hh | 2 +- src/EnergyPlus/HVACCooledBeam.cc | 2 +- src/EnergyPlus/HVACCooledBeam.hh | 2 +- src/EnergyPlus/HVACDXHeatPumpSystem.cc | 2 +- src/EnergyPlus/HVACDXHeatPumpSystem.hh | 2 +- src/EnergyPlus/HVACDXSystem.cc | 2 +- src/EnergyPlus/HVACDXSystem.hh | 2 +- src/EnergyPlus/HVACDuct.cc | 2 +- src/EnergyPlus/HVACDuct.hh | 2 +- src/EnergyPlus/HVACFan.cc | 2 +- src/EnergyPlus/HVACFan.hh | 2 +- src/EnergyPlus/HVACFourPipeBeam.cc | 2 +- src/EnergyPlus/HVACFourPipeBeam.hh | 2 +- src/EnergyPlus/HVACHXAssistedCoolingCoil.cc | 2 +- src/EnergyPlus/HVACHXAssistedCoolingCoil.hh | 2 +- src/EnergyPlus/HVACInterfaceManager.cc | 2 +- src/EnergyPlus/HVACInterfaceManager.hh | 2 +- src/EnergyPlus/HVACManager.cc | 2 +- src/EnergyPlus/HVACManager.hh | 2 +- src/EnergyPlus/HVACMultiSpeedHeatPump.cc | 2 +- src/EnergyPlus/HVACMultiSpeedHeatPump.hh | 2 +- src/EnergyPlus/HVACSingleDuctInduc.cc | 2 +- src/EnergyPlus/HVACSingleDuctInduc.hh | 2 +- src/EnergyPlus/HVACSizingSimulationManager.cc | 2 +- src/EnergyPlus/HVACSizingSimulationManager.hh | 2 +- src/EnergyPlus/HVACStandAloneERV.cc | 2 +- src/EnergyPlus/HVACStandAloneERV.hh | 2 +- src/EnergyPlus/HVACUnitaryBypassVAV.cc | 2 +- src/EnergyPlus/HVACUnitaryBypassVAV.hh | 2 +- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 2 +- src/EnergyPlus/HVACVariableRefrigerantFlow.hh | 2 +- src/EnergyPlus/HWBaseboardRadiator.cc | 2 +- src/EnergyPlus/HWBaseboardRadiator.hh | 2 +- src/EnergyPlus/HeatBalFiniteDiffManager.cc | 2 +- src/EnergyPlus/HeatBalFiniteDiffManager.hh | 2 +- src/EnergyPlus/HeatBalanceAirManager.cc | 2 +- src/EnergyPlus/HeatBalanceAirManager.hh | 2 +- src/EnergyPlus/HeatBalanceHAMTManager.cc | 2 +- src/EnergyPlus/HeatBalanceHAMTManager.hh | 2 +- src/EnergyPlus/HeatBalanceIntRadExchange.cc | 2 +- src/EnergyPlus/HeatBalanceIntRadExchange.hh | 2 +- src/EnergyPlus/HeatBalanceInternalHeatGains.cc | 2 +- src/EnergyPlus/HeatBalanceInternalHeatGains.hh | 2 +- src/EnergyPlus/HeatBalanceKivaManager.cc | 2 +- src/EnergyPlus/HeatBalanceKivaManager.hh | 2 +- src/EnergyPlus/HeatBalanceManager.cc | 2 +- src/EnergyPlus/HeatBalanceManager.hh | 2 +- src/EnergyPlus/HeatBalanceMovableInsulation.cc | 2 +- src/EnergyPlus/HeatBalanceMovableInsulation.hh | 2 +- src/EnergyPlus/HeatBalanceSurfaceManager.cc | 2 +- src/EnergyPlus/HeatBalanceSurfaceManager.hh | 2 +- src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc | 2 +- src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh | 2 +- src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc | 2 +- src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh | 2 +- src/EnergyPlus/HeatPumpWaterToWaterSimple.cc | 2 +- src/EnergyPlus/HeatPumpWaterToWaterSimple.hh | 2 +- src/EnergyPlus/HeatRecovery.cc | 2 +- src/EnergyPlus/HeatRecovery.hh | 2 +- src/EnergyPlus/HeatingCoils.cc | 2 +- src/EnergyPlus/HeatingCoils.hh | 2 +- src/EnergyPlus/HighTempRadiantSystem.cc | 2 +- src/EnergyPlus/HighTempRadiantSystem.hh | 2 +- src/EnergyPlus/Humidifiers.cc | 2 +- src/EnergyPlus/Humidifiers.hh | 2 +- src/EnergyPlus/HybridEvapCoolingModel.cc | 2 +- src/EnergyPlus/HybridEvapCoolingModel.hh | 2 +- src/EnergyPlus/HybridModel.cc | 2 +- src/EnergyPlus/HybridModel.hh | 2 +- src/EnergyPlus/HybridUnitaryAirConditioners.cc | 2 +- src/EnergyPlus/HybridUnitaryAirConditioners.hh | 2 +- src/EnergyPlus/ICEngineElectricGenerator.cc | 2 +- src/EnergyPlus/ICEngineElectricGenerator.hh | 2 +- src/EnergyPlus/IceThermalStorage.cc | 2 +- src/EnergyPlus/IceThermalStorage.hh | 2 +- src/EnergyPlus/InputProcessing/DataStorage.hh | 2 +- src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.hh | 2 +- src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.in.cc | 2 +- src/EnergyPlus/InputProcessing/IdfParser.cc | 2 +- src/EnergyPlus/InputProcessing/IdfParser.hh | 2 +- src/EnergyPlus/InputProcessing/InputProcessor.cc | 2 +- src/EnergyPlus/InputProcessing/InputProcessor.hh | 2 +- src/EnergyPlus/InputProcessing/InputValidation.cc | 2 +- src/EnergyPlus/InputProcessing/InputValidation.hh | 2 +- src/EnergyPlus/IntegratedHeatPump.cc | 2 +- src/EnergyPlus/IntegratedHeatPump.hh | 2 +- src/EnergyPlus/InternalHeatGains.cc | 2 +- src/EnergyPlus/InternalHeatGains.hh | 2 +- src/EnergyPlus/LowTempRadiantSystem.cc | 2 +- src/EnergyPlus/LowTempRadiantSystem.hh | 2 +- src/EnergyPlus/MatrixDataManager.cc | 2 +- src/EnergyPlus/MatrixDataManager.hh | 2 +- src/EnergyPlus/MicroCHPElectricGenerator.cc | 2 +- src/EnergyPlus/MicroCHPElectricGenerator.hh | 2 +- src/EnergyPlus/MicroturbineElectricGenerator.cc | 2 +- src/EnergyPlus/MicroturbineElectricGenerator.hh | 2 +- src/EnergyPlus/MixedAir.cc | 2 +- src/EnergyPlus/MixedAir.hh | 2 +- src/EnergyPlus/MixerComponent.cc | 2 +- src/EnergyPlus/MixerComponent.hh | 2 +- src/EnergyPlus/MoistureBalanceEMPDManager.cc | 2 +- src/EnergyPlus/MoistureBalanceEMPDManager.hh | 2 +- src/EnergyPlus/MundtSimMgr.cc | 2 +- src/EnergyPlus/MundtSimMgr.hh | 2 +- src/EnergyPlus/NodeInputManager.cc | 2 +- src/EnergyPlus/NodeInputManager.hh | 2 +- src/EnergyPlus/NonZoneEquipmentManager.cc | 2 +- src/EnergyPlus/NonZoneEquipmentManager.hh | 2 +- src/EnergyPlus/OutAirNodeManager.cc | 2 +- src/EnergyPlus/OutAirNodeManager.hh | 2 +- src/EnergyPlus/OutdoorAirUnit.cc | 2 +- src/EnergyPlus/OutdoorAirUnit.hh | 2 +- src/EnergyPlus/OutputProcessor.cc | 2 +- src/EnergyPlus/OutputProcessor.hh | 2 +- src/EnergyPlus/OutputReportData.cc | 2 +- src/EnergyPlus/OutputReportData.hh | 2 +- src/EnergyPlus/OutputReportPredefined.cc | 2 +- src/EnergyPlus/OutputReportPredefined.hh | 2 +- src/EnergyPlus/OutputReportTabular.cc | 2 +- src/EnergyPlus/OutputReportTabular.hh | 2 +- src/EnergyPlus/OutputReportTabularAnnual.cc | 2 +- src/EnergyPlus/OutputReportTabularAnnual.hh | 2 +- src/EnergyPlus/OutputReports.cc | 2 +- src/EnergyPlus/OutputReports.hh | 2 +- src/EnergyPlus/OutsideEnergySources.cc | 2 +- src/EnergyPlus/OutsideEnergySources.hh | 2 +- src/EnergyPlus/PVWatts.cc | 2 +- src/EnergyPlus/PVWatts.hh | 2 +- src/EnergyPlus/PVWattsSSC.cc | 2 +- src/EnergyPlus/PVWattsSSC.hh | 2 +- src/EnergyPlus/PackagedTerminalHeatPump.cc | 2 +- src/EnergyPlus/PackagedTerminalHeatPump.hh | 2 +- src/EnergyPlus/PackagedThermalStorageCoil.cc | 2 +- src/EnergyPlus/PackagedThermalStorageCoil.hh | 2 +- src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc | 2 +- src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh | 2 +- src/EnergyPlus/PhotovoltaicThermalCollectors.cc | 2 +- src/EnergyPlus/PhotovoltaicThermalCollectors.hh | 2 +- src/EnergyPlus/Photovoltaics.cc | 2 +- src/EnergyPlus/Photovoltaics.hh | 2 +- src/EnergyPlus/PierceSurface.hh | 2 +- src/EnergyPlus/PipeHeatTransfer.cc | 2 +- src/EnergyPlus/PipeHeatTransfer.hh | 2 +- src/EnergyPlus/Pipes.cc | 2 +- src/EnergyPlus/Pipes.hh | 2 +- src/EnergyPlus/Plant/Branch.hh | 2 +- src/EnergyPlus/Plant/CallingOrder.hh | 2 +- src/EnergyPlus/Plant/Component.hh | 2 +- src/EnergyPlus/Plant/ConnectedLoopData.hh | 2 +- src/EnergyPlus/Plant/Connection.hh | 2 +- src/EnergyPlus/Plant/Enums.hh | 2 +- src/EnergyPlus/Plant/EquipAndOperations.hh | 2 +- src/EnergyPlus/Plant/Loop.hh | 2 +- src/EnergyPlus/Plant/LoopSide.hh | 2 +- src/EnergyPlus/Plant/LoopSidePumpInformation.hh | 2 +- src/EnergyPlus/Plant/LoopSideReportVars.hh | 2 +- src/EnergyPlus/Plant/MeterData.hh | 2 +- src/EnergyPlus/Plant/MixerData.hh | 2 +- src/EnergyPlus/Plant/PlantAvailManager.hh | 2 +- src/EnergyPlus/Plant/PlantConvergencePoint.hh | 2 +- src/EnergyPlus/Plant/PlantLocation.hh | 2 +- src/EnergyPlus/Plant/PlantLoopSolver.cc | 2 +- src/EnergyPlus/Plant/PlantLoopSolver.hh | 2 +- src/EnergyPlus/Plant/PlantManager.cc | 2 +- src/EnergyPlus/Plant/PlantManager.hh | 2 +- src/EnergyPlus/Plant/ReportBranchData.hh | 2 +- src/EnergyPlus/Plant/ReportCompData.hh | 2 +- src/EnergyPlus/Plant/ReportLoopData.hh | 2 +- src/EnergyPlus/Plant/ReportVars.hh | 2 +- src/EnergyPlus/Plant/SplitterData.hh | 2 +- src/EnergyPlus/Plant/Subcomponents.hh | 2 +- src/EnergyPlus/PlantCentralGSHP.cc | 2 +- src/EnergyPlus/PlantCentralGSHP.hh | 2 +- src/EnergyPlus/PlantChillers.cc | 2 +- src/EnergyPlus/PlantChillers.hh | 2 +- src/EnergyPlus/PlantComponent.hh | 2 +- src/EnergyPlus/PlantComponentTemperatureSources.cc | 2 +- src/EnergyPlus/PlantComponentTemperatureSources.hh | 2 +- src/EnergyPlus/PlantCondLoopOperation.cc | 2 +- src/EnergyPlus/PlantCondLoopOperation.hh | 2 +- src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc | 2 +- src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh | 2 +- src/EnergyPlus/PlantLoadProfile.cc | 2 +- src/EnergyPlus/PlantLoadProfile.hh | 2 +- src/EnergyPlus/PlantLoopEquip.cc | 2 +- src/EnergyPlus/PlantLoopEquip.hh | 2 +- src/EnergyPlus/PlantPipingSystemsManager.cc | 2 +- src/EnergyPlus/PlantPipingSystemsManager.hh | 2 +- src/EnergyPlus/PlantPressureSystem.cc | 2 +- src/EnergyPlus/PlantPressureSystem.hh | 2 +- src/EnergyPlus/PlantUtilities.cc | 2 +- src/EnergyPlus/PlantUtilities.hh | 2 +- src/EnergyPlus/PlantValves.cc | 2 +- src/EnergyPlus/PlantValves.hh | 2 +- src/EnergyPlus/Platform.hh | 2 +- src/EnergyPlus/PollutionModule.cc | 2 +- src/EnergyPlus/PollutionModule.hh | 2 +- src/EnergyPlus/PondGroundHeatExchanger.cc | 2 +- src/EnergyPlus/PondGroundHeatExchanger.hh | 2 +- src/EnergyPlus/PoweredInductionUnits.cc | 2 +- src/EnergyPlus/PoweredInductionUnits.hh | 2 +- src/EnergyPlus/Psychrometrics.cc | 2 +- src/EnergyPlus/Psychrometrics.hh | 2 +- src/EnergyPlus/Pumps.cc | 2 +- src/EnergyPlus/Pumps.hh | 2 +- src/EnergyPlus/PurchasedAirManager.cc | 2 +- src/EnergyPlus/PurchasedAirManager.hh | 2 +- src/EnergyPlus/RefrigeratedCase.cc | 2 +- src/EnergyPlus/RefrigeratedCase.hh | 2 +- src/EnergyPlus/ReportCoilSelection.cc | 2 +- src/EnergyPlus/ReportCoilSelection.hh | 2 +- src/EnergyPlus/ReportSizingManager.cc | 2 +- src/EnergyPlus/ReportSizingManager.hh | 2 +- src/EnergyPlus/ResultsSchema.cc | 2 +- src/EnergyPlus/ResultsSchema.hh | 2 +- src/EnergyPlus/ReturnAirPathManager.cc | 2 +- src/EnergyPlus/ReturnAirPathManager.hh | 2 +- src/EnergyPlus/RoomAirModelAirflowNetwork.cc | 2 +- src/EnergyPlus/RoomAirModelAirflowNetwork.hh | 2 +- src/EnergyPlus/RoomAirModelManager.cc | 2 +- src/EnergyPlus/RoomAirModelManager.hh | 2 +- src/EnergyPlus/RoomAirModelUserTempPattern.cc | 2 +- src/EnergyPlus/RoomAirModelUserTempPattern.hh | 2 +- src/EnergyPlus/RootFinder.cc | 2 +- src/EnergyPlus/RootFinder.hh | 2 +- src/EnergyPlus/RuntimeLanguageProcessor.cc | 2 +- src/EnergyPlus/RuntimeLanguageProcessor.hh | 2 +- src/EnergyPlus/SQLiteProcedures.cc | 2 +- src/EnergyPlus/SQLiteProcedures.hh | 2 +- src/EnergyPlus/SZVAVModel.cc | 2 +- src/EnergyPlus/SZVAVModel.hh | 2 +- src/EnergyPlus/ScheduleManager.cc | 2 +- src/EnergyPlus/ScheduleManager.hh | 2 +- src/EnergyPlus/SetPointManager.cc | 2 +- src/EnergyPlus/SetPointManager.hh | 2 +- src/EnergyPlus/Shape.hh | 2 +- src/EnergyPlus/SimAirServingZones.cc | 2 +- src/EnergyPlus/SimAirServingZones.hh | 2 +- src/EnergyPlus/SimulationManager.cc | 2 +- src/EnergyPlus/SimulationManager.hh | 2 +- src/EnergyPlus/SingleDuct.cc | 2 +- src/EnergyPlus/SingleDuct.hh | 2 +- src/EnergyPlus/SizingAnalysisObjects.cc | 2 +- src/EnergyPlus/SizingAnalysisObjects.hh | 2 +- src/EnergyPlus/SizingManager.cc | 2 +- src/EnergyPlus/SizingManager.hh | 2 +- src/EnergyPlus/SolarCollectors.cc | 2 +- src/EnergyPlus/SolarCollectors.hh | 2 +- src/EnergyPlus/SolarReflectionManager.cc | 2 +- src/EnergyPlus/SolarReflectionManager.hh | 2 +- src/EnergyPlus/SolarShading.cc | 2 +- src/EnergyPlus/SolarShading.hh | 2 +- src/EnergyPlus/SortAndStringUtilities.cc | 2 +- src/EnergyPlus/SortAndStringUtilities.hh | 2 +- src/EnergyPlus/SplitterComponent.cc | 2 +- src/EnergyPlus/SplitterComponent.hh | 2 +- src/EnergyPlus/StandardRatings.cc | 2 +- src/EnergyPlus/StandardRatings.hh | 2 +- src/EnergyPlus/SteamBaseboardRadiator.cc | 2 +- src/EnergyPlus/SteamBaseboardRadiator.hh | 2 +- src/EnergyPlus/SteamCoils.cc | 2 +- src/EnergyPlus/SteamCoils.hh | 2 +- src/EnergyPlus/SurfaceGeometry.cc | 2 +- src/EnergyPlus/SurfaceGeometry.hh | 2 +- src/EnergyPlus/SurfaceGroundHeatExchanger.cc | 2 +- src/EnergyPlus/SurfaceGroundHeatExchanger.hh | 2 +- src/EnergyPlus/SurfaceOctree.cc | 2 +- src/EnergyPlus/SurfaceOctree.hh | 2 +- src/EnergyPlus/SwimmingPool.cc | 2 +- src/EnergyPlus/SwimmingPool.hh | 2 +- src/EnergyPlus/SystemAvailabilityManager.cc | 2 +- src/EnergyPlus/SystemAvailabilityManager.hh | 2 +- src/EnergyPlus/SystemReports.cc | 2 +- src/EnergyPlus/SystemReports.hh | 2 +- src/EnergyPlus/TARCOGArgs.cc | 2 +- src/EnergyPlus/TARCOGArgs.hh | 2 +- src/EnergyPlus/TARCOGCommon.cc | 2 +- src/EnergyPlus/TARCOGCommon.hh | 2 +- src/EnergyPlus/TARCOGDeflection.cc | 2 +- src/EnergyPlus/TARCOGDeflection.hh | 2 +- src/EnergyPlus/TARCOGGasses90.cc | 2 +- src/EnergyPlus/TARCOGGasses90.hh | 2 +- src/EnergyPlus/TARCOGGassesParams.cc | 2 +- src/EnergyPlus/TARCOGGassesParams.hh | 2 +- src/EnergyPlus/TARCOGMain.cc | 2 +- src/EnergyPlus/TARCOGMain.hh | 2 +- src/EnergyPlus/TARCOGOutput.cc | 2 +- src/EnergyPlus/TARCOGOutput.hh | 2 +- src/EnergyPlus/TARCOGParams.cc | 2 +- src/EnergyPlus/TARCOGParams.hh | 2 +- src/EnergyPlus/TarcogShading.cc | 2 +- src/EnergyPlus/TarcogShading.hh | 2 +- src/EnergyPlus/ThermalChimney.cc | 2 +- src/EnergyPlus/ThermalChimney.hh | 2 +- src/EnergyPlus/ThermalComfort.cc | 2 +- src/EnergyPlus/ThermalComfort.hh | 2 +- src/EnergyPlus/ThermalEN673Calc.cc | 2 +- src/EnergyPlus/ThermalEN673Calc.hh | 2 +- src/EnergyPlus/ThermalISO15099Calc.cc | 2 +- src/EnergyPlus/ThermalISO15099Calc.hh | 2 +- src/EnergyPlus/Timer.h | 2 +- src/EnergyPlus/TranspiredCollector.cc | 2 +- src/EnergyPlus/TranspiredCollector.hh | 2 +- src/EnergyPlus/UFADManager.cc | 2 +- src/EnergyPlus/UFADManager.hh | 2 +- src/EnergyPlus/UnitHeater.cc | 2 +- src/EnergyPlus/UnitHeater.hh | 2 +- src/EnergyPlus/UnitVentilator.cc | 2 +- src/EnergyPlus/UnitVentilator.hh | 2 +- src/EnergyPlus/UnitarySystem.cc | 2 +- src/EnergyPlus/UnitarySystem.hh | 2 +- src/EnergyPlus/UserDefinedComponents.cc | 2 +- src/EnergyPlus/UserDefinedComponents.hh | 2 +- src/EnergyPlus/UtilityRoutines.cc | 2 +- src/EnergyPlus/UtilityRoutines.hh | 2 +- src/EnergyPlus/VariableSpeedCoils.cc | 2 +- src/EnergyPlus/VariableSpeedCoils.hh | 2 +- src/EnergyPlus/Vectors.cc | 2 +- src/EnergyPlus/Vectors.hh | 2 +- src/EnergyPlus/VentilatedSlab.cc | 2 +- src/EnergyPlus/VentilatedSlab.hh | 2 +- src/EnergyPlus/WaterCoils.cc | 2 +- src/EnergyPlus/WaterCoils.hh | 2 +- src/EnergyPlus/WaterManager.cc | 2 +- src/EnergyPlus/WaterManager.hh | 2 +- src/EnergyPlus/WaterThermalTanks.cc | 2 +- src/EnergyPlus/WaterThermalTanks.hh | 2 +- src/EnergyPlus/WaterToAirHeatPump.cc | 2 +- src/EnergyPlus/WaterToAirHeatPump.hh | 2 +- src/EnergyPlus/WaterToAirHeatPumpSimple.cc | 2 +- src/EnergyPlus/WaterToAirHeatPumpSimple.hh | 2 +- src/EnergyPlus/WaterToWaterHeatPumpEIR.cc | 2 +- src/EnergyPlus/WaterToWaterHeatPumpEIR.hh | 2 +- src/EnergyPlus/WaterToWaterHeatPumps.hh | 2 +- src/EnergyPlus/WaterUse.cc | 2 +- src/EnergyPlus/WaterUse.hh | 2 +- src/EnergyPlus/WeatherManager.cc | 2 +- src/EnergyPlus/WeatherManager.hh | 2 +- src/EnergyPlus/WindTurbine.cc | 2 +- src/EnergyPlus/WindTurbine.hh | 2 +- src/EnergyPlus/WindowAC.cc | 2 +- src/EnergyPlus/WindowAC.hh | 2 +- src/EnergyPlus/WindowComplexManager.cc | 2 +- src/EnergyPlus/WindowComplexManager.hh | 2 +- src/EnergyPlus/WindowEquivalentLayer.cc | 2 +- src/EnergyPlus/WindowEquivalentLayer.hh | 2 +- src/EnergyPlus/WindowManager.cc | 2 +- src/EnergyPlus/WindowManager.hh | 2 +- src/EnergyPlus/WindowManagerExteriorData.cc | 2 +- src/EnergyPlus/WindowManagerExteriorData.hh | 2 +- src/EnergyPlus/WindowManagerExteriorOptical.cc | 2 +- src/EnergyPlus/WindowManagerExteriorOptical.hh | 2 +- src/EnergyPlus/WindowManagerExteriorThermal.cc | 2 +- src/EnergyPlus/WindowManagerExteriorThermal.hh | 2 +- src/EnergyPlus/WindowModel.cc | 2 +- src/EnergyPlus/WindowModel.hh | 2 +- src/EnergyPlus/ZoneAirLoopEquipmentManager.cc | 2 +- src/EnergyPlus/ZoneAirLoopEquipmentManager.hh | 2 +- src/EnergyPlus/ZoneContaminantPredictorCorrector.cc | 2 +- src/EnergyPlus/ZoneContaminantPredictorCorrector.hh | 2 +- src/EnergyPlus/ZoneDehumidifier.cc | 2 +- src/EnergyPlus/ZoneDehumidifier.hh | 2 +- src/EnergyPlus/ZoneEquipmentManager.cc | 2 +- src/EnergyPlus/ZoneEquipmentManager.hh | 2 +- src/EnergyPlus/ZonePlenum.cc | 2 +- src/EnergyPlus/ZonePlenum.hh | 2 +- src/EnergyPlus/ZoneTempPredictorCorrector.cc | 2 +- src/EnergyPlus/ZoneTempPredictorCorrector.hh | 2 +- src/EnergyPlus/main.cc | 2 +- src/EnergyPlus/public/EnergyPlusAPI.hh | 2 +- src/EnergyPlus/public/EnergyPlusPgm.hh | 2 +- src/EnergyPlus/test_ep_as_library.cc | 2 +- tst/EnergyPlus/unit/AdvancedAFN.unit.cc | 2 +- tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc | 2 +- tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc | 2 +- .../unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc | 2 +- tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc | 2 +- tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc | 2 +- tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc | 2 +- tst/EnergyPlus/unit/AirflowNetworkSimulationControl.unit.cc | 2 +- tst/EnergyPlus/unit/AirflowNetworkSolver.unit.cc | 2 +- tst/EnergyPlus/unit/BaseboardRadiator.unit.cc | 2 +- tst/EnergyPlus/unit/BoilerHotWater.unit.cc | 2 +- tst/EnergyPlus/unit/BoilerSteam.unit.cc | 2 +- tst/EnergyPlus/unit/BranchInputManager.unit.cc | 2 +- tst/EnergyPlus/unit/BranchNodeConnections.unit.cc | 2 +- tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerAbsorption.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerElectric.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc | 2 +- tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc | 2 +- tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc | 2 +- tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc | 2 +- tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc | 2 +- tst/EnergyPlus/unit/CrossVentMgr.unit.cc | 2 +- tst/EnergyPlus/unit/CurveManager.unit.cc | 2 +- tst/EnergyPlus/unit/DElightManager.unit.cc | 2 +- tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc | 2 +- tst/EnergyPlus/unit/DXCoils.unit.cc | 2 +- tst/EnergyPlus/unit/DataEnvironment.unit.cc | 2 +- tst/EnergyPlus/unit/DataGlobalConstants.unit.cc | 2 +- tst/EnergyPlus/unit/DataHeatBalance.unit.cc | 2 +- tst/EnergyPlus/unit/DataPlant.unit.cc | 2 +- tst/EnergyPlus/unit/DataSizing.unit.cc | 2 +- tst/EnergyPlus/unit/DataSurfaces.unit.cc | 2 +- tst/EnergyPlus/unit/DataZoneEquipment.unit.cc | 2 +- tst/EnergyPlus/unit/Datasets.unit.cc | 2 +- tst/EnergyPlus/unit/DaylightingManager.unit.cc | 2 +- tst/EnergyPlus/unit/DemandResponse.unit.cc | 2 +- tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc | 2 +- tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc | 2 +- tst/EnergyPlus/unit/DualDuct.unit.cc | 2 +- tst/EnergyPlus/unit/EMSManager.unit.cc | 2 +- tst/EnergyPlus/unit/EarthTube.unit.cc | 2 +- tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc | 2 +- tst/EnergyPlus/unit/EconomicTariff.unit.cc | 2 +- tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc | 2 +- tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc | 2 +- tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc | 2 +- tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc | 2 +- tst/EnergyPlus/unit/FanCoilUnits.unit.cc | 2 +- tst/EnergyPlus/unit/Fans.unit.cc | 2 +- tst/EnergyPlus/unit/FaultsManager.unit.cc | 2 +- .../unit/FiniteDifferenceGroundTemperatureModel.unit.cc | 2 +- tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc | 2 +- tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh | 2 +- tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh | 2 +- tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh | 2 +- tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh | 2 +- tst/EnergyPlus/unit/FluidCoolers.unit.cc | 2 +- tst/EnergyPlus/unit/FluidProperties.unit.cc | 2 +- tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc | 2 +- tst/EnergyPlus/unit/Furnaces.unit.cc | 2 +- tst/EnergyPlus/unit/General.unit.cc | 2 +- tst/EnergyPlus/unit/GeneralRoutines.unit.cc | 2 +- tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc | 2 +- tst/EnergyPlus/unit/HVACControllers.unit.cc | 2 +- tst/EnergyPlus/unit/HVACDXSystem.unit.cc | 2 +- tst/EnergyPlus/unit/HVACFan.unit.cc | 2 +- tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc | 2 +- tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc | 2 +- tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc | 2 +- tst/EnergyPlus/unit/HVACManager.unit.cc | 2 +- tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc | 2 +- tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc | 2 +- tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc | 2 +- tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc | 2 +- tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc | 2 +- tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc | 2 +- tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalanceManager.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc | 2 +- tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc | 2 +- tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc | 2 +- tst/EnergyPlus/unit/HeatRecovery.unit.cc | 2 +- tst/EnergyPlus/unit/HeatingCoils.unit.cc | 2 +- tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc | 2 +- tst/EnergyPlus/unit/Humidifiers.unit.cc | 2 +- tst/EnergyPlus/unit/HybridModel.unit.cc | 2 +- tst/EnergyPlus/unit/ICSCollector.unit.cc | 2 +- tst/EnergyPlus/unit/IceThermalStorage.unit.cc | 2 +- tst/EnergyPlus/unit/IdfParser.unit.cc | 2 +- tst/EnergyPlus/unit/InputProcessor.unit.cc | 2 +- tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc | 2 +- tst/EnergyPlus/unit/InternalHeatGains.unit.cc | 2 +- tst/EnergyPlus/unit/JsonOutput.unit.cc | 2 +- .../unit/KusudaAchenbachGroundTemperatureModel.unit.cc | 2 +- tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc | 2 +- tst/EnergyPlus/unit/MixedAir.unit.cc | 2 +- tst/EnergyPlus/unit/MixerComponent.unit.cc | 2 +- tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc | 2 +- tst/EnergyPlus/unit/NodeInputManager.unit.cc | 2 +- tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc | 2 +- tst/EnergyPlus/unit/OutAirNodeManager.unit.cc | 2 +- tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc | 2 +- tst/EnergyPlus/unit/OutputProcessor.unit.cc | 2 +- tst/EnergyPlus/unit/OutputReportData.unit.cc | 2 +- tst/EnergyPlus/unit/OutputReportTabular.unit.cc | 2 +- tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc | 2 +- tst/EnergyPlus/unit/OutputReports.unit.cc | 2 +- tst/EnergyPlus/unit/PVWatts.unit.cc | 2 +- tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc | 2 +- .../unit/PhaseChangeModeling/HysteresisModel.unit.cc | 2 +- tst/EnergyPlus/unit/Photovoltaics.unit.cc | 2 +- tst/EnergyPlus/unit/PierceSurface.unit.cc | 2 +- tst/EnergyPlus/unit/Pipes.unit.cc | 2 +- tst/EnergyPlus/unit/Plant/Branch.unit.cc | 2 +- tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc | 2 +- tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc | 2 +- tst/EnergyPlus/unit/PlantChillers.unit.cc | 2 +- tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc | 2 +- tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc | 2 +- tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc | 2 +- tst/EnergyPlus/unit/PlantManager.unit.cc | 2 +- tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc | 2 +- tst/EnergyPlus/unit/PlantUtilities.unit.cc | 2 +- tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc | 2 +- tst/EnergyPlus/unit/Psychrometrics.unit.cc | 2 +- tst/EnergyPlus/unit/Pumps.unit.cc | 2 +- tst/EnergyPlus/unit/PurchasedAirManager.unit.cc | 2 +- tst/EnergyPlus/unit/ReportCoilSelection.unit.cc | 2 +- tst/EnergyPlus/unit/ReportSizingManager.unit.cc | 2 +- tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc | 2 +- tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc | 2 +- tst/EnergyPlus/unit/RunPeriod.unit.cc | 2 +- tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc | 2 +- tst/EnergyPlus/unit/SQLite.unit.cc | 2 +- tst/EnergyPlus/unit/SZVAVModel.unit.cc | 2 +- tst/EnergyPlus/unit/ScheduleManager.unit.cc | 2 +- tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc | 2 +- tst/EnergyPlus/unit/SetPointManager.unit.cc | 2 +- tst/EnergyPlus/unit/SimAirServingZones.unit.cc | 2 +- tst/EnergyPlus/unit/SimulationManager.unit.cc | 2 +- tst/EnergyPlus/unit/SingleDuct.unit.cc | 2 +- .../unit/SiteBuildingSurfaceGroundTemperatures.unit.cc | 2 +- tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc | 2 +- .../unit/SiteFCFactorMethodGroundTemperatures.unit.cc | 2 +- tst/EnergyPlus/unit/SiteGroundDomain.unit.cc | 2 +- tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc | 2 +- tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc | 2 +- tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc | 2 +- tst/EnergyPlus/unit/SizingManager.unit.cc | 2 +- tst/EnergyPlus/unit/SolarShading.unit.cc | 2 +- tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc | 2 +- tst/EnergyPlus/unit/StandardRatings.unit.cc | 2 +- tst/EnergyPlus/unit/SurfaceGeometry.unit.cc | 2 +- tst/EnergyPlus/unit/SurfaceOctree.unit.cc | 2 +- tst/EnergyPlus/unit/SwimmingPool.unit.cc | 2 +- tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc | 2 +- tst/EnergyPlus/unit/TestHelpers/IdfParser.cc | 2 +- tst/EnergyPlus/unit/TestHelpers/IdfParser.hh | 2 +- tst/EnergyPlus/unit/ThermalComfort.unit.cc | 2 +- tst/EnergyPlus/unit/TranspiredCollector.unit.cc | 2 +- tst/EnergyPlus/unit/UnitHeater.unit.cc | 2 +- tst/EnergyPlus/unit/UnitVentilator.unit.cc | 2 +- tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc | 2 +- tst/EnergyPlus/unit/UnitarySystem.unit.cc | 2 +- tst/EnergyPlus/unit/UtilityRoutines.unit.cc | 2 +- tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc | 2 +- tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc | 2 +- tst/EnergyPlus/unit/Vector.unit.cc | 2 +- tst/EnergyPlus/unit/Vectors.unit.cc | 2 +- tst/EnergyPlus/unit/VentilatedSlab.unit.cc | 2 +- tst/EnergyPlus/unit/WaterCoils.unit.cc | 2 +- tst/EnergyPlus/unit/WaterThermalTanks.unit.cc | 2 +- tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc | 2 +- tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc | 2 +- tst/EnergyPlus/unit/WaterToWaterHeatPumpEIR.unit.cc | 2 +- tst/EnergyPlus/unit/WeatherManager.unit.cc | 2 +- tst/EnergyPlus/unit/WinCalcEngine.unit.cc | 2 +- tst/EnergyPlus/unit/WindowAC.unit.cc | 2 +- tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc | 2 +- tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc | 2 +- tst/EnergyPlus/unit/WindowManager.unit.cc | 2 +- tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc | 2 +- tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc | 2 +- tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc | 2 +- tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc | 2 +- tst/EnergyPlus/unit/ZonePlenum.unit.cc | 2 +- tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc | 2 +- tst/EnergyPlus/unit/main.cc | 2 +- 824 files changed, 825 insertions(+), 825 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index ed68e5efe36..6f742c1339f 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. +EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. NOTICE: This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so. diff --git a/scripts/dev/licensetext.py b/scripts/dev/licensetext.py index cddadfa4ffc..57150cafd1a 100644 --- a/scripts/dev/licensetext.py +++ b/scripts/dev/licensetext.py @@ -202,7 +202,7 @@ def check(self, path): class CodeChecker(Visitor): def __init__(self): Visitor.__init__(self) - def files(self, path): + def files3(self, path): # This is the Python 3 version, switch to it after # the switch is made to require Python 3 extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] @@ -210,7 +210,7 @@ def files(self, path): for ext in extensions: results.extend(glob.glob(path+'**/*.'+ext, recursive=True)) return results - def files27(self, path): + def files(self, path): # This is the old Python 2.7 version extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] results = [] diff --git a/src/EnergyPlus/AirLoopHVACDOAS.cc b/src/EnergyPlus/AirLoopHVACDOAS.cc index c4c97fad15a..bdb0900f97b 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.cc +++ b/src/EnergyPlus/AirLoopHVACDOAS.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirLoopHVACDOAS.hh b/src/EnergyPlus/AirLoopHVACDOAS.hh index 97704379478..481967d9c26 100644 --- a/src/EnergyPlus/AirLoopHVACDOAS.hh +++ b/src/EnergyPlus/AirLoopHVACDOAS.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirTerminalUnit.hh b/src/EnergyPlus/AirTerminalUnit.hh index 474c53dc61d..17085254ad7 100644 --- a/src/EnergyPlus/AirTerminalUnit.hh +++ b/src/EnergyPlus/AirTerminalUnit.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp index 7c2d01fec44..dcde2d0c899 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Elements.hpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp index f73db988358..251ea277dbd 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Properties.hpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp index cc80adaeb41..f830a3d5a37 100644 --- a/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp +++ b/src/EnergyPlus/AirflowNetwork/include/AirflowNetwork/Solver.hpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/src/Elements.cpp b/src/EnergyPlus/AirflowNetwork/src/Elements.cpp index cefa0e13735..49593d558c0 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Elements.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Elements.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp index cf30c5bbc9d..fff05027269 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Properties.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Properties.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp index 9258794ab25..e39264ba1d4 100644 --- a/src/EnergyPlus/AirflowNetwork/src/Solver.cpp +++ b/src/EnergyPlus/AirflowNetwork/src/Solver.cpp @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetworkBalanceManager.cc b/src/EnergyPlus/AirflowNetworkBalanceManager.cc index 35f8535d472..5f64701d780 100644 --- a/src/EnergyPlus/AirflowNetworkBalanceManager.cc +++ b/src/EnergyPlus/AirflowNetworkBalanceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/AirflowNetworkBalanceManager.hh b/src/EnergyPlus/AirflowNetworkBalanceManager.hh index c901768c8bf..e5c53ce082f 100644 --- a/src/EnergyPlus/AirflowNetworkBalanceManager.hh +++ b/src/EnergyPlus/AirflowNetworkBalanceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BaseboardElectric.cc b/src/EnergyPlus/BaseboardElectric.cc index 0d5ece9a0ee..f76f35cc315 100644 --- a/src/EnergyPlus/BaseboardElectric.cc +++ b/src/EnergyPlus/BaseboardElectric.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BaseboardElectric.hh b/src/EnergyPlus/BaseboardElectric.hh index b982b06306c..7c29e21732c 100644 --- a/src/EnergyPlus/BaseboardElectric.hh +++ b/src/EnergyPlus/BaseboardElectric.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index 8f6399f4be1..386db32ebc5 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BaseboardRadiator.hh b/src/EnergyPlus/BaseboardRadiator.hh index 1cdc4fa1cd9..f15027d4b92 100644 --- a/src/EnergyPlus/BaseboardRadiator.hh +++ b/src/EnergyPlus/BaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BoilerSteam.cc b/src/EnergyPlus/BoilerSteam.cc index de6b0c57cdb..088005aa691 100644 --- a/src/EnergyPlus/BoilerSteam.cc +++ b/src/EnergyPlus/BoilerSteam.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BoilerSteam.hh b/src/EnergyPlus/BoilerSteam.hh index 7b5ff7edb68..c5c7908991c 100644 --- a/src/EnergyPlus/BoilerSteam.hh +++ b/src/EnergyPlus/BoilerSteam.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Boilers.cc b/src/EnergyPlus/Boilers.cc index 65c8c606994..c6a0069e753 100644 --- a/src/EnergyPlus/Boilers.cc +++ b/src/EnergyPlus/Boilers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Boilers.hh b/src/EnergyPlus/Boilers.hh index a12f6e8cb05..448841bc2e5 100644 --- a/src/EnergyPlus/Boilers.hh +++ b/src/EnergyPlus/Boilers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchInputManager.cc b/src/EnergyPlus/BranchInputManager.cc index 6c2bcaf4ab9..1f4b636e1c5 100644 --- a/src/EnergyPlus/BranchInputManager.cc +++ b/src/EnergyPlus/BranchInputManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchInputManager.hh b/src/EnergyPlus/BranchInputManager.hh index f9014211f67..89eede93ee2 100644 --- a/src/EnergyPlus/BranchInputManager.hh +++ b/src/EnergyPlus/BranchInputManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchNodeConnections.cc b/src/EnergyPlus/BranchNodeConnections.cc index efbbd9c9824..2c08edb81bb 100644 --- a/src/EnergyPlus/BranchNodeConnections.cc +++ b/src/EnergyPlus/BranchNodeConnections.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/BranchNodeConnections.hh b/src/EnergyPlus/BranchNodeConnections.hh index adeb2e49353..bb23b022ba6 100644 --- a/src/EnergyPlus/BranchNodeConnections.hh +++ b/src/EnergyPlus/BranchNodeConnections.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CTElectricGenerator.cc b/src/EnergyPlus/CTElectricGenerator.cc index 2640b8fbe6c..ffab4adadc3 100644 --- a/src/EnergyPlus/CTElectricGenerator.cc +++ b/src/EnergyPlus/CTElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CTElectricGenerator.hh b/src/EnergyPlus/CTElectricGenerator.hh index 2c8c5a52489..f16ecb140f0 100644 --- a/src/EnergyPlus/CTElectricGenerator.hh +++ b/src/EnergyPlus/CTElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.cc b/src/EnergyPlus/ChilledCeilingPanelSimple.cc index 0eccd5c3d2b..f166ae4514e 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.cc +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChilledCeilingPanelSimple.hh b/src/EnergyPlus/ChilledCeilingPanelSimple.hh index 55fad7b5de2..6579023887c 100644 --- a/src/EnergyPlus/ChilledCeilingPanelSimple.hh +++ b/src/EnergyPlus/ChilledCeilingPanelSimple.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerAbsorption.cc b/src/EnergyPlus/ChillerAbsorption.cc index 1a4c510bece..fd59a2b9332 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerAbsorption.hh b/src/EnergyPlus/ChillerAbsorption.hh index 40f855a8a63..0c3c12c489c 100644 --- a/src/EnergyPlus/ChillerAbsorption.hh +++ b/src/EnergyPlus/ChillerAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index aa2408f048d..a12a5639704 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerElectricEIR.hh b/src/EnergyPlus/ChillerElectricEIR.hh index c08f412b32c..3b56e6bdf12 100644 --- a/src/EnergyPlus/ChillerElectricEIR.hh +++ b/src/EnergyPlus/ChillerElectricEIR.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.cc b/src/EnergyPlus/ChillerExhaustAbsorption.cc index 28a0f35db41..ef71bc1d402 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.cc +++ b/src/EnergyPlus/ChillerExhaustAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerExhaustAbsorption.hh b/src/EnergyPlus/ChillerExhaustAbsorption.hh index 1d9973af3c3..e8d82cd0a64 100644 --- a/src/EnergyPlus/ChillerExhaustAbsorption.hh +++ b/src/EnergyPlus/ChillerExhaustAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerGasAbsorption.cc b/src/EnergyPlus/ChillerGasAbsorption.cc index c2c019a8592..18b6d12e948 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.cc +++ b/src/EnergyPlus/ChillerGasAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerGasAbsorption.hh b/src/EnergyPlus/ChillerGasAbsorption.hh index 98dcba6c216..6baee8781f2 100644 --- a/src/EnergyPlus/ChillerGasAbsorption.hh +++ b/src/EnergyPlus/ChillerGasAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index ba0d48ee849..773a27371f1 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.hh b/src/EnergyPlus/ChillerIndirectAbsorption.hh index 1f3e82dd54a..1fef647aef4 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.hh +++ b/src/EnergyPlus/ChillerIndirectAbsorption.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index a9929b0864b..d844e0e42b2 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ChillerReformulatedEIR.hh b/src/EnergyPlus/ChillerReformulatedEIR.hh index 41367874ef9..22f6a36bdda 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.hh +++ b/src/EnergyPlus/ChillerReformulatedEIR.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CommandLineInterface.cc b/src/EnergyPlus/CommandLineInterface.cc index 27ef0adbeb9..51b89a6b58c 100644 --- a/src/EnergyPlus/CommandLineInterface.cc +++ b/src/EnergyPlus/CommandLineInterface.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CommandLineInterface.hh b/src/EnergyPlus/CommandLineInterface.hh index 68d64353114..8c9531b46a7 100644 --- a/src/EnergyPlus/CommandLineInterface.hh +++ b/src/EnergyPlus/CommandLineInterface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CondenserLoopTowers.cc b/src/EnergyPlus/CondenserLoopTowers.cc index 74209e3320c..fa444431bcd 100644 --- a/src/EnergyPlus/CondenserLoopTowers.cc +++ b/src/EnergyPlus/CondenserLoopTowers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CondenserLoopTowers.hh b/src/EnergyPlus/CondenserLoopTowers.hh index 5f57159e952..67dd440cce3 100644 --- a/src/EnergyPlus/CondenserLoopTowers.hh +++ b/src/EnergyPlus/CondenserLoopTowers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConductionTransferFunctionCalc.cc b/src/EnergyPlus/ConductionTransferFunctionCalc.cc index 96ff62db539..d3e4fcb0f5d 100644 --- a/src/EnergyPlus/ConductionTransferFunctionCalc.cc +++ b/src/EnergyPlus/ConductionTransferFunctionCalc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConductionTransferFunctionCalc.hh b/src/EnergyPlus/ConductionTransferFunctionCalc.hh index 059bd9f748d..9dc8f06a47a 100644 --- a/src/EnergyPlus/ConductionTransferFunctionCalc.hh +++ b/src/EnergyPlus/ConductionTransferFunctionCalc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConfiguredFunctions.hh b/src/EnergyPlus/ConfiguredFunctions.hh index 0159f336ece..e743f33e686 100644 --- a/src/EnergyPlus/ConfiguredFunctions.hh +++ b/src/EnergyPlus/ConfiguredFunctions.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConfiguredFunctions.in.cc b/src/EnergyPlus/ConfiguredFunctions.in.cc index c9361048b9f..73447cf691d 100644 --- a/src/EnergyPlus/ConfiguredFunctions.in.cc +++ b/src/EnergyPlus/ConfiguredFunctions.in.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConvectionCoefficients.cc b/src/EnergyPlus/ConvectionCoefficients.cc index e76552533f5..da3aeec1ccc 100644 --- a/src/EnergyPlus/ConvectionCoefficients.cc +++ b/src/EnergyPlus/ConvectionCoefficients.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ConvectionCoefficients.hh b/src/EnergyPlus/ConvectionCoefficients.hh index 84b200a4227..b3a88e9ab8e 100644 --- a/src/EnergyPlus/ConvectionCoefficients.hh +++ b/src/EnergyPlus/ConvectionCoefficients.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CoolTower.cc b/src/EnergyPlus/CoolTower.cc index 8a03902bfe7..5ca5d12106a 100644 --- a/src/EnergyPlus/CoolTower.cc +++ b/src/EnergyPlus/CoolTower.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CoolTower.hh b/src/EnergyPlus/CoolTower.hh index 4a0e7ea09b7..e27f56dde99 100644 --- a/src/EnergyPlus/CoolTower.hh +++ b/src/EnergyPlus/CoolTower.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CostEstimateManager.cc b/src/EnergyPlus/CostEstimateManager.cc index 0a910fba1cd..1d5ca203316 100644 --- a/src/EnergyPlus/CostEstimateManager.cc +++ b/src/EnergyPlus/CostEstimateManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CostEstimateManager.hh b/src/EnergyPlus/CostEstimateManager.hh index 7e41fae2c48..e8c0e08f28e 100644 --- a/src/EnergyPlus/CostEstimateManager.hh +++ b/src/EnergyPlus/CostEstimateManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CrossVentMgr.cc b/src/EnergyPlus/CrossVentMgr.cc index d0193b93a16..53f5f172d9e 100644 --- a/src/EnergyPlus/CrossVentMgr.cc +++ b/src/EnergyPlus/CrossVentMgr.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CrossVentMgr.hh b/src/EnergyPlus/CrossVentMgr.hh index f7ad426faa3..82428ebd166 100644 --- a/src/EnergyPlus/CrossVentMgr.hh +++ b/src/EnergyPlus/CrossVentMgr.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CurveManager.cc b/src/EnergyPlus/CurveManager.cc index cdb8bd22fb1..3b9b167268f 100644 --- a/src/EnergyPlus/CurveManager.cc +++ b/src/EnergyPlus/CurveManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/CurveManager.hh b/src/EnergyPlus/CurveManager.hh index c8b116b2de8..bfa66b40a02 100644 --- a/src/EnergyPlus/CurveManager.hh +++ b/src/EnergyPlus/CurveManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DElightManagerF.cc b/src/EnergyPlus/DElightManagerF.cc index 6d79d1cf5f9..62ed590c71b 100644 --- a/src/EnergyPlus/DElightManagerF.cc +++ b/src/EnergyPlus/DElightManagerF.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DElightManagerF.hh b/src/EnergyPlus/DElightManagerF.hh index f14c5938998..e3fbd98990d 100644 --- a/src/EnergyPlus/DElightManagerF.hh +++ b/src/EnergyPlus/DElightManagerF.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 8de4d0142ff..24272d7f22c 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index 13e64f6a911..330c223c419 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXFEarClipping.cc b/src/EnergyPlus/DXFEarClipping.cc index d4821e647b4..dd0bd0a0003 100644 --- a/src/EnergyPlus/DXFEarClipping.cc +++ b/src/EnergyPlus/DXFEarClipping.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DXFEarClipping.hh b/src/EnergyPlus/DXFEarClipping.hh index 9756bcf7896..1514bd3561a 100644 --- a/src/EnergyPlus/DXFEarClipping.hh +++ b/src/EnergyPlus/DXFEarClipping.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataAirLoop.cc b/src/EnergyPlus/DataAirLoop.cc index 2d054933aa1..dc09b578218 100644 --- a/src/EnergyPlus/DataAirLoop.cc +++ b/src/EnergyPlus/DataAirLoop.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataAirLoop.hh b/src/EnergyPlus/DataAirLoop.hh index b3de603c10c..a1cd8c062a5 100644 --- a/src/EnergyPlus/DataAirLoop.hh +++ b/src/EnergyPlus/DataAirLoop.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataAirSystems.cc b/src/EnergyPlus/DataAirSystems.cc index 1270097d0c2..da51b82f315 100644 --- a/src/EnergyPlus/DataAirSystems.cc +++ b/src/EnergyPlus/DataAirSystems.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataAirSystems.hh b/src/EnergyPlus/DataAirSystems.hh index 76144f3ae39..68b9c5d39b7 100644 --- a/src/EnergyPlus/DataAirSystems.hh +++ b/src/EnergyPlus/DataAirSystems.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBSDFWindow.cc b/src/EnergyPlus/DataBSDFWindow.cc index 33450f62ae7..ce8b927d60a 100644 --- a/src/EnergyPlus/DataBSDFWindow.cc +++ b/src/EnergyPlus/DataBSDFWindow.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBSDFWindow.hh b/src/EnergyPlus/DataBSDFWindow.hh index c6a122da70c..23aba6522f6 100644 --- a/src/EnergyPlus/DataBSDFWindow.hh +++ b/src/EnergyPlus/DataBSDFWindow.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBranchAirLoopPlant.cc b/src/EnergyPlus/DataBranchAirLoopPlant.cc index 53a6d2896a8..f23e45a7aa7 100644 --- a/src/EnergyPlus/DataBranchAirLoopPlant.cc +++ b/src/EnergyPlus/DataBranchAirLoopPlant.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBranchAirLoopPlant.hh b/src/EnergyPlus/DataBranchAirLoopPlant.hh index 90ab5591ac1..669e338a30a 100644 --- a/src/EnergyPlus/DataBranchAirLoopPlant.hh +++ b/src/EnergyPlus/DataBranchAirLoopPlant.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBranchNodeConnections.cc b/src/EnergyPlus/DataBranchNodeConnections.cc index 25ed4cdea1d..c20087b18cc 100644 --- a/src/EnergyPlus/DataBranchNodeConnections.cc +++ b/src/EnergyPlus/DataBranchNodeConnections.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataBranchNodeConnections.hh b/src/EnergyPlus/DataBranchNodeConnections.hh index e9bffc9d0e5..b4a92b5b686 100644 --- a/src/EnergyPlus/DataBranchNodeConnections.hh +++ b/src/EnergyPlus/DataBranchNodeConnections.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataComplexFenestration.cc b/src/EnergyPlus/DataComplexFenestration.cc index 73a237616c4..9ad4d983e9f 100644 --- a/src/EnergyPlus/DataComplexFenestration.cc +++ b/src/EnergyPlus/DataComplexFenestration.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataComplexFenestration.hh b/src/EnergyPlus/DataComplexFenestration.hh index 2e620d3a383..645df0557ee 100644 --- a/src/EnergyPlus/DataComplexFenestration.hh +++ b/src/EnergyPlus/DataComplexFenestration.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataContaminantBalance.cc b/src/EnergyPlus/DataContaminantBalance.cc index 8d1a798f510..495bc44f2f6 100644 --- a/src/EnergyPlus/DataContaminantBalance.cc +++ b/src/EnergyPlus/DataContaminantBalance.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataContaminantBalance.hh b/src/EnergyPlus/DataContaminantBalance.hh index 976984e1950..6c111bc539d 100644 --- a/src/EnergyPlus/DataContaminantBalance.hh +++ b/src/EnergyPlus/DataContaminantBalance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataConvergParams.cc b/src/EnergyPlus/DataConvergParams.cc index aa570dbf1f7..ef3614e4e39 100644 --- a/src/EnergyPlus/DataConvergParams.cc +++ b/src/EnergyPlus/DataConvergParams.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataConvergParams.hh b/src/EnergyPlus/DataConvergParams.hh index 5a4d82bfd27..72d4ae33f7a 100644 --- a/src/EnergyPlus/DataConvergParams.hh +++ b/src/EnergyPlus/DataConvergParams.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataConversions.cc b/src/EnergyPlus/DataConversions.cc index 656a652df1f..0c8d5f5ecb4 100644 --- a/src/EnergyPlus/DataConversions.cc +++ b/src/EnergyPlus/DataConversions.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataConversions.hh b/src/EnergyPlus/DataConversions.hh index 3de50f0fd2d..73f12b9d0c2 100644 --- a/src/EnergyPlus/DataConversions.hh +++ b/src/EnergyPlus/DataConversions.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataCostEstimate.cc b/src/EnergyPlus/DataCostEstimate.cc index 85eccc01c34..19d96ebd047 100644 --- a/src/EnergyPlus/DataCostEstimate.cc +++ b/src/EnergyPlus/DataCostEstimate.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataCostEstimate.hh b/src/EnergyPlus/DataCostEstimate.hh index a067a5e68b9..ff9e75a7407 100644 --- a/src/EnergyPlus/DataCostEstimate.hh +++ b/src/EnergyPlus/DataCostEstimate.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDElight.cc b/src/EnergyPlus/DataDElight.cc index d5b776ae4c9..4a1e6036af3 100644 --- a/src/EnergyPlus/DataDElight.cc +++ b/src/EnergyPlus/DataDElight.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDElight.hh b/src/EnergyPlus/DataDElight.hh index b93c4164466..1be0433060e 100644 --- a/src/EnergyPlus/DataDElight.hh +++ b/src/EnergyPlus/DataDElight.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDaylighting.cc b/src/EnergyPlus/DataDaylighting.cc index 8bd549364e3..26284638c60 100644 --- a/src/EnergyPlus/DataDaylighting.cc +++ b/src/EnergyPlus/DataDaylighting.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDaylighting.hh b/src/EnergyPlus/DataDaylighting.hh index af220050af3..03dbb8dbecb 100644 --- a/src/EnergyPlus/DataDaylighting.hh +++ b/src/EnergyPlus/DataDaylighting.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDaylightingDevices.cc b/src/EnergyPlus/DataDaylightingDevices.cc index 951e2318f43..61861fae174 100644 --- a/src/EnergyPlus/DataDaylightingDevices.cc +++ b/src/EnergyPlus/DataDaylightingDevices.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDaylightingDevices.hh b/src/EnergyPlus/DataDaylightingDevices.hh index 2849b8e095c..acf544100c9 100644 --- a/src/EnergyPlus/DataDaylightingDevices.hh +++ b/src/EnergyPlus/DataDaylightingDevices.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDefineEquip.cc b/src/EnergyPlus/DataDefineEquip.cc index 4228fa6f8ca..91f87c5e9ab 100644 --- a/src/EnergyPlus/DataDefineEquip.cc +++ b/src/EnergyPlus/DataDefineEquip.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataDefineEquip.hh b/src/EnergyPlus/DataDefineEquip.hh index 02778dd2b3a..455247c0f2d 100644 --- a/src/EnergyPlus/DataDefineEquip.hh +++ b/src/EnergyPlus/DataDefineEquip.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataEnvironment.cc b/src/EnergyPlus/DataEnvironment.cc index 5f8f5b0b99a..a0737c830c2 100644 --- a/src/EnergyPlus/DataEnvironment.cc +++ b/src/EnergyPlus/DataEnvironment.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataEnvironment.hh b/src/EnergyPlus/DataEnvironment.hh index 98b31dfe41b..6851630fb1d 100644 --- a/src/EnergyPlus/DataEnvironment.hh +++ b/src/EnergyPlus/DataEnvironment.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataErrorTracking.cc b/src/EnergyPlus/DataErrorTracking.cc index e3725e8a0ad..bc1e6d7815b 100644 --- a/src/EnergyPlus/DataErrorTracking.cc +++ b/src/EnergyPlus/DataErrorTracking.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataErrorTracking.hh b/src/EnergyPlus/DataErrorTracking.hh index eca317ac07e..184a3340607 100644 --- a/src/EnergyPlus/DataErrorTracking.hh +++ b/src/EnergyPlus/DataErrorTracking.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGenerators.cc b/src/EnergyPlus/DataGenerators.cc index 56c5bbca687..762a5511b28 100644 --- a/src/EnergyPlus/DataGenerators.cc +++ b/src/EnergyPlus/DataGenerators.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGenerators.hh b/src/EnergyPlus/DataGenerators.hh index 7b757af1925..90486774686 100644 --- a/src/EnergyPlus/DataGenerators.hh +++ b/src/EnergyPlus/DataGenerators.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGlobalConstants.cc b/src/EnergyPlus/DataGlobalConstants.cc index c468afd2eff..f5fcbb89de6 100644 --- a/src/EnergyPlus/DataGlobalConstants.cc +++ b/src/EnergyPlus/DataGlobalConstants.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGlobalConstants.hh b/src/EnergyPlus/DataGlobalConstants.hh index 427136d3072..8a3417fa4ba 100644 --- a/src/EnergyPlus/DataGlobalConstants.hh +++ b/src/EnergyPlus/DataGlobalConstants.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGlobals.cc b/src/EnergyPlus/DataGlobals.cc index b3fd7bba13d..693e0c9ffc9 100644 --- a/src/EnergyPlus/DataGlobals.cc +++ b/src/EnergyPlus/DataGlobals.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataGlobals.hh b/src/EnergyPlus/DataGlobals.hh index fc487ff869a..107f4107f54 100644 --- a/src/EnergyPlus/DataGlobals.hh +++ b/src/EnergyPlus/DataGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACControllers.cc b/src/EnergyPlus/DataHVACControllers.cc index c5fcaa18c16..26f5cf5c6f8 100644 --- a/src/EnergyPlus/DataHVACControllers.cc +++ b/src/EnergyPlus/DataHVACControllers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACControllers.hh b/src/EnergyPlus/DataHVACControllers.hh index 8ab90775dc0..ff6102d9819 100644 --- a/src/EnergyPlus/DataHVACControllers.hh +++ b/src/EnergyPlus/DataHVACControllers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACGlobals.cc b/src/EnergyPlus/DataHVACGlobals.cc index 020684dcff0..4a926f35fd9 100644 --- a/src/EnergyPlus/DataHVACGlobals.cc +++ b/src/EnergyPlus/DataHVACGlobals.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHVACGlobals.hh b/src/EnergyPlus/DataHVACGlobals.hh index 17168276c17..e2ee02408b4 100644 --- a/src/EnergyPlus/DataHVACGlobals.hh +++ b/src/EnergyPlus/DataHVACGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalFanSys.cc b/src/EnergyPlus/DataHeatBalFanSys.cc index 1871af36f98..0bc35a671cb 100644 --- a/src/EnergyPlus/DataHeatBalFanSys.cc +++ b/src/EnergyPlus/DataHeatBalFanSys.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalFanSys.hh b/src/EnergyPlus/DataHeatBalFanSys.hh index 967e2c98cdd..44ed3916d27 100644 --- a/src/EnergyPlus/DataHeatBalFanSys.hh +++ b/src/EnergyPlus/DataHeatBalFanSys.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalSurface.cc b/src/EnergyPlus/DataHeatBalSurface.cc index 07bace6ed55..db3026ed6fd 100644 --- a/src/EnergyPlus/DataHeatBalSurface.cc +++ b/src/EnergyPlus/DataHeatBalSurface.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalSurface.hh b/src/EnergyPlus/DataHeatBalSurface.hh index cc588ced691..5b5a7a57d00 100644 --- a/src/EnergyPlus/DataHeatBalSurface.hh +++ b/src/EnergyPlus/DataHeatBalSurface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalance.cc b/src/EnergyPlus/DataHeatBalance.cc index 03e5f6c5b0b..95d32c1a38f 100644 --- a/src/EnergyPlus/DataHeatBalance.cc +++ b/src/EnergyPlus/DataHeatBalance.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataHeatBalance.hh b/src/EnergyPlus/DataHeatBalance.hh index cf80f0101e6..28fe3190e21 100644 --- a/src/EnergyPlus/DataHeatBalance.hh +++ b/src/EnergyPlus/DataHeatBalance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataIPShortCuts.cc b/src/EnergyPlus/DataIPShortCuts.cc index e46a7934a62..ad3238d293a 100644 --- a/src/EnergyPlus/DataIPShortCuts.cc +++ b/src/EnergyPlus/DataIPShortCuts.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataIPShortCuts.hh b/src/EnergyPlus/DataIPShortCuts.hh index ee04bc1a453..830ccad0730 100644 --- a/src/EnergyPlus/DataIPShortCuts.hh +++ b/src/EnergyPlus/DataIPShortCuts.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataLoopNode.cc b/src/EnergyPlus/DataLoopNode.cc index 15abae08c29..30cda937c5a 100644 --- a/src/EnergyPlus/DataLoopNode.cc +++ b/src/EnergyPlus/DataLoopNode.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataLoopNode.hh b/src/EnergyPlus/DataLoopNode.hh index bca8cc78779..6c7c18bb714 100644 --- a/src/EnergyPlus/DataLoopNode.hh +++ b/src/EnergyPlus/DataLoopNode.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataMoistureBalance.cc b/src/EnergyPlus/DataMoistureBalance.cc index 4aefcacd64c..6c1944b1096 100644 --- a/src/EnergyPlus/DataMoistureBalance.cc +++ b/src/EnergyPlus/DataMoistureBalance.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataMoistureBalance.hh b/src/EnergyPlus/DataMoistureBalance.hh index 506db226447..30d0fb1bf80 100644 --- a/src/EnergyPlus/DataMoistureBalance.hh +++ b/src/EnergyPlus/DataMoistureBalance.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataMoistureBalanceEMPD.cc b/src/EnergyPlus/DataMoistureBalanceEMPD.cc index 6ebf5ba3c22..43bcefaf2e0 100644 --- a/src/EnergyPlus/DataMoistureBalanceEMPD.cc +++ b/src/EnergyPlus/DataMoistureBalanceEMPD.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataMoistureBalanceEMPD.hh b/src/EnergyPlus/DataMoistureBalanceEMPD.hh index 0003b9b3ef8..46b8f89596b 100644 --- a/src/EnergyPlus/DataMoistureBalanceEMPD.hh +++ b/src/EnergyPlus/DataMoistureBalanceEMPD.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataOutputs.cc b/src/EnergyPlus/DataOutputs.cc index 1b138abcd83..1436be5f7fd 100644 --- a/src/EnergyPlus/DataOutputs.cc +++ b/src/EnergyPlus/DataOutputs.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataOutputs.hh b/src/EnergyPlus/DataOutputs.hh index e571c9da5e1..5400b5b9896 100644 --- a/src/EnergyPlus/DataOutputs.hh +++ b/src/EnergyPlus/DataOutputs.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPhotovoltaics.cc b/src/EnergyPlus/DataPhotovoltaics.cc index 21d52aff585..a8f4a78f17f 100644 --- a/src/EnergyPlus/DataPhotovoltaics.cc +++ b/src/EnergyPlus/DataPhotovoltaics.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPhotovoltaics.hh b/src/EnergyPlus/DataPhotovoltaics.hh index caa95884f2f..366e5193c63 100644 --- a/src/EnergyPlus/DataPhotovoltaics.hh +++ b/src/EnergyPlus/DataPhotovoltaics.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPlant.cc b/src/EnergyPlus/DataPlant.cc index d4eb43a74f2..c7808e52bad 100644 --- a/src/EnergyPlus/DataPlant.cc +++ b/src/EnergyPlus/DataPlant.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPlant.hh b/src/EnergyPlus/DataPlant.hh index 8bc8ad56f27..423f72c9472 100644 --- a/src/EnergyPlus/DataPlant.hh +++ b/src/EnergyPlus/DataPlant.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPlantPipingSystems.cc b/src/EnergyPlus/DataPlantPipingSystems.cc index 19635aef748..2a4c272ade8 100644 --- a/src/EnergyPlus/DataPlantPipingSystems.cc +++ b/src/EnergyPlus/DataPlantPipingSystems.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPlantPipingSystems.hh b/src/EnergyPlus/DataPlantPipingSystems.hh index 6ef7a2ba91d..c30ecaf637f 100644 --- a/src/EnergyPlus/DataPlantPipingSystems.hh +++ b/src/EnergyPlus/DataPlantPipingSystems.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPrecisionGlobals.cc b/src/EnergyPlus/DataPrecisionGlobals.cc index e7423596245..d95396ac4e4 100644 --- a/src/EnergyPlus/DataPrecisionGlobals.cc +++ b/src/EnergyPlus/DataPrecisionGlobals.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataPrecisionGlobals.hh b/src/EnergyPlus/DataPrecisionGlobals.hh index fe759a43033..26171bcaa23 100644 --- a/src/EnergyPlus/DataPrecisionGlobals.hh +++ b/src/EnergyPlus/DataPrecisionGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataReportingFlags.cc b/src/EnergyPlus/DataReportingFlags.cc index 247a6988e4d..4ba0862cf3f 100644 --- a/src/EnergyPlus/DataReportingFlags.cc +++ b/src/EnergyPlus/DataReportingFlags.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataReportingFlags.hh b/src/EnergyPlus/DataReportingFlags.hh index 78d110125a9..ff23129ec45 100644 --- a/src/EnergyPlus/DataReportingFlags.hh +++ b/src/EnergyPlus/DataReportingFlags.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRoomAirModel.cc b/src/EnergyPlus/DataRoomAirModel.cc index c3e67d8fbc1..2a96c5eb39b 100644 --- a/src/EnergyPlus/DataRoomAirModel.cc +++ b/src/EnergyPlus/DataRoomAirModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRoomAirModel.hh b/src/EnergyPlus/DataRoomAirModel.hh index b62efe2568d..89e295fc630 100644 --- a/src/EnergyPlus/DataRoomAirModel.hh +++ b/src/EnergyPlus/DataRoomAirModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRootFinder.cc b/src/EnergyPlus/DataRootFinder.cc index 2ad45754f26..3d30450ce10 100644 --- a/src/EnergyPlus/DataRootFinder.cc +++ b/src/EnergyPlus/DataRootFinder.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRootFinder.hh b/src/EnergyPlus/DataRootFinder.hh index a00eb87d141..44bdc722742 100644 --- a/src/EnergyPlus/DataRootFinder.hh +++ b/src/EnergyPlus/DataRootFinder.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRuntimeLanguage.cc b/src/EnergyPlus/DataRuntimeLanguage.cc index 3fe978dc24b..4f213917ab2 100644 --- a/src/EnergyPlus/DataRuntimeLanguage.cc +++ b/src/EnergyPlus/DataRuntimeLanguage.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataRuntimeLanguage.hh b/src/EnergyPlus/DataRuntimeLanguage.hh index 68a40ffa897..b8494657e56 100644 --- a/src/EnergyPlus/DataRuntimeLanguage.hh +++ b/src/EnergyPlus/DataRuntimeLanguage.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataShadowingCombinations.cc b/src/EnergyPlus/DataShadowingCombinations.cc index c3bef3925c7..fad9bb153eb 100644 --- a/src/EnergyPlus/DataShadowingCombinations.cc +++ b/src/EnergyPlus/DataShadowingCombinations.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataShadowingCombinations.hh b/src/EnergyPlus/DataShadowingCombinations.hh index 2b7b1fc4da5..c8b07f8f556 100644 --- a/src/EnergyPlus/DataShadowingCombinations.hh +++ b/src/EnergyPlus/DataShadowingCombinations.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSizing.cc b/src/EnergyPlus/DataSizing.cc index 993548dadfc..b6fa72d2919 100644 --- a/src/EnergyPlus/DataSizing.cc +++ b/src/EnergyPlus/DataSizing.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSizing.hh b/src/EnergyPlus/DataSizing.hh index 2e099455d63..d7f14fbd038 100644 --- a/src/EnergyPlus/DataSizing.hh +++ b/src/EnergyPlus/DataSizing.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataStringGlobals.hh b/src/EnergyPlus/DataStringGlobals.hh index f53216c8d45..6f50fb601c7 100644 --- a/src/EnergyPlus/DataStringGlobals.hh +++ b/src/EnergyPlus/DataStringGlobals.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataStringGlobals.in.cc b/src/EnergyPlus/DataStringGlobals.in.cc index 3cf7b3b6dc8..0f0d7ca2290 100644 --- a/src/EnergyPlus/DataStringGlobals.in.cc +++ b/src/EnergyPlus/DataStringGlobals.in.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceColors.cc b/src/EnergyPlus/DataSurfaceColors.cc index 5ab6e2d8a8e..b3f14033cb1 100644 --- a/src/EnergyPlus/DataSurfaceColors.cc +++ b/src/EnergyPlus/DataSurfaceColors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceColors.hh b/src/EnergyPlus/DataSurfaceColors.hh index 458fd121aad..b3e79817655 100644 --- a/src/EnergyPlus/DataSurfaceColors.hh +++ b/src/EnergyPlus/DataSurfaceColors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceLists.cc b/src/EnergyPlus/DataSurfaceLists.cc index e13f241017e..29453247a0e 100644 --- a/src/EnergyPlus/DataSurfaceLists.cc +++ b/src/EnergyPlus/DataSurfaceLists.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaceLists.hh b/src/EnergyPlus/DataSurfaceLists.hh index fd7b441e366..b7dbc446a9c 100644 --- a/src/EnergyPlus/DataSurfaceLists.hh +++ b/src/EnergyPlus/DataSurfaceLists.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaces.cc b/src/EnergyPlus/DataSurfaces.cc index ee430b707b7..c2a548458ac 100644 --- a/src/EnergyPlus/DataSurfaces.cc +++ b/src/EnergyPlus/DataSurfaces.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSurfaces.hh b/src/EnergyPlus/DataSurfaces.hh index 171ca4eb267..b4173c5e461 100644 --- a/src/EnergyPlus/DataSurfaces.hh +++ b/src/EnergyPlus/DataSurfaces.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSystemVariables.cc b/src/EnergyPlus/DataSystemVariables.cc index b8c9aeb8375..c6201d96c4f 100644 --- a/src/EnergyPlus/DataSystemVariables.cc +++ b/src/EnergyPlus/DataSystemVariables.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataSystemVariables.hh b/src/EnergyPlus/DataSystemVariables.hh index 0409dee59ae..69b20117220 100644 --- a/src/EnergyPlus/DataSystemVariables.hh +++ b/src/EnergyPlus/DataSystemVariables.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataTimings.cc b/src/EnergyPlus/DataTimings.cc index 8e69afaa42f..3747c9cec81 100644 --- a/src/EnergyPlus/DataTimings.cc +++ b/src/EnergyPlus/DataTimings.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataTimings.hh b/src/EnergyPlus/DataTimings.hh index 3e12486f819..66f6a3797c7 100644 --- a/src/EnergyPlus/DataTimings.hh +++ b/src/EnergyPlus/DataTimings.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataUCSDSharedData.cc b/src/EnergyPlus/DataUCSDSharedData.cc index c85b53a6c6b..89f3488faef 100644 --- a/src/EnergyPlus/DataUCSDSharedData.cc +++ b/src/EnergyPlus/DataUCSDSharedData.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataUCSDSharedData.hh b/src/EnergyPlus/DataUCSDSharedData.hh index 1763bcdc7a0..3e8e7afc91d 100644 --- a/src/EnergyPlus/DataUCSDSharedData.hh +++ b/src/EnergyPlus/DataUCSDSharedData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataVectorTypes.hh b/src/EnergyPlus/DataVectorTypes.hh index ce4bf670886..0722f14a772 100644 --- a/src/EnergyPlus/DataVectorTypes.hh +++ b/src/EnergyPlus/DataVectorTypes.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataViewFactorInformation.cc b/src/EnergyPlus/DataViewFactorInformation.cc index 08849c153a3..91f419935bf 100644 --- a/src/EnergyPlus/DataViewFactorInformation.cc +++ b/src/EnergyPlus/DataViewFactorInformation.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataViewFactorInformation.hh b/src/EnergyPlus/DataViewFactorInformation.hh index a664b0a109a..c7efb34f920 100644 --- a/src/EnergyPlus/DataViewFactorInformation.hh +++ b/src/EnergyPlus/DataViewFactorInformation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataWater.cc b/src/EnergyPlus/DataWater.cc index 40719ec38c2..649a9534d07 100644 --- a/src/EnergyPlus/DataWater.cc +++ b/src/EnergyPlus/DataWater.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataWater.hh b/src/EnergyPlus/DataWater.hh index ec5d99541a4..1cbb2a0a8f0 100644 --- a/src/EnergyPlus/DataWater.hh +++ b/src/EnergyPlus/DataWater.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataWindowEquivalentLayer.cc b/src/EnergyPlus/DataWindowEquivalentLayer.cc index 15053394fa1..60b6452a7c3 100644 --- a/src/EnergyPlus/DataWindowEquivalentLayer.cc +++ b/src/EnergyPlus/DataWindowEquivalentLayer.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataWindowEquivalentLayer.hh b/src/EnergyPlus/DataWindowEquivalentLayer.hh index ccba0bed3a9..69326401e6b 100644 --- a/src/EnergyPlus/DataWindowEquivalentLayer.hh +++ b/src/EnergyPlus/DataWindowEquivalentLayer.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneControls.cc b/src/EnergyPlus/DataZoneControls.cc index 86137c7b0e1..a885a332260 100644 --- a/src/EnergyPlus/DataZoneControls.cc +++ b/src/EnergyPlus/DataZoneControls.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneControls.hh b/src/EnergyPlus/DataZoneControls.hh index f91124833c9..90e430b8fa3 100644 --- a/src/EnergyPlus/DataZoneControls.hh +++ b/src/EnergyPlus/DataZoneControls.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneEnergyDemands.cc b/src/EnergyPlus/DataZoneEnergyDemands.cc index edd26f7cf95..9e91f3be7ea 100644 --- a/src/EnergyPlus/DataZoneEnergyDemands.cc +++ b/src/EnergyPlus/DataZoneEnergyDemands.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneEnergyDemands.hh b/src/EnergyPlus/DataZoneEnergyDemands.hh index 66a46fbd048..ff92fc3d4a2 100644 --- a/src/EnergyPlus/DataZoneEnergyDemands.hh +++ b/src/EnergyPlus/DataZoneEnergyDemands.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneEquipment.cc b/src/EnergyPlus/DataZoneEquipment.cc index cbb77100efe..7065ebf7359 100644 --- a/src/EnergyPlus/DataZoneEquipment.cc +++ b/src/EnergyPlus/DataZoneEquipment.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DataZoneEquipment.hh b/src/EnergyPlus/DataZoneEquipment.hh index 14286405a4c..5492e32d625 100644 --- a/src/EnergyPlus/DataZoneEquipment.hh +++ b/src/EnergyPlus/DataZoneEquipment.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DaylightingDevices.cc b/src/EnergyPlus/DaylightingDevices.cc index 4bfc7a2c71f..7c919fb0074 100644 --- a/src/EnergyPlus/DaylightingDevices.cc +++ b/src/EnergyPlus/DaylightingDevices.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DaylightingDevices.hh b/src/EnergyPlus/DaylightingDevices.hh index 661ec317996..618d7377cc7 100644 --- a/src/EnergyPlus/DaylightingDevices.hh +++ b/src/EnergyPlus/DaylightingDevices.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DaylightingManager.cc b/src/EnergyPlus/DaylightingManager.cc index fce9dff2425..90301662f6c 100644 --- a/src/EnergyPlus/DaylightingManager.cc +++ b/src/EnergyPlus/DaylightingManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DaylightingManager.hh b/src/EnergyPlus/DaylightingManager.hh index ef2787e39d7..711780c72bd 100644 --- a/src/EnergyPlus/DaylightingManager.hh +++ b/src/EnergyPlus/DaylightingManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DemandManager.cc b/src/EnergyPlus/DemandManager.cc index e13fea8db0f..d4fb96d5eb2 100644 --- a/src/EnergyPlus/DemandManager.cc +++ b/src/EnergyPlus/DemandManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DemandManager.hh b/src/EnergyPlus/DemandManager.hh index fd2311436f8..ecd7b138fe8 100644 --- a/src/EnergyPlus/DemandManager.hh +++ b/src/EnergyPlus/DemandManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DesiccantDehumidifiers.cc b/src/EnergyPlus/DesiccantDehumidifiers.cc index 6f2b5f6be39..803c86d3fc7 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.cc +++ b/src/EnergyPlus/DesiccantDehumidifiers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DesiccantDehumidifiers.hh b/src/EnergyPlus/DesiccantDehumidifiers.hh index f86469cb6d6..4fb015f1b6c 100644 --- a/src/EnergyPlus/DesiccantDehumidifiers.hh +++ b/src/EnergyPlus/DesiccantDehumidifiers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DirectAirManager.cc b/src/EnergyPlus/DirectAirManager.cc index 600d3b13b9f..b7476830bff 100644 --- a/src/EnergyPlus/DirectAirManager.cc +++ b/src/EnergyPlus/DirectAirManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DirectAirManager.hh b/src/EnergyPlus/DirectAirManager.hh index bfba28bb186..6911089618f 100644 --- a/src/EnergyPlus/DirectAirManager.hh +++ b/src/EnergyPlus/DirectAirManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplacementVentMgr.cc b/src/EnergyPlus/DisplacementVentMgr.cc index 91e7f177239..d14d9d63e70 100644 --- a/src/EnergyPlus/DisplacementVentMgr.cc +++ b/src/EnergyPlus/DisplacementVentMgr.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplacementVentMgr.hh b/src/EnergyPlus/DisplacementVentMgr.hh index ffa5308e898..5dc6a850a09 100644 --- a/src/EnergyPlus/DisplacementVentMgr.hh +++ b/src/EnergyPlus/DisplacementVentMgr.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplayRoutines.cc b/src/EnergyPlus/DisplayRoutines.cc index 240580398f0..ef7b60b3552 100644 --- a/src/EnergyPlus/DisplayRoutines.cc +++ b/src/EnergyPlus/DisplayRoutines.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DisplayRoutines.hh b/src/EnergyPlus/DisplayRoutines.hh index 339b6125f0c..50791fe9c54 100644 --- a/src/EnergyPlus/DisplayRoutines.hh +++ b/src/EnergyPlus/DisplayRoutines.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DualDuct.cc b/src/EnergyPlus/DualDuct.cc index f5b84fd025c..2f57a48bd41 100644 --- a/src/EnergyPlus/DualDuct.cc +++ b/src/EnergyPlus/DualDuct.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/DualDuct.hh b/src/EnergyPlus/DualDuct.hh index 35f74ed3096..ae518085990 100644 --- a/src/EnergyPlus/DualDuct.hh +++ b/src/EnergyPlus/DualDuct.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EMSManager.cc b/src/EnergyPlus/EMSManager.cc index 34ac56f8206..b934ae69be0 100644 --- a/src/EnergyPlus/EMSManager.cc +++ b/src/EnergyPlus/EMSManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EMSManager.hh b/src/EnergyPlus/EMSManager.hh index 4842d2e913d..f281292883a 100644 --- a/src/EnergyPlus/EMSManager.hh +++ b/src/EnergyPlus/EMSManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EarthTube.cc b/src/EnergyPlus/EarthTube.cc index fd922e840e5..618fc825445 100644 --- a/src/EnergyPlus/EarthTube.cc +++ b/src/EnergyPlus/EarthTube.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EarthTube.hh b/src/EnergyPlus/EarthTube.hh index 637d2818c1e..f29f1ea80ee 100644 --- a/src/EnergyPlus/EarthTube.hh +++ b/src/EnergyPlus/EarthTube.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EcoRoofManager.cc b/src/EnergyPlus/EcoRoofManager.cc index 47552d87256..eeb0aedf2c4 100644 --- a/src/EnergyPlus/EcoRoofManager.cc +++ b/src/EnergyPlus/EcoRoofManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EcoRoofManager.hh b/src/EnergyPlus/EcoRoofManager.hh index 6e41ade2192..da27698ee84 100644 --- a/src/EnergyPlus/EcoRoofManager.hh +++ b/src/EnergyPlus/EcoRoofManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicLifeCycleCost.cc b/src/EnergyPlus/EconomicLifeCycleCost.cc index 4b4aa889151..af4f2d80f3c 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.cc +++ b/src/EnergyPlus/EconomicLifeCycleCost.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicLifeCycleCost.hh b/src/EnergyPlus/EconomicLifeCycleCost.hh index b8e46f3e2e4..a0b200f3ad6 100644 --- a/src/EnergyPlus/EconomicLifeCycleCost.hh +++ b/src/EnergyPlus/EconomicLifeCycleCost.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicTariff.cc b/src/EnergyPlus/EconomicTariff.cc index 50201852902..7f8a5ea2737 100644 --- a/src/EnergyPlus/EconomicTariff.cc +++ b/src/EnergyPlus/EconomicTariff.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EconomicTariff.hh b/src/EnergyPlus/EconomicTariff.hh index 7fffe935f29..1978f2211b4 100644 --- a/src/EnergyPlus/EconomicTariff.hh +++ b/src/EnergyPlus/EconomicTariff.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ElectricBaseboardRadiator.cc b/src/EnergyPlus/ElectricBaseboardRadiator.cc index dfc3676c5af..9783c7fd147 100644 --- a/src/EnergyPlus/ElectricBaseboardRadiator.cc +++ b/src/EnergyPlus/ElectricBaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ElectricBaseboardRadiator.hh b/src/EnergyPlus/ElectricBaseboardRadiator.hh index 83ee6e259cb..c8191fbffe6 100644 --- a/src/EnergyPlus/ElectricBaseboardRadiator.hh +++ b/src/EnergyPlus/ElectricBaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ElectricPowerServiceManager.cc b/src/EnergyPlus/ElectricPowerServiceManager.cc index 0910a5f51cc..9fc44b88dcf 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.cc +++ b/src/EnergyPlus/ElectricPowerServiceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ElectricPowerServiceManager.hh b/src/EnergyPlus/ElectricPowerServiceManager.hh index c56195c61b9..e3deaf613c8 100644 --- a/src/EnergyPlus/ElectricPowerServiceManager.hh +++ b/src/EnergyPlus/ElectricPowerServiceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EnergyPlus.hh b/src/EnergyPlus/EnergyPlus.hh index ad8c86239d8..2227eacf045 100644 --- a/src/EnergyPlus/EnergyPlus.hh +++ b/src/EnergyPlus/EnergyPlus.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EnergyPlusPgm.cc b/src/EnergyPlus/EnergyPlusPgm.cc index 154df0b47fd..d6e58ef666e 100644 --- a/src/EnergyPlus/EnergyPlusPgm.cc +++ b/src/EnergyPlus/EnergyPlusPgm.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EvaporativeCoolers.cc b/src/EnergyPlus/EvaporativeCoolers.cc index d00b8c13edf..489795b04c3 100644 --- a/src/EnergyPlus/EvaporativeCoolers.cc +++ b/src/EnergyPlus/EvaporativeCoolers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EvaporativeCoolers.hh b/src/EnergyPlus/EvaporativeCoolers.hh index 19af62dc151..a5d06281ebf 100644 --- a/src/EnergyPlus/EvaporativeCoolers.hh +++ b/src/EnergyPlus/EvaporativeCoolers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.cc b/src/EnergyPlus/EvaporativeFluidCoolers.cc index 7039beb1f26..370723c6111 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.cc +++ b/src/EnergyPlus/EvaporativeFluidCoolers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/EvaporativeFluidCoolers.hh b/src/EnergyPlus/EvaporativeFluidCoolers.hh index f4ab2d761b7..fce9159bf4c 100644 --- a/src/EnergyPlus/EvaporativeFluidCoolers.hh +++ b/src/EnergyPlus/EvaporativeFluidCoolers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExteriorEnergyUse.cc b/src/EnergyPlus/ExteriorEnergyUse.cc index cc39fcbe783..a84d42d1681 100644 --- a/src/EnergyPlus/ExteriorEnergyUse.cc +++ b/src/EnergyPlus/ExteriorEnergyUse.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExteriorEnergyUse.hh b/src/EnergyPlus/ExteriorEnergyUse.hh index 3b7ea249ead..45d6e4dd97c 100644 --- a/src/EnergyPlus/ExteriorEnergyUse.hh +++ b/src/EnergyPlus/ExteriorEnergyUse.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExternalInterface.cc b/src/EnergyPlus/ExternalInterface.cc index 6fb6039ea1f..5654a15dc85 100644 --- a/src/EnergyPlus/ExternalInterface.cc +++ b/src/EnergyPlus/ExternalInterface.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ExternalInterface.hh b/src/EnergyPlus/ExternalInterface.hh index 64c80c10f1f..7e1d2ea772e 100644 --- a/src/EnergyPlus/ExternalInterface.hh +++ b/src/EnergyPlus/ExternalInterface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FanCoilUnits.cc b/src/EnergyPlus/FanCoilUnits.cc index 3359c3f6647..bb96d067f05 100644 --- a/src/EnergyPlus/FanCoilUnits.cc +++ b/src/EnergyPlus/FanCoilUnits.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FanCoilUnits.hh b/src/EnergyPlus/FanCoilUnits.hh index 29af1c4d403..689b4c69213 100644 --- a/src/EnergyPlus/FanCoilUnits.hh +++ b/src/EnergyPlus/FanCoilUnits.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Fans.cc b/src/EnergyPlus/Fans.cc index dadc9574ae1..d2a57a340f8 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Fans.hh b/src/EnergyPlus/Fans.hh index 30b4d886194..234495e0ee4 100644 --- a/src/EnergyPlus/Fans.hh +++ b/src/EnergyPlus/Fans.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FaultsManager.cc b/src/EnergyPlus/FaultsManager.cc index 35f9f0e2cb0..141f04382c5 100644 --- a/src/EnergyPlus/FaultsManager.cc +++ b/src/EnergyPlus/FaultsManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FaultsManager.hh b/src/EnergyPlus/FaultsManager.hh index e3ba7df582a..44b73074fab 100644 --- a/src/EnergyPlus/FaultsManager.hh +++ b/src/EnergyPlus/FaultsManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FileSystem.cc b/src/EnergyPlus/FileSystem.cc index 8da15ef9534..a5a767f01b9 100644 --- a/src/EnergyPlus/FileSystem.cc +++ b/src/EnergyPlus/FileSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FileSystem.hh b/src/EnergyPlus/FileSystem.hh index 6608bb0da0e..526614799e8 100644 --- a/src/EnergyPlus/FileSystem.hh +++ b/src/EnergyPlus/FileSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidCoolers.cc b/src/EnergyPlus/FluidCoolers.cc index eda2cb3224d..a840a8c4913 100644 --- a/src/EnergyPlus/FluidCoolers.cc +++ b/src/EnergyPlus/FluidCoolers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidCoolers.hh b/src/EnergyPlus/FluidCoolers.hh index 12a6e6213f0..1b0adf7467a 100644 --- a/src/EnergyPlus/FluidCoolers.hh +++ b/src/EnergyPlus/FluidCoolers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidProperties.cc b/src/EnergyPlus/FluidProperties.cc index 1cb22b63a0a..4e6012b9813 100644 --- a/src/EnergyPlus/FluidProperties.cc +++ b/src/EnergyPlus/FluidProperties.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FluidProperties.hh b/src/EnergyPlus/FluidProperties.hh index 2bea618a255..457460503bb 100644 --- a/src/EnergyPlus/FluidProperties.hh +++ b/src/EnergyPlus/FluidProperties.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FuelCellElectricGenerator.cc b/src/EnergyPlus/FuelCellElectricGenerator.cc index 0e44e7eb2a9..7a49f5d66b3 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.cc +++ b/src/EnergyPlus/FuelCellElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/FuelCellElectricGenerator.hh b/src/EnergyPlus/FuelCellElectricGenerator.hh index c17711e5073..4c1ac15bf13 100644 --- a/src/EnergyPlus/FuelCellElectricGenerator.hh +++ b/src/EnergyPlus/FuelCellElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Furnaces.cc b/src/EnergyPlus/Furnaces.cc index 1129afd193e..a93c7e99710 100644 --- a/src/EnergyPlus/Furnaces.cc +++ b/src/EnergyPlus/Furnaces.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Furnaces.hh b/src/EnergyPlus/Furnaces.hh index e54f4dbfe50..01148087d4f 100644 --- a/src/EnergyPlus/Furnaces.hh +++ b/src/EnergyPlus/Furnaces.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/General.cc b/src/EnergyPlus/General.cc index 7ee80fb6d82..deecc46c2af 100644 --- a/src/EnergyPlus/General.cc +++ b/src/EnergyPlus/General.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/General.hh b/src/EnergyPlus/General.hh index 4e76264457c..050946da97b 100644 --- a/src/EnergyPlus/General.hh +++ b/src/EnergyPlus/General.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneralRoutines.cc b/src/EnergyPlus/GeneralRoutines.cc index 96695e8d894..5c3a94c65de 100644 --- a/src/EnergyPlus/GeneralRoutines.cc +++ b/src/EnergyPlus/GeneralRoutines.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneralRoutines.hh b/src/EnergyPlus/GeneralRoutines.hh index e50798cc65d..55d2215b101 100644 --- a/src/EnergyPlus/GeneralRoutines.hh +++ b/src/EnergyPlus/GeneralRoutines.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorDynamicsManager.cc b/src/EnergyPlus/GeneratorDynamicsManager.cc index ebfe1f4715c..f1abb578f43 100644 --- a/src/EnergyPlus/GeneratorDynamicsManager.cc +++ b/src/EnergyPlus/GeneratorDynamicsManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorDynamicsManager.hh b/src/EnergyPlus/GeneratorDynamicsManager.hh index 75d9ab8dfb8..e44624145eb 100644 --- a/src/EnergyPlus/GeneratorDynamicsManager.hh +++ b/src/EnergyPlus/GeneratorDynamicsManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorFuelSupply.cc b/src/EnergyPlus/GeneratorFuelSupply.cc index e14deb6f7b3..e26bd48be47 100644 --- a/src/EnergyPlus/GeneratorFuelSupply.cc +++ b/src/EnergyPlus/GeneratorFuelSupply.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GeneratorFuelSupply.hh b/src/EnergyPlus/GeneratorFuelSupply.hh index 0795b9b4511..2e3b35eb867 100644 --- a/src/EnergyPlus/GeneratorFuelSupply.hh +++ b/src/EnergyPlus/GeneratorFuelSupply.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GlobalNames.cc b/src/EnergyPlus/GlobalNames.cc index 5f55cee19fe..3557f0a7654 100644 --- a/src/EnergyPlus/GlobalNames.cc +++ b/src/EnergyPlus/GlobalNames.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GlobalNames.hh b/src/EnergyPlus/GlobalNames.hh index 9a79f9d6268..8bac0f1fba2 100644 --- a/src/EnergyPlus/GlobalNames.hh +++ b/src/EnergyPlus/GlobalNames.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundHeatExchangers.cc b/src/EnergyPlus/GroundHeatExchangers.cc index 3f21232d3a3..8503da353bd 100644 --- a/src/EnergyPlus/GroundHeatExchangers.cc +++ b/src/EnergyPlus/GroundHeatExchangers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundHeatExchangers.hh b/src/EnergyPlus/GroundHeatExchangers.hh index 5695d386797..4a0a0101f6b 100644 --- a/src/EnergyPlus/GroundHeatExchangers.hh +++ b/src/EnergyPlus/GroundHeatExchangers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh index a85f80b9883..dd144dfdddf 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/BaseGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc index a6834f062f5..4671a781b42 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh index cd7b6009aec..47cf7354c63 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/FiniteDifferenceGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc index 23d906c8fb9..8707b7a79a6 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh index d9c119810a9..bddd51ef7de 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/GroundTemperatureModelManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc index 3b9fe0a7969..55995833a81 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh index 73bf36d1610..c7fd3506dd4 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/KusudaAchenbachGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc index 9bd7024c3c9..96803b60920 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh index 0eaac3fe2c2..a7ae063d0b1 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteBuildingSurfaceGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc index 8d80f7a5688..0aed7d3149e 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh index dc6f0da8b43..07699f302f5 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteDeepGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc index f0d21c1bfa4..32340738745 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh index 4d91e469ff4..5878a6bf089 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteFCFactorMethodGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc index ec1cfa53b26..445bb81b742 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh index b42bd44c130..c193ddca3a6 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/SiteShallowGroundTemperatures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc index 0ff631dee1b..a6d0ad8357d 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc +++ b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh index 59094016f14..45d9a43e48e 100644 --- a/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh +++ b/src/EnergyPlus/GroundTemperatureModeling/XingGroundTemperatureModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACControllers.cc b/src/EnergyPlus/HVACControllers.cc index 74c51a973a3..47fd1ff44c5 100644 --- a/src/EnergyPlus/HVACControllers.cc +++ b/src/EnergyPlus/HVACControllers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACControllers.hh b/src/EnergyPlus/HVACControllers.hh index 1d7142e9dd0..acee4ca1090 100644 --- a/src/EnergyPlus/HVACControllers.hh +++ b/src/EnergyPlus/HVACControllers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACCooledBeam.cc b/src/EnergyPlus/HVACCooledBeam.cc index 0d5fe85f1b9..483e4ce4005 100644 --- a/src/EnergyPlus/HVACCooledBeam.cc +++ b/src/EnergyPlus/HVACCooledBeam.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACCooledBeam.hh b/src/EnergyPlus/HVACCooledBeam.hh index b0030b3fde8..1b68c6037fe 100644 --- a/src/EnergyPlus/HVACCooledBeam.hh +++ b/src/EnergyPlus/HVACCooledBeam.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDXHeatPumpSystem.cc b/src/EnergyPlus/HVACDXHeatPumpSystem.cc index afd0aa57990..09aeba0ca42 100644 --- a/src/EnergyPlus/HVACDXHeatPumpSystem.cc +++ b/src/EnergyPlus/HVACDXHeatPumpSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDXHeatPumpSystem.hh b/src/EnergyPlus/HVACDXHeatPumpSystem.hh index 5b343d5fddd..926a84724cb 100644 --- a/src/EnergyPlus/HVACDXHeatPumpSystem.hh +++ b/src/EnergyPlus/HVACDXHeatPumpSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDXSystem.cc b/src/EnergyPlus/HVACDXSystem.cc index b8be02cb9af..40db25c298c 100644 --- a/src/EnergyPlus/HVACDXSystem.cc +++ b/src/EnergyPlus/HVACDXSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDXSystem.hh b/src/EnergyPlus/HVACDXSystem.hh index 1f96c89d2ff..06f1690b20c 100644 --- a/src/EnergyPlus/HVACDXSystem.hh +++ b/src/EnergyPlus/HVACDXSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDuct.cc b/src/EnergyPlus/HVACDuct.cc index c26a2f5245e..511e8160c0d 100644 --- a/src/EnergyPlus/HVACDuct.cc +++ b/src/EnergyPlus/HVACDuct.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACDuct.hh b/src/EnergyPlus/HVACDuct.hh index 8943d0ea5c1..330ba5a18f0 100644 --- a/src/EnergyPlus/HVACDuct.hh +++ b/src/EnergyPlus/HVACDuct.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACFan.cc b/src/EnergyPlus/HVACFan.cc index 829f00e8a75..2cb859120c9 100644 --- a/src/EnergyPlus/HVACFan.cc +++ b/src/EnergyPlus/HVACFan.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACFan.hh b/src/EnergyPlus/HVACFan.hh index 7822d3b793a..07008ffad5f 100644 --- a/src/EnergyPlus/HVACFan.hh +++ b/src/EnergyPlus/HVACFan.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACFourPipeBeam.cc b/src/EnergyPlus/HVACFourPipeBeam.cc index 08dfb821da2..3c372830c4f 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.cc +++ b/src/EnergyPlus/HVACFourPipeBeam.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACFourPipeBeam.hh b/src/EnergyPlus/HVACFourPipeBeam.hh index 07f0e78550e..01ddac0bd38 100644 --- a/src/EnergyPlus/HVACFourPipeBeam.hh +++ b/src/EnergyPlus/HVACFourPipeBeam.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc index 662af5f307a..6d41292f94e 100644 --- a/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc +++ b/src/EnergyPlus/HVACHXAssistedCoolingCoil.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh b/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh index c4b46fb57c6..8a82d7b5a53 100644 --- a/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh +++ b/src/EnergyPlus/HVACHXAssistedCoolingCoil.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACInterfaceManager.cc b/src/EnergyPlus/HVACInterfaceManager.cc index ff30430a05c..7f757ec845f 100644 --- a/src/EnergyPlus/HVACInterfaceManager.cc +++ b/src/EnergyPlus/HVACInterfaceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACInterfaceManager.hh b/src/EnergyPlus/HVACInterfaceManager.hh index 0031f46e4bb..055e706dd75 100644 --- a/src/EnergyPlus/HVACInterfaceManager.hh +++ b/src/EnergyPlus/HVACInterfaceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACManager.cc b/src/EnergyPlus/HVACManager.cc index 1026e3939fc..32ee183b205 100644 --- a/src/EnergyPlus/HVACManager.cc +++ b/src/EnergyPlus/HVACManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACManager.hh b/src/EnergyPlus/HVACManager.hh index be177292a55..cb9f39b41b2 100644 --- a/src/EnergyPlus/HVACManager.hh +++ b/src/EnergyPlus/HVACManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc index c6b335bdc2f..f26ac2e6102 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.cc +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACMultiSpeedHeatPump.hh b/src/EnergyPlus/HVACMultiSpeedHeatPump.hh index 5b0653f02bc..fd1778d4d32 100644 --- a/src/EnergyPlus/HVACMultiSpeedHeatPump.hh +++ b/src/EnergyPlus/HVACMultiSpeedHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSingleDuctInduc.cc b/src/EnergyPlus/HVACSingleDuctInduc.cc index b6accc594dd..9b032a5f494 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.cc +++ b/src/EnergyPlus/HVACSingleDuctInduc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSingleDuctInduc.hh b/src/EnergyPlus/HVACSingleDuctInduc.hh index 65125ff2dc0..4e13e7af32e 100644 --- a/src/EnergyPlus/HVACSingleDuctInduc.hh +++ b/src/EnergyPlus/HVACSingleDuctInduc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSizingSimulationManager.cc b/src/EnergyPlus/HVACSizingSimulationManager.cc index 8afa3a0e475..0414c1ee63d 100644 --- a/src/EnergyPlus/HVACSizingSimulationManager.cc +++ b/src/EnergyPlus/HVACSizingSimulationManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACSizingSimulationManager.hh b/src/EnergyPlus/HVACSizingSimulationManager.hh index 718a1ae3d3f..2bdeed304b6 100644 --- a/src/EnergyPlus/HVACSizingSimulationManager.hh +++ b/src/EnergyPlus/HVACSizingSimulationManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACStandAloneERV.cc b/src/EnergyPlus/HVACStandAloneERV.cc index 5eece79da5d..4a0c277f04b 100644 --- a/src/EnergyPlus/HVACStandAloneERV.cc +++ b/src/EnergyPlus/HVACStandAloneERV.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACStandAloneERV.hh b/src/EnergyPlus/HVACStandAloneERV.hh index d99c8773c21..df821c5a35f 100644 --- a/src/EnergyPlus/HVACStandAloneERV.hh +++ b/src/EnergyPlus/HVACStandAloneERV.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.cc b/src/EnergyPlus/HVACUnitaryBypassVAV.cc index 650c47a1ae2..fbcf1d5e530 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.cc +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACUnitaryBypassVAV.hh b/src/EnergyPlus/HVACUnitaryBypassVAV.hh index 547bef7e6b4..0621f680f7a 100644 --- a/src/EnergyPlus/HVACUnitaryBypassVAV.hh +++ b/src/EnergyPlus/HVACUnitaryBypassVAV.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index b237a9a2f6d..cf5da8c9525 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh index 8b8fcef527f..3fedf644ff6 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HWBaseboardRadiator.cc b/src/EnergyPlus/HWBaseboardRadiator.cc index cfa22d029bb..c816f99c662 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.cc +++ b/src/EnergyPlus/HWBaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HWBaseboardRadiator.hh b/src/EnergyPlus/HWBaseboardRadiator.hh index be30f44af69..8f05c508c23 100644 --- a/src/EnergyPlus/HWBaseboardRadiator.hh +++ b/src/EnergyPlus/HWBaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index 2486a43a2af..952d9b44289 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.hh b/src/EnergyPlus/HeatBalFiniteDiffManager.hh index 81998d7f590..5a38661db31 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.hh +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index c04382c9adc..10fb186d6ca 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceAirManager.hh b/src/EnergyPlus/HeatBalanceAirManager.hh index 8f63d7d2a87..d5dc074cd9d 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.hh +++ b/src/EnergyPlus/HeatBalanceAirManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.cc b/src/EnergyPlus/HeatBalanceHAMTManager.cc index 55cb37d7fbf..b6d55bcd17d 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.cc +++ b/src/EnergyPlus/HeatBalanceHAMTManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceHAMTManager.hh b/src/EnergyPlus/HeatBalanceHAMTManager.hh index 4959397d661..3e2af8e8400 100644 --- a/src/EnergyPlus/HeatBalanceHAMTManager.hh +++ b/src/EnergyPlus/HeatBalanceHAMTManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceIntRadExchange.cc b/src/EnergyPlus/HeatBalanceIntRadExchange.cc index 0305c082eb7..c5d20d68bc0 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.cc +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceIntRadExchange.hh b/src/EnergyPlus/HeatBalanceIntRadExchange.hh index beedccc5d32..33ec72873b5 100644 --- a/src/EnergyPlus/HeatBalanceIntRadExchange.hh +++ b/src/EnergyPlus/HeatBalanceIntRadExchange.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceInternalHeatGains.cc b/src/EnergyPlus/HeatBalanceInternalHeatGains.cc index b06cff2bdb9..f9d1fca0707 100644 --- a/src/EnergyPlus/HeatBalanceInternalHeatGains.cc +++ b/src/EnergyPlus/HeatBalanceInternalHeatGains.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceInternalHeatGains.hh b/src/EnergyPlus/HeatBalanceInternalHeatGains.hh index 1e99fe1b0f3..89c24196b99 100644 --- a/src/EnergyPlus/HeatBalanceInternalHeatGains.hh +++ b/src/EnergyPlus/HeatBalanceInternalHeatGains.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceKivaManager.cc b/src/EnergyPlus/HeatBalanceKivaManager.cc index 152010eb0fb..0e64293c66b 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.cc +++ b/src/EnergyPlus/HeatBalanceKivaManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceKivaManager.hh b/src/EnergyPlus/HeatBalanceKivaManager.hh index 6df95e0fb1b..d72dd5bead3 100644 --- a/src/EnergyPlus/HeatBalanceKivaManager.hh +++ b/src/EnergyPlus/HeatBalanceKivaManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index b879276ca3b..28e69fb8d15 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceManager.hh b/src/EnergyPlus/HeatBalanceManager.hh index d9fa3ea2763..37d99463040 100644 --- a/src/EnergyPlus/HeatBalanceManager.hh +++ b/src/EnergyPlus/HeatBalanceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceMovableInsulation.cc b/src/EnergyPlus/HeatBalanceMovableInsulation.cc index d7a283620d2..028fc123660 100644 --- a/src/EnergyPlus/HeatBalanceMovableInsulation.cc +++ b/src/EnergyPlus/HeatBalanceMovableInsulation.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceMovableInsulation.hh b/src/EnergyPlus/HeatBalanceMovableInsulation.hh index 66902befb91..cb54afd7e80 100644 --- a/src/EnergyPlus/HeatBalanceMovableInsulation.hh +++ b/src/EnergyPlus/HeatBalanceMovableInsulation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.cc b/src/EnergyPlus/HeatBalanceSurfaceManager.cc index 94d38826152..57ccc1d6bb8 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.cc +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatBalanceSurfaceManager.hh b/src/EnergyPlus/HeatBalanceSurfaceManager.hh index f7ce42c9bf2..d1da3b9197a 100644 --- a/src/EnergyPlus/HeatBalanceSurfaceManager.hh +++ b/src/EnergyPlus/HeatBalanceSurfaceManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc index b3890721f9a..96194c643cb 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh index 6689a6e1bbf..cc9ce6f7c64 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh +++ b/src/EnergyPlus/HeatPumpWaterToWaterCOOLING.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc index 22d1690472d..ae32f538a79 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh index ab8356352aa..7846c28c897 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh +++ b/src/EnergyPlus/HeatPumpWaterToWaterHEATING.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc index 7bdac6a4cd6..8b9f285dd80 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh b/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh index 1f6d22d86c4..4c88e8bff77 100644 --- a/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh +++ b/src/EnergyPlus/HeatPumpWaterToWaterSimple.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatRecovery.cc b/src/EnergyPlus/HeatRecovery.cc index ac7662736b6..cec0bd50c3e 100644 --- a/src/EnergyPlus/HeatRecovery.cc +++ b/src/EnergyPlus/HeatRecovery.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatRecovery.hh b/src/EnergyPlus/HeatRecovery.hh index e75b31a7c4f..cdb3674ae50 100644 --- a/src/EnergyPlus/HeatRecovery.hh +++ b/src/EnergyPlus/HeatRecovery.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatingCoils.cc b/src/EnergyPlus/HeatingCoils.cc index 6b27c7c640e..825509797cc 100644 --- a/src/EnergyPlus/HeatingCoils.cc +++ b/src/EnergyPlus/HeatingCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HeatingCoils.hh b/src/EnergyPlus/HeatingCoils.hh index a637de96cce..227b5fa6921 100644 --- a/src/EnergyPlus/HeatingCoils.hh +++ b/src/EnergyPlus/HeatingCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HighTempRadiantSystem.cc b/src/EnergyPlus/HighTempRadiantSystem.cc index faf1799775b..c5b51ff3a70 100644 --- a/src/EnergyPlus/HighTempRadiantSystem.cc +++ b/src/EnergyPlus/HighTempRadiantSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HighTempRadiantSystem.hh b/src/EnergyPlus/HighTempRadiantSystem.hh index 1a624151bfa..22e6b7c7875 100644 --- a/src/EnergyPlus/HighTempRadiantSystem.hh +++ b/src/EnergyPlus/HighTempRadiantSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Humidifiers.cc b/src/EnergyPlus/Humidifiers.cc index 2140b68b50b..e5e13b717e0 100644 --- a/src/EnergyPlus/Humidifiers.cc +++ b/src/EnergyPlus/Humidifiers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Humidifiers.hh b/src/EnergyPlus/Humidifiers.hh index 6b6205fc194..f79066f7f84 100644 --- a/src/EnergyPlus/Humidifiers.hh +++ b/src/EnergyPlus/Humidifiers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridEvapCoolingModel.cc b/src/EnergyPlus/HybridEvapCoolingModel.cc index d5df3ccac61..51cf48f23cb 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.cc +++ b/src/EnergyPlus/HybridEvapCoolingModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridEvapCoolingModel.hh b/src/EnergyPlus/HybridEvapCoolingModel.hh index d22b2646d1b..d101cf3e9dc 100644 --- a/src/EnergyPlus/HybridEvapCoolingModel.hh +++ b/src/EnergyPlus/HybridEvapCoolingModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridModel.cc b/src/EnergyPlus/HybridModel.cc index 5317726c4a4..17406b5d5a4 100644 --- a/src/EnergyPlus/HybridModel.cc +++ b/src/EnergyPlus/HybridModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridModel.hh b/src/EnergyPlus/HybridModel.hh index 8f984049f68..297b6e4c182 100644 --- a/src/EnergyPlus/HybridModel.hh +++ b/src/EnergyPlus/HybridModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridUnitaryAirConditioners.cc b/src/EnergyPlus/HybridUnitaryAirConditioners.cc index 10d33355e78..5263108f852 100644 --- a/src/EnergyPlus/HybridUnitaryAirConditioners.cc +++ b/src/EnergyPlus/HybridUnitaryAirConditioners.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/HybridUnitaryAirConditioners.hh b/src/EnergyPlus/HybridUnitaryAirConditioners.hh index 4609d8cd43e..1f06a2dc75a 100644 --- a/src/EnergyPlus/HybridUnitaryAirConditioners.hh +++ b/src/EnergyPlus/HybridUnitaryAirConditioners.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ICEngineElectricGenerator.cc b/src/EnergyPlus/ICEngineElectricGenerator.cc index 3b82ce60d33..e3ffbe21b0c 100644 --- a/src/EnergyPlus/ICEngineElectricGenerator.cc +++ b/src/EnergyPlus/ICEngineElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ICEngineElectricGenerator.hh b/src/EnergyPlus/ICEngineElectricGenerator.hh index 245a9af2a86..a16e15ca55d 100644 --- a/src/EnergyPlus/ICEngineElectricGenerator.hh +++ b/src/EnergyPlus/ICEngineElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IceThermalStorage.cc b/src/EnergyPlus/IceThermalStorage.cc index 8ceb1ab7a13..ab070c0949e 100644 --- a/src/EnergyPlus/IceThermalStorage.cc +++ b/src/EnergyPlus/IceThermalStorage.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IceThermalStorage.hh b/src/EnergyPlus/IceThermalStorage.hh index 89d9cd9f15f..3c995f9aec1 100644 --- a/src/EnergyPlus/IceThermalStorage.hh +++ b/src/EnergyPlus/IceThermalStorage.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/DataStorage.hh b/src/EnergyPlus/InputProcessing/DataStorage.hh index a4271f19cee..4ba7b9578fb 100644 --- a/src/EnergyPlus/InputProcessing/DataStorage.hh +++ b/src/EnergyPlus/InputProcessing/DataStorage.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.hh b/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.hh index e90541adc47..44341ed9d04 100644 --- a/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.hh +++ b/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.in.cc b/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.in.cc index cfd3bedb096..011ce2f7221 100644 --- a/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.in.cc +++ b/src/EnergyPlus/InputProcessing/EmbeddedEpJSONSchema.in.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/IdfParser.cc b/src/EnergyPlus/InputProcessing/IdfParser.cc index ea9b926c972..52723512f5e 100644 --- a/src/EnergyPlus/InputProcessing/IdfParser.cc +++ b/src/EnergyPlus/InputProcessing/IdfParser.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/IdfParser.hh b/src/EnergyPlus/InputProcessing/IdfParser.hh index 32214ba99e2..d2b1c5f1bbb 100644 --- a/src/EnergyPlus/InputProcessing/IdfParser.hh +++ b/src/EnergyPlus/InputProcessing/IdfParser.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.cc b/src/EnergyPlus/InputProcessing/InputProcessor.cc index 029db54a9d9..0078e282d52 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.cc +++ b/src/EnergyPlus/InputProcessing/InputProcessor.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputProcessor.hh b/src/EnergyPlus/InputProcessing/InputProcessor.hh index ca8ebe97e67..abc3d29c93c 100644 --- a/src/EnergyPlus/InputProcessing/InputProcessor.hh +++ b/src/EnergyPlus/InputProcessing/InputProcessor.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputValidation.cc b/src/EnergyPlus/InputProcessing/InputValidation.cc index c05a3f85023..ed1cc5a7fbe 100644 --- a/src/EnergyPlus/InputProcessing/InputValidation.cc +++ b/src/EnergyPlus/InputProcessing/InputValidation.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InputProcessing/InputValidation.hh b/src/EnergyPlus/InputProcessing/InputValidation.hh index 4eb261a627a..c65398c7aad 100644 --- a/src/EnergyPlus/InputProcessing/InputValidation.hh +++ b/src/EnergyPlus/InputProcessing/InputValidation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IntegratedHeatPump.cc b/src/EnergyPlus/IntegratedHeatPump.cc index 57fb5c916dc..ca927def23a 100644 --- a/src/EnergyPlus/IntegratedHeatPump.cc +++ b/src/EnergyPlus/IntegratedHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/IntegratedHeatPump.hh b/src/EnergyPlus/IntegratedHeatPump.hh index d51b06ded68..f627ef37d77 100644 --- a/src/EnergyPlus/IntegratedHeatPump.hh +++ b/src/EnergyPlus/IntegratedHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InternalHeatGains.cc b/src/EnergyPlus/InternalHeatGains.cc index 65012e76378..c3e5ac6b146 100644 --- a/src/EnergyPlus/InternalHeatGains.cc +++ b/src/EnergyPlus/InternalHeatGains.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/InternalHeatGains.hh b/src/EnergyPlus/InternalHeatGains.hh index 802eda530e4..4614ce2e7ce 100644 --- a/src/EnergyPlus/InternalHeatGains.hh +++ b/src/EnergyPlus/InternalHeatGains.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/LowTempRadiantSystem.cc b/src/EnergyPlus/LowTempRadiantSystem.cc index 3ec19f75323..0f92694abd8 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.cc +++ b/src/EnergyPlus/LowTempRadiantSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/LowTempRadiantSystem.hh b/src/EnergyPlus/LowTempRadiantSystem.hh index 0947dec11a2..77712ec0661 100644 --- a/src/EnergyPlus/LowTempRadiantSystem.hh +++ b/src/EnergyPlus/LowTempRadiantSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MatrixDataManager.cc b/src/EnergyPlus/MatrixDataManager.cc index bec0363fa79..1008d124afe 100644 --- a/src/EnergyPlus/MatrixDataManager.cc +++ b/src/EnergyPlus/MatrixDataManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MatrixDataManager.hh b/src/EnergyPlus/MatrixDataManager.hh index a3473c44cdb..d5151db0e15 100644 --- a/src/EnergyPlus/MatrixDataManager.hh +++ b/src/EnergyPlus/MatrixDataManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MicroCHPElectricGenerator.cc b/src/EnergyPlus/MicroCHPElectricGenerator.cc index 2aa4d050709..904c35cd4f0 100644 --- a/src/EnergyPlus/MicroCHPElectricGenerator.cc +++ b/src/EnergyPlus/MicroCHPElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MicroCHPElectricGenerator.hh b/src/EnergyPlus/MicroCHPElectricGenerator.hh index 2711c02044f..236dbec581e 100644 --- a/src/EnergyPlus/MicroCHPElectricGenerator.hh +++ b/src/EnergyPlus/MicroCHPElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.cc b/src/EnergyPlus/MicroturbineElectricGenerator.cc index 186af209515..6514072efc3 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.cc +++ b/src/EnergyPlus/MicroturbineElectricGenerator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MicroturbineElectricGenerator.hh b/src/EnergyPlus/MicroturbineElectricGenerator.hh index 40ee921a49c..82273a91472 100644 --- a/src/EnergyPlus/MicroturbineElectricGenerator.hh +++ b/src/EnergyPlus/MicroturbineElectricGenerator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixedAir.cc b/src/EnergyPlus/MixedAir.cc index 7c9aa8b23bf..016bc315cc0 100644 --- a/src/EnergyPlus/MixedAir.cc +++ b/src/EnergyPlus/MixedAir.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixedAir.hh b/src/EnergyPlus/MixedAir.hh index c9eb330f955..d5f8c383e8c 100644 --- a/src/EnergyPlus/MixedAir.hh +++ b/src/EnergyPlus/MixedAir.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixerComponent.cc b/src/EnergyPlus/MixerComponent.cc index 55b38bd06f5..3fa18b07c10 100644 --- a/src/EnergyPlus/MixerComponent.cc +++ b/src/EnergyPlus/MixerComponent.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MixerComponent.hh b/src/EnergyPlus/MixerComponent.hh index 39a5eac7ba0..27162ded0ce 100644 --- a/src/EnergyPlus/MixerComponent.hh +++ b/src/EnergyPlus/MixerComponent.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.cc b/src/EnergyPlus/MoistureBalanceEMPDManager.cc index 8664b6c732e..ca55f411900 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.cc +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.hh b/src/EnergyPlus/MoistureBalanceEMPDManager.hh index bc959e7c10e..91878d0681f 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.hh +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MundtSimMgr.cc b/src/EnergyPlus/MundtSimMgr.cc index 2f17d17f958..8bcdb55b167 100644 --- a/src/EnergyPlus/MundtSimMgr.cc +++ b/src/EnergyPlus/MundtSimMgr.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/MundtSimMgr.hh b/src/EnergyPlus/MundtSimMgr.hh index 5db271da53a..2885a54da71 100644 --- a/src/EnergyPlus/MundtSimMgr.hh +++ b/src/EnergyPlus/MundtSimMgr.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NodeInputManager.cc b/src/EnergyPlus/NodeInputManager.cc index 080ed656726..0b6abb0f83b 100644 --- a/src/EnergyPlus/NodeInputManager.cc +++ b/src/EnergyPlus/NodeInputManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NodeInputManager.hh b/src/EnergyPlus/NodeInputManager.hh index 4424c1346bf..cc4360413bd 100644 --- a/src/EnergyPlus/NodeInputManager.hh +++ b/src/EnergyPlus/NodeInputManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NonZoneEquipmentManager.cc b/src/EnergyPlus/NonZoneEquipmentManager.cc index dfc473051b3..69010aa27d4 100644 --- a/src/EnergyPlus/NonZoneEquipmentManager.cc +++ b/src/EnergyPlus/NonZoneEquipmentManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/NonZoneEquipmentManager.hh b/src/EnergyPlus/NonZoneEquipmentManager.hh index f3d09141a42..dadd3d848f9 100644 --- a/src/EnergyPlus/NonZoneEquipmentManager.hh +++ b/src/EnergyPlus/NonZoneEquipmentManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutAirNodeManager.cc b/src/EnergyPlus/OutAirNodeManager.cc index c433745b3ab..548812214c5 100644 --- a/src/EnergyPlus/OutAirNodeManager.cc +++ b/src/EnergyPlus/OutAirNodeManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutAirNodeManager.hh b/src/EnergyPlus/OutAirNodeManager.hh index e5bf6b1ba5b..ad3c9917b3f 100644 --- a/src/EnergyPlus/OutAirNodeManager.hh +++ b/src/EnergyPlus/OutAirNodeManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutdoorAirUnit.cc b/src/EnergyPlus/OutdoorAirUnit.cc index 28c8ae5ee8d..074c5b09304 100644 --- a/src/EnergyPlus/OutdoorAirUnit.cc +++ b/src/EnergyPlus/OutdoorAirUnit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutdoorAirUnit.hh b/src/EnergyPlus/OutdoorAirUnit.hh index c69c0601514..4d2500b3de3 100644 --- a/src/EnergyPlus/OutdoorAirUnit.hh +++ b/src/EnergyPlus/OutdoorAirUnit.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputProcessor.cc b/src/EnergyPlus/OutputProcessor.cc index 0e26d5f74ce..102099a33f6 100644 --- a/src/EnergyPlus/OutputProcessor.cc +++ b/src/EnergyPlus/OutputProcessor.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputProcessor.hh b/src/EnergyPlus/OutputProcessor.hh index d2253d71e95..8f73c82b082 100644 --- a/src/EnergyPlus/OutputProcessor.hh +++ b/src/EnergyPlus/OutputProcessor.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportData.cc b/src/EnergyPlus/OutputReportData.cc index 27f8bd91f3c..114c48a5461 100644 --- a/src/EnergyPlus/OutputReportData.cc +++ b/src/EnergyPlus/OutputReportData.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportData.hh b/src/EnergyPlus/OutputReportData.hh index 6f527088c59..2374020a0a6 100644 --- a/src/EnergyPlus/OutputReportData.hh +++ b/src/EnergyPlus/OutputReportData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportPredefined.cc b/src/EnergyPlus/OutputReportPredefined.cc index b3d5bf7c959..54afe68b212 100644 --- a/src/EnergyPlus/OutputReportPredefined.cc +++ b/src/EnergyPlus/OutputReportPredefined.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportPredefined.hh b/src/EnergyPlus/OutputReportPredefined.hh index b8e94d408bf..6ac2f467e8c 100644 --- a/src/EnergyPlus/OutputReportPredefined.hh +++ b/src/EnergyPlus/OutputReportPredefined.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportTabular.cc b/src/EnergyPlus/OutputReportTabular.cc index 26ac646e96f..25d9d761474 100644 --- a/src/EnergyPlus/OutputReportTabular.cc +++ b/src/EnergyPlus/OutputReportTabular.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportTabular.hh b/src/EnergyPlus/OutputReportTabular.hh index 1a6a21efa56..d22b0220607 100644 --- a/src/EnergyPlus/OutputReportTabular.hh +++ b/src/EnergyPlus/OutputReportTabular.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportTabularAnnual.cc b/src/EnergyPlus/OutputReportTabularAnnual.cc index 5b7d3fae6ae..adb21847fb0 100644 --- a/src/EnergyPlus/OutputReportTabularAnnual.cc +++ b/src/EnergyPlus/OutputReportTabularAnnual.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReportTabularAnnual.hh b/src/EnergyPlus/OutputReportTabularAnnual.hh index 7ae3796dde1..7db9540603b 100644 --- a/src/EnergyPlus/OutputReportTabularAnnual.hh +++ b/src/EnergyPlus/OutputReportTabularAnnual.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReports.cc b/src/EnergyPlus/OutputReports.cc index f0c8fecebc1..29c0be72278 100644 --- a/src/EnergyPlus/OutputReports.cc +++ b/src/EnergyPlus/OutputReports.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutputReports.hh b/src/EnergyPlus/OutputReports.hh index 9196140ca23..8ac3d66dd01 100644 --- a/src/EnergyPlus/OutputReports.hh +++ b/src/EnergyPlus/OutputReports.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutsideEnergySources.cc b/src/EnergyPlus/OutsideEnergySources.cc index 6bcd41dea68..116acc08fdf 100644 --- a/src/EnergyPlus/OutsideEnergySources.cc +++ b/src/EnergyPlus/OutsideEnergySources.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/OutsideEnergySources.hh b/src/EnergyPlus/OutsideEnergySources.hh index 08915913a43..e46cdc3384a 100644 --- a/src/EnergyPlus/OutsideEnergySources.hh +++ b/src/EnergyPlus/OutsideEnergySources.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PVWatts.cc b/src/EnergyPlus/PVWatts.cc index d7f984b30e0..8767c946789 100644 --- a/src/EnergyPlus/PVWatts.cc +++ b/src/EnergyPlus/PVWatts.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PVWatts.hh b/src/EnergyPlus/PVWatts.hh index 25e72fe4ed9..e3047f5d37e 100644 --- a/src/EnergyPlus/PVWatts.hh +++ b/src/EnergyPlus/PVWatts.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PVWattsSSC.cc b/src/EnergyPlus/PVWattsSSC.cc index 60559218499..987ad6ad89c 100644 --- a/src/EnergyPlus/PVWattsSSC.cc +++ b/src/EnergyPlus/PVWattsSSC.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PVWattsSSC.hh b/src/EnergyPlus/PVWattsSSC.hh index d300b0cb691..2f92f6f4088 100644 --- a/src/EnergyPlus/PVWattsSSC.hh +++ b/src/EnergyPlus/PVWattsSSC.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PackagedTerminalHeatPump.cc b/src/EnergyPlus/PackagedTerminalHeatPump.cc index bfe1b52498a..2455814b712 100644 --- a/src/EnergyPlus/PackagedTerminalHeatPump.cc +++ b/src/EnergyPlus/PackagedTerminalHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PackagedTerminalHeatPump.hh b/src/EnergyPlus/PackagedTerminalHeatPump.hh index 4496e2fe320..a682a5cbf16 100644 --- a/src/EnergyPlus/PackagedTerminalHeatPump.hh +++ b/src/EnergyPlus/PackagedTerminalHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.cc b/src/EnergyPlus/PackagedThermalStorageCoil.cc index 0ac215dd87b..f1e1989b493 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.cc +++ b/src/EnergyPlus/PackagedThermalStorageCoil.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PackagedThermalStorageCoil.hh b/src/EnergyPlus/PackagedThermalStorageCoil.hh index 5666c2e9e59..74e87fc55d2 100644 --- a/src/EnergyPlus/PackagedThermalStorageCoil.hh +++ b/src/EnergyPlus/PackagedThermalStorageCoil.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc index cf26cc18102..8c75095a18a 100644 --- a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc +++ b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh index 901f70b3b46..561c3ca10a6 100644 --- a/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh +++ b/src/EnergyPlus/PhaseChangeModeling/HysteresisModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc index 2807fe7bdb9..b1068909a38 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.cc +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh index 80ee6456f93..d39779e5e9d 100644 --- a/src/EnergyPlus/PhotovoltaicThermalCollectors.hh +++ b/src/EnergyPlus/PhotovoltaicThermalCollectors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Photovoltaics.cc b/src/EnergyPlus/Photovoltaics.cc index 2716d9e7fc6..52815e8ee76 100644 --- a/src/EnergyPlus/Photovoltaics.cc +++ b/src/EnergyPlus/Photovoltaics.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Photovoltaics.hh b/src/EnergyPlus/Photovoltaics.hh index e0e09400f10..35929091717 100644 --- a/src/EnergyPlus/Photovoltaics.hh +++ b/src/EnergyPlus/Photovoltaics.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PierceSurface.hh b/src/EnergyPlus/PierceSurface.hh index 4c287c43dc4..0292273c535 100644 --- a/src/EnergyPlus/PierceSurface.hh +++ b/src/EnergyPlus/PierceSurface.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PipeHeatTransfer.cc b/src/EnergyPlus/PipeHeatTransfer.cc index 83bedfd4e0b..72d340c9663 100644 --- a/src/EnergyPlus/PipeHeatTransfer.cc +++ b/src/EnergyPlus/PipeHeatTransfer.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PipeHeatTransfer.hh b/src/EnergyPlus/PipeHeatTransfer.hh index 09ee2e9518a..ebd66c87a82 100644 --- a/src/EnergyPlus/PipeHeatTransfer.hh +++ b/src/EnergyPlus/PipeHeatTransfer.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pipes.cc b/src/EnergyPlus/Pipes.cc index 85137bccf1f..2881d20a477 100644 --- a/src/EnergyPlus/Pipes.cc +++ b/src/EnergyPlus/Pipes.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pipes.hh b/src/EnergyPlus/Pipes.hh index ecd19eea867..d87a3aa8789 100644 --- a/src/EnergyPlus/Pipes.hh +++ b/src/EnergyPlus/Pipes.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Branch.hh b/src/EnergyPlus/Plant/Branch.hh index f6de80bbbf4..cbab62c25a9 100644 --- a/src/EnergyPlus/Plant/Branch.hh +++ b/src/EnergyPlus/Plant/Branch.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/CallingOrder.hh b/src/EnergyPlus/Plant/CallingOrder.hh index aa2f292bb05..f1eb80d85d0 100644 --- a/src/EnergyPlus/Plant/CallingOrder.hh +++ b/src/EnergyPlus/Plant/CallingOrder.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Component.hh b/src/EnergyPlus/Plant/Component.hh index 74be69d4e1e..68af05f66e3 100644 --- a/src/EnergyPlus/Plant/Component.hh +++ b/src/EnergyPlus/Plant/Component.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ConnectedLoopData.hh b/src/EnergyPlus/Plant/ConnectedLoopData.hh index 7a16324ffc9..e47ff14b344 100644 --- a/src/EnergyPlus/Plant/ConnectedLoopData.hh +++ b/src/EnergyPlus/Plant/ConnectedLoopData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Connection.hh b/src/EnergyPlus/Plant/Connection.hh index c6107d9e4bf..200a81bbd80 100644 --- a/src/EnergyPlus/Plant/Connection.hh +++ b/src/EnergyPlus/Plant/Connection.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Enums.hh b/src/EnergyPlus/Plant/Enums.hh index 4ec68c01df4..129f2f24853 100644 --- a/src/EnergyPlus/Plant/Enums.hh +++ b/src/EnergyPlus/Plant/Enums.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/EquipAndOperations.hh b/src/EnergyPlus/Plant/EquipAndOperations.hh index ffa54410c30..d253510b1ca 100644 --- a/src/EnergyPlus/Plant/EquipAndOperations.hh +++ b/src/EnergyPlus/Plant/EquipAndOperations.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Loop.hh b/src/EnergyPlus/Plant/Loop.hh index 25941d7046a..4683f305b56 100644 --- a/src/EnergyPlus/Plant/Loop.hh +++ b/src/EnergyPlus/Plant/Loop.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/LoopSide.hh b/src/EnergyPlus/Plant/LoopSide.hh index 5dcfa95b63d..b58c57bbaa9 100644 --- a/src/EnergyPlus/Plant/LoopSide.hh +++ b/src/EnergyPlus/Plant/LoopSide.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/LoopSidePumpInformation.hh b/src/EnergyPlus/Plant/LoopSidePumpInformation.hh index 08d6692ea9c..b63de6bb0a8 100644 --- a/src/EnergyPlus/Plant/LoopSidePumpInformation.hh +++ b/src/EnergyPlus/Plant/LoopSidePumpInformation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/LoopSideReportVars.hh b/src/EnergyPlus/Plant/LoopSideReportVars.hh index 665f9bd0d48..39e49db81fd 100644 --- a/src/EnergyPlus/Plant/LoopSideReportVars.hh +++ b/src/EnergyPlus/Plant/LoopSideReportVars.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/MeterData.hh b/src/EnergyPlus/Plant/MeterData.hh index 5e9eeea7a3f..94c8225b723 100644 --- a/src/EnergyPlus/Plant/MeterData.hh +++ b/src/EnergyPlus/Plant/MeterData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/MixerData.hh b/src/EnergyPlus/Plant/MixerData.hh index 08dcb35cb01..cf4f4d00169 100644 --- a/src/EnergyPlus/Plant/MixerData.hh +++ b/src/EnergyPlus/Plant/MixerData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantAvailManager.hh b/src/EnergyPlus/Plant/PlantAvailManager.hh index bf2da908b44..942aa55d1a4 100644 --- a/src/EnergyPlus/Plant/PlantAvailManager.hh +++ b/src/EnergyPlus/Plant/PlantAvailManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantConvergencePoint.hh b/src/EnergyPlus/Plant/PlantConvergencePoint.hh index 8eea883fa9e..5a504dd00f0 100644 --- a/src/EnergyPlus/Plant/PlantConvergencePoint.hh +++ b/src/EnergyPlus/Plant/PlantConvergencePoint.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantLocation.hh b/src/EnergyPlus/Plant/PlantLocation.hh index 13dcc69bbb4..0bb0f3e2a55 100644 --- a/src/EnergyPlus/Plant/PlantLocation.hh +++ b/src/EnergyPlus/Plant/PlantLocation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantLoopSolver.cc b/src/EnergyPlus/Plant/PlantLoopSolver.cc index ed40874f3f7..bbcf35a4836 100644 --- a/src/EnergyPlus/Plant/PlantLoopSolver.cc +++ b/src/EnergyPlus/Plant/PlantLoopSolver.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantLoopSolver.hh b/src/EnergyPlus/Plant/PlantLoopSolver.hh index a6f483c3d75..e0470e32400 100644 --- a/src/EnergyPlus/Plant/PlantLoopSolver.hh +++ b/src/EnergyPlus/Plant/PlantLoopSolver.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 6e0076879a3..1de5f8f3c2c 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/PlantManager.hh b/src/EnergyPlus/Plant/PlantManager.hh index 210b00d8e6f..26a911f093b 100644 --- a/src/EnergyPlus/Plant/PlantManager.hh +++ b/src/EnergyPlus/Plant/PlantManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ReportBranchData.hh b/src/EnergyPlus/Plant/ReportBranchData.hh index 341b356e390..e848fa6198c 100644 --- a/src/EnergyPlus/Plant/ReportBranchData.hh +++ b/src/EnergyPlus/Plant/ReportBranchData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ReportCompData.hh b/src/EnergyPlus/Plant/ReportCompData.hh index 1c8b12229c5..40c5f39f074 100644 --- a/src/EnergyPlus/Plant/ReportCompData.hh +++ b/src/EnergyPlus/Plant/ReportCompData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ReportLoopData.hh b/src/EnergyPlus/Plant/ReportLoopData.hh index 5db4290c9cb..0c5dbc1971c 100644 --- a/src/EnergyPlus/Plant/ReportLoopData.hh +++ b/src/EnergyPlus/Plant/ReportLoopData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/ReportVars.hh b/src/EnergyPlus/Plant/ReportVars.hh index 1aeda5d27aa..1fe938a3604 100644 --- a/src/EnergyPlus/Plant/ReportVars.hh +++ b/src/EnergyPlus/Plant/ReportVars.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/SplitterData.hh b/src/EnergyPlus/Plant/SplitterData.hh index af25fd95f21..96dc191ca61 100644 --- a/src/EnergyPlus/Plant/SplitterData.hh +++ b/src/EnergyPlus/Plant/SplitterData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Plant/Subcomponents.hh b/src/EnergyPlus/Plant/Subcomponents.hh index a752233058b..e005337360a 100644 --- a/src/EnergyPlus/Plant/Subcomponents.hh +++ b/src/EnergyPlus/Plant/Subcomponents.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantCentralGSHP.cc b/src/EnergyPlus/PlantCentralGSHP.cc index 96087705f63..4a1a509090b 100644 --- a/src/EnergyPlus/PlantCentralGSHP.cc +++ b/src/EnergyPlus/PlantCentralGSHP.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantCentralGSHP.hh b/src/EnergyPlus/PlantCentralGSHP.hh index 5c78fc4a1eb..5db31b9ecd6 100644 --- a/src/EnergyPlus/PlantCentralGSHP.hh +++ b/src/EnergyPlus/PlantCentralGSHP.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index c0371354208..4ada4a3e9ae 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantChillers.hh b/src/EnergyPlus/PlantChillers.hh index 062728e40b8..1f862c9938e 100644 --- a/src/EnergyPlus/PlantChillers.hh +++ b/src/EnergyPlus/PlantChillers.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantComponent.hh b/src/EnergyPlus/PlantComponent.hh index 631c7bf4748..7e52784b083 100644 --- a/src/EnergyPlus/PlantComponent.hh +++ b/src/EnergyPlus/PlantComponent.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantComponentTemperatureSources.cc b/src/EnergyPlus/PlantComponentTemperatureSources.cc index 98383e45f8e..537f3a19d9b 100644 --- a/src/EnergyPlus/PlantComponentTemperatureSources.cc +++ b/src/EnergyPlus/PlantComponentTemperatureSources.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantComponentTemperatureSources.hh b/src/EnergyPlus/PlantComponentTemperatureSources.hh index ee1bb718b8b..a360e33e7af 100644 --- a/src/EnergyPlus/PlantComponentTemperatureSources.hh +++ b/src/EnergyPlus/PlantComponentTemperatureSources.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantCondLoopOperation.cc b/src/EnergyPlus/PlantCondLoopOperation.cc index 3809cd091b0..2f21f8e05ee 100644 --- a/src/EnergyPlus/PlantCondLoopOperation.cc +++ b/src/EnergyPlus/PlantCondLoopOperation.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantCondLoopOperation.hh b/src/EnergyPlus/PlantCondLoopOperation.hh index fccf152f238..8332148dccf 100644 --- a/src/EnergyPlus/PlantCondLoopOperation.hh +++ b/src/EnergyPlus/PlantCondLoopOperation.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 7c21bdf4c28..103b4546ecd 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 76fd7c5dd0d..23973f4ac22 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantLoadProfile.cc b/src/EnergyPlus/PlantLoadProfile.cc index d48b24480ba..4611639498d 100644 --- a/src/EnergyPlus/PlantLoadProfile.cc +++ b/src/EnergyPlus/PlantLoadProfile.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantLoadProfile.hh b/src/EnergyPlus/PlantLoadProfile.hh index cd4bd55b2e3..1c0115effc4 100644 --- a/src/EnergyPlus/PlantLoadProfile.hh +++ b/src/EnergyPlus/PlantLoadProfile.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index c7d423ba5c3..25d9bada75d 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantLoopEquip.hh b/src/EnergyPlus/PlantLoopEquip.hh index 508f04fbc28..dfde27f5be7 100644 --- a/src/EnergyPlus/PlantLoopEquip.hh +++ b/src/EnergyPlus/PlantLoopEquip.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantPipingSystemsManager.cc b/src/EnergyPlus/PlantPipingSystemsManager.cc index d8ba19f7495..5c1b69aa3f8 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.cc +++ b/src/EnergyPlus/PlantPipingSystemsManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantPipingSystemsManager.hh b/src/EnergyPlus/PlantPipingSystemsManager.hh index 4bc3bf1652f..2402ad42426 100644 --- a/src/EnergyPlus/PlantPipingSystemsManager.hh +++ b/src/EnergyPlus/PlantPipingSystemsManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantPressureSystem.cc b/src/EnergyPlus/PlantPressureSystem.cc index 628f8cfe9e2..4be8819cd96 100644 --- a/src/EnergyPlus/PlantPressureSystem.cc +++ b/src/EnergyPlus/PlantPressureSystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantPressureSystem.hh b/src/EnergyPlus/PlantPressureSystem.hh index 755a3653db1..94510c49423 100644 --- a/src/EnergyPlus/PlantPressureSystem.hh +++ b/src/EnergyPlus/PlantPressureSystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantUtilities.cc b/src/EnergyPlus/PlantUtilities.cc index e16bc0f22d6..0fffab2d066 100644 --- a/src/EnergyPlus/PlantUtilities.cc +++ b/src/EnergyPlus/PlantUtilities.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantUtilities.hh b/src/EnergyPlus/PlantUtilities.hh index 7d57dabd3f7..ecaccac28bd 100644 --- a/src/EnergyPlus/PlantUtilities.hh +++ b/src/EnergyPlus/PlantUtilities.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantValves.cc b/src/EnergyPlus/PlantValves.cc index 5987da99d10..ae945dcd419 100644 --- a/src/EnergyPlus/PlantValves.cc +++ b/src/EnergyPlus/PlantValves.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PlantValves.hh b/src/EnergyPlus/PlantValves.hh index a47fe60f42f..fba31ff6b7a 100644 --- a/src/EnergyPlus/PlantValves.hh +++ b/src/EnergyPlus/PlantValves.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Platform.hh b/src/EnergyPlus/Platform.hh index e136fea929d..6c084349ae2 100644 --- a/src/EnergyPlus/Platform.hh +++ b/src/EnergyPlus/Platform.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PollutionModule.cc b/src/EnergyPlus/PollutionModule.cc index 36aa804465f..895fb3c9e80 100644 --- a/src/EnergyPlus/PollutionModule.cc +++ b/src/EnergyPlus/PollutionModule.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PollutionModule.hh b/src/EnergyPlus/PollutionModule.hh index 2d403f8ba44..69e44924235 100644 --- a/src/EnergyPlus/PollutionModule.hh +++ b/src/EnergyPlus/PollutionModule.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PondGroundHeatExchanger.cc b/src/EnergyPlus/PondGroundHeatExchanger.cc index 08db5723432..505cc1c161c 100644 --- a/src/EnergyPlus/PondGroundHeatExchanger.cc +++ b/src/EnergyPlus/PondGroundHeatExchanger.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PondGroundHeatExchanger.hh b/src/EnergyPlus/PondGroundHeatExchanger.hh index 41190aed1ab..a7cc0f33b7d 100644 --- a/src/EnergyPlus/PondGroundHeatExchanger.hh +++ b/src/EnergyPlus/PondGroundHeatExchanger.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PoweredInductionUnits.cc b/src/EnergyPlus/PoweredInductionUnits.cc index fd0bcfdf7e8..b908d6c6a22 100644 --- a/src/EnergyPlus/PoweredInductionUnits.cc +++ b/src/EnergyPlus/PoweredInductionUnits.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PoweredInductionUnits.hh b/src/EnergyPlus/PoweredInductionUnits.hh index 555b5045ab6..7739ef15b48 100644 --- a/src/EnergyPlus/PoweredInductionUnits.hh +++ b/src/EnergyPlus/PoweredInductionUnits.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Psychrometrics.cc b/src/EnergyPlus/Psychrometrics.cc index 977ea7f12b1..9442946d785 100644 --- a/src/EnergyPlus/Psychrometrics.cc +++ b/src/EnergyPlus/Psychrometrics.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Psychrometrics.hh b/src/EnergyPlus/Psychrometrics.hh index 7e662011c49..841e4a44b1b 100644 --- a/src/EnergyPlus/Psychrometrics.hh +++ b/src/EnergyPlus/Psychrometrics.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pumps.cc b/src/EnergyPlus/Pumps.cc index 798396b4740..6bdcbe821f8 100644 --- a/src/EnergyPlus/Pumps.cc +++ b/src/EnergyPlus/Pumps.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Pumps.hh b/src/EnergyPlus/Pumps.hh index 22beeaaca2d..a5a5ab3c844 100644 --- a/src/EnergyPlus/Pumps.hh +++ b/src/EnergyPlus/Pumps.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PurchasedAirManager.cc b/src/EnergyPlus/PurchasedAirManager.cc index e19174ac6fd..7794b290114 100644 --- a/src/EnergyPlus/PurchasedAirManager.cc +++ b/src/EnergyPlus/PurchasedAirManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/PurchasedAirManager.hh b/src/EnergyPlus/PurchasedAirManager.hh index a41a388557b..b64b4789185 100644 --- a/src/EnergyPlus/PurchasedAirManager.hh +++ b/src/EnergyPlus/PurchasedAirManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index cac6a8794e7..cc5ae5962a4 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 23745a2a6ad..91c8856e7fe 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReportCoilSelection.cc b/src/EnergyPlus/ReportCoilSelection.cc index 0da8ae2cf3a..ce3bd0a41f1 100644 --- a/src/EnergyPlus/ReportCoilSelection.cc +++ b/src/EnergyPlus/ReportCoilSelection.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReportCoilSelection.hh b/src/EnergyPlus/ReportCoilSelection.hh index 4e0bda0a042..9234b25b2d3 100644 --- a/src/EnergyPlus/ReportCoilSelection.hh +++ b/src/EnergyPlus/ReportCoilSelection.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReportSizingManager.cc b/src/EnergyPlus/ReportSizingManager.cc index 59fe5d30f99..c667ae1c9c6 100644 --- a/src/EnergyPlus/ReportSizingManager.cc +++ b/src/EnergyPlus/ReportSizingManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReportSizingManager.hh b/src/EnergyPlus/ReportSizingManager.hh index afd6b48deec..3e17cf9e1b3 100644 --- a/src/EnergyPlus/ReportSizingManager.hh +++ b/src/EnergyPlus/ReportSizingManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ResultsSchema.cc b/src/EnergyPlus/ResultsSchema.cc index 863e9bcdae8..410c31624b3 100644 --- a/src/EnergyPlus/ResultsSchema.cc +++ b/src/EnergyPlus/ResultsSchema.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ResultsSchema.hh b/src/EnergyPlus/ResultsSchema.hh index f7287304dd3..1a44fec38b0 100644 --- a/src/EnergyPlus/ResultsSchema.hh +++ b/src/EnergyPlus/ResultsSchema.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReturnAirPathManager.cc b/src/EnergyPlus/ReturnAirPathManager.cc index ed73f26313a..c353272f000 100644 --- a/src/EnergyPlus/ReturnAirPathManager.cc +++ b/src/EnergyPlus/ReturnAirPathManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ReturnAirPathManager.hh b/src/EnergyPlus/ReturnAirPathManager.hh index 4238213e7a6..dcd863cb412 100644 --- a/src/EnergyPlus/ReturnAirPathManager.hh +++ b/src/EnergyPlus/ReturnAirPathManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc index 9866791288d..bf58a119950 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.cc +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelAirflowNetwork.hh b/src/EnergyPlus/RoomAirModelAirflowNetwork.hh index ddf0df2b17e..ae9cdcf4406 100644 --- a/src/EnergyPlus/RoomAirModelAirflowNetwork.hh +++ b/src/EnergyPlus/RoomAirModelAirflowNetwork.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelManager.cc b/src/EnergyPlus/RoomAirModelManager.cc index 19abcecb98f..b9608246546 100644 --- a/src/EnergyPlus/RoomAirModelManager.cc +++ b/src/EnergyPlus/RoomAirModelManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelManager.hh b/src/EnergyPlus/RoomAirModelManager.hh index 3966e6e1c8b..765319f6051 100644 --- a/src/EnergyPlus/RoomAirModelManager.hh +++ b/src/EnergyPlus/RoomAirModelManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelUserTempPattern.cc b/src/EnergyPlus/RoomAirModelUserTempPattern.cc index 0151e425b77..dd6f553945a 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.cc +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RoomAirModelUserTempPattern.hh b/src/EnergyPlus/RoomAirModelUserTempPattern.hh index ee6eb68e7e1..20793bb3f1c 100644 --- a/src/EnergyPlus/RoomAirModelUserTempPattern.hh +++ b/src/EnergyPlus/RoomAirModelUserTempPattern.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RootFinder.cc b/src/EnergyPlus/RootFinder.cc index 3da7c4a69cc..c7953b1f0c9 100644 --- a/src/EnergyPlus/RootFinder.cc +++ b/src/EnergyPlus/RootFinder.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RootFinder.hh b/src/EnergyPlus/RootFinder.hh index 4e8ec8322e9..8a3b5a49ba7 100644 --- a/src/EnergyPlus/RootFinder.hh +++ b/src/EnergyPlus/RootFinder.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.cc b/src/EnergyPlus/RuntimeLanguageProcessor.cc index 2db323cf395..f70e99175c3 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.cc +++ b/src/EnergyPlus/RuntimeLanguageProcessor.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/RuntimeLanguageProcessor.hh b/src/EnergyPlus/RuntimeLanguageProcessor.hh index 2e26b6faa96..af3f9f33105 100644 --- a/src/EnergyPlus/RuntimeLanguageProcessor.hh +++ b/src/EnergyPlus/RuntimeLanguageProcessor.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SQLiteProcedures.cc b/src/EnergyPlus/SQLiteProcedures.cc index b07827aaa37..9f07425e4ad 100644 --- a/src/EnergyPlus/SQLiteProcedures.cc +++ b/src/EnergyPlus/SQLiteProcedures.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SQLiteProcedures.hh b/src/EnergyPlus/SQLiteProcedures.hh index bd5d11eef7e..f10189cf9dc 100644 --- a/src/EnergyPlus/SQLiteProcedures.hh +++ b/src/EnergyPlus/SQLiteProcedures.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SZVAVModel.cc b/src/EnergyPlus/SZVAVModel.cc index 61abdcd7103..53c59ce497c 100644 --- a/src/EnergyPlus/SZVAVModel.cc +++ b/src/EnergyPlus/SZVAVModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SZVAVModel.hh b/src/EnergyPlus/SZVAVModel.hh index 421196f7d98..d1d0484d364 100644 --- a/src/EnergyPlus/SZVAVModel.hh +++ b/src/EnergyPlus/SZVAVModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ScheduleManager.cc b/src/EnergyPlus/ScheduleManager.cc index 99d2c8c0931..ff07c5aa1ab 100644 --- a/src/EnergyPlus/ScheduleManager.cc +++ b/src/EnergyPlus/ScheduleManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ScheduleManager.hh b/src/EnergyPlus/ScheduleManager.hh index 97c8f16986e..6930cf273b3 100644 --- a/src/EnergyPlus/ScheduleManager.hh +++ b/src/EnergyPlus/ScheduleManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SetPointManager.cc b/src/EnergyPlus/SetPointManager.cc index f05d992460e..39b4b37f7ba 100644 --- a/src/EnergyPlus/SetPointManager.cc +++ b/src/EnergyPlus/SetPointManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SetPointManager.hh b/src/EnergyPlus/SetPointManager.hh index a99c27c5c1d..e3af910dc93 100644 --- a/src/EnergyPlus/SetPointManager.hh +++ b/src/EnergyPlus/SetPointManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Shape.hh b/src/EnergyPlus/Shape.hh index 0be81a6b7ef..feaf9d22ad0 100644 --- a/src/EnergyPlus/Shape.hh +++ b/src/EnergyPlus/Shape.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index f0f1bd1249c..ca9c08ab7b1 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SimAirServingZones.hh b/src/EnergyPlus/SimAirServingZones.hh index 5a5ff85c0a4..581a0edc985 100644 --- a/src/EnergyPlus/SimAirServingZones.hh +++ b/src/EnergyPlus/SimAirServingZones.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SimulationManager.cc b/src/EnergyPlus/SimulationManager.cc index e74485077fd..8b483d95179 100644 --- a/src/EnergyPlus/SimulationManager.cc +++ b/src/EnergyPlus/SimulationManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SimulationManager.hh b/src/EnergyPlus/SimulationManager.hh index fa96bef1fdd..0d6b2e9e6e2 100644 --- a/src/EnergyPlus/SimulationManager.hh +++ b/src/EnergyPlus/SimulationManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SingleDuct.cc b/src/EnergyPlus/SingleDuct.cc index 8e6de415495..5e735b43228 100644 --- a/src/EnergyPlus/SingleDuct.cc +++ b/src/EnergyPlus/SingleDuct.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SingleDuct.hh b/src/EnergyPlus/SingleDuct.hh index 0244a641872..a89a1c5396e 100644 --- a/src/EnergyPlus/SingleDuct.hh +++ b/src/EnergyPlus/SingleDuct.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingAnalysisObjects.cc b/src/EnergyPlus/SizingAnalysisObjects.cc index 32d4bced46a..e0eb3ef1850 100644 --- a/src/EnergyPlus/SizingAnalysisObjects.cc +++ b/src/EnergyPlus/SizingAnalysisObjects.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingAnalysisObjects.hh b/src/EnergyPlus/SizingAnalysisObjects.hh index ce185166fef..5f80e722939 100644 --- a/src/EnergyPlus/SizingAnalysisObjects.hh +++ b/src/EnergyPlus/SizingAnalysisObjects.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingManager.cc b/src/EnergyPlus/SizingManager.cc index d4201e688b5..d5649f41293 100644 --- a/src/EnergyPlus/SizingManager.cc +++ b/src/EnergyPlus/SizingManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SizingManager.hh b/src/EnergyPlus/SizingManager.hh index 3f2c4d21a7d..d616a959b55 100644 --- a/src/EnergyPlus/SizingManager.hh +++ b/src/EnergyPlus/SizingManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarCollectors.cc b/src/EnergyPlus/SolarCollectors.cc index af2a5a3157b..d65e14e06c5 100644 --- a/src/EnergyPlus/SolarCollectors.cc +++ b/src/EnergyPlus/SolarCollectors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarCollectors.hh b/src/EnergyPlus/SolarCollectors.hh index cbde1cf918d..330616c168e 100644 --- a/src/EnergyPlus/SolarCollectors.hh +++ b/src/EnergyPlus/SolarCollectors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarReflectionManager.cc b/src/EnergyPlus/SolarReflectionManager.cc index 0434491a8db..db539b94640 100644 --- a/src/EnergyPlus/SolarReflectionManager.cc +++ b/src/EnergyPlus/SolarReflectionManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarReflectionManager.hh b/src/EnergyPlus/SolarReflectionManager.hh index efdf6ea07d3..7704fee0b83 100644 --- a/src/EnergyPlus/SolarReflectionManager.hh +++ b/src/EnergyPlus/SolarReflectionManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index 90fc5cc6ad4..688f20befbc 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SolarShading.hh b/src/EnergyPlus/SolarShading.hh index ceb96c034e3..4187e74f556 100644 --- a/src/EnergyPlus/SolarShading.hh +++ b/src/EnergyPlus/SolarShading.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SortAndStringUtilities.cc b/src/EnergyPlus/SortAndStringUtilities.cc index c39d9d2dfc3..efe7cd42848 100644 --- a/src/EnergyPlus/SortAndStringUtilities.cc +++ b/src/EnergyPlus/SortAndStringUtilities.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SortAndStringUtilities.hh b/src/EnergyPlus/SortAndStringUtilities.hh index 32e7bd3c793..60a2911888b 100644 --- a/src/EnergyPlus/SortAndStringUtilities.hh +++ b/src/EnergyPlus/SortAndStringUtilities.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SplitterComponent.cc b/src/EnergyPlus/SplitterComponent.cc index 7b98e4b9cd2..2746b5513b2 100644 --- a/src/EnergyPlus/SplitterComponent.cc +++ b/src/EnergyPlus/SplitterComponent.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SplitterComponent.hh b/src/EnergyPlus/SplitterComponent.hh index 2b12bd15d74..b5e220c70a8 100644 --- a/src/EnergyPlus/SplitterComponent.hh +++ b/src/EnergyPlus/SplitterComponent.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/StandardRatings.cc b/src/EnergyPlus/StandardRatings.cc index ea92521ca2f..1622e4df753 100644 --- a/src/EnergyPlus/StandardRatings.cc +++ b/src/EnergyPlus/StandardRatings.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/StandardRatings.hh b/src/EnergyPlus/StandardRatings.hh index 8de308e7e20..d4cbb3098b4 100644 --- a/src/EnergyPlus/StandardRatings.hh +++ b/src/EnergyPlus/StandardRatings.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SteamBaseboardRadiator.cc b/src/EnergyPlus/SteamBaseboardRadiator.cc index fcd10add9a7..d2a5cb71f92 100644 --- a/src/EnergyPlus/SteamBaseboardRadiator.cc +++ b/src/EnergyPlus/SteamBaseboardRadiator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SteamBaseboardRadiator.hh b/src/EnergyPlus/SteamBaseboardRadiator.hh index d25f8e44baa..00223bc5768 100644 --- a/src/EnergyPlus/SteamBaseboardRadiator.hh +++ b/src/EnergyPlus/SteamBaseboardRadiator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SteamCoils.cc b/src/EnergyPlus/SteamCoils.cc index 70557baeb12..ad5e29bd918 100644 --- a/src/EnergyPlus/SteamCoils.cc +++ b/src/EnergyPlus/SteamCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SteamCoils.hh b/src/EnergyPlus/SteamCoils.hh index 2ecd720706f..3507b2868bf 100644 --- a/src/EnergyPlus/SteamCoils.hh +++ b/src/EnergyPlus/SteamCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceGeometry.cc b/src/EnergyPlus/SurfaceGeometry.cc index 3866bb3f079..b70413bd4ad 100644 --- a/src/EnergyPlus/SurfaceGeometry.cc +++ b/src/EnergyPlus/SurfaceGeometry.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceGeometry.hh b/src/EnergyPlus/SurfaceGeometry.hh index 83e86129a8e..bc9bf1708b4 100644 --- a/src/EnergyPlus/SurfaceGeometry.hh +++ b/src/EnergyPlus/SurfaceGeometry.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc index 52b62f1a06d..eb6964ab32f 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.cc +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceGroundHeatExchanger.hh b/src/EnergyPlus/SurfaceGroundHeatExchanger.hh index c6fc26dc9f6..dd78826f216 100644 --- a/src/EnergyPlus/SurfaceGroundHeatExchanger.hh +++ b/src/EnergyPlus/SurfaceGroundHeatExchanger.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceOctree.cc b/src/EnergyPlus/SurfaceOctree.cc index 6f7e957c8ec..e8b56793545 100644 --- a/src/EnergyPlus/SurfaceOctree.cc +++ b/src/EnergyPlus/SurfaceOctree.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SurfaceOctree.hh b/src/EnergyPlus/SurfaceOctree.hh index 740e64b147a..725e594c25e 100644 --- a/src/EnergyPlus/SurfaceOctree.hh +++ b/src/EnergyPlus/SurfaceOctree.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SwimmingPool.cc b/src/EnergyPlus/SwimmingPool.cc index 67a90e5a160..bb9127c90e3 100644 --- a/src/EnergyPlus/SwimmingPool.cc +++ b/src/EnergyPlus/SwimmingPool.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SwimmingPool.hh b/src/EnergyPlus/SwimmingPool.hh index 675f3d6709e..09d9d79e5ad 100644 --- a/src/EnergyPlus/SwimmingPool.hh +++ b/src/EnergyPlus/SwimmingPool.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SystemAvailabilityManager.cc b/src/EnergyPlus/SystemAvailabilityManager.cc index e1af7f0a4a1..3246c0fd1f1 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.cc +++ b/src/EnergyPlus/SystemAvailabilityManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SystemAvailabilityManager.hh b/src/EnergyPlus/SystemAvailabilityManager.hh index d1879a488ca..c0ac53c0828 100644 --- a/src/EnergyPlus/SystemAvailabilityManager.hh +++ b/src/EnergyPlus/SystemAvailabilityManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SystemReports.cc b/src/EnergyPlus/SystemReports.cc index c8b48c7c5c4..004e885d694 100644 --- a/src/EnergyPlus/SystemReports.cc +++ b/src/EnergyPlus/SystemReports.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/SystemReports.hh b/src/EnergyPlus/SystemReports.hh index e6f509bb50b..df8db6c5054 100644 --- a/src/EnergyPlus/SystemReports.hh +++ b/src/EnergyPlus/SystemReports.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGArgs.cc b/src/EnergyPlus/TARCOGArgs.cc index 1555fee3a32..74e16153b48 100644 --- a/src/EnergyPlus/TARCOGArgs.cc +++ b/src/EnergyPlus/TARCOGArgs.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGArgs.hh b/src/EnergyPlus/TARCOGArgs.hh index e80ce0333b2..ebe899c44cd 100644 --- a/src/EnergyPlus/TARCOGArgs.hh +++ b/src/EnergyPlus/TARCOGArgs.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGCommon.cc b/src/EnergyPlus/TARCOGCommon.cc index e9da1ab5656..7141f39e143 100644 --- a/src/EnergyPlus/TARCOGCommon.cc +++ b/src/EnergyPlus/TARCOGCommon.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGCommon.hh b/src/EnergyPlus/TARCOGCommon.hh index 684c5ddfeaa..27ef4aa8b0c 100644 --- a/src/EnergyPlus/TARCOGCommon.hh +++ b/src/EnergyPlus/TARCOGCommon.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGDeflection.cc b/src/EnergyPlus/TARCOGDeflection.cc index ad9d60b9b45..5745ba568c8 100644 --- a/src/EnergyPlus/TARCOGDeflection.cc +++ b/src/EnergyPlus/TARCOGDeflection.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGDeflection.hh b/src/EnergyPlus/TARCOGDeflection.hh index b46a72c92fb..4a7652c4c05 100644 --- a/src/EnergyPlus/TARCOGDeflection.hh +++ b/src/EnergyPlus/TARCOGDeflection.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGasses90.cc b/src/EnergyPlus/TARCOGGasses90.cc index d8143245da1..fa77172ce21 100644 --- a/src/EnergyPlus/TARCOGGasses90.cc +++ b/src/EnergyPlus/TARCOGGasses90.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGasses90.hh b/src/EnergyPlus/TARCOGGasses90.hh index 2e850427406..9a49f61e309 100644 --- a/src/EnergyPlus/TARCOGGasses90.hh +++ b/src/EnergyPlus/TARCOGGasses90.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGassesParams.cc b/src/EnergyPlus/TARCOGGassesParams.cc index 3ff62d0e93b..d9aa4ae495a 100644 --- a/src/EnergyPlus/TARCOGGassesParams.cc +++ b/src/EnergyPlus/TARCOGGassesParams.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGGassesParams.hh b/src/EnergyPlus/TARCOGGassesParams.hh index 51e3bf53637..92b93dc1079 100644 --- a/src/EnergyPlus/TARCOGGassesParams.hh +++ b/src/EnergyPlus/TARCOGGassesParams.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGMain.cc b/src/EnergyPlus/TARCOGMain.cc index bef7a99e333..306b9b35522 100644 --- a/src/EnergyPlus/TARCOGMain.cc +++ b/src/EnergyPlus/TARCOGMain.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGMain.hh b/src/EnergyPlus/TARCOGMain.hh index 7c100cfa39f..4c1c248dc24 100644 --- a/src/EnergyPlus/TARCOGMain.hh +++ b/src/EnergyPlus/TARCOGMain.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGOutput.cc b/src/EnergyPlus/TARCOGOutput.cc index e40eeedcd2c..ea3fd9a634f 100644 --- a/src/EnergyPlus/TARCOGOutput.cc +++ b/src/EnergyPlus/TARCOGOutput.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGOutput.hh b/src/EnergyPlus/TARCOGOutput.hh index 589c423d724..d89645c6030 100644 --- a/src/EnergyPlus/TARCOGOutput.hh +++ b/src/EnergyPlus/TARCOGOutput.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGParams.cc b/src/EnergyPlus/TARCOGParams.cc index 71319207792..00b999b1679 100644 --- a/src/EnergyPlus/TARCOGParams.cc +++ b/src/EnergyPlus/TARCOGParams.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TARCOGParams.hh b/src/EnergyPlus/TARCOGParams.hh index 77e07f7dd50..593ba2a6f96 100644 --- a/src/EnergyPlus/TARCOGParams.hh +++ b/src/EnergyPlus/TARCOGParams.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TarcogShading.cc b/src/EnergyPlus/TarcogShading.cc index a8335212f91..f7d76225bf5 100644 --- a/src/EnergyPlus/TarcogShading.cc +++ b/src/EnergyPlus/TarcogShading.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TarcogShading.hh b/src/EnergyPlus/TarcogShading.hh index a70c04ff988..61c097ff167 100644 --- a/src/EnergyPlus/TarcogShading.hh +++ b/src/EnergyPlus/TarcogShading.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalChimney.cc b/src/EnergyPlus/ThermalChimney.cc index 560ea697cd4..0a1f53b46fa 100644 --- a/src/EnergyPlus/ThermalChimney.cc +++ b/src/EnergyPlus/ThermalChimney.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalChimney.hh b/src/EnergyPlus/ThermalChimney.hh index 13567528298..2bba6275b93 100644 --- a/src/EnergyPlus/ThermalChimney.hh +++ b/src/EnergyPlus/ThermalChimney.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalComfort.cc b/src/EnergyPlus/ThermalComfort.cc index 967b72dcc4a..1e9d8ebd12a 100644 --- a/src/EnergyPlus/ThermalComfort.cc +++ b/src/EnergyPlus/ThermalComfort.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalComfort.hh b/src/EnergyPlus/ThermalComfort.hh index fc81f81dc22..3c12fc74be1 100644 --- a/src/EnergyPlus/ThermalComfort.hh +++ b/src/EnergyPlus/ThermalComfort.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalEN673Calc.cc b/src/EnergyPlus/ThermalEN673Calc.cc index f63c648b2ba..95d8d83b006 100644 --- a/src/EnergyPlus/ThermalEN673Calc.cc +++ b/src/EnergyPlus/ThermalEN673Calc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalEN673Calc.hh b/src/EnergyPlus/ThermalEN673Calc.hh index b531c21a17f..4d0fe966639 100644 --- a/src/EnergyPlus/ThermalEN673Calc.hh +++ b/src/EnergyPlus/ThermalEN673Calc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalISO15099Calc.cc b/src/EnergyPlus/ThermalISO15099Calc.cc index 87069ca19f0..73b4c13d249 100644 --- a/src/EnergyPlus/ThermalISO15099Calc.cc +++ b/src/EnergyPlus/ThermalISO15099Calc.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ThermalISO15099Calc.hh b/src/EnergyPlus/ThermalISO15099Calc.hh index 663c709b9d8..4d5fb8e6898 100644 --- a/src/EnergyPlus/ThermalISO15099Calc.hh +++ b/src/EnergyPlus/ThermalISO15099Calc.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Timer.h b/src/EnergyPlus/Timer.h index 08e856f71b5..3a5c950d36a 100644 --- a/src/EnergyPlus/Timer.h +++ b/src/EnergyPlus/Timer.h @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TranspiredCollector.cc b/src/EnergyPlus/TranspiredCollector.cc index 4849c9c3372..0553efc2f30 100644 --- a/src/EnergyPlus/TranspiredCollector.cc +++ b/src/EnergyPlus/TranspiredCollector.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/TranspiredCollector.hh b/src/EnergyPlus/TranspiredCollector.hh index ac9dc28a7f4..ee1fea611bc 100644 --- a/src/EnergyPlus/TranspiredCollector.hh +++ b/src/EnergyPlus/TranspiredCollector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UFADManager.cc b/src/EnergyPlus/UFADManager.cc index 89b4b0469cf..f0b921989c5 100644 --- a/src/EnergyPlus/UFADManager.cc +++ b/src/EnergyPlus/UFADManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UFADManager.hh b/src/EnergyPlus/UFADManager.hh index 9c2b3dc0c9a..6561649de0b 100644 --- a/src/EnergyPlus/UFADManager.hh +++ b/src/EnergyPlus/UFADManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitHeater.cc b/src/EnergyPlus/UnitHeater.cc index b6e2221e371..006451f1df2 100644 --- a/src/EnergyPlus/UnitHeater.cc +++ b/src/EnergyPlus/UnitHeater.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitHeater.hh b/src/EnergyPlus/UnitHeater.hh index a47b390dd91..1f4431812fc 100644 --- a/src/EnergyPlus/UnitHeater.hh +++ b/src/EnergyPlus/UnitHeater.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitVentilator.cc b/src/EnergyPlus/UnitVentilator.cc index ad629fba185..2c5c7fa78a5 100644 --- a/src/EnergyPlus/UnitVentilator.cc +++ b/src/EnergyPlus/UnitVentilator.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitVentilator.hh b/src/EnergyPlus/UnitVentilator.hh index 4bde1cbb5b1..c41005413d1 100644 --- a/src/EnergyPlus/UnitVentilator.hh +++ b/src/EnergyPlus/UnitVentilator.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitarySystem.cc b/src/EnergyPlus/UnitarySystem.cc index 8a2536845c0..a9b1a7b58f0 100644 --- a/src/EnergyPlus/UnitarySystem.cc +++ b/src/EnergyPlus/UnitarySystem.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UnitarySystem.hh b/src/EnergyPlus/UnitarySystem.hh index dc64941b5e1..b09ab605f65 100644 --- a/src/EnergyPlus/UnitarySystem.hh +++ b/src/EnergyPlus/UnitarySystem.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UserDefinedComponents.cc b/src/EnergyPlus/UserDefinedComponents.cc index 2624e5ebb7f..3e4a11b966b 100644 --- a/src/EnergyPlus/UserDefinedComponents.cc +++ b/src/EnergyPlus/UserDefinedComponents.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UserDefinedComponents.hh b/src/EnergyPlus/UserDefinedComponents.hh index 94cb7011915..23f42aeb8d5 100644 --- a/src/EnergyPlus/UserDefinedComponents.hh +++ b/src/EnergyPlus/UserDefinedComponents.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UtilityRoutines.cc b/src/EnergyPlus/UtilityRoutines.cc index e266f032778..4258f57fde3 100644 --- a/src/EnergyPlus/UtilityRoutines.cc +++ b/src/EnergyPlus/UtilityRoutines.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/UtilityRoutines.hh b/src/EnergyPlus/UtilityRoutines.hh index 61e25fd233e..3175aa12543 100644 --- a/src/EnergyPlus/UtilityRoutines.hh +++ b/src/EnergyPlus/UtilityRoutines.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/VariableSpeedCoils.cc b/src/EnergyPlus/VariableSpeedCoils.cc index caf763703d8..7ab944f649a 100644 --- a/src/EnergyPlus/VariableSpeedCoils.cc +++ b/src/EnergyPlus/VariableSpeedCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/VariableSpeedCoils.hh b/src/EnergyPlus/VariableSpeedCoils.hh index 4a43b37ae30..62a395f5f17 100644 --- a/src/EnergyPlus/VariableSpeedCoils.hh +++ b/src/EnergyPlus/VariableSpeedCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Vectors.cc b/src/EnergyPlus/Vectors.cc index 2eb97d18779..9031ab2cf0c 100644 --- a/src/EnergyPlus/Vectors.cc +++ b/src/EnergyPlus/Vectors.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/Vectors.hh b/src/EnergyPlus/Vectors.hh index 926d9271c51..fde4fe7cafa 100644 --- a/src/EnergyPlus/Vectors.hh +++ b/src/EnergyPlus/Vectors.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/VentilatedSlab.cc b/src/EnergyPlus/VentilatedSlab.cc index f476732db58..c8883956a3a 100644 --- a/src/EnergyPlus/VentilatedSlab.cc +++ b/src/EnergyPlus/VentilatedSlab.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/VentilatedSlab.hh b/src/EnergyPlus/VentilatedSlab.hh index fc936a8235c..cbe6af079b4 100644 --- a/src/EnergyPlus/VentilatedSlab.hh +++ b/src/EnergyPlus/VentilatedSlab.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterCoils.cc b/src/EnergyPlus/WaterCoils.cc index c403d3e8647..38f08f0e495 100644 --- a/src/EnergyPlus/WaterCoils.cc +++ b/src/EnergyPlus/WaterCoils.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterCoils.hh b/src/EnergyPlus/WaterCoils.hh index ed9b384122c..90a4478a485 100644 --- a/src/EnergyPlus/WaterCoils.hh +++ b/src/EnergyPlus/WaterCoils.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterManager.cc b/src/EnergyPlus/WaterManager.cc index b4016c1305b..68600bad5d1 100644 --- a/src/EnergyPlus/WaterManager.cc +++ b/src/EnergyPlus/WaterManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterManager.hh b/src/EnergyPlus/WaterManager.hh index 96f9ed8f513..abdad98416c 100644 --- a/src/EnergyPlus/WaterManager.hh +++ b/src/EnergyPlus/WaterManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterThermalTanks.cc b/src/EnergyPlus/WaterThermalTanks.cc index 4c626c2be62..0f77318bac0 100644 --- a/src/EnergyPlus/WaterThermalTanks.cc +++ b/src/EnergyPlus/WaterThermalTanks.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterThermalTanks.hh b/src/EnergyPlus/WaterThermalTanks.hh index 50c85acb652..37e30fe610d 100644 --- a/src/EnergyPlus/WaterThermalTanks.hh +++ b/src/EnergyPlus/WaterThermalTanks.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToAirHeatPump.cc b/src/EnergyPlus/WaterToAirHeatPump.cc index 497f5b62b3d..bd43df3d998 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.cc +++ b/src/EnergyPlus/WaterToAirHeatPump.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToAirHeatPump.hh b/src/EnergyPlus/WaterToAirHeatPump.hh index 71d04962618..ce29215036e 100644 --- a/src/EnergyPlus/WaterToAirHeatPump.hh +++ b/src/EnergyPlus/WaterToAirHeatPump.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc index e5222366266..ce4fa6f454b 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.cc +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToAirHeatPumpSimple.hh b/src/EnergyPlus/WaterToAirHeatPumpSimple.hh index 368c542f9fb..c07a180e197 100644 --- a/src/EnergyPlus/WaterToAirHeatPumpSimple.hh +++ b/src/EnergyPlus/WaterToAirHeatPumpSimple.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToWaterHeatPumpEIR.cc b/src/EnergyPlus/WaterToWaterHeatPumpEIR.cc index 604053f5b82..332609bf00c 100644 --- a/src/EnergyPlus/WaterToWaterHeatPumpEIR.cc +++ b/src/EnergyPlus/WaterToWaterHeatPumpEIR.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToWaterHeatPumpEIR.hh b/src/EnergyPlus/WaterToWaterHeatPumpEIR.hh index 724a4bf4dab..46aa9fd7f77 100644 --- a/src/EnergyPlus/WaterToWaterHeatPumpEIR.hh +++ b/src/EnergyPlus/WaterToWaterHeatPumpEIR.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterToWaterHeatPumps.hh b/src/EnergyPlus/WaterToWaterHeatPumps.hh index 56e461ec6cb..c5ed746812f 100644 --- a/src/EnergyPlus/WaterToWaterHeatPumps.hh +++ b/src/EnergyPlus/WaterToWaterHeatPumps.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterUse.cc b/src/EnergyPlus/WaterUse.cc index aff5ff37f6e..d7896b374e0 100644 --- a/src/EnergyPlus/WaterUse.cc +++ b/src/EnergyPlus/WaterUse.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WaterUse.hh b/src/EnergyPlus/WaterUse.hh index 4f85fabb42b..083003c4c64 100644 --- a/src/EnergyPlus/WaterUse.hh +++ b/src/EnergyPlus/WaterUse.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WeatherManager.cc b/src/EnergyPlus/WeatherManager.cc index ea76ecd9e5f..ab796b28982 100644 --- a/src/EnergyPlus/WeatherManager.cc +++ b/src/EnergyPlus/WeatherManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WeatherManager.hh b/src/EnergyPlus/WeatherManager.hh index 7faa8c67eb1..2c1b2896a32 100644 --- a/src/EnergyPlus/WeatherManager.hh +++ b/src/EnergyPlus/WeatherManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindTurbine.cc b/src/EnergyPlus/WindTurbine.cc index ea60d6c0376..f17598d2156 100644 --- a/src/EnergyPlus/WindTurbine.cc +++ b/src/EnergyPlus/WindTurbine.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindTurbine.hh b/src/EnergyPlus/WindTurbine.hh index ff42def36fc..3bb2ff62228 100644 --- a/src/EnergyPlus/WindTurbine.hh +++ b/src/EnergyPlus/WindTurbine.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowAC.cc b/src/EnergyPlus/WindowAC.cc index 58dcc51b31b..2b9d231a3bc 100644 --- a/src/EnergyPlus/WindowAC.cc +++ b/src/EnergyPlus/WindowAC.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowAC.hh b/src/EnergyPlus/WindowAC.hh index 905ba08bb0f..9e510cb4ce1 100644 --- a/src/EnergyPlus/WindowAC.hh +++ b/src/EnergyPlus/WindowAC.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowComplexManager.cc b/src/EnergyPlus/WindowComplexManager.cc index b4fd9d397a6..8246dd67a8e 100644 --- a/src/EnergyPlus/WindowComplexManager.cc +++ b/src/EnergyPlus/WindowComplexManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowComplexManager.hh b/src/EnergyPlus/WindowComplexManager.hh index ced8c193057..29090464fac 100644 --- a/src/EnergyPlus/WindowComplexManager.hh +++ b/src/EnergyPlus/WindowComplexManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowEquivalentLayer.cc b/src/EnergyPlus/WindowEquivalentLayer.cc index c805db1a5bd..035dfe4de64 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.cc +++ b/src/EnergyPlus/WindowEquivalentLayer.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowEquivalentLayer.hh b/src/EnergyPlus/WindowEquivalentLayer.hh index bb7f1b67b24..6381aef4113 100644 --- a/src/EnergyPlus/WindowEquivalentLayer.hh +++ b/src/EnergyPlus/WindowEquivalentLayer.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManager.cc b/src/EnergyPlus/WindowManager.cc index a1c84f030b0..cf224eadafc 100644 --- a/src/EnergyPlus/WindowManager.cc +++ b/src/EnergyPlus/WindowManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManager.hh b/src/EnergyPlus/WindowManager.hh index d99542dd3cc..87be0d1ae30 100644 --- a/src/EnergyPlus/WindowManager.hh +++ b/src/EnergyPlus/WindowManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorData.cc b/src/EnergyPlus/WindowManagerExteriorData.cc index 5daaa5fcffa..58dbfec6f11 100644 --- a/src/EnergyPlus/WindowManagerExteriorData.cc +++ b/src/EnergyPlus/WindowManagerExteriorData.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorData.hh b/src/EnergyPlus/WindowManagerExteriorData.hh index b08e2bab9bd..c4356408bc4 100644 --- a/src/EnergyPlus/WindowManagerExteriorData.hh +++ b/src/EnergyPlus/WindowManagerExteriorData.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorOptical.cc b/src/EnergyPlus/WindowManagerExteriorOptical.cc index 9a1e1818360..fcd6081ff3f 100644 --- a/src/EnergyPlus/WindowManagerExteriorOptical.cc +++ b/src/EnergyPlus/WindowManagerExteriorOptical.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorOptical.hh b/src/EnergyPlus/WindowManagerExteriorOptical.hh index 5cc490bc053..a8aa8caee3e 100644 --- a/src/EnergyPlus/WindowManagerExteriorOptical.hh +++ b/src/EnergyPlus/WindowManagerExteriorOptical.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.cc b/src/EnergyPlus/WindowManagerExteriorThermal.cc index 175454b8cc9..7e1b375d88d 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.cc +++ b/src/EnergyPlus/WindowManagerExteriorThermal.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowManagerExteriorThermal.hh b/src/EnergyPlus/WindowManagerExteriorThermal.hh index 80e17f69dca..9eb481b1ad5 100644 --- a/src/EnergyPlus/WindowManagerExteriorThermal.hh +++ b/src/EnergyPlus/WindowManagerExteriorThermal.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowModel.cc b/src/EnergyPlus/WindowModel.cc index 2f9909172f1..b2df8123729 100644 --- a/src/EnergyPlus/WindowModel.cc +++ b/src/EnergyPlus/WindowModel.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/WindowModel.hh b/src/EnergyPlus/WindowModel.hh index 72c9c28c9db..55565136650 100644 --- a/src/EnergyPlus/WindowModel.hh +++ b/src/EnergyPlus/WindowModel.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc index 6773f0680a8..79136a8cc74 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh b/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh index d72554ac66c..af55a2626e2 100644 --- a/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh +++ b/src/EnergyPlus/ZoneAirLoopEquipmentManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc index bbc1596a165..add31287e26 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh b/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh index 60fc9a828dd..f0705bb2ff4 100644 --- a/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh +++ b/src/EnergyPlus/ZoneContaminantPredictorCorrector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneDehumidifier.cc b/src/EnergyPlus/ZoneDehumidifier.cc index b41fe0c8d9c..4b7f3181d02 100644 --- a/src/EnergyPlus/ZoneDehumidifier.cc +++ b/src/EnergyPlus/ZoneDehumidifier.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneDehumidifier.hh b/src/EnergyPlus/ZoneDehumidifier.hh index 11ce56ef1cd..04333238e69 100644 --- a/src/EnergyPlus/ZoneDehumidifier.hh +++ b/src/EnergyPlus/ZoneDehumidifier.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index 7bea935d5e3..66b2d7c2af2 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneEquipmentManager.hh b/src/EnergyPlus/ZoneEquipmentManager.hh index 2462cfe6a01..0baa618e054 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.hh +++ b/src/EnergyPlus/ZoneEquipmentManager.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZonePlenum.cc b/src/EnergyPlus/ZonePlenum.cc index 3294a75e638..9fd92ff58b4 100644 --- a/src/EnergyPlus/ZonePlenum.cc +++ b/src/EnergyPlus/ZonePlenum.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZonePlenum.hh b/src/EnergyPlus/ZonePlenum.hh index 8e1e897e5d9..3adc76a9e0f 100644 --- a/src/EnergyPlus/ZonePlenum.hh +++ b/src/EnergyPlus/ZonePlenum.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.cc b/src/EnergyPlus/ZoneTempPredictorCorrector.cc index 7ce17b9c811..2cc3412468c 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.cc +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/ZoneTempPredictorCorrector.hh b/src/EnergyPlus/ZoneTempPredictorCorrector.hh index 7b08f2f95c7..2381fd6986e 100644 --- a/src/EnergyPlus/ZoneTempPredictorCorrector.hh +++ b/src/EnergyPlus/ZoneTempPredictorCorrector.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/main.cc b/src/EnergyPlus/main.cc index 69b03532c47..26d9bc85ab1 100644 --- a/src/EnergyPlus/main.cc +++ b/src/EnergyPlus/main.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/public/EnergyPlusAPI.hh b/src/EnergyPlus/public/EnergyPlusAPI.hh index 5caf4baaa0d..afea3246097 100644 --- a/src/EnergyPlus/public/EnergyPlusAPI.hh +++ b/src/EnergyPlus/public/EnergyPlusAPI.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/public/EnergyPlusPgm.hh b/src/EnergyPlus/public/EnergyPlusPgm.hh index 8a6818ef504..cf15ee3c5cd 100644 --- a/src/EnergyPlus/public/EnergyPlusPgm.hh +++ b/src/EnergyPlus/public/EnergyPlusPgm.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/src/EnergyPlus/test_ep_as_library.cc b/src/EnergyPlus/test_ep_as_library.cc index 3dc32e87f0f..92ab905835c 100644 --- a/src/EnergyPlus/test_ep_as_library.cc +++ b/src/EnergyPlus/test_ep_as_library.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AdvancedAFN.unit.cc b/tst/EnergyPlus/unit/AdvancedAFN.unit.cc index 98a89357c07..8a812b1db16 100644 --- a/tst/EnergyPlus/unit/AdvancedAFN.unit.cc +++ b/tst/EnergyPlus/unit/AdvancedAFN.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc b/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc index a6a586497fa..0f5706115d2 100644 --- a/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc +++ b/tst/EnergyPlus/unit/AirLoopHVACDOAS.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc index c2bfcb3f08d..dea5a0d48b6 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuct.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc index 38082c511ab..90add4e6a7e 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctConstantVolumeNoReheat.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index f52bac86347..46b24af27c1 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc index 0dda39d51e1..86f7498cf9b 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctPIUReheat.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc index 1627ae5a89d..fab42a34037 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkBalanceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirflowNetworkSimulationControl.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkSimulationControl.unit.cc index e0b95f7cdee..6ae3e51f724 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkSimulationControl.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkSimulationControl.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/AirflowNetworkSolver.unit.cc b/tst/EnergyPlus/unit/AirflowNetworkSolver.unit.cc index 1c024f6f27b..a0231d42884 100644 --- a/tst/EnergyPlus/unit/AirflowNetworkSolver.unit.cc +++ b/tst/EnergyPlus/unit/AirflowNetworkSolver.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc index 9f8ff1cc2b5..9ee8f933369 100644 --- a/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/BaseboardRadiator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc index 50e646eb3c6..fff88ec1cd7 100644 --- a/tst/EnergyPlus/unit/BoilerHotWater.unit.cc +++ b/tst/EnergyPlus/unit/BoilerHotWater.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BoilerSteam.unit.cc b/tst/EnergyPlus/unit/BoilerSteam.unit.cc index 124b39402e5..9cc73d5122b 100644 --- a/tst/EnergyPlus/unit/BoilerSteam.unit.cc +++ b/tst/EnergyPlus/unit/BoilerSteam.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BranchInputManager.unit.cc b/tst/EnergyPlus/unit/BranchInputManager.unit.cc index b2525c88259..8dec6b51166 100644 --- a/tst/EnergyPlus/unit/BranchInputManager.unit.cc +++ b/tst/EnergyPlus/unit/BranchInputManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc b/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc index e2fe0acce28..4336d3594bd 100644 --- a/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc +++ b/tst/EnergyPlus/unit/BranchNodeConnections.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc b/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc index 90c6b9c8f6e..43e19280e0b 100644 --- a/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc +++ b/tst/EnergyPlus/unit/ChilledCeilingPanelSimple.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc index 2b7c5c5d75e..9a168ac029f 100644 --- a/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc b/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc index 49e94c948a4..867c3346883 100644 --- a/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc +++ b/tst/EnergyPlus/unit/ChillerConstantCOP.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerElectric.unit.cc b/tst/EnergyPlus/unit/ChillerElectric.unit.cc index 39b78d0f223..b2a94014e43 100644 --- a/tst/EnergyPlus/unit/ChillerElectric.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectric.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc index ba68c6f3ce7..8e710d6bb0c 100644 --- a/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc +++ b/tst/EnergyPlus/unit/ChillerElectricEIR.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc index 18263f36d44..3e9b5d378e4 100644 --- a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc index 993ea01fd8b..2400ec19a63 100644 --- a/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerGasAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc index 52dc950fc14..06b9f0a8f82 100644 --- a/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerIndirectAbsorption.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc b/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc index 0332cb36664..00f0f38b444 100644 --- a/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc +++ b/tst/EnergyPlus/unit/CondenserLoopTowers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc b/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc index 5eaa1b92ba2..9e6e880c4f4 100644 --- a/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc +++ b/tst/EnergyPlus/unit/ConstructionInternalSource.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc b/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc index 5b782c0ff8d..214f55b01ed 100644 --- a/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc +++ b/tst/EnergyPlus/unit/ConvectionCoefficients.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CrossVentMgr.unit.cc b/tst/EnergyPlus/unit/CrossVentMgr.unit.cc index 09502c4c4f9..c4bfeac8ffb 100644 --- a/tst/EnergyPlus/unit/CrossVentMgr.unit.cc +++ b/tst/EnergyPlus/unit/CrossVentMgr.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/CurveManager.unit.cc b/tst/EnergyPlus/unit/CurveManager.unit.cc index 1068f6185f9..cb19517b9a8 100644 --- a/tst/EnergyPlus/unit/CurveManager.unit.cc +++ b/tst/EnergyPlus/unit/CurveManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DElightManager.unit.cc b/tst/EnergyPlus/unit/DElightManager.unit.cc index 7ad42934e4e..0c26858b637 100644 --- a/tst/EnergyPlus/unit/DElightManager.unit.cc +++ b/tst/EnergyPlus/unit/DElightManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc b/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc index da20b02fd02..aaf026238a5 100644 --- a/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc +++ b/tst/EnergyPlus/unit/DOASEffectOnZoneSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DXCoils.unit.cc b/tst/EnergyPlus/unit/DXCoils.unit.cc index 1d4f3248247..c9bd1f887d8 100644 --- a/tst/EnergyPlus/unit/DXCoils.unit.cc +++ b/tst/EnergyPlus/unit/DXCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataEnvironment.unit.cc b/tst/EnergyPlus/unit/DataEnvironment.unit.cc index dedd3da98bb..50ce708a0fc 100644 --- a/tst/EnergyPlus/unit/DataEnvironment.unit.cc +++ b/tst/EnergyPlus/unit/DataEnvironment.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc b/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc index 3b5afcf3420..6cf7d2cc55e 100644 --- a/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc +++ b/tst/EnergyPlus/unit/DataGlobalConstants.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataHeatBalance.unit.cc b/tst/EnergyPlus/unit/DataHeatBalance.unit.cc index 3f41fe01257..1ac2b3ab9da 100644 --- a/tst/EnergyPlus/unit/DataHeatBalance.unit.cc +++ b/tst/EnergyPlus/unit/DataHeatBalance.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataPlant.unit.cc b/tst/EnergyPlus/unit/DataPlant.unit.cc index be9963ab96c..11aeee519b7 100644 --- a/tst/EnergyPlus/unit/DataPlant.unit.cc +++ b/tst/EnergyPlus/unit/DataPlant.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataSizing.unit.cc b/tst/EnergyPlus/unit/DataSizing.unit.cc index ce565c9bf0f..8db6504977d 100644 --- a/tst/EnergyPlus/unit/DataSizing.unit.cc +++ b/tst/EnergyPlus/unit/DataSizing.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataSurfaces.unit.cc b/tst/EnergyPlus/unit/DataSurfaces.unit.cc index 26a709ee169..3f761bf00dc 100644 --- a/tst/EnergyPlus/unit/DataSurfaces.unit.cc +++ b/tst/EnergyPlus/unit/DataSurfaces.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc b/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc index 7c335398f56..ae4b0d8e4e8 100644 --- a/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc +++ b/tst/EnergyPlus/unit/DataZoneEquipment.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Datasets.unit.cc b/tst/EnergyPlus/unit/Datasets.unit.cc index 8608c63ab10..373387830fb 100644 --- a/tst/EnergyPlus/unit/Datasets.unit.cc +++ b/tst/EnergyPlus/unit/Datasets.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DaylightingManager.unit.cc b/tst/EnergyPlus/unit/DaylightingManager.unit.cc index 44411964869..6701b683a5f 100644 --- a/tst/EnergyPlus/unit/DaylightingManager.unit.cc +++ b/tst/EnergyPlus/unit/DaylightingManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DemandResponse.unit.cc b/tst/EnergyPlus/unit/DemandResponse.unit.cc index 4f217735412..04527e4ad7e 100644 --- a/tst/EnergyPlus/unit/DemandResponse.unit.cc +++ b/tst/EnergyPlus/unit/DemandResponse.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc b/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc index 71d660301ea..df281d10d55 100644 --- a/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc +++ b/tst/EnergyPlus/unit/DesiccantDehumidifiers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc b/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc index 316d348ef56..2b4b1c8fac1 100644 --- a/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc +++ b/tst/EnergyPlus/unit/DisplacementVentMgr.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/DualDuct.unit.cc b/tst/EnergyPlus/unit/DualDuct.unit.cc index ee0100a34ca..7e975b112db 100644 --- a/tst/EnergyPlus/unit/DualDuct.unit.cc +++ b/tst/EnergyPlus/unit/DualDuct.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EMSManager.unit.cc b/tst/EnergyPlus/unit/EMSManager.unit.cc index c5be289ecff..681ec507355 100644 --- a/tst/EnergyPlus/unit/EMSManager.unit.cc +++ b/tst/EnergyPlus/unit/EMSManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EarthTube.unit.cc b/tst/EnergyPlus/unit/EarthTube.unit.cc index 9ec09695b6d..e1b0124fc93 100644 --- a/tst/EnergyPlus/unit/EarthTube.unit.cc +++ b/tst/EnergyPlus/unit/EarthTube.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc b/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc index be7b9b73882..c77d6e11edb 100644 --- a/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc +++ b/tst/EnergyPlus/unit/EconomicLifeCycleCost.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EconomicTariff.unit.cc b/tst/EnergyPlus/unit/EconomicTariff.unit.cc index 0af95cadb0e..0088a51f7e7 100644 --- a/tst/EnergyPlus/unit/EconomicTariff.unit.cc +++ b/tst/EnergyPlus/unit/EconomicTariff.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc index d77a12a9716..521fc51c7f9 100644 --- a/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/ElectricBaseboardRadiator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc index b6dc75e8f8d..ba862b9693a 100644 --- a/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc +++ b/tst/EnergyPlus/unit/ElectricPowerServiceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc b/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc index 0a1196088e5..076674af780 100644 --- a/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc +++ b/tst/EnergyPlus/unit/EvaporativeCoolers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc b/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc index 08c042ce9b0..1860604b566 100644 --- a/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc +++ b/tst/EnergyPlus/unit/ExteriorEnergyUse.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FanCoilUnits.unit.cc b/tst/EnergyPlus/unit/FanCoilUnits.unit.cc index 653345f2a94..fdbff98f609 100644 --- a/tst/EnergyPlus/unit/FanCoilUnits.unit.cc +++ b/tst/EnergyPlus/unit/FanCoilUnits.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fans.unit.cc b/tst/EnergyPlus/unit/Fans.unit.cc index d6ebde66206..4397eab6495 100644 --- a/tst/EnergyPlus/unit/Fans.unit.cc +++ b/tst/EnergyPlus/unit/Fans.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FaultsManager.unit.cc b/tst/EnergyPlus/unit/FaultsManager.unit.cc index 3741ada5cfe..7d33e5547cf 100644 --- a/tst/EnergyPlus/unit/FaultsManager.unit.cc +++ b/tst/EnergyPlus/unit/FaultsManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc b/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc index 05bf950e1d9..45ad9307c46 100644 --- a/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc +++ b/tst/EnergyPlus/unit/FiniteDifferenceGroundTemperatureModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index dd93d95c71c..1375b8669f7 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh index 30d6eecaa03..3ae99a36f91 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh b/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh index 0eb670704ba..db7e97d8fe8 100644 --- a/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/IdfParserFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh b/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh index ed500aeb6ed..c33db029c81 100644 --- a/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/InputProcessorFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh b/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh index 5304c6c91da..7512c8099a1 100644 --- a/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh +++ b/tst/EnergyPlus/unit/Fixtures/SQLiteFixture.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FluidCoolers.unit.cc b/tst/EnergyPlus/unit/FluidCoolers.unit.cc index ab718daa07c..f4b31a09701 100644 --- a/tst/EnergyPlus/unit/FluidCoolers.unit.cc +++ b/tst/EnergyPlus/unit/FluidCoolers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FluidProperties.unit.cc b/tst/EnergyPlus/unit/FluidProperties.unit.cc index 7df40ae29db..c432d549ec6 100644 --- a/tst/EnergyPlus/unit/FluidProperties.unit.cc +++ b/tst/EnergyPlus/unit/FluidProperties.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc b/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc index c1b65d3d843..1f974548b3d 100644 --- a/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc +++ b/tst/EnergyPlus/unit/FuelCellElectricGenerator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Furnaces.unit.cc b/tst/EnergyPlus/unit/Furnaces.unit.cc index 86088b3245f..3d1e1e6b1dd 100644 --- a/tst/EnergyPlus/unit/Furnaces.unit.cc +++ b/tst/EnergyPlus/unit/Furnaces.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/General.unit.cc b/tst/EnergyPlus/unit/General.unit.cc index e26b4716efd..1c230b63655 100644 --- a/tst/EnergyPlus/unit/General.unit.cc +++ b/tst/EnergyPlus/unit/General.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/GeneralRoutines.unit.cc b/tst/EnergyPlus/unit/GeneralRoutines.unit.cc index b5cfc93bc31..39ed9190fcc 100644 --- a/tst/EnergyPlus/unit/GeneralRoutines.unit.cc +++ b/tst/EnergyPlus/unit/GeneralRoutines.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc b/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc index 7f5f2dfe27e..9afb43892ac 100644 --- a/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc +++ b/tst/EnergyPlus/unit/GroundHeatExchangers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACControllers.unit.cc b/tst/EnergyPlus/unit/HVACControllers.unit.cc index 2b1095a79a4..d68372d49e6 100644 --- a/tst/EnergyPlus/unit/HVACControllers.unit.cc +++ b/tst/EnergyPlus/unit/HVACControllers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACDXSystem.unit.cc b/tst/EnergyPlus/unit/HVACDXSystem.unit.cc index fad9a6383eb..626edd79507 100644 --- a/tst/EnergyPlus/unit/HVACDXSystem.unit.cc +++ b/tst/EnergyPlus/unit/HVACDXSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACFan.unit.cc b/tst/EnergyPlus/unit/HVACFan.unit.cc index 10d9d6b5ab8..93dc349811d 100644 --- a/tst/EnergyPlus/unit/HVACFan.unit.cc +++ b/tst/EnergyPlus/unit/HVACFan.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc b/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc index f2720777434..ec0f30cc32e 100644 --- a/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc +++ b/tst/EnergyPlus/unit/HVACFourPipeBeam.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc b/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc index 4cd7fe62374..5939222b4a2 100644 --- a/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc +++ b/tst/EnergyPlus/unit/HVACHXAssistedCoolingCoil.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc b/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc index c1a83dffc02..9710a83daab 100644 --- a/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACManager.unit.cc b/tst/EnergyPlus/unit/HVACManager.unit.cc index 0fe4d5a3a6a..cac4be7686a 100644 --- a/tst/EnergyPlus/unit/HVACManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc b/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc index 6ecc4ec44c6..e63241c21ee 100644 --- a/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/HVACMultiSpeedHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc b/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc index 613526a6fda..263f7b9bc70 100644 --- a/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc +++ b/tst/EnergyPlus/unit/HVACSizingSimulationManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc b/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc index f18363ce603..65160a90334 100644 --- a/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc +++ b/tst/EnergyPlus/unit/HVACStandaloneERV.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc b/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc index f9fae39defe..7748a2e6ea8 100644 --- a/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc +++ b/tst/EnergyPlus/unit/HVACUnitaryBypassVAV.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc b/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc index d783ece4359..5ce46cae321 100644 --- a/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/HVACUnitarySystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc index f61665042f9..ee8ca292084 100644 --- a/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc +++ b/tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc b/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc index 6173a8b7637..13c2c73a674 100644 --- a/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc +++ b/tst/EnergyPlus/unit/HWBaseboardRadiator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc index 51a37a2dc54..f48452207d1 100644 --- a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc index 35e1772a919..bf576ef50d6 100644 --- a/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceAirManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc b/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc index 141dede5875..65b0322ee47 100644 --- a/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceIntRadExchange.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc index 24fc3ec810e..b7865852635 100644 --- a/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceKivaManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc index b75b97297c1..3ed99566cbb 100644 --- a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc b/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc index bfa51681aba..2c1261723ef 100644 --- a/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceMovableInsulation.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc index 26397be2ad7..bfefaf24b48 100644 --- a/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceSurfaceManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc b/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc index ba598a9f601..41a9c56cd43 100644 --- a/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc +++ b/tst/EnergyPlus/unit/HeatPumpWaterToWaterSimple.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatRecovery.unit.cc b/tst/EnergyPlus/unit/HeatRecovery.unit.cc index 158bc55040c..517514a6b18 100644 --- a/tst/EnergyPlus/unit/HeatRecovery.unit.cc +++ b/tst/EnergyPlus/unit/HeatRecovery.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HeatingCoils.unit.cc b/tst/EnergyPlus/unit/HeatingCoils.unit.cc index 1fff27e586a..4fc642d0630 100644 --- a/tst/EnergyPlus/unit/HeatingCoils.unit.cc +++ b/tst/EnergyPlus/unit/HeatingCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc b/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc index 08666f9c537..2e395b24c56 100644 --- a/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc +++ b/tst/EnergyPlus/unit/HighTempRadiantSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Humidifiers.unit.cc b/tst/EnergyPlus/unit/Humidifiers.unit.cc index 7f1fd7149d1..227e9d71b87 100644 --- a/tst/EnergyPlus/unit/Humidifiers.unit.cc +++ b/tst/EnergyPlus/unit/Humidifiers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/HybridModel.unit.cc b/tst/EnergyPlus/unit/HybridModel.unit.cc index 421e9913d30..159abe32619 100644 --- a/tst/EnergyPlus/unit/HybridModel.unit.cc +++ b/tst/EnergyPlus/unit/HybridModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ICSCollector.unit.cc b/tst/EnergyPlus/unit/ICSCollector.unit.cc index 2a38d379031..285e7485cbd 100644 --- a/tst/EnergyPlus/unit/ICSCollector.unit.cc +++ b/tst/EnergyPlus/unit/ICSCollector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/IceThermalStorage.unit.cc b/tst/EnergyPlus/unit/IceThermalStorage.unit.cc index 223e8d554ec..1f24b409b25 100644 --- a/tst/EnergyPlus/unit/IceThermalStorage.unit.cc +++ b/tst/EnergyPlus/unit/IceThermalStorage.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/IdfParser.unit.cc b/tst/EnergyPlus/unit/IdfParser.unit.cc index fc65b9bc286..a8f9417ad96 100644 --- a/tst/EnergyPlus/unit/IdfParser.unit.cc +++ b/tst/EnergyPlus/unit/IdfParser.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/InputProcessor.unit.cc b/tst/EnergyPlus/unit/InputProcessor.unit.cc index 6c681d041aa..9cabfa602e1 100644 --- a/tst/EnergyPlus/unit/InputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/InputProcessor.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc b/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc index efb596d620d..9181da49903 100644 --- a/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/IntegratedHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/InternalHeatGains.unit.cc b/tst/EnergyPlus/unit/InternalHeatGains.unit.cc index 7ce44a61149..f95a9ecde27 100644 --- a/tst/EnergyPlus/unit/InternalHeatGains.unit.cc +++ b/tst/EnergyPlus/unit/InternalHeatGains.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/JsonOutput.unit.cc b/tst/EnergyPlus/unit/JsonOutput.unit.cc index a1f090d7731..8068dd2bda5 100644 --- a/tst/EnergyPlus/unit/JsonOutput.unit.cc +++ b/tst/EnergyPlus/unit/JsonOutput.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc b/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc index aabc9f0f628..20fca86f222 100644 --- a/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc +++ b/tst/EnergyPlus/unit/KusudaAchenbachGroundTemperatureModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc b/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc index 2820e42e64d..d6e333a17c1 100644 --- a/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc +++ b/tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MixedAir.unit.cc b/tst/EnergyPlus/unit/MixedAir.unit.cc index ac0a32d3aa1..2249f238511 100644 --- a/tst/EnergyPlus/unit/MixedAir.unit.cc +++ b/tst/EnergyPlus/unit/MixedAir.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MixerComponent.unit.cc b/tst/EnergyPlus/unit/MixerComponent.unit.cc index 27c21d9f2d1..232a31b31cf 100644 --- a/tst/EnergyPlus/unit/MixerComponent.unit.cc +++ b/tst/EnergyPlus/unit/MixerComponent.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc b/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc index b56bc4c325a..c1254fbd15b 100644 --- a/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc +++ b/tst/EnergyPlus/unit/MoistureBalanceEMPD.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/NodeInputManager.unit.cc b/tst/EnergyPlus/unit/NodeInputManager.unit.cc index 244bde520e6..fe6b4a176d1 100644 --- a/tst/EnergyPlus/unit/NodeInputManager.unit.cc +++ b/tst/EnergyPlus/unit/NodeInputManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc b/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc index 32ed553bf42..92589c08780 100644 --- a/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc +++ b/tst/EnergyPlus/unit/OASystemHWPreheatCoil.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc b/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc index 233cbe5a230..26c9726ad61 100644 --- a/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc +++ b/tst/EnergyPlus/unit/OutAirNodeManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc index 0b038465c1a..2084dbb657e 100644 --- a/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc +++ b/tst/EnergyPlus/unit/OutdoorAirUnit.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputProcessor.unit.cc b/tst/EnergyPlus/unit/OutputProcessor.unit.cc index 58491dc7f56..3c4fdc153cb 100644 --- a/tst/EnergyPlus/unit/OutputProcessor.unit.cc +++ b/tst/EnergyPlus/unit/OutputProcessor.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputReportData.unit.cc b/tst/EnergyPlus/unit/OutputReportData.unit.cc index 48f7bf05dbd..874b2cb22e7 100644 --- a/tst/EnergyPlus/unit/OutputReportData.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportData.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc index 918a741fb6a..4bdabfb3ac7 100644 --- a/tst/EnergyPlus/unit/OutputReportTabular.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabular.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc b/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc index 9a52e528e96..5581073a0f3 100644 --- a/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc +++ b/tst/EnergyPlus/unit/OutputReportTabularAnnual.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/OutputReports.unit.cc b/tst/EnergyPlus/unit/OutputReports.unit.cc index 7ef9e0744c3..72cc9e5c860 100644 --- a/tst/EnergyPlus/unit/OutputReports.unit.cc +++ b/tst/EnergyPlus/unit/OutputReports.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PVWatts.unit.cc b/tst/EnergyPlus/unit/PVWatts.unit.cc index 9890d61efd5..8c66f4fac03 100644 --- a/tst/EnergyPlus/unit/PVWatts.unit.cc +++ b/tst/EnergyPlus/unit/PVWatts.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc b/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc index ba527f270ed..213607034e5 100644 --- a/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/PackagedTerminalHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc b/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc index 4e82405e397..493df663a4b 100644 --- a/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc +++ b/tst/EnergyPlus/unit/PhaseChangeModeling/HysteresisModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Photovoltaics.unit.cc b/tst/EnergyPlus/unit/Photovoltaics.unit.cc index b3184853538..d2dab13aa1b 100644 --- a/tst/EnergyPlus/unit/Photovoltaics.unit.cc +++ b/tst/EnergyPlus/unit/Photovoltaics.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PierceSurface.unit.cc b/tst/EnergyPlus/unit/PierceSurface.unit.cc index b86cbb1c310..adf2e9ec288 100644 --- a/tst/EnergyPlus/unit/PierceSurface.unit.cc +++ b/tst/EnergyPlus/unit/PierceSurface.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Pipes.unit.cc b/tst/EnergyPlus/unit/Pipes.unit.cc index 3080a8a02ec..0f525b1e79a 100644 --- a/tst/EnergyPlus/unit/Pipes.unit.cc +++ b/tst/EnergyPlus/unit/Pipes.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Plant/Branch.unit.cc b/tst/EnergyPlus/unit/Plant/Branch.unit.cc index d31de9872cc..985689e831c 100644 --- a/tst/EnergyPlus/unit/Plant/Branch.unit.cc +++ b/tst/EnergyPlus/unit/Plant/Branch.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc b/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc index 560c0a73f9b..d7e8cc701ac 100644 --- a/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc +++ b/tst/EnergyPlus/unit/Plant/Subcomponent.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc b/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc index 3263538bc9c..cd1ec2a0686 100644 --- a/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc +++ b/tst/EnergyPlus/unit/PlantCentralGSHP.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantChillers.unit.cc b/tst/EnergyPlus/unit/PlantChillers.unit.cc index a852e43ec16..3fc2620a51c 100644 --- a/tst/EnergyPlus/unit/PlantChillers.unit.cc +++ b/tst/EnergyPlus/unit/PlantChillers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc b/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc index a19d478f8e1..2b98816bdaa 100644 --- a/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc +++ b/tst/EnergyPlus/unit/PlantComponentTemperatureSources.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc b/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc index 029b13adefb..2649cd6921b 100644 --- a/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc +++ b/tst/EnergyPlus/unit/PlantCondLoopOperation.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc index cfbea6875ef..6619289a818 100644 --- a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc +++ b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantManager.unit.cc b/tst/EnergyPlus/unit/PlantManager.unit.cc index ab2354a2457..3262906f210 100644 --- a/tst/EnergyPlus/unit/PlantManager.unit.cc +++ b/tst/EnergyPlus/unit/PlantManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc b/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc index 04c653e0f1a..007404e1d12 100644 --- a/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc +++ b/tst/EnergyPlus/unit/PlantPipingSystemsManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PlantUtilities.unit.cc b/tst/EnergyPlus/unit/PlantUtilities.unit.cc index c03d85a7c4e..9a07771cff4 100644 --- a/tst/EnergyPlus/unit/PlantUtilities.unit.cc +++ b/tst/EnergyPlus/unit/PlantUtilities.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc b/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc index 0b0e0ba9553..d10c6960ac9 100644 --- a/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc +++ b/tst/EnergyPlus/unit/PoweredInductionUnits.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Psychrometrics.unit.cc b/tst/EnergyPlus/unit/Psychrometrics.unit.cc index d520daf2494..345531bf817 100644 --- a/tst/EnergyPlus/unit/Psychrometrics.unit.cc +++ b/tst/EnergyPlus/unit/Psychrometrics.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Pumps.unit.cc b/tst/EnergyPlus/unit/Pumps.unit.cc index 0e5014838c3..05787a7f2d9 100644 --- a/tst/EnergyPlus/unit/Pumps.unit.cc +++ b/tst/EnergyPlus/unit/Pumps.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc b/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc index 181f582ef23..f92811039fa 100644 --- a/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc +++ b/tst/EnergyPlus/unit/PurchasedAirManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc b/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc index 333a1110df1..973c488c79a 100644 --- a/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc +++ b/tst/EnergyPlus/unit/ReportCoilSelection.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ReportSizingManager.unit.cc b/tst/EnergyPlus/unit/ReportSizingManager.unit.cc index 2c7ef6c98a9..6629dbc4885 100644 --- a/tst/EnergyPlus/unit/ReportSizingManager.unit.cc +++ b/tst/EnergyPlus/unit/ReportSizingManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc b/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc index 8782fe1ab44..0c2493532e5 100644 --- a/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc +++ b/tst/EnergyPlus/unit/RoomAirModelUserTempPattern.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc b/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc index bf908aa41fd..f38643b34c8 100644 --- a/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc +++ b/tst/EnergyPlus/unit/RoomAirflowNetwork.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RunPeriod.unit.cc b/tst/EnergyPlus/unit/RunPeriod.unit.cc index c312a8d3627..4c3d71e26cd 100644 --- a/tst/EnergyPlus/unit/RunPeriod.unit.cc +++ b/tst/EnergyPlus/unit/RunPeriod.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc b/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc index caaeb3a8e38..6515267f849 100644 --- a/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc +++ b/tst/EnergyPlus/unit/RuntimeLanguageProcessor.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SQLite.unit.cc b/tst/EnergyPlus/unit/SQLite.unit.cc index 38359a98f0e..6be1cefc321 100644 --- a/tst/EnergyPlus/unit/SQLite.unit.cc +++ b/tst/EnergyPlus/unit/SQLite.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SZVAVModel.unit.cc b/tst/EnergyPlus/unit/SZVAVModel.unit.cc index 02477ced0b6..3d15ae237e6 100644 --- a/tst/EnergyPlus/unit/SZVAVModel.unit.cc +++ b/tst/EnergyPlus/unit/SZVAVModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ScheduleManager.unit.cc b/tst/EnergyPlus/unit/ScheduleManager.unit.cc index a29236d3d36..578202f8671 100644 --- a/tst/EnergyPlus/unit/ScheduleManager.unit.cc +++ b/tst/EnergyPlus/unit/ScheduleManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc b/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc index 768e5d1712f..65e594cf77f 100644 --- a/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc +++ b/tst/EnergyPlus/unit/SecondaryDXCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SetPointManager.unit.cc b/tst/EnergyPlus/unit/SetPointManager.unit.cc index 6a44bc3b8f0..eaef3690018 100644 --- a/tst/EnergyPlus/unit/SetPointManager.unit.cc +++ b/tst/EnergyPlus/unit/SetPointManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SimAirServingZones.unit.cc b/tst/EnergyPlus/unit/SimAirServingZones.unit.cc index 906165db37b..4eb9f89d7ed 100644 --- a/tst/EnergyPlus/unit/SimAirServingZones.unit.cc +++ b/tst/EnergyPlus/unit/SimAirServingZones.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SimulationManager.unit.cc b/tst/EnergyPlus/unit/SimulationManager.unit.cc index f1f72d85287..4283a8dbaf6 100644 --- a/tst/EnergyPlus/unit/SimulationManager.unit.cc +++ b/tst/EnergyPlus/unit/SimulationManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SingleDuct.unit.cc b/tst/EnergyPlus/unit/SingleDuct.unit.cc index 71d4ea87429..9ca0617b8a8 100644 --- a/tst/EnergyPlus/unit/SingleDuct.unit.cc +++ b/tst/EnergyPlus/unit/SingleDuct.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc index 89e7389205c..86af4e28fe5 100644 --- a/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteBuildingSurfaceGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc index 981eca1d651..afebd702ca7 100644 --- a/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteDeepGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc index ff48a2b4e52..2967987c1d2 100644 --- a/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteFCFactorMethodGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc b/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc index f74de581c3a..ea140e9c1b7 100644 --- a/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc +++ b/tst/EnergyPlus/unit/SiteGroundDomain.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc b/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc index 62aac3a4fd8..fcaa5b30549 100644 --- a/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc +++ b/tst/EnergyPlus/unit/SiteShallowGroundTemperatures.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc b/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc index bfb8a03f175..6fa2079f033 100644 --- a/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc +++ b/tst/EnergyPlus/unit/SizeWaterHeatingCoil.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc b/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc index bbfc7cfc868..265a5ed46ed 100644 --- a/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc +++ b/tst/EnergyPlus/unit/SizingAnalysisObjects.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SizingManager.unit.cc b/tst/EnergyPlus/unit/SizingManager.unit.cc index 5c16506303a..378f3083f02 100644 --- a/tst/EnergyPlus/unit/SizingManager.unit.cc +++ b/tst/EnergyPlus/unit/SizingManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SolarShading.unit.cc b/tst/EnergyPlus/unit/SolarShading.unit.cc index f84eb90d462..5a3bc02bbf4 100644 --- a/tst/EnergyPlus/unit/SolarShading.unit.cc +++ b/tst/EnergyPlus/unit/SolarShading.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc b/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc index 6fef705db93..66e0096f64f 100644 --- a/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc +++ b/tst/EnergyPlus/unit/SortAndStringUtilities.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/StandardRatings.unit.cc b/tst/EnergyPlus/unit/StandardRatings.unit.cc index 7908af9da5f..d669cc583ce 100644 --- a/tst/EnergyPlus/unit/StandardRatings.unit.cc +++ b/tst/EnergyPlus/unit/StandardRatings.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc b/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc index 7740f94ac04..ccc688cf197 100644 --- a/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc +++ b/tst/EnergyPlus/unit/SurfaceGeometry.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SurfaceOctree.unit.cc b/tst/EnergyPlus/unit/SurfaceOctree.unit.cc index eb1af40d9c6..671813f4d58 100644 --- a/tst/EnergyPlus/unit/SurfaceOctree.unit.cc +++ b/tst/EnergyPlus/unit/SurfaceOctree.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SwimmingPool.unit.cc b/tst/EnergyPlus/unit/SwimmingPool.unit.cc index 62f49554054..1abcb629430 100644 --- a/tst/EnergyPlus/unit/SwimmingPool.unit.cc +++ b/tst/EnergyPlus/unit/SwimmingPool.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc b/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc index 5bbde88ae08..62ed06b89f5 100644 --- a/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc +++ b/tst/EnergyPlus/unit/SystemAvailabilityManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc b/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc index 6e4c07b61a7..7e73cc99b7e 100644 --- a/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc +++ b/tst/EnergyPlus/unit/TestHelpers/IdfParser.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh b/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh index cb5ff188d2f..607fa5c05c6 100644 --- a/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh +++ b/tst/EnergyPlus/unit/TestHelpers/IdfParser.hh @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ThermalComfort.unit.cc b/tst/EnergyPlus/unit/ThermalComfort.unit.cc index 32e5caeb0b5..77c55cfcec7 100644 --- a/tst/EnergyPlus/unit/ThermalComfort.unit.cc +++ b/tst/EnergyPlus/unit/ThermalComfort.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/TranspiredCollector.unit.cc b/tst/EnergyPlus/unit/TranspiredCollector.unit.cc index 33b2a90541f..9b040b6231d 100644 --- a/tst/EnergyPlus/unit/TranspiredCollector.unit.cc +++ b/tst/EnergyPlus/unit/TranspiredCollector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UnitHeater.unit.cc b/tst/EnergyPlus/unit/UnitHeater.unit.cc index 027a39d0db8..9359874cd79 100644 --- a/tst/EnergyPlus/unit/UnitHeater.unit.cc +++ b/tst/EnergyPlus/unit/UnitHeater.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UnitVentilator.unit.cc b/tst/EnergyPlus/unit/UnitVentilator.unit.cc index 289c7ea48e3..0edd51aeca1 100644 --- a/tst/EnergyPlus/unit/UnitVentilator.unit.cc +++ b/tst/EnergyPlus/unit/UnitVentilator.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc index f405c9d0fbd..e744e764884 100644 --- a/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc +++ b/tst/EnergyPlus/unit/UnitaryHybridAirConditioner.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UnitarySystem.unit.cc b/tst/EnergyPlus/unit/UnitarySystem.unit.cc index efb529c7b0e..7f7f2aaeab3 100644 --- a/tst/EnergyPlus/unit/UnitarySystem.unit.cc +++ b/tst/EnergyPlus/unit/UnitarySystem.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/UtilityRoutines.unit.cc b/tst/EnergyPlus/unit/UtilityRoutines.unit.cc index 16daf3a09a3..a4d4f1702a6 100644 --- a/tst/EnergyPlus/unit/UtilityRoutines.unit.cc +++ b/tst/EnergyPlus/unit/UtilityRoutines.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc b/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc index 3910ff9e768..00a820790fa 100644 --- a/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc +++ b/tst/EnergyPlus/unit/VAVDefMinMaxFlow.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc b/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc index e102a3565fa..122db1aaa3d 100644 --- a/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc +++ b/tst/EnergyPlus/unit/VariableSpeedCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Vector.unit.cc b/tst/EnergyPlus/unit/Vector.unit.cc index 0466e0483aa..f9d5394f563 100644 --- a/tst/EnergyPlus/unit/Vector.unit.cc +++ b/tst/EnergyPlus/unit/Vector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/Vectors.unit.cc b/tst/EnergyPlus/unit/Vectors.unit.cc index d0998179899..84e8f93ec69 100644 --- a/tst/EnergyPlus/unit/Vectors.unit.cc +++ b/tst/EnergyPlus/unit/Vectors.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/VentilatedSlab.unit.cc b/tst/EnergyPlus/unit/VentilatedSlab.unit.cc index 85dd00507b4..f6ca45ff56f 100644 --- a/tst/EnergyPlus/unit/VentilatedSlab.unit.cc +++ b/tst/EnergyPlus/unit/VentilatedSlab.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterCoils.unit.cc b/tst/EnergyPlus/unit/WaterCoils.unit.cc index 410d8554803..3d6d4014c86 100644 --- a/tst/EnergyPlus/unit/WaterCoils.unit.cc +++ b/tst/EnergyPlus/unit/WaterCoils.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc b/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc index 878a74b0efa..e05d2c3154b 100644 --- a/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc +++ b/tst/EnergyPlus/unit/WaterThermalTanks.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc b/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc index 1a705f33ae4..e2ad319fae4 100644 --- a/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc +++ b/tst/EnergyPlus/unit/WaterToAirHeatPump.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc b/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc index 9dee6d70709..0cbd99715dc 100644 --- a/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc +++ b/tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WaterToWaterHeatPumpEIR.unit.cc b/tst/EnergyPlus/unit/WaterToWaterHeatPumpEIR.unit.cc index 1f3d281d997..7125b8876eb 100644 --- a/tst/EnergyPlus/unit/WaterToWaterHeatPumpEIR.unit.cc +++ b/tst/EnergyPlus/unit/WaterToWaterHeatPumpEIR.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WeatherManager.unit.cc b/tst/EnergyPlus/unit/WeatherManager.unit.cc index c19033ec266..556f8df5290 100644 --- a/tst/EnergyPlus/unit/WeatherManager.unit.cc +++ b/tst/EnergyPlus/unit/WeatherManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WinCalcEngine.unit.cc b/tst/EnergyPlus/unit/WinCalcEngine.unit.cc index adbb5322598..c4a8cd0fe9c 100644 --- a/tst/EnergyPlus/unit/WinCalcEngine.unit.cc +++ b/tst/EnergyPlus/unit/WinCalcEngine.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowAC.unit.cc b/tst/EnergyPlus/unit/WindowAC.unit.cc index 4e92566112c..d142ede540e 100644 --- a/tst/EnergyPlus/unit/WindowAC.unit.cc +++ b/tst/EnergyPlus/unit/WindowAC.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc b/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc index 1e475f47bb3..bed20bb34e3 100644 --- a/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc +++ b/tst/EnergyPlus/unit/WindowEquivalentLayer.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc b/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc index a2ce9401fc8..b08c38ce07e 100644 --- a/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc +++ b/tst/EnergyPlus/unit/WindowLayerEffectiveMultipliers.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/WindowManager.unit.cc b/tst/EnergyPlus/unit/WindowManager.unit.cc index 71de2282dba..67505f53ba8 100644 --- a/tst/EnergyPlus/unit/WindowManager.unit.cc +++ b/tst/EnergyPlus/unit/WindowManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc b/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc index 960856affb3..0f7127e70d2 100644 --- a/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc +++ b/tst/EnergyPlus/unit/XingGroundTemperatureModel.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc b/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc index ff8f126c14c..d8192aa26b1 100644 --- a/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc +++ b/tst/EnergyPlus/unit/ZoneContaminantPredictorCorrector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc index d31350da7c1..adf0c43f66c 100644 --- a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc +++ b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc b/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc index bfce61bead4..f234aac9acd 100644 --- a/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc +++ b/tst/EnergyPlus/unit/ZoneHVACEvaporativeCooler.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZonePlenum.unit.cc b/tst/EnergyPlus/unit/ZonePlenum.unit.cc index c35ac3f3d34..72fcfd8ebc7 100644 --- a/tst/EnergyPlus/unit/ZonePlenum.unit.cc +++ b/tst/EnergyPlus/unit/ZonePlenum.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc b/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc index 30b8a449c00..a475975c491 100644 --- a/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc +++ b/tst/EnergyPlus/unit/ZoneTempPredictorCorrector.unit.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other diff --git a/tst/EnergyPlus/unit/main.cc b/tst/EnergyPlus/unit/main.cc index 803a2bd7592..71d2613f5df 100644 --- a/tst/EnergyPlus/unit/main.cc +++ b/tst/EnergyPlus/unit/main.cc @@ -1,4 +1,4 @@ -// EnergyPlus, Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, +// EnergyPlus, Copyright (c) 1996-2020, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other From 8492ff3f5da05145d2019566369e22d6f3c7746c Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 2 Jan 2020 08:33:08 -0700 Subject: [PATCH 49/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 312 +++++++++++++---------------- src/EnergyPlus/RefrigeratedCase.hh | 1 - 2 files changed, 138 insertions(+), 175 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index c2f592343a3..b644be5521e 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -344,7 +344,6 @@ namespace RefrigeratedCase { int NumUnusedGasCoolers(0); // Number of refrigeration gas coolers not connected to a system int NumUnusedCompressors(0); // Number of refrigeration compressors not connected to a system int NumUnusedSecondarys(0); // Number of refrigeration secondarys not connected to a system - int NumUnusedWalkIns(0); // Number of refrigeration compressors not connected to a system bool MyReferPlantScanFlag(true); // Refrigerated case variables @@ -553,89 +552,53 @@ namespace RefrigeratedCase { Array1D_string Alphas; // Alpha items for object Array1D_string cAlphaFieldNames; // Alpha field names (from input processor) Array1D_string cNumericFieldNames; // Numeric field names (from input processor) - static std::string CurrentModuleObject; // Object type for getting and error messages + std::string CurrentModuleObject; // Object type for getting and error messages Array1D_bool lAlphaBlanks; // Logic array, alpha input blank = .TRUE. Array1D_bool lNumericBlanks; // Logic array, numeric input blank = .TRUE. - static bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine + bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine int AlphaNum(0); // Used to cycle through input - static int CaseAndWalkInListNum(0); // ID of refrigerated CaseAndWalkInList - static int ChillerIndex(0); - static int CoilID(0); // Index of warehouse coil attached to a system - static int CoilIndex(0); // Index of warehouse coil attached to a system - static int CoilNum(0); // Index of warehouse coil - static int CompIndex(0); // Index of refrigeration compressor attached to a system - static int CompNum(0); // Index of refrigeration compressor - static int CondID(0); // Condenser ID used when associating condenser as a cascade load - static int CondIndex(0); // Index of refrigeration condenser attached to a system - static int CondNum(0); // Index of refrigeration condenser - static int DefType(0); // Local value for case defrost type - static int GCNum(0); // Index of refrigeration gas cooler - static int HRNum(0); // Counter for hours in day - static int IOStatus(0); // Used in GetObjectItem - static int ListNum(0); // Index of Lists of cases, compressors, and subcoolers - static int LoadCascadeNum(0); // Used to read transfer load list - static int LoadCount(0); // check for blank case and walkin names in caseand alkinlist - static int LoadSecondaryNum(0); // Used to read transfer load list - static int LoadWalkInNum(0); // Used to read CaseAndWalkInList - static int LoadCaseNum(0); // Used to read CaseAndWalkInList - static int LoadCoilNum(0); // Used to read CaseAndWalkInList - static int MaxNumAlphasRack(0); // Maximum number of alphas for rack object - static int MaxNumAlphasAirChiller(0); // Maximum number of alphas for air chiller - static int MaxNumAlphasAll(0); // Maximum number of alphas for all objects - static int MaxNumAlphasSys(0); // Maximum number of alphas for system object - static int MaxNumAlphasTransSys(0); // Maximum number of alphas for transcritical system object - static int MaxNumAlphasChillerSet(0); // Maximum number of alphas for chiller set - static int MaxNumAlphasConda(0); // Maximum number of alphas for air-cooled condenser object - static int MaxNumAlphasConde(0); // Maximum number of alphas for evap-cooled condenser object - static int MaxNumAlphasCondw(0); // Maximum number of alphas for water-cooled condenser object - static int MaxNumAlphasGasCoolera(0); // Maximum number of alphas for air-cooled gas cooler object - static int MaxNumAlphasComp(0); // Maximum number of alphas for compressor object - static int MaxNumAlphasCompressorList(0); // Maximum number of alphas for compressor list objects - static int MaxNumAlphasCase(0); // Maximum number of alphas for case object - static int MaxNumAlphasCaseAndWalkInList(0); // Maximum number of alphas in CaseAndWalkInList - static int MaxNumAlphasWalkIn(0); // Maximum number of alphas for walkin object - static int MaxNumAlphasSecond(0); // Maximum number of alphas for air chiller object - static int MaxNumNumbersAirChiller(0); // Maximum number of numbers for air chiller object - static int MaxNumNumbersSecond(0); // Maximum number of numbers for secondary system object - static int MaxNumNumbersWalkIn(0); // Maximum number of numbers for walkin object - static int MaxNumNumbersCase(0); // Maximum number of numbers for case object - static int MaxNumNumbersCaseAndWalkInList(0); // Maximum number of numbers in CaseAndWalkInList - static int MaxNumNumbersRack(0); // Maximum number of numbers for rack object - static int MaxNumNumbersAll(0); // Maximum number of numeric inputs for all objects - static int MaxNumNumbersSys(0); // Maximum number of numbers for system object - static int MaxNumNumbersTransSys(0); // Maximum number of numbers for transcritical system object - static int MaxNumNumbersChillerSet(0); // Maximum number of numbers for chiller set object - static int MaxNumNumbersConda(0); // Maximum number of numbers for air-cooled condenser object - static int MaxNumNumbersConde(0); // Maximum number of numbers for evap-cooled condenser object - static int MaxNumNumbersCondw(0); // Maximum number of numbers for water-cooled condenser object - static int MaxNumNumbersGasCoolera(0); // Maximum number of numbers for air-cooled gas cooler object - static int MaxNumNumbersComp(0); // Maximum number of numbers for compressor object - static int MaxNumNumbersCompressorList(0); // Maximum number of numbers - static int MaxNumArgs(0); // Max number of alphas and numbers (arguments) for rack object - static int NStart(0); // Used to cycle through zones on input for walk in coolers - static int NumAlphas(0); // Number of Alphas for each GetObjectItem call - static int NumCascadeLoad(0); // Number of Cascade Loads on current system - static int NumCompressorsSys(0); // Number of compressors on current system - static int NumHiStageCompressorsSys(0); // Number of high-stage compressors on current system - static int NumCondensers(0); // Counter for condensers in GETInput do loop - static int NumGasCoolers(0); // Counter for gas coolers in GetInput do loop - static int NumDefCycles(0); // Number of defrost cycles per day - static int NumPumps(0); // Number of pumps on a secondary loop - static int NumCases(0); // Number of refrigerated cases for single system - static int NumCasesMT(0); // Number of medium temperature cases on a single transcritical system - static int NumCasesLT(0); // Number of low temperature cases on a single transcritical system - static int NumCoils(0); // Number of warehouse coils for single system - static int NumSubcooler(0); // Number of subcoolers on current system - static int NumNameMatches(0); // Used to check for uniqueness of name for transfer loads - static int NumNum(0); // Used to cycle through input - static int NumNumbers(0); // Number of Numbers for each GetObjectItem call - static int NumCompressorLists(0); // Total number of Compressor Lists in IDF - static int NumDisplayCases(0); // Counter for refrigerated cases in GetInput do loop - static int NumSecondary(0); // Number of secondary loops - static int NumWalkIns(0); // Number of walk ins - static int NumWalkInsMT(0); // Number of medium temperature walk-ins on a single transcritical system + int IOStatus(0); // Used in GetObjectItem + int MaxNumAlphasRack(0); // Maximum number of alphas for rack object + int MaxNumAlphasAirChiller(0); // Maximum number of alphas for air chiller + int MaxNumAlphasAll(0); // Maximum number of alphas for all objects + int MaxNumAlphasSys(0); // Maximum number of alphas for system object + int MaxNumAlphasTransSys(0); // Maximum number of alphas for transcritical system object + int MaxNumAlphasChillerSet(0); // Maximum number of alphas for chiller set + int MaxNumAlphasConda(0); // Maximum number of alphas for air-cooled condenser object + int MaxNumAlphasConde(0); // Maximum number of alphas for evap-cooled condenser object + int MaxNumAlphasCondw(0); // Maximum number of alphas for water-cooled condenser object + int MaxNumAlphasGasCoolera(0); // Maximum number of alphas for air-cooled gas cooler object + int MaxNumAlphasComp(0); // Maximum number of alphas for compressor object + int MaxNumAlphasCompressorList(0); // Maximum number of alphas for compressor list objects + int MaxNumAlphasCase(0); // Maximum number of alphas for case object + int MaxNumAlphasCaseAndWalkInList(0); // Maximum number of alphas in CaseAndWalkInList + int MaxNumAlphasWalkIn(0); // Maximum number of alphas for walkin object + int MaxNumAlphasSecond(0); // Maximum number of alphas for air chiller object + int MaxNumNumbersAirChiller(0); // Maximum number of numbers for air chiller object + int MaxNumNumbersSecond(0); // Maximum number of numbers for secondary system object + int MaxNumNumbersWalkIn(0); // Maximum number of numbers for walkin object + int MaxNumNumbersCase(0); // Maximum number of numbers for case object + int MaxNumNumbersCaseAndWalkInList(0); // Maximum number of numbers in CaseAndWalkInList + int MaxNumNumbersRack(0); // Maximum number of numbers for rack object + int MaxNumNumbersAll(0); // Maximum number of numeric inputs for all objects + int MaxNumNumbersSys(0); // Maximum number of numbers for system object + int MaxNumNumbersTransSys(0); // Maximum number of numbers for transcritical system object + int MaxNumNumbersChillerSet(0); // Maximum number of numbers for chiller set object + int MaxNumNumbersConda(0); // Maximum number of numbers for air-cooled condenser object + int MaxNumNumbersConde(0); // Maximum number of numbers for evap-cooled condenser object + int MaxNumNumbersCondw(0); // Maximum number of numbers for water-cooled condenser object + int MaxNumNumbersGasCoolera(0); // Maximum number of numbers for air-cooled gas cooler object + int MaxNumNumbersComp(0); // Maximum number of numbers for compressor object + int MaxNumNumbersCompressorList(0); // Maximum number of numbers + int MaxNumArgs(0); // Max number of alphas and numbers (arguments) for rack object + int NumAlphas(0); // Number of Alphas for each GetObjectItem call + int NumCases(0); // Number of refrigerated cases for single system + int NumNum(0); // Used to cycle through input + int NumNumbers(0); // Number of Numbers for each GetObjectItem call + int NumDisplayCases(0); // Counter for refrigerated cases in GetInput do loop + int NumWalkIns(0); // Number of walk ins static int NumWalkInsLT(0); // Number of low temperature walk-ins on a single transcritical system static int NumWIFieldsPerZone(0); // Used to calculate number of zones exposed to each walkin static int NumWIFieldsTotal(0); // Used to calculate number of zones exposed to each walkin @@ -662,7 +625,6 @@ namespace RefrigeratedCase { static int TSNum(0); // Counter for time steps in hour static int WalkInIndex(0); // Index of walk ins static int WalkInID(0); // Index of walk ins - static int WalkInNum(0); // Index of walk ins static int TotFields(0); // Used to calc number of zones on input for walk in coolers static int ZoneID(0); // Index to zone static int ZoneIndex(0); // Index to zone @@ -740,7 +702,7 @@ namespace RefrigeratedCase { DataHeatBalance::NumRefrigCondensers = NumSimulationCondAir + NumSimulationCondEvap + NumSimulationCondWater + NumSimulationCascadeCondensers; NumSimulationCompressors = inputProcessor->getNumObjectsFound("Refrigeration:Compressor"); NumSimulationSubcoolers = inputProcessor->getNumObjectsFound("Refrigeration:Subcooler"); - NumCompressorLists = inputProcessor->getNumObjectsFound("Refrigeration:CompressorList"); + int NumCompressorLists = inputProcessor->getNumObjectsFound("Refrigeration:CompressorList"); DataHeatBalance::NumRefrigChillerSets = inputProcessor->getNumObjectsFound("ZoneHVAC:RefrigerationChillerSet"); NumSimulationRefrigAirChillers = inputProcessor->getNumObjectsFound("Refrigeration:AirChiller"); @@ -1204,7 +1166,7 @@ namespace RefrigeratedCase { RefrigCase(CaseNum).DefrostType = DefNone; } - DefType = RefrigCase(CaseNum).DefrostType; + int DefType = RefrigCase(CaseNum).DefrostType; NumNum = 18; if (!lNumericBlanks(NumNum)) { RefrigCase(CaseNum).DefrostPower = Numbers(NumNum); @@ -1253,10 +1215,10 @@ namespace RefrigeratedCase { // Flag for counting defrost cycles bool StartCycle = false; - NumDefCycles = 0; + int NumDefCycles = 0; DayValues = 0.0; ScheduleManager::GetScheduleValuesForDay(RefrigCase(CaseNum).DefrostSchedPtr, DayValues, 1); - for (HRNum = 1; HRNum <= 24; ++HRNum) { + for (int HRNum = 1; HRNum <= 24; ++HRNum) { for (TSNum = 1; TSNum <= DataGlobals::NumOfTimeStepInHour; ++TSNum) { if (DayValues(TSNum, HRNum) > 0.0) { if (!StartCycle) { @@ -1796,7 +1758,7 @@ namespace RefrigeratedCase { if (!allocated(WalkIn(WalkInID).LatZoneCredit)) WalkIn(WalkInID).LatZoneCredit.allocate(NumZones) = 0.0; int AStart = NumWIAlphaFieldsBeforeZoneInput + 1; - NStart = NumWINumberFieldsBeforeZoneInput + 1; + int NStart = NumWINumberFieldsBeforeZoneInput + 1; for (ZoneID = 1; ZoneID <= NumZones; ++ZoneID) { // Get the Zone node number from the zone name // The Zone Node is needed to get the zone's ambient conditions, DataGlobals::NumOfZones from dataglobals @@ -1936,7 +1898,7 @@ namespace RefrigeratedCase { if (NumSimulationRefrigAirChillers > 0) { CurrentModuleObject = "Refrigeration:AirChiller"; - for (CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { + for (int CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { // A1 AlphaNum = 1; inputProcessor->getObjectItem(CurrentModuleObject, @@ -2602,10 +2564,10 @@ namespace RefrigeratedCase { int AlphaStartList = AlphaNum; //+ 1 AirChillerSet(SetID).NumCoils = NumChillersInSet; if (!allocated(AirChillerSet(SetID).CoilNum)) AirChillerSet(SetID).CoilNum.allocate(NumChillersInSet); - for (ChillerIndex = 1; ChillerIndex <= NumChillersInSet; ++ChillerIndex) { + for (int ChillerIndex = 1; ChillerIndex <= NumChillersInSet; ++ChillerIndex) { int AlphaListNum = AlphaStartList + ChillerIndex; if (!lAlphaBlanks(AlphaListNum)) { - CoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), WarehouseCoil); + int CoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), WarehouseCoil); if (CoilNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + AirChillerSet(SetID).Name + "\", has an invalid " + cAlphaFieldNames(AlphaListNum) + " defined as " + Alphas(AlphaListNum)); @@ -2624,7 +2586,7 @@ namespace RefrigeratedCase { //**** Read CaseAndWalkIn Lists ********************************************************** if (NumSimulationCaseAndWalkInLists > 0) { CurrentModuleObject = "Refrigeration:CaseAndWalkInList"; - for (ListNum = 1; ListNum <= NumSimulationCaseAndWalkInLists; ++ListNum) { + for (int ListNum = 1; ListNum <= NumSimulationCaseAndWalkInLists; ++ListNum) { inputProcessor->getObjectItem(CurrentModuleObject, ListNum, Alphas, @@ -2649,14 +2611,14 @@ namespace RefrigeratedCase { NumCasesOnList = 0; NumCoilsOnList = 0; NumWalkInsOnList = 0; - LoadCount = 0; + int LoadCount = 0; for (NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { int AlphaListNum = 1 + NumLoad; if (!lAlphaBlanks(AlphaListNum)) { ++LoadCount; - LoadWalkInNum = 0; - LoadCaseNum = 0; - LoadCoilNum = 0; + int LoadWalkInNum = 0; + int LoadCaseNum = 0; + int LoadCoilNum = 0; if (NumSimulationWalkIns > 0) LoadWalkInNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), WalkIn); if (NumSimulationCases > 0) LoadCaseNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), RefrigCase); if (NumSimulationRefrigAirChillers > 0) LoadCoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), WarehouseCoil); @@ -2950,7 +2912,7 @@ namespace RefrigeratedCase { // Read all loads on this rack: cases and walk-ins and coils NumCases = 0; - NumCoils = 0; + int NumCoils = 0; NumWalkIns = 0; RefrigRack(RackNum).NumCases = 0; RefrigRack(RackNum).NumCoils = 0; @@ -2966,16 +2928,16 @@ namespace RefrigeratedCase { ErrorsFound = true; } else { // (.NOT. lAlphaBlanks(AlphaNum)) // Entry for Alphas(AlphaNum) can be either a Case, WalkIn, Coil, or CaseAndWalkInList name - CaseAndWalkInListNum = 0; + int CaseAndWalkInListNum = 0; int CaseNum = 0; - WalkInNum = 0; - CoilNum = 0; + int WalkInNum = 0; + int CoilNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); if (NumSimulationCases > 0) CaseNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), RefrigCase); if (NumSimulationWalkIns > 0) WalkInNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WalkIn); if (NumSimulationRefrigAirChillers > 0) CoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WarehouseCoil); - NumNameMatches = 0; + int NumNameMatches = 0; if (CaseAndWalkInListNum != 0) ++NumNameMatches; if (CaseNum != 0) ++NumNameMatches; if (WalkInNum != 0) ++NumNameMatches; @@ -3048,8 +3010,8 @@ namespace RefrigeratedCase { if (NumCoils > 0) { RefrigRack(RackNum).CoilFlag = true; - for (CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { - CoilNum = RefrigRack(RackNum).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { + int CoilNum = RefrigRack(RackNum).CoilNum(CoilIndex); // mark all Coils on rack as used by this system (checking for unused or non-unique Coils) ++WarehouseCoil(CoilNum).NumSysAttach; // determine total capacity on rack @@ -3127,7 +3089,7 @@ namespace RefrigeratedCase { if (NumSimulationCondAir > 0) { CurrentModuleObject = "Refrigeration:Condenser:AirCooled"; - for (CondNum = 1; CondNum <= NumSimulationCondAir; ++CondNum) { + for (int CondNum = 1; CondNum <= NumSimulationCondAir; ++CondNum) { inputProcessor->getObjectItem(CurrentModuleObject, CondNum, Alphas, @@ -3251,8 +3213,8 @@ namespace RefrigeratedCase { if (NumSimulationCondEvap > 0) { CurrentModuleObject = "Refrigeration:Condenser:EvaporativeCooled"; - for (CondIndex = 1; CondIndex <= NumSimulationCondEvap; ++CondIndex) { - CondNum = CondIndex + NumSimulationCondAir; + for (int CondIndex = 1; CondIndex <= NumSimulationCondEvap; ++CondIndex) { + int CondNum = CondIndex + NumSimulationCondAir; inputProcessor->getObjectItem(CurrentModuleObject, CondIndex, Alphas, @@ -3478,8 +3440,8 @@ namespace RefrigeratedCase { if (NumSimulationCondWater > 0) { CurrentModuleObject = "Refrigeration:Condenser:WaterCooled"; - for (CondIndex = 1; CondIndex <= NumSimulationCondWater; ++CondIndex) { - CondNum = CondIndex + NumSimulationCondAir + NumSimulationCondEvap; + for (int CondIndex = 1; CondIndex <= NumSimulationCondWater; ++CondIndex) { + int CondNum = CondIndex + NumSimulationCondAir + NumSimulationCondEvap; inputProcessor->getObjectItem(CurrentModuleObject, CondIndex, Alphas, @@ -3625,8 +3587,8 @@ namespace RefrigeratedCase { // cascade condensers assumed to provide zero subcooling if (NumSimulationCascadeCondensers > 0) { CurrentModuleObject = "Refrigeration:Condenser:Cascade"; - for (CondIndex = 1; CondIndex <= NumSimulationCascadeCondensers; ++CondIndex) { - CondNum = CondIndex + NumSimulationCondAir + NumSimulationCondEvap + NumSimulationCondWater; + for (int CondIndex = 1; CondIndex <= NumSimulationCascadeCondensers; ++CondIndex) { + int CondNum = CondIndex + NumSimulationCondAir + NumSimulationCondEvap + NumSimulationCondWater; inputProcessor->getObjectItem(CurrentModuleObject, CondIndex, Alphas, @@ -3713,7 +3675,7 @@ namespace RefrigeratedCase { if (NumSimulationGasCooler > 0) { CurrentModuleObject = "Refrigeration:GasCooler:AirCooled"; - for (GCNum = 1; GCNum <= NumSimulationGasCooler; ++GCNum) { + for (int GCNum = 1; GCNum <= NumSimulationGasCooler; ++GCNum) { inputProcessor->getObjectItem(CurrentModuleObject, GCNum, Alphas, @@ -3899,7 +3861,7 @@ namespace RefrigeratedCase { NominalTotalCaseCap = 0.0; NumCases = 0; NominalTotalCoilCap = 0.0; - NumCoils = 0; + int NumCoils = 0; NumWalkIns = 0; NominalTotalWalkInCap = 0.0; Secondary(SecondaryNum).RefInventory = 0.0; @@ -3914,16 +3876,16 @@ namespace RefrigeratedCase { } else { // (.NOT. lAlphaBlanks(AlphaNum)) // Entry for Alphas(AlphaNum) can be either a Case, WalkIn Coil, or CaseAndWalkInList name - CaseAndWalkInListNum = 0; + int CaseAndWalkInListNum = 0; int CaseNum = 0; - WalkInNum = 0; - CoilNum = 0; + int WalkInNum = 0; + int CoilNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); if (NumSimulationCases > 0) CaseNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), RefrigCase); if (NumSimulationWalkIns > 0) WalkInNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WalkIn); if (NumSimulationRefrigAirChillers > 0) CoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WarehouseCoil); - NumNameMatches = 0; + int NumNameMatches = 0; if (CaseAndWalkInListNum != 0) ++NumNameMatches; if (CaseNum != 0) ++NumNameMatches; if (WalkInNum != 0) ++NumNameMatches; @@ -3991,9 +3953,9 @@ namespace RefrigeratedCase { if (NumCoils > 0) { // Find lowest design T loop fluid out of secondary chiller // Sum rated capacity of all Coils on Secondary - for (CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { + for (int CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { // mark all Coils on Secondary as used by this Secondary - checking for unused or non-unique Coils - CoilNum = Secondary(SecondaryNum).CoilNum(CoilIndex); + int CoilNum = Secondary(SecondaryNum).CoilNum(CoilIndex); ++WarehouseCoil(CoilNum).NumSysAttach; NominalTotalCoilCap += WarehouseCoil(CoilNum).RatedSensibleCap; Secondary(SecondaryNum).RefInventory += WarehouseCoil(CoilNum).DesignRefrigInventory; @@ -4194,7 +4156,7 @@ namespace RefrigeratedCase { } // fluid type AlwaysLiquid or PhaseChange ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // Read number of pumps (or pump stages) in secondary loop - NumPumps = 1; // default value + int NumPumps = 1; // default value if ((!lNumericBlanks(6)) && (Numbers(6) >= 1)) NumPumps = Numbers(6); Secondary(SecondaryNum).NumPumps = NumPumps; // Get pump power (users can input either power in W or head in Pa or both) @@ -4453,7 +4415,7 @@ namespace RefrigeratedCase { //************ START Compressor INPUT ************** CurrentModuleObject = "Refrigeration:Compressor"; - for (CompNum = 1; CompNum <= NumSimulationCompressors; ++CompNum) { + for (int CompNum = 1; CompNum <= NumSimulationCompressors; ++CompNum) { inputProcessor->getObjectItem(CurrentModuleObject, CompNum, Alphas, @@ -4636,7 +4598,7 @@ namespace RefrigeratedCase { //**** Read TransferLoad Lists ********************************************************** if (NumSimulationTransferLoadLists > 0) { CurrentModuleObject = "Refrigeration:TransferLoadList"; - for (ListNum = 1; ListNum <= NumSimulationTransferLoadLists; ++ListNum) { + for (int ListNum = 1; ListNum <= NumSimulationTransferLoadLists; ++ListNum) { inputProcessor->getObjectItem(CurrentModuleObject, ListNum, Alphas, @@ -4664,8 +4626,8 @@ namespace RefrigeratedCase { NumCascadeLoadsOnList = 0; for (NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { int AlphaListNum = 1 + NumLoad; - LoadCascadeNum = 0; - LoadSecondaryNum = 0; + int LoadCascadeNum = 0; + int LoadSecondaryNum = 0; if (DataHeatBalance::NumRefrigCondensers > 0) LoadCascadeNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Condenser); if (NumSimulationSecondarySystems > 0) LoadSecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Secondary); if ((LoadCascadeNum == 0) && (LoadSecondaryNum == 0)) { @@ -4700,7 +4662,7 @@ namespace RefrigeratedCase { //**** Read Compressor Lists ********************************************************** CurrentModuleObject = "Refrigeration:CompressorList"; - for (ListNum = 1; ListNum <= NumCompressorLists; ++ListNum) { + for (int ListNum = 1; ListNum <= NumCompressorLists; ++ListNum) { inputProcessor->getObjectItem(CurrentModuleObject, ListNum, Alphas, @@ -4719,7 +4681,7 @@ namespace RefrigeratedCase { if (!allocated(CompressorLists(ListNum).CompItemNum)) CompressorLists(ListNum).CompItemNum.allocate(CompressorLists(ListNum).NumCompressors); - for (CompIndex = 1; CompIndex <= CompressorLists(ListNum).NumCompressors; ++CompIndex) { + for (int CompIndex = 1; CompIndex <= CompressorLists(ListNum).NumCompressors; ++CompIndex) { int AlphaListNum = CompIndex + 1; // same as do loop from 2 to end of list if (!lAlphaBlanks(AlphaListNum)) { CompressorLists(ListNum).CompItemNum(CompIndex) = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Compressor); @@ -4763,13 +4725,12 @@ namespace RefrigeratedCase { } NumCases = 0; System(RefrigSysNum).NumCases = 0; - NumCoils = 0; + int NumCoils = 0; System(RefrigSysNum).NumCoils = 0; NumWalkIns = 0; System(RefrigSysNum).NumWalkIns = 0; - NumSecondary = 0; + int NumSecondary = 0; System(RefrigSysNum).NumSecondarys = 0; - NumCascadeLoad = 0; System(RefrigSysNum).NumCascadeLoads = 0; System(RefrigSysNum).NumNonCascadeLoads = 0; NominalTotalCaseCap = 0.0; @@ -4785,16 +4746,16 @@ namespace RefrigeratedCase { if (!lAlphaBlanks(AlphaNum)) { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn or CaseAndWalkInList name - CaseAndWalkInListNum = 0; + int CaseAndWalkInListNum = 0; int CaseNum = 0; - WalkInNum = 0; - CoilNum = 0; + int WalkInNum = 0; + int CoilNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); if (NumSimulationCases > 0) CaseNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), RefrigCase); if (NumSimulationWalkIns > 0) WalkInNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WalkIn); if (NumSimulationRefrigAirChillers > 0) CoilNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WarehouseCoil); - NumNameMatches = 0; + int NumNameMatches = 0; if (CaseAndWalkInListNum != 0) ++NumNameMatches; if (CaseNum != 0) ++NumNameMatches; if (WalkInNum != 0) ++NumNameMatches; @@ -4868,9 +4829,9 @@ namespace RefrigeratedCase { if (NumCoils > 0) { // Find lowest design evap T // Sum rated capacity of all Coils on system - for (CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { + for (int CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { // mark all Coils on system as used by this system - checking for unused or non-unique Coils - CoilNum = System(RefrigSysNum).CoilNum(CoilIndex); + int CoilNum = System(RefrigSysNum).CoilNum(CoilIndex); ++WarehouseCoil(CoilNum).NumSysAttach; NominalTotalCoilCap += WarehouseCoil(CoilNum).RatedSensibleCap; System(RefrigSysNum).RefInventory += WarehouseCoil(CoilNum).DesignRefrigInventory; @@ -4924,10 +4885,11 @@ namespace RefrigeratedCase { if (NumSimulationTransferLoadLists > 0) TransferLoadListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), TransferLoadList); if (NumSimulationSecondarySystems > 0) SecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Secondary); if (DataHeatBalance::NumRefrigCondensers > 0) CascadeLoadNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Condenser); - NumNameMatches = 0; + int NumNameMatches = 0; if (TransferLoadListNum != 0) ++NumNameMatches; if (SecondaryNum != 0) ++NumNameMatches; if (CascadeLoadNum != 0) ++NumNameMatches; + int NumCascadeLoad = 0; if (NumNameMatches != 1) { // name must uniquely point to a list or a single transfer load ErrorsFound = true; @@ -4998,7 +4960,7 @@ namespace RefrigeratedCase { if (NumCascadeLoad > 0) { for (int cascadeLoadIndex = 1; cascadeLoadIndex <= NumCascadeLoad; ++cascadeLoadIndex) { - CondID = System(RefrigSysNum).CascadeLoadNum(cascadeLoadIndex); + int CondID = System(RefrigSysNum).CascadeLoadNum(cascadeLoadIndex); if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", has a " + cAlphaFieldNames(AlphaNum) + ": " + Alphas(AlphaNum) + @@ -5052,11 +5014,11 @@ namespace RefrigeratedCase { // read condenser // currently assumes one condenser per refrigeration system and but multiple systems allowed per condenser AlphaNum = 4; - NumCondensers = 1; + int NumCondensers = 1; if (!allocated(System(RefrigSysNum).CondenserNum)) System(RefrigSysNum).CondenserNum.allocate(NumCondensers); System(RefrigSysNum).NumCondensers = 1; // Find condenser number, note condensers were read in one of four objects, but all read into same list - CondNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Condenser); + int CondNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Condenser); if (CondNum == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", has an invalid " + cAlphaFieldNames(AlphaNum) + " defined as " + Alphas(AlphaNum)); @@ -5097,17 +5059,19 @@ namespace RefrigeratedCase { // Read the compressor data. // If the system consists of two stages of compression, these compressors will be the low-stage compressors. AlphaNum = 5; - NumCompressorsSys = 0; + int NumCompressorsSys = 0; if (lAlphaBlanks(AlphaNum)) { // blank input where must have compressor or compressor list input. ShowSevereError(RoutineName + CurrentModuleObject + ' ' + cAlphaFieldNames(AlphaNum) + "\" : must be input."); ErrorsFound = true; } else { // Entry for Alphas(AlphaNum) can be either a compressor name or a compressorlist name + int ListNum; if (NumCompressorLists > 0) { ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); } else { ListNum = 0; } + int CompNum; if (NumSimulationCompressors > 0) { CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); } else { @@ -5192,7 +5156,7 @@ namespace RefrigeratedCase { if (System(RefrigSysNum).NumSubcoolers > 0) { if (!allocated(System(RefrigSysNum).SubcoolerNum)) System(RefrigSysNum).SubcoolerNum.allocate(System(RefrigSysNum).NumSubcoolers); - NumSubcooler = 1; + int NumSubcooler = 1; if (!lAlphaBlanks(AlphaNum)) { System(RefrigSysNum).SubcoolerNum(NumSubcooler) = inputProcessor->getObjectItemNum("Refrigeration:Subcooler", Alphas(AlphaNum)); @@ -5315,7 +5279,7 @@ namespace RefrigeratedCase { // Read the high-stage compressor info, if two-stage compression has been specified. AlphaNum = 13; - NumHiStageCompressorsSys = 0; + int NumHiStageCompressorsSys = 0; if (System(RefrigSysNum).NumStages == 2) { if (lAlphaBlanks(AlphaNum)) { // blank input where must have high-stage compressor or compressor list input. @@ -5323,8 +5287,8 @@ namespace RefrigeratedCase { " must be input for two-stage compression systems."); ErrorsFound = true; } else { // Entry for Alphas(AlphaNum) can be either a compressor name or a compressorlist name - ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); - CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); + int ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); + int CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", " + cAlphaFieldNames(AlphaNum) + " has an invalid or undefined value=\"" + Alphas(AlphaNum) + "\"."); @@ -5366,8 +5330,8 @@ namespace RefrigeratedCase { // Sum capacity of single-stage compressors or low-stage compressors if two-stage system NominalTotalCompCap = 0.0; - for (CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { - CompNum = System(RefrigSysNum).CompressorNum(CompIndex); + for (int CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { + int CompNum = System(RefrigSysNum).CompressorNum(CompIndex); if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor if (System(RefrigSysNum).NumStages == 1) { // Single-stage compression Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, @@ -5392,8 +5356,8 @@ namespace RefrigeratedCase { // Sum capacity of high-stage compressors if two stage system if (System(RefrigSysNum).NumStages == 2) { - for (CompIndex = 1; CompIndex <= NumHiStageCompressorsSys; ++CompIndex) { - CompNum = System(RefrigSysNum).HiStageCompressorNum(CompIndex); + for (int CompIndex = 1; CompIndex <= NumHiStageCompressorsSys; ++CompIndex) { + int CompNum = System(RefrigSysNum).HiStageCompressorNum(CompIndex); if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TIntercooler, @@ -5436,10 +5400,10 @@ namespace RefrigeratedCase { // can't mix on one system) need to do here once again after all cascade condensers and cascade sink systems have been identified for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { // assign flags to all condensers to match system below condenser (system rejecting heat to cascade condenser) - CondNum = System(RefrigSysNum).CondenserNum(1); // right now only have one condenser per system + int CondNum = System(RefrigSysNum).CondenserNum(1); // right now only have one condenser per system Condenser(CondNum).CoilFlag = System(RefrigSysNum).CoilFlag; - for (CompIndex = 1; CompIndex <= System(RefrigSysNum).NumCompressors; ++CompIndex) { - CompNum = System(RefrigSysNum).CompressorNum(CompIndex); + for (int CompIndex = 1; CompIndex <= System(RefrigSysNum).NumCompressors; ++CompIndex) { + int CompNum = System(RefrigSysNum).CompressorNum(CompIndex); Compressor(CompNum).CoilFlag = System(RefrigSysNum).CoilFlag; } @@ -5452,7 +5416,7 @@ namespace RefrigeratedCase { for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { // check flags for systems reflect all cascade loads if (System(RefrigSysNum).NumCascadeLoads == 0) continue; if (System(RefrigSysNum).CoilFlag) { // system already identified as serving coils - for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { + for (int CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) continue; if (RefrigSysNum != Condenser(CondID).CascadeSinkSystemID) continue; // this condenser is not a cascade load on this system if (!Condenser(CondID).CoilFlag) { @@ -5468,7 +5432,7 @@ namespace RefrigeratedCase { // Flag to help verify load type with loads served by systems cooled by cascade condensers bool CaseLoads = false; NumCascadeLoadsChecked = 0; - for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { // look at All cascade condenser loads on system + for (int CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { // look at All cascade condenser loads on system if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) continue; if (RefrigSysNum != Condenser(CondID).CascadeSinkSystemID) continue; // this condenser is not a cascade load on this system ++NumCascadeLoadsChecked; @@ -5564,7 +5528,7 @@ namespace RefrigeratedCase { // No system type specified ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", has no system type specified."); - ShowContinueError(" System type must be specified as \"SingleStage\" or \"TwoStage\"."); + ShowContinueError(R"( System type must be specified as "SingleStage" or "TwoStage".)"); ErrorsFound = true; } if (UtilityRoutines::SameString(Alphas(2), "SingleStage")) { @@ -5599,11 +5563,11 @@ namespace RefrigeratedCase { ErrorsFound = true; } - NumCasesMT = 0; + int NumCasesMT = 0; TransSystem(TransRefrigSysNum).NumCasesMT = 0; - NumCasesLT = 0; + int NumCasesLT = 0; TransSystem(TransRefrigSysNum).NumCasesLT = 0; - NumWalkInsMT = 0; + int NumWalkInsMT = 0; TransSystem(TransRefrigSysNum).NumWalkInsMT = 0; NumWalkInsLT = 0; TransSystem(TransRefrigSysNum).NumWalkInsLT = 0; @@ -5620,14 +5584,14 @@ namespace RefrigeratedCase { if (!lAlphaBlanks(AlphaNum)) { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn or CaseAndWalkInList name - CaseAndWalkInListNum = 0; + int CaseAndWalkInListNum = 0; int CaseNum = 0; - WalkInNum = 0; + int WalkInNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); if (NumSimulationCases > 0) CaseNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), RefrigCase); if (NumSimulationWalkIns > 0) WalkInNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WalkIn); - NumNameMatches = 0; + int NumNameMatches = 0; if (CaseAndWalkInListNum != 0) ++NumNameMatches; if (CaseNum != 0) ++NumNameMatches; if (WalkInNum != 0) ++NumNameMatches; @@ -5723,14 +5687,14 @@ namespace RefrigeratedCase { if (!lAlphaBlanks(AlphaNum)) { // Entry for Alphas(AlphaNum) can be either a Case, WalkIn or CaseAndWalkInList name - CaseAndWalkInListNum = 0; + int CaseAndWalkInListNum = 0; int CaseNum = 0; - WalkInNum = 0; + int WalkInNum = 0; if (NumSimulationCaseAndWalkInLists > 0) CaseAndWalkInListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CaseAndWalkInList); if (NumSimulationCases > 0) CaseNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), RefrigCase); if (NumSimulationWalkIns > 0) WalkInNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), WalkIn); - NumNameMatches = 0; + int NumNameMatches = 0; if (CaseAndWalkInListNum != 0) ++NumNameMatches; if (CaseNum != 0) ++NumNameMatches; if (WalkInNum != 0) ++NumNameMatches; @@ -5826,11 +5790,11 @@ namespace RefrigeratedCase { // Read Gas Cooler // currently assumes one gas cooler per refrigeration system and but multiple systems allowed per gas cooler AlphaNum = 5; - NumGasCoolers = 1; + int NumGasCoolers = 1; if (!allocated(TransSystem(TransRefrigSysNum).GasCoolerNum)) TransSystem(TransRefrigSysNum).GasCoolerNum.allocate(NumGasCoolers); TransSystem(TransRefrigSysNum).NumGasCoolers = 1; // Find gascooler number - GCNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), GasCooler); + int GCNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), GasCooler); if (GCNum == 0) { // Invalid Gas Cooler attached to Transcritical Refrigeration System ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", has an invalid " + @@ -5849,14 +5813,14 @@ namespace RefrigeratedCase { // Read High Pressure Compressor AlphaNum = 6; - NumCompressorsSys = 0; + int NumCompressorsSys = 0; if (lAlphaBlanks(AlphaNum)) { // blank input where must have compressor or compressor list input. ShowSevereError(RoutineName + CurrentModuleObject + ' ' + cAlphaFieldNames(AlphaNum) + "\" : must be input."); ErrorsFound = true; } else { // Entry for Alphas(AlphaNum) can be either a compressor name or a compressorlist name - ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); - CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); + int ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); + int CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(RoutineName + CurrentModuleObject + ", \"" + cAlphaFieldNames(AlphaNum) + "\", has an invalid or undefined value=\"" + Alphas(AlphaNum) + "\"."); @@ -5881,7 +5845,7 @@ namespace RefrigeratedCase { } // Sum rated capacity of all HP compressors on system NominalTotalCompCapHP = 0.0; - for (CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { + for (int CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { CompNum = TransSystem(TransRefrigSysNum).CompressorNumHP(CompIndex); if (Compressor(CompNum).TransFlag) { // Calculate nominal capacity of transcritical Compressor @@ -5920,8 +5884,8 @@ namespace RefrigeratedCase { "\" was found. The low pressure compressors will be ignored and will not simulated."); } else if ((!(lAlphaBlanks(AlphaNum))) && (TransSystem(TransRefrigSysNum).TransSysType == 2)) { // TwoStage system with low pressure compressors specified - ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); - CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); + int ListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), CompressorLists); + int CompNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Compressor); if ((ListNum == 0) && (CompNum == 0)) { // name doesn't match either a compressor or a compressor list ShowSevereError(RoutineName + CurrentModuleObject + ", \"" + cAlphaFieldNames(AlphaNum) + "\", has an invalid or undefined value=\"" + Alphas(AlphaNum) + "\"."); @@ -5946,7 +5910,7 @@ namespace RefrigeratedCase { } // Sum rated capacity of all LP compressors on system NominalTotalCompCapLP = 0.0; - for (CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { + for (int CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { CompNum = TransSystem(TransRefrigSysNum).CompressorNumLP(CompIndex); if (TransSystem(TransRefrigSysNum).TransSysType == 2) { // Calculate capacity of LP compressors Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, @@ -6162,7 +6126,7 @@ namespace RefrigeratedCase { // check for compressors not connected to systems and compressors connected more than once // (twice in a system or to more than one system) NumUnusedCompressors = 0; - for (CompNum = 1; CompNum <= NumSimulationCompressors; ++CompNum) { + for (int CompNum = 1; CompNum <= NumSimulationCompressors; ++CompNum) { if (Compressor(CompNum).NumSysAttach == 1) continue; if (Compressor(CompNum).NumSysAttach < 1) { ++NumUnusedCompressors; @@ -6190,11 +6154,11 @@ namespace RefrigeratedCase { } // NumUnusedCompressors } // NumSimulationCompressors > 0 + int NumUnusedWalkIns = 0; if (NumSimulationWalkIns > 0) { // check for refrigeration WalkIns not connected to any systems and // refrigeration WalkIns connected more than once - NumUnusedWalkIns = 0; - for (WalkInNum = 1; WalkInNum <= NumSimulationWalkIns; ++WalkInNum) { + for (int WalkInNum = 1; WalkInNum <= NumSimulationWalkIns; ++WalkInNum) { if (WalkIn(WalkInNum).NumSysAttach == 1) continue; if (WalkIn(WalkInNum).NumSysAttach < 1) { ++NumUnusedWalkIns; @@ -6227,7 +6191,7 @@ namespace RefrigeratedCase { // check for air chillers not connected to any systems and // air chillers connected more than once NumUnusedCoils = 0; - for (CoilNum = 1; CoilNum <= NumSimulationRefrigAirChillers; ++CoilNum) { + for (int CoilNum = 1; CoilNum <= NumSimulationRefrigAirChillers; ++CoilNum) { if (WarehouseCoil(CoilNum).NumSysAttach == 1) continue; if (WarehouseCoil(CoilNum).NumSysAttach < 1) { ++NumUnusedWalkIns; @@ -6294,7 +6258,7 @@ namespace RefrigeratedCase { // because of dependence of performance on total condenser load NumSimulationSharedCondensers = 0; NumUnusedCondensers = 0; - for (CondNum = 1; CondNum <= DataHeatBalance::NumRefrigCondensers; ++CondNum) { + for (int CondNum = 1; CondNum <= DataHeatBalance::NumRefrigCondensers; ++CondNum) { if (Condenser(CondNum).NumSysAttach == 1) continue; if (Condenser(CondNum).NumSysAttach < 1) { ++NumUnusedCondensers; @@ -6323,7 +6287,7 @@ namespace RefrigeratedCase { // Check for presence of shared gas coolers and for unused gas coolers NumSimulationSharedGasCoolers = 0; NumUnusedGasCoolers = 0; - for (GCNum = 1; GCNum <= NumSimulationGasCooler; ++GCNum) { + for (int GCNum = 1; GCNum <= NumSimulationGasCooler; ++GCNum) { if (GasCooler(GCNum).NumSysAttach == 1) continue; if (GasCooler(GCNum).NumSysAttach < 1) { ++NumUnusedGasCoolers; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 9d47c768fca..e6e8821cd81 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -207,7 +207,6 @@ namespace RefrigeratedCase { extern int NumUnusedGasCoolers; // Number of refrigeration gas coolers not connected to a system extern int NumUnusedCompressors; // Number of refrigeration compressors not connected to a system extern int NumUnusedSecondarys; // Number of refrigeration secondarys not connected to a system - extern int NumUnusedWalkIns; // Number of refrigeration compressors not connected to a system extern bool MyReferPlantScanFlag; // Refrigerated case variables From 3a8155e3b5d8164dbfd2c9ca47afcfbdb87051b0 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 2 Jan 2020 09:40:02 -0700 Subject: [PATCH 50/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 263 +++++++++++------------------ 1 file changed, 103 insertions(+), 160 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index b644be5521e..04dc4e2dc2f 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -599,87 +599,15 @@ namespace RefrigeratedCase { int NumNumbers(0); // Number of Numbers for each GetObjectItem call int NumDisplayCases(0); // Counter for refrigerated cases in GetInput do loop int NumWalkIns(0); // Number of walk ins - static int NumWalkInsLT(0); // Number of low temperature walk-ins on a single transcritical system - static int NumWIFieldsPerZone(0); // Used to calculate number of zones exposed to each walkin - static int NumWIFieldsTotal(0); // Used to calculate number of zones exposed to each walkin - static int NumZones(0); // Used to cycle through zones on input for walk in coolers - static int NumTotalLoadsOnList(0); // Used to read transfer load and caseandWalkIn lists - static int NumSecondarysOnList(0); // Used to read transfer load lists - static int NumCascadeLoadsChecked(0); // Used when checking for consistency of coil loads/time steps - static int NumCascadeLoadsOnList(0); // Used to read transfer load lists - static int NumLoad(0); // Used to read transfer loadand caseandWalkIn lists - static int NumCasesOnList(0); // Used to read caseandWalkIn lists - static int NumChillersInSet(0); - static int NumCoilsOnList(0); // Used to read caseandWalkIn lists - static int NumWalkInsOnList(0); // Used to read caseandWalkIn lists - static int RackNum(0); // Index of refrigerated display case compressor rack - static int RefrigIndex(0); // Index used in fluid property routines - static int RefrigSysNum(0); // Index of refrigeration system - static int TransRefrigSysNum(0); // Index of transcritical CO2 refrigeration system - static int SecondaryIndex(0); // Index of secondary loops - static int SecondaryID(0); // Index of secondary loops - static int SetID(0); // Index of refrigerated chilller SETS - static int SecondaryNum(0); // Index of secondary loops - static int TransferLoadListNum(0); // Index of TransferLoad lists - static int SubcoolerNum(0); // Index of subcooler - static int TSNum(0); // Counter for time steps in hour - static int WalkInIndex(0); // Index of walk ins - static int WalkInID(0); // Index of walk ins - static int TotFields(0); // Used to calc number of zones on input for walk in coolers - static int ZoneID(0); // Index to zone - static int ZoneIndex(0); // Index to zone - static int ZoneNum(0); // Index to zone - static Real64 CalcCircRate(0.0); // Calculted circ rate in secondary phase change loop, dimensionless - static Real64 CalcTotFlowVol(0.0); // Secondary loop flow in phase change liquid overfeed system (m3/s) - static Real64 CaseHeatGain(0.0); // Case sensible heat gain used for error messages - static Real64 CapacityAtMaxVolFlow(0.0); // Secondary loop capacity (W) - static Real64 CpBrineRated(0.0); // specific heat of circ fluid in secondary loop - static Real64 Capmin(0.0); // min heat rej for heat rej curve for air cooled condenser (W) - static Real64 Capmax(0.0); // max heat rej for heat rej curve for air cooled condenser (W) - static Real64 DeltaCap1(0.0); // fraction dif in capacity for input error check - static Real64 DeltaCap2(0.0); // fraction dif in capacity for input error check - static Real64 DeltaHPhaseChange(0.0); // Secondary loop enthalpy change in condenser w overfeed system (J/g) - static Real64 DelTempMin(0.0); // min temperature for heat rej curve for air cooled condenser (C) - static Real64 DelTempMax(0.0); // max temperature for heat rej curve for air cooled condenser (C) - static Real64 DensityBrineRated(0.0); // density of circ fluid in secondary loop - static Real64 DensityPhaseChange(0.0); // Secondary loop density at condensing temperature w overfeed system (g/m3) - static Real64 DesignSensibleCap(0.0); // Case sensible capacity used for error messages - static Real64 DiffCircRates(0.0); // Difference between calculated and specified circ rates, fraction - static Real64 ErrSecondPumpPower(0.0); // Used to check consistency when both head and power input - static Real64 FlowMassRated(0.0); // Design mass flow rate of circ fluid in secondary loop(kg/s) - static Real64 GCOutletH(0.0); // Gas cooler outlet enthalpy (J/kg) - static Real64 NominalSecondaryCapacity(0.0); // Rated Capacity from input data, W - static Real64 NominalSecondaryRefLoad(0.0); // Load from all connected cases and walkins, W - static Real64 NominalTotalCascadeLoad(0.0); // Load from all connected cascade condensers, W - static Real64 NominalTotalCaseCap(0.0); // Total of nominal case capacities, used for rough input check (W) - static Real64 NominalTotalCoilCap(0.0); // Total of nominal case capacities, used for rough input check (W) - static Real64 NominalTotalWalkInCap(0.0); // Total of nominal walk-in capacities, used for rough input check (W) - static Real64 NominalTotalSecondaryCap(0.0); // Total of nominal secondary capacities, used for rough input check (W) - static Real64 NominalTotalCaseCapMT( - 0.0); // Total of nominal medium temperature case capacities, used for rough input check (W) (Transcritical CO2) - static Real64 NominalTotalCaseCapLT( - 0.0); // Total of nominal low temperature case capacities, used for rough input check (W) (Transcritical CO2) - static Real64 NominalTotalWalkInCapMT( - 0.0); // Total of nominal medium temperature walk-in capacities, used for rough input check (W) (Transcritical CO2) - static Real64 NominalTotalWalkInCapLT( - 0.0); // Total of nominal low temperature walk-in capacities, used for rough input check (W) (Transcritical CO2) - static Real64 NominalTotalCoolingCap(0.0); // Total of nominal load capacities, used for rough input check (W) - static Real64 NominalTotalCompCap(0.0); // Total of nominal compressor capacities, used for rough input check (W) - static Real64 NominalTotalHiStageCompCap(0.0); // Total of nominal high-stage compressor capacities, used for rough input check (W) - static Real64 NominalTotalCompCapHP( - 0.0); // Total of nominal high pressure compressor capacities, used for rough input check (W) (Transcritical CO2) - static Real64 NominalTotalCompCapLP( - 0.0); // Total of nominal low pressure compressor capacities, used for rough input check (W) (Transcritical CO2) - static Real64 NominalCondCap(0.0); // Nominal Condenser capacity, used for rough input check (W) - static Real64 PCond(0.0); // Condensing Pressure (Pa) - static Real64 PEvap(0.0); // Evaporating Pressure (Pa) - static Real64 PumpTotRatedHead(0.0); // Total pump rated head on secondary loop (Pa) - static Real64 PumpTotRatedFlowVol(0.0); // Rated flow from input pump data, m3/s - static Real64 Rcase(0.0); // Case thermal resistance used with anti-sweat heater control - static Real64 RcaseDenom(0.0); // Denominator of case thermal resistance calculation for anti-sweat - static Real64 SecondaryFlowVolRated(0.0); // Rated flow of secondary fluid, used to calculate capacity (m3/s) - static Real64 TBrineOutRated(0.0); // Rated temperature of circ fluid LEAVING heat exchanger,C - static Real64 TBrineInRated(0.0); // Rated temperature of circ fluid going INTO heat exchanger, C + int RefrigIndex(0); // Index used in fluid property routines + int RefrigSysNum(0); // Index of refrigeration system + Real64 DeltaHPhaseChange(0.0); // Secondary loop enthalpy change in condenser w overfeed system (J/g) + Real64 DelTempMin(0.0); // min temperature for heat rej curve for air cooled condenser (C) + Real64 DelTempMax(0.0); // max temperature for heat rej curve for air cooled condenser (C) + Real64 DensityBrineRated(0.0); // density of circ fluid in secondary loop + Real64 DensityPhaseChange(0.0); // Secondary loop density at condensing temperature w overfeed system (g/m3) + Real64 NominalTotalCompCapLP(0.0); // Total of nominal low pressure compressor capacities, used for rough input check (W) (Transcritical CO2) + Real64 NominalTotalCompCapHP(0.0); static Real64 TBrineAverage(0.0); // Rated average of inlet and outlet temps, used for property look up, C static Real64 TempRAFraction(0.0); // Temporary sum of Return Air fraction per zone for reporting static Real64 TestDelta(0.0); // Used to compare secondary loop rated capacity to calculated capacity, fraction @@ -1117,6 +1045,9 @@ namespace RefrigeratedCase { // initialize case resistance for anti-sweat heater control type = Heat Balance Method if (RefrigCase(CaseNum).AntiSweatControlType == ASHeatBalance) { + Real64 Rcase(0.0); // Case thermal resistance used with anti-sweat heater control + Real64 RcaseDenom(0.0); // Denominator of case thermal resistance calculation for anti-sweat + if (RefrigCase(CaseNum).Height == 0.0) { Rcase = 0.0; } else { @@ -1219,7 +1150,7 @@ namespace RefrigeratedCase { DayValues = 0.0; ScheduleManager::GetScheduleValuesForDay(RefrigCase(CaseNum).DefrostSchedPtr, DayValues, 1); for (int HRNum = 1; HRNum <= 24; ++HRNum) { - for (TSNum = 1; TSNum <= DataGlobals::NumOfTimeStepInHour; ++TSNum) { + for (int TSNum = 1; TSNum <= DataGlobals::NumOfTimeStepInHour; ++TSNum) { if (DayValues(TSNum, HRNum) > 0.0) { if (!StartCycle) { ++NumDefCycles; @@ -1368,11 +1299,12 @@ namespace RefrigeratedCase { } // calculate sensible case load at design conditions - DesignSensibleCap = RefrigCase(CaseNum).RateTotCapPerLength * (1.0 - RefrigCase(CaseNum).RatedLHR) * RefrigCase(CaseNum).RatedRTF * + // Case sensible capacity used for error messages + Real64 DesignSensibleCap = RefrigCase(CaseNum).RateTotCapPerLength * (1.0 - RefrigCase(CaseNum).RatedLHR) * RefrigCase(CaseNum).RatedRTF * RefrigCase(CaseNum).Length; // calculate case heat gain = lights + fans + anti-sweat - CaseHeatGain = ((RefrigCase(CaseNum).RatedLightingPower * RefrigCase(CaseNum).LightingFractionToCase) + + Real64 CaseHeatGain = ((RefrigCase(CaseNum).RatedLightingPower * RefrigCase(CaseNum).LightingFractionToCase) + (RefrigCase(CaseNum).AntiSweatPower * RefrigCase(CaseNum).ASHeaterFractionToCase) + RefrigCase(CaseNum).STDFanPower) * RefrigCase(CaseNum).Length; @@ -1449,7 +1381,7 @@ namespace RefrigeratedCase { if (NumSimulationWalkIns > 0) { CurrentModuleObject = "Refrigeration:WalkIn"; - for (WalkInID = 1; WalkInID <= NumSimulationWalkIns; ++WalkInID) { + for (int WalkInID = 1; WalkInID <= NumSimulationWalkIns; ++WalkInID) { inputProcessor->getObjectItem(CurrentModuleObject, WalkInID, Alphas, @@ -1722,10 +1654,9 @@ namespace RefrigeratedCase { // Calculate the number of zones exposed to walk-in based on number of input fields, all integer math, // This approach used because last zone could have less than NumWIFieldsPerZone due to optional values - TotFields = NumNumbers + NumAlphas; - NumWIFieldsPerZone = NumWIAlphaFieldsPerZone + NumWINumberFieldsPerZone; - NumWIFieldsTotal = TotFields - NumWIAlphaFieldsBeforeZoneInput - NumWINumberFieldsBeforeZoneInput; - NumZones = 1; + int NumWIFieldsPerZone = NumWIAlphaFieldsPerZone + NumWINumberFieldsPerZone; + int NumWIFieldsTotal = NumNumbers + NumAlphas - NumWIAlphaFieldsBeforeZoneInput - NumWINumberFieldsBeforeZoneInput; + int NumZones = 1; if (NumWIFieldsTotal > NumWIFieldsPerZone) NumZones = 2; if (NumWIFieldsTotal > (2 * NumWIFieldsPerZone)) NumZones = 3; if (NumWIFieldsTotal > (3 * NumWIFieldsPerZone)) NumZones = 4; @@ -1759,7 +1690,7 @@ namespace RefrigeratedCase { int AStart = NumWIAlphaFieldsBeforeZoneInput + 1; int NStart = NumWINumberFieldsBeforeZoneInput + 1; - for (ZoneID = 1; ZoneID <= NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= NumZones; ++ZoneID) { // Get the Zone node number from the zone name // The Zone Node is needed to get the zone's ambient conditions, DataGlobals::NumOfZones from dataglobals WalkIn(WalkInID).ZoneName(ZoneID) = Alphas(AStart); @@ -2480,7 +2411,7 @@ namespace RefrigeratedCase { CheckChillerSetName.dimension(DataHeatBalance::NumRefrigChillerSets, true); CurrentModuleObject = "ZoneHVAC:RefrigerationChillerSet"; - for (SetID = 1; SetID <= DataHeatBalance::NumRefrigChillerSets; ++SetID) { + for (int SetID = 1; SetID <= DataHeatBalance::NumRefrigChillerSets; ++SetID) { inputProcessor->getObjectItem(CurrentModuleObject, SetID, Alphas, @@ -2560,7 +2491,7 @@ namespace RefrigeratedCase { // An extensible list is used to enter the individual names of each chiller in the set. // These chillers will be dispatched in this list order to meet the required zone load - NumChillersInSet = NumAlphas - AlphaNum; + int NumChillersInSet = NumAlphas - AlphaNum; int AlphaStartList = AlphaNum; //+ 1 AirChillerSet(SetID).NumCoils = NumChillersInSet; if (!allocated(AirChillerSet(SetID).CoilNum)) AirChillerSet(SetID).CoilNum.allocate(NumChillersInSet); @@ -2603,16 +2534,16 @@ namespace RefrigeratedCase { // CaseAndWalkInList alphas include CaseAndWalkInList name and one name for each Case or WalkIn in list // below allocates larger than needed (each allocated to sum of both), but avoids two loops through input fields - NumTotalLoadsOnList = NumAlphas - 1; + int NumTotalLoadsOnList = NumAlphas - 1; if (!allocated(CaseAndWalkInList(ListNum).WalkInItemNum)) CaseAndWalkInList(ListNum).WalkInItemNum.allocate(NumTotalLoadsOnList); if (!allocated(CaseAndWalkInList(ListNum).CaseItemNum)) CaseAndWalkInList(ListNum).CaseItemNum.allocate(NumTotalLoadsOnList); if (!allocated(CaseAndWalkInList(ListNum).CoilItemNum)) CaseAndWalkInList(ListNum).CoilItemNum.allocate(NumTotalLoadsOnList); - NumCasesOnList = 0; - NumCoilsOnList = 0; - NumWalkInsOnList = 0; + int NumCasesOnList = 0; + int NumCoilsOnList = 0; + int NumWalkInsOnList = 0; int LoadCount = 0; - for (NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { + for (int NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { int AlphaListNum = 1 + NumLoad; if (!lAlphaBlanks(AlphaListNum)) { ++LoadCount; @@ -2661,7 +2592,7 @@ namespace RefrigeratedCase { CurrentModuleObject = "Refrigeration:CompressorRack"; - for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { + for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { inputProcessor->getObjectItem(CurrentModuleObject, RackNum, @@ -2996,7 +2927,7 @@ namespace RefrigeratedCase { // however, won't matter if walk-in specified if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone && RefrigRack(RackNum).NumCases > 1 && RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum != 0 && NumWalkIns < 1 && NumCoils < 1) { - ZoneNum = RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum; + int ZoneNum = RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum; for (int caseIndex = 2; caseIndex <= RefrigRack(RackNum).NumCases; ++caseIndex) { if (RefrigCase(RefrigRack(RackNum).CaseNum(caseIndex)).ActualZoneNum == ZoneNum) continue; ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + @@ -3020,8 +2951,8 @@ namespace RefrigeratedCase { } // numcoils > 0 if (NumWalkIns > 0) { - for (WalkInIndex = 1; WalkInIndex <= NumWalkIns; ++WalkInIndex) { - WalkInID = RefrigRack(RackNum).WalkInNum(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= NumWalkIns; ++WalkInIndex) { + int WalkInID = RefrigRack(RackNum).WalkInNum(WalkInIndex); // mark all WalkIns on rack as used by this system (checking for unused or non-unique WalkIns) ++WalkIn(WalkInID).NumSysAttach; // determine total capacity on rack @@ -3127,8 +3058,8 @@ namespace RefrigeratedCase { Condenser(CondNum).RatedCapacity *= (1.0 - 7.17e-5 * DataEnvironment::Elevation); if (Condenser(CondNum).RatedCapacity > 0.0) { CurveManager::GetCurveMinMaxValues(Condenser(CondNum).CapCurvePtr, DelTempMin, DelTempMax); - Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug fix - Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug + Real64 Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug fix + Real64 Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug Condenser(CondNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); // * ( 1.0 - 7.17e-5 * DataEnvironment::Elevation ) ) //Mar 2011 bug fix Condenser(CondNum).MinCondLoad = Capmax - DelTempMax / Condenser(CondNum).TempSlope; @@ -3709,8 +3640,8 @@ namespace RefrigeratedCase { GasCooler(GCNum).RatedCapacity *= (1.0 - 7.17e-5 * DataEnvironment::Elevation); if (GasCooler(GCNum).RatedCapacity > 0.0) { CurveManager::GetCurveMinMaxValues(GasCooler(GCNum).CapCurvePtr, DelTempMin, DelTempMax); - Capmin = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); - Capmax = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); + Real64 Capmin = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); + Real64 Capmax = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); GasCooler(GCNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); GasCooler(GCNum).MinCondLoad = Capmax - DelTempMax / GasCooler(GCNum).TempSlope; } else { @@ -3841,7 +3772,7 @@ namespace RefrigeratedCase { //************ START SECONDARY LOOP INPUT (before system input) ************** if (NumSimulationSecondarySystems > 0) { CurrentModuleObject = "Refrigeration:SecondarySystem"; - for (SecondaryNum = 1; SecondaryNum <= NumSimulationSecondarySystems; ++SecondaryNum) { + for (int SecondaryNum = 1; SecondaryNum <= NumSimulationSecondarySystems; ++SecondaryNum) { inputProcessor->getObjectItem(CurrentModuleObject, SecondaryNum, Alphas, @@ -3858,12 +3789,12 @@ namespace RefrigeratedCase { Secondary(SecondaryNum).Name = Alphas(1); // Find the loads on the secondary loop: can be input in form of case or walkin or CaseAndWalkInList names - NominalTotalCaseCap = 0.0; + Real64 NominalTotalCaseCap = 0.0; NumCases = 0; - NominalTotalCoilCap = 0.0; + Real64 NominalTotalCoilCap = 0.0; int NumCoils = 0; NumWalkIns = 0; - NominalTotalWalkInCap = 0.0; + Real64 NominalTotalWalkInCap = 0.0; Secondary(SecondaryNum).RefInventory = 0.0; // Read display case and walkin assignments for this secondary @@ -3970,9 +3901,9 @@ namespace RefrigeratedCase { if (NumWalkIns > 0) { // Find lowest design T loop fluid out of secondary chiller // Sum rated capacity of all WalkIns on Secondary - for (WalkInIndex = 1; WalkInIndex <= NumWalkIns; ++WalkInIndex) { + for (int WalkInIndex = 1; WalkInIndex <= NumWalkIns; ++WalkInIndex) { // mark all WalkIns on Secondary as used by this Secondary - checking for unused or non-unique WalkIns - WalkInID = Secondary(SecondaryNum).WalkInNum(WalkInIndex); + int WalkInID = Secondary(SecondaryNum).WalkInNum(WalkInIndex); ++WalkIn(WalkInID).NumSysAttach; NominalTotalWalkInCap += WalkIn(WalkInID).DesignRatedCap; Secondary(SecondaryNum).RefInventory += WalkIn(WalkInID).DesignRefrigInventory; @@ -4033,6 +3964,12 @@ namespace RefrigeratedCase { "\", Program terminated due to previous condition(s)."); } // ErrorsFound + Real64 CpBrineRated = 0.0; + Real64 PumpTotRatedFlowVol(0.0); // Rated flow from input pump data, m3/s + Real64 SecondaryFlowVolRated(0.0); // Rated flow of secondary fluid, used to calculate capacity (m3/s) + Real64 TBrineOutRated(0.0); // Rated temperature of circ fluid LEAVING heat exchanger,C + Real64 TBrineInRated(0.0); // Rated temperature of circ fluid going INTO heat exchanger, C + if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { if (!lNumericBlanks(5)) { Secondary(SecondaryNum).TRangeDifRated = Numbers(5); @@ -4058,12 +3995,13 @@ namespace RefrigeratedCase { // Users can input either design brine flow (m3/s), or capacity in W, or both. Now have // temperatures needed to calculate either the loop cooling capacity or fluid flow rate, if one was not input // Don't need to save as a flow vol as a permanent var because calc whichever is missing here + Real64 FlowMassRated(0.0); // Design mass flow rate of circ fluid in secondary loop(kg/s) if ((!lNumericBlanks(1)) && (!lNumericBlanks(2))) { // Both values input, check for approximate agreement Secondary(SecondaryNum).CoolingLoadRated = Numbers(1); SecondaryFlowVolRated = Numbers(2); FlowMassRated = SecondaryFlowVolRated * DensityBrineRated; - NominalSecondaryCapacity = FlowMassRated * CpBrineRated * Secondary(SecondaryNum).TRangeDifRated; + Real64 NominalSecondaryCapacity = FlowMassRated * CpBrineRated * Secondary(SecondaryNum).TRangeDifRated; TestDelta = (NominalSecondaryCapacity - Secondary(SecondaryNum).CoolingLoadRated) / NominalSecondaryCapacity; if (std::abs(TestDelta) > 0.2) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + @@ -4137,13 +4075,13 @@ namespace RefrigeratedCase { TrackMessageAlt); // TotRatedFlowVol= capacity*circrate/deltahphasechange/density - CalcTotFlowVol = + Real64 CalcTotFlowVol = Secondary(SecondaryNum).CoolingLoadRated * Secondary(SecondaryNum).CircRate / (DensityPhaseChange * DeltaHPhaseChange); PumpTotRatedFlowVol = CalcTotFlowVol; if (!lNumericBlanks(7)) { PumpTotRatedFlowVol = Numbers(7); - CalcCircRate = DensityPhaseChange * DeltaHPhaseChange * PumpTotRatedFlowVol / Secondary(SecondaryNum).CoolingLoadRated; - DiffCircRates = (CalcCircRate - Secondary(SecondaryNum).CircRate) / Secondary(SecondaryNum).CircRate; + Real64 CalcCircRate = DensityPhaseChange * DeltaHPhaseChange * PumpTotRatedFlowVol / Secondary(SecondaryNum).CoolingLoadRated; + Real64 DiffCircRates = (CalcCircRate - Secondary(SecondaryNum).CircRate) / Secondary(SecondaryNum).CircRate; if (std::abs(DiffCircRates) > 0.3) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + ' ' + cNumericFieldNames(7) + " Produces a circulating rate of " + General::RoundSigDigits(CalcCircRate, 2) + " ; A circulating rate of " + @@ -4163,10 +4101,12 @@ namespace RefrigeratedCase { // Assume pump impeller efficiency is 0.78 (consistent with E+ Pump auto sizing assumption) // Assume pump motor efficiency is 0.85 (Goulds Pumps motor data sheet) // It is important that tot rated head must be for specific fluid + Real64 PumpTotRatedHead(0.0); // Total pump rated head on secondary loop (Pa) + if ((!lNumericBlanks(8)) && (!lNumericBlanks(9))) { Secondary(SecondaryNum).PumpTotRatedPower = Numbers(8); PumpTotRatedHead = Numbers(9); - ErrSecondPumpPower = (Secondary(SecondaryNum).PumpTotRatedPower - + Real64 ErrSecondPumpPower = (Secondary(SecondaryNum).PumpTotRatedPower - PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency)) / Secondary(SecondaryNum).PumpTotRatedPower; if (std::abs(ErrSecondPumpPower) > 0.35) @@ -4345,7 +4285,7 @@ namespace RefrigeratedCase { // (don't include dist piping or receiver heat gains). // Load limit logic here (maxvolflow and maxload used in calcs later) Secondary(SecondaryNum).MaxVolFlow = min(SecondaryFlowVolRated, PumpTotRatedFlowVol); - NominalSecondaryRefLoad = NominalTotalCaseCap + NominalTotalWalkInCap + Secondary(SecondaryNum).PumpTotRatedPower; + Real64 NominalSecondaryRefLoad = NominalTotalCaseCap + NominalTotalWalkInCap + Secondary(SecondaryNum).PumpTotRatedPower; if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { if (TBrineOutRated > (Secondary(SecondaryNum).TMinNeeded + 0.5)) { @@ -4357,10 +4297,10 @@ namespace RefrigeratedCase { " Compare your Approach and Evaporating Temperature to the design inlet temperatures needed for the loads."); // ErrorsFound = .TRUE. } // Tbrine out warning - CapacityAtMaxVolFlow = Secondary(SecondaryNum).MaxVolFlow * Secondary(SecondaryNum).HeatExchangeEta * + Real64 CapacityAtMaxVolFlow = Secondary(SecondaryNum).MaxVolFlow * Secondary(SecondaryNum).HeatExchangeEta * (CpBrineRated * DensityBrineRated) * (TBrineInRated - Secondary(SecondaryNum).TEvapDesign); Secondary(SecondaryNum).MaxLoad = min(Secondary(SecondaryNum).CoolingLoadRated, CapacityAtMaxVolFlow); - DeltaCap1 = + Real64 DeltaCap1 = std::abs((Secondary(SecondaryNum).CoolingLoadRated - CapacityAtMaxVolFlow) / Secondary(SecondaryNum).CoolingLoadRated); if (DeltaCap1 > (0.3)) { // diff between chiller rating and capacity at max flow > 30% ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + @@ -4390,7 +4330,7 @@ namespace RefrigeratedCase { Secondary(SecondaryNum).MaxLoad = Secondary(SecondaryNum).CoolingLoadRated; } // SecFluidType - DeltaCap2 = + Real64 DeltaCap2 = std::abs((Secondary(SecondaryNum).CoolingLoadRated - NominalSecondaryRefLoad) / Secondary(SecondaryNum).CoolingLoadRated); if (DeltaCap2 > (0.3)) { // diff between chiller rating and sum of nominal loads > 30% ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + @@ -4513,7 +4453,7 @@ namespace RefrigeratedCase { if (NumSimulationSubcoolers > 0) { CurrentModuleObject = "Refrigeration:Subcooler"; NumSimulationMechSubcoolers = 0; - for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { + for (int SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { inputProcessor->getObjectItem(CurrentModuleObject, SubcoolerNum, Alphas, @@ -4616,15 +4556,15 @@ namespace RefrigeratedCase { // Transfer load list alphas include TransferLoadList name and one name for each Secondary or Cascade Condenser in list // below allocates larger than needed (each allocated to sum of both), but avoids two loops through input fields - NumTotalLoadsOnList = NumAlphas - 1; + int NumTotalLoadsOnList = NumAlphas - 1; if (!allocated(TransferLoadList(ListNum).CascadeLoadItemNum)) TransferLoadList(ListNum).CascadeLoadItemNum.allocate(NumTotalLoadsOnList); if (!allocated(TransferLoadList(ListNum).SecondaryItemNum)) TransferLoadList(ListNum).SecondaryItemNum.allocate(NumTotalLoadsOnList); - NumSecondarysOnList = 0; - NumCascadeLoadsOnList = 0; - for (NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { + int NumSecondarysOnList = 0; + int NumCascadeLoadsOnList = 0; + for (int NumLoad = 1; NumLoad <= NumTotalLoadsOnList; ++NumLoad) { int AlphaListNum = 1 + NumLoad; int LoadCascadeNum = 0; int LoadSecondaryNum = 0; @@ -4733,12 +4673,12 @@ namespace RefrigeratedCase { System(RefrigSysNum).NumSecondarys = 0; System(RefrigSysNum).NumCascadeLoads = 0; System(RefrigSysNum).NumNonCascadeLoads = 0; - NominalTotalCaseCap = 0.0; - NominalTotalCoilCap = 0.0; - NominalTotalWalkInCap = 0.0; - NominalTotalSecondaryCap = 0.0; - NominalTotalCoolingCap = 0.0; - NominalTotalCascadeLoad = 0.0; + Real64 NominalTotalCaseCap = 0.0; + Real64 NominalTotalCoilCap = 0.0; + Real64 NominalTotalWalkInCap = 0.0; + Real64 NominalTotalSecondaryCap = 0.0; + Real64 NominalTotalCoolingCap = 0.0; + Real64 NominalTotalCascadeLoad = 0.0; System(RefrigSysNum).RefInventory = 0.0; // Check for case or walkin or CaseAndWalkInList names @@ -4845,8 +4785,8 @@ namespace RefrigeratedCase { } // NumCoils > 0 if (NumWalkIns > 0) { - for (WalkInIndex = 1; WalkInIndex <= NumWalkIns; ++WalkInIndex) { - WalkInID = System(RefrigSysNum).WalkInNum(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= NumWalkIns; ++WalkInIndex) { + int WalkInID = System(RefrigSysNum).WalkInNum(WalkInIndex); // mark all WalkIns on rack as used by this system (checking for unused or non-unique WalkIns) ++WalkIn(WalkInID).NumSysAttach; NominalTotalWalkInCap += WalkIn(WalkInID).DesignRatedCap; @@ -4879,8 +4819,8 @@ namespace RefrigeratedCase { if (!lAlphaBlanks(AlphaNum)) { // Entry for Alphas(AlphaNum) can be either a Secondary, CascadeLoad name or a TransferLoadList name - TransferLoadListNum = 0; - SecondaryNum = 0; + int TransferLoadListNum = 0; + int SecondaryNum = 0; int CascadeLoadNum = 0; if (NumSimulationTransferLoadLists > 0) TransferLoadListNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), TransferLoadList); if (NumSimulationSecondarySystems > 0) SecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaNum), Secondary); @@ -4927,8 +4867,8 @@ namespace RefrigeratedCase { System(RefrigSysNum).CoilFlag = false; // Now need to loop through all transfer loads to see if they change the minimum required system evaporating temperature if (NumSecondary > 0) { - for (SecondaryIndex = 1; SecondaryIndex <= NumSecondary; ++SecondaryIndex) { - SecondaryID = System(RefrigSysNum).SecondaryNum(SecondaryIndex); + for (int SecondaryIndex = 1; SecondaryIndex <= NumSecondary; ++SecondaryIndex) { + int SecondaryID = System(RefrigSysNum).SecondaryNum(SecondaryIndex); if (SecondaryIndex == 1) { // check for consistency of loads (coils calc on sys time step, all others on zone time step) if (Secondary(SecondaryID).CoilFlag) System(RefrigSysNum).CoilFlag = true; } else if (Secondary(SecondaryID).CoilFlag != System(RefrigSysNum).CoilFlag) { @@ -5317,11 +5257,11 @@ namespace RefrigeratedCase { // Determine intercooler pressure and temperature at design conditions if (System(RefrigSysNum).NumStages == 2) { - PCond = FluidProperties::GetSatPressureRefrig(System(RefrigSysNum).RefrigerantName, + Real64 PCond = FluidProperties::GetSatPressureRefrig(System(RefrigSysNum).RefrigerantName, Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense, System(RefrigSysNum).RefIndex, RoutineName); - PEvap = FluidProperties::GetSatPressureRefrig( + Real64 PEvap = FluidProperties::GetSatPressureRefrig( System(RefrigSysNum).RefrigerantName, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).RefIndex, RoutineName); System(RefrigSysNum).PIntercooler = std::sqrt(PCond * PEvap); System(RefrigSysNum).TIntercooler = FluidProperties::GetSatTemperatureRefrig( @@ -5329,7 +5269,7 @@ namespace RefrigeratedCase { } // NumStages // Sum capacity of single-stage compressors or low-stage compressors if two-stage system - NominalTotalCompCap = 0.0; + Real64 NominalTotalCompCap = 0.0; for (int CompIndex = 1; CompIndex <= NumCompressorsSys; ++CompIndex) { int CompNum = System(RefrigSysNum).CompressorNum(CompIndex); if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor @@ -5354,6 +5294,8 @@ namespace RefrigeratedCase { } // .NOT. Compressor(CompNum)%TransFlag } + Real64 NominalTotalHiStageCompCap(0.0); // Total of nominal high-stage compressor capacities, used for rough input check (W) + // Sum capacity of high-stage compressors if two stage system if (System(RefrigSysNum).NumStages == 2) { for (int CompIndex = 1; CompIndex <= NumHiStageCompressorsSys; ++CompIndex) { @@ -5376,7 +5318,7 @@ namespace RefrigeratedCase { // Compare the rated capacity of compressor, condenser, and cases. // Note, rated capacities can be far off from operating capacities, but rough check. - NominalCondCap = Condenser(System(RefrigSysNum).CondenserNum(1)).RatedCapacity; + Real64 NominalCondCap = Condenser(System(RefrigSysNum).CondenserNum(1)).RatedCapacity; if (System(RefrigSysNum).SystemRejectHeatToZone) NominalCondCap *= 2.0; if (System(RefrigSysNum).NumStages == 1) { // Single-stage system if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { @@ -5431,7 +5373,7 @@ namespace RefrigeratedCase { } else { // %coilflag == false, so no coil loads prev identified directly or through secondary loop // Flag to help verify load type with loads served by systems cooled by cascade condensers bool CaseLoads = false; - NumCascadeLoadsChecked = 0; + int NumCascadeLoadsChecked = 0; for (int CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { // look at All cascade condenser loads on system if (Condenser(CondID).CondenserType != DataHeatBalance::RefrigCondenserTypeCascade) continue; if (RefrigSysNum != Condenser(CondID).CascadeSinkSystemID) continue; // this condenser is not a cascade load on this system @@ -5465,7 +5407,7 @@ namespace RefrigeratedCase { // after the systems have been read, can finish the mechanical subcooler/system interactions // System%NumMechSCServed=0 if (NumSimulationSubcoolers > 0) { - for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { + for (int SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { if (Subcooler(SubcoolerNum).SubcoolerType == LiquidSuction) continue; Subcooler(SubcoolerNum).MechSourceSysID = inputProcessor->getObjectItemNum("Refrigeration:System", Subcooler(SubcoolerNum).MechSourceSys); @@ -5486,7 +5428,7 @@ namespace RefrigeratedCase { } // numsubcoolers for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { - for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { + for (int SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { if (Subcooler(SubcoolerNum).SubcoolerType == LiquidSuction) continue; if (Subcooler(SubcoolerNum).MechSourceSysID == RefrigSysNum) { ++System(RefrigSysNum).NumMechSCServed; @@ -5502,7 +5444,7 @@ namespace RefrigeratedCase { if (NumTransRefrigSystems > 0) { CurrentModuleObject = "Refrigeration:TranscriticalSystem"; - for (TransRefrigSysNum = 1; TransRefrigSysNum <= NumTransRefrigSystems; ++TransRefrigSysNum) { + for (int TransRefrigSysNum = 1; TransRefrigSysNum <= NumTransRefrigSystems; ++TransRefrigSysNum) { inputProcessor->getObjectItem(CurrentModuleObject, TransRefrigSysNum, Alphas, @@ -5569,13 +5511,13 @@ namespace RefrigeratedCase { TransSystem(TransRefrigSysNum).NumCasesLT = 0; int NumWalkInsMT = 0; TransSystem(TransRefrigSysNum).NumWalkInsMT = 0; - NumWalkInsLT = 0; + int NumWalkInsLT = 0; TransSystem(TransRefrigSysNum).NumWalkInsLT = 0; - NominalTotalCaseCapMT = 0.0; - NominalTotalCaseCapLT = 0.0; - NominalTotalWalkInCapMT = 0.0; - NominalTotalWalkInCapLT = 0.0; - NominalTotalCoolingCap = 0.0; + Real64 NominalTotalCaseCapMT = 0.0; + Real64 NominalTotalCaseCapLT = 0.0; + Real64 NominalTotalWalkInCapMT = 0.0; + Real64 NominalTotalWalkInCapLT = 0.0; + Real64 NominalTotalCoolingCap = 0.0; TransSystem(TransRefrigSysNum).RefInventory = 0.0; // Check for Medium Temperature Case or Walk-In or CaseAndWalkInList names @@ -5654,8 +5596,8 @@ namespace RefrigeratedCase { } // NumcasesMT > 0 if (NumWalkInsMT > 0) { - for (WalkInIndex = 1; WalkInIndex <= NumWalkInsMT; ++WalkInIndex) { - WalkInID = TransSystem(TransRefrigSysNum).WalkInNumMT(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= NumWalkInsMT; ++WalkInIndex) { + int WalkInID = TransSystem(TransRefrigSysNum).WalkInNumMT(WalkInIndex); // mark all WalkIns on rack as used by this system (checking for unused or non-unique WalkIns) ++WalkIn(WalkInID).NumSysAttach; NominalTotalWalkInCapMT += WalkIn(WalkInID).DesignRatedCap; @@ -5757,8 +5699,8 @@ namespace RefrigeratedCase { } // NumcasesLT > 0 if (NumWalkInsLT > 0) { - for (WalkInIndex = 1; WalkInIndex <= NumWalkInsLT; ++WalkInIndex) { - WalkInID = TransSystem(TransRefrigSysNum).WalkInNumLT(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= NumWalkInsLT; ++WalkInIndex) { + int WalkInID = TransSystem(TransRefrigSysNum).WalkInNumLT(WalkInIndex); // mark all WalkIns on rack as used by this system (checking for unused or non-unique WalkIns) ++WalkIn(WalkInID).NumSysAttach; NominalTotalWalkInCapLT += WalkIn(WalkInID).DesignRatedCap; @@ -5849,7 +5791,7 @@ namespace RefrigeratedCase { CompNum = TransSystem(TransRefrigSysNum).CompressorNumHP(CompIndex); if (Compressor(CompNum).TransFlag) { // Calculate nominal capacity of transcritical Compressor - GCOutletH = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(TransRefrigSysNum).RefrigerantName, + Real64 GCOutletH = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(TransRefrigSysNum).RefrigerantName, GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletT, GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletP, RefrigIndex, @@ -5870,6 +5812,7 @@ namespace RefrigeratedCase { // Read Low Pressure Compressor AlphaNum = 7; NumCompressorsSys = 0; + if ((lAlphaBlanks(AlphaNum)) && (TransSystem(TransRefrigSysNum).TransSysType == 2)) { // TwoStage system type is specified but low pressure compressor input is blank ShowSevereError(RoutineName + CurrentModuleObject + ", The transcritical refrigeration system, \"" + @@ -6047,8 +5990,8 @@ namespace RefrigeratedCase { // Compare the rated capacity of compressor, condenser, and cases. // Note, rated capacities can be far off from operating capacities, but rough check. - NominalCondCap = GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedCapacity; - NominalTotalCompCap = NominalTotalCompCapHP + NominalTotalCompCapLP; + Real64 NominalCondCap = GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedCapacity; + Real64 NominalTotalCompCap = NominalTotalCompCapHP + NominalTotalCompCapLP; if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", You may wish to check the system sizing."); @@ -6072,7 +6015,7 @@ namespace RefrigeratedCase { if (NumSimulationCases > 0) { // Find unused and non-unique display case objects to report in eio and err file and sum // all HVAC RA fractions and write error message if greater than 1 for any zone - for (ZoneIndex = 1; ZoneIndex <= DataGlobals::NumOfZones; ++ZoneIndex) { // numofzones from dataglobals + for (int ZoneIndex = 1; ZoneIndex <= DataGlobals::NumOfZones; ++ZoneIndex) { // numofzones from dataglobals TempRAFraction = CaseRAFraction(ZoneIndex).TotalCaseRAFraction; for (int CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { // TempRaFraction already includes contributions from ALL cases in zone @@ -6224,7 +6167,7 @@ namespace RefrigeratedCase { // check for refrigeration Secondarys not connected to detailed systems and // refrigeration Secondarys connected more than once NumUnusedSecondarys = 0; - for (SecondaryNum = 1; SecondaryNum <= NumSimulationSecondarySystems; ++SecondaryNum) { + for (int SecondaryNum = 1; SecondaryNum <= NumSimulationSecondarySystems; ++SecondaryNum) { if (Secondary(SecondaryNum).NumSysAttach == 1) continue; if (Secondary(SecondaryNum).NumSysAttach < 1) { ++NumUnusedSecondarys; From 4f7e33a34e5acbed6d8799ab8a899db663e15282 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 2 Jan 2020 12:53:14 -0700 Subject: [PATCH 51/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 231 ++++++++++++----------------- 1 file changed, 91 insertions(+), 140 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 04dc4e2dc2f..58cbdb1217a 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -608,9 +608,6 @@ namespace RefrigeratedCase { Real64 DensityPhaseChange(0.0); // Secondary loop density at condensing temperature w overfeed system (g/m3) Real64 NominalTotalCompCapLP(0.0); // Total of nominal low pressure compressor capacities, used for rough input check (W) (Transcritical CO2) Real64 NominalTotalCompCapHP(0.0); - static Real64 TBrineAverage(0.0); // Rated average of inlet and outlet temps, used for property look up, C - static Real64 TempRAFraction(0.0); // Temporary sum of Return Air fraction per zone for reporting - static Real64 TestDelta(0.0); // Used to compare secondary loop rated capacity to calculated capacity, fraction Array1D Numbers; // Numeric items for object Array2D DayValues; // Array of schedule values @@ -3983,7 +3980,7 @@ namespace RefrigeratedCase { // Get fluid properties at rated conditions, will be used to calculate ht exchgr effectiveness TBrineOutRated = Secondary(SecondaryNum).TEvapDesign + Secondary(SecondaryNum).TApproachDifRated; TBrineInRated = TBrineOutRated + Secondary(SecondaryNum).TRangeDifRated; - TBrineAverage = (TBrineOutRated + TBrineInRated) / 2.0; + Real64 TBrineAverage = (TBrineOutRated + TBrineInRated) / 2.0; Secondary(SecondaryNum).TBrineAverage = TBrineAverage; DensityBrineRated = FluidProperties::GetDensityGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); @@ -4002,7 +3999,7 @@ namespace RefrigeratedCase { SecondaryFlowVolRated = Numbers(2); FlowMassRated = SecondaryFlowVolRated * DensityBrineRated; Real64 NominalSecondaryCapacity = FlowMassRated * CpBrineRated * Secondary(SecondaryNum).TRangeDifRated; - TestDelta = (NominalSecondaryCapacity - Secondary(SecondaryNum).CoolingLoadRated) / NominalSecondaryCapacity; + Real64 TestDelta = (NominalSecondaryCapacity - Secondary(SecondaryNum).CoolingLoadRated) / NominalSecondaryCapacity; if (std::abs(TestDelta) > 0.2) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + " You may wish to check the system definition. Based upon the design flow rate and range " @@ -6016,7 +6013,7 @@ namespace RefrigeratedCase { // Find unused and non-unique display case objects to report in eio and err file and sum // all HVAC RA fractions and write error message if greater than 1 for any zone for (int ZoneIndex = 1; ZoneIndex <= DataGlobals::NumOfZones; ++ZoneIndex) { // numofzones from dataglobals - TempRAFraction = CaseRAFraction(ZoneIndex).TotalCaseRAFraction; + Real64 TempRAFraction = CaseRAFraction(ZoneIndex).TotalCaseRAFraction; for (int CaseNum = 1; CaseNum <= NumSimulationCases; ++CaseNum) { // TempRaFraction already includes contributions from ALL cases in zone // Want to delete portion from unused cases (numsysattach = 0)that will never be simulated @@ -9147,17 +9144,13 @@ namespace RefrigeratedCase { static std::string const RoutineName("InitRefrigerationPlantConnections"); static bool MyBeginEnvrnFlag(true); - static bool errFlag(false); - static int RefCondLoop(0); // loop over Condenser - static int RefCompRackLoop(0); // loop over RefrigRack - Real64 rho; // local fluid property for cooling water // initialize plant topology information, if applicable if (MyReferPlantScanFlag && allocated(DataPlant::PlantLoop)) { - for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { + for (int RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - errFlag = false; + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(Condenser(RefCondLoop).Name, DataPlant::TypeOf_RefrigSystemWaterCondenser, Condenser(RefCondLoop).PlantLoopNum, @@ -9174,7 +9167,7 @@ namespace RefrigeratedCase { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9186,10 +9179,10 @@ namespace RefrigeratedCase { } } - for (RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { + for (int RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - errFlag = false; + bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(RefrigRack(RefCompRackLoop).Name, DataPlant::TypeOf_RefrigerationWaterCoolRack, RefrigRack(RefCompRackLoop).PlantLoopNum, @@ -9206,7 +9199,7 @@ namespace RefrigeratedCase { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9227,10 +9220,10 @@ namespace RefrigeratedCase { // do plant inits, if applicable if (!MyReferPlantScanFlag) { - for (RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { + for (int RefCondLoop = 1; RefCondLoop <= DataHeatBalance::NumRefrigCondensers; ++RefCondLoop) { if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9250,10 +9243,10 @@ namespace RefrigeratedCase { Condenser(RefCondLoop).PlantBranchNum, Condenser(RefCondLoop).PlantCompNum); } - for (RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { + for (int RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, 20.0, DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, RoutineName); @@ -9317,10 +9310,6 @@ namespace RefrigeratedCase { Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] bool EvapAvail; // Control for evap condenser availability - static int CoilSetIndex(0); // Index to set of coils in a single zone - static int CoilSetID(0); // Index to set of coils in a single zone (shared inlet and outlet nodes) - static int CoilIndex(0); // Index to a single air chiller/coil - static int CoilID(0); // Index to a single air chiller/coil NumCases = RefrigRack(RackNum).NumCases; TotalRackDeliveredCapacity = 0.0; @@ -9350,15 +9339,14 @@ namespace RefrigeratedCase { // however, be repeated when the last chiller set is called from ZoneEquipmentManager // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { - for (CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { - CoilSetID = CoilSetIndex; - CalculateAirChillerSets(CoilSetID); + for (int CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { + CalculateAirChillerSets(CoilSetIndex); } } if (RefrigRack(RackNum).NumCoils > 0) { - for (CoilIndex = 1; CoilIndex <= RefrigRack(RackNum).NumCoils; ++CoilIndex) { - CoilID = RefrigRack(RackNum).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= RefrigRack(RackNum).NumCoils; ++CoilIndex) { + int CoilID = RefrigRack(RackNum).CoilNum(CoilIndex); // already CALLed CalculateCoil(CoilID) in CoilSet specified order // increment TotalCoolingLoad for Compressors/condenser on each system TotalRackDeliveredCapacity += WarehouseCoil(CoilID).TotalCoolingLoad; @@ -9563,11 +9551,7 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report compressor rack variables - static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems - static int DemandARRID(0); // Index to water tank Demand used for evap condenser on rack - static int RackTankID(0); // Index to water tank used for evap condenser on rack - - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; RefrigRack(RackNum).RackCompressorPower = TotalCompressorPower; @@ -9598,8 +9582,8 @@ namespace RefrigeratedCase { // set water system demand request (if needed) if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { - DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; - RackTankID = RefrigRack(RackNum).EvapWaterSupTankID; + int DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; + int RackTankID = RefrigRack(RackNum).EvapWaterSupTankID; DataWater::WaterStorage(RackTankID).VdotRequestDemand(DemandARRID) = RefrigRack(RackNum).EvapWaterConsumpRate; } @@ -9643,14 +9627,6 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - static Real64 CaseRAFraction(0.0); // Fraction of case credits applied to return air - - static int ActualZoneNum(0); // Index to zone - static int DefCapCurvePtr(0); - static int DefrostEnergyCurveType(0); - static int DefrostType(0); - static int ZoneNodeNum(0); // Zone node number - static Real64 CapAvail(0.0); // capacity available to meet current and stored load (W) static Real64 CaseCreditFraction(0.0); // Reduction in case credits due to e.g., reduced door openings at night static Real64 CaseSenCreditToZone(0.0); // Amount of sensible case credit applied to zone load (W) static Real64 CaseLatCreditToZone(0.0); // Amount of latent case credit applied to zone load (W) @@ -9746,8 +9722,8 @@ namespace RefrigeratedCase { TotalFan = 0.0; // Set local subroutine variables for convenience - ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; - ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; + int ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; + int ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); Length = RefrigCase(CaseID).Length; @@ -9756,9 +9732,9 @@ namespace RefrigeratedCase { DesignLatentCap = RefrigCase(CaseID).DesignLatentCap; DesignDefrostCap = RefrigCase(CaseID).DesignDefrostCap; DesignLighting = RefrigCase(CaseID).DesignLighting; - DefCapCurvePtr = RefrigCase(CaseID).DefCapCurvePtr; - DefrostEnergyCurveType = RefrigCase(CaseID).DefrostEnergyCurveType; - DefrostType = RefrigCase(CaseID).DefrostType; + int DefCapCurvePtr = RefrigCase(CaseID).DefCapCurvePtr; + int DefrostEnergyCurveType = RefrigCase(CaseID).DefrostEnergyCurveType; + int DefrostType = RefrigCase(CaseID).DefrostType; RatedAmbientRH = RefrigCase(CaseID).RatedAmbientRH; // GET ALL SCHEDULES (note all schedules can be fractions if on/off a portion of time step) @@ -9941,7 +9917,7 @@ namespace RefrigeratedCase { LoadRequested = TotalLoad_Actual + StoredEnergyRate; // prorate available cooling capacity for portion of time off due to drip down. - CapAvail = DesignRatedCap * (1.0 - DefrostDripDownSchedule); + Real64 CapAvail = DesignRatedCap * (1.0 - DefrostDripDownSchedule); if (CapAvail >= LoadRequested) { // Have more at least as much capacity available as needed, even counting stored energy TotalCap_Actual = LoadRequested; @@ -9959,8 +9935,8 @@ namespace RefrigeratedCase { // Reset DefrostLoad_Actual to zero for non-electric defrost types, for reporting purposes if (DefrostType != DefElectric && DefrostType != DefElectricOnDemand && DefrostType != DefElectricTerm) DefrostCap_Actual = 0.0; - CaseRAFraction = min(0.8, RefrigCase(CaseID).RAFrac); - CaseRAFactor = (1.0 - ((0.8 - CaseRAFraction) / 0.8)) * 0.5; + Real64 caseRAFraction = min(0.8, RefrigCase(CaseID).RAFrac); + CaseRAFactor = (1.0 - ((0.8 - caseRAFraction) / 0.8)) * 0.5; // Update globals for use in ZoneTemperaturePredictorCorrector (Air Heat Balance) and // Zone Equipment Manager. Sum case credits to zone and case credits to HVAC @@ -10118,22 +10094,6 @@ namespace RefrigeratedCase { // Flow is requested and the actual available flow is set. The outlet temperature is calculated. static std::string const RoutineName("SimRefrigCondenser"); - static Real64 DeltaT(0.0); - static Real64 InletTemp(0.0); - static Real64 DesVolFlowRate(0.0); - static Real64 MassFlowRate(0.0); - static Real64 MassFlowRateMax(0.0); - static Real64 OutletTempMax(0.0); - static Real64 VolFlowRate(0.0); - static Real64 OutletTemp(0.0); - static int FlowType(0); - static int NoFlowWarnIndex(0); - static int HighFlowWarnIndex(0); - static int HighInletWarnIndex(0); - static int HighTempWarnIndex(0); - static std::string Name; - static std::string TypeName; - static std::string ErrIntro; int PlantInletNode(0); // Autodesk:Init int PlantOutletNode(0); int PlantLoopIndex(0); // Autodesk:Init @@ -10203,6 +10163,21 @@ namespace RefrigeratedCase { InitRefrigerationPlantConnections(); + Real64 InletTemp(0.0); + Real64 DesVolFlowRate(0.0); + Real64 MassFlowRate(0.0); + Real64 MassFlowRateMax(0.0); + Real64 OutletTempMax(0.0); + Real64 VolFlowRate(0.0); + int FlowType(0); + int NoFlowWarnIndex(0); + int HighFlowWarnIndex(0); + int HighInletWarnIndex(0); + int HighTempWarnIndex(0); + std::string Name; + std::string TypeName; + std::string ErrIntro; + // set variables depending upon system type { auto const SELECT_CASE_var(SysType); @@ -10218,12 +10193,7 @@ namespace RefrigeratedCase { DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - RefrigRack(Num).LaggedUsedWaterHeater - RefrigRack(Num).LaggedUsedHVACCoil; FlowType = RefrigRack(Num).FlowType; InletTemp = RefrigRack(Num).InletTemp; - // HighFlowWarn = RefrigRack(Num)%HighFlowWarn - // HighTempWarn = RefrigRack(Num)%HighTempWarn DesVolFlowRate = RefrigRack(Num).DesVolFlowRate; - - // DSU? init mass flow here? - // MassFlowRate = RefrigRack(Num)%MassFlowRate MassFlowRateMax = RefrigRack(Num).MassFlowRateMax; OutletTempMax = RefrigRack(Num).OutletTempMax; Name = RefrigRack(Num).Name; @@ -10234,7 +10204,6 @@ namespace RefrigeratedCase { HighTempWarnIndex = RefrigRack(Num).HighTempWarnIndex; HighInletWarnIndex = RefrigRack(Num).HighInletWarnIndex; } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - // InletNode = Condenser(Num)%InletNode PlantInletNode = Condenser(Num).InletNode; PlantOutletNode = Condenser(Num).OutletNode; PlantLoopIndex = Condenser(Num).PlantLoopNum; @@ -10245,10 +10214,7 @@ namespace RefrigeratedCase { TotalCondenserHeat = Condenser(Num).CondLoad; FlowType = Condenser(Num).FlowType; InletTemp = Condenser(Num).InletTemp; - // HighFlowWarn = Condenser(Num)%HighFlowWarn - // HighTempWarn = Condenser(Num)%HighTempWarn DesVolFlowRate = Condenser(Num).DesVolFlowRate; - // MassFlowRate = Condenser(Num)%MassFlowRate MassFlowRateMax = Condenser(Num).MassFlowRateMax; OutletTempMax = Condenser(Num).OutletTempMax; Name = Condenser(Num).Name; @@ -10271,6 +10237,8 @@ namespace RefrigeratedCase { Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); // first determine desired flow + Real64 OutletTemp(0.0); + if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { if (SysType == DataPlant::TypeOf_RefrigerationWaterCoolRack) { OutletTemp = ScheduleManager::GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); @@ -10288,7 +10256,7 @@ namespace RefrigeratedCase { VolFlowRate = 9999.0; MassFlowRate = VolFlowRate * rho; } else { - DeltaT = OutletTemp - InletTemp; + Real64 DeltaT = OutletTemp - InletTemp; MassFlowRate = TotalCondenserHeat / Cp / DeltaT; // Check for maximum flow in the component if (MassFlowRate > MassFlowRateMax) { @@ -10871,20 +10839,8 @@ namespace RefrigeratedCase { // between independent refrigeration systems. static std::string const RoutineName("SimulateDetailedTransRefrigSystems"); - int SysNum; // Index to the detailed transcritical refrigeration system being modeled - static int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, don't loop - static int LoopNum(0); // Index to overall repeat necessary for mechanical subcoolers - static int CaseID(0); // Absolute reference to case - static int CaseIndex(0); // Index to case - static int CondInletAirZoneNum(0); // Index used to assign zone credits - static int SuctionPipeActualZoneNum(0); // Index to zone exchanging heat with suction pipes - static int WalkInID(0); // Absolute reference to WalkIn - static int WalkInIndex(0); // Index to WalkIn - static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone - static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps - Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C - LocalTimeStep = DataGlobals::TimeStepZone; + int LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Do transcritical CO2 refrigeration system loop outside of iterative solution to initialize time step and @@ -10892,11 +10848,11 @@ namespace RefrigeratedCase { // and prepare initial estimates for the iterative system solution // TransCritSysFlag = .TRUE. - for (SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { + for (int SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step if (TransSystem(SysNum).NumCasesMT > 0) { - for (CaseIndex = 1; CaseIndex <= TransSystem(SysNum).NumCasesMT; ++CaseIndex) { - CaseID = TransSystem(SysNum).CaseNumMT(CaseIndex); + for (int CaseIndex = 1; CaseIndex <= TransSystem(SysNum).NumCasesMT; ++CaseIndex) { + int CaseID = TransSystem(SysNum).CaseNumMT(CaseIndex); CalculateCase(CaseID); // TEvapDesignMT calc in Get Input to meet lowest evap temp of any MT load on the system. // TEvapNeededMT is fixed at this design value. @@ -10908,8 +10864,8 @@ namespace RefrigeratedCase { } // Num of MT cases > 0 if (TransSystem(SysNum).NumCasesLT > 0) { - for (CaseIndex = 1; CaseIndex <= TransSystem(SysNum).NumCasesLT; ++CaseIndex) { - CaseID = TransSystem(SysNum).CaseNumLT(CaseIndex); + for (int CaseIndex = 1; CaseIndex <= TransSystem(SysNum).NumCasesLT; ++CaseIndex) { + int CaseID = TransSystem(SysNum).CaseNumLT(CaseIndex); CalculateCase(CaseID); // TEvapDesignLT calc in Get Input to meet lowest evap temp of any LT load on the system. // TEvapNeededLT is fixed at this design value. @@ -10921,8 +10877,8 @@ namespace RefrigeratedCase { } // Num of LT cases > 0 if (TransSystem(SysNum).NumWalkInsMT > 0) { - for (WalkInIndex = 1; WalkInIndex <= TransSystem(SysNum).NumWalkInsMT; ++WalkInIndex) { - WalkInID = TransSystem(SysNum).WalkInNumMT(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= TransSystem(SysNum).NumWalkInsMT; ++WalkInIndex) { + int WalkInID = TransSystem(SysNum).WalkInNumMT(WalkInIndex); CalculateWalkIn(WalkInID); // TEvapDesignMT calc in Get Input to meet lowest evap temp of any MT load on the system. // TEvapNeededMT is fixed at this design value. @@ -10934,8 +10890,8 @@ namespace RefrigeratedCase { } // TransSystem(SysNum)%NumWalkInsMT > 0 if (TransSystem(SysNum).NumWalkInsLT > 0) { - for (WalkInIndex = 1; WalkInIndex <= TransSystem(SysNum).NumWalkInsLT; ++WalkInIndex) { - WalkInID = TransSystem(SysNum).WalkInNumLT(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= TransSystem(SysNum).NumWalkInsLT; ++WalkInIndex) { + int WalkInID = TransSystem(SysNum).WalkInNumLT(WalkInIndex); CalculateWalkIn(WalkInID); // TEvapDesignLT calc in Get Input to meet lowest evap temp of any LT load on the system. // TEvapNeeded is fixed at this design value. @@ -10951,12 +10907,12 @@ namespace RefrigeratedCase { // gas cooler and compressor loads. TransSystem(SysNum).PipeHeatLoadMT = 0.0; if (TransSystem(SysNum).SumUASuctionPipingMT > MySmallNumber) { - SuctionPipeZoneTemp = DataLoopNode::Node(TransSystem(SysNum).SuctionPipeZoneNodeNumMT).Temp; + Real64 SuctionPipeZoneTemp = DataLoopNode::Node(TransSystem(SysNum).SuctionPipeZoneNodeNumMT).Temp; TransSystem(SysNum).PipeHeatLoadMT = TransSystem(SysNum).SumUASuctionPipingMT * (SuctionPipeZoneTemp - TransSystem(SysNum).TEvapNeededMT); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) - SuctionPipeActualZoneNum = TransSystem(SysNum).SuctionPipeActualZoneNumMT; + int SuctionPipeActualZoneNum = TransSystem(SysNum).SuctionPipeActualZoneNumMT; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { DataHeatBalance::RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= TransSystem(SysNum).PipeHeatLoadMT; @@ -10965,12 +10921,12 @@ namespace RefrigeratedCase { TransSystem(SysNum).PipeHeatLoadLT = 0.0; if (TransSystem(SysNum).SumUASuctionPipingLT > MySmallNumber) { - SuctionPipeZoneTemp = DataLoopNode::Node(TransSystem(SysNum).SuctionPipeZoneNodeNumLT).Temp; + Real64 SuctionPipeZoneTemp = DataLoopNode::Node(TransSystem(SysNum).SuctionPipeZoneNodeNumLT).Temp; TransSystem(SysNum).PipeHeatLoadLT = TransSystem(SysNum).SumUASuctionPipingLT * (SuctionPipeZoneTemp - TransSystem(SysNum).TEvapNeededLT); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) - SuctionPipeActualZoneNum = TransSystem(SysNum).SuctionPipeActualZoneNumLT; + int SuctionPipeActualZoneNum = TransSystem(SysNum).SuctionPipeActualZoneNumLT; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { DataHeatBalance::RefrigCaseCredit(SuctionPipeActualZoneNum).SenCaseCreditToZone -= TransSystem(SysNum).PipeHeatLoadLT; @@ -10983,12 +10939,11 @@ namespace RefrigeratedCase { // transfer between detailed transcritical refrigeration systems // requires additional iteration at this level. - StartMechSubcoolLoop = 3; + int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, don't loop if (NumSimulationSharedGasCoolers > 0) StartMechSubcoolLoop = 1; - for (LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { - - for (SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { + for (int LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { + for (int SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step // only calc detailed system if have load TransSystem(SysNum).TotalSystemLoadMT = TransSystem(SysNum).TotalCoolingLoadMT; @@ -11045,10 +11000,10 @@ namespace RefrigeratedCase { } // LoopNum, three times for buildings with multiple detailed systems connected with shared gas coolers // Unmet load is done outside iterative loop - for (SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { + for (int SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if ((!UseSysTimeStep) && (!DataGlobals::WarmupFlag)) { - CurrentLoads = TransSystem(SysNum).TotalSystemLoad; + Real64 CurrentLoads = TransSystem(SysNum).TotalSystemLoad; // Meeting current and possibly some portion of the previously unmet energy // perhaps future interest in reporting percent of installed capacity used(or number of compressors) ? // If the system compressors were unable to meet the current loads, save energy to be met in succeeding time step @@ -11067,7 +11022,7 @@ namespace RefrigeratedCase { // Zone-located air-cooled gas cooler reject heat also has to be outside iterative loop if (TransSystem(SysNum).SystemRejectHeatToZone) { - CondInletAirZoneNum = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).InletAirZoneNum; + int CondInletAirZoneNum = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).InletAirZoneNum; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += TransSystem(SysNum).NetHeatRejectLoad; // Adding heat is positive @@ -11122,22 +11077,21 @@ namespace RefrigeratedCase { Real64 const ErrorTol(0.001); // Iterative solution tolerance - int NumIter; - bool NotBalanced; - static Real64 MassFlowCompsStart(0.0); // Mass flow through (low-stage) compressors (single- or two-stage systems) - static Real64 MassFlowHiStageCompsStart(0.0); // Mass flow through high-stage comrpessors (two-stage systems only) - static Real64 ErrorMassFlowComps(0.0); // Error in calculated (low stage) compressor mass flow (single- or two-stage systems) - static Real64 ErrorMassFlowHiStageComps(0.0); // Error in calculated high-stage compressor mass flow (two-stage systems only) + bool NotBalanced = true; + int NumIter = 0; + Real64 ErrorMassFlowComps(0.0); // Error in calculated (low stage) compressor mass flow (single- or two-stage systems) + Real64 ErrorMassFlowHiStageComps(0.0); // Error in calculated high-stage compressor mass flow (two-stage systems only) // Balance This Refrigeration System using calculated refrigerant flow - NotBalanced = true; - NumIter = 0; + Real64 MassFlowHiStageCompsStart(0.0); // Mass flow through high-stage compressors (two-stage systems only) auto &refrig_system(System(SysNum)); while (NotBalanced) { // Set values for iteration convergence tolerance check ++NumIter; - MassFlowCompsStart = refrig_system.RefMassFlowComps; + // Mass flow through (low-stage) compressors (single- or two-stage systems) + Real64 MassFlowCompsStart = refrig_system.RefMassFlowComps; + if (refrig_system.NumStages == 2) { // Two-stage systems MassFlowHiStageCompsStart = refrig_system.RefMassFlowHiStageComps; } @@ -11849,7 +11803,6 @@ namespace RefrigeratedCase { Real64 HSatVapCondense; // Enthalpy of saturated vapor at T condense, J/kg Real64 HsatVaporforTevapneeded; // Enthalpy saturated vapor at temperature needed at evaporator Real64 LFLastComp; // Load factor for last compressor dispatched - static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MassCorrection; // Mass flow at existing subcool/superheat over cap at rated conditions Real64 NeededCapacity; // Sum of case loads and mech subcooler loads on suction group Real64 PSuction; // Suction Pressure @@ -11865,7 +11818,7 @@ namespace RefrigeratedCase { Real64 HHiStageCompIn; // Enthalpy at inlet of high-stage compressor (J/kg) Real64 HCaseInRated_base(0.0), HCompInRated_base(0.0); // Autodesk:Tuned Intermediate values for performance tuning - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; Real64 const LocalTimeStepSec(LocalTimeStep * DataGlobals::SecInHour); @@ -12203,8 +12156,6 @@ namespace RefrigeratedCase { int CompIndex; // Compressor index within system int CompID; // Compressor index within all compressors int Iter; // Iteration counter - static Real64 AccumLoadMT(0.0); // Load due to previously unmet medium temperature compressor loads (transcritical system) - static Real64 AccumLoadLT(0.0); // Load due to previously unmet low temperature compressor loads (transcritical system) Real64 CapacityCorrectionLT; // Capacity at existing subcool/superheat over cap at rated conditions for LT loads Real64 CapacityCorrectionMT; // Capacity at existing subcool/superheat over cap at rated conditions for MT loads Real64 CaseEnthalpyChangeRatedMT; // Enthalpy change in medium temperature cases at compressor rated cond, J/kg @@ -12215,18 +12166,15 @@ namespace RefrigeratedCase { Real64 DensityRatedLP; // Density of low pressure compressor inlet gas at rated superheat, m3/kg Real64 HCaseInRatedLT; // Enthalpy entering low temperature cases at rated subcooling, J/kg Real64 HCaseInRatedMT; // Enthalpy entering medium temperature cases at rated subcooling, J/kg - static Real64 HCaseOutLTMT(0.0); // Combined enthalpy from the outlets of the LP compressor and MT loads, J/kg Real64 HCompInRatedHP(0.0); // Enthalpy entering high pressure compressor at rated superheat, J/kg Real64 HCompInRatedLP; // Enthalpy entering low pressure compressor at rated superheat, J/kg Real64 HGCOutlet; // Enthalpy at gas cooler outlet, J/kg Real64 HIdeal; // Ideal enthalpy at subcooler (for 100% effectiveness) Real64 Hnew; // Calucalted enthalpy, J/kg - static Real64 HReceiverBypass(0.0); // Enthalpy at the receiver bypass, J/kg Real64 HsatLiqforTevapNeededMT; // Enthalpy of saturated liquid at MT evaporator, J/kg Real64 HsatVaporforTevapneededMT; // Enthlapy of saturated vapor at MT evaporator (transcritical cycle), J/kg Real64 HsatVaporforTevapneededLT; // Enthlapy of saturated vapor at LT evaporator (transcritical cycle), J/kg Real64 LFLastComp; // Load factor for last compressor dispatched - static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MassCorrectionLT; // Mass flow at existing subcool/superheat over cap at rated conditions for LT loads Real64 MassCorrectionMT; // Mass flow at existing subcool/superheat over cap at rated conditions for MT loads Real64 NeededCapacityLT; // Sum of LT case loads and mech subcooler loads (transcritical cycle), W @@ -12250,23 +12198,28 @@ namespace RefrigeratedCase { Real64 Xl; // Initial lower guess for iterative search Real64 Xnew(0.0); // New guess for iterative search - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Determine refrigerating capacity needed - AccumLoadLT = 0.0; + // Load due to previously unmet low temperature compressor loads (transcritical system) + Real64 AccumLoadLT = 0.0; NeededCapacityLT = 0.0; if (TransSystem(SysNum).TransSysType == 2) { AccumLoadLT = max(0.0, (TransSystem(SysNum).UnmetEnergyLT / LocalTimeStep / DataGlobals::SecInHour)); NeededCapacityLT = TransSystem(SysNum).TotalSystemLoadLT + AccumLoadLT + TransSystem(SysNum).PipeHeatLoadLT; } // (TransSystem(SysNum)%TransSysType == 2) - AccumLoadMT = max(0.0, (TransSystem(SysNum).UnmetEnergyMT / LocalTimeStep / DataGlobals::SecInHour)); + + // Load due to previously unmet medium temperature compressor loads (transcritical system) + Real64 AccumLoadMT = max(0.0, (TransSystem(SysNum).UnmetEnergyMT / LocalTimeStep / DataGlobals::SecInHour)); NeededCapacityMT = TransSystem(SysNum).TotalSystemLoadMT + AccumLoadMT + TransSystem(SysNum).PipeHeatLoadMT; // Determine refrigerant properties at receiver TransSystem(SysNum).CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 0.0, TransSystem(SysNum).RefIndex, RoutineName); - HReceiverBypass = + + // Enthalpy at the receiver bypass, J/kg + Real64 HReceiverBypass = FluidProperties::GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 1.0, TransSystem(SysNum).RefIndex, RoutineName); // Determine refrigerant properties at low temperature (LT) loads (if present) @@ -12383,7 +12336,9 @@ namespace RefrigeratedCase { TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); TransSystem(SysNum).HCaseInMT = TransSystem(SysNum).HSatLiqReceiver; // Enthalpy of refrigerant after leaving medium temperature loads and low pressure compressors - HCaseOutLTMT = (TransSystem(SysNum).RefMassFlowtoLTLoads * TransSystem(SysNum).HCompOutLP + + + // Combined enthalpy from the outlets of the LP compressor and MT loads, J/kg + Real64 HCaseOutLTMT = (TransSystem(SysNum).RefMassFlowtoLTLoads * TransSystem(SysNum).HCompOutLP + TransSystem(SysNum).RefMassFlowtoMTLoads * TransSystem(SysNum).HCaseOutMT + TransSystem(SysNum).PipeHeatLoadMT) / (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads); @@ -12615,7 +12570,6 @@ namespace RefrigeratedCase { Real64 ControlTLiqOut; // Controlled temperature of liquid leaving Mechanical subcooler Real64 DelTempActual; // Actual subcooling, T liquid in - T liquid out Real64 DelTLiqDes; // Design Temperature Change on liquid side of LSHX - static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 LSHXeffectiveness; // EFfectiveness of liquid suction heat exchanger (LSHX) Real64 MechSCLoad; // Mechanical subcooler load Real64 SubcoolLoad; // energy transferred from warmer liquid to cool vapor @@ -12625,7 +12579,7 @@ namespace RefrigeratedCase { Real64 TLiqInActual(0.0); // Liquid T in, after condenser, before any mechanical subcooler Real64 TVapInActual; // Vapor T in, after any superheat added by case control - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // HCaseIn has to be recalculated as the starting point for the subcoolers here because @@ -13392,9 +13346,6 @@ namespace RefrigeratedCase { Real64 const DefaultWalkInDoorOpenFactor(0.05); // walk in door open factor (fraction time open) static std::string const RoutineName("CalculateWalkIn"); - static int ZoneNodeNum(0); // Zone node number - static int ZoneNum(0); // Index to zone - static int ZoneID(0); // Index to zone static Real64 CapApplied(0.0); // Walk In total capacity at specific operating conditions static Real64 CircFanSchedule(0.0); static Real64 Conv(0.0); // conversion factor in gravity equation @@ -13506,12 +13457,12 @@ namespace RefrigeratedCase { WalkIn(WalkInID).LatZoneCreditRate = 0.0; // Start zone loop: - for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ZoneSensLoad = 0.0; GlassDoorSensHeat = 0.0; StockDoorSensHeat = 0.0; - ZoneNum = WalkIn(WalkInID).ZoneNum(ZoneID); - ZoneNodeNum = WalkIn(WalkInID).ZoneNodeNum(ZoneID); + int ZoneNum = WalkIn(WalkInID).ZoneNum(ZoneID); + int ZoneNodeNum = WalkIn(WalkInID).ZoneNodeNum(ZoneID); ZoneDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; DelTemp = ZoneDryBulb - TWalkIn; StockDoorArea = WalkIn(WalkInID).AreaStockDr(ZoneID); From f0cda49d581ed784805d42d966efe4c503202ee0 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Thu, 2 Jan 2020 16:05:18 -0700 Subject: [PATCH 52/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 516 +++++++++++++---------------- 1 file changed, 230 insertions(+), 286 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 58cbdb1217a..1fcb8ea351e 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -9627,61 +9627,21 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - static Real64 CaseCreditFraction(0.0); // Reduction in case credits due to e.g., reduced door openings at night - static Real64 CaseSenCreditToZone(0.0); // Amount of sensible case credit applied to zone load (W) - static Real64 CaseLatCreditToZone(0.0); // Amount of latent case credit applied to zone load (W) - static Real64 CaseSenCreditToHVAC(0.0); // Amount of sensible case credit applied to HVAC RA duct (W) - static Real64 CaseLatCreditToHVAC(0.0); // Amount of latent case credit applied to HVAC RA duct (W) - static Real64 CaseSchedule(0.0); // Current value of case operating (availability) schedule - static Real64 DefrostEnergy(0.0); // Energy form of defrost capacity (J) - static Real64 DefrostSchedule(0.0); // Display case defrost schedule - static Real64 DefrostDripDownSchedule(0.0); // Display case drip-down schedule (allows coil to drain after defrost) - static Real64 DefCapModFrac(0.0); // Defrost capacity modifier curve based on case operating temperature - static Real64 DefrostRatio(0.0); // ratio of defrost energy at current zone temp/humrat to defrost + Real64 CaseCreditFraction(0.0); // Reduction in case credits due to e.g., reduced door openings at night + Real64 DefrostSchedule(0.0); // Display case defrost schedule + Real64 DefrostDripDownSchedule(0.0); // Display case drip-down schedule (allows coil to drain after defrost) + Real64 DefrostRatio(0.0); // ratio of defrost energy at current zone temp/humrat to defrost // capacity at design condition - static Real64 DefrostLoad_Actual(0.0); // heat load on case due to defrost (W) - static Real64 DefrostCap_Actual(0.0); // power used to defrost (W) - static Real64 DeltaFreezeKgFrost(0.0); // change in frost on coils (kg) - static Real64 DeltaStockingEnergy(0.0); // Used to keep track of problems if sizing not consistent (J) - static Real64 DeltaWarmEnvEnergy(0.0); // Used to keep track of problems if sizing not consistent (J) - static Real64 DesignRatedCap(0.0); // Design rated capacity of display case (W) - static Real64 DesignDefrostCap(0.0); // Design defrost capacity of display case (W) - static Real64 DesignLatentCap(0.0); // Design latent capacity of display case (W) - static Real64 DesignLighting(0.0); // Total design display case lighting power (W) - static Real64 FrostMeltedKg(0.0); // Frost melted by defrost during a time step (kg) - static Real64 LatentLoad(0.0); // Latent load placed on case at actual zone conditions (W) - static Real64 LatentRatio(0.0); // ratio of latent capacity at current zone temp/humrat to + Real64 LatentRatio(0.0); // ratio of latent capacity at current zone temp/humrat to // latent capacity at design condition - static Real64 LatentCap_Actual(0.0); // Refrigerated case latent capacity at specific operating conditions - static Real64 LatentCaseCredit(0.0); // Latent case credit delivered to zone (W) - static Real64 LatCapModFrac(0.0); // Latent capacity modifier curve based on case operating temperature - static Real64 LightingSchedule(0.0); // Display case lighting schedule - static Real64 Length(0.0); // Length of display case (m) - static Real64 LoadRequested(0.0); // TotalLoad_Actual + StoredEnergyRate - static Real64 RatedAmbientRH(0.0); // Local variable for the RH corresponding to case rating conditions - static Real64 SensibleCaseCredit(0.0); // Sensible case credit delivered to zone (W) - static Real64 SensibleCap_Actual(0.0); // Refrigerated case sensible capacity at specific operating conditions - // REAL(r64) :: SensibleFraction =0.0d0 ! Portion of total load due to sensible load - static Real64 SensibleLoadPrime(0.0); // Sensible load due to cond, conv, rad, infil (W) - static Real64 SensibleLoadAux(0.0); // Sensible load due to heaters, lighting (W) - static Real64 SensibleLoadTotal(0.0); // Total sensible load on case, may not = capacity applied (W) - static Real64 StockingSchedule(0.0); // Current value of product stocking schedule (W/m) - static Real64 StockingLoad(0.0); // Total load due to stocking case product (W) - static Real64 StoredEnergyRate(0.0); // Rate needed to serve all stored energy during single time step (W) - static Real64 TotalLoad_Actual(0.0); // total load on case at zone conditions (W) - static Real64 StartFrostKg(0.0); // frost load at start of time step (kg of ice) - static Real64 TotalCap_Actual(0.0); // Refrigerated case total capacity at specific operating conditions - static Real64 TotalLightingLoad(0.0); // Total lighting energy rate (W) - static Real64 TotalFan(0.0); // Total fan energy rate (W) - static Real64 TotalAntiSweat(0.0); // Total anti-sweat heater energy rate (W) - static Real64 TotalLightToCase(0.0); // Lighting energy to case - static Real64 TotalASHeaterToCase(0.0); // Anti-sweat heater energy to case - static Real64 TotalLightToZone(0.0); // Lighting energy to zone - static Real64 TotalASHeaterToZone(0.0); // Anti-sweat heater energy to zone - static Real64 TCase(0.0); // Display case operating temperature - static Real64 ZoneRHPercent(0.0); // Zone relative humidity (%) - static Real64 ZoneDewPoint(0.0); // Zone dew point (C) - static Real64 ZoneTempFactor(0.0); // used to look at extra sensible load due to excursions in zone T + Real64 LatentCap_Actual(0.0); // Refrigerated case latent capacity at specific operating conditions + Real64 LatentCaseCredit(0.0); // Latent case credit delivered to zone (W) + Real64 SensibleCap_Actual(0.0); // Refrigerated case sensible capacity at specific operating conditions + Real64 SensibleLoadPrime(0.0); // Sensible load due to cond, conv, rad, infil (W) + Real64 TotalCap_Actual(0.0); // Refrigerated case total capacity at specific operating conditions + Real64 TotalLightingLoad(0.0); // Total lighting energy rate (W) + Real64 TotalFan(0.0); // Total fan energy rate (W) + Real64 TotalAntiSweat(0.0); // Total anti-sweat heater energy rate (W) // Refrigerated display case defrost type (parameters) // DefNone = 0 @@ -9698,23 +9658,12 @@ namespace RefrigeratedCase { TotalCap_Actual = 0.0; LatentCap_Actual = 0.0; SensibleCap_Actual = 0.0; - SensibleLoadTotal = 0.0; SensibleLoadPrime = 0.0; - SensibleLoadAux = 0.0; - DefrostLoad_Actual = 0.0; - DefrostCap_Actual = 0.0; - DefrostRatio = 0.0; LatentRatio = 0.0; - StartFrostKg = 0.0; - SensibleCaseCredit = 0.0; LatentCaseCredit = 0.0; - CaseSenCreditToZone = 0.0; - CaseLatCreditToZone = 0.0; - CaseSenCreditToHVAC = 0.0; - CaseLatCreditToHVAC = 0.0; CaseRAFactor = 0.0; TotalLightingLoad = 0.0; @@ -9724,22 +9673,30 @@ namespace RefrigeratedCase { // Set local subroutine variables for convenience int ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; int ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; - ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; - ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); - Length = RefrigCase(CaseID).Length; - TCase = RefrigCase(CaseID).Temperature; - DesignRatedCap = RefrigCase(CaseID).DesignRatedCap; - DesignLatentCap = RefrigCase(CaseID).DesignLatentCap; - DesignDefrostCap = RefrigCase(CaseID).DesignDefrostCap; - DesignLighting = RefrigCase(CaseID).DesignLighting; + + // Zone relative humidity (%) + Real64 ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; + + // Zone dew point (C) + Real64 ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); + Real64 Length = RefrigCase(CaseID).Length; + + // Display case operating temperature + Real64 TCase = RefrigCase(CaseID).Temperature; + Real64 DesignRatedCap = RefrigCase(CaseID).DesignRatedCap; + Real64 DesignLatentCap = RefrigCase(CaseID).DesignLatentCap; + Real64 DesignDefrostCap = RefrigCase(CaseID).DesignDefrostCap; + Real64 DesignLighting = RefrigCase(CaseID).DesignLighting; int DefCapCurvePtr = RefrigCase(CaseID).DefCapCurvePtr; int DefrostEnergyCurveType = RefrigCase(CaseID).DefrostEnergyCurveType; int DefrostType = RefrigCase(CaseID).DefrostType; - RatedAmbientRH = RefrigCase(CaseID).RatedAmbientRH; + Real64 RatedAmbientRH = RefrigCase(CaseID).RatedAmbientRH; // GET ALL SCHEDULES (note all schedules can be fractions if on/off a portion of time step) // case schedule should be coincident with the zone time step otherwise the simulation proceeds - CaseSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).SchedPtr); + + // Current value of case operating (availability) schedule + Real64 CaseSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).SchedPtr); if (CaseSchedule <= 0) return; // get defrost schedule if (DefrostType > DefNone) { @@ -9751,6 +9708,9 @@ namespace RefrigeratedCase { DefrostSchedule = 0.0; DefrostDripDownSchedule = 0.0; } + + Real64 StockingSchedule(0.0); // Current value of product stocking schedule (W/m) + // get product stocking schedule and load due to product stocking, if no schedule exists load is 0 if (RefrigCase(CaseID).StockingSchedPtr > 0) { StockingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).StockingSchedPtr); @@ -9758,7 +9718,7 @@ namespace RefrigeratedCase { StockingSchedule = 0.0; } // get lighting schedule and total load due to lighting - LightingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).LightingSchedPtr); + Real64 LightingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).LightingSchedPtr); // if case credit reduction fraction schedule exists, modify both sensible and latent case credits // according to schedule - used to account for variable case envelope, such as night covers. @@ -9770,8 +9730,12 @@ namespace RefrigeratedCase { // CALCULATE AUX LOADS DUE TO LIGHTS, FAN AND STOCKING TotalLightingLoad = DesignLighting * LightingSchedule; - TotalLightToCase = TotalLightingLoad * RefrigCase(CaseID).LightingFractionToCase; - TotalLightToZone = TotalLightingLoad - TotalLightToCase; + + // Lighting energy to case + Real64 TotalLightToCase = TotalLightingLoad * RefrigCase(CaseID).LightingFractionToCase; + + // Lighting energy to zone + Real64 TotalLightToZone = TotalLightingLoad - TotalLightToCase; // cycle fan according to defrost schedule // turn fan on for none or off-cycle defrost types if (DefrostType == DefNone || DefrostType == DefOffCycle) { @@ -9782,9 +9746,11 @@ namespace RefrigeratedCase { // get load due to product stocking // accumulate stocking loads for reporting to help evaluate any cumulative unmet loads problems // only accumulate energy during actual simulation (so same if DD's are switched) - StockingLoad = StockingSchedule * Length; + + // Total load due to stocking case product (W) + Real64 StockingLoad = StockingSchedule * Length; if (!DataGlobals::WarmupFlag) { - DeltaStockingEnergy = (StockingLoad * DataGlobals::TimeStepZoneSec); + Real64 DeltaStockingEnergy = (StockingLoad * DataGlobals::TimeStepZoneSec); RefrigCase(CaseID).StockingEnergy += DeltaStockingEnergy; } // warm up // CALCULTE ALL LOADS INFLUENCED BY ZONE TEMPERATURE AND RH @@ -9817,14 +9783,18 @@ namespace RefrigeratedCase { } } TotalAntiSweat *= Length; - TotalASHeaterToCase = RefrigCase(CaseID).ASHeaterFractionToCase * TotalAntiSweat; - TotalASHeaterToZone = TotalAntiSweat - TotalASHeaterToCase; + + // Anti-sweat heater energy to case + Real64 TotalASHeaterToCase = RefrigCase(CaseID).ASHeaterFractionToCase * TotalAntiSweat; + + // Anti-sweat heater energy to zone + Real64 TotalASHeaterToZone = TotalAntiSweat - TotalASHeaterToCase; // latent capacity correction term at off-design conditions { auto const SELECT_CASE_var(RefrigCase(CaseID).LatentEnergyCurveType); if (SELECT_CASE_var == CaseTemperatureMethod) { - LatCapModFrac = CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, TCase); + Real64 LatCapModFrac = CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, TCase); LatentRatio = max(0.0, (1.0 - (RatedAmbientRH - ZoneRHPercent) * LatCapModFrac)); } else if (SELECT_CASE_var == RHCubic) { LatentRatio = max(0.0, CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneRHPercent)); @@ -9836,28 +9806,41 @@ namespace RefrigeratedCase { // calculate latent case load (assumes no moisture load due to stocking) // assume sensible case credits continue to accumulate in case during defrost/dripdown, // but latent credits/load and capacity only applied outside dripdownschedule - LatentLoad = DesignLatentCap * LatentRatio * CaseCreditFraction * (1.0 - DefrostDripDownSchedule); + + // Latent load placed on case at actual zone conditions (W) + Real64 LatentLoad = DesignLatentCap * LatentRatio * CaseCreditFraction * (1.0 - DefrostDripDownSchedule); LatentCaseCredit = -LatentLoad; // adjust sensible loads and case credit for actual zone temperature // If zone temp rises above rated ambient temperature, total load can exceed case design capacity, // so unmet cooling loads are accumulated to meet in the next time step. (Case credit fraction allows // extra insulation, e.g. night covers, or imitating a better insulated walk-in cooler) - ZoneTempFactor = (DataLoopNode::Node(ZoneNodeNum).Temp - TCase) / (RefrigCase(CaseID).RatedAmbientTemp - TCase); + + // used to look at extra sensible load due to excursions in zone T + Real64 ZoneTempFactor = (DataLoopNode::Node(ZoneNodeNum).Temp - TCase) / (RefrigCase(CaseID).RatedAmbientTemp - TCase); SensibleLoadPrime = RefrigCase(CaseID).DesignSensCaseCredit * ZoneTempFactor * CaseCreditFraction; - SensibleLoadAux = TotalLightToCase + TotalASHeaterToCase + TotalFan + StockingLoad; - SensibleLoadTotal = SensibleLoadPrime + SensibleLoadAux; + + // Sensible load due to heaters, lighting (W) + Real64 SensibleLoadAux = TotalLightToCase + TotalASHeaterToCase + TotalFan + StockingLoad; + + // Total sensible load on case, may not = capacity applied (W) + Real64 SensibleLoadTotal = SensibleLoadPrime + SensibleLoadAux; // include lighting and anti-sweat power not attributed to case load to sensible case credit - SensibleCaseCredit = TotalLightToZone + TotalASHeaterToZone - SensibleLoadPrime; + + // Sensible case credit delivered to zone (W) + Real64 SensibleCaseCredit = TotalLightToZone + TotalASHeaterToZone - SensibleLoadPrime; // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem if (!DataGlobals::WarmupFlag) { - DeltaFreezeKgFrost = LatentLoad * DataGlobals::TimeStepZoneSec / IcetoVaporEnthalpy; + Real64 DeltaFreezeKgFrost = LatentLoad * DataGlobals::TimeStepZoneSec / IcetoVaporEnthalpy; RefrigCase(CaseID).KgFrost += DeltaFreezeKgFrost; } if (TCase > TempTooHotToFrost) RefrigCase(CaseID).KgFrost = 0.0; + Real64 DefrostLoad_Actual(0.0); // heat load on case due to defrost (W) + Real64 DefrostCap_Actual(0.0); // power used to defrost (W) + // DEFROST CALCULATIONS if (DefrostSchedule > 0.0) { if (DefrostType != DefNone && DefrostType != DefOffCycle) { @@ -9867,7 +9850,7 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(DefrostEnergyCurveType); if (SELECT_CASE_var == CaseTemperatureMethod) { - DefCapModFrac = CurveManager::CurveValue(DefCapCurvePtr, TCase); + Real64 DefCapModFrac = CurveManager::CurveValue(DefCapCurvePtr, TCase); DefrostRatio = max(0.0, (1.0 - (RatedAmbientRH - ZoneRHPercent) * DefCapModFrac)); } else if (SELECT_CASE_var == RHCubic) { DefrostRatio = max(0.0, CurveManager::CurveValue(DefCapCurvePtr, ZoneRHPercent)); @@ -9879,9 +9862,15 @@ namespace RefrigeratedCase { } DefrostCap_Actual *= DefrostRatio; } - StartFrostKg = RefrigCase(CaseID).KgFrost; - DefrostEnergy = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; - FrostMeltedKg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); + + // frost load at start of time step (kg of ice) + Real64 StartFrostKg = RefrigCase(CaseID).KgFrost; + + // Energy form of defrost capacity (J) + Real64 DefrostEnergy = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; + + // Frost melted by defrost during a time step (kg) + Real64 FrostMeltedKg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); RefrigCase(CaseID).KgFrost -= FrostMeltedKg; // Reduce defrost heat load on case by amount of ice melted during time step @@ -9912,9 +9901,12 @@ namespace RefrigeratedCase { } // Defrost calculations //*** See if capacity meets load and manage accumulated stored energy *********************************** - TotalLoad_Actual = SensibleLoadTotal + LatentLoad + DefrostLoad_Actual; - StoredEnergyRate = RefrigCase(CaseID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; - LoadRequested = TotalLoad_Actual + StoredEnergyRate; + // total load on case at zone conditions (W) + Real64 TotalLoad_Actual = SensibleLoadTotal + LatentLoad + DefrostLoad_Actual; + + // Rate needed to serve all stored energy during single time step (W) + Real64 StoredEnergyRate = RefrigCase(CaseID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; + Real64 LoadRequested = TotalLoad_Actual + StoredEnergyRate; // prorate available cooling capacity for portion of time off due to drip down. Real64 CapAvail = DesignRatedCap * (1.0 - DefrostDripDownSchedule); @@ -9944,10 +9936,17 @@ namespace RefrigeratedCase { //** this needs a moisture variable NonAirSystemMoistureResponse (equivalent of NonAirSystemResponse) to properly //** allocate moisture to the zone when the HVAC system is off. - CaseSenCreditToZone = SensibleCaseCredit * (1.0 - CaseRAFactor); - CaseLatCreditToZone = LatentCaseCredit * (1.0 - CaseRAFactor); - CaseSenCreditToHVAC = SensibleCaseCredit * CaseRAFactor; - CaseLatCreditToHVAC = LatentCaseCredit * CaseRAFactor; + // Amount of sensible case credit applied to zone load (W) + Real64 CaseSenCreditToZone = SensibleCaseCredit * (1.0 - CaseRAFactor); + + // Amount of latent case credit applied to zone load (W) + Real64 CaseLatCreditToZone = LatentCaseCredit * (1.0 - CaseRAFactor); + + // Amount of sensible case credit applied to HVAC RA duct (W) + Real64 CaseSenCreditToHVAC = SensibleCaseCredit * CaseRAFactor; + + // Amount of latent case credit applied to HVAC RA duct (W) + Real64 CaseLatCreditToHVAC = LatentCaseCredit * CaseRAFactor; DataHeatBalance::RefrigCaseCredit(ActualZoneNum).SenCaseCreditToZone += CaseSenCreditToZone; DataHeatBalance::RefrigCaseCredit(ActualZoneNum).LatCaseCreditToZone += CaseLatCreditToZone; @@ -10018,7 +10017,7 @@ namespace RefrigeratedCase { // excessively large stored energy if ((ZoneTempFactor * CaseCreditFraction) > 1.0) { if (!DataGlobals::WarmupFlag) { - DeltaWarmEnvEnergy = (SensibleLoadPrime - RefrigCase(CaseID).DesignSensCaseCredit) * DataGlobals::TimeStepZoneSec; + Real64 DeltaWarmEnvEnergy = (SensibleLoadPrime - RefrigCase(CaseID).DesignSensCaseCredit) * DataGlobals::TimeStepZoneSec; RefrigCase(CaseID).WarmEnvEnergy += DeltaWarmEnvEnergy; } } @@ -10396,31 +10395,7 @@ namespace RefrigeratedCase { // ZoneEquipmentManager on the system time step, or only system driven by HVACManager on the zone time step. static std::string const RoutineName("SimulateDetailedRefrigerationSystems"); - int SysNum; // Index to the detailed refrigerated system being modeled - static bool DeRate(false); // If true, need to derate aircoils because load can't be met by system - static bool FirstSCLoop(true); // Flag first time through multi-system loop used when mech subcoolers present - - static int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, - static int LoopNum(0); // Index to overall repeat necessary for mechanical subcoolers - static int SubcoolID(0); // Subcooler ID number - static int SubcoolerIndex(0); // Subcooler ID number - static int CaseID(0); // Absolute reference to case - static int CaseIndex(0); // Index to case - static int CoilID(0); // Index to a single air chiller/coil - static int CoilIndex(0); // Index to a single air chiller/coil - static int CoilSetID(0); // Index to set of coils in a single zone (shared inlet and outlet nodes) - static int CoilSetIndex(0); // Index to set of coils in a single zone - static int CondInletAirZoneNum(0); // Index used to assign zone credits - static int SecondID(0); // Absolute reference to Secondary Loop - static int SecondIndex(0); // Index to Secondary Loop - static int SuctionPipeActualZoneNum(0); // Index to zone exchanging heat with suction pipes - static int WalkInID(0); // Absolute reference to WalkIn - static int WalkInIndex(0); // Index to WalkIn - static int ZoneNum(0); // counter when assigning zone case credits - static int CascadeLoadIndex(0); // Index to Cascade Condenser Load - static int CascadeLoadID(0); // Absolute reference to Cascade Condenser - static Real64 LoadFrac(1.0); // case load/design case load - static Real64 LocalTimeStep(0.0); // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone + static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps static Real64 CurrentHiStageLoads(0.0); // Current loads on high-stage compressor, exclusive of unmet loads from // prev time steps (two-stage systems only) @@ -10429,7 +10404,7 @@ namespace RefrigeratedCase { // relative to design temperature difference Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Cascade condenser assumes a constant approach delta T (Tcond - Tevap), not f(load) @@ -10441,25 +10416,24 @@ namespace RefrigeratedCase { // In that subroutine, dispatch coils within each set in order specified for each zone // Below will assign loads to refrigeration system or secondary loop // Note that this routine will go through all refrigeration systems, but loads for multiple systems - // with interactions will not be known for the intitial calls with first HVAC time step. They will, + // with interactions will not be known for the intital calls with first HVAC time step. They will, // however, be repeated when the last chiller set is called from ZoneEquipmentManager // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { - for (CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { - CoilSetID = CoilSetIndex; - CalculateAirChillerSets(CoilSetID); + for (int CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { + CalculateAirChillerSets(CoilSetIndex); } } // Do refrigeration system loop outside of iterative solution to initialize time step and // calculate case, walk-in, and secondary loop loads (that won't change during balance // of refrigeration system iterations) and prepare initial estimates for the iterative system solution - for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { + for (int SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if (((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) { if (System(SysNum).NumCases > 0) { - for (CaseIndex = 1; CaseIndex <= System(SysNum).NumCases; ++CaseIndex) { - CaseID = System(SysNum).CaseNum(CaseIndex); + for (int CaseIndex = 1; CaseIndex <= System(SysNum).NumCases; ++CaseIndex) { + int CaseID = System(SysNum).CaseNum(CaseIndex); CalculateCase(CaseID); // TevapDesign calc in Get Input to meet lowest evap temp of any load on the system. // Tevap needed is either fixed at this design value, @@ -10468,7 +10442,7 @@ namespace RefrigeratedCase { if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // calculate floating T evap - LoadFrac = min(1.0, (RefrigCase(CaseID).TotalCoolingLoad / RefrigCase(CaseID).DesignRatedCap)); + Real64 LoadFrac = min(1.0, (RefrigCase(CaseID).TotalCoolingLoad / RefrigCase(CaseID).DesignRatedCap)); MaxTEvap = RefrigCase(CaseID).Temperature - (RefrigCase(CaseID).Temperature - RefrigCase(CaseID).EvapTempDesign) * max(LoadFrac, MaxDelTFloatFrac); // Compare Tevap for this case to max allowed for all previous cases on this suction group and set at the MINIMUM of the @@ -10486,13 +10460,13 @@ namespace RefrigeratedCase { } // Num of cases > 0 if (System(SysNum).NumWalkIns > 0) { - for (WalkInIndex = 1; WalkInIndex <= System(SysNum).NumWalkIns; ++WalkInIndex) { - WalkInID = System(SysNum).WalkInNum(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= System(SysNum).NumWalkIns; ++WalkInIndex) { + int WalkInID = System(SysNum).WalkInNum(WalkInIndex); CalculateWalkIn(WalkInID); if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // calculate floating T evap - LoadFrac = min(1.0, (WalkIn(WalkInID).TotalCoolingLoad / WalkIn(WalkInID).DesignRatedCap)); + Real64 LoadFrac = min(1.0, (WalkIn(WalkInID).TotalCoolingLoad / WalkIn(WalkInID).DesignRatedCap)); MaxTEvap = WalkIn(WalkInID).Temperature - (WalkIn(WalkInID).Temperature - WalkIn(WalkInID).TEvapDesign) * max(LoadFrac, MaxDelTFloatFrac); // Compare maxTevap for this walk in to max allowed for cases and for all @@ -10510,8 +10484,8 @@ namespace RefrigeratedCase { } // System(SysNum)%NumWalkIns > 0 if (System(SysNum).NumCoils > 0) { - for (CoilIndex = 1; CoilIndex <= System(SysNum).NumCoils; ++CoilIndex) { - CoilID = System(SysNum).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= System(SysNum).NumCoils; ++CoilIndex) { + int CoilID = System(SysNum).CoilNum(CoilIndex); // already CALLed CalculateCoil(CoilID) in CoilSet specified order if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; @@ -10526,8 +10500,8 @@ namespace RefrigeratedCase { } // System(SysNum)%NumCoils > 0 if (System(SysNum).NumSecondarys > 0) { - for (SecondIndex = 1; SecondIndex <= System(SysNum).NumSecondarys; ++SecondIndex) { - SecondID = System(SysNum).SecondaryNum(SecondIndex); + for (int SecondIndex = 1; SecondIndex <= System(SysNum).NumSecondarys; ++SecondIndex) { + int SecondID = System(SysNum).SecondaryNum(SecondIndex); CalculateSecondary(SecondID); if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; @@ -10558,7 +10532,7 @@ namespace RefrigeratedCase { System(SysNum).PipeHeatLoad = System(SysNum).SumUASuctionPiping * (SuctionPipeZoneTemp - System(SysNum).TEvapNeeded); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) - SuctionPipeActualZoneNum = System(SysNum).SuctionPipeActualZoneNum; + int SuctionPipeActualZoneNum = System(SysNum).SuctionPipeActualZoneNum; if (UseSysTimeStep) { CoilSysCredit(SuctionPipeActualZoneNum).SenCreditToZoneRate -= System(SysNum).PipeHeatLoad; CoilSysCredit(SuctionPipeActualZoneNum).ReportSenCoolingToZoneRate = @@ -10576,16 +10550,17 @@ namespace RefrigeratedCase { // are present. If so, energy transfer between // detailed refrigeration systems requires additional iteration at this level. - StartMechSubcoolLoop = 3; + int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, if ((NumSimulationMechSubcoolers > 0) || (NumSimulationCascadeCondensers > 0) || (NumSimulationSharedCondensers > 0) || (NumSimulationRefrigAirChillers > 0)) StartMechSubcoolLoop = 1; - FirstSCLoop = true; - for (LoopNum = StartMechSubcoolLoop; LoopNum <= 3; + bool FirstSCLoop = true; // Flag first time through multi-system loop used when mech subcoolers present + + for (int LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { // Note, for cascade cond loads compared requiring 5 iterations to 3, no difference. - for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { + for (int SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if (((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) { System(SysNum).SumMechSCLoad = 0.0; @@ -10595,7 +10570,7 @@ namespace RefrigeratedCase { if ((NumSimulationMechSubcoolers > 0) && (!FirstSCLoop)) { // This loop places load on system providing mechanical subcooling - for (SubcoolID = 1; SubcoolID <= NumSimulationSubcoolers; ++SubcoolID) { + for (int SubcoolID = 1; SubcoolID <= NumSimulationSubcoolers; ++SubcoolID) { if (Subcooler(SubcoolID).SubcoolerType == LiquidSuction) continue; if (Subcooler(SubcoolID).MechSourceSysID != SysNum) continue; // don't have summechscload until second subcooler pass, set to zero on first pass @@ -10610,8 +10585,8 @@ namespace RefrigeratedCase { } // SubcoolId if (System(SysNum).NumSubcoolers > 0) { - for (SubcoolerIndex = 1; SubcoolerIndex <= System(SysNum).NumSubcoolers; ++SubcoolerIndex) { - SubcoolID = System(SysNum).SubcoolerNum(SubcoolerIndex); + for (int SubcoolerIndex = 1; SubcoolerIndex <= System(SysNum).NumSubcoolers; ++SubcoolerIndex) { + int SubcoolID = System(SysNum).SubcoolerNum(SubcoolerIndex); if (Subcooler(SubcoolID).SubcoolerType == LiquidSuction) continue; System(SysNum).SumMechSCBenefit = Subcooler(SubcoolID).MechSCTransLoad; } // subcoolerindex @@ -10621,8 +10596,8 @@ namespace RefrigeratedCase { // This loop places load on system absorbing heat from cascade condenser and & // condenser heat reclaim credits from hot gas/brine defrosts if ((System(SysNum).NumCascadeLoads > 0) && (!FirstSCLoop)) { - for (CascadeLoadIndex = 1; CascadeLoadIndex <= System(SysNum).NumCascadeLoads; ++CascadeLoadIndex) { - CascadeLoadID = System(SysNum).CascadeLoadNum(CascadeLoadIndex); + for (int CascadeLoadIndex = 1; CascadeLoadIndex <= System(SysNum).NumCascadeLoads; ++CascadeLoadIndex) { + int CascadeLoadID = System(SysNum).CascadeLoadNum(CascadeLoadIndex); if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // check for lowest T evap design among the CascadeLoad systems and @@ -10690,7 +10665,8 @@ namespace RefrigeratedCase { } CalcDetailedSystem(SysNum); - DeRate = false; + + bool DeRate = false; // If true, need to derate aircoils because load can't be met by system // With air chiller coils, don't use unmet energy, instead reduce capacity on coils to match avail compressor/cond capacity CurrentLoads = @@ -10700,8 +10676,8 @@ namespace RefrigeratedCase { FinalRateCoils(DeRate, DetailedSystem, SysNum, CurrentLoads, System(SysNum).TotCompCapacity); System(SysNum).TotalCoolingLoad = 0.0; System(SysNum).TotalCondDefrostCredit = 0.0; - for (CoilIndex = 1; CoilIndex <= System(SysNum).NumCoils; ++CoilIndex) { - CoilID = System(SysNum).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= System(SysNum).NumCoils; ++CoilIndex) { + int CoilID = System(SysNum).CoilNum(CoilIndex); // already CALLed CalculateCoil(CoilID) in CoilSet specified order if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; @@ -10734,7 +10710,7 @@ namespace RefrigeratedCase { // or cascade condensers or shared condensers or warehouse coils that might need to be de-rated // Dealing with unmet load has to be done outside iterative loop - for (SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { + for (int SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && (!DataGlobals::WarmupFlag)) { CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet @@ -10777,7 +10753,7 @@ namespace RefrigeratedCase { // Zone-located air-cooled condenser reject heat also has to be outside iterative loop if (System(SysNum).SystemRejectHeatToZone) { - CondInletAirZoneNum = Condenser(System(SysNum).CondenserNum(1)).InletAirZoneNum; + int CondInletAirZoneNum = Condenser(System(SysNum).CondenserNum(1)).InletAirZoneNum; if (UseSysTimeStep) { CoilSysCredit(CondInletAirZoneNum).SenCreditToZoneRate += System(SysNum).NetHeatRejectLoad; // Adding heat is positive CoilSysCredit(CondInletAirZoneNum).ReportSenCoolingToZoneRate = -CoilSysCredit(CondInletAirZoneNum).SenCreditToZoneRate; @@ -10803,8 +10779,8 @@ namespace RefrigeratedCase { // Note that case credit is negative for cooling, thus subtract positive value calculated for coil // Note this is done whether or not the coils are derated. if (UseSysTimeStep) { - for (ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { - for (CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { + for (int ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { + for (int CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { if (WarehouseCoil(CoilID).ZoneNum != ZoneNum) continue; CoilSysCredit(ZoneNum).SenCreditToZoneRate -= WarehouseCoil(CoilID).SensCreditRate; CoilSysCredit(ZoneNum).SenCreditToZoneEnergy = CoilSysCredit(ZoneNum).SenCreditToZoneRate * LocalTimeStep * DataGlobals::SecInHour; @@ -13346,109 +13322,56 @@ namespace RefrigeratedCase { Real64 const DefaultWalkInDoorOpenFactor(0.05); // walk in door open factor (fraction time open) static std::string const RoutineName("CalculateWalkIn"); - static Real64 CapApplied(0.0); // Walk In total capacity at specific operating conditions - static Real64 CircFanSchedule(0.0); - static Real64 Conv(0.0); // conversion factor in gravity equation - static Real64 DefrostCap(0.0); // Design defrost capacity of WalkIn (W) - static Real64 DefrostEnergy(0.0); // (J) - static Real64 DefEnergyFraction(0.0); // dimensionless - static Real64 AvailDefrostEnergy(0.0); // available to melt ice with temp term control (J) - static Real64 DefrostLoad(0.0); // (W) - static Real64 DefrostSchedule(0.0); // WalkIn defrost schedule, between 0 and 1 - static Real64 DefrostDripDownSchedule(0.0); // WalkIn drip-down schedule (allows coil to drain after defrost) - static Real64 DefrostEnergyNeeded(0.0); // Energy needed to melt all ice, used with temperature termination (J) - static Real64 DensityAirWalkIn(0.0); // Density at Walk in temperature and 90% assumed RH - static Real64 DensityZoneAir(0.0); // Density of the air in a particular zone (kg/m3) - static Real64 DensityFactorFm(0.0); // called Fm in ASHRAE 2010 eq 13 page 24.5 for door infiltration - static Real64 DensitySqRtFactor(0.0); // from ASHRAE 2010 eq 12 page 24.4 for door infiltration - static Real64 DelTemp(0.0); // Difference between zone and walk in temperatures (C) - static Real64 DesignLighting(0.0); // Total design display WalkIn lighting power (W) - static Real64 DesignRatedCap(0.0); // Rated capacity of walk in cooler coil (W) - static Real64 DoorFlowFactor(0.0); // Derate compared to fully developed flow through 100% open door - static Real64 DoorOpenFactor(0.0); // Derate based upon fraction time door opened - static Real64 DoorProtectEff(0.0); // Door protection effectiveness - static Real64 DrHeight(0.0); // Door height (m) - static Real64 DrArea(0.0); // Door area (m2) - static Real64 EnthalpyAirWalkIn(0.0); // Enthalpy of air corresponding to walk in temperatuer and 90% assumed RH (J/kg) - static Real64 EnthalpyZoneAir(0.0); // Enthalpy of the air in a particular zone (J/kg) - static Real64 FanLoad(0.0); // Total fan energy rate (W) - static Real64 FloorLoad(0.0); // Total floor energy rate (W) - static Real64 FrostChangekg(0.0); // Amount of frost added or melted (kg) - static Real64 FullFlowInfLoad(0.0); // Total load (lat + sens) due to 100% open doors w/ fully developed flow (W) - static Real64 GlassDoorInfLoad(0.0); // infiltration through glass reach-in doors in a particular zone (W) - static Real64 GlassDoorSensHeat(0.0); // sensible heat gain through glass reach-in doors (UA*delta T) (W) - static Real64 GlassDoorArea(0.0); // facing a particular zone (m2) - static Real64 Gravity(0.0); - static Real64 HeaterSchedule(0.0); // zero to one - static Real64 HeaterLoad(0.0); // Total heater (except defrost) energy rate (W) - static Real64 HumRatioAirWalkIn(0.0); // corresponds to walk in temp and 90% assumed RH(kg water/kg dry air) - static Real64 HumRatioZoneAir(0.0); // Humidity Ratio of the air in a particular zone (kg water/kg dry air) - static Real64 IceSensHeatNeeded(0.0); // Energy to raise frost temperature to 0C, used w/ temp termination (J) - static Real64 LatentCapApplied(0.0); // Walk In latent capacity at specific operating conditions - static Real64 LatentLoadTotal(0.0); // total latent load on WalkIn over all zones (W) - static Real64 LightLoad(0.0); // Total lighting energy rate (W) - static Real64 LightingSchedule(0.0); // WalkIn lighting schedule - static Real64 LoadRequested(0.0); // Load necessary to meet current and all stored energy needs (W) - static Real64 LoadTotal(0.0); // total load in time step (W) - static Real64 MassDryAirRate(0.0); // Mass dry air infiltrating into/out-of walkin through doors (kg/s) - static Real64 MaxCap(0.0); // Design chilling capacity reduced according to drip-down schedule (W) - static Real64 SensibleCapApplied(0.0); // Walk In sensible capacity at specific operating conditions - static Real64 SensibleLoadTotal(0.0); // Total sensible load on WalkIn over all zones (W) - static Real64 StoredEnergyRate(0.0); // Rate needed to serve all stored energy during single time step (W) - static Real64 StartIceTemp(0.0); // Frost temperature at start of time step [C] - static Real64 StartFrostKg(0.0); // frost load at start of time step (kg of ice) - static Real64 StockDoorInfLoad(0.0); // infiltration through stock doors in a particular zone (W) - static Real64 StockDoorSensHeat(0.0); // sensible heat gain through stock doors (UA*delta T) (W) - static Real64 StockDoorArea(0.0); // (m2) - static Real64 StockingLoad(0.0); // Total load due to stocking WalkIn product (W) - static Real64 TWalkIn(0.0); // WalkIn operating temperature (C) - static Real64 UAOtherSurfaces(0.0); // UA for non-door surfaces facing a certain zone (W/C) - static Real64 WalkInSchedule(0.0); // Current value of WalkIn operating (availability) schedule - static Real64 WalkInSensLoad(0.0); // Walk in cooler sensible load facing particular zone (W) - static Real64 WalkInLatLoad(0.0); // Walk in cooler latent load facing particular zone (W) - static Real64 WaterRemovRate(0.0); // Walk in cooler removes water at this rate in this zone (kg/s) - static Real64 ZoneDryBulb(0.0); // Dry Bulb Temperature of adjacent zone - static Real64 ZoneSensLoad(0.0); // Sensible WalkIn credit delivered to a particular zone (W) - static Real64 ZoneLatentLoad(0.0); // Latent WalkIn credit delivered to zone (W) - static Real64 ZoneRHFrac(0.0); // Zone relative humidity fraction (decimal) - static Real64 ZoneInfilLoad(0.0); // Walk in cooler infiltration load (sens + latent) in certain zone (W) - static Real64 ZInfilSensLoad(0.0); // Sensible load due to infiltration in one zone - static Real64 ZdoorSensLoad(0.0); // Sensible load due to UA delta T through closed door in one zone - - WalkInSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).SchedPtr); + Real64 CapApplied(0.0); // Walk In total capacity at specific operating conditions + Real64 DefrostSchedule(0.0); // WalkIn defrost schedule, between 0 and 1 + Real64 DefrostEnergyNeeded(0.0); // Energy needed to melt all ice, used with temperature termination (J) + Real64 DensityFactorFm(0.0); // called Fm in ASHRAE 2010 eq 13 page 24.5 for door infiltration + Real64 DensitySqRtFactor(0.0); // from ASHRAE 2010 eq 12 page 24.4 for door infiltration + + // Current value of WalkIn operating (availability) schedule + Real64 WalkInSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).SchedPtr); if (WalkInSchedule <= 0) return; // GET OTHER SCHEDULES DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostSchedPtr); - DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostDripDownSchedPtr); + Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostDripDownSchedPtr); // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); // next four values optional, so set to default before checking for schedule - StockingLoad = 0.0; - LightingSchedule = 1.0; - HeaterSchedule = 1.0; - CircFanSchedule = 1.0; + Real64 StockingLoad(0.0); // Total load due to stocking WalkIn product (W) + Real64 LightingSchedule = 1.0; + Real64 HeaterSchedule = 1.0; + Real64 CircFanSchedule = 1.0; if (WalkIn(WalkInID).StockingSchedPtr > 0) StockingLoad = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).StockingSchedPtr); if (WalkIn(WalkInID).LightingSchedPtr > 0) LightingSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).LightingSchedPtr); if (WalkIn(WalkInID).HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).HeaterSchedPtr); if (WalkIn(WalkInID).CircFanSchedPtr > 0) CircFanSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).CircFanSchedPtr); // Set local subroutine variables for convenience - TWalkIn = WalkIn(WalkInID).Temperature; - DesignRatedCap = WalkIn(WalkInID).DesignRatedCap; - DefrostCap = WalkIn(WalkInID).DefrostCapacity; + Real64 TWalkIn = WalkIn(WalkInID).Temperature; // WalkIn operating temperature (C) + + // Rated capacity of walk in cooler coil (W) + Real64 DesignRatedCap = WalkIn(WalkInID).DesignRatedCap; + Real64 DefrostCap = WalkIn(WalkInID).DefrostCapacity; // %DefrostCapacity already set to zero for WalkInDefrostNone , WalkInDefrostOffCycle - DesignLighting = WalkIn(WalkInID).DesignLighting; - EnthalpyAirWalkIn = Psychrometrics::PsyHFnTdbRhPb(TWalkIn, 0.9, DataEnvironment::OutBaroPress); // assume 90%RH in cooler - HumRatioAirWalkIn = Psychrometrics::PsyWFnTdbH(TWalkIn, EnthalpyAirWalkIn); - DensityAirWalkIn = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, TWalkIn, HumRatioAirWalkIn); - Conv = DataEnvironment::Latitude * 2.0 * DataGlobals::Pi / 360.0; // Convert DataEnvironment::Latitude to radians - Gravity = 9.780373 * (1.0 + 0.0052891 * pow_2(std::sin(Conv)) - 0.0000059 * pow_2(std::sin(2.0 * Conv))); + // Total design display WalkIn lighting power (W) + Real64 DesignLighting = WalkIn(WalkInID).DesignLighting; + + // Enthalpy of air corresponding to walk in temperature and 90% assumed RH (J/kg) + Real64 EnthalpyAirWalkIn = Psychrometrics::PsyHFnTdbRhPb(TWalkIn, 0.9, DataEnvironment::OutBaroPress); // assume 90%RH in cooler + + // corresponds to walk in temp and 90% assumed RH(kg water/kg dry air) + Real64 HumRatioAirWalkIn = Psychrometrics::PsyWFnTdbH(TWalkIn, EnthalpyAirWalkIn); + Real64 DensityAirWalkIn = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, TWalkIn, HumRatioAirWalkIn); + Real64 Conv = DataEnvironment::Latitude * 2.0 * DataGlobals::Pi / 360.0; // Convert DataEnvironment::Latitude to radians + Real64 Gravity = 9.780373 * (1.0 + 0.0052891 * pow_2(std::sin(Conv)) - 0.0000059 * pow_2(std::sin(2.0 * Conv))); // CALCULATE ALL LOADS INFLUENCED BY ZONE TEMPERATURE AND RH // set to zero before summing over zones - SensibleLoadTotal = 0.0; - LatentLoadTotal = 0.0; + Real64 SensibleLoadTotal(0.0); // Total sensible load on WalkIn over all zones (W) + Real64 LatentLoadTotal(0.0); // total latent load on WalkIn over all zones (W) + Real64 ZoneLatentLoad(0.0); // Latent WalkIn credit delivered to zone (W) + WalkIn(WalkInID).SensZoneCreditRate = 0.0; WalkIn(WalkInID).SensZoneCreditCoolRate = 0.0; WalkIn(WalkInID).SensZoneCreditCool = 0.0; @@ -13458,25 +13381,29 @@ namespace RefrigeratedCase { // Start zone loop: for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ZoneSensLoad = 0.0; - GlassDoorSensHeat = 0.0; - StockDoorSensHeat = 0.0; int ZoneNum = WalkIn(WalkInID).ZoneNum(ZoneID); int ZoneNodeNum = WalkIn(WalkInID).ZoneNodeNum(ZoneID); - ZoneDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; - DelTemp = ZoneDryBulb - TWalkIn; - StockDoorArea = WalkIn(WalkInID).AreaStockDr(ZoneID); - GlassDoorArea = WalkIn(WalkInID).AreaGlassDr(ZoneID); - UAOtherSurfaces = WalkIn(WalkInID).SurfaceArea(ZoneID) * WalkIn(WalkInID).UValue(ZoneID); - DoorFlowFactor = 0.8; // see ASHRAE Refrigeration, p13.5, 2006 + Real64 ZoneDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; // Dry Bulb Temperature of adjacent zone + Real64 WalkInLatLoad = -ZoneLatentLoad; // Walk in cooler latent load facing particular zone (W) + Real64 DelTemp = ZoneDryBulb - TWalkIn; // Difference between zone and walk in temperatures (C) + Real64 StockDoorArea = WalkIn(WalkInID).AreaStockDr(ZoneID); + Real64 GlassDoorArea = WalkIn(WalkInID).AreaGlassDr(ZoneID); // facing a particular zone (m2) + Real64 UAOtherSurfaces = WalkIn(WalkInID).SurfaceArea(ZoneID) * WalkIn(WalkInID).UValue(ZoneID); // UA for non-door surfaces facing a certain zone (W/C) + Real64 ZInfilSensLoad(0.0); // Sensible load due to infiltration in one zone + Real64 ZdoorSensLoad(0.0); // Sensible load due to UA delta T through closed door in one zone + + // Derate compared to fully developed flow through 100% open door + Real64 DoorFlowFactor = 0.8; // see ASHRAE Refrigeration, p13.5, 2006 if (DelTemp <= 11.0) DoorFlowFactor = 1.1; // from ASHRAE Refrigeration Loads // Get infiltration loads if either type of door is present in this zone if (StockDoorArea > 0.0 || GlassDoorArea > 0.0) { - ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); - EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, DataEnvironment::OutBaroPress, RoutineName); - HumRatioZoneAir = Psychrometrics::PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); - DensityZoneAir = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneDryBulb, HumRatioZoneAir, RoutineName); + // Zone relative humidity fraction (decimal) + Real64 ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); + // Enthalpy of the air in a particular zone (J/kg) + Real64 EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, DataEnvironment::OutBaroPress, RoutineName); + Real64 HumRatioZoneAir = Psychrometrics::PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); + Real64 DensityZoneAir = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneDryBulb, HumRatioZoneAir, RoutineName); if (DensityZoneAir < DensityAirWalkIn) { // usual case when walk in is colder than zone DensitySqRtFactor = std::sqrt(1.0 - DensityZoneAir / DensityAirWalkIn); DensityFactorFm = std::pow(2.0 / (1.0 + std::pow(DensityAirWalkIn / DensityZoneAir, 0.333)), 1.5); @@ -13487,10 +13414,14 @@ namespace RefrigeratedCase { DensitySqRtFactor = std::sqrt(1.0 - DensityAirWalkIn / DensityZoneAir); DensityFactorFm = std::pow(2.0 / (1.0 + std::pow(DensityZoneAir / DensityAirWalkIn, 0.333)), 1.5); } // check for density in zone and in walk-in to avoid taking sqrt of neg number - GlassDoorInfLoad = 0.0; - StockDoorInfLoad = 0.0; - StockDoorSensHeat = 0.0; - GlassDoorSensHeat = 0.0; + + Real64 StockDoorInfLoad = 0.0; // infiltration through stock doors in a particular zone (W) + Real64 StockDoorSensHeat = 0.0; // sensible heat gain through stock doors (UA*delta T) (W) + Real64 DoorProtectEff(0.0); // Door protection effectiveness + Real64 DrHeight(0.0); // Door height (m) + Real64 DrArea(0.0); // Door area (m2) + Real64 FullFlowInfLoad(0.0); // Total load (lat + sens) due to 100% open doors w/ fully developed flow (W) + if (StockDoorArea > 0.0) { { auto const SELECT_CASE_var(WalkIn(WalkInID).StockDoorProtectType(ZoneID)); @@ -13506,7 +13437,7 @@ namespace RefrigeratedCase { DrHeight = WalkIn(WalkInID).HeightStockDr(ZoneID); DrArea = StockDoorArea; // if exists, get Stock Door Zone schedule - DoorOpenFactor = DefaultWalkInDoorOpenFactor; + Real64 DoorOpenFactor = DefaultWalkInDoorOpenFactor; if (WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) > 0) DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID)); @@ -13516,12 +13447,15 @@ namespace RefrigeratedCase { StockDoorSensHeat = DrArea * WalkIn(WalkInID).UValueStockDr(ZoneID) * DelTemp; } // have stock doors + Real64 GlassDoorSensHeat(0.0); // sensible heat gain through glass reach-in doors (UA*delta T) (W) + Real64 GlassDoorInfLoad = 0.0; // infiltration through glass reach-in doors in a particular zone (W) + if (GlassDoorArea > 0.0) { DoorProtectEff = 0.5; // Assume glass doors have air curtain DrHeight = WalkIn(WalkInID).HeightGlassDr(ZoneID); DrArea = GlassDoorArea; // get Glass Door Zone schedule - DoorOpenFactor = DefaultWalkInDoorOpenFactor; // default value + Real64 DoorOpenFactor = DefaultWalkInDoorOpenFactor; // default value if (WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) > 0) DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID)); @@ -13533,9 +13467,9 @@ namespace RefrigeratedCase { // assume mass dry air infiltrating into walk-in == mass out into zone, // that is, equal air exchange (ASHRAE 2006 Refrigeration) - ZoneInfilLoad = -StockDoorInfLoad - GlassDoorInfLoad; - MassDryAirRate = -ZoneInfilLoad / (EnthalpyZoneAir - EnthalpyAirWalkIn); - WaterRemovRate = MassDryAirRate * (HumRatioZoneAir - HumRatioAirWalkIn); + Real64 ZoneInfilLoad = -StockDoorInfLoad - GlassDoorInfLoad; // Walk in cooler infiltration load (sens + latent) in certain zone (W) + Real64 MassDryAirRate = -ZoneInfilLoad / (EnthalpyZoneAir - EnthalpyAirWalkIn); // Mass dry air infiltrating into/out-of walkin through doors (kg/s) + Real64 WaterRemovRate = MassDryAirRate * (HumRatioZoneAir - HumRatioAirWalkIn); // Walk in cooler removes water at this rate in this zone (kg/s) // Just as with cases, we assume no latent credit (water removal = 0) to zone or load on cooler during dripdown // To be consistent with the treatment of refrigerated cases, latent load // and latent credit are bothbased on reducing the infiltrating vapor to ice. (This is @@ -13550,14 +13484,15 @@ namespace RefrigeratedCase { // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem if (!DataGlobals::WarmupFlag) { - FrostChangekg = (WaterRemovRate * DataGlobals::TimeStepZoneSec) * (1.0 - DefrostDripDownSchedule); + Real64 FrostChangekg = (WaterRemovRate * DataGlobals::TimeStepZoneSec) * (1.0 - DefrostDripDownSchedule); WalkIn(WalkInID).KgFrost += FrostChangekg; } } // water to ice } // No doors - ZoneSensLoad = ZInfilSensLoad + ZdoorSensLoad - UAOtherSurfaces * DelTemp; - WalkInSensLoad = -ZoneSensLoad; + // Sensible WalkIn credit delivered to a particular zone (W) + Real64 ZoneSensLoad = ZInfilSensLoad + ZdoorSensLoad - UAOtherSurfaces * DelTemp; + Real64 WalkInSensLoad = -ZoneSensLoad; // Walk in cooler sensible load facing particular zone (W) // Update globals for use in ZoneTemperaturePredictorCorrector (Air Heat Balance) and // Zone Equipment Manager. Sum walk-in credits to zone using existing 'casecredit' variable @@ -13593,20 +13528,25 @@ namespace RefrigeratedCase { // cooling coil fan power default is 375W, = 1/2 HP (Tyler showed 1/3 to 3/4 hp) // CALCULATE AUX LOADS DUE TO LIGHTS, FANS AND HEATERS - LightLoad = DesignLighting * LightingSchedule; + Real64 LightLoad = DesignLighting * LightingSchedule; // Total lighting energy rate (W) // turn coil fan off during defrost/drip - down period - FanLoad = WalkIn(WalkInID).CircFanPower * CircFanSchedule + WalkIn(WalkInID).CoilFanPower * (1.0 - DefrostDripDownSchedule); - HeaterLoad = WalkIn(WalkInID).HeaterPower * HeaterSchedule; + + // Total fan energy rate (W) + Real64 FanLoad = WalkIn(WalkInID).CircFanPower * CircFanSchedule + WalkIn(WalkInID).CoilFanPower * (1.0 - DefrostDripDownSchedule); + Real64 HeaterLoad = WalkIn(WalkInID).HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) // Calculate floor load - using 'DataEnvironment::GroundTemp' assigned in weather manager (can be entered by user if desired) // Default value is 18C. - FloorLoad = WalkIn(WalkInID).FloorArea * WalkIn(WalkInID).FloorUValue * (DataEnvironment::GroundTemp - TWalkIn); + // Total floor energy rate (W) + Real64 FloorLoad = WalkIn(WalkInID).FloorArea * WalkIn(WalkInID).FloorUValue * (DataEnvironment::GroundTemp - TWalkIn); + + Real64 DefrostLoad; // DEFROST CALCULATIONS if ((DefrostSchedule > 0.0) && (WalkIn(WalkInID).DefrostType != WalkInDefrostNone) && (WalkIn(WalkInID).DefrostType != WalkInDefrostOffCycle)) { DefrostLoad = DefrostCap * DefrostSchedule; // W - StartFrostKg = WalkIn(WalkInID).KgFrost; - DefrostEnergy = DefrostLoad * DataGlobals::TimeStepZoneSec; // Joules + Real64 StartFrostKg = WalkIn(WalkInID).KgFrost; // frost load at start of time step (kg of ice) + Real64 DefrostEnergy = DefrostLoad * DataGlobals::TimeStepZoneSec; // Joules if (WalkIn(WalkInID).DefrostControlType == DefrostContTempTerm) { // Need to turn defrost system off early if controlled by temperature and all ice melted // For temperature termination, need to recognize not all defrost heat goes to melt ice @@ -13614,12 +13554,12 @@ namespace RefrigeratedCase { // others and xfer heat to environment) // Assume full ice melting satisfies temperature control. // (defaults for DefEnergyFraction are :=0.7 for elec, =0.3 for fluids) - DefEnergyFraction = WalkIn(WalkInID).DefEnergyFraction; - AvailDefrostEnergy = DefEnergyFraction * DefrostEnergy; // Joules avail to melt ice - IceSensHeatNeeded = 0.0; + Real64 DefEnergyFraction = WalkIn(WalkInID).DefEnergyFraction; + Real64 AvailDefrostEnergy = DefEnergyFraction * DefrostEnergy; // Joules avail to melt ice + Real64 IceSensHeatNeeded = 0.0; // Energy to raise frost temperature to 0C, used w/ temp termination (J) if (StartFrostKg > 0.0) { if (WalkIn(WalkInID).IceTemp < 0.0) { - StartIceTemp = WalkIn(WalkInID).IceTemp; + Real64 StartIceTemp = WalkIn(WalkInID).IceTemp; // Frost temperature at start of time step [C] IceSensHeatNeeded = StartFrostKg * SpecificHeatIce * (0.0 - StartIceTemp); // Joules if (AvailDefrostEnergy >= IceSensHeatNeeded) { WalkIn(WalkInID).IceTemp = 0.0; @@ -13630,7 +13570,7 @@ namespace RefrigeratedCase { } // AvailDefrostEnergy >= IceSensHeatNeeded } // IceTemp < 0, need to raise temperature of ice // Reduce defrost heat load on walkin by amount of ice melted during time step - FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); + Real64 FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); if (FrostChangekg < StartFrostKg) { DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; @@ -13654,7 +13594,7 @@ namespace RefrigeratedCase { } // have frost present } else { // Not temperature control type - FrostChangekg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); + Real64 FrostChangekg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); // Reduce defrost heat load on walkin by amount of ice melted during time step DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; @@ -13681,7 +13621,7 @@ namespace RefrigeratedCase { //*** See if capacity meets load and manage accumulated stored energy *********************************** SensibleLoadTotal += LightLoad + HeaterLoad + FanLoad + StockingLoad + DefrostLoad + FloorLoad; - LoadTotal = SensibleLoadTotal + LatentLoadTotal; + Real64 LoadTotal = SensibleLoadTotal + LatentLoadTotal; // total load in time step (W) // Account for difference between load and capacity. Assume rack or system able to provide // rated capacity. If it can't, that unmet energy will be stored and discharged at the system level. @@ -13693,11 +13633,16 @@ namespace RefrigeratedCase { // temperature will increase by a small amount during defrost and the system will have to // run full out until the temperature is brought back down. - StoredEnergyRate = WalkIn(WalkInID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; - LoadRequested = LoadTotal + StoredEnergyRate; + // Rate needed to serve all stored energy during single time step (W) + Real64 StoredEnergyRate = WalkIn(WalkInID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; + Real64 LoadRequested = LoadTotal + StoredEnergyRate; // Load necessary to meet current and all stored energy needs (W) + + Real64 LatentCapApplied; // Walk In latent capacity at specific operating conditions + Real64 SensibleCapApplied(0.0); // Walk In sensible capacity at specific operating conditions // prorate available cooling capacity for portion of time off due to drip down. - MaxCap = DesignRatedCap * (1.0 - DefrostDripDownSchedule); + Real64 MaxCap = DesignRatedCap * (1.0 - DefrostDripDownSchedule); // Design chilling capacity reduced according to drip-down schedule (W) + if (MaxCap >= LoadRequested) { // Have more at least as much capacity available as needed, even counting stored energy CapApplied = LoadRequested; @@ -13813,7 +13758,6 @@ namespace RefrigeratedCase { Real64 MaxVolFlow; // Flow can be limited by either total pump capacity or heat exchanger design (m3/s) Real64 PartLdFrac; // Used to ratio pump power Real64 PartPumpFrac; // Used to see if part pumps dispatched meets part pump load - // REAL(r64) :: PartPower ! Used to ratio power for last pump added to loop Real64 PrevTotalLoad; // Used in pump energy convergence test Real64 ReceiverHeatGain; // Optional (W) Real64 RefrigerationLoad; // Load for cases and walk-ins served by loop, does not include pump energy (W) From 78e65e7725fe6240ac22ac6559156a4f5504517c Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 08:50:02 -0700 Subject: [PATCH 53/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 226 +++++++++-------------------- src/EnergyPlus/RefrigeratedCase.hh | 4 +- 2 files changed, 73 insertions(+), 157 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 1fcb8ea351e..8f8aa32e2f7 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -13752,8 +13752,6 @@ namespace RefrigeratedCase { Real64 Error; // Used in iterative soln for pumps needed to meet load (that has to include pump energy) Real64 Eta(0.0); // Secondary loop heat exchanger eta, dimensionless Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) - static Real64 LoadRequested(0.0); // Load necessary to meet current and all stored energy needs (W) - static Real64 LocalTimeStep(0.0); // DataGlobals::TimeStepZone for case/walkin systems, DataHVACGlobals::TimeStepSys for coil systems Real64 MaxLoad; // Secondary loop capacity can be limited by heat exchanger or pumps (W) Real64 MaxVolFlow; // Flow can be limited by either total pump capacity or heat exchanger design (m3/s) Real64 PartLdFrac; // Used to ratio pump power @@ -13776,7 +13774,7 @@ namespace RefrigeratedCase { Real64 VolFlowRate; // Used in dispatching pumps to meet load (m3/s) Real64 UnmetEnergy; // Cumulative, grows and shrinks with defrost cycles on loads served by loop (J) - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; NumPumps = Secondary(SecondaryNum).NumPumps; @@ -13955,7 +13953,8 @@ namespace RefrigeratedCase { // save the unmet/stored load to be met in succeeding time steps. if (Secondary(SecondaryNum).NumCoils == 0) { StoredEnergyRate = max(0.0, (UnmetEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour)); - LoadRequested = TotalLoad + StoredEnergyRate; + // Load necessary to meet current and all stored energy needs (W) + Real64 LoadRequested = TotalLoad + StoredEnergyRate; if (MaxLoad > LoadRequested) { // Have at least as much capacity avail as needed, even counting stored energy TotalCoolingLoad = LoadRequested; @@ -14347,153 +14346,74 @@ namespace RefrigeratedCase { // Unit Load Factor, Total Capacity Map, or a set of European standards. // Correction factors for material and refrigerant are applied to all of these ratings. - static Real64 UnitLoadFactorSens(0.0); // Rated capacity divided by rated DT1 (T air in - Tevap) (W/delta C) - static std::string const TrackMessage("from RefrigeratedCase:CalculateCoil"); - static int FanSpeedControlType(0); // from input - static int SHRCorrectionCurvePtr(0); // Points to curve entered by user to specify total/sensible capacity as a function of SHR - static int SHRCorrectionType(0); // SHR60, QuadraticSHR, European, or TabularRH_DT1_TRoom - static int ZoneNodeNum(0); // Zone node number - static Real64 AirVolRatio(0.0); // used when operating at part load - static Real64 AirVolumeFlowMax(0.0); // Coil air flow limited by drip down schedule (m3/s) - static Real64 AirVolumeFlowRated(0.0); // Coil rated air flow (m3/s) - static Real64 AvailDefrostEnergy(0.0); // available to melt ice with temp term control (J) - static Real64 CapFac(0.0); // used to reduce fan power when don't need full coil capacity - static Real64 CoilCapTotal(0.0); // Sensible plus latent load (W) - static Real64 CoilCapTotEstimate(0.0); // Part of loop to solve for total coil capacity as a function of inlet air conditions (W) - static Real64 CoilInletCp(0.0); // Coil air inlet specific heat (J/kg-deltaC) - static Real64 CoilInletDensity(0.0); // Coil air inlet density (kg/m3) - static Real64 CoilInletDryAirCp(0.0); // Dry air specific heat at coil inlet temperature (J/kg-C) - static Real64 CoilInletDryAirDensity(0.0); // Dry Air density at coil inlet temperature (kg/m3) - static Real64 CoilInletHumRatio(0.0); // Coil air inlet humidity ratio (kg water/kg air) - static Real64 CoilInletTemp(0.0); // Inlet temperature of air to coil, not mixed zone temperature unless "middle" location selected (C) - static Real64 CoilInletEnthalpy(0.0); // Coil inlet air enthalpy (J/kg) - static Real64 CoilInletRHFrac(0.0); // Coil inlet air relative humidity expressed as a fraction (0 to 1) - static Real64 CoilSchedule(0.0); // Current value of Coil operating (availability) schedule - static Real64 CoolingLoadNet(0.0); // Cooling capacity of the coil minus fan, heater, and defrost loads (W) - static Real64 DefrostCap(0.0); // Design defrost capacity of Coil (W) - static Real64 DefrostEnergy(0.0); // (J) - static Real64 DefEnergyFraction(0.0); // dimensionless - static Real64 DefrostLoad(0.0); // Part of the defrost that is a heat load on the zone (W) - static Real64 DefrostSchedule(0.0); // Coil defrost schedule, between 0 and 1 - static Real64 DefrostDripDownSchedule(0.0); // Coil drip-down schedule (allows coil to drain after defrost) - static Real64 DefrostEnergyNeeded(0.0); // Energy needed to melt all ice, used with temperature termination (J) - static Real64 DefrostRateNeeded(0.0); // Defrost load that actually goes to melting ice (W) - static Real64 DryAirMassFlowMax(0.0); // Rated volume flow rate times dry air density adjusted for schedules (kg/s) - static Real64 DryAirMassFlowRated(0.0); // Rated volume flow rate times dry air density - // REAL(r64) :: Error =0.0d0 ! Used in iterative solution for sensible heat ratio - static Real64 ExitHumRatio(0.0); // kg water/kg air - static Real64 ExitTemperature(0.0); // Air temperature leaving the coil (C) - static Real64 ExitTemperatureEstimate(0.0); // Estimated Air temperature leaving the coil (C) - static Real64 ExitEnthalpy(0.0); // Air enthalpy leaving the coil (J/kg) - static Real64 ExitEnthalpyEstimate(0.0); // Estimated Air enthalpy leaving the coil (J/kg) - static Real64 FanMinAirFlowRatio(0.0); // From input - static Real64 FanPowerActual(0.0); // (W) - static Real64 FanPowerRated(0.0); // (W) - static Real64 FanPowerMax(0.0); // Total fan energy rate, limited by dripdown period (W) - static Real64 FanPowerRatio(0.0); // Used for variable speed fans, dimensionless - static Real64 FrostChangekg(0.0); // Amount of frost added or melted (kg) - static Real64 HeaterSchedule(0.0); // zero to one - static Real64 HeaterLoad(0.0); // Total heater (except defrost) energy rate (W) - static Real64 IceSensHeatNeeded(0.0); // Energy to raise frost temperature to 0C, used w/ temp termination (J) - static Real64 LatLoadServed(0.0); // Energy rate used to remove water from zone air (W) - static Real64 MaxTemperatureDif(0.0); // Used to limit capacity during initial pulldown (deltaC) - static Real64 SensibleCapacityMax(0.0); // Sensible capacity adjusted for any time in dripdown state (W) - // REAL(r64) :: SensibleLoad =0.0d0 ! Sensible load provided by coil (W) - static Real64 SensLoadRequested(0.0); // Sensible load requested by zone balance (W) - static Real64 SensLoadFromZone(0.0); // Net sensible load removed from zone after accounting for heaters, fans, defrost [W] - static Real64 SensLoadRequestedGross(0.0); // Gross sensible load removed by coil - static Real64 SensLoadGross(0.0); // Sensible load met by coil (W) - static Real64 SHR(0.0); // Sensible heat ratio, sensible load/total load - static Real64 SHRCorrection(0.0); // Actual total/sensible load, NOT = Inverse SHR (unless coil efficiency = 1.0), - // but function of SHR, which is why iteration needed - static Real64 SHRCorrection60(0.0); // Total capacity as a fraction of sensible capacity at a SHR of 0.6, entered by user - static Real64 Slope(0.0); // Part of linear SHR60 correction factor, dimensionless - static Real64 StartIceTemp(0.0); // Frost temperature at start of time step [C] - static Real64 StartFrostKg(0.0); // frost load at start of time step (kg of ice) - static Real64 TemperatureDif(0.0); // difference between inlet air and evaporating temperature (deltaC) - static Real64 TEvap(0.0); // Evaporating temperature in the coil (C) - static Real64 WaterRemovRate(0.0); // Walk in cooler removes water at this rate in this zone (kg/s) - static Real64 Yint(0.0); // Part of linear SHR60 correction factor, dimensionless - static Real64 ZoneDryAirDensity(0.0); // Dry air density at mixed zone conditions - static Real64 ZoneMixedAirCp(0.0); // J/kg-deltaC - static Real64 ZoneMixedAirDensity(0.0); // kg/m3 - static Real64 ZoneMixedAirDryBulb(0.0); // (C) - static Real64 ZoneMixedAirRHFrac(0.0); // relative humidity of mixed air in the zone expressed as a fraction from 0 to 1 - static Real64 ZoneMixedAirEnthalpy(0.0); // J/kg - static Real64 ZoneMixedAirHumRatio(0.0); // kg water/kg air in the zone mixed air - // GET SCHEDULES auto &warehouse_coil(WarehouseCoil(CoilID)); - CoilSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.SchedPtr); + Real64 CoilSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.SchedPtr); // Current value of Coil operating (availability) schedule if (CoilSchedule <= 0.0) return; - DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostSchedPtr); - DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostDripDownSchedPtr); + Real64 DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostSchedPtr); // Coil defrost schedule, between 0 and 1 + Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostDripDownSchedPtr); // Coil drip-down schedule (allows coil to drain after defrost) // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); // next value optional, so set to default before checking for schedule - HeaterSchedule = 1.0; + Real64 HeaterSchedule = 1.0; // zero to one if (warehouse_coil.HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.HeaterSchedPtr); - AirVolRatio = 0.0; - AirVolumeFlowMax = 0.0; - CapFac = 0.0; - CoilCapTotal = 0.0; - CoilCapTotEstimate = 0.0; - CoolingLoadNet = 0.0; - DefrostLoad = 0.0; - DryAirMassFlowMax = 0.0; - ExitEnthalpyEstimate = 0.0; - ExitEnthalpy = 0.0; - ExitTemperature = 0.0; - ExitHumRatio = 0.0; - FanPowerActual = 0.0; - HeaterLoad = 0.0; - LatLoadServed = 0.0; - FanPowerRatio = 0.0; - FrostChangekg = 0.0; - SensLoadFromZone = 0.0; - SensLoadGross = 0.0; - SensibleCapacityMax = 0.0; - SHR = 0.0; - WaterRemovRate = 0.0; - // Set local subroutine variables for convenience - ZoneNodeNum = warehouse_coil.ZoneNodeNum; - AirVolumeFlowRated = warehouse_coil.RatedAirVolumeFlow; - FanPowerRated = warehouse_coil.RatedFanPower; - HeaterLoad = warehouse_coil.HeaterPower * HeaterSchedule; - UnitLoadFactorSens = warehouse_coil.UnitLoadFactorSens; - DefrostCap = warehouse_coil.DefrostCapacity; - TEvap = warehouse_coil.TEvapDesign; - SHRCorrectionType = warehouse_coil.SHRCorrectionType; - SHRCorrection60 = warehouse_coil.SHRCorrection60; - SHRCorrectionCurvePtr = warehouse_coil.SHRCorrectionCurvePtr; - FanMinAirFlowRatio = warehouse_coil.FanMinAirFlowRatio; - FanSpeedControlType = warehouse_coil.FanType; - MaxTemperatureDif = warehouse_coil.MaxTemperatureDif; + int ZoneNodeNum = warehouse_coil.ZoneNodeNum; // Zone node number + int SHRCorrectionType = warehouse_coil.SHRCorrectionType; // SHR60, QuadraticSHR, European, or TabularRH_DT1_TRoom + int SHRCorrectionCurvePtr = warehouse_coil.SHRCorrectionCurvePtr; + int FanSpeedControlType = warehouse_coil.FanType; + Real64 AirVolumeFlowRated = warehouse_coil.RatedAirVolumeFlow; // Coil rated air flow (m3/s) + Real64 FanPowerRated = warehouse_coil.RatedFanPower; // (W) + Real64 HeaterLoad = warehouse_coil.HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) + Real64 DefrostCap = warehouse_coil.DefrostCapacity; // Design defrost capacity of Coil (W) + Real64 TEvap = warehouse_coil.TEvapDesign; // Evaporating temperature in the coil (C) + Real64 SHRCorrection60 = warehouse_coil.SHRCorrection60; // Total capacity as a fraction of sensible capacity at a SHR of 0.6, entered by user + Real64 FanMinAirFlowRatio = warehouse_coil.FanMinAirFlowRatio; // From input + Real64 MaxTemperatureDif = warehouse_coil.MaxTemperatureDif; // Used to limit capacity during initial pulldown (deltaC) + + Real64 CoilCapTotEstimate(0.0); // Part of loop to solve for total coil capacity as a function of inlet air conditions (W) + Real64 AirVolumeFlowMax(0.0); // Coil air flow limited by drip down schedule (m3/s) + Real64 CoilCapTotal(0.0); // Sensible plus latent load (W) + Real64 CoilInletDensity(0.0); // Coil air inlet density (kg/m3) + Real64 CoilInletDryAirCp(0.0); // Dry air specific heat at coil inlet temperature (J/kg-C) + Real64 CoilInletHumRatio(0.0); // Coil air inlet humidity ratio (kg water/kg air) + Real64 CoilInletTemp(0.0); // Inlet temperature of air to coil, not mixed zone temperature unless "middle" location selected (C) + Real64 CoilInletEnthalpy(0.0); // Coil inlet air enthalpy (J/kg) + Real64 CoilInletRHFrac(0.0); // Coil inlet air relative humidity expressed as a fraction (0 to 1) + Real64 DefrostLoad(0.0); + Real64 DryAirMassFlowMax(0.0); // Rated volume flow rate times dry air density adjusted for schedules (kg/s) + Real64 FanPowerActual(0.0); // (W) + Real64 FrostChangekg(0.0); // Amount of frost added or melted (kg) + Real64 LatLoadServed(0.0); // Energy rate used to remove water from zone air (W) + Real64 SensLoadRequestedGross(0.0); // Gross sensible load removed by coil + Real64 SensLoadGross(0.0); // Sensible load met by coil (W) + Real64 SHR(0.0); // Sensible heat ratio, sensible load/total load + Real64 SHRCorrection(0.0); // Actual total/sensible load, NOT = Inverse SHR (unless coil efficiency = 1.0) + Real64 WaterRemovRate(0.0); // Walk in cooler removes water at this rate in this zone (kg/s) if (DefrostDripDownSchedule == 1.0) { AirVolumeFlowMax = 0.0; DryAirMassFlowMax = 0.0; } else { // DefrostDripDownSchedule < 1.0d0, cooling will occur at least part of the time step - SensLoadRequested = -QZnReq; // here let cooling demand be positive within subroutine + // Sensible load requested by zone balance (W) + Real64 SensLoadRequested = -QZnReq; // here let cooling demand be positive within subroutine if (SensLoadRequested <= 0.0) { // No load so assume control keeps off, except that scheduled defrost still occurs AirVolumeFlowMax = 0.0; DryAirMassFlowMax = 0.0; } else { SensLoadRequestedGross = SensLoadRequested + HeaterLoad + FanPowerRated; - ZoneMixedAirDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; - ZoneMixedAirHumRatio = DataLoopNode::Node(ZoneNodeNum).HumRat; - ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, DataEnvironment::OutBaroPress, TrackMessage); - ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, DataEnvironment::OutBaroPress, TrackMessage); - ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); - ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); - ZoneMixedAirCp = Psychrometrics::PsyCpAirFnWTdb(ZoneMixedAirHumRatio, ZoneMixedAirDryBulb); - DryAirMassFlowRated = AirVolumeFlowRated * ZoneDryAirDensity; + Real64 ZoneMixedAirDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; // (C) + Real64 ZoneMixedAirHumRatio = DataLoopNode::Node(ZoneNodeNum).HumRat; // kg water/kg air in the zone mixed air + Real64 ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, DataEnvironment::OutBaroPress, TrackMessage); // relative humidity of mixed air in the zone expressed as a fraction from 0 to 1 + Real64 ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, DataEnvironment::OutBaroPress, TrackMessage); // J/kg + Real64 ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); // kg/m3 + Real64 ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); // Dry air density at mixed zone conditions + Real64 DryAirMassFlowRated = AirVolumeFlowRated * ZoneDryAirDensity; // Rated volume flow rate times dry air density // calc t inlet to coil assuming at middle/mixed point in room bbb - // later need to do for hottest/coolest in room where Tin /= Tzonemixed // calc RH inlet to coil assuming at middle/mixed point in room @@ -14508,9 +14428,7 @@ namespace RefrigeratedCase { CoilInletEnthalpy = ZoneMixedAirEnthalpy; CoilInletRHFrac = ZoneMixedAirRHFrac; CoilInletDensity = ZoneMixedAirDensity; - CoilInletCp = ZoneMixedAirCp; CoilInletHumRatio = ZoneMixedAirHumRatio; - CoilInletDryAirDensity = ZoneDryAirDensity; CoilInletDryAirCp = Psychrometrics::PsyCpAirFnWTdb(0.0, CoilInletTemp); break; } @@ -14522,7 +14440,7 @@ namespace RefrigeratedCase { if (AirVolumeFlowMax > 0.0) { - TemperatureDif = min(MaxTemperatureDif, (CoilInletTemp - TEvap)); + Real64 TemperatureDif = min(MaxTemperatureDif, (CoilInletTemp - TEvap)); // difference between inlet air and evaporating temperature (deltaC) if (warehouse_coil.RatingType == RatedCapacityTotal) { // RatingType = CapacityTotalSpecificConditions, will be doing a table lookup @@ -14534,15 +14452,15 @@ namespace RefrigeratedCase { warehouse_coil.RatedCapTotal * (1.0 - DefrostDripDownSchedule) * CoilSchedule; } else { // work with unit load factor (sensible only), function of DT1 (Tair in drybulb-Tevap) - SensibleCapacityMax = warehouse_coil.UnitLoadFactorSens * TemperatureDif * (1.0 - DefrostDripDownSchedule) * CoilSchedule; + Real64 SensibleCapacityMax = warehouse_coil.UnitLoadFactorSens * TemperatureDif * (1.0 - DefrostDripDownSchedule) * CoilSchedule; // Sensible capacity adjusted for any time in dripdown state (W) if (SensibleCapacityMax > 0.0) { - ExitTemperatureEstimate = CoilInletTemp - (SensibleCapacityMax / (DryAirMassFlowMax * CoilInletDryAirCp)); + Real64 ExitTemperatureEstimate = CoilInletTemp - (SensibleCapacityMax / (DryAirMassFlowMax * CoilInletDryAirCp)); // Estimated Air temperature leaving the coil (C) if (ExitTemperatureEstimate <= TEvap) { ShowWarningError(TrackMessage + "Refrigeration:AirCoil: " + warehouse_coil.Name); ShowContinueError(" The estimated air outlet temperature is less than the evaporating temperature."); } - ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, DataEnvironment::OutBaroPress, TrackMessage); + Real64 ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, DataEnvironment::OutBaroPress, TrackMessage); // Estimated Air enthalpy leaving the coil (J/kg) if (ExitEnthalpyEstimate <= CoilInletEnthalpy) { CoilCapTotEstimate = (CoilInletEnthalpy - ExitEnthalpyEstimate) * AirVolumeFlowMax * CoilInletDensity; } else { @@ -14562,8 +14480,8 @@ namespace RefrigeratedCase { auto const SELECT_CASE_var(SHRCorrectionType); if (SELECT_CASE_var == SHR60) { // line from y = SHRCorrection60 value to 1. as x(SHR) goes from .6 to 1, from B. Nelson, ASHRAE August 2010 - Slope = (SHRCorrection60 - 1.0) / (0.6 - 1.0); - Yint = SHRCorrection60 - (Slope * 0.6); + Real64 Slope = (SHRCorrection60 - 1.0) / (0.6 - 1.0); // Part of linear SHR60 correction factor, dimensionless + Real64 Yint = SHRCorrection60 - (Slope * 0.6); // Part of linear SHR60 correction factor, dimensionless SHRCorrection = Slope * SHR + Yint; } else if (SELECT_CASE_var == QuadraticSHR) { SHRCorrection = CurveManager::CurveValue(SHRCorrectionCurvePtr, SHR); @@ -14603,9 +14521,9 @@ namespace RefrigeratedCase { } // Rating type : CapacityTotalSpecificConditions or Sensible Unit Load Factor if (CoilCapTotEstimate > 0.0) { - ExitEnthalpy = CoilInletEnthalpy - (CoilCapTotEstimate / (AirVolumeFlowMax * CoilInletDensity)); - ExitTemperature = Psychrometrics::PsyTsatFnHPb(ExitEnthalpy, DataEnvironment::OutBaroPress, TrackMessage); // RH =1.0 at Tsat - ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); + Real64 ExitEnthalpy = CoilInletEnthalpy - (CoilCapTotEstimate / (AirVolumeFlowMax * CoilInletDensity)); // Air enthalpy leaving the coil (J/kg) + Real64 ExitTemperature = Psychrometrics::PsyTsatFnHPb(ExitEnthalpy, DataEnvironment::OutBaroPress, TrackMessage); // RH =1.0 at Tsat // Air temperature leaving the coil (C) + Real64 ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); // kg water/kg air if (ExitHumRatio > CoilInletHumRatio) ExitHumRatio = CoilInletHumRatio; WaterRemovRate = DryAirMassFlowMax * (CoilInletHumRatio - ExitHumRatio); LatLoadServed = WaterRemovRate * IcetoVaporEnthalpy; @@ -14624,18 +14542,18 @@ namespace RefrigeratedCase { FanPowerActual = 0.0; } //(CoilCapTotEstimate > 0.0d0) - FanPowerMax = FanPowerRated * (1.0 - DefrostDripDownSchedule); + Real64 FanPowerMax = FanPowerRated * (1.0 - DefrostDripDownSchedule); // Total fan energy rate, limited by dripdown period (W) if (SensLoadGross > SensLoadRequestedGross) { // part load operation // don't need full chiller power, reduce fan speed to reduce air flow // move fan to part power if need to - CapFac = SensLoadRequestedGross / SensLoadGross; - AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, EvaporatorAirVolExponent)); + Real64 CapFac = SensLoadRequestedGross / SensLoadGross; // used to reduce fan power when don't need full coil capacity + Real64 AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, EvaporatorAirVolExponent)); // used when operating at part load // Fans limited by minimum air flow ratio { auto const SELECT_CASE_var(FanSpeedControlType); if (SELECT_CASE_var == FanVariableSpeed) { // fan power law, adjusted for reality, applies - FanPowerRatio = std::pow(AirVolRatio, 2.5); + Real64 FanPowerRatio = std::pow(AirVolRatio, 2.5); // Used for variable speed fans, dimensionless FanPowerActual = FanPowerRatio * FanPowerMax; } else if (SELECT_CASE_var == FanConstantSpeed) { FanPowerActual = AirVolRatio * std::exp(1.0 - AirVolRatio) * FanPowerMax; @@ -14692,9 +14610,9 @@ namespace RefrigeratedCase { // on the coils that stops defrost if the coils get above // a certain temperature (such as when there's no load and no ice) if ((DefrostSchedule > 0.0) && (warehouse_coil.DefrostType != DefrostNone) && (warehouse_coil.DefrostType != DefrostOffCycle)) { - DefrostLoad = DefrostCap * DefrostSchedule; // W - DefrostEnergy = DefrostLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; // Joules - StartFrostKg = warehouse_coil.KgFrost; + DefrostLoad = DefrostCap * DefrostSchedule; // Part of the defrost that is a heat load on the zone (W) + Real64 DefrostEnergy = DefrostLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; // Joules + Real64 StartFrostKg = warehouse_coil.KgFrost; // frost load at start of time step (kg of ice) if (warehouse_coil.DefrostControlType == DefrostContTempTerm) { // Need to turn defrost system off early if controlled by temperature and all ice melted @@ -14703,12 +14621,12 @@ namespace RefrigeratedCase { // others and xfer heat to environment) // Assume full ice melting satisfies temperature control. // (defaults for DefEnergyFraction are :=0.7 for elec, =0.3 for fluids) - DefEnergyFraction = warehouse_coil.DefEnergyFraction; - AvailDefrostEnergy = DefEnergyFraction * DefrostEnergy; // Joules avail to melt ice - IceSensHeatNeeded = 0.0; + Real64 DefEnergyFraction = warehouse_coil.DefEnergyFraction; // dimensionless + Real64 AvailDefrostEnergy = DefEnergyFraction * DefrostEnergy; // available to melt ice with temp term control (J) + Real64 IceSensHeatNeeded = 0.0; // Energy to raise frost temperature to 0C, used w/ temp termination (J) if (StartFrostKg > 0.0) { if (warehouse_coil.IceTemp < 0.0) { - StartIceTemp = warehouse_coil.IceTemp; + Real64 StartIceTemp = warehouse_coil.IceTemp; // Frost temperature at start of time step [C] IceSensHeatNeeded = StartFrostKg * SpecificHeatIce * (0.0 - StartIceTemp); // Joules if (AvailDefrostEnergy >= IceSensHeatNeeded) { warehouse_coil.IceTemp = 0.0; @@ -14727,11 +14645,12 @@ namespace RefrigeratedCase { } else { // all frost melted during time step, so need to terminate defrost // see Aug 8 2010 page 3 notes warehouse_coil.KgFrost = 0.0; - DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / + Real64 DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DefEnergyFraction; // Joules - energy needed including E unavail to melt ice DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour))); // reduce heat load on warehouse by energy put into ice melting - DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); + // Defrost load that actually goes to melting ice (W) + Real64 DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); DefrostLoad = max(0.0, (DefrostSchedule * DefrostCap - DefrostRateNeeded)); warehouse_coil.IceTemp = warehouse_coil.TEvapDesign; } // frost melted during time step less than amount of ice at start @@ -14756,8 +14675,7 @@ namespace RefrigeratedCase { DefrostLoad = 0.0; } // Defrost calculations - SensLoadFromZone = SensLoadGross - HeaterLoad - DefrostLoad - FanPowerActual; - CoolingLoadNet = SensLoadFromZone + LatLoadServed; + Real64 SensLoadFromZone = SensLoadGross - HeaterLoad - DefrostLoad - FanPowerActual; // Net sensible load removed from zone after accounting for heaters, fans, defrost [W] // ReportWarehouseCoil(CoilID) warehouse_coil.ThermalDefrostPower = DefrostLoad; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index e6e8821cd81..2b508c60550 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -167,7 +167,7 @@ namespace RefrigeratedCase { extern Real64 const IceMeltEnthalpy; // heat of fusion of water J/kg extern Real64 const TempTooHotToFrost; // C, used to check for frosting conditions on evaporator coils extern Real64 const IcetoVaporEnthalpy; // J/kg to freeze water vapor to ice - extern Real64 const WatertoVaporEnthalpy; // at 0C + extern Real64 const SpecificHeatIce; // in the likely range (2040 at 0C and 1950 at -20C) (J/kg-C) extern Real64 const CondAirVolExponentDry; // exponent for forced air over a cylinder, = 1/.633 // per ASHRAE 2005 (page 3.15) @@ -253,8 +253,6 @@ namespace RefrigeratedCase { extern Array1D_bool ShowUnmetSecondEnergyWarning; // Used for one-time warning message for possible // compressor input error regarding secondary loop heat exchanger capacity // Refrigerated warehouse coil variables - extern Array1D_bool CheckChillerName; // used when simrefrigcoil called for a zone - // LOGICAL, ALLOCATABLE,DIMENSION(:) :: CheckZoneNum !used when simrefrigcoil called for a zone extern Array1D_bool ShowCoilFrostWarning; // Used for one-time warning message if defrost cycles insufficient to melt ice // Refrigeration Plant connections checks From b675d815fc4fb0690c5604c9d0947b185cf4c01c Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 09:26:46 -0700 Subject: [PATCH 54/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 75 ++++++++++++------------------ 1 file changed, 29 insertions(+), 46 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 8f8aa32e2f7..da9b7885965 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -14016,10 +14016,8 @@ namespace RefrigeratedCase { // heat absorbed by suction piping, secondary loop distribution piping, and // secondary receiver shells - static int ZoneNum(0); // used calculating total refrigeration interactions for zone - if (UseSysTimeStep) { // air chillers - for (ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { + for (int ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { CoilSysCredit(ZoneNum).ReportH20RemovedKgPerS_FromZoneRate = -CoilSysCredit(ZoneNum).LatKgPerS_ToZoneRate; CoilSysCredit(ZoneNum).ReportLatCreditToZoneRate = -CoilSysCredit(ZoneNum).LatCreditToZoneRate; CoilSysCredit(ZoneNum).ReportLatCreditToZoneEnergy = -CoilSysCredit(ZoneNum).LatCreditToZoneEnergy; @@ -14045,7 +14043,7 @@ namespace RefrigeratedCase { // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - for (ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { + for (int ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; // Latent always negative CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; @@ -14199,8 +14197,6 @@ namespace RefrigeratedCase { // Called from Zone Equipment Manager. // have however done the variable definitions for in and out. - static int CoilID(0); // Index to coil - static int CoilIndex(0); // rank of coils within system static Real64 AirChillerSetSchedule(0.0); // Schedule value for air chiller SET static Real64 QZNReqSens(0.0); // Amount of sensible heat needed by the zone, NEGATIVE when cooling needed [W] static Real64 RemainQZNReqSens(0.0); // Remaiing amount of sensible heat needed by the zone [W] @@ -14214,8 +14210,8 @@ namespace RefrigeratedCase { QZNReqSens = AirChillerSet(AirChillerSetID).QZnReqSens; RemainQZNReqSens = QZNReqSens; - for (CoilIndex = 1; CoilIndex <= AirChillerSet(AirChillerSetID).NumCoils; ++CoilIndex) { - CoilID = AirChillerSet(AirChillerSetID).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= AirChillerSet(AirChillerSetID).NumCoils; ++CoilIndex) { + int CoilID = AirChillerSet(AirChillerSetID).CoilNum(CoilIndex); CalculateCoil(CoilID, RemainQZNReqSens); RemainQZNReqSens += WarehouseCoil(CoilID).SensCreditRate; @@ -14248,9 +14244,7 @@ namespace RefrigeratedCase { // Note that the coil fan, heater, and defrost would be unaffected because they // would still be running at level calculated previously - static int NumCoils(0); // Number of coils on this system or secondary loop - static int CoilID(0); // Index to coil - static int CoilIndex(0); // rank of coils within system + int NumCoils(0); static Real64 DeRateFactor(0.0); // Ratio of energy available from system or secondary loop static Real64 InitLatCreditEnergy(0.0); // Latent credit energy before derate [W] static Real64 InitKgFrost(0.0); // Initial amount of frost on coils based on latent load before derate [kg] @@ -14273,8 +14267,8 @@ namespace RefrigeratedCase { DeRateFactor = AvailableTotalLoad / InitialTotalLoad; Real64 const time_step_sec(DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); - for (CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { - CoilID = System(SystemID).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= NumCoils; ++CoilIndex) { + int CoilID = System(SystemID).CoilNum(CoilIndex); auto &warehouse_coil(WarehouseCoil(CoilID)); // need to adjust ice on coil due to reduction in latent load met by coil @@ -14752,7 +14746,6 @@ namespace RefrigeratedCase { // initialize zone gain terms at begin environment static bool MyEnvrnFlag(true); - int loop; CheckRefrigerationInput(); @@ -14788,7 +14781,7 @@ namespace RefrigeratedCase { } if (NumSimulationWalkIns > 0) { - for (loop = 1; loop <= NumSimulationWalkIns; ++loop) { + for (int loop = 1; loop <= NumSimulationWalkIns; ++loop) { WalkIn(loop).SensZoneCreditRate = 0.0; WalkIn(loop).LatZoneCreditRate = 0.0; } @@ -14820,37 +14813,27 @@ namespace RefrigeratedCase { // to zero when called on zone timestep. Otherwise, values may be held over when // no HVAC load calls module during that zone time step. - static int DemandARRID(0); // Index to water tank Demand used for evap condenser - static int TankID(0); // Index to water tank used for evap condenser - static int RackNum(0); // Index to refrigerated rack - static int CondID(0); // Index to condenser - static int PlantInletNode(0); // Used to zero request for cooling water for condenser - static int PlantOutletNode(0); // Used to zero request for cooling water for condenser - static int PlantLoopIndex(0); // Used to zero request for cooling water for condenser - static int PlantLoopSideIndex(0); // Used to zero request for cooling water for condenser - static int PlantBranchIndex(0); // Used to zero request for cooling water for condenser - static int PlantCompIndex(0); // Used to zero request for cooling water for condenser - static Real64 MassFlowRate(0.0); // Used to zero request for cooling water for condenser + int DemandARRID(0); // Index to water tank Demand used for evap condenser if (HaveRefrigRacks) { // HaveRefrigRacks is TRUE when NumRefrigeratedRAcks > 0 // RefrigRack ALLOCATED to NumRefrigeratedRacks - for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { + for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { - PlantInletNode = RefrigRack(RackNum).InletNode; - PlantOutletNode = RefrigRack(RackNum).OutletNode; - PlantLoopIndex = RefrigRack(RackNum).PlantLoopNum; - PlantLoopSideIndex = RefrigRack(RackNum).PlantLoopSideNum; - PlantBranchIndex = RefrigRack(RackNum).PlantBranchNum; - PlantCompIndex = RefrigRack(RackNum).PlantCompNum; - MassFlowRate = 0.0; + Real64 MassFlowRate = 0.0; PlantUtilities::SetComponentFlowRate( - MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + MassFlowRate, + RefrigRack(RackNum).InletNode, + RefrigRack(RackNum).OutletNode, + RefrigRack(RackNum).PlantLoopNum, + RefrigRack(RackNum).PlantLoopSideNum, + RefrigRack(RackNum).PlantBranchNum, + RefrigRack(RackNum).PlantCompNum); } if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; - TankID = RefrigRack(RackNum).EvapWaterSupTankID; + int TankID = RefrigRack(RackNum).EvapWaterSupTankID; DataWater::WaterStorage(TankID).VdotRequestDemand(DemandARRID) = 0.0; } } @@ -14859,22 +14842,22 @@ namespace RefrigeratedCase { if (DataHeatBalance::NumRefrigCondensers > 0) { // Condenser ALLOCATED to DataHeatBalance::NumRefrigCondensers - for (CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { + for (int CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { - PlantInletNode = Condenser(CondID).InletNode; - PlantOutletNode = Condenser(CondID).OutletNode; - PlantLoopIndex = Condenser(CondID).PlantLoopNum; - PlantLoopSideIndex = Condenser(CondID).PlantLoopSideNum; - PlantBranchIndex = Condenser(CondID).PlantBranchNum; - PlantCompIndex = Condenser(CondID).PlantCompNum; - MassFlowRate = 0.0; + Real64 MassFlowRate = 0.0; PlantUtilities::SetComponentFlowRate( - MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + MassFlowRate, + Condenser(CondID).InletNode, + Condenser(CondID).OutletNode, + Condenser(CondID).PlantLoopNum, + Condenser(CondID).PlantLoopSideNum, + Condenser(CondID).PlantBranchNum, + Condenser(CondID).PlantCompNum); } if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (Condenser(CondID).EvapWaterSupplyMode == WaterSupplyFromTank) { DemandARRID = Condenser(CondID).EvapWaterTankDemandARRID; - TankID = Condenser(CondID).EvapWaterSupTankID; + int TankID = Condenser(CondID).EvapWaterSupTankID; DataWater::WaterStorage(TankID).VdotRequestDemand(DemandARRID) = 0.0; } } From 9b2b8d4ad0f65571eda2dfb7d30bc16365face3b Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 09:42:10 -0700 Subject: [PATCH 55/86] step 4 - partial cleanup statics --- src/EnergyPlus/RefrigeratedCase.cc | 36 +++++++++++++----------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index da9b7885965..5f6c12bd169 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -10395,14 +10395,7 @@ namespace RefrigeratedCase { // ZoneEquipmentManager on the system time step, or only system driven by HVACManager on the zone time step. static std::string const RoutineName("SimulateDetailedRefrigerationSystems"); - - static Real64 CurrentLoads(0.0); // current loads on compressor, exclusive of unmet loads from prev time steps - static Real64 CurrentHiStageLoads(0.0); // Current loads on high-stage compressor, exclusive of unmet loads from - // prev time steps (two-stage systems only) - static Real64 MaxTEvap(0.0); // Maximum evaporating temperature that can still meet load - static Real64 MaxDelTFloatFrac(0.5); // max fraction allowed for difference between case and evaporator temperature - // relative to design temperature difference - Real64 SuctionPipeZoneTemp; // Temperature for zone identified as environment for suction pipe heat gains, C + Real64 const MaxDelTFloatFrac(0.5); // max fraction allowed for difference between case and evaporator temperature Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; @@ -10443,7 +10436,7 @@ namespace RefrigeratedCase { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // calculate floating T evap Real64 LoadFrac = min(1.0, (RefrigCase(CaseID).TotalCoolingLoad / RefrigCase(CaseID).DesignRatedCap)); - MaxTEvap = RefrigCase(CaseID).Temperature - + Real64 MaxTEvap = RefrigCase(CaseID).Temperature - (RefrigCase(CaseID).Temperature - RefrigCase(CaseID).EvapTempDesign) * max(LoadFrac, MaxDelTFloatFrac); // Compare Tevap for this case to max allowed for all previous cases on this suction group and set at the MINIMUM of the // two @@ -10467,7 +10460,7 @@ namespace RefrigeratedCase { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // calculate floating T evap Real64 LoadFrac = min(1.0, (WalkIn(WalkInID).TotalCoolingLoad / WalkIn(WalkInID).DesignRatedCap)); - MaxTEvap = WalkIn(WalkInID).Temperature - + Real64 MaxTEvap = WalkIn(WalkInID).Temperature - (WalkIn(WalkInID).Temperature - WalkIn(WalkInID).TEvapDesign) * max(LoadFrac, MaxDelTFloatFrac); // Compare maxTevap for this walk in to max allowed for cases and for all // previous walk ins on this suction group and set at the MINIMUM of the two @@ -10528,7 +10521,7 @@ namespace RefrigeratedCase { // in the total secondary system loads. System(SysNum).PipeHeatLoad = 0.0; if (System(SysNum).SumUASuctionPiping > MySmallNumber) { - SuctionPipeZoneTemp = DataLoopNode::Node(System(SysNum).SuctionPipeZoneNodeNum).Temp; + Real64 SuctionPipeZoneTemp = DataLoopNode::Node(System(SysNum).SuctionPipeZoneNodeNum).Temp; // Temperature for zone identified as environment for suction pipe heat gains, C System(SysNum).PipeHeatLoad = System(SysNum).SumUASuctionPiping * (SuctionPipeZoneTemp - System(SysNum).TEvapNeeded); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) @@ -10669,8 +10662,8 @@ namespace RefrigeratedCase { bool DeRate = false; // If true, need to derate aircoils because load can't be met by system // With air chiller coils, don't use unmet energy, instead reduce capacity on coils to match avail compressor/cond capacity - CurrentLoads = - System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet + // current loads on compressor, exclusive of unmet loads from prev time steps + Real64 CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet if ((System(SysNum).CoilFlag) && (CurrentLoads > (System(SysNum).TotCompCapacity * 1.001))) { DeRate = true; FinalRateCoils(DeRate, DetailedSystem, SysNum, CurrentLoads, System(SysNum).TotCompCapacity); @@ -10713,7 +10706,8 @@ namespace RefrigeratedCase { for (int SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && (!DataGlobals::WarmupFlag)) { - CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet + Real64 CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet + Real64 CurrentHiStageLoads(0.0); // Current loads on high-stage compressor, exclusive of unmet loads from if (System(SysNum).NumStages == 2) { CurrentHiStageLoads = CurrentLoads + System(SysNum).TotCompPower; } // NumStages==2 @@ -14197,9 +14191,9 @@ namespace RefrigeratedCase { // Called from Zone Equipment Manager. // have however done the variable definitions for in and out. - static Real64 AirChillerSetSchedule(0.0); // Schedule value for air chiller SET - static Real64 QZNReqSens(0.0); // Amount of sensible heat needed by the zone, NEGATIVE when cooling needed [W] - static Real64 RemainQZNReqSens(0.0); // Remaiing amount of sensible heat needed by the zone [W] + Real64 AirChillerSetSchedule(0.0); // Schedule value for air chiller SET + Real64 QZNReqSens(0.0); // Amount of sensible heat needed by the zone, NEGATIVE when cooling needed [W] + Real64 RemainQZNReqSens(0.0); // Remaining amount of sensible heat needed by the zone [W] // Note, all coils in a coil set are in the same zone // the coils may be served by different detailed systems @@ -14245,10 +14239,10 @@ namespace RefrigeratedCase { // would still be running at level calculated previously int NumCoils(0); - static Real64 DeRateFactor(0.0); // Ratio of energy available from system or secondary loop - static Real64 InitLatCreditEnergy(0.0); // Latent credit energy before derate [W] - static Real64 InitKgFrost(0.0); // Initial amount of frost on coils based on latent load before derate [kg] - static Real64 FrostReduction(0.0); // Change in frost on coils based on derated latent load [kg] + Real64 DeRateFactor(0.0); // Ratio of energy available from system or secondary loop + Real64 InitLatCreditEnergy(0.0); // Latent credit energy before derate [W] + Real64 InitKgFrost(0.0); // Initial amount of frost on coils based on latent load before derate [kg] + Real64 FrostReduction(0.0); // Change in frost on coils based on derated latent load [kg] { auto const SELECT_CASE_var(SystemSourceType); From 0848a99d33ed66d0a5227d7296d62c206a98f1cb Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 12:48:39 -0700 Subject: [PATCH 56/86] adding clear_state, cleaning up some mod vars, cleaning up unused externs in header --- src/EnergyPlus/RefrigeratedCase.cc | 124 +++++++--- src/EnergyPlus/RefrigeratedCase.hh | 220 +----------------- .../unit/Fixtures/EnergyPlusFixture.cc | 2 + 3 files changed, 101 insertions(+), 245 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 5f6c12bd169..33c451be50d 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -364,8 +364,7 @@ namespace RefrigeratedCase { Real64 CompressorCOPactual(0.0); // Compressor coefficient of performance at specific operating conditions (W/W) Real64 RackSenCreditToZone(0.0); // Amount of condenser heat applied to zone load (W) Real64 RackSenCreditToHVAC(0.0); // Amount of condenser heat applied to HVAC RA duct (W) - int InletNode(0); // Water-cooled condenser inlet node number - int OutletNode(0); // Water-cooled condenser outlet node number + Array1D_bool ShowCOPWarning; // Used for one-time warning message for possible rack // input error regarding COP // Refrigeration condenser variables (used for both racks and detailed systems) @@ -436,6 +435,95 @@ namespace RefrigeratedCase { Array1D AirChillerSet; Array1D CoilSysCredit; Array1D CaseWIZoneReport; + + void clear_state() + { + NumSimulationCondAir = 0; + NumSimulationCondEvap = 0; + NumSimulationCondWater = 0; + NumSimulationCascadeCondensers = 0; + NumSimulationGasCooler = 0; + NumSimulationSharedGasCoolers = 0; + NumTransRefrigSystems = 0; + NumSimulationSharedCondensers = 0; + NumSimulationCases = 0; + NumSimulationCaseAndWalkInLists = 0; + NumSimulationWalkIns = 0; + NumSimulationCompressors = 0; + NumSimulationSubcoolers = 0; + NumSimulationMechSubcoolers = 0; + NumSimulationRefrigAirChillers = 0; + NumSimulationSecondarySystems = 0; + NumSimulationTransferLoadLists = 0; + NumUnusedRefrigCases = 0; + NumUnusedCoils = 0; + NumUnusedCondensers = 0; + NumUnusedGasCoolers = 0; + NumUnusedCompressors = 0; + NumUnusedSecondarys = 0; + MyReferPlantScanFlag = true; + + CaseRAFactor = 0.0; + + ShowStockingWarning.deallocate(); + ShowFrostWarning.deallocate(); + ShowStoreEnergyWarning.deallocate(); + ShowUnmetWIEnergyWarning.deallocate(); + ShowWIFrostWarning.deallocate(); + + TotalRackDeliveredCapacity = 0.0; + TotalCompressorPower = 0.0; + CompressorCOPactual = 0.0; + RackSenCreditToZone = 0.0; + RackSenCreditToHVAC = 0.0; + + ShowCOPWarning.deallocate(); + + TotalCondenserFanPower = 0.0; + TotalCondenserPumpPower = 0.0; + TotalCondenserHeat = 0.0; + TotalBasinHeatPower = 0.0; + TotalEvapWaterUseRate = 0.0; + + ShowUnmetEnergyWarning.deallocate(); + ShowHiStageUnmetEnergyWarning.deallocate(); + ShowUnmetEnergyWarningTrans.deallocate(); + ShowUnmetSecondEnergyWarning.deallocate(); + ShowCoilFrostWarning.deallocate(); + CheckEquipNameRackWaterCondenser.deallocate(); + CheckEquipNameWaterCondenser.deallocate(); + RefrigPresentInZone.deallocate(); + CheckChillerSetName.deallocate(); + + GetRefrigerationInputFlag = true; + HaveRefrigRacks = true; + HaveDetailedRefrig = true; + HaveDetailedTransRefrig = true; + ManageRefrigeration = true; + UseSysTimeStep = false; + HaveCasesOrWalkins = true; + HaveChillers = true; + + RefrigCase.deallocate(); + RefrigRack.deallocate(); + CaseRAFraction.deallocate(); + System.deallocate(); + TransSystem.deallocate(); + Condenser.deallocate(); + UniqueCondenserNames.clear(); + Compressor.deallocate(); + GasCooler.deallocate(); + Subcooler.deallocate(); + CaseAndWalkInList.deallocate(); + CompressorLists.deallocate(); + Secondary.deallocate(); + TransferLoadList.deallocate(); + WalkIn.deallocate(); + WarehouseCoil.deallocate(); + AirChillerSet.deallocate(); + CoilSysCredit.deallocate(); + CaseWIZoneReport.deallocate(); + } void ManageRefrigeratedCaseRacks() { @@ -2737,9 +2825,6 @@ namespace RefrigeratedCase { // Get max/min allowed water temps RefrigRack(RackNum).OutletTempMax = Numbers(5); RefrigRack(RackNum).InletTempMin = Numbers(6); - // set hardware limits on Node data structure for plant interactions - // Node(RefrigRack(RackNum)%InletNode)%MassFlowRateMax = RefrigRack(RackNum)%MassFlowRateMax !CR7425 - // Node(RefrigRack(RackNum)%InletNode)%MassFlowRateMin = 0.0D0 !CR7435 // set flow request for plant sizing. PlantUtilities::RegisterPlantCompDesignFlow(RefrigRack(RackNum).InletNode, RefrigRack(RackNum).VolFlowRateMax); } // Water cooled condenser data @@ -9433,10 +9518,8 @@ namespace RefrigeratedCase { // Obtain water-cooled condenser inlet/outlet temps if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { - InletNode = RefrigRack(RackNum).InletNode; - OutletNode = RefrigRack(RackNum).OutletNode; - RefrigRack(RackNum).InletTemp = DataLoopNode::Node(InletNode).Temp; - EffectTemp = DataLoopNode::Node(InletNode).Temp + 5.0; // includes approach temp + RefrigRack(RackNum).InletTemp = DataLoopNode::Node(RefrigRack(RackNum).InletNode).Temp; + EffectTemp = DataLoopNode::Node(RefrigRack(RackNum).InletNode).Temp + 5.0; // includes approach temp if (RefrigRack(RackNum).InletTemp < RefrigRack(RackNum).InletTempMin) { // RefrigRack(RackNum)%LowTempWarn = RefrigRack(RackNum)%LowTempWarn +1 if (RefrigRack(RackNum).LowTempWarnIndex == 0) { @@ -9653,23 +9736,8 @@ namespace RefrigeratedCase { // DefElectricOnDemand = 6 (not available) // DefElectricTerm = 7 - // Initialize this case for this time step ( - // All report variables prev set to zero for case when schedule for case is 'off') - TotalCap_Actual = 0.0; - LatentCap_Actual = 0.0; - SensibleCap_Actual = 0.0; - SensibleLoadPrime = 0.0; - - LatentRatio = 0.0; - - LatentCaseCredit = 0.0; - CaseRAFactor = 0.0; - TotalLightingLoad = 0.0; - TotalAntiSweat = 0.0; - TotalFan = 0.0; - // Set local subroutine variables for convenience int ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; int ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; @@ -10348,6 +10416,9 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Updates the node variables with local variables. + int InletNode(0); + int OutletNode(0); + { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { @@ -11307,9 +11378,8 @@ namespace RefrigeratedCase { // Note, if condensing temperature falls below minimum, get warning and reset but no change in water-side calculations. if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { // Obtain water-cooled condenser inlet/outlet temps - InletNode = condenser.InletNode; - condenser.InletTemp = DataLoopNode::Node(InletNode).Temp; - TCondCalc = DataLoopNode::Node(InletNode).Temp + condenser.RatedApproachT; + condenser.InletTemp = DataLoopNode::Node(condenser.InletNode).Temp; + TCondCalc = DataLoopNode::Node(condenser.InletNode).Temp + condenser.RatedApproachT; if ((condenser.InletTemp < condenser.InletTempMin) || (TCondCalc < System(SysNum).TCondenseMin)) { System(SysNum).TCondense = System(SysNum).TCondenseMin; // condenser.LowTempWarn += 1; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 2b508c60550..385e6ca1989 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -60,225 +60,9 @@ namespace EnergyPlus { namespace RefrigeratedCase { - // Anti-sweat heater control type - extern int const ASNone; - extern int const ASConstant; - extern int const ASLinear; - extern int const ASDewPoint; - extern int const ASHeatBalance; - // Refrigerated display case defrost type - extern int const DefNone; - extern int const DefOffCycle; - extern int const DefHotFluid; - extern int const DefHotFluidOnDemand; - extern int const DefHotFluidTerm; - extern int const DefElectric; - extern int const DefElectricOnDemand; - extern int const DefElectricTerm; - - // Refrigerated display case rack heat rejection location - extern int const LocationOutdoors; - extern int const LocationZone; - // Air- and evap-cooled condenser fan speed control types - extern int const FanVariableSpeed; - extern int const FanConstantSpeedLinear; - extern int const FanTwoSpeed; - extern int const FanConstantSpeed; - // Water-cooled condenser loop flow type - extern int const VariableFlow; - extern int const ConstantFlow; - // Condenser evap cooling water supply extern int const WaterSupplyFromMains; - extern int const WaterSupplyFromTank; - // Cascade condenser temperature control types - extern int const CascadeTempSet; - extern int const CascadeTempFloat; - // Refrigerated display case energy equation form - extern int const None; - extern int const CaseTemperatureMethod; - extern int const RHCubic; - extern int const DPCubic; - // Secondary loop parameters - extern int const SecFluidTypeAlwaysLiquid; - extern int const SecFluidTypePhaseChange; - extern int const SecPumpControlConstant; - extern int const SecPumpControlVariable; - // Walk In Cooler Defrost type - extern int const WalkInDefrostFluid; - extern int const WalkInDefrostElec; - extern int const WalkInDefrostNone; - extern int const WalkInDefrostOffCycle; - // Walk In Cooler Defrost Control type - extern int const DefrostControlSched; - extern int const DefrostContTempTerm; - // Walk In Cooler Stock Door Protection types - extern int const WIStockDoorNone; - extern int const WIStockDoorAirCurtain; - extern int const WIStockDoorStripCurtain; - // Subcooler type - extern int const LiquidSuction; - extern int const Mechanical; - // Compressor suction pressure control - extern int const FloatSuctionTemperature; - extern int const ConstantSuctionTemperature; - // Compressor rating types - extern int const RatedSuperheat; - extern int const RatedReturnGasTemperature; - extern int const RatedSubcooling; - extern int const RatedLiquidTemperature; - // Warehouse coil Defrost type - extern int const DefrostFluid; - extern int const DefrostElec; - extern int const DefrostNone; - extern int const DefrostOffCycle; - extern int const RatedCapacityTotal; - extern int const EuropeanSC1Std; - extern int const EuropeanSC1Nom; - extern int const EuropeanSC2Std; - extern int const EuropeanSC2Nom; - extern int const EuropeanSC3Std; - extern int const EuropeanSC3Nom; - extern int const EuropeanSC4Std; - extern int const EuropeanSC4Nom; - extern int const EuropeanSC5Std; - extern int const EuropeanSC5Nom; - extern int const UnitLoadFactorSens; - extern int const SHR60; - extern int const QuadraticSHR; - extern int const European; - extern int const TabularRH_DT1_TRoom; - extern int const Ceiling; - extern int const Middle; - extern int const Floor; - extern int const DetailedSystem; - extern int const SecondarySystem; - - // Following constant approp for R22, future may make f(refrigerant) - extern Real64 const CaseSuperheat; // case superheat used to control thermal expansion valve, ASHRAE 2006 p 44.6 (C) - extern Real64 const TransCaseSuperheat; // case superheat for transcritical CO2 systems (C) - // Next two constants used to autosize evap condenser - extern Real64 const CondPumpRatePower; // evap condenser pump rated, Wpump/Wcapacity (15 W/ton) - extern Real64 const AirVolRateEvapCond; // evap cond air flow rate for autosize, equiv 850 cfm/ton (m3/W-s) - extern Real64 const EvapCutOutTdb; // shut off evap water flow if outdoor drybulb < evapcutOutTdb (C) - // Miscellaneous constants - extern Real64 const MyLargeNumber; - extern Real64 const MySmallNumber; - extern Real64 const Rair; // Air resistance used with Heat Balance anti-sweat (AS) heater - extern Real64 const IceMeltEnthalpy; // heat of fusion of water J/kg - extern Real64 const TempTooHotToFrost; // C, used to check for frosting conditions on evaporator coils - extern Real64 const IcetoVaporEnthalpy; // J/kg to freeze water vapor to ice - - extern Real64 const SpecificHeatIce; // in the likely range (2040 at 0C and 1950 at -20C) (J/kg-C) - extern Real64 const CondAirVolExponentDry; // exponent for forced air over a cylinder, = 1/.633 - // per ASHRAE 2005 (page 3.15) - extern Real64 const CondAirVolExponentEvap; // exponent for evap condenser air vol flow, = 1/.76 - // per Manske, 1999 - extern Real64 const EvaporatorAirVolExponent; // exponent for evapaporator air vol flow, = 1/.65 - // per Manske, 1999, page 35 - - extern Real64 const FanHalfSpeedRatio; // = 1/(2**2.5) for power step for two speed fan - extern Real64 const CapFac60Percent; // = 60%, load served by half power 2-speed fan - - extern Array1D const EuropeanWetCoilFactor; - extern Array1D const EuropeanAirInletTemp; - extern Array1D const EuropeanEvapTemp; - extern Array1D const EuropeanDT1; - - extern int NumSimulationCondAir; // Number of air-cooled condensers in simulation - extern int NumSimulationCondEvap; // Number of evaporative condensers in simulation - extern int NumSimulationCondWater; // Number of water-cooled condensers in simulation - extern int NumSimulationCascadeCondensers; // Total number of Cascade condensers in IDF - extern int NumSimulationGasCooler; // Number of gas coolers in simulation - extern int NumSimulationSharedGasCoolers; // Total number of gas coolers that serve more than one system - extern int NumTransRefrigSystems; // Total number of transcritical CO2 refrigeration systems - extern int NumSimulationSharedCondensers; // Total number of condensers that serve more than one system - extern int NumSimulationCases; // Number of refrigerated cases in simulation - extern int NumSimulationCaseAndWalkInLists; // Total number of CaseAndWalkIn Lists in IDF - extern int NumSimulationWalkIns; // Number of walk in coolers in simulation - extern int NumSimulationCompressors; // Number of refrigeration compressors in simulation - extern int NumSimulationSubcoolers; // Number of refrigeration subcoolers in simulation - extern int NumSimulationMechSubcoolers; // Number of mechanical subcoolers in simulation - extern int NumSimulationRefrigAirChillers; // Number of individual Air Chillers/coils in simulation - extern int NumSimulationSecondarySystems; // Number of Secondary loops in simulation - extern int NumSimulationTransferLoadLists; // Number of Secondary Lists in simulation - extern int NumUnusedRefrigCases; // Number of refrigerated cases not connected to a rack or system - extern int NumUnusedCoils; // Number of refrigeration air coils not connected to a rack or system - extern int NumUnusedCondensers; // Number of refrigeration condensors not connected to a system - extern int NumUnusedGasCoolers; // Number of refrigeration gas coolers not connected to a system - extern int NumUnusedCompressors; // Number of refrigeration compressors not connected to a system - extern int NumUnusedSecondarys; // Number of refrigeration secondarys not connected to a system - extern bool MyReferPlantScanFlag; - - // Refrigerated case variables - extern Real64 CaseRAFactor; // Factor determining case credit allocation (e.g. % to zone or HVAC) - extern Array1D_bool ShowStockingWarning; // Used for one-time warning message for possible case - // input error regarding stocking - extern Array1D_bool ShowFrostWarning; // Used for one-time warning message for possible case - // input error regarding frost - extern Array1D_bool ShowStoreEnergyWarning; // Used for one-time warning message for possible case - // input error regarding defrost or stocking - // Walk In variables - extern Array1D_bool ShowUnmetWIEnergyWarning; // Used for one-time warning message - extern Array1D_bool ShowWIFrostWarning; // Used for one-time warning message - - // Refrigeration compressor rack variables - extern Real64 TotalRackDeliveredCapacity; // Total capacity of all refrigerated cases attached to rack (W) - extern Real64 TotalCompressorPower; // Total compressor electric power (W) - extern Real64 CompressorCOPactual; // Compressor coefficient of performance at specific operating conditions (W/W) - extern Real64 RackSenCreditToZone; // Amount of condenser heat applied to zone load (W) - extern Real64 RackSenCreditToHVAC; // Amount of condenser heat applied to HVAC RA duct (W) - extern int InletNode; // Water-cooled condenser inlet node number - extern int OutletNode; // Water-cooled condenser outlet node number - extern Array1D_bool ShowCOPWarning; // Used for one-time warning message for possible rack - // input error regarding COP - // Refrigeration condenser variables (used for both racks and detailed systems) - extern Real64 TotalCondenserFanPower; // Total condenser fan electric power (W) - extern Real64 TotalCondenserPumpPower; // Total condenser pump electric power (W) - extern Real64 TotalCondenserHeat; // Total condenser heat from compressor rack (W) - extern Real64 TotalBasinHeatPower; // Total condenser basin water heater power (W) - extern Real64 TotalEvapWaterUseRate; // Total condenser water use rate (m3/s) - - // Refrigeration system variables - extern Array1D_bool ShowUnmetEnergyWarning; // Used for one-time warning message for possible - // compressor input error regarding total system compressor capacity - extern Array1D_bool ShowHiStageUnmetEnergyWarning; // Used for one-time warning message for possible - // high-stage compressor input error regarding high-stage compressor capacity - - // Transcritical refrigeration system variables - extern bool TransCritSysFlag; // Used to indicate whether or not a transcritical refrigeration system has been defined. - extern Array1D_bool ShowUnmetEnergyWarningTrans; // Used for one-time warning message for possible - // compressor input error regarding total system compressor capacity - - // Refrigeration Secondary Loop variables - extern Array1D_bool ShowUnmetSecondEnergyWarning; // Used for one-time warning message for possible - // compressor input error regarding secondary loop heat exchanger capacity - // Refrigerated warehouse coil variables - extern Array1D_bool ShowCoilFrostWarning; // Used for one-time warning message if defrost cycles insufficient to melt ice - - // Refrigeration Plant connections checks - extern Array1D_bool CheckEquipNameRackWaterCondenser; - extern Array1D_bool CheckEquipNameWaterCondenser; - - // Control variables - extern Array1D_bool RefrigPresentInZone; // Used when translating rate to energy for reporting - // total refrigeration impact on a zone - extern Array1D_bool CheckChillerSetName; // used when sim chiller set called form zone equip manager - - extern bool GetRefrigerationInputFlag; // Flag to show case input should be read - extern bool HaveRefrigRacks; // Is initialized as TRUE and remains true when - // refrigerated racks exist in the input deck - extern bool HaveDetailedRefrig; // Is initialized as TRUE and remains true when - // detailed refrigeration systems exist in the input deck - extern bool HaveDetailedTransRefrig; // Is initialized as TRUE and remains true when - // detailed transcritical CO2 refrigeration systems exist in the input deck - extern bool ManageRefrigeration; // Is initialized as TRUE and remains true when - // refrigerated racks or detailed systems exist in the input deck - extern bool UseSysTimeStep; // Flag is true IF working on a system that includes a coil cooling a controlled zone on the system time step, - // All other refrigeration calculations for case and walkin systems done on the load time step - extern bool HaveCasesOrWalkins; // Is initialized as TRUE and remains true when - // refrigerated cases or walkins exist in the input deck - extern bool HaveChillers; // Is initialized as TRUE and remains true when - // chillers exist in the input deck + + void clear_state(); struct RefrigCaseData { diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index dd93d95c71c..3ab782db22f 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -192,6 +192,7 @@ #include #include #include +#include #include #include #include @@ -444,6 +445,7 @@ void EnergyPlusFixture::clear_all_states() Pumps::clear_state(); PurchasedAirManager::clear_state(); PVWatts::clear_state(); + RefrigeratedCase::clear_state(); ResultsFramework::clear_state(); ReturnAirPathManager::clear_state(); RoomAirModelAirflowNetwork::clear_state(); From c1243b798d910f02db569ead9de6a7ccedb40ae3 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 14:02:56 -0700 Subject: [PATCH 57/86] step 9 - cleanup local vars. This should be most of them, but there's probably a few missed --- src/EnergyPlus/RefrigeratedCase.cc | 303 ++++++++++++----------------- 1 file changed, 121 insertions(+), 182 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 33c451be50d..bfe9a270cf0 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -550,7 +550,6 @@ namespace RefrigeratedCase { // Inter-system heat transfer via subcoolers and cascade condensers can be accommodated. // Secondary refrigeration cycles are also available. - int RackNum; // Index to the refrigerated compressor rack being modeled static bool MyOneTimeFlag(true); // flag to skip first pass on next begin environment flag if (!ManageRefrigeration) return; @@ -579,7 +578,7 @@ namespace RefrigeratedCase { if (!DataGlobals::BeginEnvrnFlag) MyOneTimeFlag = true; if (HaveRefrigRacks) { - for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { + for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { CalcRackSystem(RackNum); ReportRackSystem(RackNum); } @@ -687,8 +686,8 @@ namespace RefrigeratedCase { int NumNumbers(0); // Number of Numbers for each GetObjectItem call int NumDisplayCases(0); // Counter for refrigerated cases in GetInput do loop int NumWalkIns(0); // Number of walk ins + int RefrigSysNum(0); int RefrigIndex(0); // Index used in fluid property routines - int RefrigSysNum(0); // Index of refrigeration system Real64 DeltaHPhaseChange(0.0); // Secondary loop enthalpy change in condenser w overfeed system (J/g) Real64 DelTempMin(0.0); // min temperature for heat rej curve for air cooled condenser (C) Real64 DelTempMax(0.0); // max temperature for heat rej curve for air cooled condenser (C) @@ -5562,7 +5561,7 @@ namespace RefrigeratedCase { } else { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", has an incorrect System Type specified as \"" + Alphas(2) + "\"."); - ShowContinueError(" System type must be specified as \"SingleStage\" or \"TwoStage\"."); + ShowContinueError(R"( System type must be specified as "SingleStage" or "TwoStage".)"); ErrorsFound = true; } @@ -5576,13 +5575,13 @@ namespace RefrigeratedCase { } else if (lAlphaBlanks(3) && TransSystem(TransRefrigSysNum).TransSysType == 1) { // No medium temperature loads specified for a SingleStage system - display error ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + - "\", is a \"SingleStage\" system but no medium temperature loads are specified."); + R"(", is a "SingleStage" system but no medium temperature loads are specified.)"); ShowContinueError(" The system must have at least one " + cAlphaFieldNames(3) + " object attached."); ErrorsFound = true; } else if (lAlphaBlanks(4) && TransSystem(TransRefrigSysNum).TransSysType == 2) { // No low temperature loads specified for a TwoStage system - display error ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + - "\", is a \"TwoStage\" system but no low temperature loads are specified."); + R"(", is a "TwoStage" system but no low temperature loads are specified.)"); ShowContinueError(" The system must have at least one " + cAlphaFieldNames(4) + " object attached."); ErrorsFound = true; } @@ -9378,11 +9377,6 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - int CaseID; // Index to absolute case ID - int CaseNum; // Index to refrigerated case attached to rack - int WalkInID; // Index to absolute walk-in ID - int WalkInIndex; // Index to walk-in attached to rack - int NumCases; // Total number of refrigerated cases attached to rack Real64 COPFTempOutput; // Curve value for COPFTemp curve object Real64 CondenserFrac; // Fraction of condenser power as a function of outdoor temperature Real64 TotalHeatRejectedToZone; // Total compressor and condenser fan heat rejected to zone (based on CaseRAFactor) @@ -9396,7 +9390,6 @@ namespace RefrigeratedCase { Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] bool EvapAvail; // Control for evap condenser availability - NumCases = RefrigRack(RackNum).NumCases; TotalRackDeliveredCapacity = 0.0; CompressorCOPactual = 0.0; TotalCompressorPower = 0.0; @@ -9439,9 +9432,9 @@ namespace RefrigeratedCase { } // NumCoils systems } // System(SysNum)%NumCoils > 0 - if (NumCases > 0) { - for (CaseNum = 1; CaseNum <= NumCases; ++CaseNum) { - CaseID = RefrigRack(RackNum).CaseNum(CaseNum); + if (RefrigRack(RackNum).NumCases > 0) { + for (int CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { + int CaseID = RefrigRack(RackNum).CaseNum(CaseNum); CalculateCase(CaseID); // add evaporator load for all cases connected to rack @@ -9468,8 +9461,8 @@ namespace RefrigeratedCase { } // Numcases on rack > 0 if (RefrigRack(RackNum).NumWalkIns > 0) { - for (WalkInIndex = 1; WalkInIndex <= RefrigRack(RackNum).NumWalkIns; ++WalkInIndex) { - WalkInID = RefrigRack(RackNum).WalkInNum(WalkInIndex); + for (int WalkInIndex = 1; WalkInIndex <= RefrigRack(RackNum).NumWalkIns; ++WalkInIndex) { + int WalkInID = RefrigRack(RackNum).WalkInNum(WalkInIndex); CalculateWalkIn(WalkInID); TotalRackDeliveredCapacity += WalkIn(WalkInID).TotalCoolingLoad; if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { @@ -10161,15 +10154,13 @@ namespace RefrigeratedCase { // Flow is requested and the actual available flow is set. The outlet temperature is calculated. static std::string const RoutineName("SimRefrigCondenser"); - int PlantInletNode(0); // Autodesk:Init + int PlantInletNode(0); int PlantOutletNode(0); - int PlantLoopIndex(0); // Autodesk:Init + int PlantLoopIndex(0); int PlantLoopSideIndex(0); int PlantBranchIndex(0); int PlantCompIndex(0); - int Num(0); // local index //Autodesk:Init - Real64 rho; // local fluid density - Real64 Cp; // local fluid specific heat + int Num(0); if (CompIndex == 0) { { @@ -10300,8 +10291,8 @@ namespace RefrigeratedCase { // Make demand request on first HVAC iteration // get cooling fluid properties - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); // first determine desired flow Real64 OutletTemp(0.0); @@ -11279,26 +11270,20 @@ namespace RefrigeratedCase { Real64 HRCFFullFlow; // Heat Rejection Capacity Factor at full air flow Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] - Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone Real64 OutWbTemp(0.0); // Outdoor wet bulb temp at condenser air inlet node [C] Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenseer (m3/s) Real64 RatedFanPower; // local variable equal to input condenser value Real64 RatedAirFlowRate; // local variable equal to input condenser value - Real64 QuadBterm; // calculation step in solving quadratic equation for hrcf - Real64 Sqrtterm; // calculation step in solving quadratic equation for hrcf Real64 SinkTemp; // Heat sink temperature used to derate fan power at reduced loads [C] - Real64 TAirOut; // Temperature of air leaving condenser [C] Real64 TCondCalc; // Calculated Condensing temperature Real64 TotalCondDefrostCredit; // total cond credit from hot gas/brine defr for cases etc. served // directly by all systems served by this condenser [W] Real64 TotalCondDefCredfromSysID; // cond credit for single system [W] - Real64 TotalLoadFromSysID; // total heat rejection load from a single detailed system [W] Real64 TotalLoadFromThisSystem(0.0); // total heat rejection load from the detailed system id'd in subroutine call [W] Real64 TotalLoadFromSystems; // total heat rejection load from all systems served by this condenser [W] - Real64 CurMaxCapacity; // current maximum condenser capacity at delta T present for minimum condensing temperature [W] - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // Initialize this condenser for this time step @@ -11331,7 +11316,8 @@ namespace RefrigeratedCase { SystemID = condenser.SysNum(Sysloop); TotalCondDefCredfromSysID = System(SystemID).TotalCondDefrostCredit + System(SystemID).SumCascadeCondCredit; TotalCondDefrostCredit += TotalCondDefCredfromSysID; - TotalLoadFromSysID = System(SystemID).TotalSystemLoad + System(SystemID).TotCompPower + System(SystemID).TotHiStageCompPower + + // total heat rejection load from a single detailed system [W] + Real64 TotalLoadFromSysID = System(SystemID).TotalSystemLoad + System(SystemID).TotCompPower + System(SystemID).TotHiStageCompPower + System(SystemID).PipeHeatLoad; TotalLoadFromSystems += TotalLoadFromSysID; if (SystemID == SysNum) TotalLoadFromThisSystem = TotalLoadFromSysID; @@ -11473,15 +11459,16 @@ namespace RefrigeratedCase { TCondCalc = System(SysNum).TCondenseMin; // recalculate CapFac at current delta T if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { - CurMaxCapacity = CurveManager::CurveValue(condenser.CapCurvePtr, (System(SysNum).TCondenseMin - OutDbTemp)); + // current maximum condenser capacity at delta T present for minimum condensing temperature [W] + Real64 CurMaxCapacity = CurveManager::CurveValue(condenser.CapCurvePtr, (System(SysNum).TCondenseMin - OutDbTemp)); CapFac = TotalCondenserHeat / CurMaxCapacity; AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, CondAirVolExponentDry)); // Fans limited by minimum air flow ratio AirVolRatio = min(AirVolRatio, 1.0); } else { // condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap HRCFFullFlow = HRCF; // if evap condenser need to back calculate the operating capacity using HRCF relationship, given known Tcond - QuadBterm = condenser.EvapCoeff1 - (System(SysNum).TCondense - SinkTemp) + condenser.EvapCoeff4 * SinkTemp; - Sqrtterm = pow_2(QuadBterm) - 4.0 * condenser.EvapCoeff2 * condenser.EvapCoeff3; + Real64 QuadBterm = condenser.EvapCoeff1 - (System(SysNum).TCondense - SinkTemp) + condenser.EvapCoeff4 * SinkTemp; + Real64 Sqrtterm = pow_2(QuadBterm) - 4.0 * condenser.EvapCoeff2 * condenser.EvapCoeff3; if (Sqrtterm < 0.0) { // only happens for very high wet bulb temps HRCF = condenser.EvapElevFact * condenser.MaxCapFacEvap; if (!EvapAvail) HRCF /= 3.0; @@ -11537,7 +11524,7 @@ namespace RefrigeratedCase { Effectiveness = min(Effectiveness, 0.9); EnthalpyAirOut = EnthalpyAirIn + Effectiveness * (EnthalpyAtTcond - EnthalpyAirIn); // Air leaving the evaporative condenser is saturated - TAirOut = Psychrometrics::PsyTsatFnHPb(EnthalpyAirOut, BPress); + Real64 TAirOut = Psychrometrics::PsyTsatFnHPb(EnthalpyAirOut, BPress); HumRatOut = Psychrometrics::PsyWFnTdpPb(TAirOut, BPress); TotalEvapWaterUseRate = PurgeRate + RatedAirFlowRate * AirVolRatio * AirDensityDry * (HumRatOut - HumRatIn) / Psychrometrics::RhoH2O(OutWbTemp); // assumes evap water pump runs whenever evap cooling is available to minimize scaling @@ -11651,15 +11638,10 @@ namespace RefrigeratedCase { static std::string const RoutineName("RefrigeratedCase:CalcGasCooler"); int GasCoolerCreditWarnIndex; // Warning counter - int GasCoolerID; // Gas cooler number - int Sysloop; // Counter over number of systems attached to this gas cooler - int SystemID; // System number rejecting heat to this gas cooler Real64 ActualFanPower; // Fan power after adjustments for partially loaded gas cooler [W] Real64 AirVolRatio; // Ratio of air volume needed to remove load relative to design load - Real64 CapFac; // Capacity factor Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio Real64 FanPowerRatio; // Calculated fan power ratio - Real64 LocalTimeStep; // Set equal to either DataHVACGlobals::TimeStepSys or DataGlobals::TimeStepZone Real64 OutDbTemp; // Outdoor dry bulb temperature at gas cooler air inlet node [C] Real64 RatedFanPower; // Rated fan power for this gas cooler [W] Real64 TotalCondDefCredfromSysID; // Gas cooler defrost credit for single system [W] @@ -11670,7 +11652,7 @@ namespace RefrigeratedCase { Real64 TotalLoadFromSystems; // Total heat rejection load from all systems served by this condenser [W] Real64 TotalLoadFromThisSystem(0.0); // Total heat rejection load from the detailed system identified in subroutine call [W] - LocalTimeStep = DataGlobals::TimeStepZone; + Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; //! Initialize this gas cooler for this time step @@ -11678,13 +11660,13 @@ namespace RefrigeratedCase { ActualFanPower = 0.0; TotalCondDefrostCredit = 0.0; TotalLoadFromSystems = 0.0; - GasCoolerID = TransSystem(SysNum).GasCoolerNum(1); + int GasCoolerID = TransSystem(SysNum).GasCoolerNum(1); RatedFanPower = GasCooler(GasCoolerID).RatedFanPower; FanMinAirFlowRatio = GasCooler(GasCoolerID).FanMinAirFlowRatio; GasCoolerCreditWarnIndex = GasCooler(GasCoolerID).GasCoolerCreditWarnIndex; - for (Sysloop = 1; Sysloop <= GasCooler(GasCoolerID).NumSysAttach; ++Sysloop) { - SystemID = GasCooler(GasCoolerID).SysNum(Sysloop); + for (int Sysloop = 1; Sysloop <= GasCooler(GasCoolerID).NumSysAttach; ++Sysloop) { + int SystemID = GasCooler(GasCoolerID).SysNum(Sysloop); TotalCondDefCredfromSysID = TransSystem(SystemID).TotalCondDefrostCredit; TotalCondDefrostCredit += TotalCondDefCredfromSysID; TotalLoadFromSysID = TransSystem(SystemID).TotalSystemLoadLT + TransSystem(SystemID).TotalSystemLoadMT + @@ -11710,7 +11692,7 @@ namespace RefrigeratedCase { } // total gas cooler heat < 0 // The rated capacity of air-cooled gas cooler was adjusted for elevation in get input step - CapFac = TotalGasCoolerHeat / GasCooler(GasCoolerID).RatedCapacity; + Real64 CapFac = TotalGasCoolerHeat / GasCooler(GasCoolerID).RatedCapacity; // See whether gas cooler is at ground level or if other air conditions (ie node) have been specified. // Note that air-cooled gas coolers can draw air from, and reject heat to, a conditioned zone. if (GasCooler(GasCoolerID).InletAirNodeNum != 0) { @@ -11830,9 +11812,6 @@ namespace RefrigeratedCase { Real64 const DelTDischPipes(0.5); // Tsat drop corresponding to P drop in discharge pipes, ASHRAE 2006 p 2.5 (C) static std::string const RoutineName("RefrigeratedCase:CalculateCompressors"); - int CompIndex; // Compressor index within system - int CompID; // Compressor index within all compressors - int CondID; // Condenser index for this refrigeration system Real64 CaseEnthalpyChangeRated; // Enthalpy change in cases at compressor rated cond, J/kg Real64 CapacityCorrection; // Capacity at existing subcool/superheat over cap at rated conditions Real64 CpSatVapCondense; // Specific heat of vapor at cond temp J/kg-C @@ -11853,7 +11832,6 @@ namespace RefrigeratedCase { Real64 TotalEnthalpyChangeActual; // Actual enthalpy change in cases and cold side of LSHX, J/kg Real64 TsatforPsuct; // Tsat for PSuction, C Real64 TsatforPdisch(0.0); // Tsat for Pdischarge, c - int StageIndex; // Compression stage index int NumComps; // Number of low-stage or high-stage compressors in system Real64 HHiStageCompIn; // Enthalpy at inlet of high-stage compressor (J/kg) Real64 HCaseInRated_base(0.0), HCompInRated_base(0.0); // Autodesk:Tuned Intermediate values for performance tuning @@ -11871,7 +11849,7 @@ namespace RefrigeratedCase { auto &TIntercooler(System_SysNum.TIntercooler); auto &HSatLiqCond(System_SysNum.HSatLiqCond); auto &CpSatLiqCond(System_SysNum.CpSatLiqCond); - CondID = System_SysNum.CondenserNum(1); + int CondID = System_SysNum.CondenserNum(1); auto const &Condenser1(Condenser(CondID)); Real64 const AccumLoad = max(0.0, (System_SysNum.UnmetEnergy / LocalTimeStepSec)); // Load due to previously unmet compressor loads Real64 const NeededCapacity_base(System_SysNum.TotalSystemLoad + AccumLoad + System_SysNum.PipeHeatLoad + System_SysNum.LSHXTrans); @@ -11886,8 +11864,8 @@ namespace RefrigeratedCase { System_SysNum.TotHiStageCompPower = 0.0; } - for (CompIndex = 1; CompIndex <= System_SysNum.NumCompressors; ++CompIndex) { - CompID = System_SysNum.CompressorNum(CompIndex); + for (int CompIndex = 1; CompIndex <= System_SysNum.NumCompressors; ++CompIndex) { + int CompID = System_SysNum.CompressorNum(CompIndex); auto &Compressor_CompID(Compressor(CompID)); Compressor_CompID.Power = 0.0; Compressor_CompID.MassFlow = 0.0; @@ -11897,8 +11875,8 @@ namespace RefrigeratedCase { Compressor_CompID.LoadFactor = 0.0; } if (NumStages == 2) { - for (CompIndex = 1; CompIndex <= System_SysNum.NumHiStageCompressors; ++CompIndex) { - CompID = System_SysNum.HiStageCompressorNum(CompIndex); + for (int CompIndex = 1; CompIndex <= System_SysNum.NumHiStageCompressors; ++CompIndex) { + int CompID = System_SysNum.HiStageCompressorNum(CompIndex); auto &Compressor_CompID(Compressor(CompID)); Compressor_CompID.Power = 0.0; Compressor_CompID.MassFlow = 0.0; @@ -11910,7 +11888,7 @@ namespace RefrigeratedCase { } // Determine properties at case inlet and compressor inlet - for (StageIndex = 1; StageIndex <= min(2, NumStages); ++StageIndex) { + for (int StageIndex = 1; StageIndex <= min(2, NumStages); ++StageIndex) { if (StageIndex == 1) { // Do single-stage or low-stage calculations if (NumStages == 1) { // Single-stage system NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet @@ -12000,7 +11978,8 @@ namespace RefrigeratedCase { HCompInRated_base = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); } } - for (CompIndex = 1; CompIndex <= NumComps; ++CompIndex) { + for (int CompIndex = 1; CompIndex <= NumComps; ++CompIndex) { + int CompID; if (StageIndex == 1) { CompID = System_SysNum.CompressorNum(CompIndex); } else { @@ -12193,10 +12172,7 @@ namespace RefrigeratedCase { Real64 const ErrorTol(0.001); // Iterative solution tolerance static std::string const RoutineName("RefrigeratedCase:CalculateTransCompressors"); - int CompIndex; // Compressor index within system - int CompID; // Compressor index within all compressors int Iter; // Iteration counter - Real64 CapacityCorrectionLT; // Capacity at existing subcool/superheat over cap at rated conditions for LT loads Real64 CapacityCorrectionMT; // Capacity at existing subcool/superheat over cap at rated conditions for MT loads Real64 CaseEnthalpyChangeRatedMT; // Enthalpy change in medium temperature cases at compressor rated cond, J/kg Real64 CaseEnthalpyChangeRatedLT; // Enthalpy change in low temperature cases at compressor rated cond, J/kg @@ -12289,8 +12265,8 @@ namespace RefrigeratedCase { TransSystem(SysNum).RefMassFlowCompsLP = 0.0; TransSystem(SysNum).TotCompPowerLP = 0.0; - for (CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsLP; ++CompIndex) { - CompID = TransSystem(SysNum).CompressorNumLP(CompIndex); + for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsLP; ++CompIndex) { + int CompID = TransSystem(SysNum).CompressorNumLP(CompIndex); Compressor(CompID).Power = 0.0; Compressor(CompID).MassFlow = 0.0; Compressor(CompID).Capacity = 0.0; @@ -12299,8 +12275,8 @@ namespace RefrigeratedCase { Compressor(CompID).LoadFactor = 0.0; } - for (CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsLP; ++CompIndex) { - CompID = TransSystem(SysNum).CompressorNumLP(CompIndex); + for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsLP; ++CompIndex) { + int CompID = TransSystem(SysNum).CompressorNumLP(CompIndex); // need to use indiv compressor's rated subcool and superheat to adjust capacity to actual conditions { auto const SELECT_CASE_var(Compressor(CompID).SubcoolRatingType); @@ -12333,7 +12309,8 @@ namespace RefrigeratedCase { // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling MassCorrectionLT = DensityActualLT / DensityRatedLP; - CapacityCorrectionLT = MassCorrectionLT * TotalEnthalpyChangeActualLT / CaseEnthalpyChangeRatedLT; + // Capacity at existing subcool/superheat over cap at rated conditions for LT loads + Real64 CapacityCorrectionLT = MassCorrectionLT * TotalEnthalpyChangeActualLT / CaseEnthalpyChangeRatedLT; Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucLT, TsatforPdisLT); Compressor(CompID).Capacity = CapacityCorrectionLT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucLT, TsatforPdisLT); Compressor(CompID).MassFlow = Compressor(CompID).Capacity / TotalEnthalpyChangeActualLT; @@ -12475,8 +12452,8 @@ namespace RefrigeratedCase { TransSystem(SysNum).RefMassFlowCompsHP = 0.0; TransSystem(SysNum).TotCompPowerHP = 0.0; - for (CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsHP; ++CompIndex) { - CompID = TransSystem(SysNum).CompressorNumHP(CompIndex); + for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsHP; ++CompIndex) { + int CompID = TransSystem(SysNum).CompressorNumHP(CompIndex); Compressor(CompID).Power = 0.0; Compressor(CompID).MassFlow = 0.0; Compressor(CompID).Capacity = 0.0; @@ -12486,8 +12463,8 @@ namespace RefrigeratedCase { } // Dispatch High Pressure compressors to meet load, note they were listed in compressor list in dispatch order - for (CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsHP; ++CompIndex) { - CompID = TransSystem(SysNum).CompressorNumHP(CompIndex); + for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsHP; ++CompIndex) { + int CompID = TransSystem(SysNum).CompressorNumHP(CompIndex); // Need to use indiv compressor's rated subcool and superheat to adjust capacity to actual conditions // Transcritical operation requires rated superheat @@ -12602,22 +12579,7 @@ namespace RefrigeratedCase { // ASHRAE 1006 Section 2: Refrigeration Accessories static std::string const RoutineName("CalculateSubcoolers"); - int SubcoolerIndex; // Counter through number of subcoolers on this system - int SubcoolerID; // ID number for each unique subcooler - int SysProvideID; // ID number of system providing refrigeration effect (ie compressor work) for mech sc - Real64 CpLiquid; // specific heat at liquid Tsat, best avail in Fluid Properties - Real64 CpVapor; // specific heat at vapor Tsat, best avail in Fluid Properties - Real64 ControlTLiqOut; // Controlled temperature of liquid leaving Mechanical subcooler - Real64 DelTempActual; // Actual subcooling, T liquid in - T liquid out - Real64 DelTLiqDes; // Design Temperature Change on liquid side of LSHX - Real64 LSHXeffectiveness; // EFfectiveness of liquid suction heat exchanger (LSHX) - Real64 MechSCLoad; // Mechanical subcooler load - Real64 SubcoolLoad; // energy transferred from warmer liquid to cool vapor - Real64 SubcoolerSupHeat; // additional superheat added to vapor going to compressor from LSHX - Real64 TVapInDes; // Design Vapor Inlet temperature for LSHX - Real64 TLiqInDes; // Design Liquid Inlet temperature for LSHX Real64 TLiqInActual(0.0); // Liquid T in, after condenser, before any mechanical subcooler - Real64 TVapInActual; // Vapor T in, after any superheat added by case control Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; @@ -12653,15 +12615,15 @@ namespace RefrigeratedCase { System(SysNum).HCaseIn = System(SysNum).HSatLiqCond - System(SysNum).CpSatLiqCond * (System(SysNum).TCondense - TLiqInActual); } // NumStages and IntercoolerType - for (SubcoolerIndex = 1; SubcoolerIndex <= System(SysNum).NumSubcoolers; ++SubcoolerIndex) { - SubcoolerID = System(SysNum).SubcoolerNum(SubcoolerIndex); + for (int SubcoolerIndex = 1; SubcoolerIndex <= System(SysNum).NumSubcoolers; ++SubcoolerIndex) { + int SubcoolerID = System(SysNum).SubcoolerNum(SubcoolerIndex); // set up local variables for convenience - DelTLiqDes = Subcooler(SubcoolerID).LiqSuctDesignDelT; - TVapInDes = Subcooler(SubcoolerID).LiqSuctDesignTvapIn; - TLiqInDes = Subcooler(SubcoolerID).LiqSuctDesignTliqIn; - ControlTLiqOut = Subcooler(SubcoolerID).MechControlTliqOut; - CpLiquid = System(SysNum).CpSatLiqCond; - CpVapor = System(SysNum).CpSatVapEvap; + Real64 DelTLiqDes = Subcooler(SubcoolerID).LiqSuctDesignDelT; + Real64 TVapInDes = Subcooler(SubcoolerID).LiqSuctDesignTvapIn; + Real64 TLiqInDes = Subcooler(SubcoolerID).LiqSuctDesignTliqIn; + Real64 ControlTLiqOut = Subcooler(SubcoolerID).MechControlTliqOut; + Real64 CpLiquid = System(SysNum).CpSatLiqCond; + Real64 CpVapor = System(SysNum).CpSatVapEvap; if (System(SysNum).NumStages == 1) { // Single-stage compression system TLiqInActual = System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool; @@ -12682,11 +12644,11 @@ namespace RefrigeratedCase { // from lshx. taken care of because subcooler ID assigned in that order in input. if (SELECT_CASE_var == Mechanical) { - MechSCLoad = System(SysNum).RefMassFlowtoLoads * CpLiquid * (TLiqInActual - ControlTLiqOut); + Real64 MechSCLoad = System(SysNum).RefMassFlowtoLoads * CpLiquid * (TLiqInActual - ControlTLiqOut); System(SysNum).HCaseIn -= CpLiquid * (TLiqInActual - ControlTLiqOut); // refrigeration benefit to System(sysnum) // refrigeration load must be assigned properly according to input - SysProvideID = Subcooler(SubcoolerID).MechSourceSysID; + int SysProvideID = Subcooler(SubcoolerID).MechSourceSysID; System(SysProvideID).MechSCLoad(SubcoolerID) = MechSCLoad; Subcooler(SubcoolerID).MechSCTransLoad = MechSCLoad; Subcooler(SubcoolerID).MechSCTransEnergy = MechSCLoad * LocalTimeStep * DataGlobals::SecInHour; @@ -12695,12 +12657,12 @@ namespace RefrigeratedCase { System(SysNum).TCompIn = System(SysNum).TEvapNeeded + CaseSuperheat; } else if (SELECT_CASE_var == LiquidSuction) { - LSHXeffectiveness = DelTLiqDes / (TLiqInDes - TVapInDes); - TVapInActual = System(SysNum).TEvapNeeded + CaseSuperheat; - DelTempActual = LSHXeffectiveness * (TLiqInActual - TVapInActual); + Real64 LSHXeffectiveness = DelTLiqDes / (TLiqInDes - TVapInDes); + Real64 TVapInActual = System(SysNum).TEvapNeeded + CaseSuperheat; + Real64 DelTempActual = LSHXeffectiveness * (TLiqInActual - TVapInActual); TLiqInActual -= DelTempActual; - SubcoolLoad = System(SysNum).RefMassFlowtoLoads * CpLiquid * DelTempActual; - SubcoolerSupHeat = SubcoolLoad / CpVapor / System(SysNum).RefMassFlowComps; + Real64 SubcoolLoad = System(SysNum).RefMassFlowtoLoads * CpLiquid * DelTempActual; + Real64 SubcoolerSupHeat = SubcoolLoad / CpVapor / System(SysNum).RefMassFlowComps; System(SysNum).TCompIn = TVapInActual + SubcoolerSupHeat; System(SysNum).HCaseIn -= SubcoolLoad / System(SysNum).RefMassFlowtoLoads; System(SysNum).LSHXTrans = SubcoolLoad; @@ -12779,29 +12741,6 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // To report information from the input deck for refrigerated cases and racks to the eio and err file. - int CascadeLoadID; - int CascadeLoadNum; - int CaseID; - int CaseNum; - int ChillerSetNum; - int CoilID; - int CoilNum; - int CompID; - int CompressorNum; - int CondID; - int CountSecPhase; - int CountSecBrine; - int GasCoolerID; - int RackNum; - int SecondaryID; - int SecondaryNum; - int SubcoolerNum; - int SubcoolerID; - int SystemNum; - int TransSystemNum; - int WalkInID; - int WalkInNum; - int ZoneID; std::string ChrOut; std::string ChrOut2; @@ -12874,9 +12813,9 @@ namespace RefrigeratedCase { } //(NumRefrigSystems > 0) if (NumSimulationSecondarySystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_142); // Intro to Secondary systems - CountSecPhase = 0; - CountSecBrine = 0; - for (SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { + int CountSecPhase = 0; + int CountSecBrine = 0; + for (int SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { if ((Secondary(SecondaryID).FluidType == SecFluidTypeAlwaysLiquid) && (CountSecBrine == 0)) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_133); // Secondary system header for brine type systems ++CountSecBrine; @@ -12940,7 +12879,7 @@ namespace RefrigeratedCase { if (DataHeatBalance::NumRefrigeratedRacks > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + General::RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); - for (RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { + for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationOutdoors) { ChrOut = "Outdoors"; } else { @@ -12960,8 +12899,8 @@ namespace RefrigeratedCase { General::RoundSigDigits(RefrigRack(RackNum).NumCases) + ',' + General::RoundSigDigits(RefrigRack(RackNum).NumWalkIns) + ',' + ChrOut + ',' + ChrOut2 + ',' + General::RoundSigDigits(RefrigRack(RackNum).RatedCOP, 3); - for (CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { - CaseID = RefrigRack(RackNum).CaseNum(CaseNum); + for (int CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { + int CaseID = RefrigRack(RackNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + @@ -12974,8 +12913,8 @@ namespace RefrigeratedCase { } } // numcases - for (WalkInNum = 1; WalkInNum <= RefrigRack(RackNum).NumWalkIns; ++WalkInNum) { - WalkInID = RefrigRack(RackNum).WalkInNum(WalkInNum); + for (int WalkInNum = 1; WalkInNum <= RefrigRack(RackNum).NumWalkIns; ++WalkInNum) { + int WalkInID = RefrigRack(RackNum).WalkInNum(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Walk In Cooler, " + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + @@ -12983,7 +12922,7 @@ namespace RefrigeratedCase { General::RoundSigDigits(WalkIn(WalkInID).ElecFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); - for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + @@ -12996,8 +12935,8 @@ namespace RefrigeratedCase { } // zones for walk ins on rack } // walk ins on rack - for (CoilNum = 1; CoilNum <= RefrigRack(RackNum).NumCoils; ++CoilNum) { - CoilID = RefrigRack(RackNum).CoilNum(CoilNum); + for (int CoilNum = 1; CoilNum <= RefrigRack(RackNum).NumCoils; ++CoilNum) { + int CoilID = RefrigRack(RackNum).CoilNum(CoilNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers @@ -13006,7 +12945,7 @@ namespace RefrigeratedCase { if (DataHeatBalance::NumRefrigSystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + General::RoundSigDigits(DataHeatBalance::NumRefrigSystems); - for (SystemNum = 1; SystemNum <= DataHeatBalance::NumRefrigSystems; ++SystemNum) { + for (int SystemNum = 1; SystemNum <= DataHeatBalance::NumRefrigSystems; ++SystemNum) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Detailed Refrigeration System," + System(SystemNum).Name + ',' + System(SystemNum).RefrigerantName + ',' + General::RoundSigDigits(System(SystemNum).NumCases) + ',' + General::RoundSigDigits(System(SystemNum).NumWalkIns) + ',' + @@ -13017,8 +12956,8 @@ namespace RefrigeratedCase { General::RoundSigDigits(System(SystemNum).IntercoolerEffectiveness, 2) + ',' + General::RoundSigDigits(System(SystemNum).NumSubcoolers) + ',' + General::RoundSigDigits(System(SystemNum).TCondenseMin, 1); - for (CaseNum = 1; CaseNum <= System(SystemNum).NumCases; ++CaseNum) { - CaseID = System(SystemNum).CaseNum(CaseNum); + for (int CaseNum = 1; CaseNum <= System(SystemNum).NumCases; ++CaseNum) { + int CaseID = System(SystemNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + @@ -13030,15 +12969,15 @@ namespace RefrigeratedCase { ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCases on system - for (WalkInNum = 1; WalkInNum <= System(SystemNum).NumWalkIns; ++WalkInNum) { - WalkInID = System(SystemNum).WalkInNum(WalkInNum); + for (int WalkInNum = 1; WalkInNum <= System(SystemNum).NumWalkIns; ++WalkInNum) { + int WalkInID = System(SystemNum).WalkInNum(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); - for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + @@ -13051,51 +12990,51 @@ namespace RefrigeratedCase { } // Num zones for each walk in on system } // NumWalkIns on system - for (CoilNum = 1; CoilNum <= System(SystemNum).NumCoils; ++CoilNum) { - CoilID = System(SystemNum).CoilNum(CoilNum); + for (int CoilNum = 1; CoilNum <= System(SystemNum).NumCoils; ++CoilNum) { + int CoilID = System(SystemNum).CoilNum(CoilNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers - for (CascadeLoadNum = 1; CascadeLoadNum <= System(SystemNum).NumCascadeLoads; ++CascadeLoadNum) { - CascadeLoadID = System(SystemNum).CascadeLoadNum(CascadeLoadNum); + for (int CascadeLoadNum = 1; CascadeLoadNum <= System(SystemNum).NumCascadeLoads; ++CascadeLoadNum) { + int CascadeLoadID = System(SystemNum).CascadeLoadNum(CascadeLoadNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Cascade Load," + System(Condenser(CascadeLoadID).CascadeSysID).Name + ',' + General::RoundSigDigits(CascadeLoadID) + ',' + Condenser(CascadeLoadID).Name; } // cascade load on detailed system - for (SecondaryNum = 1; SecondaryNum <= System(SystemNum).NumSecondarys; ++SecondaryNum) { - SecondaryID = System(SystemNum).SecondaryNum(SecondaryNum); + for (int SecondaryNum = 1; SecondaryNum <= System(SystemNum).NumSecondarys; ++SecondaryNum) { + int SecondaryID = System(SystemNum).SecondaryNum(SecondaryNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Secondary Load," + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(SecondaryID); } // secondary load on detailed system - for (SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { + for (int SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { if (Subcooler(SubcoolerNum).MechSourceSysID != SystemNum) continue; ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Mechanical Subcooler Load, " + General::RoundSigDigits(SubcoolerNum) + ',' + Subcooler(SubcoolerNum).Name; } // Num sim subcoolers, looking only for NumSMech Subcoolers served by this system if (System(SystemNum).NumStages == 1) { // Single-stage compression system - for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { - CompID = System(SystemNum).CompressorNum(CompressorNum); + for (int CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { + int CompID = System(SystemNum).CompressorNum(CompressorNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors } else if (System(SystemNum).NumStages == 2) { // Two-stage compression system // Low-stage compressors - for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { - CompID = System(SystemNum).CompressorNum(CompressorNum); + for (int CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { + int CompID = System(SystemNum).CompressorNum(CompressorNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Low-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors // High-stage compressors - for (CompressorNum = 1; CompressorNum <= System(SystemNum).NumHiStageCompressors; ++CompressorNum) { - CompID = System(SystemNum).HiStageCompressorNum(CompressorNum); + for (int CompressorNum = 1; CompressorNum <= System(SystemNum).NumHiStageCompressors; ++CompressorNum) { + int CompID = System(SystemNum).HiStageCompressorNum(CompressorNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration High-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumHiStageCompressors } // NumStages - CondID = System(SystemNum).CondenserNum(1); + int CondID = System(SystemNum).CondenserNum(1); { auto const SELECT_CASE_var(Condenser(CondID).CondenserType); if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { @@ -13129,8 +13068,8 @@ namespace RefrigeratedCase { } } // condenser type - for (SubcoolerNum = 1; SubcoolerNum <= System(SystemNum).NumSubcoolers; ++SubcoolerNum) { - SubcoolerID = System(SystemNum).SubcoolerNum(SubcoolerNum); + for (int SubcoolerNum = 1; SubcoolerNum <= System(SystemNum).NumSubcoolers; ++SubcoolerNum) { + int SubcoolerID = System(SystemNum).SubcoolerNum(SubcoolerNum); { auto const SELECT_CASE_var(Subcooler(SubcoolerID).SubcoolerType); if (SELECT_CASE_var == LiquidSuction) { @@ -13152,7 +13091,7 @@ namespace RefrigeratedCase { if (NumTransRefrigSystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Detailed Transcritical Refrigeration Systems," + General::RoundSigDigits(NumTransRefrigSystems); - for (TransSystemNum = 1; TransSystemNum <= NumTransRefrigSystems; ++TransSystemNum) { + for (int TransSystemNum = 1; TransSystemNum <= NumTransRefrigSystems; ++TransSystemNum) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Detailed Transcritical Refrigeration System," + TransSystem(TransSystemNum).Name + ',' + TransSystem(TransSystemNum).RefrigerantName + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesMT) + ',' + @@ -13162,8 +13101,8 @@ namespace RefrigeratedCase { General::RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsLP) + ',' + General::RoundSigDigits(GasCooler(TransSystem(TransSystemNum).GasCoolerNum(1)).MinCondTemp, 1); - for (CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesMT; ++CaseNum) { - CaseID = TransSystem(TransSystemNum).CaseNumMT(CaseNum); + for (int CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesMT; ++CaseNum) { + int CaseID = TransSystem(TransSystemNum).CaseNumMT(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Medium Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + @@ -13175,8 +13114,8 @@ namespace RefrigeratedCase { General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCasesMT on system - for (CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesLT; ++CaseNum) { - CaseID = TransSystem(TransSystemNum).CaseNumLT(CaseNum); + for (int CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesLT; ++CaseNum) { + int CaseID = TransSystem(TransSystemNum).CaseNumLT(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + @@ -13188,15 +13127,15 @@ namespace RefrigeratedCase { General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCasesLT on system - for (WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsMT; ++WalkInNum) { - WalkInID = TransSystem(TransSystemNum).WalkInNumMT(WalkInNum); + for (int WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsMT; ++WalkInNum) { + int WalkInID = TransSystem(TransSystemNum).WalkInNumMT(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Medium Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); - for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + @@ -13208,15 +13147,15 @@ namespace RefrigeratedCase { General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkInsMT on system - for (WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsLT; ++WalkInNum) { - WalkInID = TransSystem(TransSystemNum).WalkInNumLT(WalkInNum); + for (int WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsLT; ++WalkInNum) { + int WalkInID = TransSystem(TransSystemNum).WalkInNumLT(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); - for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + @@ -13229,19 +13168,19 @@ namespace RefrigeratedCase { } // Num zones for each walk in on system } // NumWalkInsLT on system - for (CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsHP; ++CompressorNum) { - CompID = TransSystem(TransSystemNum).CompressorNumHP(CompressorNum); + for (int CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsHP; ++CompressorNum) { + int CompID = TransSystem(TransSystemNum).CompressorNumHP(CompressorNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " High Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsHP - for (CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsLP; ++CompressorNum) { - CompID = TransSystem(TransSystemNum).CompressorNumLP(CompressorNum); + for (int CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsLP; ++CompressorNum) { + int CompID = TransSystem(TransSystemNum).CompressorNumLP(CompressorNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsLP if (TransSystem(TransSystemNum).NumGasCoolers >= 1) { - GasCoolerID = TransSystem(TransSystemNum).GasCoolerNum(1); + int GasCoolerID = TransSystem(TransSystemNum).GasCoolerNum(1); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration GasCooler:Air-Cooled," + General::RoundSigDigits(GasCoolerID) + ',' + GasCooler(GasCoolerID).Name + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletP, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletT, 1) + @@ -13255,7 +13194,7 @@ namespace RefrigeratedCase { if (NumSimulationSecondarySystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Secondary Refrigeration Systems," + General::RoundSigDigits(NumSimulationSecondarySystems); - for (SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { + for (int SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { { auto const SELECT_CASE_var(Secondary(SecondaryID).FluidType); if (SELECT_CASE_var == SecFluidTypeAlwaysLiquid) { @@ -13279,8 +13218,8 @@ namespace RefrigeratedCase { General::RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); } } - for (CaseNum = 1; CaseNum <= Secondary(SecondaryID).NumCases; ++CaseNum) { - CaseID = Secondary(SecondaryID).CaseNum(CaseNum); + for (int CaseNum = 1; CaseNum <= Secondary(SecondaryID).NumCases; ++CaseNum) { + int CaseID = Secondary(SecondaryID).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << "Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + @@ -13293,15 +13232,15 @@ namespace RefrigeratedCase { } } // NumCases on secondary on secondary system - for (WalkInNum = 1; WalkInNum <= Secondary(SecondaryID).NumWalkIns; ++WalkInNum) { - WalkInID = Secondary(SecondaryID).WalkInNum(WalkInNum); + for (int WalkInNum = 1; WalkInNum <= Secondary(SecondaryID).NumWalkIns; ++WalkInNum) { + int WalkInID = Secondary(SecondaryID).WalkInNum(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << "Walk In," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1); - for (ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { + for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << "Walk In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + @@ -13314,8 +13253,8 @@ namespace RefrigeratedCase { } // zones for walk ins on secondary } // walk ins on secondary - for (CoilNum = 1; CoilNum <= Secondary(SecondaryID).NumCoils; ++CoilNum) { - CoilID = Secondary(SecondaryID).CoilNum(CoilNum); + for (int CoilNum = 1; CoilNum <= Secondary(SecondaryID).NumCoils; ++CoilNum) { + int CoilID = Secondary(SecondaryID).CoilNum(CoilNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; } // numairchillers @@ -13324,13 +13263,13 @@ namespace RefrigeratedCase { if (DataHeatBalance::NumRefrigChillerSets > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + General::RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); - for (ChillerSetNum = 1; ChillerSetNum <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetNum) { + for (int ChillerSetNum = 1; ChillerSetNum <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetNum) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + General::RoundSigDigits(ChillerSetNum) + ',' + General::RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; - for (CoilNum = 1; CoilNum <= AirChillerSet(ChillerSetNum).NumCoils; ++CoilNum) { - CoilID = AirChillerSet(ChillerSetNum).CoilNum(CoilNum); + for (int CoilNum = 1; CoilNum <= AirChillerSet(ChillerSetNum).NumCoils; ++CoilNum) { + int CoilID = AirChillerSet(ChillerSetNum).CoilNum(CoilNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Air Chiller," + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).Name + ',' + WarehouseCoil(CoilID).ZoneName + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + From 8fb0fe8e30f5d9d98829885ab3d8a8ba2e05ff06 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 14:59:50 -0700 Subject: [PATCH 58/86] step 10 - partial functions to members --- src/EnergyPlus/RefrigeratedCase.cc | 214 ++++++++++++----------------- src/EnergyPlus/RefrigeratedCase.hh | 8 +- 2 files changed, 94 insertions(+), 128 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index bfe9a270cf0..b593e2ca327 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -9418,7 +9418,7 @@ namespace RefrigeratedCase { // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { for (int CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { - CalculateAirChillerSets(CoilSetIndex); + AirChillerSet(CoilSetIndex).CalculateAirChillerSets(); } } @@ -10476,7 +10476,7 @@ namespace RefrigeratedCase { // that's why important where init goes, don't want to zero out data should keep if (UseSysTimeStep) { for (int CoilSetIndex = 1; CoilSetIndex <= DataHeatBalance::NumRefrigChillerSets; ++CoilSetIndex) { - CalculateAirChillerSets(CoilSetIndex); + AirChillerSet(CoilSetIndex).CalculateAirChillerSets(); } } @@ -10557,7 +10557,7 @@ namespace RefrigeratedCase { if (System(SysNum).NumSecondarys > 0) { for (int SecondIndex = 1; SecondIndex <= System(SysNum).NumSecondarys; ++SecondIndex) { int SecondID = System(SysNum).SecondaryNum(SecondIndex); - CalculateSecondary(SecondID); + Secondary(SecondID).CalculateSecondary(SecondID); if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // check for lowest T evap design among the secondary systems and @@ -13705,7 +13705,7 @@ namespace RefrigeratedCase { //*************************************************************************************************** //*************************************************************************************************** - void CalculateSecondary(int const SecondaryNum) + void SecondaryLoopData::CalculateSecondary(int const SecondaryNum) { // SUBROUTINE INFORMATION: // AUTHOR Therese Stovall, ORNL @@ -13736,67 +13736,39 @@ namespace RefrigeratedCase { bool AtPartLoad; // Whether or not need to iterate on pump power bool DeRate; // If true, need to derate aircoils because don't carry over unmet energy - int CaseID; // used in summing case loads on loop - int CaseNum; // used in summing case loads on loop - int CoilID; // used in summing coil loads on loop - int CoilIndex; // used in summing coil loads on loop - int DistPipeZoneNum; // used to assign case credit to zone int Iter; // loop counter - int NumPumps; // number of pumps (or stages if used to approx var speed) on loop - int PumpID; // loop counter - int ReceiverZoneNum; // used to assign case credit it zone - int WalkInID; // used in summing walk-in loads on loop - int WalkInIndex; // used in summing walk-in loads on loop - int ZoneNodeNum; // used to establish environmental temperature for dist piping heat gains Real64 CpBrine; // Specific heat (W/kg) Real64 DensityBrine; // Density (kg/m3) Real64 DiffTemp; // (C) - Real64 DistPipeHeatGain; // Optional (W) + Real64 distPipeHeatGain; // Optional (W) Real64 Error; // Used in iterative soln for pumps needed to meet load (that has to include pump energy) - Real64 Eta(0.0); // Secondary loop heat exchanger eta, dimensionless Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) - Real64 MaxLoad; // Secondary loop capacity can be limited by heat exchanger or pumps (W) - Real64 MaxVolFlow; // Flow can be limited by either total pump capacity or heat exchanger design (m3/s) Real64 PartLdFrac; // Used to ratio pump power Real64 PartPumpFrac; // Used to see if part pumps dispatched meets part pump load Real64 PrevTotalLoad; // Used in pump energy convergence test - Real64 ReceiverHeatGain; // Optional (W) Real64 RefrigerationLoad; // Load for cases and walk-ins served by loop, does not include pump energy (W) Real64 StoredEnergyRate; // Used to meet loads unmet in previous time step (related to defrost cycles // on cases/walk-ins served)(W) - Real64 TBrineAverage; // (C) Real64 TBrineIn; // Brine temperature going to heat exchanger, C - Real64 TCondense; // Condensing temperature for a phase change secondary loop, C - Real64 TEvap; // Evaporating temperature in secondary loop heat exchanger (C) - Real64 TotalCoolingLoad(0.0); // Cooling load reported back to compressor rack or detailed system (W) Real64 TotalHotDefrostCondCredit; // Used to credit condenser when heat reclaim used for hot gas/brine defrost (W) Real64 TotalPumpPower; // Total Pumping power for loop, W Real64 TotalLoad; // Total Cooling Load on secondary loop, W Real64 TPipesReceiver(0.0); // Temperature used for contents of pipes and/or receiver in calculating shell losses (C) Real64 VarFrac; // Pump power fraction for variable speed pump, dimensionless Real64 VolFlowRate; // Used in dispatching pumps to meet load (m3/s) - Real64 UnmetEnergy; // Cumulative, grows and shrinks with defrost cycles on loads served by loop (J) Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; - NumPumps = Secondary(SecondaryNum).NumPumps; - TEvap = Secondary(SecondaryNum).TEvapDesign; - MaxVolFlow = Secondary(SecondaryNum).MaxVolFlow; - MaxLoad = Secondary(SecondaryNum).MaxLoad; - UnmetEnergy = Secondary(SecondaryNum).UnmetEnergy; { - auto const SELECT_CASE_var(Secondary(SecondaryNum).FluidType); + auto const SELECT_CASE_var(this->FluidType); if (SELECT_CASE_var == SecFluidTypeAlwaysLiquid) { - CpBrine = Secondary(SecondaryNum).CpBrineRated; - DensityBrine = Secondary(SecondaryNum).DensityBrineRated; - Eta = Secondary(SecondaryNum).HeatExchangeEta; - TBrineAverage = Secondary(SecondaryNum).TBrineAverage; - TBrineIn = Secondary(SecondaryNum).TBrineInRated; - TPipesReceiver = TBrineAverage; + CpBrine = this->CpBrineRated; + DensityBrine = this->DensityBrineRated; + TBrineIn = this->TBrineInRated; + TPipesReceiver = this->TBrineAverage; } else if (SELECT_CASE_var == SecFluidTypePhaseChange) { - TCondense = Secondary(SecondaryNum).TCondense; - TPipesReceiver = TCondense; + TPipesReceiver = this->TCondense; } } // Fluid type @@ -13813,43 +13785,41 @@ namespace RefrigeratedCase { // However, another author shows this as a major diff between dx and secondary // So - allow the user to include this in his total load, even though he has to do // most of the calculations before the input (to get to SumUADistPiping)). - DistPipeHeatGain = 0.0; - if (Secondary(SecondaryNum).SumUADistPiping > MySmallNumber) { - ZoneNodeNum = Secondary(SecondaryNum).DistPipeZoneNodeNum; + distPipeHeatGain = 0.0; + if (this->SumUADistPiping > MySmallNumber) { + int ZoneNodeNum = this->DistPipeZoneNodeNum; DiffTemp = DataLoopNode::Node(ZoneNodeNum).Temp - TPipesReceiver; - DistPipeHeatGain = DiffTemp * Secondary(SecondaryNum).SumUADistPiping; - DistPipeZoneNum = Secondary(SecondaryNum).DistPipeZoneNum; + distPipeHeatGain = DiffTemp * this->SumUADistPiping; // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) - Secondary(SecondaryNum).DistPipeZoneHeatGain = -DistPipeHeatGain; - DataHeatBalance::RefrigCaseCredit(DistPipeZoneNum).SenCaseCreditToZone -= DistPipeHeatGain; + this->DistPipeZoneHeatGain = -distPipeHeatGain; + DataHeatBalance::RefrigCaseCredit(this->DistPipeZoneNum).SenCaseCreditToZone -= distPipeHeatGain; } // calc distribution piping heat gains - ReceiverHeatGain = 0.0; - if (Secondary(SecondaryNum).SumUAReceiver > MySmallNumber) { - ZoneNodeNum = Secondary(SecondaryNum).ReceiverZoneNodeNum; + Real64 receiverHeatGain = 0.0; + if (this->SumUAReceiver > MySmallNumber) { + int ZoneNodeNum = this->ReceiverZoneNodeNum; DiffTemp = DataLoopNode::Node(ZoneNodeNum).Temp - TPipesReceiver; - ReceiverHeatGain = DiffTemp * Secondary(SecondaryNum).SumUAReceiver; - ReceiverZoneNum = Secondary(SecondaryNum).ReceiverZoneNum; + receiverHeatGain = DiffTemp * this->SumUAReceiver; // receiver heat load is a positive number (ie. heat absorbed by receiver, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) - Secondary(SecondaryNum).ReceiverZoneHeatGain = -ReceiverHeatGain; - DataHeatBalance::RefrigCaseCredit(ReceiverZoneNum).SenCaseCreditToZone -= ReceiverHeatGain; + this->ReceiverZoneHeatGain = -receiverHeatGain; + DataHeatBalance::RefrigCaseCredit(this->ReceiverZoneNum).SenCaseCreditToZone -= receiverHeatGain; } // calc receiver heat gains // Sum up all the case and walk-in loads served by the secondary loop - if (Secondary(SecondaryNum).NumCases > 0) { - for (CaseNum = 1; CaseNum <= Secondary(SecondaryNum).NumCases; ++CaseNum) { - CaseID = Secondary(SecondaryNum).CaseNum(CaseNum); + if (this->NumCases > 0) { + for (int caseNum = 1; caseNum <= this->NumCases; ++caseNum) { + int CaseID = this->CaseNum(caseNum); CalculateCase(CaseID); // increment TotalCoolingLoad Hot gas/brine defrost credits for each secondary loop RefrigerationLoad += RefrigCase(CaseID).TotalCoolingLoad; TotalHotDefrostCondCredit += RefrigCase(CaseID).HotDefrostCondCredit; } // CaseNum } // NumCases > 0 - if (Secondary(SecondaryNum).NumWalkIns > 0) { - for (WalkInIndex = 1; WalkInIndex <= Secondary(SecondaryNum).NumWalkIns; ++WalkInIndex) { - WalkInID = Secondary(SecondaryNum).WalkInNum(WalkInIndex); + if (this->NumWalkIns > 0) { + for (int WalkInIndex = 1; WalkInIndex <= this->NumWalkIns; ++WalkInIndex) { + int WalkInID = this->WalkInNum(WalkInIndex); CalculateWalkIn(WalkInID); // increment TotalCoolingLoad for each system RefrigerationLoad += WalkIn(WalkInID).TotalCoolingLoad; @@ -13857,9 +13827,9 @@ namespace RefrigeratedCase { } // NumWalkIns systems } // Secondary(SecondaryNum)%NumWalkIns > 0 - if (Secondary(SecondaryNum).NumCoils > 0) { - for (CoilIndex = 1; CoilIndex <= Secondary(SecondaryNum).NumCoils; ++CoilIndex) { - CoilID = Secondary(SecondaryNum).CoilNum(CoilIndex); + if (this->NumCoils > 0) { + for (int CoilIndex = 1; CoilIndex <= this->NumCoils; ++CoilIndex) { + int CoilID = this->CoilNum(CoilIndex); // already CALL CalculateCoil(CoilID) for each coil, dispatched in coilset order for each zone // increment TotalCoolingLoad for each system // here will find out if secondary can serve total load, if not will derate coil outout/case credits @@ -13868,29 +13838,29 @@ namespace RefrigeratedCase { } // NumCoils on seocndary system } // Secondary(SecondaryNum)%NumCoils > 0 - TotalLoad = RefrigerationLoad + DistPipeHeatGain + ReceiverHeatGain; + TotalLoad = RefrigerationLoad + distPipeHeatGain + receiverHeatGain; AtPartLoad = true; // Check to see if load is already >+ maxload without pump heat - if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - FlowVolNeeded = TotalLoad / Eta / (CpBrine * DensityBrine * (TBrineIn - TEvap)); + if (this->FluidType == SecFluidTypeAlwaysLiquid) { //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + FlowVolNeeded = TotalLoad / this->HeatExchangeEta / (CpBrine * DensityBrine * (TBrineIn - this->TEvapDesign)); // For brine/glycol systems, find flow volume needed to meet load // Per ashrae 2006, p4.1, eval mass flow rate to pump at brine return (to chiller) temp // because pumps located in return piping - if (FlowVolNeeded >= MaxVolFlow) { + if (FlowVolNeeded >= this->MaxVolFlow) { // Don't need to iterate on pumps, just set to max. Will have unmet load this time step (unless coils present) - VolFlowRate = MaxVolFlow; - TotalPumpPower = Secondary(SecondaryNum).PumpTotRatedPower; - TotalLoad += TotalPumpPower * Secondary(SecondaryNum).PumpPowerToHeat; + VolFlowRate = this->MaxVolFlow; + TotalPumpPower = this->PumpTotRatedPower; + TotalLoad += TotalPumpPower * this->PumpPowerToHeat; AtPartLoad = false; - if (Secondary(SecondaryNum).NumCoils > 0) DeRate = true; + if (this->NumCoils > 0) DeRate = true; } // flowvolneeded >= maxvolflow } else { // have SecFluidTypePhaseChange !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - if (TotalLoad >= MaxLoad) { - TotalPumpPower = Secondary(SecondaryNum).PumpTotRatedPower; - TotalLoad += TotalPumpPower * Secondary(SecondaryNum).PumpPowerToHeat; - VolFlowRate = MaxVolFlow; + if (TotalLoad >= this->MaxLoad) { + TotalPumpPower = this->PumpTotRatedPower; + TotalLoad += TotalPumpPower * this->PumpPowerToHeat; + VolFlowRate = this->MaxVolFlow; AtPartLoad = false; - if (Secondary(SecondaryNum).NumCoils > 0) DeRate = true; + if (this->NumCoils > 0) DeRate = true; } } // fluid type check for max load or max flow >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @@ -13907,34 +13877,34 @@ namespace RefrigeratedCase { break; } PrevTotalLoad = TotalLoad; - if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { - FlowVolNeeded = TotalLoad / Eta / (CpBrine * DensityBrine * (TBrineIn - TEvap)); - PartLdFrac = FlowVolNeeded / MaxVolFlow; + if (this->FluidType == SecFluidTypeAlwaysLiquid) { + FlowVolNeeded = TotalLoad / this->HeatExchangeEta / (CpBrine * DensityBrine * (TBrineIn - this->TEvapDesign)); + PartLdFrac = FlowVolNeeded / this->MaxVolFlow; } else { - PartLdFrac = TotalLoad / MaxLoad; + PartLdFrac = TotalLoad / this->MaxLoad; } - if (Secondary(SecondaryNum).PumpControlType == SecPumpControlConstant) { + if (this->PumpControlType == SecPumpControlConstant) { VolFlowRate = 0.0; TotalPumpPower = 0.0; - for (PumpID = 1; PumpID <= NumPumps; ++PumpID) { // dispatch pumps to meet needed flow rate - if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { //>>>>>>>>>>>>>>>>>>>>> - VolFlowRate += Secondary(SecondaryNum).PumpIncrementFlowVol; - TotalPumpPower += Secondary(SecondaryNum).PumpIncrementPower; + for (int PumpID = 1; PumpID <= this->NumPumps; ++PumpID) { // dispatch pumps to meet needed flow rate + if (this->FluidType == SecFluidTypeAlwaysLiquid) { //>>>>>>>>>>>>>>>>>>>>> + VolFlowRate += this->PumpIncrementFlowVol; + TotalPumpPower += this->PumpIncrementPower; if (VolFlowRate >= FlowVolNeeded) break; } else { // fluid type phase change >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - VolFlowRate += Secondary(SecondaryNum).PumpIncrementFlowVol; - TotalPumpPower += Secondary(SecondaryNum).PumpIncrementPower; - PartPumpFrac = TotalPumpPower / Secondary(SecondaryNum).PumpTotRatedPower; + VolFlowRate += this->PumpIncrementFlowVol; + TotalPumpPower += this->PumpIncrementPower; + PartPumpFrac = TotalPumpPower / this->PumpTotRatedPower; if (PartPumpFrac >= PartLdFrac) break; } // fluid type >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> } // Dispatching pumps until fluid flow need is met } else { // pump type variable - VarFrac = max(0.1, CurveManager::CurveValue(Secondary(SecondaryNum).VarSpeedCurvePtr, PartLdFrac)); - TotalPumpPower = Secondary(SecondaryNum).PumpTotRatedPower * VarFrac; - VolFlowRate = MaxVolFlow * PartLdFrac; + VarFrac = max(0.1, CurveManager::CurveValue(this->VarSpeedCurvePtr, PartLdFrac)); + TotalPumpPower = this->PumpTotRatedPower * VarFrac; + VolFlowRate = this->MaxVolFlow * PartLdFrac; } // pump type - TotalLoad = RefrigerationLoad + DistPipeHeatGain + ReceiverHeatGain + TotalPumpPower * Secondary(SecondaryNum).PumpPowerToHeat; + TotalLoad = RefrigerationLoad + distPipeHeatGain + receiverHeatGain + TotalPumpPower * this->PumpPowerToHeat; Error = std::abs((TotalLoad - PrevTotalLoad) / PrevTotalLoad); if (Error < ErrorTol) break; } // end iteration on pump energy convergence @@ -13954,51 +13924,49 @@ namespace RefrigeratedCase { // apply it to previously unmet/stored loads. If capacity less than current load, // (e.g. as it may be following defrost cycles on cases or walk-ins served by secondary loop) // save the unmet/stored load to be met in succeeding time steps. - if (Secondary(SecondaryNum).NumCoils == 0) { - StoredEnergyRate = max(0.0, (UnmetEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour)); + if (this->NumCoils == 0) { + StoredEnergyRate = max(0.0, (this->UnmetEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour)); // Load necessary to meet current and all stored energy needs (W) Real64 LoadRequested = TotalLoad + StoredEnergyRate; - if (MaxLoad > LoadRequested) { + if (this->MaxLoad > LoadRequested) { // Have at least as much capacity avail as needed, even counting stored energy - TotalCoolingLoad = LoadRequested; + this->TotalCoolingLoad = LoadRequested; RefrigerationLoad += StoredEnergyRate; - UnmetEnergy = 0.0; + this->UnmetEnergy = 0.0; } else { // Don't have as much capacity as needed (likely following defrost periods) - TotalCoolingLoad = MaxLoad; - RefrigerationLoad -= (TotalLoad - MaxLoad); - if (!DataGlobals::WarmupFlag) UnmetEnergy += ((TotalLoad - MaxLoad) * DataGlobals::TimeStepZoneSec); + this->TotalCoolingLoad = this->MaxLoad; + RefrigerationLoad -= (TotalLoad - this->MaxLoad); + if (!DataGlobals::WarmupFlag) this->UnmetEnergy += ((TotalLoad - this->MaxLoad) * DataGlobals::TimeStepZoneSec); } // load requested greater than MaxLoad - if (Secondary(SecondaryNum).UnmetEnergy > MyLargeNumber) { - Secondary(SecondaryNum).UnmetEnergy = MyLargeNumber; + if (this->UnmetEnergy > MyLargeNumber) { + this->UnmetEnergy = MyLargeNumber; if (ShowUnmetSecondEnergyWarning(SecondaryNum)) { - ShowWarningError("Secondary Refrigeration Loop: " + Secondary(SecondaryNum).Name); + ShowWarningError("Secondary Refrigeration Loop: " + this->Name); ShowContinueError(" This secondary system has insufficient capacity to meet the refrigeration loads."); ShowUnmetSecondEnergyWarning(SecondaryNum) = false; } } //>my large number - Secondary(SecondaryNum).UnmetEnergy = UnmetEnergy; } else { // air coils on secondary loop, no "unmet" energy accounting, just reduce amount of cooling provided to zone by coils DeRate = false; - if (TotalLoad > MaxLoad) DeRate = true; + if (TotalLoad > this->MaxLoad) DeRate = true; // TotalLoad = RefrigerationLoad + DistPipeHeatGain + ReceiverHeatGain & // + TotalPumpPower*Secondary(SecondaryNum)%PumpPowertoHeat - FinalRateCoils(DeRate, SecondarySystem, SecondaryNum, TotalLoad, MaxLoad); // assign case credits for coils on this loop + FinalRateCoils(DeRate, SecondarySystem, SecondaryNum, TotalLoad, this->MaxLoad); // assign case credits for coils on this loop // Bug TotalCoolingLoad not set but used below } // no air coils on secondary loop - Secondary(SecondaryNum).PumpPowerTotal = TotalPumpPower; - Secondary(SecondaryNum).PumpElecEnergyTotal = TotalPumpPower * LocalTimeStep * DataGlobals::SecInHour; - Secondary(SecondaryNum).TotalRefrigLoad = RefrigerationLoad; - Secondary(SecondaryNum).TotalRefrigEnergy = RefrigerationLoad * LocalTimeStep * DataGlobals::SecInHour; - Secondary(SecondaryNum).TotalCoolingLoad = TotalCoolingLoad; - Secondary(SecondaryNum).TotalCoolingEnergy = TotalCoolingLoad * LocalTimeStep * DataGlobals::SecInHour; - Secondary(SecondaryNum).FlowVolActual = VolFlowRate; - Secondary(SecondaryNum).HotDefrostCondCredit = TotalHotDefrostCondCredit; - Secondary(SecondaryNum).DistPipeHeatGain = DistPipeHeatGain; - Secondary(SecondaryNum).DistPipeHeatGainEnergy = DistPipeHeatGain * LocalTimeStep * DataGlobals::SecInHour; - Secondary(SecondaryNum).ReceiverHeatGain = ReceiverHeatGain; - Secondary(SecondaryNum).ReceiverHeatGainEnergy = ReceiverHeatGain * LocalTimeStep * DataGlobals::SecInHour; + this->PumpPowerTotal = TotalPumpPower; + this->PumpElecEnergyTotal = TotalPumpPower * LocalTimeStep * DataGlobals::SecInHour; + this->TotalRefrigLoad = RefrigerationLoad; + this->TotalRefrigEnergy = RefrigerationLoad * LocalTimeStep * DataGlobals::SecInHour; + this->TotalCoolingEnergy = TotalCoolingLoad * LocalTimeStep * DataGlobals::SecInHour; + this->FlowVolActual = VolFlowRate; + this->HotDefrostCondCredit = TotalHotDefrostCondCredit; + this->DistPipeHeatGain = distPipeHeatGain; + this->DistPipeHeatGainEnergy = distPipeHeatGain * LocalTimeStep * DataGlobals::SecInHour; + this->ReceiverHeatGain = receiverHeatGain; + this->ReceiverHeatGainEnergy = receiverHeatGain * LocalTimeStep * DataGlobals::SecInHour; } void SumZoneImpacts() @@ -14182,7 +14150,7 @@ namespace RefrigeratedCase { //*************************************************************************************************** - void CalculateAirChillerSets(int const AirChillerSetID) + void AirChillerSetData::CalculateAirChillerSets() { // SUBROUTINE INFORMATION: @@ -14207,14 +14175,14 @@ namespace RefrigeratedCase { // Note, all coils in a coil set are in the same zone // the coils may be served by different detailed systems // The coils are dispatched to meet the load specified in the previous time step in order listed in coilset object - AirChillerSetSchedule = ScheduleManager::GetCurrentScheduleValue(AirChillerSet(AirChillerSetID).SchedPtr); + AirChillerSetSchedule = ScheduleManager::GetCurrentScheduleValue(this->SchedPtr); if (AirChillerSetSchedule <= 0.0) return; - QZNReqSens = AirChillerSet(AirChillerSetID).QZnReqSens; + QZNReqSens = this->QZnReqSens; RemainQZNReqSens = QZNReqSens; - for (int CoilIndex = 1; CoilIndex <= AirChillerSet(AirChillerSetID).NumCoils; ++CoilIndex) { - int CoilID = AirChillerSet(AirChillerSetID).CoilNum(CoilIndex); + for (int CoilIndex = 1; CoilIndex <= this->NumCoils; ++CoilIndex) { + int CoilID = this->CoilNum(CoilIndex); CalculateCoil(CoilID, RemainQZNReqSens); RemainQZNReqSens += WarehouseCoil(CoilID).SensCreditRate; @@ -14250,7 +14218,6 @@ namespace RefrigeratedCase { int NumCoils(0); Real64 DeRateFactor(0.0); // Ratio of energy available from system or secondary loop Real64 InitLatCreditEnergy(0.0); // Latent credit energy before derate [W] - Real64 InitKgFrost(0.0); // Initial amount of frost on coils based on latent load before derate [kg] Real64 FrostReduction(0.0); // Change in frost on coils based on derated latent load [kg] { @@ -14276,7 +14243,6 @@ namespace RefrigeratedCase { // need to adjust ice on coil due to reduction in latent load met by coil InitLatCreditEnergy = warehouse_coil.LatCreditEnergy; - InitKgFrost = warehouse_coil.KgFrost; warehouse_coil.TotalCoolingLoad *= DeRateFactor; warehouse_coil.TotalCoolingEnergy *= DeRateFactor; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 385e6ca1989..e027afda2e8 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -1068,6 +1068,8 @@ namespace RefrigeratedCase { ReceiverZoneHeatGain = 0.0; DistPipeZoneHeatGain = 0.0; } + + void CalculateSecondary(int SecondaryNum); }; struct TransferLoadListDef // Derived Type for Transfer Load (Secondary and Cascade) Lists @@ -1396,6 +1398,8 @@ namespace RefrigeratedCase { : ChillerSetID(0), SchedPtr(0), NodeNumInlet(0), NodeNumOutlet(0), NumCoils(0), ZoneNum(0), ZoneNodeNum(0), QZnReqSens(0.0) { } + + void CalculateAirChillerSets(); }; struct CoilCreditData // used to sum impact of all coils within a zone @@ -1516,8 +1520,6 @@ namespace RefrigeratedCase { void CalculateWalkIn(int WalkInID); // Absolute pointer to Walk In - void CalculateSecondary(int SecondaryNum); - void SumZoneImpacts(); void CheckRefrigerationInput(); @@ -1530,8 +1532,6 @@ namespace RefrigeratedCase { int &AirChillerSetPtr // from ZoneEquipList(CurZoneEqNum)%EquipIndex(EquipPtr) ); - void CalculateAirChillerSets(int AirChillerSetID); - void FinalRateCoils(bool DeRate, // True if compressor rack or secondary ht exchanger unable to provide capacity int SystemSourceType, // SecondarySystem or DetailedSystem int SystemID, // ID for Secondary loop or detailed system calling for derate From ce33c40a462432662e4431e77a7bf109c2a82fc6 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 15:30:54 -0700 Subject: [PATCH 59/86] step 10 - partial functions to members --- src/EnergyPlus/RefrigeratedCase.cc | 380 ++++++++++++++--------------- src/EnergyPlus/RefrigeratedCase.hh | 23 +- 2 files changed, 188 insertions(+), 215 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index b593e2ca327..1e844015c35 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -365,8 +365,6 @@ namespace RefrigeratedCase { Real64 RackSenCreditToZone(0.0); // Amount of condenser heat applied to zone load (W) Real64 RackSenCreditToHVAC(0.0); // Amount of condenser heat applied to HVAC RA duct (W) - Array1D_bool ShowCOPWarning; // Used for one-time warning message for possible rack - // input error regarding COP // Refrigeration condenser variables (used for both racks and detailed systems) Real64 TotalCondenserFanPower(0.0); // Total condenser fan electric power (W) Real64 TotalCondenserPumpPower(0.0); // Total condenser pump electric power (W) @@ -387,8 +385,6 @@ namespace RefrigeratedCase { // Refrigeration Secondary Loop variables Array1D_bool ShowUnmetSecondEnergyWarning; // Used for one-time warning message for possible // compressor input error regarding secondary loop heat exchanger capacity - // Refrigerated warehouse coil variables - Array1D_bool ShowCoilFrostWarning; // Used for one-time warning message if defrost cycles insufficient to melt ice // Refrigeration Plant connections checks Array1D_bool CheckEquipNameRackWaterCondenser; @@ -477,8 +473,6 @@ namespace RefrigeratedCase { RackSenCreditToZone = 0.0; RackSenCreditToHVAC = 0.0; - ShowCOPWarning.deallocate(); - TotalCondenserFanPower = 0.0; TotalCondenserPumpPower = 0.0; TotalCondenserHeat = 0.0; @@ -489,7 +483,6 @@ namespace RefrigeratedCase { ShowHiStageUnmetEnergyWarning.deallocate(); ShowUnmetEnergyWarningTrans.deallocate(); ShowUnmetSecondEnergyWarning.deallocate(); - ShowCoilFrostWarning.deallocate(); CheckEquipNameRackWaterCondenser.deallocate(); CheckEquipNameWaterCondenser.deallocate(); RefrigPresentInZone.deallocate(); @@ -579,8 +572,8 @@ namespace RefrigeratedCase { if (HaveRefrigRacks) { for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { - CalcRackSystem(RackNum); - ReportRackSystem(RackNum); + RefrigRack(RackNum).CalcRackSystem(); + RefrigRack(RackNum).ReportRackSystem(RackNum); } } @@ -728,7 +721,6 @@ namespace RefrigeratedCase { if (DataHeatBalance::NumRefrigeratedRacks > 0) { RefrigRack.allocate(DataHeatBalance::NumRefrigeratedRacks); DataHeatBalance::HeatReclaimRefrigeratedRack.allocate(DataHeatBalance::NumRefrigeratedRacks); - ShowCOPWarning.dimension(DataHeatBalance::NumRefrigeratedRacks, true); } if (DataHeatBalance::NumRefrigSystems > 0) { System.allocate(DataHeatBalance::NumRefrigSystems); @@ -774,9 +766,7 @@ namespace RefrigeratedCase { } if (NumSimulationRefrigAirChillers > 0) { WarehouseCoil.allocate(NumSimulationRefrigAirChillers); - ShowCoilFrostWarning.allocate(NumSimulationRefrigAirChillers); CoilSysCredit.allocate(DataGlobals::NumOfZones); - ShowCoilFrostWarning = true; } if (NumSimulationCompressors > 0) Compressor.allocate(NumSimulationCompressors); if (NumSimulationSubcoolers > 0) Subcooler.allocate(NumSimulationSubcoolers); @@ -9358,7 +9348,7 @@ namespace RefrigeratedCase { if (!DataGlobals::BeginEnvrnFlag) MyBeginEnvrnFlag = true; } - void CalcRackSystem(int const RackNum) + void RefrigRackData::CalcRackSystem() { // SUBROUTINE INFORMATION: @@ -9422,9 +9412,9 @@ namespace RefrigeratedCase { } } - if (RefrigRack(RackNum).NumCoils > 0) { - for (int CoilIndex = 1; CoilIndex <= RefrigRack(RackNum).NumCoils; ++CoilIndex) { - int CoilID = RefrigRack(RackNum).CoilNum(CoilIndex); + if (this->NumCoils > 0) { + for (int CoilIndex = 1; CoilIndex <= this->NumCoils; ++CoilIndex) { + int CoilID = this->CoilNum(CoilIndex); // already CALLed CalculateCoil(CoilID) in CoilSet specified order // increment TotalCoolingLoad for Compressors/condenser on each system TotalRackDeliveredCapacity += WarehouseCoil(CoilID).TotalCoolingLoad; @@ -9432,9 +9422,9 @@ namespace RefrigeratedCase { } // NumCoils systems } // System(SysNum)%NumCoils > 0 - if (RefrigRack(RackNum).NumCases > 0) { - for (int CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { - int CaseID = RefrigRack(RackNum).CaseNum(CaseNum); + if (this->NumCases > 0) { + for (int caseNum = 1; caseNum <= this->NumCases; ++caseNum) { + int CaseID = this->CaseNum(caseNum); CalculateCase(CaseID); // add evaporator load for all cases connected to rack @@ -9445,14 +9435,14 @@ namespace RefrigeratedCase { // (used when HeatRejectionLocation = LocationZone) // if walk-ins are served by rack, user must specify heat rejection zone and 100% of heat // rejection goes to that zone - that is, no heat rejection goes to the HVAC return air - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - if (RefrigRack(RackNum).NumWalkIns == 0) { + if (this->HeatRejectionLocation == LocationZone) { + if (this->NumWalkIns == 0) { TotalHeatRejectedToZone += RefrigCase(CaseID).TotalCoolingLoad * (1.0 - CaseRAFactor); // CaseRAFactor is a module variable calculated in CalculateCase // find zone number of first case on rack (all cases are in the same zone // if HeatRejectionLocation = LocationZone and no walk-ins) - HeatRejectZoneNum = RefrigCase(RefrigRack(RackNum).CaseNum(1)).ActualZoneNum; - HeatRejectZoneNodeNum = RefrigCase(RefrigRack(RackNum).CaseNum(1)).ZoneNodeNum; + HeatRejectZoneNum = RefrigCase(this->CaseNum(1)).ActualZoneNum; + HeatRejectZoneNodeNum = RefrigCase(this->CaseNum(1)).ZoneNodeNum; } else { // have walk ins so no reduction in condenser heat rejection for caseRA factor TotalHeatRejectedToZone += RefrigCase(CaseID).TotalCoolingLoad; } // no walk ins @@ -9460,26 +9450,26 @@ namespace RefrigeratedCase { } // NumCases } // Numcases on rack > 0 - if (RefrigRack(RackNum).NumWalkIns > 0) { - for (int WalkInIndex = 1; WalkInIndex <= RefrigRack(RackNum).NumWalkIns; ++WalkInIndex) { - int WalkInID = RefrigRack(RackNum).WalkInNum(WalkInIndex); + if (this->NumWalkIns > 0) { + for (int WalkInIndex = 1; WalkInIndex <= this->NumWalkIns; ++WalkInIndex) { + int WalkInID = this->WalkInNum(WalkInIndex); CalculateWalkIn(WalkInID); TotalRackDeliveredCapacity += WalkIn(WalkInID).TotalCoolingLoad; - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { + if (this->HeatRejectionLocation == LocationZone) { TotalHeatRejectedToZone += WalkIn(WalkInID).TotalCoolingLoad; - HeatRejectZoneNum = RefrigRack(RackNum).HeatRejectionZoneNum; - HeatRejectZoneNodeNum = RefrigRack(RackNum).HeatRejectionZoneNodeNum; + HeatRejectZoneNum = this->HeatRejectionZoneNum; + HeatRejectZoneNodeNum = this->HeatRejectionZoneNodeNum; } // reject heat to zone } // WalkInIndex } // NumWalkIns>0 - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - COPFTempOutput = CurveManager::CurveValue(RefrigRack(RackNum).COPFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp); + if (this->HeatRejectionLocation == LocationZone) { + COPFTempOutput = CurveManager::CurveValue(this->COPFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp); EvapAvail = false; } else { - if (RefrigRack(RackNum).OutsideAirNodeNum != 0) { - OutDbTemp = DataLoopNode::Node(RefrigRack(RackNum).OutsideAirNodeNum).Temp; - BPress = DataLoopNode::Node(RefrigRack(RackNum).OutsideAirNodeNum).Press; + if (this->OutsideAirNodeNum != 0) { + OutDbTemp = DataLoopNode::Node(this->OutsideAirNodeNum).Temp; + BPress = DataLoopNode::Node(this->OutsideAirNodeNum).Press; } else { OutDbTemp = DataEnvironment::OutDryBulbTemp; BPress = DataEnvironment::OutBaroPress; @@ -9488,105 +9478,103 @@ namespace RefrigeratedCase { // IF schedule exists, evap condenser can be scheduled OFF // Check schedule to determine evap condenser availability - if (RefrigRack(RackNum).EvapSchedPtr > 0 && ScheduleManager::GetCurrentScheduleValue(RefrigRack(RackNum).EvapSchedPtr) == 0) EvapAvail = false; + if (this->EvapSchedPtr > 0 && ScheduleManager::GetCurrentScheduleValue(this->EvapSchedPtr) == 0) EvapAvail = false; // Evaporative condensers will have their water flow shut off in cold months to avoid // 'spectacular' icing problems. Ideally, the user will use the evaporative schedule input // to set such a schedule. However, sometimes, users will use a single input deck to model // one building in multiple climates, and may not think to put in such a schedule in the colder - // climates. To accomodate such applications, the variable EvapCutOutTdb is used as an extra + // climates. To accommodate such applications, the variable EvapCutOutTdb is used as an extra // check. if (OutDbTemp < EvapCutOutTdb) EvapAvail = false; - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { + if (this->CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { // determine temps for evap cooling - if (RefrigRack(RackNum).OutsideAirNodeNum != 0) { - HumRatIn = DataLoopNode::Node(RefrigRack(RackNum).OutsideAirNodeNum).HumRat; + if (this->OutsideAirNodeNum != 0) { + HumRatIn = DataLoopNode::Node(this->OutsideAirNodeNum).HumRat; } else { HumRatIn = DataEnvironment::OutHumRat; } // outsideairnode OutWbTemp = Psychrometrics::PsyTwbFnTdbWPb(OutDbTemp, HumRatIn, BPress); - EffectTemp = OutWbTemp + (1.0 - RefrigRack(RackNum).EvapEffect) * (OutDbTemp - OutWbTemp); + EffectTemp = OutWbTemp + (1.0 - this->EvapEffect) * (OutDbTemp - OutWbTemp); } // evapAvail // Obtain water-cooled condenser inlet/outlet temps - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { - RefrigRack(RackNum).InletTemp = DataLoopNode::Node(RefrigRack(RackNum).InletNode).Temp; - EffectTemp = DataLoopNode::Node(RefrigRack(RackNum).InletNode).Temp + 5.0; // includes approach temp - if (RefrigRack(RackNum).InletTemp < RefrigRack(RackNum).InletTempMin) { - // RefrigRack(RackNum)%LowTempWarn = RefrigRack(RackNum)%LowTempWarn +1 - if (RefrigRack(RackNum).LowTempWarnIndex == 0) { - ShowWarningMessage("Refrigeration:CompressorRack: " + RefrigRack(RackNum).Name); + if (this->CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { + this->InletTemp = DataLoopNode::Node(this->InletNode).Temp; + EffectTemp = DataLoopNode::Node(this->InletNode).Temp + 5.0; // includes approach temp + if (this->InletTemp < this->InletTempMin) { + if (this->LowTempWarnIndex == 0) { + ShowWarningMessage("Refrigeration:CompressorRack: " + this->Name); ShowContinueError("Water-cooled condenser inlet temp lower than minimum allowed temp. Check returning water temperature " "and/or minimum temperature setpoints."); } // LowTempWarnIndex - ShowRecurringWarningErrorAtEnd("Refrigeration Compressor Rack " + RefrigRack(RackNum).Name + + ShowRecurringWarningErrorAtEnd("Refrigeration Compressor Rack " + this->Name + " - Condenser inlet temp lower than minimum allowed ... continues", - RefrigRack(RackNum).LowTempWarnIndex); + this->LowTempWarnIndex); // END IF !LowTempWarn } // InletTempMin } // DataHeatBalance::RefrigCondenserTypeWater - COPFTempOutput = CurveManager::CurveValue(RefrigRack(RackNum).COPFTempPtr, EffectTemp); + COPFTempOutput = CurveManager::CurveValue(this->COPFTempPtr, EffectTemp); } // Location Zone - CompressorCOPactual = RefrigRack(RackNum).RatedCOP * COPFTempOutput; + CompressorCOPactual = this->RatedCOP * COPFTempOutput; if (CompressorCOPactual > 0.0) { TotalCompressorPower = TotalRackDeliveredCapacity / CompressorCOPactual; TotalCondenserHeat = TotalCompressorPower + TotalRackDeliveredCapacity; } else { - if (ShowCOPWarning(RackNum)) { - ShowWarningError("Refrigeration:CompressorRack: " + RefrigRack(RackNum).Name); + if (this->ShowCOPWarning) { + ShowWarningError("Refrigeration:CompressorRack: " + this->Name); ShowContinueError(" The calculated COP has a value of zero or is negative. Refer to Engineering Documentation for"); ShowContinueError(" further explanation of Compressor Rack COP as a Function of Temperature Curve."); - ShowCOPWarning(RackNum) = false; + this->ShowCOPWarning = false; } } // calculate condenser fan usage here if not water-cooled; if water-cooled, fan is in separate tower object // fan loads > 0 only if the connected cases are operating - if (TotalRackDeliveredCapacity > 0.0 && RefrigRack(RackNum).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) { - if (RefrigRack(RackNum).TotCondFTempPtr != 0) { - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { - CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(RefrigRack(RackNum).TotCondFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp))); - TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; - DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += RefrigRack(RackNum).CondenserFanPower * CondenserFrac; + if (TotalRackDeliveredCapacity > 0.0 && this->CondenserType != DataHeatBalance::RefrigCondenserTypeWater) { + if (this->TotCondFTempPtr != 0) { + if (this->HeatRejectionLocation == LocationZone) { + CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(this->TotCondFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp))); + TotalCondenserFanPower = this->CondenserFanPower * CondenserFrac; + DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += this->CondenserFanPower * CondenserFrac; } else { - CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(RefrigRack(RackNum).TotCondFTempPtr, EffectTemp))); - TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; + CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(this->TotCondFTempPtr, EffectTemp))); + TotalCondenserFanPower = this->CondenserFanPower * CondenserFrac; } // location zone } else { CondenserFrac = 1.0; - TotalCondenserFanPower = RefrigRack(RackNum).CondenserFanPower * CondenserFrac; + TotalCondenserFanPower = this->CondenserFanPower * CondenserFrac; } // TotCondFTempPtr } // Cooling Water type // calculate evap water use and water pump power, if applicable // assumes pump runs whenever evap cooling is available to minimize scaling - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { - TotalCondenserPumpPower = RefrigRack(RackNum).EvapPumpPower; + if (this->CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && EvapAvail) { + TotalCondenserPumpPower = this->EvapPumpPower; HumRatOut = Psychrometrics::PsyWFnTdbTwbPb(EffectTemp, OutWbTemp, BPress); - TotalEvapWaterUseRate = RefrigRack(RackNum).CondenserAirFlowRate * CondenserFrac * Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn) * + TotalEvapWaterUseRate = this->CondenserAirFlowRate * CondenserFrac * Psychrometrics::PsyRhoAirFnPbTdbW(BPress, OutDbTemp, HumRatIn) * (HumRatOut - HumRatIn) / Psychrometrics::RhoH2O(EffectTemp); } // evapAvail // calculate basin water heater load - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { - if ((TotalRackDeliveredCapacity == 0.0) && (EvapAvail) && (OutDbTemp < RefrigRack(RackNum).BasinHeaterSetPointTemp)) { + if (this->CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { + if ((TotalRackDeliveredCapacity == 0.0) && (EvapAvail) && (OutDbTemp < this->BasinHeaterSetPointTemp)) { TotalBasinHeatPower = - max(0.0, RefrigRack(RackNum).BasinHeaterPowerFTempDiff * (RefrigRack(RackNum).BasinHeaterSetPointTemp - OutDbTemp)); + max(0.0, this->BasinHeaterPowerFTempDiff * (this->BasinHeaterSetPointTemp - OutDbTemp)); // provide warning if no heater power exists if (TotalBasinHeatPower == 0.0) { - // RefrigRack(RackNum)%EvapFreezeWarn = RefrigRack(RackNum)%EvapFreezeWarn + 1 - if (RefrigRack(RackNum).EvapFreezeWarnIndex == 0) { - ShowWarningMessage("Refrigeration Compressor Rack " + RefrigRack(RackNum).Name + + if (this->EvapFreezeWarnIndex == 0) { + ShowWarningMessage("Refrigeration Compressor Rack " + this->Name + " - Evap cooling of condenser underway with no basin heater power"); ShowContinueError("and condenser inlet air dry-bulb temp at or below the basin heater setpoint temperature."); ShowContinueErrorTimeStamp("Continuing simulation."); } // EvapFreezeWarnIndex == 0 - ShowRecurringWarningErrorAtEnd("Refrigeration Compressor Rack " + RefrigRack(RackNum).Name + + ShowRecurringWarningErrorAtEnd("Refrigeration Compressor Rack " + this->Name + " - Evap cooling of condenser underway with no basin heater power ... continues", - RefrigRack(RackNum).EvapFreezeWarnIndex); + this->EvapFreezeWarnIndex); // END IF } // TotalBasinHeatPower == 0 when at outdoor freezing conditions } // cap @@ -9595,10 +9583,10 @@ namespace RefrigeratedCase { // add in compressor and condenser fan power to rack heat rejection variables if the heat rejection location is to the zone // if walk-ins are served by rack, user must specify heat rejection zone and 100% of heat // rejection goes to that zone - that is, no condenser heat rejection goes to the HVAC return air - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { + if (this->HeatRejectionLocation == LocationZone) { TotalCondenserHeat = TotalRackDeliveredCapacity + TotalCompressorPower + TotalCondenserFanPower; if (HeatRejectZoneNum > 0 && TotalRackDeliveredCapacity > 0.0) { - if (RefrigRack(RackNum).NumWalkIns == 0) { + if (this->NumWalkIns == 0) { // rack report variables for condenser heat to Zone and/or HVAC // The difference between TotalHeatRejectedToZone and TotalRackDeliveredCapacity is the heat sent to return air RackSenCreditToZone = TotalCondenserHeat * (TotalHeatRejectedToZone / TotalRackDeliveredCapacity); @@ -9615,7 +9603,7 @@ namespace RefrigeratedCase { } // rack heat rejection to zone } - void ReportRackSystem(int const RackNum) + void RefrigRackData::ReportRackSystem(int const RackNum) { // SUBROUTINE INFORMATION: @@ -9630,37 +9618,37 @@ namespace RefrigeratedCase { Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; - RefrigRack(RackNum).RackCompressorPower = TotalCompressorPower; - RefrigRack(RackNum).RackElecConsumption = TotalCompressorPower * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).ActualCondenserFanPower = TotalCondenserFanPower; - RefrigRack(RackNum).CondenserFanConsumption = TotalCondenserFanPower * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).RackCapacity = TotalRackDeliveredCapacity; - RefrigRack(RackNum).RackCoolingEnergy = TotalRackDeliveredCapacity * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).RackCompressorCOP = CompressorCOPactual; - RefrigRack(RackNum).SensHVACCreditHeatRate = RackSenCreditToHVAC; - RefrigRack(RackNum).SensHVACCreditHeat = RackSenCreditToHVAC * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).SensZoneCreditHeatRate = RackSenCreditToZone; - RefrigRack(RackNum).SensZoneCreditHeat = RackSenCreditToZone * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).EvapWaterConsumpRate = TotalEvapWaterUseRate; - RefrigRack(RackNum).EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).ActualEvapPumpPower = TotalCondenserPumpPower; - RefrigRack(RackNum).EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).BasinHeaterPower = TotalBasinHeatPower; - RefrigRack(RackNum).BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * DataGlobals::SecInHour; - RefrigRack(RackNum).CondLoad = TotalCondenserHeat; - RefrigRack(RackNum).CondEnergy = TotalCondenserHeat * LocalTimeStep * DataGlobals::SecInHour; + this->RackCompressorPower = TotalCompressorPower; + this->RackElecConsumption = TotalCompressorPower * LocalTimeStep * DataGlobals::SecInHour; + this->ActualCondenserFanPower = TotalCondenserFanPower; + this->CondenserFanConsumption = TotalCondenserFanPower * LocalTimeStep * DataGlobals::SecInHour; + this->RackCapacity = TotalRackDeliveredCapacity; + this->RackCoolingEnergy = TotalRackDeliveredCapacity * LocalTimeStep * DataGlobals::SecInHour; + this->RackCompressorCOP = CompressorCOPactual; + this->SensHVACCreditHeatRate = RackSenCreditToHVAC; + this->SensHVACCreditHeat = RackSenCreditToHVAC * LocalTimeStep * DataGlobals::SecInHour; + this->SensZoneCreditHeatRate = RackSenCreditToZone; + this->SensZoneCreditHeat = RackSenCreditToZone * LocalTimeStep * DataGlobals::SecInHour; + this->EvapWaterConsumpRate = TotalEvapWaterUseRate; + this->EvapWaterConsumption = TotalEvapWaterUseRate * LocalTimeStep * DataGlobals::SecInHour; + this->ActualEvapPumpPower = TotalCondenserPumpPower; + this->EvapPumpConsumption = TotalCondenserPumpPower * LocalTimeStep * DataGlobals::SecInHour; + this->BasinHeaterPower = TotalBasinHeatPower; + this->BasinHeaterConsumption = TotalBasinHeatPower * LocalTimeStep * DataGlobals::SecInHour; + this->CondLoad = TotalCondenserHeat; + this->CondEnergy = TotalCondenserHeat * LocalTimeStep * DataGlobals::SecInHour; // Set total rack heat rejection used for heat reclaim. Do not allow heat reclaim on stand alone (indoor) display cases. - if (RefrigRack(RackNum).HeatRejectionLocation == LocationZone) { + if (this->HeatRejectionLocation == LocationZone) { DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = 0.0; } else { DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).AvailCapacity = TotalRackDeliveredCapacity * (1.0 + 1.0 / CompressorCOPactual); } // set water system demand request (if needed) - if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { - int DemandARRID = RefrigRack(RackNum).EvapWaterTankDemandARRID; - int RackTankID = RefrigRack(RackNum).EvapWaterSupTankID; - DataWater::WaterStorage(RackTankID).VdotRequestDemand(DemandARRID) = RefrigRack(RackNum).EvapWaterConsumpRate; + if (this->EvapWaterSupplyMode == WaterSupplyFromTank) { + int DemandARRID = this->EvapWaterTankDemandARRID; + int RackTankID = this->EvapWaterSupTankID; + DataWater::WaterStorage(RackTankID).VdotRequestDemand(DemandARRID) = this->EvapWaterConsumpRate; } SumZoneImpacts(); @@ -14184,7 +14172,7 @@ namespace RefrigeratedCase { for (int CoilIndex = 1; CoilIndex <= this->NumCoils; ++CoilIndex) { int CoilID = this->CoilNum(CoilIndex); - CalculateCoil(CoilID, RemainQZNReqSens); + WarehouseCoil(CoilID).CalculateCoil(RemainQZNReqSens); RemainQZNReqSens += WarehouseCoil(CoilID).SensCreditRate; // should be a negative minus a negative, so a smaller negative, that is, going toward zero, but senscoolingenergyrate expressed as // positive Need to go over all the coils so that the defrosts occur on schedule, even when the chiller isn't called for at that @@ -14273,9 +14261,7 @@ namespace RefrigeratedCase { } // DeRate == true } - void CalculateCoil(int const CoilID, - Real64 const QZnReq // sensible load required - ) + void WarehouseCoilData::CalculateCoil(Real64 const QZnReq) { // SUBROUTINE INFORMATION: @@ -14311,33 +14297,24 @@ namespace RefrigeratedCase { static std::string const TrackMessage("from RefrigeratedCase:CalculateCoil"); - // GET SCHEDULES - auto &warehouse_coil(WarehouseCoil(CoilID)); - - Real64 CoilSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.SchedPtr); // Current value of Coil operating (availability) schedule + Real64 CoilSchedule = ScheduleManager::GetCurrentScheduleValue(this->SchedPtr); // Current value of Coil operating (availability) schedule if (CoilSchedule <= 0.0) return; - Real64 DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostSchedPtr); // Coil defrost schedule, between 0 and 1 - Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.DefrostDripDownSchedPtr); // Coil drip-down schedule (allows coil to drain after defrost) + Real64 DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostSchedPtr); // Coil defrost schedule, between 0 and 1 + Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostDripDownSchedPtr); // Coil drip-down schedule (allows coil to drain after defrost) // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); // next value optional, so set to default before checking for schedule Real64 HeaterSchedule = 1.0; // zero to one - if (warehouse_coil.HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(warehouse_coil.HeaterSchedPtr); + if (this->HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(this->HeaterSchedPtr); // Set local subroutine variables for convenience - int ZoneNodeNum = warehouse_coil.ZoneNodeNum; // Zone node number - int SHRCorrectionType = warehouse_coil.SHRCorrectionType; // SHR60, QuadraticSHR, European, or TabularRH_DT1_TRoom - int SHRCorrectionCurvePtr = warehouse_coil.SHRCorrectionCurvePtr; - int FanSpeedControlType = warehouse_coil.FanType; - Real64 AirVolumeFlowRated = warehouse_coil.RatedAirVolumeFlow; // Coil rated air flow (m3/s) - Real64 FanPowerRated = warehouse_coil.RatedFanPower; // (W) - Real64 HeaterLoad = warehouse_coil.HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) - Real64 DefrostCap = warehouse_coil.DefrostCapacity; // Design defrost capacity of Coil (W) - Real64 TEvap = warehouse_coil.TEvapDesign; // Evaporating temperature in the coil (C) - Real64 SHRCorrection60 = warehouse_coil.SHRCorrection60; // Total capacity as a fraction of sensible capacity at a SHR of 0.6, entered by user - Real64 FanMinAirFlowRatio = warehouse_coil.FanMinAirFlowRatio; // From input - Real64 MaxTemperatureDif = warehouse_coil.MaxTemperatureDif; // Used to limit capacity during initial pulldown (deltaC) + int FanSpeedControlType = this->FanType; + Real64 AirVolumeFlowRated = this->RatedAirVolumeFlow; // Coil rated air flow (m3/s) + Real64 FanPowerRated = this->RatedFanPower; // (W) + Real64 HeaterLoad = this->HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) + Real64 DefrostCap = this->DefrostCapacity; // Design defrost capacity of Coil (W) + Real64 TEvap = this->TEvapDesign; // Evaporating temperature in the coil (C) Real64 CoilCapTotEstimate(0.0); // Part of loop to solve for total coil capacity as a function of inlet air conditions (W) Real64 AirVolumeFlowMax(0.0); // Coil air flow limited by drip down schedule (m3/s) @@ -14352,7 +14329,7 @@ namespace RefrigeratedCase { Real64 DryAirMassFlowMax(0.0); // Rated volume flow rate times dry air density adjusted for schedules (kg/s) Real64 FanPowerActual(0.0); // (W) Real64 FrostChangekg(0.0); // Amount of frost added or melted (kg) - Real64 LatLoadServed(0.0); // Energy rate used to remove water from zone air (W) + Real64 latLoadServed(0.0); // Energy rate used to remove water from zone air (W) Real64 SensLoadRequestedGross(0.0); // Gross sensible load removed by coil Real64 SensLoadGross(0.0); // Sensible load met by coil (W) Real64 SHR(0.0); // Sensible heat ratio, sensible load/total load @@ -14370,8 +14347,8 @@ namespace RefrigeratedCase { DryAirMassFlowMax = 0.0; } else { SensLoadRequestedGross = SensLoadRequested + HeaterLoad + FanPowerRated; - Real64 ZoneMixedAirDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; // (C) - Real64 ZoneMixedAirHumRatio = DataLoopNode::Node(ZoneNodeNum).HumRat; // kg water/kg air in the zone mixed air + Real64 ZoneMixedAirDryBulb = DataLoopNode::Node(this->ZoneNodeNum).Temp; // (C) + Real64 ZoneMixedAirHumRatio = DataLoopNode::Node(this->ZoneNodeNum).HumRat; // kg water/kg air in the zone mixed air Real64 ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, DataEnvironment::OutBaroPress, TrackMessage); // relative humidity of mixed air in the zone expressed as a fraction from 0 to 1 Real64 ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, DataEnvironment::OutBaroPress, TrackMessage); // J/kg Real64 ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); // kg/m3 @@ -14381,7 +14358,7 @@ namespace RefrigeratedCase { // later need to do for hottest/coolest in room where Tin /= Tzonemixed // calc RH inlet to coil assuming at middle/mixed point in room // calc coilcap, sens and latent, available as f(inlet T,RH) - switch (WarehouseCoil(CoilID).VerticalLocation) { + switch (this->VerticalLocation) { case Floor: // purposely fall through case Ceiling: @@ -14403,24 +14380,24 @@ namespace RefrigeratedCase { if (AirVolumeFlowMax > 0.0) { - Real64 TemperatureDif = min(MaxTemperatureDif, (CoilInletTemp - TEvap)); // difference between inlet air and evaporating temperature (deltaC) + Real64 TemperatureDif = min(this->MaxTemperatureDif, (CoilInletTemp - TEvap)); // difference between inlet air and evaporating temperature (deltaC) - if (warehouse_coil.RatingType == RatedCapacityTotal) { + if (this->RatingType == RatedCapacityTotal) { // RatingType = CapacityTotalSpecificConditions, will be doing a table lookup // based upon RHInlet, DT1, CoilInletTemperature - see excel files from B. Nelson, CoilCom // In the table, X1== inlet air dry bulb temperature // X2== Difference between inlet T and evap T // X3== RH expressed as decimal - CoilCapTotEstimate = CurveManager::CurveValue(SHRCorrectionCurvePtr, CoilInletTemp, TemperatureDif, CoilInletRHFrac) * - warehouse_coil.RatedCapTotal * (1.0 - DefrostDripDownSchedule) * CoilSchedule; + CoilCapTotEstimate = CurveManager::CurveValue(this->SHRCorrectionCurvePtr, CoilInletTemp, TemperatureDif, CoilInletRHFrac) * + this->RatedCapTotal * (1.0 - DefrostDripDownSchedule) * CoilSchedule; } else { // work with unit load factor (sensible only), function of DT1 (Tair in drybulb-Tevap) - Real64 SensibleCapacityMax = warehouse_coil.UnitLoadFactorSens * TemperatureDif * (1.0 - DefrostDripDownSchedule) * CoilSchedule; // Sensible capacity adjusted for any time in dripdown state (W) + Real64 SensibleCapacityMax = this->UnitLoadFactorSens * TemperatureDif * (1.0 - DefrostDripDownSchedule) * CoilSchedule; // Sensible capacity adjusted for any time in dripdown state (W) if (SensibleCapacityMax > 0.0) { Real64 ExitTemperatureEstimate = CoilInletTemp - (SensibleCapacityMax / (DryAirMassFlowMax * CoilInletDryAirCp)); // Estimated Air temperature leaving the coil (C) if (ExitTemperatureEstimate <= TEvap) { - ShowWarningError(TrackMessage + "Refrigeration:AirCoil: " + warehouse_coil.Name); + ShowWarningError(TrackMessage + "Refrigeration:AirCoil: " + this->Name); ShowContinueError(" The estimated air outlet temperature is less than the evaporating temperature."); } Real64 ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, DataEnvironment::OutBaroPress, TrackMessage); // Estimated Air enthalpy leaving the coil (J/kg) @@ -14440,14 +14417,14 @@ namespace RefrigeratedCase { } { - auto const SELECT_CASE_var(SHRCorrectionType); + auto const SELECT_CASE_var(this->SHRCorrectionType); if (SELECT_CASE_var == SHR60) { // line from y = SHRCorrection60 value to 1. as x(SHR) goes from .6 to 1, from B. Nelson, ASHRAE August 2010 - Real64 Slope = (SHRCorrection60 - 1.0) / (0.6 - 1.0); // Part of linear SHR60 correction factor, dimensionless - Real64 Yint = SHRCorrection60 - (Slope * 0.6); // Part of linear SHR60 correction factor, dimensionless + Real64 Slope = (this->SHRCorrection60 - 1.0) / (0.6 - 1.0); // Part of linear SHR60 correction factor, dimensionless + Real64 Yint = this->SHRCorrection60 - (Slope * 0.6); // Part of linear SHR60 correction factor, dimensionless SHRCorrection = Slope * SHR + Yint; } else if (SELECT_CASE_var == QuadraticSHR) { - SHRCorrection = CurveManager::CurveValue(SHRCorrectionCurvePtr, SHR); + SHRCorrection = CurveManager::CurveValue(this->SHRCorrectionCurvePtr, SHR); } else if (SELECT_CASE_var == European) { // With European ratings, either start with rated total sensible capacity or rated total capacity // If rated total capacity is used, 'get input' @@ -14489,18 +14466,18 @@ namespace RefrigeratedCase { Real64 ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); // kg water/kg air if (ExitHumRatio > CoilInletHumRatio) ExitHumRatio = CoilInletHumRatio; WaterRemovRate = DryAirMassFlowMax * (CoilInletHumRatio - ExitHumRatio); - LatLoadServed = WaterRemovRate * IcetoVaporEnthalpy; - SensLoadGross = CoilCapTotEstimate - LatLoadServed; + latLoadServed = WaterRemovRate * IcetoVaporEnthalpy; + SensLoadGross = CoilCapTotEstimate - latLoadServed; FanPowerActual = FanPowerRated; if (SensLoadGross < 0.0) { // Could rarely happen during initial cooldown of a warm environment SensLoadGross = 0.0; - LatLoadServed = CoilCapTotEstimate; - WaterRemovRate = LatLoadServed / IcetoVaporEnthalpy; + latLoadServed = CoilCapTotEstimate; + WaterRemovRate = latLoadServed / IcetoVaporEnthalpy; } // SensLoadGross < 0 } else { // NOT (SensibleCapacityMax > 0.0d0) WaterRemovRate = 0.0; - LatLoadServed = 0.0; + latLoadServed = 0.0; SensLoadGross = 0.0; FanPowerActual = 0.0; } //(CoilCapTotEstimate > 0.0d0) @@ -14510,7 +14487,7 @@ namespace RefrigeratedCase { // don't need full chiller power, reduce fan speed to reduce air flow // move fan to part power if need to Real64 CapFac = SensLoadRequestedGross / SensLoadGross; // used to reduce fan power when don't need full coil capacity - Real64 AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, EvaporatorAirVolExponent)); // used when operating at part load + Real64 AirVolRatio = max(this->FanMinAirFlowRatio, std::pow(CapFac, EvaporatorAirVolExponent)); // used when operating at part load // Fans limited by minimum air flow ratio { @@ -14537,13 +14514,13 @@ namespace RefrigeratedCase { // reduce latent capacity according to value called for for sensible - recalc latent. // recalc coilcaptotal WaterRemovRate *= AirVolRatio; - LatLoadServed = WaterRemovRate * IcetoVaporEnthalpy; + latLoadServed = WaterRemovRate * IcetoVaporEnthalpy; SensLoadGross = SensLoadRequestedGross; } else { // at full load FanPowerActual = FanPowerMax; } // part load and sensload served > 0. - CoilCapTotal = SensLoadGross + LatLoadServed; + CoilCapTotal = SensLoadGross + latLoadServed; if (CoilCapTotal > 0.0) { SHR = SensLoadGross / CoilCapTotal; } else { @@ -14555,13 +14532,13 @@ namespace RefrigeratedCase { // avoid accumulation during warm-up to avoid reverse dd test problem if (!DataGlobals::WarmupFlag) { FrostChangekg = (WaterRemovRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); - warehouse_coil.KgFrost += FrostChangekg; + this->KgFrost += FrostChangekg; } } else { // NOT (AirVolumeFlowMax > 0.0d0) CoilCapTotEstimate = 0.0; WaterRemovRate = 0.0; - LatLoadServed = 0.0; + latLoadServed = 0.0; FrostChangekg = 0.0; SensLoadGross = 0.0; FanPowerActual = 0.0; @@ -14572,30 +14549,29 @@ namespace RefrigeratedCase { // in starting IF are there to mimic temperature override // on the coils that stops defrost if the coils get above // a certain temperature (such as when there's no load and no ice) - if ((DefrostSchedule > 0.0) && (warehouse_coil.DefrostType != DefrostNone) && (warehouse_coil.DefrostType != DefrostOffCycle)) { + if ((DefrostSchedule > 0.0) && (this->DefrostType != DefrostNone) && (this->DefrostType != DefrostOffCycle)) { DefrostLoad = DefrostCap * DefrostSchedule; // Part of the defrost that is a heat load on the zone (W) Real64 DefrostEnergy = DefrostLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; // Joules - Real64 StartFrostKg = warehouse_coil.KgFrost; // frost load at start of time step (kg of ice) + Real64 StartFrostKg = this->KgFrost; // frost load at start of time step (kg of ice) - if (warehouse_coil.DefrostControlType == DefrostContTempTerm) { + if (this->DefrostControlType == DefrostContTempTerm) { // Need to turn defrost system off early if controlled by temperature and all ice melted // For temperature termination, need to recognize not all defrost heat goes to melt ice // Some goes to misc losses (for fluid defrost, some coil areas bare earlier than // others and xfer heat to environment) // Assume full ice melting satisfies temperature control. // (defaults for DefEnergyFraction are :=0.7 for elec, =0.3 for fluids) - Real64 DefEnergyFraction = warehouse_coil.DefEnergyFraction; // dimensionless - Real64 AvailDefrostEnergy = DefEnergyFraction * DefrostEnergy; // available to melt ice with temp term control (J) + Real64 AvailDefrostEnergy = this->DefEnergyFraction * DefrostEnergy; // available to melt ice with temp term control (J) Real64 IceSensHeatNeeded = 0.0; // Energy to raise frost temperature to 0C, used w/ temp termination (J) if (StartFrostKg > 0.0) { - if (warehouse_coil.IceTemp < 0.0) { - Real64 StartIceTemp = warehouse_coil.IceTemp; // Frost temperature at start of time step [C] + if (this->IceTemp < 0.0) { + Real64 StartIceTemp = this->IceTemp; // Frost temperature at start of time step [C] IceSensHeatNeeded = StartFrostKg * SpecificHeatIce * (0.0 - StartIceTemp); // Joules if (AvailDefrostEnergy >= IceSensHeatNeeded) { - warehouse_coil.IceTemp = 0.0; + this->IceTemp = 0.0; AvailDefrostEnergy -= IceSensHeatNeeded; // Joules } else { // DefrostEnergy < IceSensHeatNeeded - warehouse_coil.IceTemp = StartIceTemp + AvailDefrostEnergy / (SpecificHeatIce * StartFrostKg); + this->IceTemp = StartIceTemp + AvailDefrostEnergy / (SpecificHeatIce * StartFrostKg); AvailDefrostEnergy = 0.0; } // AvailDefrostEnergy >= IceSensHeatNeeded } // IceTemp < 0, need to raise temperature of ice @@ -14603,26 +14579,26 @@ namespace RefrigeratedCase { FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); if (FrostChangekg < StartFrostKg) { DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / DataGlobals::SecInHour; - if (!DataGlobals::WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; + if (!DataGlobals::WarmupFlag) this->KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed because ice not all melted, temp term not triggered } else { // all frost melted during time step, so need to terminate defrost // see Aug 8 2010 page 3 notes - warehouse_coil.KgFrost = 0.0; + this->KgFrost = 0.0; Real64 DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / - DefEnergyFraction; // Joules - energy needed including E unavail to melt ice + this->DefEnergyFraction; // Joules - energy needed including E unavail to melt ice DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour))); // reduce heat load on warehouse by energy put into ice melting // Defrost load that actually goes to melting ice (W) Real64 DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); DefrostLoad = max(0.0, (DefrostSchedule * DefrostCap - DefrostRateNeeded)); - warehouse_coil.IceTemp = warehouse_coil.TEvapDesign; + this->IceTemp = this->TEvapDesign; } // frost melted during time step less than amount of ice at start } else { // no frost present so terminate defrost and reset ice temperature for start of next defrost // However, dripdown schedule still prevents/limits cooling capacity during time step DefrostLoad = 0.0; DefrostSchedule = 0.0; - warehouse_coil.IceTemp = warehouse_coil.TEvapDesign; + this->IceTemp = this->TEvapDesign; } // have frost present } else { @@ -14631,7 +14607,7 @@ namespace RefrigeratedCase { // But DefrostSchedule not changed FrostChangekg = max(0.0, min((DefrostEnergy / IceMeltEnthalpy), StartFrostKg)); DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataHVACGlobals::TimeStepSys / DataGlobals::SecInHour; - if (!DataGlobals::WarmupFlag) warehouse_coil.KgFrost = StartFrostKg - FrostChangekg; + if (!DataGlobals::WarmupFlag) this->KgFrost = StartFrostKg - FrostChangekg; } // Temperature termination vs. time-clock control type } else { // DefrostSchedule <= 0 or have None or OffCycle @@ -14641,61 +14617,61 @@ namespace RefrigeratedCase { Real64 SensLoadFromZone = SensLoadGross - HeaterLoad - DefrostLoad - FanPowerActual; // Net sensible load removed from zone after accounting for heaters, fans, defrost [W] // ReportWarehouseCoil(CoilID) - warehouse_coil.ThermalDefrostPower = DefrostLoad; - if (warehouse_coil.DefrostType == DefrostElec) { - warehouse_coil.ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.ElecDefrostPower = DefrostCap * DefrostSchedule; + this->ThermalDefrostPower = DefrostLoad; + if (this->DefrostType == DefrostElec) { + this->ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->ElecDefrostPower = DefrostCap * DefrostSchedule; } else { - warehouse_coil.ElecDefrostConsumption = 0.0; - warehouse_coil.ElecDefrostPower = 0.0; + this->ElecDefrostConsumption = 0.0; + this->ElecDefrostPower = 0.0; } // If hot brine or hot gas is used for defrost, need to reduce condenser load by heat reclaimed for defrost - if (warehouse_coil.DefrostType == DefrostFluid) warehouse_coil.HotDefrostCondCredit = DefrostCap * DefrostSchedule; + if (this->DefrostType == DefrostFluid) this->HotDefrostCondCredit = DefrostCap * DefrostSchedule; // LatentLoadServed is positive for latent heat removed from zone // SensLoadFromZone positive for heat REMOVED from zone, switch when do credit to zone - warehouse_coil.SensCreditRate = SensLoadFromZone; - warehouse_coil.SensCreditEnergy = SensLoadFromZone * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.LatCreditRate = LatLoadServed; - warehouse_coil.LatCreditEnergy = LatLoadServed * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.LatKgPerS_ToZone = WaterRemovRate; - warehouse_coil.TotalCoolingLoad = CoilCapTotal; - warehouse_coil.TotalCoolingEnergy = CoilCapTotal * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.SensCoolingEnergyRate = SensLoadGross; - warehouse_coil.SensCoolingEnergy = SensLoadGross * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.SensHeatRatio = SHR; - warehouse_coil.ElecFanPower = FanPowerActual; - warehouse_coil.ElecFanConsumption = FanPowerActual * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.ElecHeaterPower = HeaterLoad; - warehouse_coil.ElecHeaterConsumption = HeaterLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - - warehouse_coil.TotalElecPower = FanPowerActual + HeaterLoad + warehouse_coil.ElecDefrostPower; - warehouse_coil.TotalElecConsumption = warehouse_coil.TotalElecPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - - if (warehouse_coil.SensCreditRate >= 0.0) { - warehouse_coil.ReportSensCoolCreditRate = warehouse_coil.SensCreditRate; - warehouse_coil.ReportHeatingCreditRate = 0.0; + this->SensCreditRate = SensLoadFromZone; + this->SensCreditEnergy = SensLoadFromZone * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->LatCreditRate = latLoadServed; + this->LatCreditEnergy = latLoadServed * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->LatKgPerS_ToZone = WaterRemovRate; + this->TotalCoolingLoad = CoilCapTotal; + this->TotalCoolingEnergy = CoilCapTotal * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->SensCoolingEnergyRate = SensLoadGross; + this->SensCoolingEnergy = SensLoadGross * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->SensHeatRatio = SHR; + this->ElecFanPower = FanPowerActual; + this->ElecFanConsumption = FanPowerActual * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->ElecHeaterPower = HeaterLoad; + this->ElecHeaterConsumption = HeaterLoad * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + + this->TotalElecPower = FanPowerActual + HeaterLoad + this->ElecDefrostPower; + this->TotalElecConsumption = this->TotalElecPower * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + + if (this->SensCreditRate >= 0.0) { + this->ReportSensCoolCreditRate = this->SensCreditRate; + this->ReportHeatingCreditRate = 0.0; } else { - warehouse_coil.ReportSensCoolCreditRate = 0.0; - warehouse_coil.ReportHeatingCreditRate = -warehouse_coil.SensCreditRate; + this->ReportSensCoolCreditRate = 0.0; + this->ReportHeatingCreditRate = -this->SensCreditRate; } - warehouse_coil.ReportSensCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.ReportHeatingCreditEnergy = warehouse_coil.ReportHeatingCreditRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - warehouse_coil.ReportTotalCoolCreditRate = warehouse_coil.ReportSensCoolCreditRate + warehouse_coil.LatCreditRate; - warehouse_coil.ReportTotalCoolCreditEnergy = warehouse_coil.ReportSensCoolCreditEnergy + warehouse_coil.LatCreditEnergy; + this->ReportSensCoolCreditEnergy = this->ReportSensCoolCreditRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->ReportHeatingCreditEnergy = this->ReportHeatingCreditRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + this->ReportTotalCoolCreditRate = this->ReportSensCoolCreditRate + this->LatCreditRate; + this->ReportTotalCoolCreditEnergy = this->ReportSensCoolCreditEnergy + this->LatCreditEnergy; //************************************************************************************************** // Cap Kg Frost to avoid floating overflow errors // 1-time warning is issued. It should be rare but could happen with unrealistic inputs. - if (warehouse_coil.KgFrost > MyLargeNumber) { - warehouse_coil.KgFrost = MyLargeNumber; - if (ShowCoilFrostWarning(CoilID)) { - ShowWarningError("Refrigeration:AirCoil: " + warehouse_coil.Name); + if (this->KgFrost > MyLargeNumber) { + this->KgFrost = MyLargeNumber; + if (this->ShowCoilFrostWarning) { + ShowWarningError("Refrigeration:AirCoil: " + this->Name); ShowContinueError(" This refrigerated air coil has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(" Check the defrost schedule or defrost capacity. "); ShowContinueErrorTimeStamp("... Occurrence info"); - ShowCoilFrostWarning(CoilID) = false; + this->ShowCoilFrostWarning = false; } } } diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index e027afda2e8..6497041e9c9 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -315,6 +315,7 @@ namespace RefrigeratedCase { Real64 InletTempMin; // Minimum condenser water inlet temperature (C) Real64 OutletTempMax; // Maximum condenser water outlet temperature (C) Real64 TotalCoolingLoad; + bool ShowCOPWarning; // Default Constructor RefrigRackData() @@ -330,7 +331,7 @@ namespace RefrigeratedCase { NoFlowWarnIndex(0), HighTempWarnIndex(0), LowTempWarnIndex(0), HighFlowWarnIndex(0), HighInletWarnIndex(0), InletNode(0), InletTemp(0.0), OutletNode(0), PlantTypeOfNum(0), PlantLoopNum(0), PlantLoopSideNum(0), PlantBranchNum(0), PlantCompNum(0), OutletTemp(0.0), OutletTempSchedPtr(0), VolFlowRate(0.0), DesVolFlowRate(0.0), MassFlowRate(0.0), CondLoad(0.0), CondEnergy(0.0), - FlowType(1), VolFlowRateMax(0.0), MassFlowRateMax(0.0), InletTempMin(10.0), OutletTempMax(55.0), TotalCoolingLoad(0.0) + FlowType(1), VolFlowRateMax(0.0), MassFlowRateMax(0.0), InletTempMin(10.0), OutletTempMax(55.0), TotalCoolingLoad(0.0), ShowCOPWarning(true) { } @@ -351,6 +352,10 @@ namespace RefrigeratedCase { ActualCondenserFanPower = 0.0; ActualEvapPumpPower = 0.0; } + + void CalcRackSystem(); + + void ReportRackSystem(int RackNum); }; struct RefrigSystemData @@ -1259,8 +1264,6 @@ namespace RefrigeratedCase { int DefrostType; // Coil defrost type, Hot-gas,Electric, Hot-brine int FanType; // Index to coil fan type (fixed, two-speed, etc.) int HeaterSchedPtr; // Index to the correct availability schedule - // INTEGER :: NodeNumInlet=0 ! Node number for inlet to coil - // INTEGER :: NodeNumOutlet=0 ! Node number for outlet from coil int NumSysAttach; // Number of refrigerating systems cooling this coil (error check purpose) int RatingType; // Indicates which type of manufacturer's rating is used int SchedPtr; // Index to the correct availability schedule @@ -1325,8 +1328,8 @@ namespace RefrigeratedCase { Real64 TotalCoolingLoad; // Gross total cooling rate (W) Real64 TotalCoolingEnergy; // Gross total cooling energy (J) Real64 TotalElecPower; // Coil total electric - // (fans, heaters, and elec defrost) rate (W) Real64 TotalElecConsumption; // Coil total electric energy (J) + bool ShowCoilFrostWarning; // Default Constructor WarehouseCoilData() @@ -1342,7 +1345,7 @@ namespace RefrigeratedCase { LatKgPerS_ToZone(0.0), LatCreditEnergy(0.0), ReportSensCoolCreditRate(0.0), ReportHeatingCreditRate(0.0), ReportSensCoolCreditEnergy(0.0), ReportHeatingCreditEnergy(0.0), ReportTotalCoolCreditRate(0.0), ReportTotalCoolCreditEnergy(0.0), SensCreditRate(0.0), SensCreditEnergy(0.0), SensCoolingEnergyRate(0.0), SensCoolingEnergy(0.0), TotalCoolingLoad(0.0), - TotalCoolingEnergy(0.0), TotalElecPower(0.0), TotalElecConsumption(0.0) + TotalCoolingEnergy(0.0), TotalElecPower(0.0), TotalElecConsumption(0.0), ShowCoilFrostWarning(true) { } @@ -1374,6 +1377,8 @@ namespace RefrigeratedCase { ReportSensCoolCreditEnergy = 0.0; ReportHeatingCreditEnergy = 0.0; } + + void CalculateCoil(Real64 QZnReq); }; struct AirChillerSetData @@ -1481,10 +1486,6 @@ namespace RefrigeratedCase { void InitRefrigerationPlantConnections(); - void CalcRackSystem(int RackNum); - - void ReportRackSystem(int RackNum); - void CalculateCase(int CaseID); // Absolute pointer to refrigerated case void SimRefrigCondenser(int SysType, std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); @@ -1539,10 +1540,6 @@ namespace RefrigeratedCase { Real64 AvailableTotalLoad // Load that system or secondary loop is able to serve [W] ); - void CalculateCoil(int CoilID, - Real64 QZnReq // sensible load required - ); - void FigureRefrigerationZoneGains(); void ZeroHVACValues(); From b5bae6209607d9ec4ca352085b0a34001b9148fc Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 3 Jan 2020 16:05:45 -0700 Subject: [PATCH 60/86] step 10 - partial functions to members --- src/EnergyPlus/RefrigeratedCase.cc | 516 ++++++++++++++--------------- src/EnergyPlus/RefrigeratedCase.hh | 17 +- 2 files changed, 251 insertions(+), 282 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 1e844015c35..223bf284878 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -350,13 +350,6 @@ namespace RefrigeratedCase { Real64 CaseRAFactor(0.0); // Factor determining case credit allocation (e.g. % to zone or HVAC) Array1D_bool ShowStockingWarning; // Used for one-time warning message for possible case // input error regarding stocking - Array1D_bool ShowFrostWarning; // Used for one-time warning message for possible case - // input error regarding frost - Array1D_bool ShowStoreEnergyWarning; // Used for one-time warning message for possible case - // input error regarding defrost or stocking - // Walk In variables - Array1D_bool ShowUnmetWIEnergyWarning; // Used for one-time warning message - Array1D_bool ShowWIFrostWarning; // Used for one-time warning message // Refrigeration compressor rack variables Real64 TotalRackDeliveredCapacity(0.0); // Total capacity of all refrigerated cases attached to rack (W) @@ -462,10 +455,6 @@ namespace RefrigeratedCase { CaseRAFactor = 0.0; ShowStockingWarning.deallocate(); - ShowFrostWarning.deallocate(); - ShowStoreEnergyWarning.deallocate(); - ShowUnmetWIEnergyWarning.deallocate(); - ShowWIFrostWarning.deallocate(); TotalRackDeliveredCapacity = 0.0; TotalCompressorPower = 0.0; @@ -746,13 +735,9 @@ namespace RefrigeratedCase { CaseRAFraction.allocate(DataGlobals::NumOfZones); RefrigCase.allocate(NumSimulationCases); ShowStockingWarning.dimension(NumSimulationCases, true); - ShowFrostWarning.dimension(NumSimulationCases, true); - ShowStoreEnergyWarning.dimension(NumSimulationCases, true); } if (NumSimulationWalkIns > 0) { WalkIn.allocate(NumSimulationWalkIns); - ShowUnmetWIEnergyWarning.dimension(NumSimulationWalkIns, true); - ShowWIFrostWarning.dimension(NumSimulationWalkIns, true); } if ((NumSimulationWalkIns > 0) || (NumSimulationCases > 0)) { CaseWIZoneReport.allocate(DataGlobals::NumOfZones); @@ -9425,7 +9410,7 @@ namespace RefrigeratedCase { if (this->NumCases > 0) { for (int caseNum = 1; caseNum <= this->NumCases; ++caseNum) { int CaseID = this->CaseNum(caseNum); - CalculateCase(CaseID); + RefrigCase(CaseID).CalculateCase(); // add evaporator load for all cases connected to rack TotalRackDeliveredCapacity += RefrigCase(CaseID).TotalCoolingLoad; @@ -9453,7 +9438,7 @@ namespace RefrigeratedCase { if (this->NumWalkIns > 0) { for (int WalkInIndex = 1; WalkInIndex <= this->NumWalkIns; ++WalkInIndex) { int WalkInID = this->WalkInNum(WalkInIndex); - CalculateWalkIn(WalkInID); + WalkIn(WalkInID).CalculateWalkIn(); TotalRackDeliveredCapacity += WalkIn(WalkInID).TotalCoolingLoad; if (this->HeatRejectionLocation == LocationZone) { TotalHeatRejectedToZone += WalkIn(WalkInID).TotalCoolingLoad; @@ -9654,7 +9639,7 @@ namespace RefrigeratedCase { SumZoneImpacts(); } - void CalculateCase(int const CaseID) // Absolute pointer to refrigerated case + void RefrigCaseData::CalculateCase() // Absolute pointer to refrigerated case { // SUBROUTINE INFORMATION: @@ -9719,38 +9704,25 @@ namespace RefrigeratedCase { CaseRAFactor = 0.0; - // Set local subroutine variables for convenience - int ActualZoneNum = RefrigCase(CaseID).ActualZoneNum; - int ZoneNodeNum = RefrigCase(CaseID).ZoneNodeNum; - // Zone relative humidity (%) - Real64 ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; + Real64 ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(this->ZoneNodeNum).Temp, DataLoopNode::Node(this->ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; // Zone dew point (C) - Real64 ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); - Real64 Length = RefrigCase(CaseID).Length; + Real64 ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(this->ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); // Display case operating temperature - Real64 TCase = RefrigCase(CaseID).Temperature; - Real64 DesignRatedCap = RefrigCase(CaseID).DesignRatedCap; - Real64 DesignLatentCap = RefrigCase(CaseID).DesignLatentCap; - Real64 DesignDefrostCap = RefrigCase(CaseID).DesignDefrostCap; - Real64 DesignLighting = RefrigCase(CaseID).DesignLighting; - int DefCapCurvePtr = RefrigCase(CaseID).DefCapCurvePtr; - int DefrostEnergyCurveType = RefrigCase(CaseID).DefrostEnergyCurveType; - int DefrostType = RefrigCase(CaseID).DefrostType; - Real64 RatedAmbientRH = RefrigCase(CaseID).RatedAmbientRH; + Real64 TCase = this->Temperature; // GET ALL SCHEDULES (note all schedules can be fractions if on/off a portion of time step) // case schedule should be coincident with the zone time step otherwise the simulation proceeds // Current value of case operating (availability) schedule - Real64 CaseSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).SchedPtr); + Real64 CaseSchedule = ScheduleManager::GetCurrentScheduleValue(this->SchedPtr); if (CaseSchedule <= 0) return; // get defrost schedule - if (DefrostType > DefNone) { - DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).DefrostSchedPtr); - DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).DefrostDripDownSchedPtr); + if (this->DefrostType > DefNone) { + DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostSchedPtr); + DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostDripDownSchedPtr); // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); } else { @@ -9761,68 +9733,68 @@ namespace RefrigeratedCase { Real64 StockingSchedule(0.0); // Current value of product stocking schedule (W/m) // get product stocking schedule and load due to product stocking, if no schedule exists load is 0 - if (RefrigCase(CaseID).StockingSchedPtr > 0) { - StockingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).StockingSchedPtr); + if (this->StockingSchedPtr > 0) { + StockingSchedule = ScheduleManager::GetCurrentScheduleValue(this->StockingSchedPtr); } else { StockingSchedule = 0.0; } // get lighting schedule and total load due to lighting - Real64 LightingSchedule = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).LightingSchedPtr); + Real64 LightingSchedule = ScheduleManager::GetCurrentScheduleValue(this->LightingSchedPtr); // if case credit reduction fraction schedule exists, modify both sensible and latent case credits // according to schedule - used to account for variable case envelope, such as night covers. - if (RefrigCase(CaseID).CaseCreditFracSchedPtr != 0) { - CaseCreditFraction = ScheduleManager::GetCurrentScheduleValue(RefrigCase(CaseID).CaseCreditFracSchedPtr); + if (this->CaseCreditFracSchedPtr != 0) { + CaseCreditFraction = ScheduleManager::GetCurrentScheduleValue(this->CaseCreditFracSchedPtr); } else { CaseCreditFraction = 1.0; } // CALCULATE AUX LOADS DUE TO LIGHTS, FAN AND STOCKING - TotalLightingLoad = DesignLighting * LightingSchedule; + TotalLightingLoad = this->DesignLighting * LightingSchedule; // Lighting energy to case - Real64 TotalLightToCase = TotalLightingLoad * RefrigCase(CaseID).LightingFractionToCase; + Real64 TotalLightToCase = TotalLightingLoad * this->LightingFractionToCase; // Lighting energy to zone Real64 TotalLightToZone = TotalLightingLoad - TotalLightToCase; // cycle fan according to defrost schedule // turn fan on for none or off-cycle defrost types - if (DefrostType == DefNone || DefrostType == DefOffCycle) { - TotalFan = RefrigCase(CaseID).DesignFanPower; + if (this->DefrostType == DefNone || this->DefrostType == DefOffCycle) { + TotalFan = this->DesignFanPower; } else { - TotalFan = RefrigCase(CaseID).DesignFanPower * (1.0 - DefrostDripDownSchedule); + TotalFan = this->DesignFanPower * (1.0 - DefrostDripDownSchedule); } // get load due to product stocking // accumulate stocking loads for reporting to help evaluate any cumulative unmet loads problems // only accumulate energy during actual simulation (so same if DD's are switched) // Total load due to stocking case product (W) - Real64 StockingLoad = StockingSchedule * Length; + Real64 StockingLoad = StockingSchedule * this->Length; if (!DataGlobals::WarmupFlag) { Real64 DeltaStockingEnergy = (StockingLoad * DataGlobals::TimeStepZoneSec); - RefrigCase(CaseID).StockingEnergy += DeltaStockingEnergy; + this->StockingEnergy += DeltaStockingEnergy; } // warm up // CALCULTE ALL LOADS INFLUENCED BY ZONE TEMPERATURE AND RH // Anti-sweat heater capacity { - auto const SELECT_CASE_var(RefrigCase(CaseID).AntiSweatControlType); + auto const SELECT_CASE_var(this->AntiSweatControlType); if (SELECT_CASE_var == ASNone) { TotalAntiSweat = 0.0; } else if (SELECT_CASE_var == ASConstant) { - TotalAntiSweat = RefrigCase(CaseID).AntiSweatPower; + TotalAntiSweat = this->AntiSweatPower; } else if (SELECT_CASE_var == ASLinear) { - TotalAntiSweat = RefrigCase(CaseID).AntiSweatPower * - min(1.0, max(0.0, 1.0 - (RatedAmbientRH - ZoneRHPercent) / (RatedAmbientRH - RefrigCase(CaseID).HumAtZeroAS))); - TotalAntiSweat = max(RefrigCase(CaseID).MinimumASPower, TotalAntiSweat); + TotalAntiSweat = this->AntiSweatPower * + min(1.0, max(0.0, 1.0 - (this->RatedAmbientRH - ZoneRHPercent) / (this->RatedAmbientRH - this->HumAtZeroAS))); + TotalAntiSweat = max(this->MinimumASPower, TotalAntiSweat); } else if (SELECT_CASE_var == ASDewPoint) { - TotalAntiSweat = RefrigCase(CaseID).AntiSweatPower * - min(1.0, max(0.0, (ZoneDewPoint - TCase) / (RefrigCase(CaseID).RatedAmbientDewPoint - TCase))); - TotalAntiSweat = max(RefrigCase(CaseID).MinimumASPower, TotalAntiSweat); + TotalAntiSweat = this->AntiSweatPower * + min(1.0, max(0.0, (ZoneDewPoint - TCase) / (this->RatedAmbientDewPoint - TCase))); + TotalAntiSweat = max(this->MinimumASPower, TotalAntiSweat); } else if (SELECT_CASE_var == ASHeatBalance) { - if (RefrigCase(CaseID).Rcase > 0.0) { - TotalAntiSweat = (((ZoneDewPoint - DataLoopNode::Node(ZoneNodeNum).Temp) * RefrigCase(CaseID).Height / Rair) + - ((ZoneDewPoint - TCase) * RefrigCase(CaseID).Height / RefrigCase(CaseID).Rcase)); - TotalAntiSweat = min(RefrigCase(CaseID).AntiSweatPower, max(RefrigCase(CaseID).MinimumASPower, TotalAntiSweat)); + if (this->Rcase > 0.0) { + TotalAntiSweat = (((ZoneDewPoint - DataLoopNode::Node(this->ZoneNodeNum).Temp) * this->Height / Rair) + + ((ZoneDewPoint - TCase) * this->Height / this->Rcase)); + TotalAntiSweat = min(this->AntiSweatPower, max(this->MinimumASPower, TotalAntiSweat)); } else { TotalAntiSweat = 0.0; } @@ -9831,24 +9803,24 @@ namespace RefrigeratedCase { TotalAntiSweat = 0.0; } } - TotalAntiSweat *= Length; + TotalAntiSweat *= this->Length; // Anti-sweat heater energy to case - Real64 TotalASHeaterToCase = RefrigCase(CaseID).ASHeaterFractionToCase * TotalAntiSweat; + Real64 TotalASHeaterToCase = this->ASHeaterFractionToCase * TotalAntiSweat; // Anti-sweat heater energy to zone Real64 TotalASHeaterToZone = TotalAntiSweat - TotalASHeaterToCase; // latent capacity correction term at off-design conditions { - auto const SELECT_CASE_var(RefrigCase(CaseID).LatentEnergyCurveType); + auto const SELECT_CASE_var(this->LatentEnergyCurveType); if (SELECT_CASE_var == CaseTemperatureMethod) { - Real64 LatCapModFrac = CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, TCase); - LatentRatio = max(0.0, (1.0 - (RatedAmbientRH - ZoneRHPercent) * LatCapModFrac)); + Real64 LatCapModFrac = CurveManager::CurveValue(this->LatCapCurvePtr, TCase); + LatentRatio = max(0.0, (1.0 - (this->RatedAmbientRH - ZoneRHPercent) * LatCapModFrac)); } else if (SELECT_CASE_var == RHCubic) { - LatentRatio = max(0.0, CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneRHPercent)); + LatentRatio = max(0.0, CurveManager::CurveValue(this->LatCapCurvePtr, ZoneRHPercent)); } else if (SELECT_CASE_var == DPCubic) { - LatentRatio = max(0.0, CurveManager::CurveValue(RefrigCase(CaseID).LatCapCurvePtr, ZoneDewPoint)); + LatentRatio = max(0.0, CurveManager::CurveValue(this->LatCapCurvePtr, ZoneDewPoint)); } } @@ -9857,7 +9829,7 @@ namespace RefrigeratedCase { // but latent credits/load and capacity only applied outside dripdownschedule // Latent load placed on case at actual zone conditions (W) - Real64 LatentLoad = DesignLatentCap * LatentRatio * CaseCreditFraction * (1.0 - DefrostDripDownSchedule); + Real64 LatentLoad = this->DesignLatentCap * LatentRatio * CaseCreditFraction * (1.0 - DefrostDripDownSchedule); LatentCaseCredit = -LatentLoad; // adjust sensible loads and case credit for actual zone temperature // If zone temp rises above rated ambient temperature, total load can exceed case design capacity, @@ -9865,8 +9837,8 @@ namespace RefrigeratedCase { // extra insulation, e.g. night covers, or imitating a better insulated walk-in cooler) // used to look at extra sensible load due to excursions in zone T - Real64 ZoneTempFactor = (DataLoopNode::Node(ZoneNodeNum).Temp - TCase) / (RefrigCase(CaseID).RatedAmbientTemp - TCase); - SensibleLoadPrime = RefrigCase(CaseID).DesignSensCaseCredit * ZoneTempFactor * CaseCreditFraction; + Real64 ZoneTempFactor = (DataLoopNode::Node(ZoneNodeNum).Temp - TCase) / (this->RatedAmbientTemp - TCase); + SensibleLoadPrime = this->DesignSensCaseCredit * ZoneTempFactor * CaseCreditFraction; // Sensible load due to heaters, lighting (W) Real64 SensibleLoadAux = TotalLightToCase + TotalASHeaterToCase + TotalFan + StockingLoad; @@ -9882,29 +9854,29 @@ namespace RefrigeratedCase { // avoid accumulation during warm-up to avoid reverse dd test problem if (!DataGlobals::WarmupFlag) { Real64 DeltaFreezeKgFrost = LatentLoad * DataGlobals::TimeStepZoneSec / IcetoVaporEnthalpy; - RefrigCase(CaseID).KgFrost += DeltaFreezeKgFrost; + this->KgFrost += DeltaFreezeKgFrost; } - if (TCase > TempTooHotToFrost) RefrigCase(CaseID).KgFrost = 0.0; + if (TCase > TempTooHotToFrost) this->KgFrost = 0.0; Real64 DefrostLoad_Actual(0.0); // heat load on case due to defrost (W) Real64 DefrostCap_Actual(0.0); // power used to defrost (W) // DEFROST CALCULATIONS if (DefrostSchedule > 0.0) { - if (DefrostType != DefNone && DefrostType != DefOffCycle) { - DefrostCap_Actual = DesignDefrostCap * DefrostSchedule; - if (DefrostType == DefElectricTerm || DefrostType == DefHotFluidTerm) { + if (this->DefrostType != DefNone && this->DefrostType != DefOffCycle) { + DefrostCap_Actual = this->DesignDefrostCap * DefrostSchedule; + if (this->DefrostType == DefElectricTerm || this->DefrostType == DefHotFluidTerm) { // calculate correction term for temperature termination defrost control { - auto const SELECT_CASE_var(DefrostEnergyCurveType); + auto const SELECT_CASE_var(this->DefrostEnergyCurveType); if (SELECT_CASE_var == CaseTemperatureMethod) { - Real64 DefCapModFrac = CurveManager::CurveValue(DefCapCurvePtr, TCase); - DefrostRatio = max(0.0, (1.0 - (RatedAmbientRH - ZoneRHPercent) * DefCapModFrac)); + Real64 DefCapModFrac = CurveManager::CurveValue(this->DefCapCurvePtr, TCase); + DefrostRatio = max(0.0, (1.0 - (this->RatedAmbientRH - ZoneRHPercent) * DefCapModFrac)); } else if (SELECT_CASE_var == RHCubic) { - DefrostRatio = max(0.0, CurveManager::CurveValue(DefCapCurvePtr, ZoneRHPercent)); + DefrostRatio = max(0.0, CurveManager::CurveValue(this->DefCapCurvePtr, ZoneRHPercent)); } else if (SELECT_CASE_var == DPCubic) { - DefrostRatio = max(0.0, CurveManager::CurveValue(DefCapCurvePtr, ZoneDewPoint)); + DefrostRatio = max(0.0, CurveManager::CurveValue(this->DefCapCurvePtr, ZoneDewPoint)); } else if (SELECT_CASE_var == None) { DefrostRatio = 1.0; } @@ -9913,14 +9885,14 @@ namespace RefrigeratedCase { } // frost load at start of time step (kg of ice) - Real64 StartFrostKg = RefrigCase(CaseID).KgFrost; + Real64 StartFrostKg = this->KgFrost; // Energy form of defrost capacity (J) Real64 DefrostEnergy = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; // Frost melted by defrost during a time step (kg) Real64 FrostMeltedKg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); - RefrigCase(CaseID).KgFrost -= FrostMeltedKg; + this->KgFrost -= FrostMeltedKg; // Reduce defrost heat load on case by amount of ice melted during time step // However, don't reduce the defrost capacity applied @@ -9930,17 +9902,17 @@ namespace RefrigeratedCase { if (!DataGlobals::WarmupFlag) { // avoid reverse dd test problems // keep running total of defrost energy above that needed to melt frost for use in evaluating // problems of excessive unmet loads - RefrigCase(CaseID).DeltaDefrostEnergy = max(0.0, (DefrostEnergy - (FrostMeltedKg * IceMeltEnthalpy))); - RefrigCase(CaseID).DefrostEnergy += RefrigCase(CaseID).DeltaDefrostEnergy; + this->DeltaDefrostEnergy = max(0.0, (DefrostEnergy - (FrostMeltedKg * IceMeltEnthalpy))); + this->DefrostEnergy += this->DeltaDefrostEnergy; } // If hot brine or hot gas is used for defrost, need to reduce condenser load // Note this condenser credit is not applied in compressor-rack systems. - if (DefrostType != DefElectric && DefrostType != DefElectricOnDemand && DefrostType != DefElectricTerm) - RefrigCase(CaseID).HotDefrostCondCredit = DefrostCap_Actual * DefrostSchedule; + if (this->DefrostType != DefElectric && this->DefrostType != DefElectricOnDemand && this->DefrostType != DefElectricTerm) + this->HotDefrostCondCredit = DefrostCap_Actual * DefrostSchedule; } else { // no defrost or off-cycle defrost DefrostCap_Actual = 0.0; DefrostLoad_Actual = 0.0; - RefrigCase(CaseID).KgFrost = 0.0; + this->KgFrost = 0.0; // Off-Cycle defrost is assumed to melt all the ice } // defrost type @@ -9954,29 +9926,29 @@ namespace RefrigeratedCase { Real64 TotalLoad_Actual = SensibleLoadTotal + LatentLoad + DefrostLoad_Actual; // Rate needed to serve all stored energy during single time step (W) - Real64 StoredEnergyRate = RefrigCase(CaseID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; + Real64 StoredEnergyRate = this->StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; Real64 LoadRequested = TotalLoad_Actual + StoredEnergyRate; // prorate available cooling capacity for portion of time off due to drip down. - Real64 CapAvail = DesignRatedCap * (1.0 - DefrostDripDownSchedule); + Real64 CapAvail = this->DesignRatedCap * (1.0 - DefrostDripDownSchedule); if (CapAvail >= LoadRequested) { // Have more at least as much capacity available as needed, even counting stored energy TotalCap_Actual = LoadRequested; SensibleCap_Actual = SensibleLoadTotal + StoredEnergyRate; LatentCap_Actual = LatentLoad; - RefrigCase(CaseID).StoredEnergy = 0.0; + this->StoredEnergy = 0.0; } else { // Don't have as much capacity as needed (during dripdown or period following dripdown) TotalCap_Actual = CapAvail; LatentCap_Actual = min(LatentLoad, CapAvail); // Latent load should never be > capavail, but just in case... SensibleCap_Actual = TotalCap_Actual - LatentCap_Actual; - if (!DataGlobals::WarmupFlag) RefrigCase(CaseID).StoredEnergy += (TotalLoad_Actual - CapAvail) * DataGlobals::TimeStepZoneSec; + if (!DataGlobals::WarmupFlag) this->StoredEnergy += (TotalLoad_Actual - CapAvail) * DataGlobals::TimeStepZoneSec; } // CapAvail vs Load requested // Reset DefrostLoad_Actual to zero for non-electric defrost types, for reporting purposes - if (DefrostType != DefElectric && DefrostType != DefElectricOnDemand && DefrostType != DefElectricTerm) DefrostCap_Actual = 0.0; + if (this->DefrostType != DefElectric && this->DefrostType != DefElectricOnDemand && this->DefrostType != DefElectricTerm) DefrostCap_Actual = 0.0; - Real64 caseRAFraction = min(0.8, RefrigCase(CaseID).RAFrac); + Real64 caseRAFraction = min(0.8, this->RAFrac); CaseRAFactor = (1.0 - ((0.8 - caseRAFraction) / 0.8)) * 0.5; // Update globals for use in ZoneTemperaturePredictorCorrector (Air Heat Balance) and @@ -9997,66 +9969,66 @@ namespace RefrigeratedCase { // Amount of latent case credit applied to HVAC RA duct (W) Real64 CaseLatCreditToHVAC = LatentCaseCredit * CaseRAFactor; - DataHeatBalance::RefrigCaseCredit(ActualZoneNum).SenCaseCreditToZone += CaseSenCreditToZone; - DataHeatBalance::RefrigCaseCredit(ActualZoneNum).LatCaseCreditToZone += CaseLatCreditToZone; - DataHeatBalance::RefrigCaseCredit(ActualZoneNum).SenCaseCreditToHVAC += CaseSenCreditToHVAC; - DataHeatBalance::RefrigCaseCredit(ActualZoneNum).LatCaseCreditToHVAC += CaseLatCreditToHVAC; + DataHeatBalance::RefrigCaseCredit(this->ActualZoneNum).SenCaseCreditToZone += CaseSenCreditToZone; + DataHeatBalance::RefrigCaseCredit(this->ActualZoneNum).LatCaseCreditToZone += CaseLatCreditToZone; + DataHeatBalance::RefrigCaseCredit(this->ActualZoneNum).SenCaseCreditToHVAC += CaseSenCreditToHVAC; + DataHeatBalance::RefrigCaseCredit(this->ActualZoneNum).LatCaseCreditToHVAC += CaseLatCreditToHVAC; // ReportRefrigeratedCase(CaseID) - RefrigCase(CaseID).TotalCoolingLoad = TotalCap_Actual; - RefrigCase(CaseID).TotalCoolingEnergy = TotalCap_Actual * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).SensCoolingEnergyRate = SensibleCap_Actual; - RefrigCase(CaseID).SensCoolingEnergy = SensibleCap_Actual * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).LatCoolingEnergyRate = LatentCap_Actual; - RefrigCase(CaseID).LatCoolingEnergy = LatentCap_Actual * DataGlobals::TimeStepZoneSec; - - RefrigCase(CaseID).SensZoneCreditRate = CaseSenCreditToZone; // both positive or negative + this->TotalCoolingLoad = TotalCap_Actual; + this->TotalCoolingEnergy = TotalCap_Actual * DataGlobals::TimeStepZoneSec; + this->SensCoolingEnergyRate = SensibleCap_Actual; + this->SensCoolingEnergy = SensibleCap_Actual * DataGlobals::TimeStepZoneSec; + this->LatCoolingEnergyRate = LatentCap_Actual; + this->LatCoolingEnergy = LatentCap_Actual * DataGlobals::TimeStepZoneSec; + + this->SensZoneCreditRate = CaseSenCreditToZone; // both positive or negative // This rate can be positive or negative, split into separate output variables and always report positive value if (CaseSenCreditToZone <= 0.0) { - RefrigCase(CaseID).SensZoneCreditCoolRate = -CaseSenCreditToZone; - RefrigCase(CaseID).SensZoneCreditCool = -CaseSenCreditToZone * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).SensZoneCreditHeatRate = 0.0; - RefrigCase(CaseID).SensZoneCreditHeat = 0.0; + this->SensZoneCreditCoolRate = -CaseSenCreditToZone; + this->SensZoneCreditCool = -CaseSenCreditToZone * DataGlobals::TimeStepZoneSec; + this->SensZoneCreditHeatRate = 0.0; + this->SensZoneCreditHeat = 0.0; } else { - RefrigCase(CaseID).SensZoneCreditHeatRate = CaseSenCreditToZone; - RefrigCase(CaseID).SensZoneCreditHeat = CaseSenCreditToZone * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).SensZoneCreditCoolRate = 0.0; - RefrigCase(CaseID).SensZoneCreditCool = 0.0; + this->SensZoneCreditHeatRate = CaseSenCreditToZone; + this->SensZoneCreditHeat = CaseSenCreditToZone * DataGlobals::TimeStepZoneSec; + this->SensZoneCreditCoolRate = 0.0; + this->SensZoneCreditCool = 0.0; } // This rate should always be negative - RefrigCase(CaseID).LatZoneCreditRate = CaseLatCreditToZone; - RefrigCase(CaseID).LatZoneCredit = CaseLatCreditToZone * DataGlobals::TimeStepZoneSec; + this->LatZoneCreditRate = CaseLatCreditToZone; + this->LatZoneCredit = CaseLatCreditToZone * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).SensHVACCreditRate = CaseSenCreditToHVAC; + this->SensHVACCreditRate = CaseSenCreditToHVAC; // This rate can be positive or negative, split into separate output variables and always report positive value if (CaseSenCreditToHVAC <= 0.0) { - RefrigCase(CaseID).SensHVACCreditCoolRate = -CaseSenCreditToHVAC; - RefrigCase(CaseID).SensHVACCreditCool = -CaseSenCreditToHVAC * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).SensHVACCreditHeatRate = 0.0; - RefrigCase(CaseID).SensHVACCreditHeat = 0.0; + this->SensHVACCreditCoolRate = -CaseSenCreditToHVAC; + this->SensHVACCreditCool = -CaseSenCreditToHVAC * DataGlobals::TimeStepZoneSec; + this->SensHVACCreditHeatRate = 0.0; + this->SensHVACCreditHeat = 0.0; } else { - RefrigCase(CaseID).SensHVACCreditHeatRate = CaseSenCreditToHVAC; - RefrigCase(CaseID).SensHVACCreditHeat = CaseSenCreditToHVAC * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).SensHVACCreditCoolRate = 0.0; - RefrigCase(CaseID).SensHVACCreditCool = 0.0; + this->SensHVACCreditHeatRate = CaseSenCreditToHVAC; + this->SensHVACCreditHeat = CaseSenCreditToHVAC * DataGlobals::TimeStepZoneSec; + this->SensHVACCreditCoolRate = 0.0; + this->SensHVACCreditCool = 0.0; } // This rate should always be negative - RefrigCase(CaseID).LatHVACCreditRate = CaseLatCreditToHVAC; - RefrigCase(CaseID).LatHVACCredit = CaseLatCreditToHVAC * DataGlobals::TimeStepZoneSec; + this->LatHVACCreditRate = CaseLatCreditToHVAC; + this->LatHVACCredit = CaseLatCreditToHVAC * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).ElecFanPower = TotalFan; - RefrigCase(CaseID).ElecFanConsumption = TotalFan * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).ElecAntiSweatPower = TotalAntiSweat; - RefrigCase(CaseID).ElecAntiSweatConsumption = TotalAntiSweat * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).ElecLightingPower = TotalLightingLoad; - RefrigCase(CaseID).ElecLightingConsumption = TotalLightingLoad * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).ElecDefrostPower = DefrostCap_Actual; - RefrigCase(CaseID).ElecDefrostConsumption = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; + this->ElecFanPower = TotalFan; + this->ElecFanConsumption = TotalFan * DataGlobals::TimeStepZoneSec; + this->ElecAntiSweatPower = TotalAntiSweat; + this->ElecAntiSweatConsumption = TotalAntiSweat * DataGlobals::TimeStepZoneSec; + this->ElecLightingPower = TotalLightingLoad; + this->ElecLightingConsumption = TotalLightingLoad * DataGlobals::TimeStepZoneSec; + this->ElecDefrostPower = DefrostCap_Actual; + this->ElecDefrostConsumption = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).DefEnergyCurveValue = DefrostRatio; - RefrigCase(CaseID).LatEnergyCurveValue = LatentRatio; + this->DefEnergyCurveValue = DefrostRatio; + this->LatEnergyCurveValue = LatentRatio; //************************************************************************************************** // Cap Energy and Kg Frost to avoid floating overflow errors @@ -10066,20 +10038,20 @@ namespace RefrigeratedCase { // excessively large stored energy if ((ZoneTempFactor * CaseCreditFraction) > 1.0) { if (!DataGlobals::WarmupFlag) { - Real64 DeltaWarmEnvEnergy = (SensibleLoadPrime - RefrigCase(CaseID).DesignSensCaseCredit) * DataGlobals::TimeStepZoneSec; - RefrigCase(CaseID).WarmEnvEnergy += DeltaWarmEnvEnergy; + Real64 DeltaWarmEnvEnergy = (SensibleLoadPrime - this->DesignSensCaseCredit) * DataGlobals::TimeStepZoneSec; + this->WarmEnvEnergy += DeltaWarmEnvEnergy; } } - if (RefrigCase(CaseID).DefrostEnergy > MyLargeNumber) RefrigCase(CaseID).DefrostEnergy = MyLargeNumber; - if (RefrigCase(CaseID).WarmEnvEnergy > MyLargeNumber) RefrigCase(CaseID).WarmEnvEnergy = MyLargeNumber; - if (RefrigCase(CaseID).StockingEnergy > MyLargeNumber) RefrigCase(CaseID).StockingEnergy = MyLargeNumber; - if (RefrigCase(CaseID).StoredEnergy > MyLargeNumber) { - RefrigCase(CaseID).StoredEnergy = MyLargeNumber; - if (ShowStoreEnergyWarning(CaseID)) { - ShowWarningError("Refrigeration:Case: " + RefrigCase(CaseID).Name); - if (RefrigCase(CaseID).StockingEnergy >= RefrigCase(CaseID).DefrostEnergy) { - if (RefrigCase(CaseID).StockingEnergy >= RefrigCase(CaseID).WarmEnvEnergy) { + if (this->DefrostEnergy > MyLargeNumber) this->DefrostEnergy = MyLargeNumber; + if (this->WarmEnvEnergy > MyLargeNumber) this->WarmEnvEnergy = MyLargeNumber; + if (this->StockingEnergy > MyLargeNumber) this->StockingEnergy = MyLargeNumber; + if (this->StoredEnergy > MyLargeNumber) { + this->StoredEnergy = MyLargeNumber; + if (this->ShowStoreEnergyWarning) { + ShowWarningError("Refrigeration:Case: " + this->Name); + if (this->StockingEnergy >= this->DefrostEnergy) { + if (this->StockingEnergy >= this->WarmEnvEnergy) { ShowContinueError(" This case has insufficient capacity to meet excess energy associated with stocking."); ShowContinueError(" Refer to documentation for further explanation of product stocking requirements and"); ShowContinueError(" Total Cooling Capacity."); @@ -10090,7 +10062,7 @@ namespace RefrigeratedCase { ShowContinueError(" Total Cooling Capacity."); } // Stocking energy > warm environment energy } else { - if (RefrigCase(CaseID).DefrostEnergy >= RefrigCase(CaseID).WarmEnvEnergy) { + if (this->DefrostEnergy >= this->WarmEnvEnergy) { ShowContinueError(" This case has insufficient capacity to meet excess energy associated with defrost."); ShowContinueError(" Refer to documentation for further explanation of defrost control requirements and"); ShowContinueError(" recommendations regarding Total Cooling Capacity, Sensible Heat Ratio, and Defrost Capacity."); @@ -10101,18 +10073,18 @@ namespace RefrigeratedCase { ShowContinueError(" Total Cooling Capacity."); } // defrost energy > warm environment energy } // stock > defrost ELSE - ShowStoreEnergyWarning(CaseID) = false; // only give this warning once for any one case + this->ShowStoreEnergyWarning = false; // only give this warning once for any one case } // showstoreenergy warning true } // stored energy > large number - if (RefrigCase(CaseID).KgFrost > MyLargeNumber) { - RefrigCase(CaseID).KgFrost = MyLargeNumber; - if (ShowFrostWarning(CaseID)) { - ShowWarningError("Refrigeration:Case: " + RefrigCase(CaseID).Name); + if (this->KgFrost > MyLargeNumber) { + this->KgFrost = MyLargeNumber; + if (this->ShowFrostWarning) { + ShowWarningError("Refrigeration:Case: " + this->Name); ShowContinueError(" This case has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(" Refer to documentation for further explanation of product stocking requirements and"); ShowContinueError(" recommendations regarding Total Cooling Capacity, Sensible Heat Ratio, and Latent Heat Ratio."); - ShowFrostWarning(CaseID) = false; + this->ShowFrostWarning = false; } } } @@ -10477,7 +10449,7 @@ namespace RefrigeratedCase { if (System(SysNum).NumCases > 0) { for (int CaseIndex = 1; CaseIndex <= System(SysNum).NumCases; ++CaseIndex) { int CaseID = System(SysNum).CaseNum(CaseIndex); - CalculateCase(CaseID); + RefrigCase(CaseID).CalculateCase(); // TevapDesign calc in Get Input to meet lowest evap temp of any load on the system. // Tevap needed is either fixed at this design value, // or allowed to float to meet lowest T needed among all loads served by the system @@ -10505,7 +10477,7 @@ namespace RefrigeratedCase { if (System(SysNum).NumWalkIns > 0) { for (int WalkInIndex = 1; WalkInIndex <= System(SysNum).NumWalkIns; ++WalkInIndex) { int WalkInID = System(SysNum).WalkInNum(WalkInIndex); - CalculateWalkIn(WalkInID); + WalkIn(WalkInID).CalculateWalkIn(); if (System(SysNum).CompSuctControl == ConstantSuctionTemperature) { System(SysNum).TEvapNeeded = System(SysNum).TEvapDesign; } else { // calculate floating T evap @@ -10873,7 +10845,7 @@ namespace RefrigeratedCase { if (TransSystem(SysNum).NumCasesMT > 0) { for (int CaseIndex = 1; CaseIndex <= TransSystem(SysNum).NumCasesMT; ++CaseIndex) { int CaseID = TransSystem(SysNum).CaseNumMT(CaseIndex); - CalculateCase(CaseID); + RefrigCase(CaseID).CalculateCase(); // TEvapDesignMT calc in Get Input to meet lowest evap temp of any MT load on the system. // TEvapNeededMT is fixed at this design value. TransSystem(SysNum).TEvapNeededMT = TransSystem(SysNum).TEvapDesignMT; @@ -10886,7 +10858,7 @@ namespace RefrigeratedCase { if (TransSystem(SysNum).NumCasesLT > 0) { for (int CaseIndex = 1; CaseIndex <= TransSystem(SysNum).NumCasesLT; ++CaseIndex) { int CaseID = TransSystem(SysNum).CaseNumLT(CaseIndex); - CalculateCase(CaseID); + RefrigCase(CaseID).CalculateCase(); // TEvapDesignLT calc in Get Input to meet lowest evap temp of any LT load on the system. // TEvapNeededLT is fixed at this design value. TransSystem(SysNum).TEvapNeededLT = TransSystem(SysNum).TEvapDesignLT; @@ -10899,7 +10871,7 @@ namespace RefrigeratedCase { if (TransSystem(SysNum).NumWalkInsMT > 0) { for (int WalkInIndex = 1; WalkInIndex <= TransSystem(SysNum).NumWalkInsMT; ++WalkInIndex) { int WalkInID = TransSystem(SysNum).WalkInNumMT(WalkInIndex); - CalculateWalkIn(WalkInID); + WalkIn(WalkInID).CalculateWalkIn(); // TEvapDesignMT calc in Get Input to meet lowest evap temp of any MT load on the system. // TEvapNeededMT is fixed at this design value. TransSystem(SysNum).TEvapNeededMT = TransSystem(SysNum).TEvapDesignMT; @@ -10912,7 +10884,7 @@ namespace RefrigeratedCase { if (TransSystem(SysNum).NumWalkInsLT > 0) { for (int WalkInIndex = 1; WalkInIndex <= TransSystem(SysNum).NumWalkInsLT; ++WalkInIndex) { int WalkInID = TransSystem(SysNum).WalkInNumLT(WalkInIndex); - CalculateWalkIn(WalkInID); + WalkIn(WalkInID).CalculateWalkIn(); // TEvapDesignLT calc in Get Input to meet lowest evap temp of any LT load on the system. // TEvapNeeded is fixed at this design value. TransSystem(SysNum).TEvapNeededLT = TransSystem(SysNum).TEvapDesignLT; @@ -13276,7 +13248,7 @@ namespace RefrigeratedCase { //*************************************************************************************************** //*************************************************************************************************** - void CalculateWalkIn(int const WalkInID) // Absolute pointer to Walk In + void WalkInData::CalculateWalkIn() // Absolute pointer to Walk In { // SUBROUTINE INFORMATION: @@ -13320,11 +13292,11 @@ namespace RefrigeratedCase { Real64 DensitySqRtFactor(0.0); // from ASHRAE 2010 eq 12 page 24.4 for door infiltration // Current value of WalkIn operating (availability) schedule - Real64 WalkInSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).SchedPtr); + Real64 WalkInSchedule = ScheduleManager::GetCurrentScheduleValue(this->SchedPtr); if (WalkInSchedule <= 0) return; // GET OTHER SCHEDULES - DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostSchedPtr); - Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).DefrostDripDownSchedPtr); + DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostSchedPtr); + Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostDripDownSchedPtr); // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); @@ -13333,20 +13305,13 @@ namespace RefrigeratedCase { Real64 LightingSchedule = 1.0; Real64 HeaterSchedule = 1.0; Real64 CircFanSchedule = 1.0; - if (WalkIn(WalkInID).StockingSchedPtr > 0) StockingLoad = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).StockingSchedPtr); - if (WalkIn(WalkInID).LightingSchedPtr > 0) LightingSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).LightingSchedPtr); - if (WalkIn(WalkInID).HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).HeaterSchedPtr); - if (WalkIn(WalkInID).CircFanSchedPtr > 0) CircFanSchedule = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).CircFanSchedPtr); + if (this->StockingSchedPtr > 0) StockingLoad = ScheduleManager::GetCurrentScheduleValue(this->StockingSchedPtr); + if (this->LightingSchedPtr > 0) LightingSchedule = ScheduleManager::GetCurrentScheduleValue(this->LightingSchedPtr); + if (this->HeaterSchedPtr > 0) HeaterSchedule = ScheduleManager::GetCurrentScheduleValue(this->HeaterSchedPtr); + if (this->CircFanSchedPtr > 0) CircFanSchedule = ScheduleManager::GetCurrentScheduleValue(this->CircFanSchedPtr); // Set local subroutine variables for convenience - Real64 TWalkIn = WalkIn(WalkInID).Temperature; // WalkIn operating temperature (C) - - // Rated capacity of walk in cooler coil (W) - Real64 DesignRatedCap = WalkIn(WalkInID).DesignRatedCap; - Real64 DefrostCap = WalkIn(WalkInID).DefrostCapacity; - // %DefrostCapacity already set to zero for WalkInDefrostNone , WalkInDefrostOffCycle - // Total design display WalkIn lighting power (W) - Real64 DesignLighting = WalkIn(WalkInID).DesignLighting; + Real64 TWalkIn = this->Temperature; // WalkIn operating temperature (C) // Enthalpy of air corresponding to walk in temperature and 90% assumed RH (J/kg) Real64 EnthalpyAirWalkIn = Psychrometrics::PsyHFnTdbRhPb(TWalkIn, 0.9, DataEnvironment::OutBaroPress); // assume 90%RH in cooler @@ -13363,23 +13328,23 @@ namespace RefrigeratedCase { Real64 LatentLoadTotal(0.0); // total latent load on WalkIn over all zones (W) Real64 ZoneLatentLoad(0.0); // Latent WalkIn credit delivered to zone (W) - WalkIn(WalkInID).SensZoneCreditRate = 0.0; - WalkIn(WalkInID).SensZoneCreditCoolRate = 0.0; - WalkIn(WalkInID).SensZoneCreditCool = 0.0; - WalkIn(WalkInID).SensZoneCreditHeatRate = 0.0; - WalkIn(WalkInID).SensZoneCreditHeat = 0.0; - WalkIn(WalkInID).LatZoneCreditRate = 0.0; + this->SensZoneCreditRate = 0.0; + this->SensZoneCreditCoolRate = 0.0; + this->SensZoneCreditCool = 0.0; + this->SensZoneCreditHeatRate = 0.0; + this->SensZoneCreditHeat = 0.0; + this->LatZoneCreditRate = 0.0; // Start zone loop: - for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - int ZoneNum = WalkIn(WalkInID).ZoneNum(ZoneID); - int ZoneNodeNum = WalkIn(WalkInID).ZoneNodeNum(ZoneID); - Real64 ZoneDryBulb = DataLoopNode::Node(ZoneNodeNum).Temp; // Dry Bulb Temperature of adjacent zone + for (int ZoneID = 1; ZoneID <= this->NumZones; ++ZoneID) { + int zoneNum = this->ZoneNum(ZoneID); + int zoneNodeNum = this->ZoneNodeNum(ZoneID); + Real64 ZoneDryBulb = DataLoopNode::Node(zoneNodeNum).Temp; // Dry Bulb Temperature of adjacent zone Real64 WalkInLatLoad = -ZoneLatentLoad; // Walk in cooler latent load facing particular zone (W) Real64 DelTemp = ZoneDryBulb - TWalkIn; // Difference between zone and walk in temperatures (C) - Real64 StockDoorArea = WalkIn(WalkInID).AreaStockDr(ZoneID); - Real64 GlassDoorArea = WalkIn(WalkInID).AreaGlassDr(ZoneID); // facing a particular zone (m2) - Real64 UAOtherSurfaces = WalkIn(WalkInID).SurfaceArea(ZoneID) * WalkIn(WalkInID).UValue(ZoneID); // UA for non-door surfaces facing a certain zone (W/C) + Real64 StockDoorArea = this->AreaStockDr(ZoneID); + Real64 GlassDoorArea = this->AreaGlassDr(ZoneID); // facing a particular zone (m2) + Real64 UAOtherSurfaces = this->SurfaceArea(ZoneID) * this->UValue(ZoneID); // UA for non-door surfaces facing a certain zone (W/C) Real64 ZInfilSensLoad(0.0); // Sensible load due to infiltration in one zone Real64 ZdoorSensLoad(0.0); // Sensible load due to UA delta T through closed door in one zone @@ -13390,7 +13355,7 @@ namespace RefrigeratedCase { // Get infiltration loads if either type of door is present in this zone if (StockDoorArea > 0.0 || GlassDoorArea > 0.0) { // Zone relative humidity fraction (decimal) - Real64 ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(ZoneNodeNum).Temp, DataLoopNode::Node(ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); + Real64 ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(zoneNodeNum).Temp, DataLoopNode::Node(zoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); // Enthalpy of the air in a particular zone (J/kg) Real64 EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, DataEnvironment::OutBaroPress, RoutineName); Real64 HumRatioZoneAir = Psychrometrics::PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); @@ -13415,7 +13380,7 @@ namespace RefrigeratedCase { if (StockDoorArea > 0.0) { { - auto const SELECT_CASE_var(WalkIn(WalkInID).StockDoorProtectType(ZoneID)); + auto const SELECT_CASE_var(this->StockDoorProtectType(ZoneID)); // Values from ASHRAE Ref p 13.6 if (SELECT_CASE_var == WIStockDoorNone) { DoorProtectEff = 0.0; @@ -13425,17 +13390,17 @@ namespace RefrigeratedCase { DoorProtectEff = 0.9; } } - DrHeight = WalkIn(WalkInID).HeightStockDr(ZoneID); + DrHeight = this->HeightStockDr(ZoneID); DrArea = StockDoorArea; // if exists, get Stock Door Zone schedule Real64 DoorOpenFactor = DefaultWalkInDoorOpenFactor; - if (WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID) > 0) - DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID)); + if (this->StockDoorOpenSchedPtr(ZoneID) > 0) + DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(this->StockDoorOpenSchedPtr(ZoneID)); FullFlowInfLoad = 0.221 * DrArea * (EnthalpyZoneAir - EnthalpyAirWalkIn) * DensityAirWalkIn * DensitySqRtFactor * std::sqrt(Gravity * DrHeight) * DensityFactorFm; StockDoorInfLoad = FullFlowInfLoad * DoorOpenFactor * DoorFlowFactor * (1.0 - DoorProtectEff); - StockDoorSensHeat = DrArea * WalkIn(WalkInID).UValueStockDr(ZoneID) * DelTemp; + StockDoorSensHeat = DrArea * this->UValueStockDr(ZoneID) * DelTemp; } // have stock doors Real64 GlassDoorSensHeat(0.0); // sensible heat gain through glass reach-in doors (UA*delta T) (W) @@ -13443,17 +13408,17 @@ namespace RefrigeratedCase { if (GlassDoorArea > 0.0) { DoorProtectEff = 0.5; // Assume glass doors have air curtain - DrHeight = WalkIn(WalkInID).HeightGlassDr(ZoneID); + DrHeight = this->HeightGlassDr(ZoneID); DrArea = GlassDoorArea; // get Glass Door Zone schedule Real64 DoorOpenFactor = DefaultWalkInDoorOpenFactor; // default value - if (WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID) > 0) - DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID)); + if (this->GlassDoorOpenSchedPtr(ZoneID) > 0) + DoorOpenFactor = ScheduleManager::GetCurrentScheduleValue(this->GlassDoorOpenSchedPtr(ZoneID)); FullFlowInfLoad = 0.221 * DrArea * (EnthalpyZoneAir - EnthalpyAirWalkIn) * DensityAirWalkIn * DensitySqRtFactor * std::sqrt(Gravity * DrHeight) * DensityFactorFm; GlassDoorInfLoad = FullFlowInfLoad * DoorOpenFactor * DoorFlowFactor * (1.0 - DoorProtectEff); - GlassDoorSensHeat = DrArea * WalkIn(WalkInID).UValueGlassDr(ZoneID) * DelTemp; + GlassDoorSensHeat = DrArea * this->UValueGlassDr(ZoneID) * DelTemp; } // have Glass doors // assume mass dry air infiltrating into walk-in == mass out into zone, @@ -13470,13 +13435,13 @@ namespace RefrigeratedCase { ZInfilSensLoad = ZoneInfilLoad - (-WaterRemovRate * IcetoVaporEnthalpy); // done to avoid moving latent to sens during dripdown ZdoorSensLoad = -GlassDoorSensHeat - StockDoorSensHeat; WalkInLatLoad = -ZoneLatentLoad; - if (WalkIn(WalkInID).TEvapDesign <= 0.0) { // water turned to ice on coil + if (this->TEvapDesign <= 0.0) { // water turned to ice on coil WalkInLatLoad = WaterRemovRate * IcetoVaporEnthalpy * (1.0 - DefrostDripDownSchedule); // FROST: keep track of frost build up on evaporator coil // avoid accumulation during warm-up to avoid reverse dd test problem if (!DataGlobals::WarmupFlag) { Real64 FrostChangekg = (WaterRemovRate * DataGlobals::TimeStepZoneSec) * (1.0 - DefrostDripDownSchedule); - WalkIn(WalkInID).KgFrost += FrostChangekg; + this->KgFrost += FrostChangekg; } } // water to ice } // No doors @@ -13489,26 +13454,26 @@ namespace RefrigeratedCase { // Zone Equipment Manager. Sum walk-in credits to zone using existing 'casecredit' variable // No return air fractions are applied to walk-ins, and no latent in stocking - - DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone += ZoneSensLoad; - DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone += ZoneLatentLoad; + DataHeatBalance::RefrigCaseCredit(zoneNum).SenCaseCreditToZone += ZoneSensLoad; + DataHeatBalance::RefrigCaseCredit(zoneNum).LatCaseCreditToZone += ZoneLatentLoad; // Set up report variables for each zone for this walk-in // Sensible heat exchange can be positive or negative, split into separate output variables and always report positive value - WalkIn(WalkInID).SensZoneCreditRate(ZoneID) = ZoneSensLoad; + this->SensZoneCreditRate(ZoneID) = ZoneSensLoad; if (ZoneSensLoad <= 0.0) { - WalkIn(WalkInID).SensZoneCreditCoolRate(ZoneID) = -ZoneSensLoad; - WalkIn(WalkInID).SensZoneCreditCool(ZoneID) = -ZoneSensLoad * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).SensZoneCreditHeatRate(ZoneID) = 0.0; - WalkIn(WalkInID).SensZoneCreditHeat(ZoneID) = 0.0; + this->SensZoneCreditCoolRate(ZoneID) = -ZoneSensLoad; + this->SensZoneCreditCool(ZoneID) = -ZoneSensLoad * DataGlobals::TimeStepZoneSec; + this->SensZoneCreditHeatRate(ZoneID) = 0.0; + this->SensZoneCreditHeat(ZoneID) = 0.0; } else { - WalkIn(WalkInID).SensZoneCreditHeatRate(ZoneID) = ZoneSensLoad; - WalkIn(WalkInID).SensZoneCreditHeat(ZoneID) = ZoneSensLoad * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).SensZoneCreditCoolRate(ZoneID) = 0.0; - WalkIn(WalkInID).SensZoneCreditCool(ZoneID) = 0.0; + this->SensZoneCreditHeatRate(ZoneID) = ZoneSensLoad; + this->SensZoneCreditHeat(ZoneID) = ZoneSensLoad * DataGlobals::TimeStepZoneSec; + this->SensZoneCreditCoolRate(ZoneID) = 0.0; + this->SensZoneCreditCool(ZoneID) = 0.0; } // This rate should always be negative - WalkIn(WalkInID).LatZoneCreditRate(ZoneID) = ZoneLatentLoad; - WalkIn(WalkInID).LatZoneCredit(ZoneID) = ZoneLatentLoad * DataGlobals::TimeStepZoneSec; + this->LatZoneCreditRate(ZoneID) = ZoneLatentLoad; + this->LatZoneCredit(ZoneID) = ZoneLatentLoad * DataGlobals::TimeStepZoneSec; // Running total over all zones, use later to dispatch capacity SensibleLoadTotal += WalkInSensLoad; @@ -13519,44 +13484,43 @@ namespace RefrigeratedCase { // cooling coil fan power default is 375W, = 1/2 HP (Tyler showed 1/3 to 3/4 hp) // CALCULATE AUX LOADS DUE TO LIGHTS, FANS AND HEATERS - Real64 LightLoad = DesignLighting * LightingSchedule; // Total lighting energy rate (W) + Real64 LightLoad = this->DesignLighting * LightingSchedule; // Total lighting energy rate (W) // turn coil fan off during defrost/drip - down period // Total fan energy rate (W) - Real64 FanLoad = WalkIn(WalkInID).CircFanPower * CircFanSchedule + WalkIn(WalkInID).CoilFanPower * (1.0 - DefrostDripDownSchedule); - Real64 HeaterLoad = WalkIn(WalkInID).HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) + Real64 FanLoad = this->CircFanPower * CircFanSchedule + this->CoilFanPower * (1.0 - DefrostDripDownSchedule); + Real64 HeaterLoad = this->HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) // Calculate floor load - using 'DataEnvironment::GroundTemp' assigned in weather manager (can be entered by user if desired) // Default value is 18C. // Total floor energy rate (W) - Real64 FloorLoad = WalkIn(WalkInID).FloorArea * WalkIn(WalkInID).FloorUValue * (DataEnvironment::GroundTemp - TWalkIn); + Real64 FloorLoad = this->FloorArea * this->FloorUValue * (DataEnvironment::GroundTemp - TWalkIn); Real64 DefrostLoad; // DEFROST CALCULATIONS - if ((DefrostSchedule > 0.0) && (WalkIn(WalkInID).DefrostType != WalkInDefrostNone) && - (WalkIn(WalkInID).DefrostType != WalkInDefrostOffCycle)) { - DefrostLoad = DefrostCap * DefrostSchedule; // W - Real64 StartFrostKg = WalkIn(WalkInID).KgFrost; // frost load at start of time step (kg of ice) + if ((DefrostSchedule > 0.0) && (this->DefrostType != WalkInDefrostNone) && + (this->DefrostType != WalkInDefrostOffCycle)) { + DefrostLoad = this->DefrostCapacity * DefrostSchedule; // W + Real64 StartFrostKg = this->KgFrost; // frost load at start of time step (kg of ice) Real64 DefrostEnergy = DefrostLoad * DataGlobals::TimeStepZoneSec; // Joules - if (WalkIn(WalkInID).DefrostControlType == DefrostContTempTerm) { + if (this->DefrostControlType == DefrostContTempTerm) { // Need to turn defrost system off early if controlled by temperature and all ice melted // For temperature termination, need to recognize not all defrost heat goes to melt ice // Some goes to misc losses (for fluid defrost, some coil areas bare earlier than // others and xfer heat to environment) // Assume full ice melting satisfies temperature control. // (defaults for DefEnergyFraction are :=0.7 for elec, =0.3 for fluids) - Real64 DefEnergyFraction = WalkIn(WalkInID).DefEnergyFraction; - Real64 AvailDefrostEnergy = DefEnergyFraction * DefrostEnergy; // Joules avail to melt ice + Real64 AvailDefrostEnergy = this->DefEnergyFraction * DefrostEnergy; // Joules avail to melt ice Real64 IceSensHeatNeeded = 0.0; // Energy to raise frost temperature to 0C, used w/ temp termination (J) if (StartFrostKg > 0.0) { - if (WalkIn(WalkInID).IceTemp < 0.0) { - Real64 StartIceTemp = WalkIn(WalkInID).IceTemp; // Frost temperature at start of time step [C] + if (this->IceTemp < 0.0) { + Real64 StartIceTemp = this->IceTemp; // Frost temperature at start of time step [C] IceSensHeatNeeded = StartFrostKg * SpecificHeatIce * (0.0 - StartIceTemp); // Joules if (AvailDefrostEnergy >= IceSensHeatNeeded) { - WalkIn(WalkInID).IceTemp = 0.0; + this->IceTemp = 0.0; AvailDefrostEnergy -= IceSensHeatNeeded; // Joules } else { // DefrostEnergy < IceSensHeatNeeded - WalkIn(WalkInID).IceTemp = StartIceTemp + AvailDefrostEnergy / (SpecificHeatIce * StartFrostKg); + this->IceTemp = StartIceTemp + AvailDefrostEnergy / (SpecificHeatIce * StartFrostKg); AvailDefrostEnergy = 0.0; } // AvailDefrostEnergy >= IceSensHeatNeeded } // IceTemp < 0, need to raise temperature of ice @@ -13564,31 +13528,31 @@ namespace RefrigeratedCase { Real64 FrostChangekg = min(AvailDefrostEnergy / IceMeltEnthalpy, StartFrostKg); if (FrostChangekg < StartFrostKg) { DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; - if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; + if (!DataGlobals::WarmupFlag) this->KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed } else { // all frost melted during time step, so need to terminate defrost // see Aug 8 page 3 notes - WalkIn(WalkInID).KgFrost = 0.0; + this->KgFrost = 0.0; DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / - DefEnergyFraction; // Joules - energy needed including E unavail to melt ice - DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataGlobals::TimeStepZoneSec))); + this->DefEnergyFraction; // Joules - energy needed including E unavail to melt ice + DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (this->DefrostCapacity * DataGlobals::TimeStepZoneSec))); // reduce load on walkin by energy put into ice melting DefrostLoad = - max(0.0, (DefrostSchedule * DefrostCap - (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DataGlobals::TimeStepZoneSec)); - WalkIn(WalkInID).IceTemp = WalkIn(WalkInID).TEvapDesign; + max(0.0, (DefrostSchedule * this->DefrostCapacity - (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DataGlobals::TimeStepZoneSec)); + this->IceTemp = this->TEvapDesign; } // frost melted during time step less than amount of ice at start } else { // no frost present so terminate defrost and reset ice temperature for start of next defrost DefrostLoad = 0.0; DefrostSchedule = 0.0; - WalkIn(WalkInID).IceTemp = WalkIn(WalkInID).TEvapDesign; + this->IceTemp = this->TEvapDesign; } // have frost present } else { // Not temperature control type Real64 FrostChangekg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); // Reduce defrost heat load on walkin by amount of ice melted during time step DefrostLoad -= FrostChangekg * IceMeltEnthalpy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; - if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).KgFrost = StartFrostKg - FrostChangekg; + if (!DataGlobals::WarmupFlag) this->KgFrost = StartFrostKg - FrostChangekg; // DefrostSchedule not changed } // Temperature termination control type @@ -13596,16 +13560,16 @@ namespace RefrigeratedCase { DefrostLoad = 0.0; } // Defrost calculations - if (WalkIn(WalkInID).DefrostType == WalkInDefrostElec) { - WalkIn(WalkInID).ElecDefrostConsumption = DefrostCap * DefrostSchedule * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).ElecDefrostPower = DefrostCap * DefrostSchedule; + if (this->DefrostType == WalkInDefrostElec) { + this->ElecDefrostConsumption = this->DefrostCapacity * DefrostSchedule * DataGlobals::TimeStepZoneSec; + this->ElecDefrostPower = this->DefrostCapacity * DefrostSchedule; } else { - WalkIn(WalkInID).ElecDefrostConsumption = 0.0; - WalkIn(WalkInID).ElecDefrostPower = 0.0; + this->ElecDefrostConsumption = 0.0; + this->ElecDefrostPower = 0.0; } // If hot brine or hot gas is used for defrost, need to reduce condenser load by heat reclaimed for defrost - if (WalkIn(WalkInID).DefrostType == WalkInDefrostFluid) WalkIn(WalkInID).HotDefrostCondCredit = DefrostCap * DefrostSchedule; + if (this->DefrostType == WalkInDefrostFluid) this->HotDefrostCondCredit = this->DefrostCapacity * DefrostSchedule; // loads reflects that walk ins continue to accumulate loads, even during defrost // but cap is used to report portion met by active system while operating @@ -13625,67 +13589,67 @@ namespace RefrigeratedCase { // run full out until the temperature is brought back down. // Rate needed to serve all stored energy during single time step (W) - Real64 StoredEnergyRate = WalkIn(WalkInID).StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; + Real64 StoredEnergyRate = this->StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; Real64 LoadRequested = LoadTotal + StoredEnergyRate; // Load necessary to meet current and all stored energy needs (W) Real64 LatentCapApplied; // Walk In latent capacity at specific operating conditions Real64 SensibleCapApplied(0.0); // Walk In sensible capacity at specific operating conditions // prorate available cooling capacity for portion of time off due to drip down. - Real64 MaxCap = DesignRatedCap * (1.0 - DefrostDripDownSchedule); // Design chilling capacity reduced according to drip-down schedule (W) + Real64 MaxCap = this->DesignRatedCap * (1.0 - DefrostDripDownSchedule); // Design chilling capacity reduced according to drip-down schedule (W) if (MaxCap >= LoadRequested) { // Have more at least as much capacity available as needed, even counting stored energy CapApplied = LoadRequested; SensibleCapApplied = SensibleLoadTotal + StoredEnergyRate; LatentCapApplied = LatentLoadTotal; - WalkIn(WalkInID).StoredEnergy = 0.0; + this->StoredEnergy = 0.0; } else { // Don't have as much capacity as needed (during dripdown or period following dripdown) CapApplied = MaxCap; LatentCapApplied = min(LatentLoadTotal, MaxCap); // Latent load should never be > capavail, but just in case... SensibleCapApplied = CapApplied - LatentCapApplied; - if (!DataGlobals::WarmupFlag) WalkIn(WalkInID).StoredEnergy += (LoadTotal - MaxCap) * DataGlobals::TimeStepZoneSec; + if (!DataGlobals::WarmupFlag) this->StoredEnergy += (LoadTotal - MaxCap) * DataGlobals::TimeStepZoneSec; } // CapAvail vs Load requested // ReportWalkIn( WalkInID) - WalkIn(WalkInID).TotalCoolingLoad = CapApplied; - WalkIn(WalkInID).TotalCoolingEnergy = CapApplied * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).TotSensCoolingEnergyRate = SensibleCapApplied; - WalkIn(WalkInID).TotSensCoolingEnergy = SensibleCapApplied * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).TotLatCoolingEnergyRate = LatentCapApplied; - WalkIn(WalkInID).TotLatCoolingEnergy = LatentCapApplied * DataGlobals::TimeStepZoneSec; - - WalkIn(WalkInID).ElecFanPower = FanLoad; - WalkIn(WalkInID).ElecFanConsumption = FanLoad * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).ElecHeaterPower = HeaterLoad; - WalkIn(WalkInID).ElecHeaterConsumption = HeaterLoad * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).ElecLightingPower = LightLoad; - WalkIn(WalkInID).ElecLightingConsumption = LightLoad * DataGlobals::TimeStepZoneSec; - WalkIn(WalkInID).TotalElecPower = FanLoad + HeaterLoad + LightLoad + WalkIn(WalkInID).ElecDefrostPower; - WalkIn(WalkInID).TotalElecConsumption = WalkIn(WalkInID).TotalElecPower * DataGlobals::TimeStepZoneSec; + this->TotalCoolingLoad = CapApplied; + this->TotalCoolingEnergy = CapApplied * DataGlobals::TimeStepZoneSec; + this->TotSensCoolingEnergyRate = SensibleCapApplied; + this->TotSensCoolingEnergy = SensibleCapApplied * DataGlobals::TimeStepZoneSec; + this->TotLatCoolingEnergyRate = LatentCapApplied; + this->TotLatCoolingEnergy = LatentCapApplied * DataGlobals::TimeStepZoneSec; + + this->ElecFanPower = FanLoad; + this->ElecFanConsumption = FanLoad * DataGlobals::TimeStepZoneSec; + this->ElecHeaterPower = HeaterLoad; + this->ElecHeaterConsumption = HeaterLoad * DataGlobals::TimeStepZoneSec; + this->ElecLightingPower = LightLoad; + this->ElecLightingConsumption = LightLoad * DataGlobals::TimeStepZoneSec; + this->TotalElecPower = FanLoad + HeaterLoad + LightLoad + this->ElecDefrostPower; + this->TotalElecConsumption = this->TotalElecPower * DataGlobals::TimeStepZoneSec; //************************************************************************************************** // Cap Energy and Kg Frost to avoid floating overflow errors // 1-time warning is issued. It should be rare but could happen with unrealistic inputs. - if (WalkIn(WalkInID).StoredEnergy > MyLargeNumber) { - WalkIn(WalkInID).StoredEnergy = MyLargeNumber; - if (ShowUnmetWIEnergyWarning(WalkInID)) { - ShowWarningError("Refrigeration:WalkIn: " + WalkIn(WalkInID).Name); + if (this->StoredEnergy > MyLargeNumber) { + this->StoredEnergy = MyLargeNumber; + if (this->ShowUnmetWIEnergyWarning) { + ShowWarningError("Refrigeration:WalkIn: " + this->Name); ShowContinueError(" This walk-in cooler has insufficient capacity to meet the loads"); ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + General::CreateSysTimeIntervalString()); ShowContinueError(" Refer to documentation for further explanation of Total Cooling Capacity."); - ShowUnmetWIEnergyWarning(WalkInID) = false; + this->ShowUnmetWIEnergyWarning = false; } // ShowStoreEnergyWarning } // stored energy > large number - if (WalkIn(WalkInID).KgFrost > MyLargeNumber) { - WalkIn(WalkInID).KgFrost = MyLargeNumber; - if (ShowWIFrostWarning(WalkInID)) { - ShowWarningError("Refrigeration:WalkIn: " + WalkIn(WalkInID).Name); + if (this->KgFrost > MyLargeNumber) { + this->KgFrost = MyLargeNumber; + if (this->ShowWIFrostWarning) { + ShowWarningError("Refrigeration:WalkIn: " + this->Name); ShowContinueError(" This walkin cooler has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(" Check the defrost schedule or defrost capacity. "); ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + General::CreateSysTimeIntervalString()); - ShowWIFrostWarning(WalkInID) = false; + this->ShowWIFrostWarning = false; } } } @@ -13799,7 +13763,7 @@ namespace RefrigeratedCase { if (this->NumCases > 0) { for (int caseNum = 1; caseNum <= this->NumCases; ++caseNum) { int CaseID = this->CaseNum(caseNum); - CalculateCase(CaseID); + RefrigCase(CaseID).CalculateCase(); // increment TotalCoolingLoad Hot gas/brine defrost credits for each secondary loop RefrigerationLoad += RefrigCase(CaseID).TotalCoolingLoad; TotalHotDefrostCondCredit += RefrigCase(CaseID).HotDefrostCondCredit; @@ -13808,7 +13772,7 @@ namespace RefrigeratedCase { if (this->NumWalkIns > 0) { for (int WalkInIndex = 1; WalkInIndex <= this->NumWalkIns; ++WalkInIndex) { int WalkInID = this->WalkInNum(WalkInIndex); - CalculateWalkIn(WalkInID); + WalkIn(WalkInID).CalculateWalkIn(); // increment TotalCoolingLoad for each system RefrigerationLoad += WalkIn(WalkInID).TotalCoolingLoad; TotalHotDefrostCondCredit += WalkIn(WalkInID).HotDefrostCondCredit; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 6497041e9c9..7647e51b14f 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -166,6 +166,8 @@ namespace RefrigeratedCase { Real64 KgFrostSaved; // Amount of frost on case evaporator (Kg) Real64 HotDefrostCondCredit; // Used to credit condenser when heat reclaim used for hot gas/brine defrost (W) Real64 DeltaDefrostEnergy; // Used to reverse accumulation if the zone/load time step is repeated (J) + bool ShowStoreEnergyWarning; + bool ShowFrostWarning; // Default Constructor RefrigCaseData() @@ -184,7 +186,8 @@ namespace RefrigeratedCase { ElecAntiSweatConsumption(0.0), ElecFanPower(0.0), ElecFanConsumption(0.0), ElecLightingPower(0.0), ElecLightingConsumption(0.0), ElecDefrostPower(0.0), ElecDefrostConsumption(0.0), DefEnergyCurveValue(0.0), LatEnergyCurveValue(0.0), MaxKgFrost(0.0), Rcase(0.0), DefrostEnergy(0.0), StockingEnergy(0.0), WarmEnvEnergy(0.0), KgFrost(0.0), DefrostEnergySaved(0.0), StockingEnergySaved(0.0), - WarmEnvEnergySaved(0.0), KgFrostSaved(0.0), HotDefrostCondCredit(0.0), DeltaDefrostEnergy(0.0) + WarmEnvEnergySaved(0.0), KgFrostSaved(0.0), HotDefrostCondCredit(0.0), DeltaDefrostEnergy(0.0), ShowStoreEnergyWarning(true), + ShowFrostWarning(true) { } @@ -233,6 +236,8 @@ namespace RefrigeratedCase { KgFrost = 0.0; StoredEnergy = 0.0; } + + void CalculateCase(); // Absolute pointer to refrigerated case }; struct RefrigRackData @@ -1170,6 +1175,8 @@ namespace RefrigeratedCase { Array1D SensZoneCreditCool; // Amount of sensible cooling provided to the zone (J) Array1D SensZoneCreditHeatRate; // Amount of sensible heat provided to the zone (W) Array1D SensZoneCreditHeat; // Amount of sensible heat provided to the zone (J) + bool ShowUnmetWIEnergyWarning; + bool ShowWIFrostWarning; // Default Constructor WalkInData() @@ -1181,7 +1188,7 @@ namespace RefrigeratedCase { ElecHeaterPower(0.0), ElecHeaterConsumption(0.0), ElecFanPower(0.0), ElecFanConsumption(0.0), ElecLightingPower(0.0), ElecLightingConsumption(0.0), ElecDefrostPower(0.0), ElecDefrostConsumption(0.0), TotalCoolingLoad(0.0), TotalCoolingEnergy(0.0), TotalElecPower(0.0), TotalElecConsumption(0.0), TotLatCoolingEnergyRate(0.0), TotLatCoolingEnergy(0.0), TotSensCoolingEnergyRate(0.0), - TotSensCoolingEnergy(0.0) + TotSensCoolingEnergy(0.0), ShowUnmetWIEnergyWarning(true), ShowWIFrostWarning(true) { } @@ -1206,6 +1213,8 @@ namespace RefrigeratedCase { ElecDefrostPower = 0.0; ElecDefrostConsumption = 0.0; } + + void CalculateWalkIn(); }; struct CaseWIZoneReportData @@ -1486,8 +1495,6 @@ namespace RefrigeratedCase { void InitRefrigerationPlantConnections(); - void CalculateCase(int CaseID); // Absolute pointer to refrigerated case - void SimRefrigCondenser(int SysType, std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); void UpdateRefrigCondenser(int Num, int SysType); @@ -1519,8 +1526,6 @@ namespace RefrigeratedCase { void ReportRefrigerationComponents(); - void CalculateWalkIn(int WalkInID); // Absolute pointer to Walk In - void SumZoneImpacts(); void CheckRefrigerationInput(); From 38064d7335e3ce6ffc1723997d04147fa0c3b37d Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 08:43:13 -0700 Subject: [PATCH 61/86] step 4 - partial funcitons to members --- src/EnergyPlus/RefrigeratedCase.cc | 665 ++++++++++++++--------------- src/EnergyPlus/RefrigeratedCase.hh | 48 +-- 2 files changed, 352 insertions(+), 361 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 223bf284878..7856e968a54 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -9888,10 +9888,10 @@ namespace RefrigeratedCase { Real64 StartFrostKg = this->KgFrost; // Energy form of defrost capacity (J) - Real64 DefrostEnergy = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; + Real64 defrostEnergy = DefrostCap_Actual * DataGlobals::TimeStepZoneSec; // Frost melted by defrost during a time step (kg) - Real64 FrostMeltedKg = min(DefrostEnergy / IceMeltEnthalpy, StartFrostKg); + Real64 FrostMeltedKg = min(defrostEnergy / IceMeltEnthalpy, StartFrostKg); this->KgFrost -= FrostMeltedKg; // Reduce defrost heat load on case by amount of ice melted during time step @@ -9902,7 +9902,7 @@ namespace RefrigeratedCase { if (!DataGlobals::WarmupFlag) { // avoid reverse dd test problems // keep running total of defrost energy above that needed to melt frost for use in evaluating // problems of excessive unmet loads - this->DeltaDefrostEnergy = max(0.0, (DefrostEnergy - (FrostMeltedKg * IceMeltEnthalpy))); + this->DeltaDefrostEnergy = max(0.0, (defrostEnergy - (FrostMeltedKg * IceMeltEnthalpy))); this->DefrostEnergy += this->DeltaDefrostEnergy; } // If hot brine or hot gas is used for defrost, need to reduce condenser load @@ -11088,8 +11088,8 @@ namespace RefrigeratedCase { MassFlowHiStageCompsStart = refrig_system.RefMassFlowHiStageComps; } - if (refrig_system.NumSubcoolers > 0) CalculateSubcoolers(SysNum); - CalculateCompressors(SysNum); + if (refrig_system.NumSubcoolers > 0) System(SysNum).CalculateSubcoolers(); + refrig_system.CalculateCompressors(); CalculateCondensers(SysNum); refrig_system.RefMassFlowtoLoads = refrig_system.TotalSystemLoad / (refrig_system.HCaseOut - refrig_system.HCaseIn); if (NumIter < 2) continue; @@ -11146,7 +11146,7 @@ namespace RefrigeratedCase { ++NumIter; if (TransSystem(SysNum).NumGasCoolers >= 1) CalcGasCooler(SysNum); - CalculateTransCompressors(SysNum); + TransSystem(SysNum).CalculateTransCompressors(); if (NumIter < 2) continue; if ((TransSystem(SysNum).RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { ShowSevereError("Refrigeration:TranscriticalSystem: " + TransSystem(SysNum).Name + @@ -11740,7 +11740,7 @@ namespace RefrigeratedCase { //*************************************************************************************************** //*************************************************************************************************** - void CalculateCompressors(int const SysNum) + void RefrigSystemData::CalculateCompressors() { // SUBROUTINE INFORMATION: @@ -11800,32 +11800,23 @@ namespace RefrigeratedCase { if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; Real64 const LocalTimeStepSec(LocalTimeStep * DataGlobals::SecInHour); - auto &System_SysNum(System(SysNum)); - auto const NumStages(System_SysNum.NumStages); - auto const &RefrigerantName(System_SysNum.RefrigerantName); - auto const TEvapNeeded(System_SysNum.TEvapNeeded); - auto const TCondense(System_SysNum.TCondense); - auto &RefIndex(System_SysNum.RefIndex); - auto &TIntercooler(System_SysNum.TIntercooler); - auto &HSatLiqCond(System_SysNum.HSatLiqCond); - auto &CpSatLiqCond(System_SysNum.CpSatLiqCond); - int CondID = System_SysNum.CondenserNum(1); + int CondID = this->CondenserNum(1); auto const &Condenser1(Condenser(CondID)); - Real64 const AccumLoad = max(0.0, (System_SysNum.UnmetEnergy / LocalTimeStepSec)); // Load due to previously unmet compressor loads - Real64 const NeededCapacity_base(System_SysNum.TotalSystemLoad + AccumLoad + System_SysNum.PipeHeatLoad + System_SysNum.LSHXTrans); + Real64 const AccumLoad = max(0.0, (this->UnmetEnergy / LocalTimeStepSec)); // Load due to previously unmet compressor loads + Real64 const NeededCapacity_base(this->TotalSystemLoad + AccumLoad + this->PipeHeatLoad + this->LSHXTrans); // Before dispatching compressors, zero sum of compressor outputs and zero each compressor - System_SysNum.TotCompCapacity = 0.0; - System_SysNum.RefMassFlowComps = 0.0; - System_SysNum.TotCompPower = 0.0; - if (NumStages == 2) { - System_SysNum.TotHiStageCompCapacity = 0.0; - System_SysNum.RefMassFlowHiStageComps = 0.0; - System_SysNum.TotHiStageCompPower = 0.0; + this->TotCompCapacity = 0.0; + this->RefMassFlowComps = 0.0; + this->TotCompPower = 0.0; + if (this->NumStages == 2) { + this->TotHiStageCompCapacity = 0.0; + this->RefMassFlowHiStageComps = 0.0; + this->TotHiStageCompPower = 0.0; } - for (int CompIndex = 1; CompIndex <= System_SysNum.NumCompressors; ++CompIndex) { - int CompID = System_SysNum.CompressorNum(CompIndex); + for (int CompIndex = 1; CompIndex <= this->NumCompressors; ++CompIndex) { + int CompID = this->CompressorNum(CompIndex); auto &Compressor_CompID(Compressor(CompID)); Compressor_CompID.Power = 0.0; Compressor_CompID.MassFlow = 0.0; @@ -11834,9 +11825,9 @@ namespace RefrigeratedCase { Compressor_CompID.CoolingEnergy = 0.0; Compressor_CompID.LoadFactor = 0.0; } - if (NumStages == 2) { - for (int CompIndex = 1; CompIndex <= System_SysNum.NumHiStageCompressors; ++CompIndex) { - int CompID = System_SysNum.HiStageCompressorNum(CompIndex); + if (this->NumStages == 2) { + for (int CompIndex = 1; CompIndex <= this->NumHiStageCompressors; ++CompIndex) { + int CompID = this->HiStageCompressorNum(CompIndex); auto &Compressor_CompID(Compressor(CompID)); Compressor_CompID.Power = 0.0; Compressor_CompID.MassFlow = 0.0; @@ -11848,102 +11839,102 @@ namespace RefrigeratedCase { } // Determine properties at case inlet and compressor inlet - for (int StageIndex = 1; StageIndex <= min(2, NumStages); ++StageIndex) { + for (int StageIndex = 1; StageIndex <= min(2, this->NumStages); ++StageIndex) { if (StageIndex == 1) { // Do single-stage or low-stage calculations - if (NumStages == 1) { // Single-stage system + if (this->NumStages == 1) { // Single-stage system NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet - TsatforPdisch = TCondense + DelTDischPipes; // need (Psat of (Tcond + delT corresponding to delP disch Pipes)) - TsatforPsuct = TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) - HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TEvapNeeded, 1.0, RefIndex, RoutineName); - HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); - CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); + TsatforPdisch = this->TCondense + DelTDischPipes; // need (Psat of (Tcond + delT corresponding to delP disch Pipes)) + TsatforPsuct = this->TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) + HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeeded, 1.0, this->RefIndex, RoutineName); + this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); // HCaseIn is a function of the condenser rated subcooling, not the compressor rated subcooling // TCompIn needs to include case superheat as well as Temp change from lshx subcoolers // Calculate both here unless set previously by subcooler subroutine // HCaseOut corresponds to (tevapneeded + case superheat) // future - visit how parameter 'casesuperheat' applies when using walk-ins or transfer loads - if (System_SysNum.NumSubcoolers == 0) { // No subcooler on this system - System_SysNum.HCaseIn = HSatLiqCond - CpSatLiqCond * Condenser1.RatedSubcool; - System_SysNum.TCompIn = TEvapNeeded + CaseSuperheat; //+ - System_SysNum.TLiqInActual = TCondense - Condenser1.RatedSubcool; - System_SysNum.HCompIn = System_SysNum.HCaseOut; + if (this->NumSubcoolers == 0) { // No subcooler on this system + this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * Condenser1.RatedSubcool; + this->TCompIn = this->TEvapNeeded + CaseSuperheat; //+ + this->TLiqInActual = this->TCondense - Condenser1.RatedSubcool; + this->HCompIn = this->HCaseOut; } else { // subcooler subroutine has been called to calc TCompIn and HCaseIn - System_SysNum.HCompIn = - System_SysNum.HCaseOut + System_SysNum.CpSatVapEvap * (System_SysNum.TCompIn - (TEvapNeeded + CaseSuperheat)); + this->HCompIn = + this->HCaseOut + this->CpSatVapEvap * (this->TCompIn - (this->TEvapNeeded + CaseSuperheat)); } // whether or not subcooler routine used - PSuction = FluidProperties::GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); - NumComps = System_SysNum.NumCompressors; + PSuction = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsuct, this->RefIndex, RoutineName); + NumComps = this->NumCompressors; } else { // Low-stage side of two-stage system - PCond = FluidProperties::GetSatPressureRefrig(RefrigerantName, TCondense, RefIndex, RoutineName); - PEvap = FluidProperties::GetSatPressureRefrig(RefrigerantName, TEvapNeeded, RefIndex, RoutineName); - System_SysNum.PIntercooler = std::sqrt(PCond * PEvap); - TIntercooler = FluidProperties::GetSatTemperatureRefrig(RefrigerantName, System_SysNum.PIntercooler, RefIndex, RoutineName); + PCond = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, this->TCondense, this->RefIndex, RoutineName); + PEvap = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, this->TEvapNeeded, this->RefIndex, RoutineName); + this->PIntercooler = std::sqrt(PCond * PEvap); + this->TIntercooler = FluidProperties::GetSatTemperatureRefrig(this->RefrigerantName, this->PIntercooler, this->RefIndex, RoutineName); NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet - TsatforPdisch = TIntercooler + DelTDischPipes; // need (Psat of (Tinter + delT corresponding to delP disch Pipes)) - TsatforPsuct = TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) - HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TEvapNeeded, 1.0, RefIndex, RoutineName); - HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); - CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName); + TsatforPdisch = this->TIntercooler + DelTDischPipes; // need (Psat of (Tinter + delT corresponding to delP disch Pipes)) + TsatforPsuct = this->TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) + HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeeded, 1.0, this->RefIndex, RoutineName); + this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); // HCaseIn is a function of the condenser rated subcooling, not the compressor rated subcooling // TCompIn needs to include case superheat as well as Temp change from lshx subcoolers // Calculate both here unless set previously by subcooler subroutine // HCaseOut corresponds to (tevapneeded + case superheat) - if (System_SysNum.NumSubcoolers == 0) { // No subcooler on this system - if (System_SysNum.IntercoolerType == 1) { // Flash Intercooler - System_SysNum.HCaseIn = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 0.0, RefIndex, RoutineName); - System_SysNum.TLiqInActual = TIntercooler; - } else if (System_SysNum.IntercoolerType == 2) { // Shell-and-Coil Intercooler - System_SysNum.TLiqInActual = - TCondense - Condenser1.RatedSubcool - - System_SysNum.IntercoolerEffectiveness * (TCondense - Condenser1.RatedSubcool - TIntercooler); - System_SysNum.HCaseIn = HSatLiqCond - CpSatLiqCond * (TCondense - System_SysNum.TLiqInActual); + if (this->NumSubcoolers == 0) { // No subcooler on this system + if (this->IntercoolerType == 1) { // Flash Intercooler + this->HCaseIn = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); + this->TLiqInActual = this->TIntercooler; + } else if (this->IntercoolerType == 2) { // Shell-and-Coil Intercooler + this->TLiqInActual = + this->TCondense - Condenser1.RatedSubcool - + this->IntercoolerEffectiveness * (this->TCondense - Condenser1.RatedSubcool - this->TIntercooler); + this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - this->TLiqInActual); } // IntercoolerType - System_SysNum.TCompIn = TEvapNeeded + CaseSuperheat; //+ - System_SysNum.HCompIn = System_SysNum.HCaseOut; + this->TCompIn = this->TEvapNeeded + CaseSuperheat; //+ + this->HCompIn = this->HCaseOut; } else { // subcooler subroutine has been called to calc TCompIn and HCaseIn - System_SysNum.HCompIn = - System_SysNum.HCaseOut + System_SysNum.CpSatVapEvap * (System_SysNum.TCompIn - (TEvapNeeded + CaseSuperheat)); + this->HCompIn = + this->HCaseOut + this->CpSatVapEvap * (this->TCompIn - (this->TEvapNeeded + CaseSuperheat)); } // whether or not subcooler routine used - PSuction = FluidProperties::GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); - NumComps = System_SysNum.NumCompressors; + PSuction = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsuct, this->RefIndex, RoutineName); + NumComps = this->NumCompressors; } // NumStages } else { // Two-stage system, high-stage side - NeededCapacity = NeededCapacity_base + System_SysNum.TotCompPower; - TsatforPdisch = TCondense + DelTDischPipes; - TsatforPsuct = TIntercooler; - HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); - // HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig( RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); + NeededCapacity = NeededCapacity_base + this->TotCompPower; + TsatforPdisch = this->TCondense + DelTDischPipes; + TsatforPsuct = this->TIntercooler; + HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); + // HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); ////Autodesk:Tuned These don't change for 2nd stage - // CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig( RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); + // CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); ////Autodesk:Tuned These don't change for 2nd stage - System_SysNum.HCaseIn = HSatLiqCond - CpSatLiqCond * Condenser1.RatedSubcool; - System_SysNum.TCompIn = TIntercooler; + this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * Condenser1.RatedSubcool; + this->TCompIn = this->TIntercooler; // System(SysNum)%TLiqInActual = System(SysNum)%TCondense-Condenser(System(SysNum)%CondenserNum(1))%RatedSubcool - System_SysNum.HCompIn = HsatVaporforTevapneeded; - PSuction = FluidProperties::GetSatPressureRefrig(RefrigerantName, TsatforPsuct, RefIndex, RoutineName); - NumComps = System_SysNum.NumHiStageCompressors; + this->HCompIn = HsatVaporforTevapneeded; + PSuction = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsuct, this->RefIndex, RoutineName); + NumComps = this->NumHiStageCompressors; } // StageIndex // dispatch compressors to meet load, note they were listed in compressor list in dispatch order - DensityActual = FluidProperties::GetSupHeatDensityRefrig(RefrigerantName, - System_SysNum.TCompIn, + DensityActual = FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, + this->TCompIn, PSuction, - RefIndex, + this->RefIndex, RoutineName); // Autodesk:Tuned Hoisted out of CompIndex loop - TotalEnthalpyChangeActual = System_SysNum.HCompIn - System_SysNum.HCaseIn; // Autodesk:Tuned Hoisted out of CompIndex loop - if (NumStages == 2) { // Autodesk:Tuned Hoisted out of CompIndex loop + TotalEnthalpyChangeActual = this->HCompIn - this->HCaseIn; // Autodesk:Tuned Hoisted out of CompIndex loop + if (this->NumStages == 2) { // Autodesk:Tuned Hoisted out of CompIndex loop if (StageIndex == 1) { - HCaseInRated_base = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 0.0, RefIndex, RoutineName); + HCaseInRated_base = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); } else if (StageIndex == 2) { - HCompInRated_base = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); + HCompInRated_base = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); } } for (int CompIndex = 1; CompIndex <= NumComps; ++CompIndex) { int CompID; if (StageIndex == 1) { - CompID = System_SysNum.CompressorNum(CompIndex); + CompID = this->CompressorNum(CompIndex); } else { - CompID = System_SysNum.HiStageCompressorNum(CompIndex); + CompID = this->HiStageCompressorNum(CompIndex); } // StageIndex auto &Compressor_CompID(Compressor(CompID)); @@ -11951,52 +11942,52 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(Compressor_CompID.SubcoolRatingType); if (SELECT_CASE_var == RatedSubcooling) { - if (NumStages == 1) { // Single-stage system - HCaseInRated = HSatLiqCond - CpSatLiqCond * Compressor_CompID.RatedSubcool; - } else if (NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side - HCaseInRated = HCaseInRated_base - CpSatLiqCond * Compressor_CompID.RatedSubcool; - } else if (NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side - HCaseInRated = HSatLiqCond - CpSatLiqCond * Compressor_CompID.RatedSubcool; + if (this->NumStages == 1) { // Single-stage system + HCaseInRated = this->HSatLiqCond - this->CpSatLiqCond * Compressor_CompID.RatedSubcool; + } else if (this->NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side + HCaseInRated = HCaseInRated_base - this->CpSatLiqCond * Compressor_CompID.RatedSubcool; + } else if (this->NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side + HCaseInRated = this->HSatLiqCond - this->CpSatLiqCond * Compressor_CompID.RatedSubcool; } // NumStages } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" - if (NumStages == 1) { // Single-stage system - HCaseInRated = HSatLiqCond - CpSatLiqCond * (TCondense - Compressor_CompID.RatedSubcool); - } else if (NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side - HCaseInRated = HCaseInRated_base - CpSatLiqCond * (TIntercooler - Compressor_CompID.RatedSubcool); - } else if (NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side - HCaseInRated = HSatLiqCond - CpSatLiqCond * (TCondense - Compressor_CompID.RatedSubcool); + if (this->NumStages == 1) { // Single-stage system + HCaseInRated = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - Compressor_CompID.RatedSubcool); + } else if (this->NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side + HCaseInRated = HCaseInRated_base - this->CpSatLiqCond * (this->TIntercooler - Compressor_CompID.RatedSubcool); + } else if (this->NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side + HCaseInRated = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - Compressor_CompID.RatedSubcool); } // NumStages } } // Compressor SubcoolRatingType { auto const SELECT_CASE_var(Compressor_CompID.SuperheatRatingType); if (SELECT_CASE_var == RatedSuperheat) { - if (NumStages == 1) { // Single-stage system - HCompInRated = HsatVaporforTevapneeded + System_SysNum.CpSatVapEvap * Compressor_CompID.RatedSuperheat; - TempInRated = TEvapNeeded + Compressor_CompID.RatedSuperheat; - } else if (NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side - HCompInRated = HsatVaporforTevapneeded + System_SysNum.CpSatVapEvap * Compressor_CompID.RatedSuperheat; - TempInRated = TEvapNeeded + Compressor_CompID.RatedSuperheat; - } else if (NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side - HCompInRated = HCompInRated_base + System_SysNum.CpSatVapEvap * Compressor_CompID.RatedSuperheat; - TempInRated = TIntercooler + Compressor_CompID.RatedSuperheat; + if (this->NumStages == 1) { // Single-stage system + HCompInRated = HsatVaporforTevapneeded + this->CpSatVapEvap * Compressor_CompID.RatedSuperheat; + TempInRated = this->TEvapNeeded + Compressor_CompID.RatedSuperheat; + } else if (this->NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side + HCompInRated = HsatVaporforTevapneeded + this->CpSatVapEvap * Compressor_CompID.RatedSuperheat; + TempInRated = this->TEvapNeeded + Compressor_CompID.RatedSuperheat; + } else if (this->NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side + HCompInRated = HCompInRated_base + this->CpSatVapEvap * Compressor_CompID.RatedSuperheat; + TempInRated = this->TIntercooler + Compressor_CompID.RatedSuperheat; } // NumStages } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" - if (NumStages == 1) { // Single-stage system + if (this->NumStages == 1) { // Single-stage system TempInRated = Compressor_CompID.RatedSuperheat; - HCompInRated = HsatVaporforTevapneeded + System_SysNum.CpSatVapEvap * (TempInRated - TEvapNeeded); - } else if (NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side + HCompInRated = HsatVaporforTevapneeded + this->CpSatVapEvap * (TempInRated - this->TEvapNeeded); + } else if (this->NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side TempInRated = Compressor_CompID.RatedSuperheat; - HCompInRated = HsatVaporforTevapneeded + System_SysNum.CpSatVapEvap * (TempInRated - TEvapNeeded); - } else if (NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side + HCompInRated = HsatVaporforTevapneeded + this->CpSatVapEvap * (TempInRated - this->TEvapNeeded); + } else if (this->NumStages == 2 && StageIndex == 2) { // Two-stage system, high-stage side TempInRated = Compressor_CompID.RatedSuperheat; - HCompInRated = HsatVaporforTevapneeded + System_SysNum.CpSatVapEvap * (TempInRated - TIntercooler); + HCompInRated = HsatVaporforTevapneeded + this->CpSatVapEvap * (TempInRated - this->TIntercooler); } // NumStages } } // Compressor SuperheatRatingType CaseEnthalpyChangeRated = HCompInRated - HCaseInRated; - DensityRated = FluidProperties::GetSupHeatDensityRefrig(RefrigerantName, TempInRated, PSuction, RefIndex, RoutineName); + DensityRated = FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, TempInRated, PSuction, this->RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling MassCorrection = DensityActual / DensityRated; @@ -12008,41 +11999,41 @@ namespace RefrigeratedCase { // calculate load factor for last compressor addded // assumes either cycling or part load eff = full load eff for last compressor if (StageIndex == 1) { // Single-stage or low-stage compressors - if ((System_SysNum.TotCompCapacity + Compressor_CompID.Capacity) >= NeededCapacity) { - LFLastComp = (NeededCapacity - System_SysNum.TotCompCapacity) / Compressor_CompID.Capacity; + if ((this->TotCompCapacity + Compressor_CompID.Capacity) >= NeededCapacity) { + LFLastComp = (NeededCapacity - this->TotCompCapacity) / Compressor_CompID.Capacity; Compressor_CompID.Power *= LFLastComp; Compressor_CompID.MassFlow *= LFLastComp; Compressor_CompID.Capacity *= LFLastComp; - System_SysNum.TotCompCapacity += Compressor_CompID.Capacity; - System_SysNum.RefMassFlowComps += Compressor_CompID.MassFlow; - System_SysNum.TotCompPower += Compressor_CompID.Power; + this->TotCompCapacity += Compressor_CompID.Capacity; + this->RefMassFlowComps += Compressor_CompID.MassFlow; + this->TotCompPower += Compressor_CompID.Power; Compressor_CompID.ElecConsumption = Compressor_CompID.Power * LocalTimeStepSec; Compressor_CompID.CoolingEnergy = Compressor_CompID.Capacity * LocalTimeStepSec; Compressor_CompID.LoadFactor = LFLastComp; break; // numcomps do } else { //>= needed capacity - System_SysNum.TotCompCapacity += Compressor_CompID.Capacity; - System_SysNum.RefMassFlowComps += Compressor_CompID.MassFlow; - System_SysNum.TotCompPower += Compressor_CompID.Power; + this->TotCompCapacity += Compressor_CompID.Capacity; + this->RefMassFlowComps += Compressor_CompID.MassFlow; + this->TotCompPower += Compressor_CompID.Power; } //>= needed capacity } else { // high-stage compressors (for two-stage systems only) - if ((System_SysNum.TotHiStageCompCapacity + Compressor_CompID.Capacity) >= NeededCapacity) { - LFLastComp = (NeededCapacity - System_SysNum.TotHiStageCompCapacity) / Compressor_CompID.Capacity; + if ((this->TotHiStageCompCapacity + Compressor_CompID.Capacity) >= NeededCapacity) { + LFLastComp = (NeededCapacity - this->TotHiStageCompCapacity) / Compressor_CompID.Capacity; Compressor_CompID.Power *= LFLastComp; Compressor_CompID.MassFlow *= LFLastComp; Compressor_CompID.Capacity *= LFLastComp; - System_SysNum.TotHiStageCompCapacity += Compressor_CompID.Capacity; - System_SysNum.RefMassFlowHiStageComps += Compressor_CompID.MassFlow; - System_SysNum.TotHiStageCompPower += Compressor_CompID.Power; - System_SysNum.FlowRatioIntercooler = System_SysNum.RefMassFlowComps / System_SysNum.RefMassFlowHiStageComps; + this->TotHiStageCompCapacity += Compressor_CompID.Capacity; + this->RefMassFlowHiStageComps += Compressor_CompID.MassFlow; + this->TotHiStageCompPower += Compressor_CompID.Power; + this->FlowRatioIntercooler = this->RefMassFlowComps / this->RefMassFlowHiStageComps; Compressor_CompID.ElecConsumption = Compressor_CompID.Power * LocalTimeStepSec; Compressor_CompID.CoolingEnergy = Compressor_CompID.Capacity * LocalTimeStepSec; Compressor_CompID.LoadFactor = LFLastComp; break; // numcomps do } else { //>= needed capacity - System_SysNum.TotHiStageCompCapacity += Compressor_CompID.Capacity; - System_SysNum.RefMassFlowHiStageComps += Compressor_CompID.MassFlow; - System_SysNum.TotHiStageCompPower += Compressor_CompID.Power; + this->TotHiStageCompCapacity += Compressor_CompID.Capacity; + this->RefMassFlowHiStageComps += Compressor_CompID.MassFlow; + this->TotHiStageCompPower += Compressor_CompID.Power; } //>= needed capacity } // StageIndex Compressor_CompID.ElecConsumption = Compressor_CompID.Power * LocalTimeStepSec; @@ -12052,42 +12043,42 @@ namespace RefrigeratedCase { } // Calculate enthalpy at compressor discharge - if (NumStages == 1) { // Single-stage or low-stage compressors - System_SysNum.HCompOut = System_SysNum.HCompIn + System_SysNum.TotCompPower / System_SysNum.RefMassFlowComps; + if (this->NumStages == 1) { // Single-stage or low-stage compressors + this->HCompOut = this->HCompIn + this->TotCompPower / this->RefMassFlowComps; // error found 9/19/2011, was System(SysNum)%TotCompPower*LocalTimeStep*DataGlobals::SecInHour/System(SysNum)%RefMassFlowComps } else { // High-stage compressors (only for two-stage systems) - HHiStageCompIn = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TIntercooler, 1.0, RefIndex, RoutineName); - System_SysNum.HCompOut = HHiStageCompIn + System_SysNum.TotHiStageCompPower / System_SysNum.RefMassFlowHiStageComps; + HHiStageCompIn = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); + this->HCompOut = HHiStageCompIn + this->TotHiStageCompPower / this->RefMassFlowHiStageComps; } // Calculate superheat energy available for desuperheaters - HSatVapCondense = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); - CpSatVapCondense = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, System_SysNum.TCondense, 1.0, RefIndex, RoutineName); - if (NumStages == 1) { // Single-stage systems - DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowComps * (System_SysNum.HCompOut - HSatVapCondense); + HSatVapCondense = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 1.0, this->RefIndex, RoutineName); + CpSatVapCondense = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 1.0, this->RefIndex, RoutineName); + if (this->NumStages == 1) { // Single-stage systems + DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = this->RefMassFlowComps * (this->HCompOut - HSatVapCondense); } else { // Two-stage systems - DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = System_SysNum.RefMassFlowHiStageComps * (System_SysNum.HCompOut - HSatVapCondense); - } // NumStages + DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = this->RefMassFlowHiStageComps * (this->HCompOut - HSatVapCondense); + } // this->NumStages // No function available to get Tout as f(Pout, Hout), so use estimate based on constant cp in superheat range... // Use average of Tcondense and Tout of condenser as check for whether heat reclaim is reasonable. - TCompOutEstimate = System_SysNum.TCondense + (System_SysNum.HCompOut - HSatVapCondense) / CpSatVapCondense; + TCompOutEstimate = this->TCondense + (this->HCompOut - HSatVapCondense) / CpSatVapCondense; DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailTemperature = (TsatforPdisch + TCompOutEstimate) / 2.0; - System_SysNum.AverageCompressorCOP = System_SysNum.TotCompCapacity / (System_SysNum.TotCompPower + System_SysNum.TotHiStageCompPower); - System_SysNum.TotCompElecConsump = System_SysNum.TotCompPower * LocalTimeStepSec; - if (NumStages == 2) { - System_SysNum.TotHiStageCompElecConsump = System_SysNum.TotHiStageCompPower * LocalTimeStepSec; - System_SysNum.TotCompElecConsumpTwoStage = System_SysNum.TotCompElecConsump + System_SysNum.TotHiStageCompElecConsump; + this->AverageCompressorCOP = this->TotCompCapacity / (this->TotCompPower + this->TotHiStageCompPower); + this->TotCompElecConsump = this->TotCompPower * LocalTimeStepSec; + if (this->NumStages == 2) { + this->TotHiStageCompElecConsump = this->TotHiStageCompPower * LocalTimeStepSec; + this->TotCompElecConsumpTwoStage = this->TotCompElecConsump + this->TotHiStageCompElecConsump; } - System_SysNum.TotCompCoolingEnergy = System_SysNum.TotCompCapacity * LocalTimeStepSec; - System_SysNum.TotHiStageCompCoolingEnergy = System_SysNum.TotHiStageCompCapacity * LocalTimeStepSec; + this->TotCompCoolingEnergy = this->TotCompCapacity * LocalTimeStepSec; + this->TotHiStageCompCoolingEnergy = this->TotHiStageCompCapacity * LocalTimeStepSec; } //*************************************************************************************************** //*************************************************************************************************** - void CalculateTransCompressors(int const SysNum) + void TransRefrigSystemData::CalculateTransCompressors() { // SUBROUTINE INFORMATION: @@ -12181,52 +12172,52 @@ namespace RefrigeratedCase { // Load due to previously unmet low temperature compressor loads (transcritical system) Real64 AccumLoadLT = 0.0; NeededCapacityLT = 0.0; - if (TransSystem(SysNum).TransSysType == 2) { - AccumLoadLT = max(0.0, (TransSystem(SysNum).UnmetEnergyLT / LocalTimeStep / DataGlobals::SecInHour)); - NeededCapacityLT = TransSystem(SysNum).TotalSystemLoadLT + AccumLoadLT + TransSystem(SysNum).PipeHeatLoadLT; + if (this->TransSysType == 2) { + AccumLoadLT = max(0.0, (this->UnmetEnergyLT / LocalTimeStep / DataGlobals::SecInHour)); + NeededCapacityLT = this->TotalSystemLoadLT + AccumLoadLT + this->PipeHeatLoadLT; } // (TransSystem(SysNum)%TransSysType == 2) // Load due to previously unmet medium temperature compressor loads (transcritical system) - Real64 AccumLoadMT = max(0.0, (TransSystem(SysNum).UnmetEnergyMT / LocalTimeStep / DataGlobals::SecInHour)); - NeededCapacityMT = TransSystem(SysNum).TotalSystemLoadMT + AccumLoadMT + TransSystem(SysNum).PipeHeatLoadMT; + Real64 AccumLoadMT = max(0.0, (this->UnmetEnergyMT / LocalTimeStep / DataGlobals::SecInHour)); + NeededCapacityMT = this->TotalSystemLoadMT + AccumLoadMT + this->PipeHeatLoadMT; // Determine refrigerant properties at receiver - TransSystem(SysNum).CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 0.0, TransSystem(SysNum).RefIndex, RoutineName); + this->CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig( + this->RefrigerantName, this->TReceiver, 0.0, this->RefIndex, RoutineName); // Enthalpy at the receiver bypass, J/kg Real64 HReceiverBypass = - FluidProperties::GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, 1.0, TransSystem(SysNum).RefIndex, RoutineName); + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TReceiver, 1.0, this->RefIndex, RoutineName); // Determine refrigerant properties at low temperature (LT) loads (if present) // Dispatch low pressure (LP) compressors as necessary - if (TransSystem(SysNum).TransSysType == 2) { // LT side of TwoStage transcritical system - TransSystem(SysNum).HCaseInLT = TransSystem(SysNum).HSatLiqReceiver; + if (this->TransSysType == 2) { // LT side of TwoStage transcritical system + this->HCaseInLT = this->HSatLiqReceiver; // TCompInLP and HCompInLP include case superheat plus effect of suction line heat gain - TransSystem(SysNum).TCompInLP = - TransSystem(SysNum).TEvapNeededLT + TransCaseSuperheat + - TransSystem(SysNum).PipeHeatLoadLT / (TransSystem(SysNum).CpSatVapEvapLT * TransSystem(SysNum).RefMassFlowtoLTLoads); - TransSystem(SysNum).HCompInLP = - TransSystem(SysNum).HCaseOutLT + TransSystem(SysNum).PipeHeatLoadLT / TransSystem(SysNum).RefMassFlowtoLTLoads; - TsatforPsucLT = TransSystem(SysNum).TEvapNeededLT; - TsatforPdisLT = TransSystem(SysNum).TEvapNeededMT; + this->TCompInLP = + this->TEvapNeededLT + TransCaseSuperheat + + this->PipeHeatLoadLT / (this->CpSatVapEvapLT * this->RefMassFlowtoLTLoads); + this->HCompInLP = + this->HCaseOutLT + this->PipeHeatLoadLT / this->RefMassFlowtoLTLoads; + TsatforPsucLT = this->TEvapNeededLT; + TsatforPdisLT = this->TEvapNeededMT; HsatVaporforTevapneededLT = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededLT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, this->TEvapNeededLT, 1.0, this->RefIndex, RoutineName); HsatLiqforTevapNeededMT = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 0.0, TransSystem(SysNum).RefIndex, RoutineName); - PSuctionLT = FluidProperties::GetSatPressureRefrig(TransSystem(SysNum).RefrigerantName, TsatforPsucLT, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, this->TEvapNeededMT, 0.0, this->RefIndex, RoutineName); + PSuctionLT = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsucLT, this->RefIndex, RoutineName); DensityActualLT = FluidProperties::GetSupHeatDensityRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TCompInLP, PSuctionLT, TransSystem(SysNum).RefIndex, RoutineName); - TotalEnthalpyChangeActualLT = TransSystem(SysNum).HCompInLP - TransSystem(SysNum).HCaseInLT; + this->RefrigerantName, this->TCompInLP, PSuctionLT, this->RefIndex, RoutineName); + TotalEnthalpyChangeActualLT = this->HCompInLP - this->HCaseInLT; // Dispatch low pressure (LP) compressors // Before dispatching LP compressors, zero sum of compressor outputs and zero each compressor - TransSystem(SysNum).TotCompCapacityLP = 0.0; - TransSystem(SysNum).RefMassFlowCompsLP = 0.0; - TransSystem(SysNum).TotCompPowerLP = 0.0; + this->TotCompCapacityLP = 0.0; + this->RefMassFlowCompsLP = 0.0; + this->TotCompPowerLP = 0.0; - for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsLP; ++CompIndex) { - int CompID = TransSystem(SysNum).CompressorNumLP(CompIndex); + for (int CompIndex = 1; CompIndex <= this->NumCompressorsLP; ++CompIndex) { + int CompID = this->CompressorNumLP(CompIndex); Compressor(CompID).Power = 0.0; Compressor(CompID).MassFlow = 0.0; Compressor(CompID).Capacity = 0.0; @@ -12235,36 +12226,36 @@ namespace RefrigeratedCase { Compressor(CompID).LoadFactor = 0.0; } - for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsLP; ++CompIndex) { - int CompID = TransSystem(SysNum).CompressorNumLP(CompIndex); + for (int CompIndex = 1; CompIndex <= this->NumCompressorsLP; ++CompIndex) { + int CompID = this->CompressorNumLP(CompIndex); // need to use indiv compressor's rated subcool and superheat to adjust capacity to actual conditions { auto const SELECT_CASE_var(Compressor(CompID).SubcoolRatingType); if (SELECT_CASE_var == RatedSubcooling) { - HCaseInRatedLT = HsatLiqforTevapNeededMT - TransSystem(SysNum).CpSatLiqReceiver * Compressor(CompID).RatedSubcool; + HCaseInRatedLT = HsatLiqforTevapNeededMT - this->CpSatLiqReceiver * Compressor(CompID).RatedSubcool; } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" HCaseInRatedLT = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, this->RefIndex, RoutineName); } } { auto const SELECT_CASE_var(Compressor(CompID).SuperheatRatingType); if (SELECT_CASE_var == RatedSuperheat) { - HCompInRatedLP = HsatVaporforTevapneededLT + TransSystem(SysNum).CpSatVapEvapLT * Compressor(CompID).RatedSuperheat; - TempInRatedLP = TransSystem(SysNum).TEvapNeededLT + Compressor(CompID).RatedSuperheat; + HCompInRatedLP = HsatVaporforTevapneededLT + this->CpSatVapEvapLT * Compressor(CompID).RatedSuperheat; + TempInRatedLP = this->TEvapNeededLT + Compressor(CompID).RatedSuperheat; } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" TempInRatedLP = Compressor(CompID).RatedSuperheat; - HCompInRatedLP = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + HCompInRatedLP = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Compressor(CompID).RatedSuperheat, PSuctionLT, - TransSystem(SysNum).RefIndex, + this->RefIndex, RoutineName); } } CaseEnthalpyChangeRatedLT = HCompInRatedLP - HCaseInRatedLT; DensityRatedLP = FluidProperties::GetSupHeatDensityRefrig( - TransSystem(SysNum).RefrigerantName, TempInRatedLP, PSuctionLT, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, TempInRatedLP, PSuctionLT, this->RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling @@ -12277,143 +12268,143 @@ namespace RefrigeratedCase { Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = 1.0; - if ((TransSystem(SysNum).TotCompCapacityLP + Compressor(CompID).Capacity) >= NeededCapacityLT) { - LFLastComp = (NeededCapacityLT - TransSystem(SysNum).TotCompCapacityLP) / Compressor(CompID).Capacity; + if ((this->TotCompCapacityLP + Compressor(CompID).Capacity) >= NeededCapacityLT) { + LFLastComp = (NeededCapacityLT - this->TotCompCapacityLP) / Compressor(CompID).Capacity; Compressor(CompID).Power *= LFLastComp; Compressor(CompID).MassFlow *= LFLastComp; Compressor(CompID).Capacity *= LFLastComp; - TransSystem(SysNum).TotCompCapacityLP += Compressor(CompID).Capacity; - TransSystem(SysNum).RefMassFlowCompsLP += Compressor(CompID).MassFlow; - TransSystem(SysNum).TotCompPowerLP += Compressor(CompID).Power; + this->TotCompCapacityLP += Compressor(CompID).Capacity; + this->RefMassFlowCompsLP += Compressor(CompID).MassFlow; + this->TotCompPowerLP += Compressor(CompID).Power; Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = LFLastComp; break; } else { - TransSystem(SysNum).TotCompCapacityLP += Compressor(CompID).Capacity; - TransSystem(SysNum).RefMassFlowCompsLP += Compressor(CompID).MassFlow; - TransSystem(SysNum).TotCompPowerLP += Compressor(CompID).Power; + this->TotCompCapacityLP += Compressor(CompID).Capacity; + this->RefMassFlowCompsLP += Compressor(CompID).MassFlow; + this->TotCompPowerLP += Compressor(CompID).Power; } } // NumCompressorsLP - TransSystem(SysNum).HCompOutLP = - TransSystem(SysNum).HCompInLP + TransSystem(SysNum).TotCompPowerLP / TransSystem(SysNum).RefMassFlowCompsLP; + this->HCompOutLP = + this->HCompInLP + this->TotCompPowerLP / this->RefMassFlowCompsLP; } // (TransSystem(SysNum)%TransSysType == 2) // Determine refrigerant properties at medium temperature (MT) loads // Dispatch high pressure (HP) compressors as necessary - TsatforPsucMT = TransSystem(SysNum).TEvapNeededMT; - if (GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TransOpFlag) { // Transcritical system is operating in transcritical region - HGCOutlet = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut; + TsatforPsucMT = this->TEvapNeededMT; + if (GasCooler(this->GasCoolerNum(1)).TransOpFlag) { // Transcritical system is operating in transcritical region + HGCOutlet = GasCooler(this->GasCoolerNum(1)).HGasCoolerOut; } else { // Transcritical system is operating in subcritical region - TsatforPdisMT = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TGasCoolerOut; + TsatforPdisMT = GasCooler(this->GasCoolerNum(1)).TGasCoolerOut; } - PSuctionMT = FluidProperties::GetSatPressureRefrig(TransSystem(SysNum).RefrigerantName, TsatforPsucMT, TransSystem(SysNum).RefIndex, RoutineName); - PGCOutlet = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).PGasCoolerOut; + PSuctionMT = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsucMT, this->RefIndex, RoutineName); + PGCOutlet = GasCooler(this->GasCoolerNum(1)).PGasCoolerOut; HsatVaporforTevapneededMT = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededMT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); - TransSystem(SysNum).HCaseInMT = TransSystem(SysNum).HSatLiqReceiver; + this->RefrigerantName, this->TEvapNeededMT, 1.0, this->RefIndex, RoutineName); + this->HCaseInMT = this->HSatLiqReceiver; // Enthalpy of refrigerant after leaving medium temperature loads and low pressure compressors // Combined enthalpy from the outlets of the LP compressor and MT loads, J/kg - Real64 HCaseOutLTMT = (TransSystem(SysNum).RefMassFlowtoLTLoads * TransSystem(SysNum).HCompOutLP + - TransSystem(SysNum).RefMassFlowtoMTLoads * TransSystem(SysNum).HCaseOutMT + TransSystem(SysNum).PipeHeatLoadMT) / - (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads); + Real64 HCaseOutLTMT = (this->RefMassFlowtoLTLoads * this->HCompOutLP + + this->RefMassFlowtoMTLoads * this->HCaseOutMT + this->PipeHeatLoadMT) / + (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads); // Total refrigerant flow rate is total flow from LT and MT loads divided by (1-x) where x is the quality of the // refrigerant entering the receiver. The receiver bypass flow rate is (x)*(Total Flow). // Iterate to find the quality of the refrigerant entering the receiver. Xu = 1.0; // upper bound on quality Xl = 0.0; // lower bound on quality - if ((GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut + TransSystem(SysNum).DelHSubcoolerDis) > - TransSystem(SysNum).HSatLiqReceiver) { + if ((GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis) > + this->HSatLiqReceiver) { for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations to find receiver quality QualityReceiver = (Xu + Xl) / 2.0; Hnew = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TReceiver, QualityReceiver, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, this->TReceiver, QualityReceiver, this->RefIndex, RoutineName); // estimated QualityReceiver is too high - if (Hnew > (GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut + TransSystem(SysNum).DelHSubcoolerDis)) { + if (Hnew > (GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis)) { Xu = QualityReceiver; } else { // estimated QualityReceiver is too low Xl = QualityReceiver; } - if (std::abs((Hnew - (GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut + TransSystem(SysNum).DelHSubcoolerDis)) / Hnew) < + if (std::abs((Hnew - (GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis)) / Hnew) < ErrorTol) break; } - TotalRefMassFlow = (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads) / (1.0 - QualityReceiver); - TransSystem(SysNum).RefMassFlowReceiverBypass = QualityReceiver * TotalRefMassFlow; + TotalRefMassFlow = (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads) / (1.0 - QualityReceiver); + this->RefMassFlowReceiverBypass = QualityReceiver * TotalRefMassFlow; } else { - TransSystem(SysNum).RefMassFlowReceiverBypass = 0.0; - TotalRefMassFlow = (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads); + this->RefMassFlowReceiverBypass = 0.0; + TotalRefMassFlow = (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads); } // %HGasCoolerOut > TransSystem(SysNum)%HSatLiqReceiver) - TransSystem(SysNum).HCompInHP = - (HCaseOutLTMT * (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads) + - HReceiverBypass * TransSystem(SysNum).RefMassFlowReceiverBypass) / - (TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads + TransSystem(SysNum).RefMassFlowReceiverBypass); + this->HCompInHP = + (HCaseOutLTMT * (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads) + + HReceiverBypass * this->RefMassFlowReceiverBypass) / + (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads + this->RefMassFlowReceiverBypass); // Iterate to find the suction temperature entering subcooler - Xl = FluidProperties::GetSatTemperatureRefrig(TransSystem(SysNum).RefrigerantName, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + Xl = FluidProperties::GetSatTemperatureRefrig(this->RefrigerantName, PSuctionMT, this->RefIndex, RoutineName); Xu = Xl + 50.0; for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations Xnew = (Xu + Xl) / 2.0; - Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Xnew, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); - if (Hnew > TransSystem(SysNum).HCompInHP) { // xnew is too high + Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Xnew, PSuctionMT, this->RefIndex, RoutineName); + if (Hnew > this->HCompInHP) { // xnew is too high Xu = Xnew; } else { // xnew is too low Xl = Xnew; } - if (std::abs((Hnew - TransSystem(SysNum).HCompInHP) / Hnew) < ErrorTol) break; + if (std::abs((Hnew - this->HCompInHP) / Hnew) < ErrorTol) break; } TSubcoolerColdIn = Xnew; // Modify receiver inlet enthalpy and HP compressor inlet enthalpy to account for subcooler - HIdeal = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, - GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TGasCoolerOut, + HIdeal = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, + GasCooler(this->GasCoolerNum(1)).TGasCoolerOut, PSuctionMT, - TransSystem(SysNum).RefIndex, + this->RefIndex, RoutineName); // Only use subcooler if suction gas inlet temperature less than gas cooler outlet temperature - if (TSubcoolerColdIn < GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TGasCoolerOut) { - SubcoolEffect = TransSystem(SysNum).SCEffectiveness; + if (TSubcoolerColdIn < GasCooler(this->GasCoolerNum(1)).TGasCoolerOut) { + SubcoolEffect = this->SCEffectiveness; } else { SubcoolEffect = 0.0; } // (TSubcoolerColdIn < GasCooler(SysNum)%TGasCoolerOut) - TransSystem(SysNum).DelHSubcoolerSuc = SubcoolEffect * (HIdeal - TransSystem(SysNum).HCompInHP); - TransSystem(SysNum).HCompInHP += TransSystem(SysNum).DelHSubcoolerSuc; - TransSystem(SysNum).DelHSubcoolerDis = -TransSystem(SysNum).DelHSubcoolerSuc; + this->DelHSubcoolerSuc = SubcoolEffect * (HIdeal - this->HCompInHP); + this->HCompInHP += this->DelHSubcoolerSuc; + this->DelHSubcoolerDis = -this->DelHSubcoolerSuc; // Iterate to find the temperature at the inlet of the high pressure (HP) compressors - Xl = FluidProperties::GetSatTemperatureRefrig(TransSystem(SysNum).RefrigerantName, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + Xl = FluidProperties::GetSatTemperatureRefrig(this->RefrigerantName, PSuctionMT, this->RefIndex, RoutineName); Xu = Xl + 50.0; for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations Xnew = (Xu + Xl) / 2.0; - Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, Xnew, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); - if (Hnew > TransSystem(SysNum).HCompInHP) { // xnew is too high + Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Xnew, PSuctionMT, this->RefIndex, RoutineName); + if (Hnew > this->HCompInHP) { // xnew is too high Xu = Xnew; } else { // xnew is too low Xl = Xnew; } - if (std::abs((Hnew - TransSystem(SysNum).HCompInHP) / Hnew) < ErrorTol) break; + if (std::abs((Hnew - this->HCompInHP) / Hnew) < ErrorTol) break; } - TransSystem(SysNum).TCompInHP = Xnew; + this->TCompInHP = Xnew; // For capacity correction of HP compressors, consider subcooler, receiver, MT loads, LT loads and LP compressors // to constitute the "load". The actual and rated conditions at the exit of the gas cooler and the inlet of the // HP compressors are used for capacity correction calculations. DensityActualMT = FluidProperties::GetSupHeatDensityRefrig( - TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TCompInHP, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); - TotalEnthalpyChangeActualMT = TransSystem(SysNum).HCompInHP - GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut; + this->RefrigerantName, this->TCompInHP, PSuctionMT, this->RefIndex, RoutineName); + TotalEnthalpyChangeActualMT = this->HCompInHP - GasCooler(this->GasCoolerNum(1)).HGasCoolerOut; // Dispatch HP compressors // Before dispatching HP compressors, zero sum of compressor outputs and zero each compressor - TransSystem(SysNum).TotCompCapacityHP = 0.0; - TransSystem(SysNum).RefMassFlowCompsHP = 0.0; - TransSystem(SysNum).TotCompPowerHP = 0.0; + this->TotCompCapacityHP = 0.0; + this->RefMassFlowCompsHP = 0.0; + this->TotCompPowerHP = 0.0; - for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsHP; ++CompIndex) { - int CompID = TransSystem(SysNum).CompressorNumHP(CompIndex); + for (int CompIndex = 1; CompIndex <= this->NumCompressorsHP; ++CompIndex) { + int CompID = this->CompressorNumHP(CompIndex); Compressor(CompID).Power = 0.0; Compressor(CompID).MassFlow = 0.0; Compressor(CompID).Capacity = 0.0; @@ -12423,8 +12414,8 @@ namespace RefrigeratedCase { } // Dispatch High Pressure compressors to meet load, note they were listed in compressor list in dispatch order - for (int CompIndex = 1; CompIndex <= TransSystem(SysNum).NumCompressorsHP; ++CompIndex) { - int CompID = TransSystem(SysNum).CompressorNumHP(CompIndex); + for (int CompIndex = 1; CompIndex <= this->NumCompressorsHP; ++CompIndex) { + int CompID = this->CompressorNumHP(CompIndex); // Need to use indiv compressor's rated subcool and superheat to adjust capacity to actual conditions // Transcritical operation requires rated superheat @@ -12432,45 +12423,45 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(Compressor(CompID).SubcoolRatingType); if (SELECT_CASE_var == RatedSubcooling) { - if (!GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TransOpFlag) { // Subcritical operation - HCaseInRatedMT = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut - - GasCooler(TransSystem(SysNum).GasCoolerNum(1)).CpGasCoolerOut * Compressor(CompID).RatedSubcool; + if (!GasCooler(this->GasCoolerNum(1)).TransOpFlag) { // Subcritical operation + HCaseInRatedMT = GasCooler(this->GasCoolerNum(1)).HGasCoolerOut - + GasCooler(this->GasCoolerNum(1)).CpGasCoolerOut * Compressor(CompID).RatedSubcool; } else { // Transcritical operation - HCaseInRatedMT = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut; + HCaseInRatedMT = GasCooler(this->GasCoolerNum(1)).HGasCoolerOut; } // (.NOT.GasCooler(SysNum)%TransOpFlag) } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" - if (!GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TransOpFlag) { // Subcritical operation + if (!GasCooler(this->GasCoolerNum(1)).TransOpFlag) { // Subcritical operation HCaseInRatedMT = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, this->RefIndex, RoutineName); } else { // Transcritical operation - HCaseInRatedMT = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).HGasCoolerOut; + HCaseInRatedMT = GasCooler(this->GasCoolerNum(1)).HGasCoolerOut; } // (.NOT.GasCooler(SysNum)%TransOpFlag) } } { auto const SELECT_CASE_var(Compressor(CompID).SuperheatRatingType); if (SELECT_CASE_var == RatedSuperheat) { - HCompInRatedHP = HsatVaporforTevapneededMT + TransSystem(SysNum).CpSatVapEvapMT * Compressor(CompID).RatedSuperheat; - TempInRatedHP = TransSystem(SysNum).TEvapNeededMT + Compressor(CompID).RatedSuperheat; + HCompInRatedHP = HsatVaporforTevapneededMT + this->CpSatVapEvapMT * Compressor(CompID).RatedSuperheat; + TempInRatedHP = this->TEvapNeededMT + Compressor(CompID).RatedSuperheat; } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" TempInRatedHP = Compressor(CompID).RatedSuperheat; - HCompInRatedHP = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + HCompInRatedHP = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Compressor(CompID).RatedSuperheat, PSuctionMT, - TransSystem(SysNum).RefIndex, + this->RefIndex, RoutineName); } } CaseEnthalpyChangeRatedMT = HCompInRatedHP - HCaseInRatedMT; DensityRatedHP = - FluidProperties::GetSupHeatDensityRefrig(TransSystem(SysNum).RefrigerantName, TempInRatedHP, PSuctionMT, TransSystem(SysNum).RefIndex, RoutineName); + FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, TempInRatedHP, PSuctionMT, this->RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling MassCorrectionMT = DensityActualMT / DensityRatedHP; CapacityCorrectionMT = MassCorrectionMT * TotalEnthalpyChangeActualMT / CaseEnthalpyChangeRatedMT; - if (GasCooler(TransSystem(SysNum).GasCoolerNum(1)).TransOpFlag) { // System is operating in transcritical region + if (GasCooler(this->GasCoolerNum(1)).TransOpFlag) { // System is operating in transcritical region Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).TransElecPowerCurvePtr, TsatforPsucMT, PGCOutlet); Compressor(CompID).Capacity = CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).TransCapacityCurvePtr, TsatforPsucMT, HGCOutlet); } else { // System is operating in subcritical region @@ -12479,46 +12470,46 @@ namespace RefrigeratedCase { } // (GasCooler(SysNum)%TransOpFlag) // Mass flow through HP compressors is HP compressor refrigerating capacity divided by MT load, LT load and LP compressor power Compressor(CompID).MassFlow = - TotalRefMassFlow * Compressor(CompID).Capacity / (NeededCapacityMT + NeededCapacityLT + TransSystem(SysNum).TotCompPowerLP); + TotalRefMassFlow * Compressor(CompID).Capacity / (NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP); Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = 1.0; // calculate load factor for last compressor addded // assumes either cycling or part load eff = full load eff for last compressor - if ((TransSystem(SysNum).TotCompCapacityHP + Compressor(CompID).Capacity) >= - (NeededCapacityMT + NeededCapacityLT + TransSystem(SysNum).TotCompPowerLP)) { - LFLastComp = ((NeededCapacityMT + NeededCapacityLT + TransSystem(SysNum).TotCompPowerLP) - TransSystem(SysNum).TotCompCapacityHP) / + if ((this->TotCompCapacityHP + Compressor(CompID).Capacity) >= + (NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP)) { + LFLastComp = ((NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP) - this->TotCompCapacityHP) / Compressor(CompID).Capacity; Compressor(CompID).Power *= LFLastComp; Compressor(CompID).MassFlow *= LFLastComp; Compressor(CompID).Capacity *= LFLastComp; - TransSystem(SysNum).TotCompCapacityHP += Compressor(CompID).Capacity; - TransSystem(SysNum).RefMassFlowCompsHP += Compressor(CompID).MassFlow; - TransSystem(SysNum).TotCompPowerHP += Compressor(CompID).Power; + this->TotCompCapacityHP += Compressor(CompID).Capacity; + this->RefMassFlowCompsHP += Compressor(CompID).MassFlow; + this->TotCompPowerHP += Compressor(CompID).Power; Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = LFLastComp; break; } else { - TransSystem(SysNum).TotCompCapacityHP += Compressor(CompID).Capacity; - TransSystem(SysNum).RefMassFlowCompsHP += Compressor(CompID).MassFlow; - TransSystem(SysNum).TotCompPowerHP += Compressor(CompID).Power; + this->TotCompCapacityHP += Compressor(CompID).Capacity; + this->RefMassFlowCompsHP += Compressor(CompID).MassFlow; + this->TotCompPowerHP += Compressor(CompID).Power; } } // NumCompressorsHP - TransSystem(SysNum).HCompOutHP = TransSystem(SysNum).HCompInHP + TransSystem(SysNum).TotCompPowerHP / TransSystem(SysNum).RefMassFlowCompsHP; - TransSystem(SysNum).RefMassFlowComps = TransSystem(SysNum).RefMassFlowCompsLP + TransSystem(SysNum).RefMassFlowCompsHP; - TransSystem(SysNum).TotCompCapacity = TransSystem(SysNum).TotCompCapacityHP + TransSystem(SysNum).TotCompCapacityLP; - TransSystem(SysNum).AverageCompressorCOP = (TransSystem(SysNum).TotCompCapacityHP - TransSystem(SysNum).TotCompPowerLP) / - (TransSystem(SysNum).TotCompPowerLP + TransSystem(SysNum).TotCompPowerHP); - TransSystem(SysNum).TotCompElecConsump = - (TransSystem(SysNum).TotCompPowerLP + TransSystem(SysNum).TotCompPowerHP) * LocalTimeStep * DataGlobals::SecInHour; - TransSystem(SysNum).TotCompCoolingEnergy = - (TransSystem(SysNum).TotCompCapacityLP + TransSystem(SysNum).TotCompCapacityHP) * LocalTimeStep * DataGlobals::SecInHour; + this->HCompOutHP = this->HCompInHP + this->TotCompPowerHP / this->RefMassFlowCompsHP; + this->RefMassFlowComps = this->RefMassFlowCompsLP + this->RefMassFlowCompsHP; + this->TotCompCapacity = this->TotCompCapacityHP + this->TotCompCapacityLP; + this->AverageCompressorCOP = (this->TotCompCapacityHP - this->TotCompPowerLP) / + (this->TotCompPowerLP + this->TotCompPowerHP); + this->TotCompElecConsump = + (this->TotCompPowerLP + this->TotCompPowerHP) * LocalTimeStep * DataGlobals::SecInHour; + this->TotCompCoolingEnergy = + (this->TotCompCapacityLP + this->TotCompCapacityHP) * LocalTimeStep * DataGlobals::SecInHour; } - void CalculateSubcoolers(int const SysNum) + void RefrigSystemData::CalculateSubcoolers() { // SUBROUTINE INFORMATION: @@ -12539,63 +12530,63 @@ namespace RefrigeratedCase { // ASHRAE 1006 Section 2: Refrigeration Accessories static std::string const RoutineName("CalculateSubcoolers"); - Real64 TLiqInActual(0.0); // Liquid T in, after condenser, before any mechanical subcooler + Real64 TLiqInActualLocal(0.0); // Liquid T in, after condenser, before any mechanical subcooler Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; // HCaseIn has to be recalculated as the starting point for the subcoolers here because // of the multiple number of iterations through this subroutine and because Tcondense is evolving. - if (System(SysNum).NumStages == 1) { // Single-stage compression system - System(SysNum).HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).CpSatLiqCond = - FluidProperties::GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).HCaseIn = - System(SysNum).HSatLiqCond - System(SysNum).CpSatLiqCond * Condenser(System(SysNum).CondenserNum(1)).RatedSubcool; + if (this->NumStages == 1) { // Single-stage compression system + this->HSatLiqCond = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = + FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->HCaseIn = + this->HSatLiqCond - this->CpSatLiqCond * Condenser(this->CondenserNum(1)).RatedSubcool; // Two-stage compression with flash intercooler - } else if (System(SysNum).NumStages == 2 && System(SysNum).IntercoolerType == 1) { - System(SysNum).HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).CpSatLiqCond = - FluidProperties::GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).HCaseIn = - FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TIntercooler, 0.0, System(SysNum).RefIndex, RoutineName); + } else if (this->NumStages == 2 && this->IntercoolerType == 1) { + this->HSatLiqCond = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = + FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->HCaseIn = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); // Two-stage compression with shell-and-coil intercooler - } else if (System(SysNum).NumStages == 2 && System(SysNum).IntercoolerType == 2) { - TLiqInActual = System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool - - System(SysNum).IntercoolerEffectiveness * - (System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool - System(SysNum).TIntercooler); - System(SysNum).HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).CpSatLiqCond = - FluidProperties::GetSatSpecificHeatRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); - System(SysNum).HCaseIn = System(SysNum).HSatLiqCond - System(SysNum).CpSatLiqCond * (System(SysNum).TCondense - TLiqInActual); + } else if (this->NumStages == 2 && this->IntercoolerType == 2) { + TLiqInActualLocal = this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - + this->IntercoolerEffectiveness * + (this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - this->TIntercooler); + this->HSatLiqCond = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = + FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - TLiqInActualLocal); } // NumStages and IntercoolerType - for (int SubcoolerIndex = 1; SubcoolerIndex <= System(SysNum).NumSubcoolers; ++SubcoolerIndex) { - int SubcoolerID = System(SysNum).SubcoolerNum(SubcoolerIndex); + for (int SubcoolerIndex = 1; SubcoolerIndex <= this->NumSubcoolers; ++SubcoolerIndex) { + int SubcoolerID = this->SubcoolerNum(SubcoolerIndex); // set up local variables for convenience Real64 DelTLiqDes = Subcooler(SubcoolerID).LiqSuctDesignDelT; Real64 TVapInDes = Subcooler(SubcoolerID).LiqSuctDesignTvapIn; Real64 TLiqInDes = Subcooler(SubcoolerID).LiqSuctDesignTliqIn; Real64 ControlTLiqOut = Subcooler(SubcoolerID).MechControlTliqOut; - Real64 CpLiquid = System(SysNum).CpSatLiqCond; - Real64 CpVapor = System(SysNum).CpSatVapEvap; - if (System(SysNum).NumStages == 1) { // Single-stage compression system - TLiqInActual = System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool; + Real64 CpLiquid = this->CpSatLiqCond; + Real64 CpVapor = this->CpSatVapEvap; + if (this->NumStages == 1) { // Single-stage compression system + TLiqInActualLocal = this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool; // Two-stage compression with flash intercooler - } else if (System(SysNum).NumStages == 2 && System(SysNum).IntercoolerType == 1) { - TLiqInActual = System(SysNum).TIntercooler; + } else if (this->NumStages == 2 && this->IntercoolerType == 1) { + TLiqInActualLocal = this->TIntercooler; // Two-stage compression with shell-and-coil intercooler - } else if (System(SysNum).NumStages == 2 && System(SysNum).IntercoolerType == 2) { - TLiqInActual = System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool - - System(SysNum).IntercoolerEffectiveness * - (System(SysNum).TCondense - Condenser(System(SysNum).CondenserNum(1)).RatedSubcool - System(SysNum).TIntercooler); + } else if (this->NumStages == 2 && this->IntercoolerType == 2) { + TLiqInActualLocal = this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - + this->IntercoolerEffectiveness * + (this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - this->TIntercooler); } // NumStages and IntercoolerType { @@ -12604,33 +12595,33 @@ namespace RefrigeratedCase { // from lshx. taken care of because subcooler ID assigned in that order in input. if (SELECT_CASE_var == Mechanical) { - Real64 MechSCLoad = System(SysNum).RefMassFlowtoLoads * CpLiquid * (TLiqInActual - ControlTLiqOut); - System(SysNum).HCaseIn -= CpLiquid * (TLiqInActual - ControlTLiqOut); + Real64 mechSCLoad = this->RefMassFlowtoLoads * CpLiquid * (TLiqInActualLocal - ControlTLiqOut); + this->HCaseIn -= CpLiquid * (TLiqInActualLocal - ControlTLiqOut); // refrigeration benefit to System(sysnum) // refrigeration load must be assigned properly according to input int SysProvideID = Subcooler(SubcoolerID).MechSourceSysID; - System(SysProvideID).MechSCLoad(SubcoolerID) = MechSCLoad; - Subcooler(SubcoolerID).MechSCTransLoad = MechSCLoad; - Subcooler(SubcoolerID).MechSCTransEnergy = MechSCLoad * LocalTimeStep * DataGlobals::SecInHour; + System(SysProvideID).MechSCLoad(SubcoolerID) = mechSCLoad; + Subcooler(SubcoolerID).MechSCTransLoad = mechSCLoad; + Subcooler(SubcoolerID).MechSCTransEnergy = mechSCLoad * LocalTimeStep * DataGlobals::SecInHour; // Reset inlet temperature for any LSHX that follows this mech subcooler - TLiqInActual = ControlTLiqOut; - System(SysNum).TCompIn = System(SysNum).TEvapNeeded + CaseSuperheat; + TLiqInActualLocal = ControlTLiqOut; + this->TCompIn = this->TEvapNeeded + CaseSuperheat; } else if (SELECT_CASE_var == LiquidSuction) { Real64 LSHXeffectiveness = DelTLiqDes / (TLiqInDes - TVapInDes); - Real64 TVapInActual = System(SysNum).TEvapNeeded + CaseSuperheat; - Real64 DelTempActual = LSHXeffectiveness * (TLiqInActual - TVapInActual); - TLiqInActual -= DelTempActual; - Real64 SubcoolLoad = System(SysNum).RefMassFlowtoLoads * CpLiquid * DelTempActual; - Real64 SubcoolerSupHeat = SubcoolLoad / CpVapor / System(SysNum).RefMassFlowComps; - System(SysNum).TCompIn = TVapInActual + SubcoolerSupHeat; - System(SysNum).HCaseIn -= SubcoolLoad / System(SysNum).RefMassFlowtoLoads; - System(SysNum).LSHXTrans = SubcoolLoad; - System(SysNum).LSHXTransEnergy = SubcoolLoad * LocalTimeStep * DataGlobals::SecInHour; + Real64 TVapInActual = this->TEvapNeeded + CaseSuperheat; + Real64 DelTempActual = LSHXeffectiveness * (TLiqInActualLocal - TVapInActual); + TLiqInActualLocal -= DelTempActual; + Real64 SubcoolLoad = this->RefMassFlowtoLoads * CpLiquid * DelTempActual; + Real64 SubcoolerSupHeat = SubcoolLoad / CpVapor / this->RefMassFlowComps; + this->TCompIn = TVapInActual + SubcoolerSupHeat; + this->HCaseIn -= SubcoolLoad / this->RefMassFlowtoLoads; + this->LSHXTrans = SubcoolLoad; + this->LSHXTransEnergy = SubcoolLoad * LocalTimeStep * DataGlobals::SecInHour; } } - System(SysNum).TLiqInActual = TLiqInActual; + this->TLiqInActual = TLiqInActualLocal; } } diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 7647e51b14f..1d5ff6e998e 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -406,7 +406,7 @@ namespace RefrigeratedCase { int SuctionPipeActualZoneNum; // ID number for zone where suction pipes gain heat int SuctionPipeZoneNodeNum; // ID number for zone node where suction pipes gain heat Array1D MechSCLoad; // Mechanical subcooler load on system from other systems(W) - Real64 AverageCompressorCOP; // Average COP for compressers on this system (W) + Real64 AverageCompressorCOP; // Average COP for compressors on this system (W) Real64 CpSatLiqCond; // Spec Heat of sat liquid at condensing pressure (J/kg-C) Real64 CpSatVapEvap; // Spec Heat of saturated vapor exiting evaporator (J/kg-C) Real64 FlowRatioIntercooler; // Refrigerant mass flow ratio through coil-side of shell-and-coil intercooler @@ -451,18 +451,18 @@ namespace RefrigeratedCase { Real64 TotalCoolingEnergy; // Total energy of all refrigerated cases and walkins served directly (J) Real64 TotalCoolingLoad; // Total load of all refrigerated cases and walkins served directly (W) Real64 TotalSystemLoad; // Includes cases, walk-ins, and transfer loads (cascade, second, subcooler), W - Real64 TotCompPower; // Total power for compressers on this system (for single-stage systems) or + Real64 TotCompPower; // Total power for compressors on this system (for single-stage systems) or // total power for low-stage compressors on this system (for two-stage systems) (W) - Real64 TotCompElecConsump; // Total Elec consump for compressers on this system (for single-stage systems) or + Real64 TotCompElecConsump; // Total Elec consump for compressors on this system (for single-stage systems) or // total elec consump for low-stage compressors on this system (for two-stage systems) (J) - Real64 TotCompCapacity; // Total design capacity for compressers on this system (for single-stage systems) or + Real64 TotCompCapacity; // Total design capacity for compressors on this system (for single-stage systems) or // total design capacity for low-stage compressors on this system (for two-stage systems) (W) - Real64 TotCompCoolingEnergy; // Total cooling energy from compressers on this system (for single-stage systems) or + Real64 TotCompCoolingEnergy; // Total cooling energy from compressors on this system (for single-stage systems) or // total cooling energy from low-stage compressors on this system (for two-stage systems) (J) - Real64 TotHiStageCompCapacity; // Total design capacity for high-stage compressers on this system (two-stage systems only) (W) - Real64 TotHiStageCompCoolingEnergy; // Total cooling energy from high-stage compressers on this system (two-stage systems only) (J) - Real64 TotHiStageCompElecConsump; // Total Elec consump for high-stage compressers on this system (two-stage systems only) (J) - Real64 TotHiStageCompPower; // Total power for high-stage compressers on this system (two-stage systems only) (W) + Real64 TotHiStageCompCapacity; // Total design capacity for high-stage compressors on this system (two-stage systems only) (W) + Real64 TotHiStageCompCoolingEnergy; // Total cooling energy from high-stage compressors on this system (two-stage systems only) (J) + Real64 TotHiStageCompElecConsump; // Total Elec consump for high-stage compressors on this system (two-stage systems only) (J) + Real64 TotHiStageCompPower; // Total power for high-stage compressors on this system (two-stage systems only) (W) Real64 TotCompElecConsumpTwoStage; // Total Elec consump for the low- and high-stage compressors on this system (two-stage systems only) (J) Real64 TotRejectHeatRecovered; // Total reject heat recovered for hot gas or hot brine defrost or // desuperheater coils (W) @@ -514,6 +514,10 @@ namespace RefrigeratedCase { TotCompCoolingEnergy = 0.0; TotHiStageCompCoolingEnergy = 0.0; } + + void CalculateCompressors(); + + void CalculateSubcoolers(); }; struct TransRefrigSystemData @@ -545,7 +549,7 @@ namespace RefrigeratedCase { int SuctionPipeActualZoneNumLT; // ID number for zone where medium temperature suction pipes gain heat int SuctionPipeZoneNodeNumLT; // ID number for zone node where medium temperature suction pipes gain heat int TransSysType; // Transcritical refrigeration system type: SingleStage = 1, TwoStage=2 - Real64 AverageCompressorCOP; // Average COP for compressers on this system (W) + Real64 AverageCompressorCOP; // Average COP for compressors on this system (W) Real64 CpSatLiqCond; // Spec Heat of sat liquid at condensing pressure (J/kg-C) Real64 CpSatVapEvapMT; // Spec Heat of saturated vapor exiting medium temperature evaporator (J/kg-C) Real64 CpSatVapEvapLT; // Spec Heat of saturated vapor exiting low temperature evaporator (J/kg-C) @@ -601,17 +605,17 @@ namespace RefrigeratedCase { Real64 TotalSystemLoad; // Sum of MT and LT loads, W Real64 TotalSystemLoadMT; // Includes medium temperature cases and walk-ins, W Real64 TotalSystemLoadLT; // Includes low temperature cases and walk-ins, W - Real64 TotCompPowerHP; // Total power for high pressure compressers on this system (W) - Real64 TotCompPowerLP; // Total power for low pressure compressers on this system (W) - Real64 TotCompElecConsump; // Total Elec consump for compressers on this system (J) + Real64 TotCompPowerHP; // Total power for high pressure compressors on this system (W) + Real64 TotCompPowerLP; // Total power for low pressure compressors on this system (W) + Real64 TotCompElecConsump; // Total Elec consump for compressors on this system (J) Real64 TotCompElecConsumpHP; // Total Elec consumption for high pressure compressors on this system (J) Real64 TotCompElecConsumpLP; // Total Elec consumption for low pressure compressors on this system (J) Real64 TotCompCapacity; // Sum of HP and LP compressor capacity (W) - Real64 TotCompCapacityHP; // Total design capacity for high pressure compressers on this system (W) - Real64 TotCompCapacityLP; // Total design capacity for low pressure compressers on this system (W) - Real64 TotCompCoolingEnergy; // Total cooling energy from compressers on this system (J) - Real64 TotCompCoolingEnergyHP; // Total cooling energy from high pressure compressers on this system (J) - Real64 TotCompCoolingEnergyLP; // Total cooling energy from low pressure compressers on this system (J) + Real64 TotCompCapacityHP; // Total design capacity for high pressure compressors on this system (W) + Real64 TotCompCapacityLP; // Total design capacity for low pressure compressors on this system (W) + Real64 TotCompCoolingEnergy; // Total cooling energy from compressors on this system (J) + Real64 TotCompCoolingEnergyHP; // Total cooling energy from high pressure compressors on this system (J) + Real64 TotCompCoolingEnergyLP; // Total cooling energy from low pressure compressors on this system (J) Real64 TotRejectHeatRecovered; // Total reject heat recovered for hot gas or hot brine defrost (W) Real64 UnmetEnergy; // Accumulative loads unmet by the LP and HP compressors on this system (J) Real64 UnmetEnergyMT; // Accumulative loads unmet by total HP compressors on this system (J) @@ -657,6 +661,8 @@ namespace RefrigeratedCase { TotCompPowerLP = 0.0; TotCompCoolingEnergy = 0.0; } + + void CalculateTransCompressors(); }; struct CaseAndWalkInListDef // Derived Type for CaseAndWalkIn Lists @@ -1511,12 +1517,6 @@ namespace RefrigeratedCase { void CalcGasCooler(int SysNum); - void CalculateCompressors(int SysNum); - - void CalculateTransCompressors(int SysNum); - - void CalculateSubcoolers(int SysNum); - void GetRefrigeratedRackIndex(std::string const &Name, int &IndexPtr, int SysType, From 8b18cce4652df9109ba9fe85d458b77cbda087be Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 09:27:00 -0700 Subject: [PATCH 62/86] step 4 - partial funcitons to members --- src/EnergyPlus/RefrigeratedCase.cc | 179 ++++++++++++++--------------- src/EnergyPlus/RefrigeratedCase.hh | 20 ++-- 2 files changed, 98 insertions(+), 101 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 7856e968a54..812ff5c7f8d 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -10352,10 +10352,10 @@ namespace RefrigeratedCase { } } - UpdateRefrigCondenser(Num, SysType); + RefrigRack(Num).UpdateRefrigCondenser(Num, SysType); } - void UpdateRefrigCondenser(int const Num, int const SysType) + void RefrigRackData::UpdateRefrigCondenser(int const Num, int const SysType) { // SUBROUTINE INFORMATION: @@ -10367,30 +10367,30 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Updates the node variables with local variables. - int InletNode(0); - int OutletNode(0); + int inletNode(0); + int outletNode(0); { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - InletNode = RefrigRack(Num).InletNode; - OutletNode = RefrigRack(Num).OutletNode; + inletNode = this->InletNode; + outletNode = this->OutletNode; } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - InletNode = Condenser(Num).InletNode; - OutletNode = Condenser(Num).OutletNode; + inletNode = Condenser(Num).InletNode; + outletNode = Condenser(Num).OutletNode; } } // Pass all variables from inlet to outlet node - PlantUtilities::SafeCopyPlantNode(InletNode, OutletNode); // DataLoopNode::Node(OutletNode) = DataLoopNode::Node(InletNode) + PlantUtilities::SafeCopyPlantNode(inletNode, outletNode); // DataLoopNode::Node(OutletNode) = DataLoopNode::Node(InletNode) // Set outlet node variables that are possibly changed { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - DataLoopNode::Node(OutletNode).Temp = RefrigRack(Num).OutletTemp; + DataLoopNode::Node(outletNode).Temp = this->OutletTemp; } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - DataLoopNode::Node(OutletNode).Temp = Condenser(Num).OutletTemp; + DataLoopNode::Node(outletNode).Temp = Condenser(Num).OutletTemp; } } } @@ -10679,7 +10679,7 @@ namespace RefrigeratedCase { System(SysNum).RefMassFlowHiStageComps = System(SysNum).RefMassFlowComps / 0.65; } - CalcDetailedSystem(SysNum); + System(SysNum).CalcDetailedSystem(SysNum); bool DeRate = false; // If true, need to derate aircoils because load can't be met by system @@ -10984,7 +10984,7 @@ namespace RefrigeratedCase { TransSystem(SysNum).TotalSystemLoadMT / (TransSystem(SysNum).HCaseOutMT - TransSystem(SysNum).HCaseInMT); TransSystem(SysNum).RefMassFlowCompsHP = TransSystem(SysNum).RefMassFlowtoLTLoads + TransSystem(SysNum).RefMassFlowtoMTLoads; - CalcDetailedTransSystem(SysNum); + TransSystem(SysNum).CalcDetailedTransSystem(SysNum); // TransCritSysFlag = .FALSE. } // TransSystem(SysNum)%TotalSystemLoad > 0 @@ -11034,7 +11034,7 @@ namespace RefrigeratedCase { SumZoneImpacts(); } - void CalcDetailedSystem(int const SysNum) + void RefrigSystemData::CalcDetailedSystem(int const SysNum) { // SUBROUTINE INFORMATION: @@ -11071,49 +11071,48 @@ namespace RefrigeratedCase { bool NotBalanced = true; int NumIter = 0; - Real64 ErrorMassFlowComps(0.0); // Error in calculated (low stage) compressor mass flow (single- or two-stage systems) + Real64 ErrorMassFlowComps(0.0); // Error in calculated low stage compressor mass flow (single- or two-stage systems) Real64 ErrorMassFlowHiStageComps(0.0); // Error in calculated high-stage compressor mass flow (two-stage systems only) // Balance This Refrigeration System using calculated refrigerant flow Real64 MassFlowHiStageCompsStart(0.0); // Mass flow through high-stage compressors (two-stage systems only) - - auto &refrig_system(System(SysNum)); + while (NotBalanced) { // Set values for iteration convergence tolerance check ++NumIter; // Mass flow through (low-stage) compressors (single- or two-stage systems) - Real64 MassFlowCompsStart = refrig_system.RefMassFlowComps; + Real64 MassFlowCompsStart = this->RefMassFlowComps; - if (refrig_system.NumStages == 2) { // Two-stage systems - MassFlowHiStageCompsStart = refrig_system.RefMassFlowHiStageComps; + if (this->NumStages == 2) { // Two-stage systems + MassFlowHiStageCompsStart = this->RefMassFlowHiStageComps; } - if (refrig_system.NumSubcoolers > 0) System(SysNum).CalculateSubcoolers(); - refrig_system.CalculateCompressors(); - CalculateCondensers(SysNum); - refrig_system.RefMassFlowtoLoads = refrig_system.TotalSystemLoad / (refrig_system.HCaseOut - refrig_system.HCaseIn); + if (this->NumSubcoolers > 0) this->CalculateSubcoolers(); + this->CalculateCompressors(); + this->CalculateCondensers(SysNum); + this->RefMassFlowtoLoads = this->TotalSystemLoad / (this->HCaseOut - this->HCaseIn); if (NumIter < 2) continue; // Previously did error check on calculated Tcondense, but not sensitive enough - if ((refrig_system.RefMassFlowtoLoads == 0.0) || (MassFlowCompsStart == 0.0)) { //.OR. (MassFlowCasesStart == 0.0) - ShowWarningError("Refrigeration:System: " + refrig_system.Name + " showing zero refrigeration flow."); + if ((this->RefMassFlowtoLoads == 0.0) || (MassFlowCompsStart == 0.0)) { //.OR. (MassFlowCasesStart == 0.0) + ShowWarningError("Refrigeration:System: " + this->Name + " showing zero refrigeration flow."); } else { - ErrorMassFlowComps = std::abs(MassFlowCompsStart - refrig_system.RefMassFlowComps) / MassFlowCompsStart; - if (refrig_system.NumStages == 2) { // Two-stage systems - ErrorMassFlowHiStageComps = std::abs(MassFlowHiStageCompsStart - refrig_system.RefMassFlowHiStageComps) / MassFlowCompsStart; + ErrorMassFlowComps = std::abs(MassFlowCompsStart - this->RefMassFlowComps) / MassFlowCompsStart; + if (this->NumStages == 2) { // Two-stage systems + ErrorMassFlowHiStageComps = std::abs(MassFlowHiStageCompsStart - this->RefMassFlowHiStageComps) / MassFlowCompsStart; } } // denominator zero check if (NumIter > 20) break; if (ErrorMassFlowComps < ErrorTol) { - if (refrig_system.NumStages == 1) { + if (this->NumStages == 1) { NotBalanced = false; - } else if (refrig_system.NumStages == 2 && ErrorMassFlowHiStageComps < ErrorTol) { + } else if (this->NumStages == 2 && ErrorMassFlowHiStageComps < ErrorTol) { NotBalanced = false; } } } // error check } - void CalcDetailedTransSystem(int const SysNum) + void TransRefrigSystemData::CalcDetailedTransSystem(int const SysNum) { // SUBROUTINE INFORMATION: @@ -11145,24 +11144,24 @@ namespace RefrigeratedCase { while (NotBalanced) { ++NumIter; - if (TransSystem(SysNum).NumGasCoolers >= 1) CalcGasCooler(SysNum); - TransSystem(SysNum).CalculateTransCompressors(); + if (this->NumGasCoolers >= 1) this->CalcGasCooler(SysNum); + this->CalculateTransCompressors(); if (NumIter < 2) continue; - if ((TransSystem(SysNum).RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { - ShowSevereError("Refrigeration:TranscriticalSystem: " + TransSystem(SysNum).Name + + if ((this->RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { + ShowSevereError("Refrigeration:TranscriticalSystem: " + this->Name + " showing zero refrigerant flow through receiver bypass."); - ShowContinueError("Receiver Bypass Flow = " + General::RoundSigDigits(TransSystem(SysNum).RefMassFlowReceiverBypass, 6)); + ShowContinueError("Receiver Bypass Flow = " + General::RoundSigDigits(this->RefMassFlowReceiverBypass, 6)); ShowContinueError("Check input file to ensure that refrigeration loads on this system are not zero."); } else { - ErrorMassFlow = std::abs(MassFlowStart - TransSystem(SysNum).RefMassFlowReceiverBypass) / MassFlowStart; - MassFlowStart = TransSystem(SysNum).RefMassFlowReceiverBypass; + ErrorMassFlow = std::abs(MassFlowStart - this->RefMassFlowReceiverBypass) / MassFlowStart; + MassFlowStart = this->RefMassFlowReceiverBypass; } // denominator zero check if (NumIter > 20) break; if (ErrorMassFlow < ErrorTol) NotBalanced = false; } // error check } - void CalculateCondensers(int const SysNum) + void RefrigSystemData::CalculateCondensers(int const SysNum) { // SUBROUTINE INFORMATION: @@ -11232,12 +11231,12 @@ namespace RefrigeratedCase { Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] Real64 OutWbTemp(0.0); // Outdoor wet bulb temp at condenser air inlet node [C] Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] - Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenseer (m3/s) + Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenser (m3/s) Real64 RatedFanPower; // local variable equal to input condenser value Real64 RatedAirFlowRate; // local variable equal to input condenser value Real64 SinkTemp; // Heat sink temperature used to derate fan power at reduced loads [C] Real64 TCondCalc; // Calculated Condensing temperature - Real64 TotalCondDefrostCredit; // total cond credit from hot gas/brine defr for cases etc. served + Real64 TotalCondDefrostCreditLocal; // total cond credit from hot gas/brine defr for cases etc. served // directly by all systems served by this condenser [W] Real64 TotalCondDefCredfromSysID; // cond credit for single system [W] Real64 TotalLoadFromThisSystem(0.0); // total heat rejection load from the detailed system id'd in subroutine call [W] @@ -11252,10 +11251,10 @@ namespace RefrigeratedCase { TotalCondenserHeat = 0.0; TotalEvapWaterUseRate = 0.0; ActualFanPower = 0.0; - TotalCondDefrostCredit = 0.0; + TotalCondDefrostCreditLocal = 0.0; TotalLoadFromSystems = 0.0; EvapAvail = true; - CondID = System(SysNum).CondenserNum(1); + CondID = this->CondenserNum(1); auto &condenser(Condenser(CondID)); RatedFanPower = condenser.RatedFanPower; RatedAirFlowRate = condenser.RatedAirFlowRate; @@ -11275,7 +11274,7 @@ namespace RefrigeratedCase { for (Sysloop = 1; Sysloop <= condenser.NumSysAttach; ++Sysloop) { SystemID = condenser.SysNum(Sysloop); TotalCondDefCredfromSysID = System(SystemID).TotalCondDefrostCredit + System(SystemID).SumCascadeCondCredit; - TotalCondDefrostCredit += TotalCondDefCredfromSysID; + TotalCondDefrostCreditLocal += TotalCondDefCredfromSysID; // total heat rejection load from a single detailed system [W] Real64 TotalLoadFromSysID = System(SystemID).TotalSystemLoad + System(SystemID).TotCompPower + System(SystemID).TotHiStageCompPower + System(SystemID).PipeHeatLoad; @@ -11284,22 +11283,22 @@ namespace RefrigeratedCase { } // Sysloop over every system connected to this condenser // for cascade condensers, condenser defrost credit gets passed on to the primary system condenser - if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) TotalCondDefrostCredit = 0.0; + if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) TotalCondDefrostCreditLocal = 0.0; // Calculate Total Heat rejection needed. Assume hermetic compressors - conservative assumption // Note that heat rejection load carried by desuperheater hvac coils or water heaters is the // lagged variable from the previous time step because these are calculated after the refrigeration // system is solved. condenser.ExternalHeatRecoveredLoad = condenser.LaggedUsedWaterHeater + condenser.LaggedUsedHVACCoil; - condenser.InternalHeatRecoveredLoad = TotalCondDefrostCredit; - condenser.TotalHeatRecoveredLoad = condenser.ExternalHeatRecoveredLoad + TotalCondDefrostCredit; + condenser.InternalHeatRecoveredLoad = TotalCondDefrostCreditLocal; + condenser.TotalHeatRecoveredLoad = condenser.ExternalHeatRecoveredLoad + TotalCondDefrostCreditLocal; - TotalCondenserHeat = TotalLoadFromSystems - TotalCondDefrostCredit - condenser.ExternalHeatRecoveredLoad; + TotalCondenserHeat = TotalLoadFromSystems - TotalCondDefrostCreditLocal - condenser.ExternalHeatRecoveredLoad; if (TotalCondenserHeat < 0.0) { TotalCondenserHeat = 0.0; if (!DataGlobals::WarmupFlag) { - ShowRecurringWarningErrorAtEnd("Refrigeration:System: " + System(SysNum).Name + + ShowRecurringWarningErrorAtEnd("Refrigeration:System: " + this->Name + ":heat reclaimed(defrost,other purposes) >current condenser load. ", CondCreditWarnIndex1); ShowRecurringContinueErrorAtEnd("For heat recovered for defrost: ASHRAE rule of thumb: <= 25% of the load on a rack ", @@ -11326,8 +11325,8 @@ namespace RefrigeratedCase { // Obtain water-cooled condenser inlet/outlet temps condenser.InletTemp = DataLoopNode::Node(condenser.InletNode).Temp; TCondCalc = DataLoopNode::Node(condenser.InletNode).Temp + condenser.RatedApproachT; - if ((condenser.InletTemp < condenser.InletTempMin) || (TCondCalc < System(SysNum).TCondenseMin)) { - System(SysNum).TCondense = System(SysNum).TCondenseMin; + if ((condenser.InletTemp < condenser.InletTempMin) || (TCondCalc < this->TCondenseMin)) { + this->TCondense = this->TCondenseMin; // condenser.LowTempWarn += 1; if (condenser.LowTempWarnIndex == 0) { ShowWarningMessage("Refrigeration:Condenser:WaterCooled " + condenser.Name); @@ -11339,7 +11338,7 @@ namespace RefrigeratedCase { condenser.LowTempWarnIndex); // END IF } else { - System(SysNum).TCondense = TCondCalc; + this->TCondense = TCondCalc; } } else if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) || (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap)) { @@ -11409,25 +11408,25 @@ namespace RefrigeratedCase { // Fan energy calculations apply to both air- and evap-cooled condensers // Compare calculated condensing temps to minimum allowed to determine fan power/operating mode - if (TCondCalc >= System(SysNum).TCondenseMin) { - System(SysNum).TCondense = TCondCalc; + if (TCondCalc >= this->TCondenseMin) { + this->TCondense = TCondCalc; ActualFanPower = RatedFanPower; AirVolRatio = 1.0; } else { // need to reduce fan speed to reduce air flow and keep Tcond at or above Tcond min - System(SysNum).TCondense = System(SysNum).TCondenseMin; - TCondCalc = System(SysNum).TCondenseMin; + this->TCondense = this->TCondenseMin; + TCondCalc = this->TCondenseMin; // recalculate CapFac at current delta T if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) { // current maximum condenser capacity at delta T present for minimum condensing temperature [W] - Real64 CurMaxCapacity = CurveManager::CurveValue(condenser.CapCurvePtr, (System(SysNum).TCondenseMin - OutDbTemp)); + Real64 CurMaxCapacity = CurveManager::CurveValue(condenser.CapCurvePtr, (this->TCondenseMin - OutDbTemp)); CapFac = TotalCondenserHeat / CurMaxCapacity; AirVolRatio = max(FanMinAirFlowRatio, std::pow(CapFac, CondAirVolExponentDry)); // Fans limited by minimum air flow ratio AirVolRatio = min(AirVolRatio, 1.0); } else { // condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap HRCFFullFlow = HRCF; // if evap condenser need to back calculate the operating capacity using HRCF relationship, given known Tcond - Real64 QuadBterm = condenser.EvapCoeff1 - (System(SysNum).TCondense - SinkTemp) + condenser.EvapCoeff4 * SinkTemp; + Real64 QuadBterm = condenser.EvapCoeff1 - (this->TCondense - SinkTemp) + condenser.EvapCoeff4 * SinkTemp; Real64 Sqrtterm = pow_2(QuadBterm) - 4.0 * condenser.EvapCoeff2 * condenser.EvapCoeff3; if (Sqrtterm < 0.0) { // only happens for very high wet bulb temps HRCF = condenser.EvapElevFact * condenser.MaxCapFacEvap; @@ -11514,12 +11513,12 @@ namespace RefrigeratedCase { // or floats to meet other loads on that system // therese ** future - here and for new phase change heat exchanger - need to handle unmet loads! - System(SysNum).TCondense = condenser.RatedTCondense; + this->TCondense = condenser.RatedTCondense; - if ((System(SysNum).NumNonCascadeLoads > 0) && (condenser.CascadeTempControl == CascadeTempFloat)) { - System(SysNum).TCondense = System(condenser.CascadeSinkSystemID).TEvapNeeded + condenser.RatedApproachT; - if (System(SysNum).TCondense < System(SysNum).TCondenseMin) { - System(SysNum).TCondense = System(SysNum).TCondenseMin; + if ((this->NumNonCascadeLoads > 0) && (condenser.CascadeTempControl == CascadeTempFloat)) { + this->TCondense = System(condenser.CascadeSinkSystemID).TEvapNeeded + condenser.RatedApproachT; + if (this->TCondense < this->TCondenseMin) { + this->TCondense = this->TCondenseMin; ShowRecurringWarningErrorAtEnd("Refrigeration Condenser " + condenser.Name + " - Cascade condenser floating condensing temperature less than specified minimum condensing " "temperature. Minimum specified temperature used for system below cascade condenser. No " @@ -11549,8 +11548,8 @@ namespace RefrigeratedCase { condenser.ExternalEnergyRecovered = condenser.ExternalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; condenser.InternalEnergyRecovered = condenser.InternalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; condenser.TotalHeatRecoveredEnergy = condenser.TotalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; - System(SysNum).NetHeatRejectLoad = TotalCondenserHeat * TotalLoadFromThisSystem / TotalLoadFromSystems; - System(SysNum).NetHeatRejectEnergy = System(SysNum).NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; + this->NetHeatRejectLoad = TotalCondenserHeat * TotalLoadFromThisSystem / TotalLoadFromSystems; + this->NetHeatRejectEnergy = this->NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; // set water system demand request (if needed) if (condenser.EvapWaterSupplyMode == WaterSupplyFromTank) { @@ -11561,7 +11560,7 @@ namespace RefrigeratedCase { //*************************************************************************************************** //*************************************************************************************************** - void CalcGasCooler(int const SysNum) + void TransRefrigSystemData::CalcGasCooler(int const SysNum) { // SUBROUTINE INFORMATION: @@ -11605,7 +11604,7 @@ namespace RefrigeratedCase { Real64 OutDbTemp; // Outdoor dry bulb temperature at gas cooler air inlet node [C] Real64 RatedFanPower; // Rated fan power for this gas cooler [W] Real64 TotalCondDefCredfromSysID; // Gas cooler defrost credit for single system [W] - Real64 TotalCondDefrostCredit; // Total gas cooler credit from hot gas/brine defrost for cases etc. served + Real64 TotalCondDefrostCreditLocal; // Total gas cooler credit from hot gas/brine defrost for cases etc. served // directly by all systems served by this gas cooler [W] Real64 TotalGasCoolerHeat; // Total gas cooler heat from system [W] Real64 TotalLoadFromSysID; // Total heat rejection load from a single detailed system [W] @@ -11618,9 +11617,9 @@ namespace RefrigeratedCase { //! Initialize this gas cooler for this time step AirVolRatio = 1.0; ActualFanPower = 0.0; - TotalCondDefrostCredit = 0.0; + TotalCondDefrostCreditLocal = 0.0; TotalLoadFromSystems = 0.0; - int GasCoolerID = TransSystem(SysNum).GasCoolerNum(1); + int GasCoolerID = this->GasCoolerNum(1); RatedFanPower = GasCooler(GasCoolerID).RatedFanPower; FanMinAirFlowRatio = GasCooler(GasCoolerID).FanMinAirFlowRatio; GasCoolerCreditWarnIndex = GasCooler(GasCoolerID).GasCoolerCreditWarnIndex; @@ -11628,7 +11627,7 @@ namespace RefrigeratedCase { for (int Sysloop = 1; Sysloop <= GasCooler(GasCoolerID).NumSysAttach; ++Sysloop) { int SystemID = GasCooler(GasCoolerID).SysNum(Sysloop); TotalCondDefCredfromSysID = TransSystem(SystemID).TotalCondDefrostCredit; - TotalCondDefrostCredit += TotalCondDefCredfromSysID; + TotalCondDefrostCreditLocal += TotalCondDefCredfromSysID; TotalLoadFromSysID = TransSystem(SystemID).TotalSystemLoadLT + TransSystem(SystemID).TotalSystemLoadMT + TransSystem(SystemID).TotCompPowerLP + TransSystem(SystemID).TotCompPowerHP + TransSystem(SystemID).PipeHeatLoadLT + TransSystem(SystemID).PipeHeatLoadMT; @@ -11637,14 +11636,14 @@ namespace RefrigeratedCase { } // Sysloop over every system connected to this gas cooler // Calculate Total Heat rejection needed. - GasCooler(GasCoolerID).InternalHeatRecoveredLoad = TotalCondDefrostCredit; - GasCooler(GasCoolerID).TotalHeatRecoveredLoad = TotalCondDefrostCredit; - TotalGasCoolerHeat = TotalLoadFromSystems - TotalCondDefrostCredit; + GasCooler(GasCoolerID).InternalHeatRecoveredLoad = TotalCondDefrostCreditLocal; + GasCooler(GasCoolerID).TotalHeatRecoveredLoad = TotalCondDefrostCreditLocal; + TotalGasCoolerHeat = TotalLoadFromSystems - TotalCondDefrostCreditLocal; if (TotalGasCoolerHeat < 0.0) { TotalGasCoolerHeat = 0.0; if (!DataGlobals::WarmupFlag) - ShowRecurringWarningErrorAtEnd("Refrigeration:TranscriticalSystem: " + TransSystem(SysNum).Name + + ShowRecurringWarningErrorAtEnd("Refrigeration:TranscriticalSystem: " + this->Name + ":heat reclaimed (defrost,other purposes) is greater than current gas cooler load. ASHRAE rule of " "thumb: <= 25% of the load on a system should be in defrost at the same time. Consider " "diversifying defrost schedules.", @@ -11671,10 +11670,10 @@ namespace RefrigeratedCase { if (GasCooler(GasCoolerID).PGasCoolerOut < 7.5e6) { // Ensure gas cooler pressure is at least 7.5 MPa for transcritical operation GasCooler(GasCoolerID).PGasCoolerOut = 7.5e6; } - GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, + GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, GasCooler(GasCoolerID).PGasCoolerOut, - TransSystem(SysNum).RefIndex, + this->RefIndex, RoutineName); GasCooler(GasCoolerID).TransOpFlag = true; } else { // Gas cooler in subcritical operation @@ -11682,24 +11681,24 @@ namespace RefrigeratedCase { if (GasCooler(GasCoolerID).TGasCoolerOut > 30.978) { // Gas temperature should be less than critical temperature GasCooler(GasCoolerID).PGasCoolerOut = 7.2e6; // Fix the pressure to be subcritical GasCooler(GasCoolerID).TGasCoolerOut = FluidProperties::GetSatTemperatureRefrig( - TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).PGasCoolerOut, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, GasCooler(GasCoolerID).PGasCoolerOut, this->RefIndex, RoutineName); } else if (GasCooler(GasCoolerID).TGasCoolerOut > GasCooler(GasCoolerID).MinCondTemp) { // Allow condensing temperature to float above the minimum GasCooler(GasCoolerID).PGasCoolerOut = FluidProperties::GetSatPressureRefrig( - TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, this->RefIndex, RoutineName); } else { // Don't allow condensing temperature to drop below minimum GasCooler(GasCoolerID).TGasCoolerOut = GasCooler(GasCoolerID).MinCondTemp; GasCooler(GasCoolerID).PGasCoolerOut = FluidProperties::GetSatPressureRefrig( - TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, this->RefIndex, RoutineName); } GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSatEnthalpyRefrig( - TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, this->RefIndex, RoutineName); GasCooler(GasCoolerID).TransOpFlag = false; } // (OutDbTemp > TransitionTemperature) if (GasCooler(GasCoolerID).TGasCoolerOut < 30.978) { GasCooler(GasCoolerID).CpGasCoolerOut = FluidProperties::GetSatSpecificHeatRefrig( - TransSystem(SysNum).RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, TransSystem(SysNum).RefIndex, RoutineName); + this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, this->RefIndex, RoutineName); } else { GasCooler(GasCoolerID).CpGasCoolerOut = 0.0; } @@ -11733,8 +11732,8 @@ namespace RefrigeratedCase { GasCooler(GasCoolerID).GasCoolerCreditWarnIndex = GasCoolerCreditWarnIndex; GasCooler(GasCoolerID).InternalEnergyRecovered = GasCooler(GasCoolerID).InternalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; GasCooler(GasCoolerID).TotalHeatRecoveredEnergy = GasCooler(GasCoolerID).TotalHeatRecoveredLoad * LocalTimeStep * DataGlobals::SecInHour; - TransSystem(SysNum).NetHeatRejectLoad = TotalGasCoolerHeat * TotalLoadFromThisSystem / TotalLoadFromSystems; - TransSystem(SysNum).NetHeatRejectEnergy = TransSystem(SysNum).NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; + this->NetHeatRejectLoad = TotalGasCoolerHeat * TotalLoadFromThisSystem / TotalLoadFromSystems; + this->NetHeatRejectEnergy = this->NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; } //*************************************************************************************************** @@ -12058,7 +12057,7 @@ namespace RefrigeratedCase { DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = this->RefMassFlowComps * (this->HCompOut - HSatVapCondense); } else { // Two-stage systems DataHeatBalance::HeatReclaimRefrigCondenser(CondID).AvailCapacity = this->RefMassFlowHiStageComps * (this->HCompOut - HSatVapCondense); - } // this->NumStages + } // NumStages // No function available to get Tout as f(Pout, Hout), so use estimate based on constant cp in superheat range... // Use average of Tcondense and Tout of condenser as check for whether heat reclaim is reasonable. @@ -12118,8 +12117,7 @@ namespace RefrigeratedCase { // For the same pressure drop, CO2 has a corresponding temperature penalty 5 to 10 times smaller than // ammonia and R-134a (ASHRAE Handbook of Refrigeration, 2010, p. 3.7). Ignore pressure drop for CO2 calculations. // NOTE, these DelT...Pipes reflect the decrease in Pressure in the pipes, NOT thermal transfer through the pipe walls. - // REAL(r64), PARAMETER ::DelTSuctPipes = 1.0d0 ! Tsat drop corresponding to P drop in suction pipes, ASHRAE 2006 p 2.4 (C) - // REAL(r64), PARAMETER ::DelTDischPipes = 0.5d0 ! Tsat drop corresponding to P drop in discharge pipes, ASHRAE 2006 p 2.5 (C) + Real64 const ErrorTol(0.001); // Iterative solution tolerance static std::string const RoutineName("RefrigeratedCase:CalculateTransCompressors"); @@ -12137,7 +12135,6 @@ namespace RefrigeratedCase { Real64 HCompInRatedLP; // Enthalpy entering low pressure compressor at rated superheat, J/kg Real64 HGCOutlet; // Enthalpy at gas cooler outlet, J/kg Real64 HIdeal; // Ideal enthalpy at subcooler (for 100% effectiveness) - Real64 Hnew; // Calucalted enthalpy, J/kg Real64 HsatLiqforTevapNeededMT; // Enthalpy of saturated liquid at MT evaporator, J/kg Real64 HsatVaporforTevapneededMT; // Enthlapy of saturated vapor at MT evaporator (transcritical cycle), J/kg Real64 HsatVaporforTevapneededLT; // Enthlapy of saturated vapor at LT evaporator (transcritical cycle), J/kg @@ -12319,7 +12316,7 @@ namespace RefrigeratedCase { this->HSatLiqReceiver) { for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations to find receiver quality QualityReceiver = (Xu + Xl) / 2.0; - Hnew = FluidProperties::GetSatEnthalpyRefrig( + Real64 Hnew = FluidProperties::GetSatEnthalpyRefrig( this->RefrigerantName, this->TReceiver, QualityReceiver, this->RefIndex, RoutineName); // estimated QualityReceiver is too high @@ -12349,7 +12346,7 @@ namespace RefrigeratedCase { Xu = Xl + 50.0; for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations Xnew = (Xu + Xl) / 2.0; - Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Xnew, PSuctionMT, this->RefIndex, RoutineName); + Real64 Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Xnew, PSuctionMT, this->RefIndex, RoutineName); if (Hnew > this->HCompInHP) { // xnew is too high Xu = Xnew; } else { // xnew is too low @@ -12380,7 +12377,7 @@ namespace RefrigeratedCase { Xu = Xl + 50.0; for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations Xnew = (Xu + Xl) / 2.0; - Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Xnew, PSuctionMT, this->RefIndex, RoutineName); + Real64 Hnew = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, Xnew, PSuctionMT, this->RefIndex, RoutineName); if (Hnew > this->HCompInHP) { // xnew is too high Xu = Xnew; } else { // xnew is too low diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 1d5ff6e998e..ef4151b24f9 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -358,6 +358,8 @@ namespace RefrigeratedCase { ActualEvapPumpPower = 0.0; } + void UpdateRefrigCondenser(int Num, int SysType); + void CalcRackSystem(); void ReportRackSystem(int RackNum); @@ -515,6 +517,10 @@ namespace RefrigeratedCase { TotHiStageCompCoolingEnergy = 0.0; } + void CalcDetailedSystem(int SysNum); + + void CalculateCondensers(int SysNum); + void CalculateCompressors(); void CalculateSubcoolers(); @@ -662,6 +668,10 @@ namespace RefrigeratedCase { TotCompCoolingEnergy = 0.0; } + void CalcDetailedTransSystem(int SysNum); + + void CalcGasCooler(int SysNum); + void CalculateTransCompressors(); }; @@ -1503,20 +1513,10 @@ namespace RefrigeratedCase { void SimRefrigCondenser(int SysType, std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); - void UpdateRefrigCondenser(int Num, int SysType); - void SimulateDetailedRefrigerationSystems(); void SimulateDetailedTransRefrigSystems(); - void CalcDetailedSystem(int SysNum); - - void CalcDetailedTransSystem(int SysNum); - - void CalculateCondensers(int SysNum); - - void CalcGasCooler(int SysNum); - void GetRefrigeratedRackIndex(std::string const &Name, int &IndexPtr, int SysType, From 09d0bb89bfde3f3808166072609ef2b5e2b5275c Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 10:08:18 -0700 Subject: [PATCH 63/86] minor cleanups --- src/EnergyPlus/RefrigeratedCase.cc | 51 +++--------------------------- 1 file changed, 5 insertions(+), 46 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 812ff5c7f8d..e6384b6e6e1 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -570,8 +570,6 @@ namespace RefrigeratedCase { if (HaveDetailedTransRefrig) SimulateDetailedTransRefrigSystems(); } - //*************************************************************************************************** - void GetRefrigerationInput() { @@ -3707,9 +3705,7 @@ namespace RefrigeratedCase { } // Get fan control type - if (UtilityRoutines::SameString(Alphas(3), "Fixed")) { - GasCooler(GCNum).FanSpeedControlType = FanConstantSpeed; - } else if (UtilityRoutines::SameString(Alphas(3), "FixedLinear")) { + if (UtilityRoutines::SameString(Alphas(3), "FixedLinear")) { GasCooler(GCNum).FanSpeedControlType = FanConstantSpeedLinear; } else if (UtilityRoutines::SameString(Alphas(3), "VariableSpeed")) { GasCooler(GCNum).FanSpeedControlType = FanVariableSpeed; @@ -4733,7 +4729,7 @@ namespace RefrigeratedCase { Real64 NominalTotalCoilCap = 0.0; Real64 NominalTotalWalkInCap = 0.0; Real64 NominalTotalSecondaryCap = 0.0; - Real64 NominalTotalCoolingCap = 0.0; + Real64 NominalTotalCoolingCap; Real64 NominalTotalCascadeLoad = 0.0; System(RefrigSysNum).RefInventory = 0.0; @@ -5573,7 +5569,7 @@ namespace RefrigeratedCase { Real64 NominalTotalCaseCapLT = 0.0; Real64 NominalTotalWalkInCapMT = 0.0; Real64 NominalTotalWalkInCapLT = 0.0; - Real64 NominalTotalCoolingCap = 0.0; + Real64 NominalTotalCoolingCap; TransSystem(TransRefrigSysNum).RefInventory = 0.0; // Check for Medium Temperature Case or Walk-In or CaseAndWalkInList names @@ -5872,13 +5868,13 @@ namespace RefrigeratedCase { if ((lAlphaBlanks(AlphaNum)) && (TransSystem(TransRefrigSysNum).TransSysType == 2)) { // TwoStage system type is specified but low pressure compressor input is blank ShowSevereError(RoutineName + CurrentModuleObject + ", The transcritical refrigeration system, \"" + - TransSystem(TransRefrigSysNum).Name + "\", is specified to be \"TwoStage\", however, the \"" + + TransSystem(TransRefrigSysNum).Name + R"(", is specified to be "TwoStage", however, the ")" + cAlphaFieldNames(AlphaNum) + "\" is not given."); ErrorsFound = true; } else if ((!(lAlphaBlanks(AlphaNum))) && (TransSystem(TransRefrigSysNum).TransSysType == 1)) { // SingleStage system type with low pressure compressors specified. Ignore low pressure compressors ShowWarningError(RoutineName + CurrentModuleObject + ", The transcritical refrigeration system, \"" + - TransSystem(TransRefrigSysNum).Name + "\", is specified to be \"SingleStage\", however, a\"" + + TransSystem(TransRefrigSysNum).Name + R"(", is specified to be \"SingleStage", however, a")" + cAlphaFieldNames(AlphaNum) + "\" was found. The low pressure compressors will be ignored and will not simulated."); } else if ((!(lAlphaBlanks(AlphaNum))) && (TransSystem(TransRefrigSysNum).TransSysType == 2)) { @@ -8824,9 +8820,6 @@ namespace RefrigeratedCase { } // (NumSimulationGasCooler >0) } - //*************************************************************************************************** - //*************************************************************************************************** - void InitRefrigeration() { // SUBROUTINE INFORMATION: @@ -10089,9 +10082,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - //*************************************************************************************************** - void SimRefrigCondenser(int const SysType, std::string const &CompName, int &CompIndex, bool const FirstHVACIteration, bool const InitLoopEquip) { @@ -10278,7 +10268,6 @@ namespace RefrigeratedCase { MassFlowRate = TotalCondenserHeat / Cp / DeltaT; // Check for maximum flow in the component if (MassFlowRate > MassFlowRateMax) { - // HighFlowWarn = HighFlowWarn +1 if (HighFlowWarnIndex == 0) { ShowWarningMessage(TypeName + Name); ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); @@ -10317,7 +10306,6 @@ namespace RefrigeratedCase { } // Check outlet water temp for max value if (OutletTemp > OutletTempMax) { - // HighTempWarn = HighTempWarn +1 if (HighTempWarnIndex == 0) { ShowWarningMessage(TypeName + Name); ShowContinueError( @@ -10330,8 +10318,6 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(SysType); if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - // RefrigRack(Num)%HighFlowWarn = HighFlowWarn - // RefrigRack(Num)%HighTempWarn = HighTempWarn RefrigRack(Num).MassFlowRate = MassFlowRate; RefrigRack(Num).VolFlowRate = VolFlowRate; RefrigRack(Num).OutletTemp = OutletTemp; @@ -10340,8 +10326,6 @@ namespace RefrigeratedCase { RefrigRack(Num).HighInletWarnIndex = HighInletWarnIndex; RefrigRack(Num).NoFlowWarnIndex = NoFlowWarnIndex; } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - // Condenser(Num)%HighFlowWarn = HighFlowWarn - // Condenser(Num)%HighTempWarn = HighTempWarn Condenser(Num).MassFlowRate = MassFlowRate; Condenser(Num).VolFlowRate = VolFlowRate; Condenser(Num).OutletTemp = OutletTemp; @@ -10810,9 +10794,6 @@ namespace RefrigeratedCase { SumZoneImpacts(); } - //*************************************************************************************************** - //*************************************************************************************************** - void SimulateDetailedTransRefrigSystems() { @@ -11557,9 +11538,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - //*************************************************************************************************** - void TransRefrigSystemData::CalcGasCooler(int const SysNum) { @@ -11736,9 +11714,6 @@ namespace RefrigeratedCase { this->NetHeatRejectEnergy = this->NetHeatRejectLoad * LocalTimeStep * DataGlobals::SecInHour; } - //*************************************************************************************************** - //*************************************************************************************************** - void RefrigSystemData::CalculateCompressors() { @@ -12074,9 +12049,6 @@ namespace RefrigeratedCase { this->TotHiStageCompCoolingEnergy = this->TotHiStageCompCapacity * LocalTimeStepSec; } - //*************************************************************************************************** - //*************************************************************************************************** - void TransRefrigSystemData::CalculateTransCompressors() { @@ -13233,9 +13205,6 @@ namespace RefrigeratedCase { } // DataHeatBalance::NumRefrigChillerSets } - //*************************************************************************************************** - //*************************************************************************************************** - void WalkInData::CalculateWalkIn() // Absolute pointer to Walk In { @@ -13642,9 +13611,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - //*************************************************************************************************** - void SecondaryLoopData::CalculateSecondary(int const SecondaryNum) { // SUBROUTINE INFORMATION: @@ -14088,8 +14054,6 @@ namespace RefrigeratedCase { SysOutputProvided = CoilSysCredit(ZoneNum).SenCreditToZoneRate; } - //*************************************************************************************************** - void AirChillerSetData::CalculateAirChillerSets() { @@ -14133,8 +14097,6 @@ namespace RefrigeratedCase { } // CoilIndex } - //*************************************************************************************************** - void FinalRateCoils(bool const DeRate, // True if compressor rack or secondary ht exchanger unable to provide capacity int const SystemSourceType, // Secondarysystem or DetailedSystem int const SystemID, // ID for Secondary loop or detailed system calling for derate @@ -14488,7 +14450,6 @@ namespace RefrigeratedCase { } } else { // NOT (AirVolumeFlowMax > 0.0d0) - CoilCapTotEstimate = 0.0; WaterRemovRate = 0.0; latLoadServed = 0.0; FrostChangekg = 0.0; @@ -14628,8 +14589,6 @@ namespace RefrigeratedCase { } } - //*************************************************************************************************** - void FigureRefrigerationZoneGains() { From 00fda902fd10142aa1641feb8a4be9f850b60f2a Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 11:16:40 -0700 Subject: [PATCH 64/86] breakup sim funcion by type before inheriting PlantComponent --- src/EnergyPlus/HeatingCoils.cc | 18 -- src/EnergyPlus/PlantLoopEquip.cc | 7 +- src/EnergyPlus/RefrigeratedCase.cc | 384 +++++++++++++++++++---------- src/EnergyPlus/RefrigeratedCase.hh | 9 +- 4 files changed, 260 insertions(+), 158 deletions(-) diff --git a/src/EnergyPlus/HeatingCoils.cc b/src/EnergyPlus/HeatingCoils.cc index 6b27c7c640e..a5d6f15755b 100644 --- a/src/EnergyPlus/HeatingCoils.cc +++ b/src/EnergyPlus/HeatingCoils.cc @@ -3114,24 +3114,6 @@ namespace HeatingCoils { SuppressWarning = true; CoilFound = 0; - // This function only used for dessicant regeneration and refrigeration desuperheat not a valid source - // IF (UtilityRoutines::SameString(CoilType,'REFRIGERATION:COMPRESSORRACK')) THEN - // CALL GetRefrigeratedRackIndex(CoilName, CoilNum,RefrigSystemTypeRack, GetCoilErrFlag, CoilType, SuppressWarning) - // DO NumCoil = 1, NumHeatingCoils - // IF(HeatingCoil(NumCoil)%ReclaimHeatingSource .NE. COMPRESSORRACK_REFRIGERATEDCASE .AND. & - // HeatingCoil(NumCoil)%ReclaimHeatingCoilName .NE. CoilName)CYCLE - // CoilFound = CoilNum - // EXIT - // END DO - // ELSEIF (UtilityRoutines::SameString(CoilType,'REFRIGERATION:CONDENSER')) THEN bbb - // CALL GetRefrigeratedRackIndex(CoilName, CoilNum,RefrigSystemTypeDetailed, GetCoilErrFlag, CoilType, SuppressWarning) - // DO NumCoil = 1, NumHeatingCoils - // IF(HeatingCoil(NumCoil)%ReclaimHeatingSource .NE. CONDENSER_REFRIGERATION .AND. & - // HeatingCoil(NumCoil)%ReclaimHeatingCoilName .NE. CoilName)CYCLE - // CoilFound = CoilNum - // EXIT - // END DO - // ELSEIF // note should eventually get rid of this string comparison if (UtilityRoutines::SameString(CoilType, "COIL:COOLING:DX:SINGLESPEED") || UtilityRoutines::SameString(CoilType, "COIL:COOLING:DX:TWOSPEED") || diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index c7d423ba5c3..8728c2e78a7 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -190,7 +190,8 @@ namespace PlantLoopEquip { using BaseboardRadiator::UpdateBaseboardPlantConnection; using HVACVariableRefrigerantFlow::SimVRFCondenserPlant; using HWBaseboardRadiator::UpdateHWBaseboardPlantConnection; - using RefrigeratedCase::SimRefrigCondenser; + using RefrigeratedCase::SimRefrigWaterCondenser; + using RefrigeratedCase::SimRefrigWaterCoolRack; using SteamBaseboardRadiator::UpdateSteamBaseboardPlantConnection; using WaterCoils::UpdateWaterToAirCoilPlantConnection; @@ -911,14 +912,14 @@ namespace PlantLoopEquip { } else if (GeneralEquipType == GenEquipTypes_Refrigeration) { if (EquipTypeNum == TypeOf_RefrigSystemWaterCondenser) { - SimRefrigCondenser(EquipTypeNum, sim_component.Name, EquipNum, FirstHVACIteration, InitLoopEquip); + SimRefrigWaterCondenser(sim_component.Name, EquipNum, FirstHVACIteration, InitLoopEquip); if (InitLoopEquip) { sim_component.CompNum = EquipNum; } } else if (EquipTypeNum == TypeOf_RefrigerationWaterCoolRack) { - SimRefrigCondenser(EquipTypeNum, sim_component.Name, EquipNum, FirstHVACIteration, InitLoopEquip); + SimRefrigWaterCoolRack(sim_component.Name, EquipNum, FirstHVACIteration, InitLoopEquip); if (InitLoopEquip) { sim_component.CompNum = EquipNum; diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index e6384b6e6e1..5908715536f 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -46,7 +46,6 @@ // POSSIBILITY OF SUCH DAMAGE. // C++ Headers -#include #include #include @@ -10082,7 +10081,7 @@ namespace RefrigeratedCase { } } - void SimRefrigCondenser(int const SysType, std::string const &CompName, int &CompIndex, bool const FirstHVACIteration, bool const InitLoopEquip) + void SimRefrigWaterCondenser(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip) { // SUBROUTINE INFORMATION: @@ -10113,53 +10112,28 @@ namespace RefrigeratedCase { int Num(0); if (CompIndex == 0) { - { - auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - Num = UtilityRoutines::FindItemInList(CompName, RefrigRack); - } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - Num = UtilityRoutines::FindItemInList(CompName, Condenser); - } else { - ShowFatalError("SimRefrigCondenser: invalid system type passed"); - } - } + Num = UtilityRoutines::FindItemInList(CompName, Condenser); if (Num == 0) { ShowFatalError("SimRefrigCondenser: Specified refrigeration condenser not Valid =" + CompName); } + CompIndex = Num; + } else { Num = CompIndex; - { - auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - if (Num > DataHeatBalance::NumRefrigeratedRacks || Num < 1) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + - ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); - } - if (CheckEquipNameRackWaterCondenser(Num)) { - if (CompName != RefrigRack(Num).Name) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + - ", stored Unit name for that index=" + RefrigRack(Num).Name); - } - CheckEquipNameRackWaterCondenser(Num) = false; - } - - } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - if (Num > DataHeatBalance::NumRefrigCondensers || Num < 1) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + - ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigCondensers) + ", Entered Unit name=" + CompName); - } - if (CheckEquipNameWaterCondenser(Num)) { - if (CompName != Condenser(Num).Name) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + - ", stored Unit name for that index=" + Condenser(Num).Name); - } - CheckEquipNameWaterCondenser(Num) = false; - } + if (Num > DataHeatBalance::NumRefrigCondensers || Num < 1) { + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + + ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigCondensers) + ", Entered Unit name=" + CompName); + } + if (CheckEquipNameWaterCondenser(Num)) { + if (CompName != Condenser(Num).Name) { + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + + ", stored Unit name for that index=" + Condenser(Num).Name); } + CheckEquipNameWaterCondenser(Num) = false; } } @@ -10187,55 +10161,26 @@ namespace RefrigeratedCase { std::string ErrIntro; // set variables depending upon system type - { - auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - PlantInletNode = RefrigRack(Num).InletNode; - PlantOutletNode = RefrigRack(Num).OutletNode; - PlantLoopIndex = RefrigRack(Num).PlantLoopNum; - PlantLoopSideIndex = RefrigRack(Num).PlantLoopSideNum; - PlantBranchIndex = RefrigRack(Num).PlantBranchNum; - PlantCompIndex = RefrigRack(Num).PlantCompNum; - - TotalCondenserHeat = - DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - RefrigRack(Num).LaggedUsedWaterHeater - RefrigRack(Num).LaggedUsedHVACCoil; - FlowType = RefrigRack(Num).FlowType; - InletTemp = RefrigRack(Num).InletTemp; - DesVolFlowRate = RefrigRack(Num).DesVolFlowRate; - MassFlowRateMax = RefrigRack(Num).MassFlowRateMax; - OutletTempMax = RefrigRack(Num).OutletTempMax; - Name = RefrigRack(Num).Name; - TypeName = "Refrigeration:CompressorRack:"; - ErrIntro = "Condenser for refrigeration rack "; - NoFlowWarnIndex = RefrigRack(Num).NoFlowWarnIndex; - HighFlowWarnIndex = RefrigRack(Num).HighFlowWarnIndex; - HighTempWarnIndex = RefrigRack(Num).HighTempWarnIndex; - HighInletWarnIndex = RefrigRack(Num).HighInletWarnIndex; - } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - PlantInletNode = Condenser(Num).InletNode; - PlantOutletNode = Condenser(Num).OutletNode; - PlantLoopIndex = Condenser(Num).PlantLoopNum; - PlantLoopSideIndex = Condenser(Num).PlantLoopSideNum; - PlantBranchIndex = Condenser(Num).PlantBranchNum; - PlantCompIndex = Condenser(Num).PlantCompNum; - - TotalCondenserHeat = Condenser(Num).CondLoad; - FlowType = Condenser(Num).FlowType; - InletTemp = Condenser(Num).InletTemp; - DesVolFlowRate = Condenser(Num).DesVolFlowRate; - MassFlowRateMax = Condenser(Num).MassFlowRateMax; - OutletTempMax = Condenser(Num).OutletTempMax; - Name = Condenser(Num).Name; - TypeName = "Refrigeration:Condenser:WaterCooled"; - ErrIntro = "Condenser for refrigeration system "; - NoFlowWarnIndex = Condenser(Num).NoFlowWarnIndex; - HighFlowWarnIndex = Condenser(Num).HighFlowWarnIndex; - HighTempWarnIndex = Condenser(Num).HighTempWarnIndex; - HighInletWarnIndex = Condenser(Num).HighInletWarnIndex; - } else { - assert(false); - } - } + PlantInletNode = Condenser(Num).InletNode; + PlantOutletNode = Condenser(Num).OutletNode; + PlantLoopIndex = Condenser(Num).PlantLoopNum; + PlantLoopSideIndex = Condenser(Num).PlantLoopSideNum; + PlantBranchIndex = Condenser(Num).PlantBranchNum; + PlantCompIndex = Condenser(Num).PlantCompNum; + + TotalCondenserHeat = Condenser(Num).CondLoad; + FlowType = Condenser(Num).FlowType; + InletTemp = Condenser(Num).InletTemp; + DesVolFlowRate = Condenser(Num).DesVolFlowRate; + MassFlowRateMax = Condenser(Num).MassFlowRateMax; + OutletTempMax = Condenser(Num).OutletTempMax; + Name = Condenser(Num).Name; + TypeName = "Refrigeration:Condenser:WaterCooled"; + ErrIntro = "Condenser for refrigeration system "; + NoFlowWarnIndex = Condenser(Num).NoFlowWarnIndex; + HighFlowWarnIndex = Condenser(Num).HighFlowWarnIndex; + HighTempWarnIndex = Condenser(Num).HighTempWarnIndex; + HighInletWarnIndex = Condenser(Num).HighInletWarnIndex; // Current condenser is water cooled // Make demand request on first HVAC iteration @@ -10248,11 +10193,9 @@ namespace RefrigeratedCase { Real64 OutletTemp(0.0); if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { - if (SysType == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - OutletTemp = ScheduleManager::GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); - } else if (SysType == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - OutletTemp = ScheduleManager::GetCurrentScheduleValue(Condenser(Num).OutletTempSchedPtr); - } + + OutletTemp = ScheduleManager::GetCurrentScheduleValue(Condenser(Num).OutletTempSchedPtr); + if (OutletTemp == InletTemp) { if (HighInletWarnIndex == 0) { @@ -10315,31 +10258,206 @@ namespace RefrigeratedCase { } // set up output variables - { - auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - RefrigRack(Num).MassFlowRate = MassFlowRate; - RefrigRack(Num).VolFlowRate = VolFlowRate; - RefrigRack(Num).OutletTemp = OutletTemp; - RefrigRack(Num).HighFlowWarnIndex = HighFlowWarnIndex; - RefrigRack(Num).HighTempWarnIndex = HighTempWarnIndex; - RefrigRack(Num).HighInletWarnIndex = HighInletWarnIndex; - RefrigRack(Num).NoFlowWarnIndex = NoFlowWarnIndex; - } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - Condenser(Num).MassFlowRate = MassFlowRate; - Condenser(Num).VolFlowRate = VolFlowRate; - Condenser(Num).OutletTemp = OutletTemp; - Condenser(Num).HighFlowWarnIndex = HighFlowWarnIndex; - Condenser(Num).HighTempWarnIndex = HighTempWarnIndex; - Condenser(Num).NoFlowWarnIndex = NoFlowWarnIndex; - Condenser(Num).HighInletWarnIndex = HighInletWarnIndex; + Condenser(Num).MassFlowRate = MassFlowRate; + Condenser(Num).VolFlowRate = VolFlowRate; + Condenser(Num).OutletTemp = OutletTemp; + Condenser(Num).HighFlowWarnIndex = HighFlowWarnIndex; + Condenser(Num).HighTempWarnIndex = HighTempWarnIndex; + Condenser(Num).NoFlowWarnIndex = NoFlowWarnIndex; + Condenser(Num).HighInletWarnIndex = HighInletWarnIndex; + + Condenser(Num).UpdateCondenser(); + } + + void SimRefrigWaterCoolRack(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip) + { + + // SUBROUTINE INFORMATION: + // AUTHOR Randy Hudson, ORNL + // DATE WRITTEN July 2007 + // MODIFIED Therese Stovall, ORNL May 2008 + // Brent Griffith, NREL Oct 2010, generalize fluid properties + // plant upgrades, moved where called from to SimPlantEquip from ManageNonZoneEquipment + // RE-ENGINEERED na + + // PURPOSE OF THIS SUBROUTINE: + // Simulates the water-cooled refrigeration condenser object. + // Modified to add condensers for detailed refrigeration systems and to + // avoid double-counting heat rejection that has been used in desuperheater + // hvac coils or water heaters. + + // METHODOLOGY EMPLOYED: + // Called from SimPlantEquip in PlantLoopEquipment , previously was called from Non-Zone Equipment Manager + // Flow is requested and the actual available flow is set. The outlet temperature is calculated. + + static std::string const RoutineName("SimRefrigCondenser"); + int PlantInletNode(0); + int PlantOutletNode(0); + int PlantLoopIndex(0); + int PlantLoopSideIndex(0); + int PlantBranchIndex(0); + int PlantCompIndex(0); + int Num(0); + + if (CompIndex == 0) { + Num = UtilityRoutines::FindItemInList(CompName, RefrigRack); + + if (Num == 0) { + ShowFatalError("SimRefrigCondenser: Specified refrigeration condenser not Valid =" + CompName); + } + + CompIndex = Num; + + } else { + + Num = CompIndex; + + if (Num > DataHeatBalance::NumRefrigeratedRacks || Num < 1) { + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + + ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); + } + if (CheckEquipNameRackWaterCondenser(Num)) { + if (CompName != RefrigRack(Num).Name) { + ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + + ", stored Unit name for that index=" + RefrigRack(Num).Name); + } + CheckEquipNameRackWaterCondenser(Num) = false; } } - RefrigRack(Num).UpdateRefrigCondenser(Num, SysType); + if (InitLoopEquip) { + InitRefrigeration(); + InitRefrigerationPlantConnections(); + return; + } + + InitRefrigerationPlantConnections(); + + Real64 InletTemp(0.0); + Real64 DesVolFlowRate(0.0); + Real64 MassFlowRate(0.0); + Real64 MassFlowRateMax(0.0); + Real64 OutletTempMax(0.0); + Real64 VolFlowRate(0.0); + int FlowType(0); + int NoFlowWarnIndex(0); + int HighFlowWarnIndex(0); + int HighInletWarnIndex(0); + int HighTempWarnIndex(0); + std::string Name; + std::string TypeName; + std::string ErrIntro; + + // set variables depending upon system type + PlantInletNode = RefrigRack(Num).InletNode; + PlantOutletNode = RefrigRack(Num).OutletNode; + PlantLoopIndex = RefrigRack(Num).PlantLoopNum; + PlantLoopSideIndex = RefrigRack(Num).PlantLoopSideNum; + PlantBranchIndex = RefrigRack(Num).PlantBranchNum; + PlantCompIndex = RefrigRack(Num).PlantCompNum; + + TotalCondenserHeat = + DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - RefrigRack(Num).LaggedUsedWaterHeater - RefrigRack(Num).LaggedUsedHVACCoil; + FlowType = RefrigRack(Num).FlowType; + InletTemp = RefrigRack(Num).InletTemp; + DesVolFlowRate = RefrigRack(Num).DesVolFlowRate; + MassFlowRateMax = RefrigRack(Num).MassFlowRateMax; + OutletTempMax = RefrigRack(Num).OutletTempMax; + Name = RefrigRack(Num).Name; + TypeName = "Refrigeration:CompressorRack:"; + ErrIntro = "Condenser for refrigeration rack "; + NoFlowWarnIndex = RefrigRack(Num).NoFlowWarnIndex; + HighFlowWarnIndex = RefrigRack(Num).HighFlowWarnIndex; + HighTempWarnIndex = RefrigRack(Num).HighTempWarnIndex; + HighInletWarnIndex = RefrigRack(Num).HighInletWarnIndex; + + // Current condenser is water cooled + // Make demand request on first HVAC iteration + + // get cooling fluid properties + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + + // first determine desired flow + Real64 OutletTemp(0.0); + + if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { + OutletTemp = ScheduleManager::GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); + + if (OutletTemp == InletTemp) { + + if (HighInletWarnIndex == 0) { + ShowSevereError(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); + ShowContinueError("cooling water is not cold enough to reach desired outlet temperature"); + } + ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", + HighInletWarnIndex); + VolFlowRate = 9999.0; + MassFlowRate = VolFlowRate * rho; + } else { + Real64 DeltaT = OutletTemp - InletTemp; + MassFlowRate = TotalCondenserHeat / Cp / DeltaT; + // Check for maximum flow in the component + if (MassFlowRate > MassFlowRateMax) { + if (HighFlowWarnIndex == 0) { + ShowWarningMessage(TypeName + Name); + ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); + ShowContinueError("Flow reset to maximum value."); + } // HighFlowWarnIndex + ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Flow rate higher than maximum allowed ... continues", HighFlowWarnIndex); + // END IF + MassFlowRate = MassFlowRateMax; + } + } // compare outlet T to inlet T + + } else if (FlowType == ConstantFlow && TotalCondenserHeat > 0.0) { + // this part for constant flow condition + VolFlowRate = DesVolFlowRate; + MassFlowRate = VolFlowRate * rho; + + } else if (TotalCondenserHeat == 0.0) { + MassFlowRate = 0.0; + + } // on flow type + // check against plant, might get changed. + PlantUtilities::SetComponentFlowRate(MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + + VolFlowRate = MassFlowRate / rho; + + if (MassFlowRate > 0) { + OutletTemp = TotalCondenserHeat / (MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; + } else { + OutletTemp = InletTemp; + if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { + + ShowRecurringWarningErrorAtEnd( + TypeName + Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", + NoFlowWarnIndex); + } + } + // Check outlet water temp for max value + if (OutletTemp > OutletTempMax) { + if (HighTempWarnIndex == 0) { + ShowWarningMessage(TypeName + Name); + ShowContinueError( + "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); + } + ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Condenser outlet temp higher than maximum allowed ... continues", HighTempWarnIndex); + } + + // set up output variables + RefrigRack(Num).MassFlowRate = MassFlowRate; + RefrigRack(Num).VolFlowRate = VolFlowRate; + RefrigRack(Num).OutletTemp = OutletTemp; + RefrigRack(Num).HighFlowWarnIndex = HighFlowWarnIndex; + RefrigRack(Num).HighTempWarnIndex = HighTempWarnIndex; + RefrigRack(Num).HighInletWarnIndex = HighInletWarnIndex; + RefrigRack(Num).NoFlowWarnIndex = NoFlowWarnIndex; + + RefrigRack(Num).UpdateCondenser(); } - void RefrigRackData::UpdateRefrigCondenser(int const Num, int const SysType) + void RefrigCondenserData::UpdateCondenser() { // SUBROUTINE INFORMATION: @@ -10351,32 +10469,30 @@ namespace RefrigeratedCase { // PURPOSE OF THIS SUBROUTINE: // Updates the node variables with local variables. - int inletNode(0); - int outletNode(0); + // Pass all variables from inlet to outlet node + PlantUtilities::SafeCopyPlantNode(this->InletNode, this->OutletNode); - { - auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - inletNode = this->InletNode; - outletNode = this->OutletNode; - } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - inletNode = Condenser(Num).InletNode; - outletNode = Condenser(Num).OutletNode; - } - } + // Set outlet node variables that are possibly changed + DataLoopNode::Node(this->OutletNode).Temp = this->OutletTemp; + } + + void RefrigRackData::UpdateCondenser() + { + + // SUBROUTINE INFORMATION: + // AUTHOR Randy Hudson, ORNL + // DATE WRITTEN July 2007 + // MODIFIED na + // RE-ENGINEERED na + + // PURPOSE OF THIS SUBROUTINE: + // Updates the node variables with local variables. // Pass all variables from inlet to outlet node - PlantUtilities::SafeCopyPlantNode(inletNode, outletNode); // DataLoopNode::Node(OutletNode) = DataLoopNode::Node(InletNode) + PlantUtilities::SafeCopyPlantNode(this->InletNode, this->OutletNode); // Set outlet node variables that are possibly changed - { - auto const SELECT_CASE_var(SysType); - if (SELECT_CASE_var == DataPlant::TypeOf_RefrigerationWaterCoolRack) { - DataLoopNode::Node(outletNode).Temp = this->OutletTemp; - } else if (SELECT_CASE_var == DataPlant::TypeOf_RefrigSystemWaterCondenser) { - DataLoopNode::Node(outletNode).Temp = Condenser(Num).OutletTemp; - } - } + DataLoopNode::Node(this->OutletNode).Temp = this->OutletTemp; } void SimulateDetailedRefrigerationSystems() diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index ef4151b24f9..fb0e10d430b 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -358,7 +358,7 @@ namespace RefrigeratedCase { ActualEvapPumpPower = 0.0; } - void UpdateRefrigCondenser(int Num, int SysType); + void UpdateCondenser(); void CalcRackSystem(); @@ -848,8 +848,9 @@ namespace RefrigeratedCase { InternalEnergyRecovered = 0.0; TotalHeatRecoveredLoad = 0.0; TotalHeatRecoveredEnergy = 0.0; - // LowTempWarn = 0 } + + void UpdateCondenser(); }; struct RefrigGasCoolerData @@ -1511,7 +1512,9 @@ namespace RefrigeratedCase { void InitRefrigerationPlantConnections(); - void SimRefrigCondenser(int SysType, std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); + void SimRefrigWaterCondenser(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); + + void SimRefrigWaterCoolRack(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); void SimulateDetailedRefrigerationSystems(); From 3e36352ba59fecff44a80e3d20f52f9955ee5365 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 11:32:34 -0700 Subject: [PATCH 65/86] repeated if-else logic cleanups --- src/EnergyPlus/RefrigeratedCase.cc | 47 +++++++++--------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 5908715536f..83d9025de7f 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -339,7 +339,7 @@ namespace RefrigeratedCase { int NumSimulationTransferLoadLists(0); // Number of Secondary Lists in simulation int NumUnusedRefrigCases(0); // Number of refrigerated cases not connected to a rack or system int NumUnusedCoils(0); // Number of refrigeration air coils not connected to a rack or system - int NumUnusedCondensers(0); // Number of refrigeration condensors not connected to a system + int NumUnusedCondensers(0); // Number of refrigeration condensers not connected to a system int NumUnusedGasCoolers(0); // Number of refrigeration gas coolers not connected to a system int NumUnusedCompressors(0); // Number of refrigeration compressors not connected to a system int NumUnusedSecondarys(0); // Number of refrigeration secondarys not connected to a system @@ -1577,9 +1577,7 @@ namespace RefrigeratedCase { // Input walk-in cooler defrost information AlphaNum = 5; - if (lAlphaBlanks(AlphaNum)) { - WalkIn(WalkInID).DefrostType = WalkInDefrostElec; - } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "Electric")) { + if (lAlphaBlanks(AlphaNum) || UtilityRoutines::SameString(Alphas(AlphaNum), "Electric")) { WalkIn(WalkInID).DefrostType = WalkInDefrostElec; } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "HotFluid")) { WalkIn(WalkInID).DefrostType = WalkInDefrostFluid; @@ -1594,9 +1592,7 @@ namespace RefrigeratedCase { } AlphaNum = 6; - if (lAlphaBlanks(AlphaNum)) { - WalkIn(WalkInID).DefrostControlType = DefrostControlSched; - } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "TimeSchedule")) { + if (lAlphaBlanks(AlphaNum) || UtilityRoutines::SameString(Alphas(AlphaNum), "TimeSchedule")) { WalkIn(WalkInID).DefrostControlType = DefrostControlSched; } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "TemperatureTermination")) { WalkIn(WalkInID).DefrostControlType = DefrostContTempTerm; @@ -1859,13 +1855,11 @@ namespace RefrigeratedCase { } // have schedule pointer } // blank on door opening schedule (AStart + 2) - if (lAlphaBlanks(AStart + 3)) { + if (lAlphaBlanks(AStart + 3) || UtilityRoutines::SameString(Alphas(AStart + 3), "AirCurtain")) { // default air curtain WalkIn(WalkInID).StockDoorProtectType(ZoneID) = WIStockDoorAirCurtain; } else if (UtilityRoutines::SameString(Alphas(AStart + 3), "None")) { WalkIn(WalkInID).StockDoorProtectType(ZoneID) = WIStockDoorNone; - } else if (UtilityRoutines::SameString(Alphas(AStart + 3), "AirCurtain")) { - WalkIn(WalkInID).StockDoorProtectType(ZoneID) = WIStockDoorAirCurtain; } else if (UtilityRoutines::SameString(Alphas(AStart + 3), "StripCurtain")) { WalkIn(WalkInID).StockDoorProtectType(ZoneID) = WIStockDoorStripCurtain; } else { @@ -2304,9 +2298,7 @@ namespace RefrigeratedCase { // Input fan control type ++AlphaNum; // A7 - if (lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).FanType = FanConstantSpeed; - } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "Fixed")) { + if (lAlphaBlanks(AlphaNum) || UtilityRoutines::SameString(Alphas(AlphaNum), "Fixed")) { WarehouseCoil(CoilID).FanType = FanConstantSpeed; } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "FixedLinear")) { WarehouseCoil(CoilID).FanType = FanConstantSpeedLinear; @@ -2343,9 +2335,7 @@ namespace RefrigeratedCase { // Input defrost type ++AlphaNum; // A8 - if (lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).DefrostType = DefrostElec; - } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "Electric")) { + if (lAlphaBlanks(AlphaNum) || UtilityRoutines::SameString(Alphas(AlphaNum), "Electric")) { WarehouseCoil(CoilID).DefrostType = DefrostElec; } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "HotFluid")) { WarehouseCoil(CoilID).DefrostType = DefrostFluid; @@ -2360,9 +2350,7 @@ namespace RefrigeratedCase { } // defrost type ++AlphaNum; // A9 - if (lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).DefrostControlType = DefrostControlSched; - } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "TimeSchedule")) { + if (lAlphaBlanks(AlphaNum) || UtilityRoutines::SameString(Alphas(AlphaNum), "TimeSchedule")) { WarehouseCoil(CoilID).DefrostControlType = DefrostControlSched; } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "TemperatureTermination")) { WarehouseCoil(CoilID).DefrostControlType = DefrostContTempTerm; @@ -2439,12 +2427,10 @@ namespace RefrigeratedCase { } // defrost type ++AlphaNum; // A12 - if (lAlphaBlanks(AlphaNum)) { + if (lAlphaBlanks(AlphaNum) || UtilityRoutines::SameString(Alphas(AlphaNum), "Middle")) { WarehouseCoil(CoilID).VerticalLocation = Middle; // default position } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "Ceiling")) { WarehouseCoil(CoilID).VerticalLocation = Ceiling; - } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "Middle")) { - WarehouseCoil(CoilID).VerticalLocation = Middle; } else if (UtilityRoutines::SameString(Alphas(AlphaNum), "Floor")) { WarehouseCoil(CoilID).VerticalLocation = Floor; } else { @@ -3127,9 +3113,7 @@ namespace RefrigeratedCase { if (!lNumericBlanks(1)) Condenser(CondNum).RatedSubcool = Numbers(1); // Get fan control type - if (UtilityRoutines::SameString(Alphas(3), "Fixed")) { - Condenser(CondNum).FanSpeedControlType = FanConstantSpeed; - } else if (UtilityRoutines::SameString(Alphas(3), "FixedLinear")) { + if (UtilityRoutines::SameString(Alphas(3), "FixedLinear")) { Condenser(CondNum).FanSpeedControlType = FanConstantSpeedLinear; } else if (UtilityRoutines::SameString(Alphas(3), "VariableSpeed")) { Condenser(CondNum).FanSpeedControlType = FanVariableSpeed; @@ -3239,9 +3223,7 @@ namespace RefrigeratedCase { if ((!lNumericBlanks(2)) && (Numbers(2) > 0.0)) Condenser(CondNum).RatedSubcool = Numbers(2); // Get fan control type - if (UtilityRoutines::SameString(Alphas(2), "Fixed")) { - Condenser(CondNum).FanSpeedControlType = FanConstantSpeed; - } else if (UtilityRoutines::SameString(Alphas(3), "FixedLinear")) { + if (UtilityRoutines::SameString(Alphas(3), "FixedLinear")) { Condenser(CondNum).FanSpeedControlType = FanConstantSpeedLinear; } else if (UtilityRoutines::SameString(Alphas(2), "VariableSpeed")) { Condenser(CondNum).FanSpeedControlType = FanVariableSpeed; @@ -10781,7 +10763,7 @@ namespace RefrigeratedCase { System(SysNum).CalcDetailedSystem(SysNum); - bool DeRate = false; // If true, need to derate aircoils because load can't be met by system + bool DeRate; // If true, need to derate aircoils because load can't be met by system // With air chiller coils, don't use unmet energy, instead reduce capacity on coils to match avail compressor/cond capacity // current loads on compressor, exclusive of unmet loads from prev time steps @@ -11708,8 +11690,7 @@ namespace RefrigeratedCase { Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; - //! Initialize this gas cooler for this time step - AirVolRatio = 1.0; + // Initialize this gas cooler for this time step ActualFanPower = 0.0; TotalCondDefrostCreditLocal = 0.0; TotalLoadFromSystems = 0.0; @@ -12255,7 +12236,7 @@ namespace RefrigeratedCase { // Determine refrigerating capacity needed // Load due to previously unmet low temperature compressor loads (transcritical system) - Real64 AccumLoadLT = 0.0; + Real64 AccumLoadLT; NeededCapacityLT = 0.0; if (this->TransSysType == 2) { AccumLoadLT = max(0.0, (this->UnmetEnergyLT / LocalTimeStep / DataGlobals::SecInHour)); @@ -13795,7 +13776,6 @@ namespace RefrigeratedCase { } // Fluid type // Initialize this secondary for this time step - TotalLoad = 0.0; TotalPumpPower = 0.0; RefrigerationLoad = 0.0; TotalHotDefrostCondCredit = 0.0; @@ -14568,7 +14548,6 @@ namespace RefrigeratedCase { } else { // NOT (AirVolumeFlowMax > 0.0d0) WaterRemovRate = 0.0; latLoadServed = 0.0; - FrostChangekg = 0.0; SensLoadGross = 0.0; FanPowerActual = 0.0; } //(AirVolumeFlowMax > 0.0d0) From e6e5ba6cf64a7ec9b7c579bc0183c41ba1f8abf3 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 12:42:33 -0700 Subject: [PATCH 66/86] step 12 - inherit PlantComp for refrig rack --- src/EnergyPlus/Plant/PlantManager.cc | 2 + src/EnergyPlus/PlantLoopEquip.cc | 6 +- src/EnergyPlus/RefrigeratedCase.cc | 149 +++++++++++++-------------- src/EnergyPlus/RefrigeratedCase.hh | 9 +- 4 files changed, 80 insertions(+), 86 deletions(-) diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 6e0076879a3..fa13e677f42 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -102,6 +102,7 @@ #include #include #include +#include #include #include #include @@ -1437,6 +1438,7 @@ namespace EnergyPlus { this_comp.TypeOf_Num = TypeOf_RefrigerationWaterCoolRack; this_comp.GeneralEquipType = GenEquipTypes_Refrigeration; this_comp.CurOpSchemeType = DemandOpSchemeType; + this_comp.compPtr = RefrigeratedCase::RefrigRackData::factory(CompNames(CompNum)); } else if (UtilityRoutines::SameString(this_comp_type, "PlantComponent:UserDefined")) { this_comp.TypeOf_Num = TypeOf_PlantComponentUserDefined; this_comp.GeneralEquipType = GenEquipTypes_PlantComponent; diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index 8728c2e78a7..5718bb8ef18 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -919,11 +919,7 @@ namespace PlantLoopEquip { } } else if (EquipTypeNum == TypeOf_RefrigerationWaterCoolRack) { - SimRefrigWaterCoolRack(sim_component.Name, EquipNum, FirstHVACIteration, InitLoopEquip); - - if (InitLoopEquip) { - sim_component.CompNum = EquipNum; - } + sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); } else { ShowSevereError("SimPlantEquip: Invalid Refrigeration Type=" + sim_component.TypeOf); diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 83d9025de7f..b447dfa3d95 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -10251,7 +10251,35 @@ namespace RefrigeratedCase { Condenser(Num).UpdateCondenser(); } - void SimRefrigWaterCoolRack(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip) + PlantComponent *RefrigRackData::factory(std::string const &objectName) + { + // Process the input data for boilers if it hasn't been done already + if (GetRefrigerationInputFlag) { + CheckRefrigerationInput(); + GetRefrigerationInputFlag = false; + } + // Now look for this particular object in list + for (auto &obj : RefrigRack) { + if (obj.Name == objectName) { + return &obj; + } + } + // If we didn't find it, fatal + ShowFatalError("LocalRefrigRackFactory: Error getting inputs for object named: " + objectName); // LCOV_EXCL_LINE + // Shut up the compiler + return nullptr; // LCOV_EXCL_LINE + } + + void RefrigRackData::onInitLoopEquip(const PlantLocation &EP_UNUSED(calledFromLocation)) + { + InitRefrigeration(); + InitRefrigerationPlantConnections(); + } + + void RefrigRackData::simulate(const PlantLocation &EP_UNUSED(calledFromLocation), + bool const FirstHVACIteration, + Real64 &EP_UNUSED(CurLoad), + bool const EP_UNUSED(RunFlag)) { // SUBROUTINE INFORMATION: @@ -10281,43 +10309,8 @@ namespace RefrigeratedCase { int PlantCompIndex(0); int Num(0); - if (CompIndex == 0) { - Num = UtilityRoutines::FindItemInList(CompName, RefrigRack); - - if (Num == 0) { - ShowFatalError("SimRefrigCondenser: Specified refrigeration condenser not Valid =" + CompName); - } - - CompIndex = Num; - - } else { - - Num = CompIndex; - - if (Num > DataHeatBalance::NumRefrigeratedRacks || Num < 1) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + - ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigeratedRacks) + ", Entered Unit name=" + CompName); - } - if (CheckEquipNameRackWaterCondenser(Num)) { - if (CompName != RefrigRack(Num).Name) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + - ", stored Unit name for that index=" + RefrigRack(Num).Name); - } - CheckEquipNameRackWaterCondenser(Num) = false; - } - } - - if (InitLoopEquip) { - InitRefrigeration(); - InitRefrigerationPlantConnections(); - return; - } - InitRefrigerationPlantConnections(); - Real64 InletTemp(0.0); - Real64 DesVolFlowRate(0.0); - Real64 MassFlowRate(0.0); Real64 MassFlowRateMax(0.0); Real64 OutletTempMax(0.0); Real64 VolFlowRate(0.0); @@ -10331,42 +10324,39 @@ namespace RefrigeratedCase { std::string ErrIntro; // set variables depending upon system type - PlantInletNode = RefrigRack(Num).InletNode; - PlantOutletNode = RefrigRack(Num).OutletNode; - PlantLoopIndex = RefrigRack(Num).PlantLoopNum; - PlantLoopSideIndex = RefrigRack(Num).PlantLoopSideNum; - PlantBranchIndex = RefrigRack(Num).PlantBranchNum; - PlantCompIndex = RefrigRack(Num).PlantCompNum; + PlantInletNode = this->InletNode; + PlantOutletNode = this->OutletNode; + PlantLoopIndex = this->PlantLoopNum; + PlantLoopSideIndex = this->PlantLoopSideNum; + PlantBranchIndex = this->PlantBranchNum; + PlantCompIndex = this->PlantCompNum; TotalCondenserHeat = - DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - RefrigRack(Num).LaggedUsedWaterHeater - RefrigRack(Num).LaggedUsedHVACCoil; - FlowType = RefrigRack(Num).FlowType; - InletTemp = RefrigRack(Num).InletTemp; - DesVolFlowRate = RefrigRack(Num).DesVolFlowRate; - MassFlowRateMax = RefrigRack(Num).MassFlowRateMax; - OutletTempMax = RefrigRack(Num).OutletTempMax; - Name = RefrigRack(Num).Name; + DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; + FlowType = this->FlowType; + OutletTempMax = this->OutletTempMax; + Name = this->Name; TypeName = "Refrigeration:CompressorRack:"; ErrIntro = "Condenser for refrigeration rack "; - NoFlowWarnIndex = RefrigRack(Num).NoFlowWarnIndex; - HighFlowWarnIndex = RefrigRack(Num).HighFlowWarnIndex; - HighTempWarnIndex = RefrigRack(Num).HighTempWarnIndex; - HighInletWarnIndex = RefrigRack(Num).HighInletWarnIndex; + NoFlowWarnIndex = this->NoFlowWarnIndex; + HighFlowWarnIndex = this->HighFlowWarnIndex; + HighTempWarnIndex = this->HighTempWarnIndex; + HighInletWarnIndex = this->HighInletWarnIndex; // Current condenser is water cooled // Make demand request on first HVAC iteration // get cooling fluid properties - Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); // first determine desired flow Real64 OutletTemp(0.0); if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { - OutletTemp = ScheduleManager::GetCurrentScheduleValue(RefrigRack(Num).OutletTempSchedPtr); + OutletTemp = ScheduleManager::GetCurrentScheduleValue(this->OutletTempSchedPtr); - if (OutletTemp == InletTemp) { + if (OutletTemp == this->InletTemp) { if (HighInletWarnIndex == 0) { ShowSevereError(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); @@ -10375,12 +10365,12 @@ namespace RefrigeratedCase { ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", HighInletWarnIndex); VolFlowRate = 9999.0; - MassFlowRate = VolFlowRate * rho; + this->MassFlowRate = VolFlowRate * rho; } else { - Real64 DeltaT = OutletTemp - InletTemp; - MassFlowRate = TotalCondenserHeat / Cp / DeltaT; + Real64 DeltaT = OutletTemp - this->InletTemp; + this->MassFlowRate = TotalCondenserHeat / Cp / DeltaT; // Check for maximum flow in the component - if (MassFlowRate > MassFlowRateMax) { + if (this->MassFlowRate > MassFlowRateMax) { if (HighFlowWarnIndex == 0) { ShowWarningMessage(TypeName + Name); ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); @@ -10388,28 +10378,28 @@ namespace RefrigeratedCase { } // HighFlowWarnIndex ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Flow rate higher than maximum allowed ... continues", HighFlowWarnIndex); // END IF - MassFlowRate = MassFlowRateMax; + this->MassFlowRate = MassFlowRateMax; } } // compare outlet T to inlet T } else if (FlowType == ConstantFlow && TotalCondenserHeat > 0.0) { // this part for constant flow condition - VolFlowRate = DesVolFlowRate; - MassFlowRate = VolFlowRate * rho; + VolFlowRate = this->DesVolFlowRate; + this->MassFlowRate = VolFlowRate * rho; } else if (TotalCondenserHeat == 0.0) { - MassFlowRate = 0.0; + this->MassFlowRate = 0.0; } // on flow type // check against plant, might get changed. - PlantUtilities::SetComponentFlowRate(MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + PlantUtilities::SetComponentFlowRate(this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); - VolFlowRate = MassFlowRate / rho; + VolFlowRate = this->MassFlowRate / rho; - if (MassFlowRate > 0) { - OutletTemp = TotalCondenserHeat / (MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; + if (this->MassFlowRate > 0) { + OutletTemp = TotalCondenserHeat / (this->MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; } else { - OutletTemp = InletTemp; + OutletTemp = this->InletTemp; if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { ShowRecurringWarningErrorAtEnd( @@ -10428,15 +10418,14 @@ namespace RefrigeratedCase { } // set up output variables - RefrigRack(Num).MassFlowRate = MassFlowRate; - RefrigRack(Num).VolFlowRate = VolFlowRate; - RefrigRack(Num).OutletTemp = OutletTemp; - RefrigRack(Num).HighFlowWarnIndex = HighFlowWarnIndex; - RefrigRack(Num).HighTempWarnIndex = HighTempWarnIndex; - RefrigRack(Num).HighInletWarnIndex = HighInletWarnIndex; - RefrigRack(Num).NoFlowWarnIndex = NoFlowWarnIndex; - - RefrigRack(Num).UpdateCondenser(); + this->VolFlowRate = VolFlowRate; + this->OutletTemp = OutletTemp; + this->HighFlowWarnIndex = HighFlowWarnIndex; + this->HighTempWarnIndex = HighTempWarnIndex; + this->HighInletWarnIndex = HighInletWarnIndex; + this->NoFlowWarnIndex = NoFlowWarnIndex; + + this->UpdateCondenser(); } void RefrigCondenserData::UpdateCondenser() @@ -11218,7 +11207,7 @@ namespace RefrigeratedCase { int NumIter(0); // Iteration counter bool NotBalanced(true); // Flag to indicate convergence, based on system balance Real64 MassFlowStart(0.5); // Initial refrigerant mass flow through receiver bypass - Real64 ErrorMassFlow; // Error in calculated refrigerant mass flow trhough receiver bypass + Real64 ErrorMassFlow; // Error in calculated refrigerant mass flow through receiver bypass while (NotBalanced) { ++NumIter; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index fb0e10d430b..45670a2d794 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -55,6 +55,7 @@ // EnergyPlus Headers #include #include +#include namespace EnergyPlus { @@ -240,7 +241,7 @@ namespace RefrigeratedCase { void CalculateCase(); // Absolute pointer to refrigerated case }; - struct RefrigRackData + struct RefrigRackData : PlantComponent { // Members bool CoilFlag; // Flag to show if coil type load on rack @@ -363,6 +364,12 @@ namespace RefrigeratedCase { void CalcRackSystem(); void ReportRackSystem(int RackNum); + + static PlantComponent *factory(std::string const &objectName); + + void onInitLoopEquip(const PlantLocation &calledFromLocation) override; + + void simulate(const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag) override; }; struct RefrigSystemData From e3ea7efa83ce5e5da24ac04ac73f8e05b5fea77a Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 12:53:38 -0700 Subject: [PATCH 67/86] cleanup local mirrored vars --- src/EnergyPlus/RefrigeratedCase.cc | 84 ++++++++++-------------------- 1 file changed, 28 insertions(+), 56 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index b447dfa3d95..ad54e4594c0 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -10311,15 +10311,6 @@ namespace RefrigeratedCase { InitRefrigerationPlantConnections(); - Real64 MassFlowRateMax(0.0); - Real64 OutletTempMax(0.0); - Real64 VolFlowRate(0.0); - int FlowType(0); - int NoFlowWarnIndex(0); - int HighFlowWarnIndex(0); - int HighInletWarnIndex(0); - int HighTempWarnIndex(0); - std::string Name; std::string TypeName; std::string ErrIntro; @@ -10331,17 +10322,9 @@ namespace RefrigeratedCase { PlantBranchIndex = this->PlantBranchNum; PlantCompIndex = this->PlantCompNum; - TotalCondenserHeat = - DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; - FlowType = this->FlowType; - OutletTempMax = this->OutletTempMax; - Name = this->Name; + TotalCondenserHeat = DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; TypeName = "Refrigeration:CompressorRack:"; ErrIntro = "Condenser for refrigeration rack "; - NoFlowWarnIndex = this->NoFlowWarnIndex; - HighFlowWarnIndex = this->HighFlowWarnIndex; - HighTempWarnIndex = this->HighTempWarnIndex; - HighInletWarnIndex = this->HighInletWarnIndex; // Current condenser is water cooled // Make demand request on first HVAC iteration @@ -10350,42 +10333,39 @@ namespace RefrigeratedCase { Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - // first determine desired flow - Real64 OutletTemp(0.0); + if (this->FlowType == VariableFlow && TotalCondenserHeat > 0.0) { + this->OutletTemp = ScheduleManager::GetCurrentScheduleValue(this->OutletTempSchedPtr); - if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { - OutletTemp = ScheduleManager::GetCurrentScheduleValue(this->OutletTempSchedPtr); - - if (OutletTemp == this->InletTemp) { + if (this->OutletTemp == this->InletTemp) { - if (HighInletWarnIndex == 0) { - ShowSevereError(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); + if (this->HighInletWarnIndex == 0) { + ShowSevereError(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); ShowContinueError("cooling water is not cold enough to reach desired outlet temperature"); } - ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", - HighInletWarnIndex); - VolFlowRate = 9999.0; - this->MassFlowRate = VolFlowRate * rho; + ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", + this->HighInletWarnIndex); + this->VolFlowRate = 9999.0; + this->MassFlowRate = this->VolFlowRate * rho; } else { - Real64 DeltaT = OutletTemp - this->InletTemp; + Real64 DeltaT = this->OutletTemp - this->InletTemp; this->MassFlowRate = TotalCondenserHeat / Cp / DeltaT; // Check for maximum flow in the component - if (this->MassFlowRate > MassFlowRateMax) { - if (HighFlowWarnIndex == 0) { - ShowWarningMessage(TypeName + Name); + if (this->MassFlowRate > this->MassFlowRateMax) { + if (this->HighFlowWarnIndex == 0) { + ShowWarningMessage(TypeName + this->Name); ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); ShowContinueError("Flow reset to maximum value."); } // HighFlowWarnIndex - ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Flow rate higher than maximum allowed ... continues", HighFlowWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Flow rate higher than maximum allowed ... continues", this->HighFlowWarnIndex); // END IF - this->MassFlowRate = MassFlowRateMax; + this->MassFlowRate = this->MassFlowRateMax; } } // compare outlet T to inlet T - } else if (FlowType == ConstantFlow && TotalCondenserHeat > 0.0) { + } else if (this->FlowType == ConstantFlow && TotalCondenserHeat > 0.0) { // this part for constant flow condition - VolFlowRate = this->DesVolFlowRate; - this->MassFlowRate = VolFlowRate * rho; + this->VolFlowRate = this->DesVolFlowRate; + this->MassFlowRate = this->VolFlowRate * rho; } else if (TotalCondenserHeat == 0.0) { this->MassFlowRate = 0.0; @@ -10394,37 +10374,29 @@ namespace RefrigeratedCase { // check against plant, might get changed. PlantUtilities::SetComponentFlowRate(this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); - VolFlowRate = this->MassFlowRate / rho; + this->VolFlowRate = this->MassFlowRate / rho; if (this->MassFlowRate > 0) { - OutletTemp = TotalCondenserHeat / (this->MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; + this->OutletTemp = TotalCondenserHeat / (this->MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; } else { - OutletTemp = this->InletTemp; + this->OutletTemp = this->InletTemp; if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { ShowRecurringWarningErrorAtEnd( - TypeName + Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", - NoFlowWarnIndex); + TypeName + this->Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", + this->NoFlowWarnIndex); } } // Check outlet water temp for max value - if (OutletTemp > OutletTempMax) { - if (HighTempWarnIndex == 0) { - ShowWarningMessage(TypeName + Name); + if (this->OutletTemp > this->OutletTempMax) { + if (this->HighTempWarnIndex == 0) { + ShowWarningMessage(TypeName + this->Name); ShowContinueError( "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } - ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Condenser outlet temp higher than maximum allowed ... continues", HighTempWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Condenser outlet temp higher than maximum allowed ... continues", HighTempWarnIndex); } - // set up output variables - this->VolFlowRate = VolFlowRate; - this->OutletTemp = OutletTemp; - this->HighFlowWarnIndex = HighFlowWarnIndex; - this->HighTempWarnIndex = HighTempWarnIndex; - this->HighInletWarnIndex = HighInletWarnIndex; - this->NoFlowWarnIndex = NoFlowWarnIndex; - this->UpdateCondenser(); } From 07b3c3542b92e252724c5c1d91d5a47ea578b945 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 13:24:14 -0700 Subject: [PATCH 68/86] step 12 - inherit PlantComp for refrig condenser --- src/EnergyPlus/Plant/PlantManager.cc | 1 + src/EnergyPlus/PlantLoopEquip.cc | 8 +- src/EnergyPlus/RefrigeratedCase.cc | 183 +++++++++++---------------- src/EnergyPlus/RefrigeratedCase.hh | 12 +- 4 files changed, 81 insertions(+), 123 deletions(-) diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index fa13e677f42..8f5854c6c7b 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -1434,6 +1434,7 @@ namespace EnergyPlus { this_comp.TypeOf_Num = TypeOf_RefrigSystemWaterCondenser; this_comp.GeneralEquipType = GenEquipTypes_Refrigeration; this_comp.CurOpSchemeType = DemandOpSchemeType; + this_comp.compPtr = RefrigeratedCase::RefrigCondenserData::factory(CompNames(CompNum)); } else if (UtilityRoutines::SameString(this_comp_type, "Refrigeration:CompressorRack")) { this_comp.TypeOf_Num = TypeOf_RefrigerationWaterCoolRack; this_comp.GeneralEquipType = GenEquipTypes_Refrigeration; diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index 5718bb8ef18..40577ebb74b 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -190,8 +190,6 @@ namespace PlantLoopEquip { using BaseboardRadiator::UpdateBaseboardPlantConnection; using HVACVariableRefrigerantFlow::SimVRFCondenserPlant; using HWBaseboardRadiator::UpdateHWBaseboardPlantConnection; - using RefrigeratedCase::SimRefrigWaterCondenser; - using RefrigeratedCase::SimRefrigWaterCoolRack; using SteamBaseboardRadiator::UpdateSteamBaseboardPlantConnection; using WaterCoils::UpdateWaterToAirCoilPlantConnection; @@ -912,11 +910,7 @@ namespace PlantLoopEquip { } else if (GeneralEquipType == GenEquipTypes_Refrigeration) { if (EquipTypeNum == TypeOf_RefrigSystemWaterCondenser) { - SimRefrigWaterCondenser(sim_component.Name, EquipNum, FirstHVACIteration, InitLoopEquip); - - if (InitLoopEquip) { - sim_component.CompNum = EquipNum; - } + sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); } else if (EquipTypeNum == TypeOf_RefrigerationWaterCoolRack) { sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index ad54e4594c0..a83b6916061 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -10063,7 +10063,35 @@ namespace RefrigeratedCase { } } - void SimRefrigWaterCondenser(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip) + PlantComponent *RefrigCondenserData::factory(std::string const &objectName) + { + // Process the input data for boilers if it hasn't been done already + if (GetRefrigerationInputFlag) { + CheckRefrigerationInput(); + GetRefrigerationInputFlag = false; + } + // Now look for this particular object in list + for (auto &obj : Condenser) { + if (obj.Name == objectName) { + return &obj; + } + } + // If we didn't find it, fatal + ShowFatalError("LocalRefrigCondenserFactory: Error getting inputs for object named: " + objectName); // LCOV_EXCL_LINE + // Shut up the compiler + return nullptr; // LCOV_EXCL_LINE + } + + void RefrigCondenserData::onInitLoopEquip(const PlantLocation &EP_UNUSED(calledFromLocation)) + { + InitRefrigeration(); + InitRefrigerationPlantConnections(); + } + + void RefrigCondenserData::simulate(const PlantLocation &EP_UNUSED(calledFromLocation), + bool const FirstHVACIteration, + Real64 &EP_UNUSED(CurLoad), + bool const EP_UNUSED(RunFlag)) { // SUBROUTINE INFORMATION: @@ -10091,164 +10119,97 @@ namespace RefrigeratedCase { int PlantLoopSideIndex(0); int PlantBranchIndex(0); int PlantCompIndex(0); - int Num(0); - - if (CompIndex == 0) { - - Num = UtilityRoutines::FindItemInList(CompName, Condenser); - - if (Num == 0) { - ShowFatalError("SimRefrigCondenser: Specified refrigeration condenser not Valid =" + CompName); - } - - CompIndex = Num; - - } else { - Num = CompIndex; - - if (Num > DataHeatBalance::NumRefrigCondensers || Num < 1) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + - ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigCondensers) + ", Entered Unit name=" + CompName); - } - if (CheckEquipNameWaterCondenser(Num)) { - if (CompName != Condenser(Num).Name) { - ShowFatalError("SimRefrigCondenser: Invalid CompIndex passed=" + General::TrimSigDigits(Num) + ", Entered Unit name=" + CompName + - ", stored Unit name for that index=" + Condenser(Num).Name); - } - CheckEquipNameWaterCondenser(Num) = false; - } - } - - if (InitLoopEquip) { - InitRefrigeration(); - InitRefrigerationPlantConnections(); - return; - } InitRefrigerationPlantConnections(); - Real64 InletTemp(0.0); - Real64 DesVolFlowRate(0.0); - Real64 MassFlowRate(0.0); - Real64 MassFlowRateMax(0.0); - Real64 OutletTempMax(0.0); - Real64 VolFlowRate(0.0); - int FlowType(0); - int NoFlowWarnIndex(0); - int HighFlowWarnIndex(0); - int HighInletWarnIndex(0); - int HighTempWarnIndex(0); - std::string Name; std::string TypeName; std::string ErrIntro; // set variables depending upon system type - PlantInletNode = Condenser(Num).InletNode; - PlantOutletNode = Condenser(Num).OutletNode; - PlantLoopIndex = Condenser(Num).PlantLoopNum; - PlantLoopSideIndex = Condenser(Num).PlantLoopSideNum; - PlantBranchIndex = Condenser(Num).PlantBranchNum; - PlantCompIndex = Condenser(Num).PlantCompNum; - - TotalCondenserHeat = Condenser(Num).CondLoad; - FlowType = Condenser(Num).FlowType; - InletTemp = Condenser(Num).InletTemp; - DesVolFlowRate = Condenser(Num).DesVolFlowRate; - MassFlowRateMax = Condenser(Num).MassFlowRateMax; - OutletTempMax = Condenser(Num).OutletTempMax; - Name = Condenser(Num).Name; + PlantInletNode = this->InletNode; + PlantOutletNode = this->OutletNode; + PlantLoopIndex = this->PlantLoopNum; + PlantLoopSideIndex = this->PlantLoopSideNum; + PlantBranchIndex = this->PlantBranchNum; + PlantCompIndex = this->PlantCompNum; + + TotalCondenserHeat = this->CondLoad; TypeName = "Refrigeration:Condenser:WaterCooled"; ErrIntro = "Condenser for refrigeration system "; - NoFlowWarnIndex = Condenser(Num).NoFlowWarnIndex; - HighFlowWarnIndex = Condenser(Num).HighFlowWarnIndex; - HighTempWarnIndex = Condenser(Num).HighTempWarnIndex; - HighInletWarnIndex = Condenser(Num).HighInletWarnIndex; // Current condenser is water cooled // Make demand request on first HVAC iteration // get cooling fluid properties - Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - - // first determine desired flow - Real64 OutletTemp(0.0); + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - if (FlowType == VariableFlow && TotalCondenserHeat > 0.0) { + if (this->FlowType == VariableFlow && TotalCondenserHeat > 0.0) { - OutletTemp = ScheduleManager::GetCurrentScheduleValue(Condenser(Num).OutletTempSchedPtr); + this->OutletTemp = ScheduleManager::GetCurrentScheduleValue(this->OutletTempSchedPtr); - if (OutletTemp == InletTemp) { + if (this->OutletTemp == this->InletTemp) { - if (HighInletWarnIndex == 0) { - ShowSevereError(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); + if (this->HighInletWarnIndex == 0) { + ShowSevereError(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); ShowContinueError("cooling water is not cold enough to reach desired outlet temperature"); } - ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", - HighInletWarnIndex); - VolFlowRate = 9999.0; - MassFlowRate = VolFlowRate * rho; + ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", + this->HighInletWarnIndex); + this->VolFlowRate = 9999.0; + this->MassFlowRate = this->VolFlowRate * rho; } else { - Real64 DeltaT = OutletTemp - InletTemp; - MassFlowRate = TotalCondenserHeat / Cp / DeltaT; + Real64 DeltaT = this->OutletTemp - this->InletTemp; + this->MassFlowRate = TotalCondenserHeat / Cp / DeltaT; // Check for maximum flow in the component - if (MassFlowRate > MassFlowRateMax) { - if (HighFlowWarnIndex == 0) { - ShowWarningMessage(TypeName + Name); + if (this->MassFlowRate > this->MassFlowRateMax) { + if (this->HighFlowWarnIndex == 0) { + ShowWarningMessage(TypeName + this->Name); ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); ShowContinueError("Flow reset to maximum value."); } // HighFlowWarnIndex - ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Flow rate higher than maximum allowed ... continues", HighFlowWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Flow rate higher than maximum allowed ... continues", this->HighFlowWarnIndex); // END IF - MassFlowRate = MassFlowRateMax; + this->MassFlowRate = this->MassFlowRateMax; } } // compare outlet T to inlet T - } else if (FlowType == ConstantFlow && TotalCondenserHeat > 0.0) { + } else if (this->FlowType == ConstantFlow && TotalCondenserHeat > 0.0) { // this part for constant flow condition - VolFlowRate = DesVolFlowRate; - MassFlowRate = VolFlowRate * rho; + this->VolFlowRate = this->DesVolFlowRate; + this->MassFlowRate = this->VolFlowRate * rho; } else if (TotalCondenserHeat == 0.0) { - MassFlowRate = 0.0; + this->MassFlowRate = 0.0; } // on flow type // check against plant, might get changed. - PlantUtilities::SetComponentFlowRate(MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + PlantUtilities::SetComponentFlowRate(this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); - VolFlowRate = MassFlowRate / rho; + this->VolFlowRate = this->MassFlowRate / rho; - if (MassFlowRate > 0) { - OutletTemp = TotalCondenserHeat / (MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; + if (this->MassFlowRate > 0) { + this->OutletTemp = TotalCondenserHeat / (this->MassFlowRate * Cp) + DataLoopNode::Node(PlantInletNode).Temp; } else { - OutletTemp = InletTemp; + this->OutletTemp = this->InletTemp; if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { ShowRecurringWarningErrorAtEnd( - TypeName + Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", - NoFlowWarnIndex); + TypeName + this->Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", + this->FlowType); } } // Check outlet water temp for max value - if (OutletTemp > OutletTempMax) { - if (HighTempWarnIndex == 0) { - ShowWarningMessage(TypeName + Name); + if (this->OutletTemp > this->OutletTempMax) { + if (this->HighTempWarnIndex == 0) { + ShowWarningMessage(TypeName + this->Name); ShowContinueError( "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } - ShowRecurringWarningErrorAtEnd(ErrIntro + Name + " - Condenser outlet temp higher than maximum allowed ... continues", HighTempWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Condenser outlet temp higher than maximum allowed ... continues", this->HighTempWarnIndex); } - // set up output variables - Condenser(Num).MassFlowRate = MassFlowRate; - Condenser(Num).VolFlowRate = VolFlowRate; - Condenser(Num).OutletTemp = OutletTemp; - Condenser(Num).HighFlowWarnIndex = HighFlowWarnIndex; - Condenser(Num).HighTempWarnIndex = HighTempWarnIndex; - Condenser(Num).NoFlowWarnIndex = NoFlowWarnIndex; - Condenser(Num).HighInletWarnIndex = HighInletWarnIndex; - - Condenser(Num).UpdateCondenser(); + this->UpdateCondenser(); } PlantComponent *RefrigRackData::factory(std::string const &objectName) @@ -12501,7 +12462,7 @@ namespace RefrigeratedCase { Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).LoadFactor = 1.0; - // calculate load factor for last compressor addded + // calculate load factor for last compressor added // assumes either cycling or part load eff = full load eff for last compressor if ((this->TotCompCapacityHP + Compressor(CompID).Capacity) >= (NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP)) { diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 45670a2d794..40537ada8a7 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -712,7 +712,7 @@ namespace RefrigeratedCase { } }; - struct RefrigCondenserData + struct RefrigCondenserData : PlantComponent { // Members std::string Name; // Name of condenser @@ -858,6 +858,12 @@ namespace RefrigeratedCase { } void UpdateCondenser(); + + static PlantComponent *factory(std::string const &objectName); + + void onInitLoopEquip(const PlantLocation &calledFromLocation) override; + + void simulate(const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag) override; }; struct RefrigGasCoolerData @@ -1519,10 +1525,6 @@ namespace RefrigeratedCase { void InitRefrigerationPlantConnections(); - void SimRefrigWaterCondenser(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); - - void SimRefrigWaterCoolRack(std::string const &CompName, int &CompIndex, bool FirstHVACIteration, bool InitLoopEquip); - void SimulateDetailedRefrigerationSystems(); void SimulateDetailedTransRefrigSystems(); From b7bb47e194474cd37f32423a1508eea133077058 Mon Sep 17 00:00:00 2001 From: "Jason W. DeGraw" Date: Mon, 6 Jan 2020 16:57:15 -0500 Subject: [PATCH 69/86] Fix up license checking for Python3 Clean up some 2.7-isms, clean up some of the code that wasn't needed any longer, and clarify terminology --- scripts/dev/license-check.py | 4 +- scripts/dev/license-update.py | 5 +- scripts/dev/licensetext.py | 170 +++++++++++++--------------------- 3 files changed, 67 insertions(+), 112 deletions(-) diff --git a/scripts/dev/license-check.py b/scripts/dev/license-check.py index db922ecb78e..f4bbeae95e3 100755 --- a/scripts/dev/license-check.py +++ b/scripts/dev/license-check.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -import os -import glob import licensetext TOOL_NAME = 'license-check' @@ -30,4 +28,4 @@ # Check files for base in dirs: - checker.check(base) + checker.visit(base) diff --git a/scripts/dev/license-update.py b/scripts/dev/license-update.py index 5bffa8d89e2..44ed139ce00 100755 --- a/scripts/dev/license-update.py +++ b/scripts/dev/license-update.py @@ -37,9 +37,6 @@ # Finally, change the "dryrun" parameter back to "True". # -import os -import glob -import json import licensetext TOOL_NAME = 'license-update' @@ -72,6 +69,6 @@ # Check files for base in dirs: - replacer.check(base) + replacer.visit(base) print(replacer.summary()) diff --git a/scripts/dev/licensetext.py b/scripts/dev/licensetext.py index 57150cafd1a..9732afaae30 100644 --- a/scripts/dev/licensetext.py +++ b/scripts/dev/licensetext.py @@ -1,6 +1,4 @@ -import codecs import datetime -import fnmatch import json import glob import os @@ -131,6 +129,7 @@ def error(dictionary): def checkLicense(filename,possible,correct,offset=0,toolname='unspecified', message=error): + '''Check for a few of the usual issues with the license''' if possible == correct: return try: @@ -171,6 +170,7 @@ def checkLicense(filename,possible,correct,offset=0,toolname='unspecified', 'messagetype':'error', 'message':'Non-year differences in license text, check entire license'}) + def mergeParagraphs(text): '''Merge license text lines into a single line per paragraph.''' lines = [] @@ -185,49 +185,54 @@ def mergeParagraphs(text): lines.append(current.lstrip()) return '\n'.join(lines)+'\n' -class Visitor: - def __init__(self): - self.checked_files = [] - def filecheck(self, filepath): - pass + +class FileVisitor: + def __init__(self, extensions = None): + self.visited_files = [] + if extensions == None: + self.extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] + else: + self.extensions = extensions + def files(self, path): - return glob.glob(path+'*') + results = [] + for ext in self.extensions: + results.extend(glob.glob(path+'**/*.'+ext, recursive=True)) + return results + + def visit_file(self, filepath): + pass + def error(self, file, line_number, mesg): pass - def check(self, path): + + def visit(self, path): for file in self.files(path): - self.filecheck(file) - self.checked_files.append(file) + self.visit_file(file) + self.visited_files.append(file) -class CodeChecker(Visitor): - def __init__(self): - Visitor.__init__(self) - def files3(self, path): - # This is the Python 3 version, switch to it after - # the switch is made to require Python 3 - extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] - results = [] - for ext in extensions: - results.extend(glob.glob(path+'**/*.'+ext, recursive=True)) - return results - def files(self, path): - # This is the old Python 2.7 version - extensions = ['cc', 'cpp', 'c', 'hh', 'hpp', 'h'] - results = [] - for ext in extensions: - results.extend(glob.glob(path+'*.'+ext)) - for root, _, filenames in os.walk(path): - for filename in fnmatch.filter(filenames, '*.'+ext): - results.append(os.path.join(root, filename)) - return results + def readtext(self, filepath): + fp = open(filepath, 'r', encoding='utf-8') + try: + txt = fp.read() + except UnicodeDecodeError as exc: + self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) + txt = None + except Exception as exc: + self.error(filepath, 0, 'Exception: '+ str(exc)) + txt = None + fp.close() + return txt -class Checker(CodeChecker): + +class Checker(FileVisitor): def __init__(self, boilerplate, toolname='unspecified'): - CodeChecker.__init__(self) + super().__init__() lines = boilerplate.splitlines() self.n = len(lines) self.text = boilerplate self.toolname = toolname + def error(self, file, line_number, mesg): dictionary = {'tool':self.toolname, 'filename':file, @@ -236,89 +241,41 @@ def error(self, file, line_number, mesg): 'messagetype':'error', 'message':mesg} print(json.dumps(dictionary)) - def filecheck(self, filepath): - fp = codecs.open(filepath,'r',encoding='utf-8',errors='ignore') - try: - txt = fp.read() - except UnicodeDecodeError as exc: - try: - fp.close() - fp = codecs.open(filepath,'r',encoding='utf8') - txt = fp.read() - except: - self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) - fp.close() - return - fp.close() - n = txt.count(self.text) - if n == 0: - lines = txt.splitlines()[:self.n] - shortened = '\n'.join(lines)+'\n' - checkLicense(filepath,shortened,self.text,offset=3, - toolname=self.toolname,message=error) - else: - if n > 1: - self.error(filepath, 1, 'Multiple instances of license text') - if not txt.startswith(self.text): - self.error(filepath, 1, 'License text is not at top of file') + def visit_file(self, filepath): + txt = self.readtext(filepath) + if txt != None: + n = txt.count(self.text) + if n == 0: + lines = txt.splitlines()[:self.n] + shortened = '\n'.join(lines)+'\n' + checkLicense(filepath,shortened,self.text,offset=3, + toolname=self.toolname,message=error) + else: + if n > 1: + self.error(filepath, 1, 'Multiple instances of license text') + if not txt.startswith(self.text): + self.error(filepath, 1, 'License text is not at top of file') -class Replacer(CodeChecker): + +class Replacer(FileVisitor): def __init__(self, oldtext, newtext, dryrun=True): - CodeChecker.__init__(self) + super().__init__() self.oldtxt = oldtext self.newtxt = newtext self.dryrun = dryrun self.replaced = [] self.failures = [] + def error(self, file, line, mesg): self.failures.append(file + ', ' + mesg) - def readtext(self, filepath): - # This is the Python 3 version, move it up to the base class after - # the switch is made to require Python 3 - fp = open(filepath, 'r', encoding='utf-8') - try: - txt = fp.read() - except UnicodeDecodeError as exc: - self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) - txt = None - #fp.close() - #fp = open(filepath, 'r', encoding='utf-8') #errors='ignore') - #try: - # txt = fp.read() - #except: - # self.error(filepath, 0, 'UnicodeDecodeError: '+ str(exc)) - # txt = None - except Exception as exc: - self.error(filepath, 0, 'Exception: '+ str(exc)) - txt = None - fp.close() - return txt - def readtext27(self, filepath): - # This is the old version for Python 2.7 - fp = codecs.open(filepath,'r',encoding='utf-8',errors='ignore') - try: - txt = fp.read() - except UnicodeDecodeError as exc: - mesg = 'UnicodeDecodeError: '+ str(exc) - try: - fp.close() - fp = codecs.open(filepath,'r',encoding='utf8') - txt = fp.read() - except: - self.error(filepath, 0, mesg) - txt = None - fp.close() - return txt + def writetext(self, filepath, txt): fp = open(filepath, 'w', encoding='utf-8') fp.write(txt) fp.close() - def writetext27(self, filepath, txt): - fp = codecs.open(filepath,'w',encoding='utf-8', errors='ignore') - fp.write(txt) - fp.close() - def filecheck(self,filepath): + + def visit_file(self,filepath): txt = self.readtext(filepath) if txt != None: if self.dryrun: @@ -329,8 +286,9 @@ def filecheck(self,filepath): if self.newtxt in txt: self.writetext(filepath, txt) self.replaced.append(filepath) + def summary(self): - txt = ['Checked %d files' % len(self.checked_files)] + txt = ['Checked %d files' % len(self.visited_files)] if self.dryrun: txt.append('Would have replaced text in %d files' % len(self.replaced)) else: @@ -340,8 +298,9 @@ def summary(self): for message in self.failures: txt.append('\t' + message) return '\n'.join(txt) + def report(self): - remaining = self.checked_files[:] + remaining = self.visited_files[:] txt = ['Replaced text in the following files'] for file in self.replaced: remaining.remove(file) @@ -351,6 +310,7 @@ def report(self): txt.append('\t'+file) return self.summary() + '\n\n' + '\n'.join(txt) + if __name__ == '__main__': text = current() print(text) From a95e58aa5265b59e1ecfa2f1153d978dd6e89e73 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 15:20:58 -0700 Subject: [PATCH 70/86] add CMAKE rules to update manifest year --- CMakeLists.txt | 2 ++ src/EnergyPlus/energyplus.rc.in | 2 +- src/EnergyPlus/energyplusapi.rc.in | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35112b401c6..86be8d36592 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,8 @@ set( PREV_RELEASE_SHA "921312f" ) set( ENERGYPLUS_VERSION "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}" ) +set( CMAKE_YEAR "%Y") + set( CMAKE_VERSION_BUILD "Unknown" CACHE STRING "Build number" ) find_package(Git) diff --git a/src/EnergyPlus/energyplus.rc.in b/src/EnergyPlus/energyplus.rc.in index 46fbc35681d..ee49948fd9d 100644 --- a/src/EnergyPlus/energyplus.rc.in +++ b/src/EnergyPlus/energyplus.rc.in @@ -11,7 +11,7 @@ BEGIN VALUE "FileDescription", "EnergyPlus\0" VALUE "FileVersion", "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}\0" VALUE "InternalName", "energyplus\0" - VALUE "LegalCopyright", "Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.\0" + VALUE "LegalCopyright", "Copyright (c) 1996-${CMAKE_YEAR}, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.\0" VALUE "LegalTrademarks", "EnergyPlus (TM) is a trademark of the US Department of Energy.\0" VALUE "OriginalFilename", "energyplus.exe\0" VALUE "ProductName", "EnergyPlus\0" diff --git a/src/EnergyPlus/energyplusapi.rc.in b/src/EnergyPlus/energyplusapi.rc.in index de015926966..acc29c79509 100644 --- a/src/EnergyPlus/energyplusapi.rc.in +++ b/src/EnergyPlus/energyplusapi.rc.in @@ -11,7 +11,7 @@ BEGIN VALUE "FileDescription", "EnergyPlus API\0" VALUE "FileVersion", "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}\0" VALUE "InternalName", "energyplusapi\0" - VALUE "LegalCopyright", "Copyright (c) 1996-2019, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.\0" + VALUE "LegalCopyright", "Copyright (c) 1996-${CMAKE_YEAR}, The Board of Trustees of the University of Illinois, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.\0" VALUE "LegalTrademarks", "EnergyPlus (TM) is a trademark of the US Department of Energy.\0" VALUE "OriginalFilename", "energyplusapi.dll\0" VALUE "ProductName", "EnergyPlus\0" From 4351b96694cd6459a7941e7e967d0e2ffdb197d9 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Mon, 6 Jan 2020 15:53:22 -0700 Subject: [PATCH 71/86] fix year --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86be8d36592..8dbe5f31327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ set( PREV_RELEASE_SHA "921312f" ) set( ENERGYPLUS_VERSION "${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}.${CMAKE_VERSION_PATCH}" ) -set( CMAKE_YEAR "%Y") +string( TIMESTAMP CMAKE_YEAR "%Y") set( CMAKE_VERSION_BUILD "Unknown" CACHE STRING "Build number" ) find_package(Git) From 28bdfa0ff402ae46ce16d74d2bf06482c74bb73e Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 08:33:05 -0700 Subject: [PATCH 72/86] fix bug --- src/EnergyPlus/RefrigeratedCase.cc | 4 ++-- src/EnergyPlus/RefrigeratedCase.hh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 72db1d7b150..875606322e6 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -2650,6 +2650,7 @@ namespace RefrigeratedCase { UtilityRoutines::IsNameEmpty(Alphas(1), CurrentModuleObject, ErrorsFound); RefrigRack(RackNum).Name = Alphas(1); + RefrigRack(RackNum).MyIdx = RackNum; DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).Name = Alphas(1); DataHeatBalance::HeatReclaimRefrigeratedRack(RackNum).SourceType = CurrentModuleObject; if (UtilityRoutines::SameString(Alphas(2), "Outdoors")) { @@ -10268,7 +10269,6 @@ namespace RefrigeratedCase { int PlantLoopSideIndex(0); int PlantBranchIndex(0); int PlantCompIndex(0); - int Num(0); InitRefrigerationPlantConnections(); @@ -10283,7 +10283,7 @@ namespace RefrigeratedCase { PlantBranchIndex = this->PlantBranchNum; PlantCompIndex = this->PlantCompNum; - TotalCondenserHeat = DataHeatBalance::HeatReclaimRefrigeratedRack(Num).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; + TotalCondenserHeat = DataHeatBalance::HeatReclaimRefrigeratedRack(this->MyIdx).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; TypeName = "Refrigeration:CompressorRack:"; ErrIntro = "Condenser for refrigeration rack "; diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 0a910ae3c0b..8e64f6cb1e7 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -244,6 +244,7 @@ namespace RefrigeratedCase { struct RefrigRackData : PlantComponent { // Members + int MyIdx; // Index number bool CoilFlag; // Flag to show if coil type load on rack std::string Name; // Name of Refrigeration Compressor rack std::string SupplyTankName; // Evap water supply tank name @@ -325,7 +326,7 @@ namespace RefrigeratedCase { // Default Constructor RefrigRackData() - : CoilFlag(false), EndUseSubcategory("General"), HeatRejectionLocation(0), CondenserType(0), LaggedUsedWaterHeater(0.0), + : MyIdx(0), CoilFlag(false), EndUseSubcategory("General"), HeatRejectionLocation(0), CondenserType(0), LaggedUsedWaterHeater(0.0), LaggedUsedHVACCoil(0.0), EvapEffect(0.9), CondenserAirFlowRate(0.0), EvapPumpPower(0.0), ActualEvapPumpPower(0.0), EvapPumpConsumption(0.0), EvapWaterConsumpRate(0.0), EvapWaterConsumption(0.0), EvapSchedPtr(0), BasinHeaterPowerFTempDiff(0.0), BasinHeaterSetPointTemp(2.0), BasinHeaterPower(0.0), BasinHeaterConsumption(0.0), From 7dd1a81abcd54211d8987ab0442ef94cc3acf7a7 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 08:39:42 -0700 Subject: [PATCH 73/86] apply style --- src/EnergyPlus/RefrigeratedCase.cc | 1905 +++++++++++++++------------- src/EnergyPlus/RefrigeratedCase.hh | 115 +- 2 files changed, 1095 insertions(+), 925 deletions(-) diff --git a/src/EnergyPlus/RefrigeratedCase.cc b/src/EnergyPlus/RefrigeratedCase.cc index 875606322e6..d9bf828c6e1 100644 --- a/src/EnergyPlus/RefrigeratedCase.cc +++ b/src/EnergyPlus/RefrigeratedCase.cc @@ -423,7 +423,7 @@ namespace RefrigeratedCase { Array1D AirChillerSet; Array1D CoilSysCredit; Array1D CaseWIZoneReport; - + void clear_state() { NumSimulationCondAir = 0; @@ -607,40 +607,40 @@ namespace RefrigeratedCase { Real64 const SecondsPerHour(3600.0); Real64 const DefaultCascadeCondApproach(3.0); // Cascade condenser approach temperature difference (deltaC) Real64 const DefaultCircRate(2.5); // Phase change liquid overfeed circulating rate (ASHRAE definition) - Real64 const DefaultWISurfaceUValue(0.3154); // equiv R18 in Archaic American units (W/m2-delta T) - Real64 const DefaultWIUValueGlassDr(1.136); // equiv R5 in Archaic American units (W/m2-delta T) - Real64 const DefaultWIUValueStockDr(0.3785); // equiv R15 in Archaic American units (W/m2-delta T) - Real64 const DefaultWIHeightGlassDr(1.5); // glass door height in walk-in cooler (m) - Real64 const DefaultWIHeightStockDr(3.0); // stock door height in walk-in cooler (m) - Real64 const PumpImpellerEfficiency(0.78); // same as used in pump auto-sizing, dimensionless - Real64 const PumpMotorEfficiency(0.85); // suggested as average value in ITT/Gould pump references, - - Array1D_string Alphas; // Alpha items for object - Array1D_string cAlphaFieldNames; // Alpha field names (from input processor) - Array1D_string cNumericFieldNames; // Numeric field names (from input processor) - std::string CurrentModuleObject; // Object type for getting and error messages - - Array1D_bool lAlphaBlanks; // Logic array, alpha input blank = .TRUE. - Array1D_bool lNumericBlanks; // Logic array, numeric input blank = .TRUE. - bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine - - int AlphaNum(0); // Used to cycle through input - int IOStatus(0); // Used in GetObjectItem - int MaxNumAlphasRack(0); // Maximum number of alphas for rack object - int MaxNumAlphasAirChiller(0); // Maximum number of alphas for air chiller - int MaxNumAlphasAll(0); // Maximum number of alphas for all objects - int MaxNumAlphasSys(0); // Maximum number of alphas for system object - int MaxNumAlphasTransSys(0); // Maximum number of alphas for transcritical system object - int MaxNumAlphasChillerSet(0); // Maximum number of alphas for chiller set - int MaxNumAlphasConda(0); // Maximum number of alphas for air-cooled condenser object - int MaxNumAlphasConde(0); // Maximum number of alphas for evap-cooled condenser object - int MaxNumAlphasCondw(0); // Maximum number of alphas for water-cooled condenser object - int MaxNumAlphasGasCoolera(0); // Maximum number of alphas for air-cooled gas cooler object - int MaxNumAlphasComp(0); // Maximum number of alphas for compressor object - int MaxNumAlphasCompressorList(0); // Maximum number of alphas for compressor list objects - int MaxNumAlphasCase(0); // Maximum number of alphas for case object - int MaxNumAlphasCaseAndWalkInList(0); // Maximum number of alphas in CaseAndWalkInList - int MaxNumAlphasWalkIn(0); // Maximum number of alphas for walkin object + Real64 const DefaultWISurfaceUValue(0.3154); // equiv R18 in Archaic American units (W/m2-delta T) + Real64 const DefaultWIUValueGlassDr(1.136); // equiv R5 in Archaic American units (W/m2-delta T) + Real64 const DefaultWIUValueStockDr(0.3785); // equiv R15 in Archaic American units (W/m2-delta T) + Real64 const DefaultWIHeightGlassDr(1.5); // glass door height in walk-in cooler (m) + Real64 const DefaultWIHeightStockDr(3.0); // stock door height in walk-in cooler (m) + Real64 const PumpImpellerEfficiency(0.78); // same as used in pump auto-sizing, dimensionless + Real64 const PumpMotorEfficiency(0.85); // suggested as average value in ITT/Gould pump references, + + Array1D_string Alphas; // Alpha items for object + Array1D_string cAlphaFieldNames; // Alpha field names (from input processor) + Array1D_string cNumericFieldNames; // Numeric field names (from input processor) + std::string CurrentModuleObject; // Object type for getting and error messages + + Array1D_bool lAlphaBlanks; // Logic array, alpha input blank = .TRUE. + Array1D_bool lNumericBlanks; // Logic array, numeric input blank = .TRUE. + bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine + + int AlphaNum(0); // Used to cycle through input + int IOStatus(0); // Used in GetObjectItem + int MaxNumAlphasRack(0); // Maximum number of alphas for rack object + int MaxNumAlphasAirChiller(0); // Maximum number of alphas for air chiller + int MaxNumAlphasAll(0); // Maximum number of alphas for all objects + int MaxNumAlphasSys(0); // Maximum number of alphas for system object + int MaxNumAlphasTransSys(0); // Maximum number of alphas for transcritical system object + int MaxNumAlphasChillerSet(0); // Maximum number of alphas for chiller set + int MaxNumAlphasConda(0); // Maximum number of alphas for air-cooled condenser object + int MaxNumAlphasConde(0); // Maximum number of alphas for evap-cooled condenser object + int MaxNumAlphasCondw(0); // Maximum number of alphas for water-cooled condenser object + int MaxNumAlphasGasCoolera(0); // Maximum number of alphas for air-cooled gas cooler object + int MaxNumAlphasComp(0); // Maximum number of alphas for compressor object + int MaxNumAlphasCompressorList(0); // Maximum number of alphas for compressor list objects + int MaxNumAlphasCase(0); // Maximum number of alphas for case object + int MaxNumAlphasCaseAndWalkInList(0); // Maximum number of alphas in CaseAndWalkInList + int MaxNumAlphasWalkIn(0); // Maximum number of alphas for walkin object int MaxNumAlphasSecond(0); // Maximum number of alphas for air chiller object int MaxNumNumbersAirChiller(0); // Maximum number of numbers for air chiller object int MaxNumNumbersSecond(0); // Maximum number of numbers for secondary system object @@ -666,16 +666,16 @@ namespace RefrigeratedCase { int NumDisplayCases(0); // Counter for refrigerated cases in GetInput do loop int NumWalkIns(0); // Number of walk ins int RefrigSysNum(0); - int RefrigIndex(0); // Index used in fluid property routines - Real64 DeltaHPhaseChange(0.0); // Secondary loop enthalpy change in condenser w overfeed system (J/g) - Real64 DelTempMin(0.0); // min temperature for heat rej curve for air cooled condenser (C) - Real64 DelTempMax(0.0); // max temperature for heat rej curve for air cooled condenser (C) - Real64 DensityBrineRated(0.0); // density of circ fluid in secondary loop - Real64 DensityPhaseChange(0.0); // Secondary loop density at condensing temperature w overfeed system (g/m3) - Real64 NominalTotalCompCapLP(0.0); // Total of nominal low pressure compressor capacities, used for rough input check (W) (Transcritical CO2) + int RefrigIndex(0); // Index used in fluid property routines + Real64 DeltaHPhaseChange(0.0); // Secondary loop enthalpy change in condenser w overfeed system (J/g) + Real64 DelTempMin(0.0); // min temperature for heat rej curve for air cooled condenser (C) + Real64 DelTempMax(0.0); // max temperature for heat rej curve for air cooled condenser (C) + Real64 DensityBrineRated(0.0); // density of circ fluid in secondary loop + Real64 DensityPhaseChange(0.0); // Secondary loop density at condensing temperature w overfeed system (g/m3) + Real64 NominalTotalCompCapLP(0.0); // Total of nominal low pressure compressor capacities, used for rough input check (W) (Transcritical CO2) Real64 NominalTotalCompCapHP(0.0); - Array1D Numbers; // Numeric items for object - Array2D DayValues; // Array of schedule values + Array1D Numbers; // Numeric items for object + Array2D DayValues; // Array of schedule values NumSimulationCascadeCondensers = inputProcessor->getNumObjectsFound("Refrigeration:Condenser:Cascade"); NumSimulationCases = inputProcessor->getNumObjectsFound("Refrigeration:Case"); @@ -885,7 +885,9 @@ namespace RefrigeratedCase { ErrorsFound = true; } RefrigCase(CaseNum).RatedAmbientDewPoint = Psychrometrics::PsyTdpFnWPb( - Psychrometrics::PsyWFnTdbRhPb(RefrigCase(CaseNum).RatedAmbientTemp, (RefrigCase(CaseNum).RatedAmbientRH / 100.0), DataEnvironment::StdBaroPress), DataEnvironment::StdBaroPress); + Psychrometrics::PsyWFnTdbRhPb( + RefrigCase(CaseNum).RatedAmbientTemp, (RefrigCase(CaseNum).RatedAmbientRH / 100.0), DataEnvironment::StdBaroPress), + DataEnvironment::StdBaroPress); RefrigCase(CaseNum).RateTotCapPerLength = Numbers(3); if (Numbers(3) <= 0.0) { @@ -941,13 +943,12 @@ namespace RefrigeratedCase { ErrorsFound = true; } - ErrorsFound |= CurveManager::CheckCurveDims( - RefrigCase(CaseNum).LatCapCurvePtr, // Curve index - {1}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - RefrigCase(CaseNum).Name, // Object Name - cAlphaFieldNames(5)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(RefrigCase(CaseNum).LatCapCurvePtr, // Curve index + {1}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + RefrigCase(CaseNum).Name, // Object Name + cAlphaFieldNames(5)); // Field Name NumNum = 8; if (!lNumericBlanks(NumNum)) { @@ -1101,8 +1102,8 @@ namespace RefrigeratedCase { // initialize case resistance for anti-sweat heater control type = Heat Balance Method if (RefrigCase(CaseNum).AntiSweatControlType == ASHeatBalance) { - Real64 Rcase(0.0); // Case thermal resistance used with anti-sweat heater control - Real64 RcaseDenom(0.0); // Denominator of case thermal resistance calculation for anti-sweat + Real64 Rcase(0.0); // Case thermal resistance used with anti-sweat heater control + Real64 RcaseDenom(0.0); // Denominator of case thermal resistance calculation for anti-sweat if (RefrigCase(CaseNum).Height == 0.0) { Rcase = 0.0; @@ -1272,13 +1273,12 @@ namespace RefrigeratedCase { } if (RefrigCase(CaseNum).DefCapCurvePtr > 0) { - ErrorsFound |= CurveManager::CheckCurveDims( - RefrigCase(CaseNum).DefCapCurvePtr, // Curve index - {1}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - RefrigCase(CaseNum).Name, // Object Name - cAlphaFieldNames(12)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(RefrigCase(CaseNum).DefCapCurvePtr, // Curve index + {1}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + RefrigCase(CaseNum).Name, // Object Name + cAlphaFieldNames(12)); // Field Name } // warn user if defrost energy curve is entered that it is only used for temperature termination types @@ -1306,7 +1306,8 @@ namespace RefrigeratedCase { } if (RefrigCase(CaseNum).RAFrac > 0.0) { std::string callDescription = CurrentModuleObject + "=" + RefrigCase(CaseNum).Name; - RefrigCase(CaseNum).ZoneRANode = DataZoneEquipment::GetReturnAirNodeForZone(RefrigCase(CaseNum).ZoneName, retNodeName, callDescription); + RefrigCase(CaseNum).ZoneRANode = + DataZoneEquipment::GetReturnAirNodeForZone(RefrigCase(CaseNum).ZoneName, retNodeName, callDescription); } if (RefrigCase(CaseNum).ActualZoneNum >= 0) { @@ -1356,13 +1357,14 @@ namespace RefrigeratedCase { // calculate sensible case load at design conditions // Case sensible capacity used for error messages - Real64 DesignSensibleCap = RefrigCase(CaseNum).RateTotCapPerLength * (1.0 - RefrigCase(CaseNum).RatedLHR) * RefrigCase(CaseNum).RatedRTF * - RefrigCase(CaseNum).Length; + Real64 DesignSensibleCap = RefrigCase(CaseNum).RateTotCapPerLength * (1.0 - RefrigCase(CaseNum).RatedLHR) * + RefrigCase(CaseNum).RatedRTF * RefrigCase(CaseNum).Length; // calculate case heat gain = lights + fans + anti-sweat - Real64 CaseHeatGain = ((RefrigCase(CaseNum).RatedLightingPower * RefrigCase(CaseNum).LightingFractionToCase) + - (RefrigCase(CaseNum).AntiSweatPower * RefrigCase(CaseNum).ASHeaterFractionToCase) + RefrigCase(CaseNum).STDFanPower) * - RefrigCase(CaseNum).Length; + Real64 CaseHeatGain = + ((RefrigCase(CaseNum).RatedLightingPower * RefrigCase(CaseNum).LightingFractionToCase) + + (RefrigCase(CaseNum).AntiSweatPower * RefrigCase(CaseNum).ASHeaterFractionToCase) + RefrigCase(CaseNum).STDFanPower) * + RefrigCase(CaseNum).Length; // sensible case credits are calculated as the difference between the design sensible capacity and the case heat gain RefrigCase(CaseNum).DesignSensCaseCredit = DesignSensibleCap - CaseHeatGain; @@ -1556,7 +1558,8 @@ namespace RefrigeratedCase { AlphaNum = 4; if (!lAlphaBlanks(AlphaNum)) { - WalkIn(WalkInID).LightingSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert lighting schedule name to pointer + WalkIn(WalkInID).LightingSchedPtr = + ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert lighting schedule name to pointer if (WalkIn(WalkInID).LightingSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -1809,7 +1812,8 @@ namespace RefrigeratedCase { ErrorsFound = true; } else { // check schedule for values between 0 and 1 - if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax( + WalkIn(WalkInID).GlassDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", Zone=\"" + WalkIn(WalkInID).ZoneName(ZoneID) + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AStart + 1) + " = " + Alphas(AStart + 1)); @@ -1845,7 +1849,8 @@ namespace RefrigeratedCase { ErrorsFound = true; } else { // check schedule for values between 0 and 1 - if (!ScheduleManager::CheckScheduleValueMinMax(WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { + if (!ScheduleManager::CheckScheduleValueMinMax( + WalkIn(WalkInID).StockDoorOpenSchedPtr(ZoneID), ">=", 0.0, "<=", 1.0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WalkIn(WalkInID).Name + "\", Zone=\"" + WalkIn(WalkInID).ZoneName(ZoneID) + "\""); ShowContinueError("Error found in " + cAlphaFieldNames(AStart + 2) + " = " + Alphas(AStart + 2)); @@ -2235,13 +2240,12 @@ namespace RefrigeratedCase { ErrorsFound = true; } // error checks for curve type entered and curve name - ErrorsFound |= CurveManager::CheckCurveDims( - WarehouseCoil(CoilID).SHRCorrectionCurvePtr, // Curve index - {1}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - WarehouseCoil(CoilID).Name, // Object Name - cAlphaFieldNames(AlphaNum)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(WarehouseCoil(CoilID).SHRCorrectionCurvePtr, // Curve index + {1}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + WarehouseCoil(CoilID).Name, // Object Name + cAlphaFieldNames(AlphaNum)); // Field Name } else if (SELECT_CASE_var == TabularRH_DT1_TRoom) { WarehouseCoil(CoilID).SHRCorrectionCurvePtr = CurveManager::GetCurveIndex(Alphas(AlphaNum)); // convert curve name to number if (lAlphaBlanks(AlphaNum)) { @@ -2253,13 +2257,12 @@ namespace RefrigeratedCase { ShowContinueError("...invalid curve " + cAlphaFieldNames(AlphaNum) + "=\"" + Alphas(AlphaNum) + "\"."); ErrorsFound = true; } - ErrorsFound |= CurveManager::CheckCurveDims( - WarehouseCoil(CoilID).SHRCorrectionCurvePtr, // Curve index - {3}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - WarehouseCoil(CoilID).Name, // Object Name - cAlphaFieldNames(AlphaNum)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(WarehouseCoil(CoilID).SHRCorrectionCurvePtr, // Curve index + {3}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + WarehouseCoil(CoilID).Name, // Object Name + cAlphaFieldNames(AlphaNum)); // Field Name // IF(WarehouseCoil(CoilID)%SHRCorrectionCurvePtr == 0) THEN // CALL ShowSevereError(RoutineName//TRIM(CurrentModuleObject)//'="'//TRIM(WarehouseCoil(CoilID)%Name)//& // '", not found '//TRIM(cAlphaFieldNames(AlphaNum))) @@ -2279,7 +2282,8 @@ namespace RefrigeratedCase { ++AlphaNum; // A6 if (!lAlphaBlanks(AlphaNum)) { - WarehouseCoil(CoilID).HeaterSchedPtr = ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert heater schedule name to pointer + WarehouseCoil(CoilID).HeaterSchedPtr = + ScheduleManager::GetScheduleIndex(Alphas(AlphaNum)); // convert heater schedule name to pointer if (WarehouseCoil(CoilID).HeaterSchedPtr == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + WarehouseCoil(CoilID).Name + "\", invalid " + cAlphaFieldNames(AlphaNum) + " not found: " + Alphas(AlphaNum)); @@ -2681,13 +2685,12 @@ namespace RefrigeratedCase { ErrorsFound = true; } - ErrorsFound |= CurveManager::CheckCurveDims( - RefrigRack(RackNum).COPFTempPtr, // Curve index - {1}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - RefrigRack(RackNum).Name, // Object Name - cAlphaFieldNames(3)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(RefrigRack(RackNum).COPFTempPtr, // Curve index + {1}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + RefrigRack(RackNum).Name, // Object Name + cAlphaFieldNames(3)); // Field Name RefrigRack(RackNum).CondenserFanPower = Numbers(2); if (Numbers(2) < 0.0) { @@ -2704,13 +2707,12 @@ namespace RefrigeratedCase { } if (!lAlphaBlanks(4)) { - ErrorsFound |= CurveManager::CheckCurveDims( - RefrigRack(RackNum).TotCondFTempPtr, // Curve index - {1}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - RefrigRack(RackNum).Name, // Object Name - cAlphaFieldNames(4)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(RefrigRack(RackNum).TotCondFTempPtr, // Curve index + {1}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + RefrigRack(RackNum).Name, // Object Name + cAlphaFieldNames(4)); // Field Name } if (UtilityRoutines::SameString(Alphas(5), "EvaporativelyCooled")) { @@ -2734,10 +2736,22 @@ namespace RefrigeratedCase { } // Get water-cooled condenser input, if applicable if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { - RefrigRack(RackNum).InletNode = NodeInputManager::GetOnlySingleNode( - Alphas(6), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); - RefrigRack(RackNum).OutletNode = NodeInputManager::GetOnlySingleNode( - Alphas(7), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); + RefrigRack(RackNum).InletNode = NodeInputManager::GetOnlySingleNode(Alphas(6), + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); + RefrigRack(RackNum).OutletNode = NodeInputManager::GetOnlySingleNode(Alphas(7), + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); // Check node connections BranchNodeConnections::TestCompSet(CurrentModuleObject, Alphas(1), Alphas(6), Alphas(7), "RefrigRack Nodes"); // Get loop flow type @@ -2816,8 +2830,8 @@ namespace RefrigeratedCase { } RefrigRack(RackNum).CondenserAirFlowRate = Numbers(8); - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && - RefrigRack(RackNum).CondenserAirFlowRate != DataGlobals::AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && + RefrigRack(RackNum).CondenserAirFlowRate <= 0.0 && RefrigRack(RackNum).CondenserAirFlowRate != DataGlobals::AutoCalculate) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(8) + " cannot be less than or equal to zero."); ErrorsFound = true; @@ -2832,7 +2846,8 @@ namespace RefrigeratedCase { } RefrigRack(RackNum).BasinHeaterSetPointTemp = Numbers(10); - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).BasinHeaterSetPointTemp < 2.0) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && + RefrigRack(RackNum).BasinHeaterSetPointTemp < 2.0) { ShowWarningError(CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cNumericFieldNames(10) + " is less than 2 deg C. Freezing could occur."); } @@ -2852,11 +2867,11 @@ namespace RefrigeratedCase { } else { RefrigRack(RackNum).EvapWaterSupplyMode = WaterSupplyFromTank; WaterManager::SetupTankDemandComponent(RefrigRack(RackNum).Name, - CurrentModuleObject, - RefrigRack(RackNum).SupplyTankName, - ErrorsFound, - RefrigRack(RackNum).EvapWaterSupTankID, - RefrigRack(RackNum).EvapWaterTankDemandARRID); + CurrentModuleObject, + RefrigRack(RackNum).SupplyTankName, + ErrorsFound, + RefrigRack(RackNum).EvapWaterSupTankID, + RefrigRack(RackNum).EvapWaterTankDemandARRID); } // Check condenser air inlet node connection @@ -2864,13 +2879,13 @@ namespace RefrigeratedCase { RefrigRack(RackNum).OutsideAirNodeNum = 0; } else { RefrigRack(RackNum).OutsideAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(12), - ErrorsFound, - CurrentModuleObject, - Alphas(1), - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_OutsideAirReference, - 1, - DataLoopNode::ObjectIsParent); + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, + 1, + DataLoopNode::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(RefrigRack(RackNum).OutsideAirNodeNum)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + RefrigRack(RackNum).Name + "\", " + cAlphaFieldNames(12) + " not found: " + Alphas(12)); @@ -3023,11 +3038,13 @@ namespace RefrigeratedCase { // set condenser air flow and evap water pump power if autocalculated // autocalculate condenser evap water pump if needed - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).EvapPumpPower == DataGlobals::AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && + RefrigRack(RackNum).EvapPumpPower == DataGlobals::AutoCalculate) { RefrigRack(RackNum).EvapPumpPower = CondPumpRatePower * RefrigRack(RackNum).TotalRackLoad; } // autocalculate evap condenser air volume flow rate if needed - if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && RefrigRack(RackNum).CondenserAirFlowRate == DataGlobals::AutoCalculate) { + if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap && + RefrigRack(RackNum).CondenserAirFlowRate == DataGlobals::AutoCalculate) { RefrigRack(RackNum).CondenserAirFlowRate = AirVolRateEvapCond * RefrigRack(RackNum).TotalRackLoad; } @@ -3098,8 +3115,10 @@ namespace RefrigeratedCase { Condenser(CondNum).RatedCapacity *= (1.0 - 7.17e-5 * DataEnvironment::Elevation); if (Condenser(CondNum).RatedCapacity > 0.0) { CurveManager::GetCurveMinMaxValues(Condenser(CondNum).CapCurvePtr, DelTempMin, DelTempMax); - Real64 Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug fix - Real64 Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug + Real64 Capmin = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMin) * + (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug fix + Real64 Capmax = CurveManager::CurveValue(Condenser(CondNum).CapCurvePtr, DelTempMax) * + (1.0 - 7.17e-5 * DataEnvironment::Elevation); // Mar 2011 bug Condenser(CondNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); // * ( 1.0 - 7.17e-5 * DataEnvironment::Elevation ) ) //Mar 2011 bug fix Condenser(CondNum).MinCondLoad = Capmax - DelTempMax / Condenser(CondNum).TempSlope; @@ -3149,14 +3168,15 @@ namespace RefrigeratedCase { Condenser(CondNum).CondenserRejectHeatToZone = true; RefrigPresentInZone(Condenser(CondNum).InletAirZoneNum) = true; } else { // not in a conditioned zone, so see if it's outside - Condenser(CondNum).InletAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(4), - ErrorsFound, - CurrentModuleObject, - Alphas(1), - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_OutsideAirReference, - 1, - DataLoopNode::ObjectIsParent); + Condenser(CondNum).InletAirNodeNum = + NodeInputManager::GetOnlySingleNode(Alphas(4), + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, + 1, + DataLoopNode::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(Condenser(CondNum).InletAirNodeNum)) { // not outside and not a zone ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", " + cAlphaFieldNames(4) + @@ -3313,13 +3333,13 @@ namespace RefrigeratedCase { Condenser(CondNum).InletAirNodeNum = 0; } else { Condenser(CondNum).InletAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(3), - ErrorsFound, - CurrentModuleObject, - Alphas(1), - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_OutsideAirReference, - 1, - DataLoopNode::ObjectIsParent); + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, + 1, + DataLoopNode::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(Condenser(CondNum).InletAirNodeNum)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + Condenser(CondNum).Name + "\", " + cAlphaFieldNames(3) + " not found: " + Alphas(3)); @@ -3363,11 +3383,11 @@ namespace RefrigeratedCase { } else { Condenser(CondNum).EvapWaterSupplyMode = WaterSupplyFromTank; WaterManager::SetupTankDemandComponent(Condenser(CondNum).Name, - CurrentModuleObject, - Condenser(CondNum).SupplyTankName, - ErrorsFound, - Condenser(CondNum).EvapWaterSupTankID, - Condenser(CondNum).EvapWaterTankDemandARRID); + CurrentModuleObject, + Condenser(CondNum).SupplyTankName, + ErrorsFound, + Condenser(CondNum).EvapWaterSupTankID, + Condenser(CondNum).EvapWaterTankDemandARRID); } if (lAlphaBlanks(5)) { @@ -3469,10 +3489,22 @@ namespace RefrigeratedCase { ErrorsFound = true; } - Condenser(CondNum).InletNode = NodeInputManager::GetOnlySingleNode( - Alphas(2), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); - Condenser(CondNum).OutletNode = NodeInputManager::GetOnlySingleNode( - Alphas(3), ErrorsFound, CurrentModuleObject, Alphas(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); + Condenser(CondNum).InletNode = NodeInputManager::GetOnlySingleNode(Alphas(2), + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); + Condenser(CondNum).OutletNode = NodeInputManager::GetOnlySingleNode(Alphas(3), + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); // Check node connections BranchNodeConnections::TestCompSet(CurrentModuleObject, Alphas(1), Alphas(2), Alphas(3), "Water Cooled Condenser Nodes"); // Get loop flow type @@ -3676,8 +3708,10 @@ namespace RefrigeratedCase { GasCooler(GCNum).RatedCapacity *= (1.0 - 7.17e-5 * DataEnvironment::Elevation); if (GasCooler(GCNum).RatedCapacity > 0.0) { CurveManager::GetCurveMinMaxValues(GasCooler(GCNum).CapCurvePtr, DelTempMin, DelTempMax); - Real64 Capmin = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); - Real64 Capmax = CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); + Real64 Capmin = + CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMin) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); + Real64 Capmax = + CurveManager::CurveValue(GasCooler(GCNum).CapCurvePtr, DelTempMax) * (1.0 - 7.17e-5 * DataEnvironment::Elevation); GasCooler(GCNum).TempSlope = (DelTempMax - DelTempMin) / ((Capmax - Capmin)); GasCooler(GCNum).MinCondLoad = Capmax - DelTempMax / GasCooler(GCNum).TempSlope; } else { @@ -3770,14 +3804,15 @@ namespace RefrigeratedCase { GasCooler(GCNum).GasCoolerRejectHeatToZone = true; RefrigPresentInZone(GasCooler(GCNum).InletAirZoneNum) = true; } else { // not in a conditioned zone, so see if it's outside - GasCooler(GCNum).InletAirNodeNum = NodeInputManager::GetOnlySingleNode(Alphas(4), - ErrorsFound, - CurrentModuleObject, - Alphas(1), - DataLoopNode::NodeType_Air, - DataLoopNode::NodeConnectionType_OutsideAirReference, - 1, - DataLoopNode::ObjectIsParent); + GasCooler(GCNum).InletAirNodeNum = + NodeInputManager::GetOnlySingleNode(Alphas(4), + ErrorsFound, + CurrentModuleObject, + Alphas(1), + DataLoopNode::NodeType_Air, + DataLoopNode::NodeConnectionType_OutsideAirReference, + 1, + DataLoopNode::ObjectIsParent); if (!OutAirNodeManager::CheckOutAirNodeNumber(GasCooler(GCNum).InletAirNodeNum)) { // not outside and not a zone ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + GasCooler(GCNum).Name + "\", " + cAlphaFieldNames(4) + @@ -4019,17 +4054,17 @@ namespace RefrigeratedCase { TBrineInRated = TBrineOutRated + Secondary(SecondaryNum).TRangeDifRated; Real64 TBrineAverage = (TBrineOutRated + TBrineInRated) / 2.0; Secondary(SecondaryNum).TBrineAverage = TBrineAverage; - DensityBrineRated = - FluidProperties::GetDensityGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); + DensityBrineRated = FluidProperties::GetDensityGlycol( + Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); Secondary(SecondaryNum).DensityBrineRated = DensityBrineRated; - CpBrineRated = - FluidProperties::GetSpecificHeatGlycol(Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); + CpBrineRated = FluidProperties::GetSpecificHeatGlycol( + Secondary(SecondaryNum).FluidName, TBrineAverage, Secondary(SecondaryNum).FluidID, TrackMessage); Secondary(SecondaryNum).CpBrineRated = CpBrineRated; // Users can input either design brine flow (m3/s), or capacity in W, or both. Now have // temperatures needed to calculate either the loop cooling capacity or fluid flow rate, if one was not input // Don't need to save as a flow vol as a permanent var because calc whichever is missing here - Real64 FlowMassRated(0.0); // Design mass flow rate of circ fluid in secondary loop(kg/s) + Real64 FlowMassRated(0.0); // Design mass flow rate of circ fluid in secondary loop(kg/s) if ((!lNumericBlanks(1)) && (!lNumericBlanks(2))) { // Both values input, check for approximate agreement Secondary(SecondaryNum).CoolingLoadRated = Numbers(1); @@ -4093,20 +4128,20 @@ namespace RefrigeratedCase { if (!lNumericBlanks(10)) Secondary(SecondaryNum).CircRate = Numbers(10); DensityPhaseChange = FluidProperties::GetSatDensityRefrig(Secondary(SecondaryNum).FluidName, - Secondary(SecondaryNum).TCondense, - 0.0, - Secondary(SecondaryNum).FluidID, - TrackMessageAlt); + Secondary(SecondaryNum).TCondense, + 0.0, + Secondary(SecondaryNum).FluidID, + TrackMessageAlt); DeltaHPhaseChange = FluidProperties::GetSatEnthalpyRefrig(Secondary(SecondaryNum).FluidName, - Secondary(SecondaryNum).TCondense, - 1.0, - Secondary(SecondaryNum).FluidID, - TrackMessageAlt) - + Secondary(SecondaryNum).TCondense, + 1.0, + Secondary(SecondaryNum).FluidID, + TrackMessageAlt) - FluidProperties::GetSatEnthalpyRefrig(Secondary(SecondaryNum).FluidName, - Secondary(SecondaryNum).TCondense, - 0.0, - Secondary(SecondaryNum).FluidID, - TrackMessageAlt); + Secondary(SecondaryNum).TCondense, + 0.0, + Secondary(SecondaryNum).FluidID, + TrackMessageAlt); // TotRatedFlowVol= capacity*circrate/deltahphasechange/density Real64 CalcTotFlowVol = @@ -4114,13 +4149,15 @@ namespace RefrigeratedCase { PumpTotRatedFlowVol = CalcTotFlowVol; if (!lNumericBlanks(7)) { PumpTotRatedFlowVol = Numbers(7); - Real64 CalcCircRate = DensityPhaseChange * DeltaHPhaseChange * PumpTotRatedFlowVol / Secondary(SecondaryNum).CoolingLoadRated; + Real64 CalcCircRate = + DensityPhaseChange * DeltaHPhaseChange * PumpTotRatedFlowVol / Secondary(SecondaryNum).CoolingLoadRated; Real64 DiffCircRates = (CalcCircRate - Secondary(SecondaryNum).CircRate) / Secondary(SecondaryNum).CircRate; if (std::abs(DiffCircRates) > 0.3) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + ' ' + cNumericFieldNames(7) + - " Produces a circulating rate of " + General::RoundSigDigits(CalcCircRate, 2) + " ; A circulating rate of " + - General::RoundSigDigits(Secondary(SecondaryNum).CircRate, 2) + " would need a " + cNumericFieldNames(7) + - " of " + General::RoundSigDigits(CalcTotFlowVol, 2) + " m3/s"); + " Produces a circulating rate of " + General::RoundSigDigits(CalcCircRate, 2) + + " ; A circulating rate of " + General::RoundSigDigits(Secondary(SecondaryNum).CircRate, 2) + + " would need a " + cNumericFieldNames(7) + " of " + General::RoundSigDigits(CalcTotFlowVol, 2) + + " m3/s"); } // warning check on pump flow rate vs circ rate input } // blank pump flow rate SecondaryFlowVolRated = PumpTotRatedFlowVol; @@ -4135,14 +4172,14 @@ namespace RefrigeratedCase { // Assume pump impeller efficiency is 0.78 (consistent with E+ Pump auto sizing assumption) // Assume pump motor efficiency is 0.85 (Goulds Pumps motor data sheet) // It is important that tot rated head must be for specific fluid - Real64 PumpTotRatedHead(0.0); // Total pump rated head on secondary loop (Pa) + Real64 PumpTotRatedHead(0.0); // Total pump rated head on secondary loop (Pa) if ((!lNumericBlanks(8)) && (!lNumericBlanks(9))) { Secondary(SecondaryNum).PumpTotRatedPower = Numbers(8); PumpTotRatedHead = Numbers(9); Real64 ErrSecondPumpPower = (Secondary(SecondaryNum).PumpTotRatedPower - - PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency)) / - Secondary(SecondaryNum).PumpTotRatedPower; + PumpTotRatedFlowVol * PumpTotRatedHead / (PumpImpellerEfficiency * PumpMotorEfficiency)) / + Secondary(SecondaryNum).PumpTotRatedPower; if (std::abs(ErrSecondPumpPower) > 0.35) ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + " Input value for " + cNumericFieldNames(9) + " not consistent with input value for " + cNumericFieldNames(8) + ". " + @@ -4197,13 +4234,12 @@ namespace RefrigeratedCase { cAlphaFieldNames(AlphaNum) + " not found:" + Alphas(AlphaNum)); ErrorsFound = true; } - ErrorsFound |= CurveManager::CheckCurveDims( - Secondary(SecondaryNum).VarSpeedCurvePtr, // Curve index - {1}, // Valid dimensions - RoutineName, // Routine name - CurrentModuleObject, // Object Type - Secondary(SecondaryNum).Name, // Object Name - cAlphaFieldNames(AlphaNum)); // Field Name + ErrorsFound |= CurveManager::CheckCurveDims(Secondary(SecondaryNum).VarSpeedCurvePtr, // Curve index + {1}, // Valid dimensions + RoutineName, // Routine name + CurrentModuleObject, // Object Type + Secondary(SecondaryNum).Name, // Object Name + cAlphaFieldNames(AlphaNum)); // Field Name } // input power conditions/levels for constant or variable speed pump drives // Default non-hermetic motor eff at 85% and all shaft power goes to heat in fluid @@ -4214,9 +4250,9 @@ namespace RefrigeratedCase { if ((0.5 <= Numbers(NumNum)) && (1.0 >= Numbers(NumNum))) { Secondary(SecondaryNum).PumpPowerToHeat = Numbers(NumNum); } else { - ShowWarningError( - RoutineName + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" " + cNumericFieldNames(NumNum) + - " must be between 0.5 and 1.0. Default value of : " + General::RoundSigDigits(PumpMotorEfficiency, 3) + " will be used"); + ShowWarningError(RoutineName + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" " + + cNumericFieldNames(NumNum) + " must be between 0.5 and 1.0. Default value of : " + + General::RoundSigDigits(PumpMotorEfficiency, 3) + " will be used"); } // range of pump moter heat to fluid } // blank input for pumppowertoheat @@ -4323,8 +4359,9 @@ namespace RefrigeratedCase { if (Secondary(SecondaryNum).FluidType == SecFluidTypeAlwaysLiquid) { if (TBrineOutRated > (Secondary(SecondaryNum).TMinNeeded + 0.5)) { - ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + - " The design brine temperature to the refrigeration loads: " + General::RoundSigDigits(TBrineOutRated, 1) + " ;"); + ShowWarningError( + CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + + " The design brine temperature to the refrigeration loads: " + General::RoundSigDigits(TBrineOutRated, 1) + " ;"); ShowContinueError(" is greater than the design inlet temperature for at least one of the cases or walkins: " + General::RoundSigDigits(Secondary(SecondaryNum).TMinNeeded, 1)); ShowContinueError( @@ -4332,7 +4369,7 @@ namespace RefrigeratedCase { // ErrorsFound = .TRUE. } // Tbrine out warning Real64 CapacityAtMaxVolFlow = Secondary(SecondaryNum).MaxVolFlow * Secondary(SecondaryNum).HeatExchangeEta * - (CpBrineRated * DensityBrineRated) * (TBrineInRated - Secondary(SecondaryNum).TEvapDesign); + (CpBrineRated * DensityBrineRated) * (TBrineInRated - Secondary(SecondaryNum).TEvapDesign); Secondary(SecondaryNum).MaxLoad = min(Secondary(SecondaryNum).CoolingLoadRated, CapacityAtMaxVolFlow); Real64 DeltaCap1 = std::abs((Secondary(SecondaryNum).CoolingLoadRated - CapacityAtMaxVolFlow) / Secondary(SecondaryNum).CoolingLoadRated); @@ -4340,7 +4377,8 @@ namespace RefrigeratedCase { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" You may wish to check the system sizing. The nominal secondary loop heat exchanger capacity is " + General::RoundSigDigits(Secondary(SecondaryNum).CoolingLoadRated, 0) + - " But the capacity based upon the maximum flow rate is " + General::RoundSigDigits(CapacityAtMaxVolFlow, 0)); + " But the capacity based upon the maximum flow rate is " + + General::RoundSigDigits(CapacityAtMaxVolFlow, 0)); } // DeltaCap1 > .3 } else { // Fluid type phase change !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if (lNumericBlanks(1)) { // Chiller/evaporator capacity was not specified @@ -4377,8 +4415,8 @@ namespace RefrigeratedCase { if (SecondaryFlowVolRated > (1.1 * PumpTotRatedFlowVol)) { ShowWarningError(CurrentModuleObject + "=\"" + Secondary(SecondaryNum).Name + "\" You may wish to check the pump sizing. Total nominal brine flow is " + - General::RoundSigDigits(SecondaryFlowVolRated, 0) + - " m3/s, but the total nominal pump flow rate is: " + General::RoundSigDigits(PumpTotRatedFlowVol, 0) + " m3/s. "); + General::RoundSigDigits(SecondaryFlowVolRated, 0) + " m3/s, but the total nominal pump flow rate is: " + + General::RoundSigDigits(PumpTotRatedFlowVol, 0) + " m3/s. "); } } // Secondary Loops @@ -4602,7 +4640,8 @@ namespace RefrigeratedCase { int AlphaListNum = 1 + NumLoad; int LoadCascadeNum = 0; int LoadSecondaryNum = 0; - if (DataHeatBalance::NumRefrigCondensers > 0) LoadCascadeNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Condenser); + if (DataHeatBalance::NumRefrigCondensers > 0) + LoadCascadeNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Condenser); if (NumSimulationSecondarySystems > 0) LoadSecondaryNum = UtilityRoutines::FindItemInList(Alphas(AlphaListNum), Secondary); if ((LoadCascadeNum == 0) && (LoadSecondaryNum == 0)) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + cAlphaFieldNames(AlphaListNum) + @@ -5292,9 +5331,9 @@ namespace RefrigeratedCase { // Determine intercooler pressure and temperature at design conditions if (System(RefrigSysNum).NumStages == 2) { Real64 PCond = FluidProperties::GetSatPressureRefrig(System(RefrigSysNum).RefrigerantName, - Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense, - System(RefrigSysNum).RefIndex, - RoutineName); + Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense, + System(RefrigSysNum).RefIndex, + RoutineName); Real64 PEvap = FluidProperties::GetSatPressureRefrig( System(RefrigSysNum).RefrigerantName, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).RefIndex, RoutineName); System(RefrigSysNum).PIntercooler = std::sqrt(PCond * PEvap); @@ -5309,13 +5348,13 @@ namespace RefrigeratedCase { if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor if (System(RefrigSysNum).NumStages == 1) { // Single-stage compression Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, - System(RefrigSysNum).TEvapDesign, - Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense); + System(RefrigSysNum).TEvapDesign, + Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense); NominalTotalCompCap += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Two-stage compression, low-stage compressors - Compressor(CompNum).NomCap = - CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).TIntercooler); + Compressor(CompNum).NomCap = CurveManager::CurveValue( + Compressor(CompNum).CapacityCurvePtr, System(RefrigSysNum).TEvapDesign, System(RefrigSysNum).TIntercooler); NominalTotalCompCap += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } // NumStages @@ -5336,8 +5375,8 @@ namespace RefrigeratedCase { int CompNum = System(RefrigSysNum).HiStageCompressorNum(CompIndex); if (!Compressor(CompNum).TransFlag) { // Subcritical Compressor Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, - System(RefrigSysNum).TIntercooler, - Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense); + System(RefrigSysNum).TIntercooler, + Condenser(System(RefrigSysNum).CondenserNum(1)).RatedTCondense); NominalTotalHiStageCompCap += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Transcritical compressor attached to subcritical refigeration cycle @@ -5358,15 +5397,17 @@ namespace RefrigeratedCase { if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", You may wish to check the system sizing. Total nominal cooling capacity is " + - General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + General::RoundSigDigits(NominalCondCap, 0) + - "W. Nominal compressor capacity is " + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); + General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + + General::RoundSigDigits(NominalCondCap, 0) + "W. Nominal compressor capacity is " + + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); } } else if (System(RefrigSysNum).NumStages == 2) { // Two-stage system if ((NominalTotalHiStageCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + System(RefrigSysNum).Name + "\", You may wish to check the system sizing. Total nominal cooling capacity is " + - General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + General::RoundSigDigits(NominalCondCap, 0) + - "W. Nominal compressor capacity is " + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); + General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + + General::RoundSigDigits(NominalCondCap, 0) + "W. Nominal compressor capacity is " + + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); } } // NumStages @@ -5389,7 +5430,8 @@ namespace RefrigeratedCase { // Now have to see if there's a mismatch in the coilflag with the system absorbing heat from the cascade condenser // Note a system can cool multiple cascade condensers. If so, need to be sure all are consistent - all coil or all non-coil(called case // here) check for consistency of loads (coils calc on sys time step, all others on zone time step, so can't mix on one system) - for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; ++RefrigSysNum) { // check flags for systems reflect all cascade loads + for (RefrigSysNum = 1; RefrigSysNum <= DataHeatBalance::NumRefrigSystems; + ++RefrigSysNum) { // check flags for systems reflect all cascade loads if (System(RefrigSysNum).NumCascadeLoads == 0) continue; if (System(RefrigSysNum).CoilFlag) { // system already identified as serving coils for (int CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { @@ -5825,13 +5867,14 @@ namespace RefrigeratedCase { CompNum = TransSystem(TransRefrigSysNum).CompressorNumHP(CompIndex); if (Compressor(CompNum).TransFlag) { // Calculate nominal capacity of transcritical Compressor - Real64 GCOutletH = FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(TransRefrigSysNum).RefrigerantName, - GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletT, - GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletP, - RefrigIndex, - RoutineNameNoColon); - Compressor(CompNum).NomCap = - CurveManager::CurveValue(Compressor(CompNum).TransCapacityCurvePtr, TransSystem(TransRefrigSysNum).TEvapDesignMT, GCOutletH); + Real64 GCOutletH = + FluidProperties::GetSupHeatEnthalpyRefrig(TransSystem(TransRefrigSysNum).RefrigerantName, + GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletT, + GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(1)).RatedOutletP, + RefrigIndex, + RoutineNameNoColon); + Compressor(CompNum).NomCap = CurveManager::CurveValue( + Compressor(CompNum).TransCapacityCurvePtr, TransSystem(TransRefrigSysNum).TEvapDesignMT, GCOutletH); NominalTotalCompCapHP += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } else { // Subcritical compressor attached to transcritical system - show error @@ -5891,8 +5934,8 @@ namespace RefrigeratedCase { CompNum = TransSystem(TransRefrigSysNum).CompressorNumLP(CompIndex); if (TransSystem(TransRefrigSysNum).TransSysType == 2) { // Calculate capacity of LP compressors Compressor(CompNum).NomCap = CurveManager::CurveValue(Compressor(CompNum).CapacityCurvePtr, - TransSystem(TransRefrigSysNum).TEvapDesignLT, - TransSystem(TransRefrigSysNum).TEvapDesignMT); + TransSystem(TransRefrigSysNum).TEvapDesignLT, + TransSystem(TransRefrigSysNum).TEvapDesignMT); NominalTotalCompCapLP += Compressor(CompNum).NomCap; ++Compressor(CompNum).NumSysAttach; } @@ -5913,7 +5956,8 @@ namespace RefrigeratedCase { ShowWarningError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + ": The receiver temperature (" + General::RoundSigDigits(TransSystem(TransRefrigSysNum).TReceiver, 2) + "C) is greater than the minimum condensing temperature specified for subcritical operation (" + - General::RoundSigDigits(GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp, 2) + "C)."); + General::RoundSigDigits(GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp, 2) + + "C)."); ShowContinueError(" The minimum condensing temperature will be set at 5C greater than the receiver temperature."); GasCooler(TransSystem(TransRefrigSysNum).GasCoolerNum(NumGasCoolers)).MinCondTemp = TransSystem(TransRefrigSysNum).TReceiver + 5.0; @@ -5969,7 +6013,8 @@ namespace RefrigeratedCase { TransSystem(TransRefrigSysNum).SumUASuctionPipingMT = 0.0; if (!lNumericBlanks(3) && !lAlphaBlanks(AlphaNum)) { TransSystem(TransRefrigSysNum).SumUASuctionPipingMT = Numbers(3); - TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); + TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumMT = + UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumMT == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + @@ -5996,7 +6041,8 @@ namespace RefrigeratedCase { TransSystem(TransRefrigSysNum).SumUASuctionPipingLT = 0.0; if (!lNumericBlanks(4) && !lAlphaBlanks(AlphaNum)) { TransSystem(TransRefrigSysNum).SumUASuctionPipingLT = Numbers(4); - TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT = UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); + TransSystem(TransRefrigSysNum).SuctionPipeActualZoneNumLT = + UtilityRoutines::FindItemInList(Alphas(AlphaNum), DataHeatBalance::Zone); TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT = DataZoneEquipment::GetSystemNodeNumberForZone(Alphas(AlphaNum)); if (TransSystem(TransRefrigSysNum).SuctionPipeZoneNodeNumLT == 0) { ShowSevereError(RoutineName + CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + @@ -6029,9 +6075,9 @@ namespace RefrigeratedCase { if ((NominalTotalCompCap < (0.7 * NominalTotalCoolingCap)) || (NominalCondCap < (1.3 * NominalTotalCoolingCap))) { ShowWarningError(CurrentModuleObject + "=\"" + TransSystem(TransRefrigSysNum).Name + "\", You may wish to check the system sizing."); - ShowContinueError("Total nominal cooling capacity is " + General::RoundSigDigits(NominalTotalCoolingCap, 0) + "W. Condenser capacity is " + - General::RoundSigDigits(NominalCondCap, 0) + "W. Nominal compressor capacity is " + - General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); + ShowContinueError("Total nominal cooling capacity is " + General::RoundSigDigits(NominalTotalCoolingCap, 0) + + "W. Condenser capacity is " + General::RoundSigDigits(NominalCondCap, 0) + + "W. Nominal compressor capacity is " + General::RoundSigDigits(NominalTotalCompCap, 0) + "W."); } } // Transcritical refrigeration systems @@ -9186,25 +9232,25 @@ namespace RefrigeratedCase { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(Condenser(RefCondLoop).Name, - DataPlant::TypeOf_RefrigSystemWaterCondenser, - Condenser(RefCondLoop).PlantLoopNum, - Condenser(RefCondLoop).PlantLoopSideNum, - Condenser(RefCondLoop).PlantBranchNum, - Condenser(RefCondLoop).PlantCompNum, - errFlag, - _, - _, - _, - _, - _); + DataPlant::TypeOf_RefrigSystemWaterCondenser, + Condenser(RefCondLoop).PlantLoopNum, + Condenser(RefCondLoop).PlantLoopSideNum, + Condenser(RefCondLoop).PlantBranchNum, + Condenser(RefCondLoop).PlantCompNum, + errFlag, + _, + _, + _, + _, + _); if (errFlag) { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, - 20.0, - DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, - RoutineName); + 20.0, + DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, + RoutineName); if (Condenser(RefCondLoop).FlowType == ConstantFlow) { Condenser(RefCondLoop).MassFlowRateMax = Condenser(RefCondLoop).DesVolFlowRate * rho; @@ -9218,25 +9264,25 @@ namespace RefrigeratedCase { bool errFlag = false; PlantUtilities::ScanPlantLoopsForObject(RefrigRack(RefCompRackLoop).Name, - DataPlant::TypeOf_RefrigerationWaterCoolRack, - RefrigRack(RefCompRackLoop).PlantLoopNum, - RefrigRack(RefCompRackLoop).PlantLoopSideNum, - RefrigRack(RefCompRackLoop).PlantBranchNum, - RefrigRack(RefCompRackLoop).PlantCompNum, - errFlag, - _, - _, - _, - _, - _); + DataPlant::TypeOf_RefrigerationWaterCoolRack, + RefrigRack(RefCompRackLoop).PlantLoopNum, + RefrigRack(RefCompRackLoop).PlantLoopSideNum, + RefrigRack(RefCompRackLoop).PlantBranchNum, + RefrigRack(RefCompRackLoop).PlantCompNum, + errFlag, + _, + _, + _, + _, + _); if (errFlag) { ShowFatalError("InitRefrigerationPlantConnections: Program terminated due to previous condition(s)."); } Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, - 20.0, - DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, - RoutineName); + 20.0, + DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, + RoutineName); if (RefrigRack(RefCompRackLoop).FlowType == ConstantFlow) { RefrigRack(RefCompRackLoop).MassFlowRateMax = RefrigRack(RefCompRackLoop).DesVolFlowRate * rho; @@ -9258,9 +9304,9 @@ namespace RefrigeratedCase { if (Condenser(RefCondLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidName, - 20.0, - DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, - RoutineName); + 20.0, + DataPlant::PlantLoop(Condenser(RefCondLoop).PlantLoopNum).FluidIndex, + RoutineName); if (Condenser(RefCondLoop).FlowType == ConstantFlow) { Condenser(RefCondLoop).MassFlowRateMax = Condenser(RefCondLoop).DesVolFlowRate * rho; @@ -9269,21 +9315,21 @@ namespace RefrigeratedCase { } PlantUtilities::InitComponentNodes(0.0, - Condenser(RefCondLoop).MassFlowRateMax, - Condenser(RefCondLoop).InletNode, - Condenser(RefCondLoop).OutletNode, - Condenser(RefCondLoop).PlantLoopNum, - Condenser(RefCondLoop).PlantLoopSideNum, - Condenser(RefCondLoop).PlantBranchNum, - Condenser(RefCondLoop).PlantCompNum); + Condenser(RefCondLoop).MassFlowRateMax, + Condenser(RefCondLoop).InletNode, + Condenser(RefCondLoop).OutletNode, + Condenser(RefCondLoop).PlantLoopNum, + Condenser(RefCondLoop).PlantLoopSideNum, + Condenser(RefCondLoop).PlantBranchNum, + Condenser(RefCondLoop).PlantCompNum); } for (int RefCompRackLoop = 1; RefCompRackLoop <= DataHeatBalance::NumRefrigeratedRacks; ++RefCompRackLoop) { if (RefrigRack(RefCompRackLoop).CondenserType != DataHeatBalance::RefrigCondenserTypeWater) continue; Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidName, - 20.0, - DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, - RoutineName); + 20.0, + DataPlant::PlantLoop(RefrigRack(RefCompRackLoop).PlantLoopNum).FluidIndex, + RoutineName); if (RefrigRack(RefCompRackLoop).FlowType == ConstantFlow) { RefrigRack(RefCompRackLoop).MassFlowRateMax = RefrigRack(RefCompRackLoop).DesVolFlowRate * rho; @@ -9292,13 +9338,13 @@ namespace RefrigeratedCase { } PlantUtilities::InitComponentNodes(0.0, - RefrigRack(RefCompRackLoop).MassFlowRateMax, - RefrigRack(RefCompRackLoop).InletNode, - RefrigRack(RefCompRackLoop).OutletNode, - RefrigRack(RefCompRackLoop).PlantLoopNum, - RefrigRack(RefCompRackLoop).PlantLoopSideNum, - RefrigRack(RefCompRackLoop).PlantBranchNum, - RefrigRack(RefCompRackLoop).PlantCompNum); + RefrigRack(RefCompRackLoop).MassFlowRateMax, + RefrigRack(RefCompRackLoop).InletNode, + RefrigRack(RefCompRackLoop).OutletNode, + RefrigRack(RefCompRackLoop).PlantLoopNum, + RefrigRack(RefCompRackLoop).PlantLoopSideNum, + RefrigRack(RefCompRackLoop).PlantBranchNum, + RefrigRack(RefCompRackLoop).PlantCompNum); } } MyBeginEnvrnFlag = false; @@ -9327,18 +9373,18 @@ namespace RefrigeratedCase { // "Impact of ASHRAE Standard 62-1989 on Florida Supermarkets", // Florida Solar Energy Center, FSEC-CR-910-96, Final Report, Oct. 1996 - Real64 COPFTempOutput; // Curve value for COPFTemp curve object - Real64 CondenserFrac; // Fraction of condenser power as a function of outdoor temperature - Real64 TotalHeatRejectedToZone; // Total compressor and condenser fan heat rejected to zone (based on CaseRAFactor) - int HeatRejectZoneNum; // Index to zone where heat is rejected - int HeatRejectZoneNodeNum; // Index to zone where heat is rejected - Real64 OutWbTemp; // Outdoor wet bulb temp at condenser air inlet node [C] - Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] - Real64 EffectTemp; // Effective outdoor temp when using evap condenser cooling [C] - Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] - Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] - Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] - bool EvapAvail; // Control for evap condenser availability + Real64 COPFTempOutput; // Curve value for COPFTemp curve object + Real64 CondenserFrac; // Fraction of condenser power as a function of outdoor temperature + Real64 TotalHeatRejectedToZone; // Total compressor and condenser fan heat rejected to zone (based on CaseRAFactor) + int HeatRejectZoneNum; // Index to zone where heat is rejected + int HeatRejectZoneNodeNum; // Index to zone where heat is rejected + Real64 OutWbTemp; // Outdoor wet bulb temp at condenser air inlet node [C] + Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] + Real64 EffectTemp; // Effective outdoor temp when using evap condenser cooling [C] + Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] + Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] + Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] + bool EvapAvail; // Control for evap condenser availability TotalRackDeliveredCapacity = 0.0; CompressorCOPactual = 0.0; @@ -9498,7 +9544,8 @@ namespace RefrigeratedCase { if (TotalRackDeliveredCapacity > 0.0 && this->CondenserType != DataHeatBalance::RefrigCondenserTypeWater) { if (this->TotCondFTempPtr != 0) { if (this->HeatRejectionLocation == LocationZone) { - CondenserFrac = max(0.0, min(1.0, CurveManager::CurveValue(this->TotCondFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp))); + CondenserFrac = + max(0.0, min(1.0, CurveManager::CurveValue(this->TotCondFTempPtr, DataLoopNode::Node(HeatRejectZoneNodeNum).Temp))); TotalCondenserFanPower = this->CondenserFanPower * CondenserFrac; DataHeatBalance::RefrigCaseCredit(HeatRejectZoneNum).SenCaseCreditToZone += this->CondenserFanPower * CondenserFrac; } else { @@ -9522,8 +9569,7 @@ namespace RefrigeratedCase { // calculate basin water heater load if (this->CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if ((TotalRackDeliveredCapacity == 0.0) && (EvapAvail) && (OutDbTemp < this->BasinHeaterSetPointTemp)) { - TotalBasinHeatPower = - max(0.0, this->BasinHeaterPowerFTempDiff * (this->BasinHeaterSetPointTemp - OutDbTemp)); + TotalBasinHeatPower = max(0.0, this->BasinHeaterPowerFTempDiff * (this->BasinHeaterSetPointTemp - OutDbTemp)); // provide warning if no heater power exists if (TotalBasinHeatPower == 0.0) { if (this->EvapFreezeWarnIndex == 0) { @@ -9656,16 +9702,16 @@ namespace RefrigeratedCase { Real64 DefrostDripDownSchedule(0.0); // Display case drip-down schedule (allows coil to drain after defrost) Real64 DefrostRatio(0.0); // ratio of defrost energy at current zone temp/humrat to defrost // capacity at design condition - Real64 LatentRatio(0.0); // ratio of latent capacity at current zone temp/humrat to + Real64 LatentRatio(0.0); // ratio of latent capacity at current zone temp/humrat to // latent capacity at design condition Real64 LatentCap_Actual(0.0); // Refrigerated case latent capacity at specific operating conditions Real64 LatentCaseCredit(0.0); // Latent case credit delivered to zone (W) Real64 SensibleCap_Actual(0.0); // Refrigerated case sensible capacity at specific operating conditions - Real64 SensibleLoadPrime(0.0); // Sensible load due to cond, conv, rad, infil (W) - Real64 TotalCap_Actual(0.0); // Refrigerated case total capacity at specific operating conditions - Real64 TotalLightingLoad(0.0); // Total lighting energy rate (W) - Real64 TotalFan(0.0); // Total fan energy rate (W) - Real64 TotalAntiSweat(0.0); // Total anti-sweat heater energy rate (W) + Real64 SensibleLoadPrime(0.0); // Sensible load due to cond, conv, rad, infil (W) + Real64 TotalCap_Actual(0.0); // Refrigerated case total capacity at specific operating conditions + Real64 TotalLightingLoad(0.0); // Total lighting energy rate (W) + Real64 TotalFan(0.0); // Total fan energy rate (W) + Real64 TotalAntiSweat(0.0); // Total anti-sweat heater energy rate (W) // Refrigerated display case defrost type (parameters) // DefNone = 0 @@ -9680,7 +9726,10 @@ namespace RefrigeratedCase { CaseRAFactor = 0.0; // Zone relative humidity (%) - Real64 ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(this->ZoneNodeNum).Temp, DataLoopNode::Node(this->ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress) * 100.0; + Real64 ZoneRHPercent = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(this->ZoneNodeNum).Temp, + DataLoopNode::Node(this->ZoneNodeNum).HumRat, + DataEnvironment::OutBaroPress) * + 100.0; // Zone dew point (C) Real64 ZoneDewPoint = Psychrometrics::PsyTdpFnWPb(DataLoopNode::Node(this->ZoneNodeNum).HumRat, DataEnvironment::OutBaroPress); @@ -9705,7 +9754,7 @@ namespace RefrigeratedCase { DefrostDripDownSchedule = 0.0; } - Real64 StockingSchedule(0.0); // Current value of product stocking schedule (W/m) + Real64 StockingSchedule(0.0); // Current value of product stocking schedule (W/m) // get product stocking schedule and load due to product stocking, if no schedule exists load is 0 if (this->StockingSchedPtr > 0) { @@ -9762,8 +9811,7 @@ namespace RefrigeratedCase { min(1.0, max(0.0, 1.0 - (this->RatedAmbientRH - ZoneRHPercent) / (this->RatedAmbientRH - this->HumAtZeroAS))); TotalAntiSweat = max(this->MinimumASPower, TotalAntiSweat); } else if (SELECT_CASE_var == ASDewPoint) { - TotalAntiSweat = this->AntiSweatPower * - min(1.0, max(0.0, (ZoneDewPoint - TCase) / (this->RatedAmbientDewPoint - TCase))); + TotalAntiSweat = this->AntiSweatPower * min(1.0, max(0.0, (ZoneDewPoint - TCase) / (this->RatedAmbientDewPoint - TCase))); TotalAntiSweat = max(this->MinimumASPower, TotalAntiSweat); } else if (SELECT_CASE_var == ASHeatBalance) { if (this->Rcase > 0.0) { @@ -9834,8 +9882,8 @@ namespace RefrigeratedCase { if (TCase > TempTooHotToFrost) this->KgFrost = 0.0; - Real64 DefrostLoad_Actual(0.0); // heat load on case due to defrost (W) - Real64 DefrostCap_Actual(0.0); // power used to defrost (W) + Real64 DefrostLoad_Actual(0.0); // heat load on case due to defrost (W) + Real64 DefrostCap_Actual(0.0); // power used to defrost (W) // DEFROST CALCULATIONS if (DefrostSchedule > 0.0) { @@ -9921,7 +9969,8 @@ namespace RefrigeratedCase { } // CapAvail vs Load requested // Reset DefrostLoad_Actual to zero for non-electric defrost types, for reporting purposes - if (this->DefrostType != DefElectric && this->DefrostType != DefElectricOnDemand && this->DefrostType != DefElectricTerm) DefrostCap_Actual = 0.0; + if (this->DefrostType != DefElectric && this->DefrostType != DefElectricOnDemand && this->DefrostType != DefElectricTerm) + DefrostCap_Actual = 0.0; Real64 caseRAFraction = min(0.8, this->RAFrac); CaseRAFactor = (1.0 - ((0.8 - caseRAFraction) / 0.8)) * 0.5; @@ -10046,11 +10095,11 @@ namespace RefrigeratedCase { "greater than the design ambient for the case."); ShowContinueError(" Refer to documentation for further explanation of "); ShowContinueError(" Total Cooling Capacity."); - } // defrost energy > warm environment energy - } // stock > defrost ELSE + } // defrost energy > warm environment energy + } // stock > defrost ELSE this->ShowStoreEnergyWarning = false; // only give this warning once for any one case - } // showstoreenergy warning true - } // stored energy > large number + } // showstoreenergy warning true + } // stored energy > large number if (this->KgFrost > MyLargeNumber) { this->KgFrost = MyLargeNumber; @@ -10142,8 +10191,10 @@ namespace RefrigeratedCase { // Make demand request on first HVAC iteration // get cooling fluid properties - Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol( + DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 Cp = FluidProperties::GetSpecificHeatGlycol( + DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); if (this->FlowType == VariableFlow && TotalCondenserHeat > 0.0) { @@ -10152,10 +10203,12 @@ namespace RefrigeratedCase { if (this->OutletTemp == this->InletTemp) { if (this->HighInletWarnIndex == 0) { - ShowSevereError(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); + ShowSevereError(ErrIntro + ", \"" + this->Name + + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); ShowContinueError("cooling water is not cold enough to reach desired outlet temperature"); } - ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", + ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + this->Name + + "\" : has inlet water temp equal to desired outlet temp.... continues. ", this->HighInletWarnIndex); this->VolFlowRate = 9999.0; this->MassFlowRate = this->VolFlowRate * rho; @@ -10169,7 +10222,8 @@ namespace RefrigeratedCase { ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); ShowContinueError("Flow reset to maximum value."); } // HighFlowWarnIndex - ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Flow rate higher than maximum allowed ... continues", this->HighFlowWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Flow rate higher than maximum allowed ... continues", + this->HighFlowWarnIndex); // END IF this->MassFlowRate = this->MassFlowRateMax; } @@ -10185,7 +10239,8 @@ namespace RefrigeratedCase { } // on flow type // check against plant, might get changed. - PlantUtilities::SetComponentFlowRate(this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + PlantUtilities::SetComponentFlowRate( + this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); this->VolFlowRate = this->MassFlowRate / rho; @@ -10196,7 +10251,8 @@ namespace RefrigeratedCase { if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { ShowRecurringWarningErrorAtEnd( - TypeName + this->Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", + TypeName + this->Name + + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", this->FlowType); } } @@ -10207,7 +10263,8 @@ namespace RefrigeratedCase { ShowContinueError( "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } - ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Condenser outlet temp higher than maximum allowed ... continues", this->HighTempWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Condenser outlet temp higher than maximum allowed ... continues", + this->HighTempWarnIndex); } this->UpdateCondenser(); @@ -10283,7 +10340,8 @@ namespace RefrigeratedCase { PlantBranchIndex = this->PlantBranchNum; PlantCompIndex = this->PlantCompNum; - TotalCondenserHeat = DataHeatBalance::HeatReclaimRefrigeratedRack(this->MyIdx).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; + TotalCondenserHeat = + DataHeatBalance::HeatReclaimRefrigeratedRack(this->MyIdx).AvailCapacity - this->LaggedUsedWaterHeater - this->LaggedUsedHVACCoil; TypeName = "Refrigeration:CompressorRack:"; ErrIntro = "Condenser for refrigeration rack "; @@ -10291,8 +10349,10 @@ namespace RefrigeratedCase { // Make demand request on first HVAC iteration // get cooling fluid properties - Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); - Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 rho = FluidProperties::GetDensityGlycol( + DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); + Real64 Cp = FluidProperties::GetSpecificHeatGlycol( + DataPlant::PlantLoop(PlantLoopIndex).FluidName, this->InletTemp, DataPlant::PlantLoop(PlantLoopIndex).FluidIndex, RoutineName); if (this->FlowType == VariableFlow && TotalCondenserHeat > 0.0) { this->OutletTemp = ScheduleManager::GetCurrentScheduleValue(this->OutletTempSchedPtr); @@ -10300,10 +10360,12 @@ namespace RefrigeratedCase { if (this->OutletTemp == this->InletTemp) { if (this->HighInletWarnIndex == 0) { - ShowSevereError(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); + ShowSevereError(ErrIntro + ", \"" + this->Name + + "\" : has inlet water temp equal to desired outlet temp. Excessive flow resulting. "); ShowContinueError("cooling water is not cold enough to reach desired outlet temperature"); } - ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + this->Name + "\" : has inlet water temp equal to desired outlet temp.... continues. ", + ShowRecurringWarningErrorAtEnd(ErrIntro + ", \"" + this->Name + + "\" : has inlet water temp equal to desired outlet temp.... continues. ", this->HighInletWarnIndex); this->VolFlowRate = 9999.0; this->MassFlowRate = this->VolFlowRate * rho; @@ -10317,7 +10379,8 @@ namespace RefrigeratedCase { ShowContinueError("Requested condenser water mass flow rate greater than maximum allowed value. "); ShowContinueError("Flow reset to maximum value."); } // HighFlowWarnIndex - ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Flow rate higher than maximum allowed ... continues", this->HighFlowWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Flow rate higher than maximum allowed ... continues", + this->HighFlowWarnIndex); // END IF this->MassFlowRate = this->MassFlowRateMax; } @@ -10333,7 +10396,8 @@ namespace RefrigeratedCase { } // on flow type // check against plant, might get changed. - PlantUtilities::SetComponentFlowRate(this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); + PlantUtilities::SetComponentFlowRate( + this->MassFlowRate, PlantInletNode, PlantOutletNode, PlantLoopIndex, PlantLoopSideIndex, PlantBranchIndex, PlantCompIndex); this->VolFlowRate = this->MassFlowRate / rho; @@ -10344,8 +10408,9 @@ namespace RefrigeratedCase { if ((TotalCondenserHeat > 0.0) && (!FirstHVACIteration)) { ShowRecurringWarningErrorAtEnd( - TypeName + this->Name + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", - this->NoFlowWarnIndex); + TypeName + this->Name + + "Water-cooled condenser has no cooling water flow. Heat is not being rejected from compressor rack condenser.", + this->NoFlowWarnIndex); } } // Check outlet water temp for max value @@ -10353,9 +10418,10 @@ namespace RefrigeratedCase { if (this->HighTempWarnIndex == 0) { ShowWarningMessage(TypeName + this->Name); ShowContinueError( - "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); + "Water-cooled condenser outlet temp higher than maximum allowed temp. Check flow rates and/or temperature setpoints."); } - ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Condenser outlet temp higher than maximum allowed ... continues", HighTempWarnIndex); + ShowRecurringWarningErrorAtEnd(ErrIntro + this->Name + " - Condenser outlet temp higher than maximum allowed ... continues", + HighTempWarnIndex); } this->UpdateCondenser(); @@ -10463,7 +10529,7 @@ namespace RefrigeratedCase { } else { // calculate floating T evap Real64 LoadFrac = min(1.0, (RefrigCase(CaseID).TotalCoolingLoad / RefrigCase(CaseID).DesignRatedCap)); Real64 MaxTEvap = RefrigCase(CaseID).Temperature - - (RefrigCase(CaseID).Temperature - RefrigCase(CaseID).EvapTempDesign) * max(LoadFrac, MaxDelTFloatFrac); + (RefrigCase(CaseID).Temperature - RefrigCase(CaseID).EvapTempDesign) * max(LoadFrac, MaxDelTFloatFrac); // Compare Tevap for this case to max allowed for all previous cases on this suction group and set at the MINIMUM of the // two if (CaseIndex == 1) { // note use case index, not caseid here to get first case on this suction group/system @@ -10487,7 +10553,7 @@ namespace RefrigeratedCase { } else { // calculate floating T evap Real64 LoadFrac = min(1.0, (WalkIn(WalkInID).TotalCoolingLoad / WalkIn(WalkInID).DesignRatedCap)); Real64 MaxTEvap = WalkIn(WalkInID).Temperature - - (WalkIn(WalkInID).Temperature - WalkIn(WalkInID).TEvapDesign) * max(LoadFrac, MaxDelTFloatFrac); + (WalkIn(WalkInID).Temperature - WalkIn(WalkInID).TEvapDesign) * max(LoadFrac, MaxDelTFloatFrac); // Compare maxTevap for this walk in to max allowed for cases and for all // previous walk ins on this suction group and set at the MINIMUM of the two if (WalkInIndex == 1 && System(SysNum).NumCases == 0) { @@ -10547,7 +10613,8 @@ namespace RefrigeratedCase { // in the total secondary system loads. System(SysNum).PipeHeatLoad = 0.0; if (System(SysNum).SumUASuctionPiping > MySmallNumber) { - Real64 SuctionPipeZoneTemp = DataLoopNode::Node(System(SysNum).SuctionPipeZoneNodeNum).Temp; // Temperature for zone identified as environment for suction pipe heat gains, C + Real64 SuctionPipeZoneTemp = DataLoopNode::Node(System(SysNum).SuctionPipeZoneNodeNum) + .Temp; // Temperature for zone identified as environment for suction pipe heat gains, C System(SysNum).PipeHeatLoad = System(SysNum).SumUASuctionPiping * (SuctionPipeZoneTemp - System(SysNum).TEvapNeeded); // pipe heat load is a positive number (ie. heat absorbed by pipe, so needs to be subtracted // from refrigcasecredit (- for cooling zone, + for heating zone) @@ -10574,7 +10641,7 @@ namespace RefrigeratedCase { (NumSimulationRefrigAirChillers > 0)) StartMechSubcoolLoop = 1; - bool FirstSCLoop = true; // Flag first time through multi-system loop used when mech subcoolers present + bool FirstSCLoop = true; // Flag first time through multi-system loop used when mech subcoolers present for (int LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { // Note, for cascade cond loads compared requiring 5 iterations to 3, no difference. @@ -10669,8 +10736,8 @@ namespace RefrigeratedCase { } // Produce first time step estimates, assume no subcoolers - System(SysNum).HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); + System(SysNum).HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig( + System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig( System(SysNum).RefrigerantName, System(SysNum).TCondense, 0.0, System(SysNum).RefIndex, RoutineName); System(SysNum).HCaseIn = @@ -10685,11 +10752,12 @@ namespace RefrigeratedCase { System(SysNum).CalcDetailedSystem(SysNum); - bool DeRate; // If true, need to derate aircoils because load can't be met by system + bool DeRate; // If true, need to derate aircoils because load can't be met by system // With air chiller coils, don't use unmet energy, instead reduce capacity on coils to match avail compressor/cond capacity // current loads on compressor, exclusive of unmet loads from prev time steps - Real64 CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet + Real64 CurrentLoads = + System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet if ((System(SysNum).CoilFlag) && (CurrentLoads > (System(SysNum).TotCompCapacity * 1.001))) { DeRate = true; FinalRateCoils(DeRate, DetailedSystem, SysNum, CurrentLoads, System(SysNum).TotCompCapacity); @@ -10731,8 +10799,10 @@ namespace RefrigeratedCase { // Dealing with unmet load has to be done outside iterative loop for (int SysNum = 1; SysNum <= DataHeatBalance::NumRefrigSystems; ++SysNum) { // Only do those systems appropriate for this analysis, supermarket type on load time step or coil type on sys time step - if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && (!DataGlobals::WarmupFlag)) { - Real64 CurrentLoads = System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet + if ((((!UseSysTimeStep) && (!System(SysNum).CoilFlag)) || ((UseSysTimeStep) && (System(SysNum).CoilFlag))) && + (!DataGlobals::WarmupFlag)) { + Real64 CurrentLoads = + System(SysNum).TotalSystemLoad + System(SysNum).LSHXTrans; // because compressor capacity rated from txv to comp inlet Real64 CurrentHiStageLoads(0.0); // Current loads on high-stage compressor, exclusive of unmet loads from if (System(SysNum).NumStages == 2) { CurrentHiStageLoads = CurrentLoads + System(SysNum).TotCompPower; @@ -10748,7 +10818,8 @@ namespace RefrigeratedCase { // Note the unmet energy is turned into a rate and applied to the system load at the start of calccompressor System(SysNum).UnmetEnergy += (CurrentLoads - System(SysNum).TotCompCapacity) * DataGlobals::TimeStepZoneSec; if (System(SysNum).NumStages == 2) { - System(SysNum).UnmetHiStageEnergy += (CurrentHiStageLoads - System(SysNum).TotHiStageCompCapacity) * DataGlobals::TimeStepZoneSec; + System(SysNum).UnmetHiStageEnergy += + (CurrentHiStageLoads - System(SysNum).TotHiStageCompCapacity) * DataGlobals::TimeStepZoneSec; } if (System(SysNum).UnmetEnergy > MyLargeNumber) { System(SysNum).UnmetEnergy = MyLargeNumber; @@ -10780,9 +10851,10 @@ namespace RefrigeratedCase { } // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += System(SysNum).NetHeatRejectLoad; // Adding heat is positive - } // UseSystimestep - } // Reject heat to zone + DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += + System(SysNum).NetHeatRejectLoad; // Adding heat is positive + } // UseSystimestep + } // Reject heat to zone // Report variables System(SysNum).TotTransferLoad = System(SysNum).SumMechSCLoad - System(SysNum).SumMechSCBenefit + @@ -10790,7 +10862,8 @@ namespace RefrigeratedCase { System(SysNum).TotTransferEnergy = System(SysNum).TotTransferLoad * LocalTimeStep * DataGlobals::SecInHour; System(SysNum).PipeHeatEnergy = System(SysNum).PipeHeatLoad * LocalTimeStep * DataGlobals::SecInHour; System(SysNum).TotalCoolingEnergy = System(SysNum).TotalCoolingLoad * LocalTimeStep * DataGlobals::SecInHour; - } //(((.NOT. UseSysTimeStep).AND.(.NOT. System(SysNum)%CoilFlag)).OR.((UseSysTimeStep).AND.(System(SysNum)%CoilFlag))).and.not DataGlobals::WarmupFlag + } //(((.NOT. UseSysTimeStep).AND.(.NOT. System(SysNum)%CoilFlag)).OR.((UseSysTimeStep).AND.(System(SysNum)%CoilFlag))).and.not + //DataGlobals::WarmupFlag } // SysNum = 1,NumRefrigSystems // Update for sending to zone equipment manager. (note report variables are summed elsewhere) @@ -10803,7 +10876,8 @@ namespace RefrigeratedCase { for (int CoilID = 1; CoilID <= NumSimulationRefrigAirChillers; ++CoilID) { if (WarehouseCoil(CoilID).ZoneNum != ZoneNum) continue; CoilSysCredit(ZoneNum).SenCreditToZoneRate -= WarehouseCoil(CoilID).SensCreditRate; - CoilSysCredit(ZoneNum).SenCreditToZoneEnergy = CoilSysCredit(ZoneNum).SenCreditToZoneRate * LocalTimeStep * DataGlobals::SecInHour; + CoilSysCredit(ZoneNum).SenCreditToZoneEnergy = + CoilSysCredit(ZoneNum).SenCreditToZoneRate * LocalTimeStep * DataGlobals::SecInHour; CoilSysCredit(ZoneNum).LatKgPerS_ToZoneRate -= WarehouseCoil(CoilID).LatKgPerS_ToZone; CoilSysCredit(ZoneNum).LatCreditToZoneRate -= WarehouseCoil(CoilID).LatCreditRate; CoilSysCredit(ZoneNum).LatCreditToZoneEnergy -= WarehouseCoil(CoilID).LatCreditEnergy; @@ -10932,7 +11006,7 @@ namespace RefrigeratedCase { // transfer between detailed transcritical refrigeration systems // requires additional iteration at this level. - int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, don't loop + int StartMechSubcoolLoop(3); // if no mechanical subcoolers transfer energy between system, don't loop if (NumSimulationSharedGasCoolers > 0) StartMechSubcoolLoop = 1; for (int LoopNum = StartMechSubcoolLoop; LoopNum <= 3; ++LoopNum) { @@ -10949,10 +11023,10 @@ namespace RefrigeratedCase { TransSystem(SysNum).CpSatVapEvapLT = FluidProperties::GetSatSpecificHeatRefrig( TransSystem(SysNum).RefrigerantName, TransSystem(SysNum).TEvapNeededLT, 1.0, TransSystem(SysNum).RefIndex, RoutineName); TransSystem(SysNum).HCaseOutLT = FluidProperties::GetSatEnthalpyRefrig(TransSystem(SysNum).RefrigerantName, - TransSystem(SysNum).TEvapNeededLT, - 1.0, - TransSystem(SysNum).RefIndex, - RoutineName) + + TransSystem(SysNum).TEvapNeededLT, + 1.0, + TransSystem(SysNum).RefIndex, + RoutineName) + TransSystem(SysNum).CpSatVapEvapLT * TransCaseSuperheat; } TransSystem(SysNum).CpSatVapEvapMT = FluidProperties::GetSatSpecificHeatRefrig( @@ -10990,7 +11064,7 @@ namespace RefrigeratedCase { } // TransSystem(SysNum)%TotalSystemLoad > 0 } // SysNum over NumRefrigSystems - } // LoopNum, three times for buildings with multiple detailed systems connected with shared gas coolers + } // LoopNum, three times for buildings with multiple detailed systems connected with shared gas coolers // Unmet load is done outside iterative loop for (int SysNum = 1; SysNum <= NumTransRefrigSystems; ++SysNum) { @@ -11018,9 +11092,10 @@ namespace RefrigeratedCase { int CondInletAirZoneNum = GasCooler(TransSystem(SysNum).GasCoolerNum(1)).InletAirZoneNum; // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { - DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += TransSystem(SysNum).NetHeatRejectLoad; // Adding heat is positive - } // UseSystimestep - } // Reject heat to zone + DataHeatBalance::RefrigCaseCredit(CondInletAirZoneNum).SenCaseCreditToZone += + TransSystem(SysNum).NetHeatRejectLoad; // Adding heat is positive + } // UseSystimestep + } // Reject heat to zone // Report variables TransSystem(SysNum).PipeHeatEnergy = @@ -11071,13 +11146,13 @@ namespace RefrigeratedCase { Real64 const ErrorTol(0.001); // Iterative solution tolerance bool NotBalanced = true; - int NumIter = 0; + int NumIter = 0; Real64 ErrorMassFlowComps(0.0); // Error in calculated low stage compressor mass flow (single- or two-stage systems) Real64 ErrorMassFlowHiStageComps(0.0); // Error in calculated high-stage compressor mass flow (two-stage systems only) // Balance This Refrigeration System using calculated refrigerant flow Real64 MassFlowHiStageCompsStart(0.0); // Mass flow through high-stage compressors (two-stage systems only) - + while (NotBalanced) { // Set values for iteration convergence tolerance check ++NumIter; @@ -11137,10 +11212,10 @@ namespace RefrigeratedCase { Real64 const ErrorTol(0.001); // Iterative solution tolerance - int NumIter(0); // Iteration counter - bool NotBalanced(true); // Flag to indicate convergence, based on system balance + int NumIter(0); // Iteration counter + bool NotBalanced(true); // Flag to indicate convergence, based on system balance Real64 MassFlowStart(0.5); // Initial refrigerant mass flow through receiver bypass - Real64 ErrorMassFlow; // Error in calculated refrigerant mass flow through receiver bypass + Real64 ErrorMassFlow; // Error in calculated refrigerant mass flow through receiver bypass while (NotBalanced) { ++NumIter; @@ -11149,8 +11224,7 @@ namespace RefrigeratedCase { this->CalculateTransCompressors(); if (NumIter < 2) continue; if ((this->RefMassFlowReceiverBypass == 0.0) || (MassFlowStart == 0.0)) { - ShowSevereError("Refrigeration:TranscriticalSystem: " + this->Name + - " showing zero refrigerant flow through receiver bypass."); + ShowSevereError("Refrigeration:TranscriticalSystem: " + this->Name + " showing zero refrigerant flow through receiver bypass."); ShowContinueError("Receiver Bypass Flow = " + General::RoundSigDigits(this->RefMassFlowReceiverBypass, 6)); ShowContinueError("Check input file to ensure that refrigeration loads on this system are not zero."); } else { @@ -11214,29 +11288,29 @@ namespace RefrigeratedCase { int SystemID; // System number rejecting heat to this condenser bool EvapAvail; // Control for evap condenser availability - Real64 AirVolRatio; // Ratio of air volume needed to remove load relative to design load - Real64 AirDensity; // Density of air at condenser inlet [kg/m3] - Real64 AirDensityDry; // Density of dry air at condenser inlet temperature [kg/m3] - Real64 ActualFanPower; // Fan power after adjustments for partially loaded condenser [W] - Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] - Real64 CapFac; // Capacity Factor - Real64 Effectiveness; // for evap condenser, =capacity/max cap, where max cap is cap if Tairout equal Tcondense - Real64 EnthalpyAtTcond; // enthalpy of saturated air at Tcondense - Real64 EnthalpyAirIn; // Enthalpy of air entering condenser [J/kg] - Real64 EnthalpyAirOut; // Enthalpy of air leaving condenser [J/kg] - Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio - Real64 FanPowerRatio; // Calculated fan power ratio - Real64 HRCF(0.0); // Heat Rejection Capacity Factor (convention for evap condensers) - Real64 HRCFFullFlow; // Heat Rejection Capacity Factor at full air flow - Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] - Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] - Real64 OutWbTemp(0.0); // Outdoor wet bulb temp at condenser air inlet node [C] - Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] - Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenser (m3/s) - Real64 RatedFanPower; // local variable equal to input condenser value - Real64 RatedAirFlowRate; // local variable equal to input condenser value - Real64 SinkTemp; // Heat sink temperature used to derate fan power at reduced loads [C] - Real64 TCondCalc; // Calculated Condensing temperature + Real64 AirVolRatio; // Ratio of air volume needed to remove load relative to design load + Real64 AirDensity; // Density of air at condenser inlet [kg/m3] + Real64 AirDensityDry; // Density of dry air at condenser inlet temperature [kg/m3] + Real64 ActualFanPower; // Fan power after adjustments for partially loaded condenser [W] + Real64 BPress; // Barometric pressure at condenser air inlet node [Pa] + Real64 CapFac; // Capacity Factor + Real64 Effectiveness; // for evap condenser, =capacity/max cap, where max cap is cap if Tairout equal Tcondense + Real64 EnthalpyAtTcond; // enthalpy of saturated air at Tcondense + Real64 EnthalpyAirIn; // Enthalpy of air entering condenser [J/kg] + Real64 EnthalpyAirOut; // Enthalpy of air leaving condenser [J/kg] + Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio + Real64 FanPowerRatio; // Calculated fan power ratio + Real64 HRCF(0.0); // Heat Rejection Capacity Factor (convention for evap condensers) + Real64 HRCFFullFlow; // Heat Rejection Capacity Factor at full air flow + Real64 HumRatIn; // Humidity ratio of inlet air to condenser [kg/kg] + Real64 HumRatOut; // Humidity ratio of outlet air from condenser (assumed saturated) [kg/kg] + Real64 OutWbTemp(0.0); // Outdoor wet bulb temp at condenser air inlet node [C] + Real64 OutDbTemp; // Outdoor dry bulb temp at condenser air inlet node [C] + Real64 PurgeRate; // Rate of water blow-down/bleed/purge in evap condenser (m3/s) + Real64 RatedFanPower; // local variable equal to input condenser value + Real64 RatedAirFlowRate; // local variable equal to input condenser value + Real64 SinkTemp; // Heat sink temperature used to derate fan power at reduced loads [C] + Real64 TCondCalc; // Calculated Condensing temperature Real64 TotalCondDefrostCreditLocal; // total cond credit from hot gas/brine defr for cases etc. served // directly by all systems served by this condenser [W] Real64 TotalCondDefCredfromSysID; // cond credit for single system [W] @@ -11278,7 +11352,7 @@ namespace RefrigeratedCase { TotalCondDefrostCreditLocal += TotalCondDefCredfromSysID; // total heat rejection load from a single detailed system [W] Real64 TotalLoadFromSysID = System(SystemID).TotalSystemLoad + System(SystemID).TotCompPower + System(SystemID).TotHiStageCompPower + - System(SystemID).PipeHeatLoad; + System(SystemID).PipeHeatLoad; TotalLoadFromSystems += TotalLoadFromSysID; if (SystemID == SysNum) TotalLoadFromThisSystem = TotalLoadFromSysID; } // Sysloop over every system connected to this condenser @@ -11342,7 +11416,8 @@ namespace RefrigeratedCase { this->TCondense = TCondCalc; } - } else if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) || (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap)) { + } else if ((condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeAir) || + (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeEvap)) { // Condensing Temp, fan and other aux loads for air-cooled or evap-cooled // The rated capacity of air-cooled condenser was adjusted for elevation in get input step @@ -11486,7 +11561,8 @@ namespace RefrigeratedCase { // Air leaving the evaporative condenser is saturated Real64 TAirOut = Psychrometrics::PsyTsatFnHPb(EnthalpyAirOut, BPress); HumRatOut = Psychrometrics::PsyWFnTdpPb(TAirOut, BPress); - TotalEvapWaterUseRate = PurgeRate + RatedAirFlowRate * AirVolRatio * AirDensityDry * (HumRatOut - HumRatIn) / Psychrometrics::RhoH2O(OutWbTemp); + TotalEvapWaterUseRate = + PurgeRate + RatedAirFlowRate * AirVolRatio * AirDensityDry * (HumRatOut - HumRatIn) / Psychrometrics::RhoH2O(OutWbTemp); // assumes evap water pump runs whenever evap cooling is available to minimize scaling TotalCondenserPumpPower = condenser.EvapPumpPower; // calculate basin water heater load @@ -11509,7 +11585,8 @@ namespace RefrigeratedCase { } // no load and cold outside } // EvapAvail - } else if (condenser.CondenserType == DataHeatBalance::RefrigCondenserTypeCascade) { // continuing Condenser type = water, (evap or air), or cascade + } else if (condenser.CondenserType == + DataHeatBalance::RefrigCondenserTypeCascade) { // continuing Condenser type = water, (evap or air), or cascade // Cascade condenser does not iterate. Condensing temperature specified as a load on higher temp system // or floats to meet other loads on that system // therese ** future - here and for new phase change heat exchanger - need to handle unmet loads! @@ -11554,7 +11631,8 @@ namespace RefrigeratedCase { // set water system demand request (if needed) if (condenser.EvapWaterSupplyMode == WaterSupplyFromTank) { - DataWater::WaterStorage(condenser.EvapWaterSupTankID).VdotRequestDemand(condenser.EvapWaterTankDemandARRID) = condenser.EvapWaterConsumpRate; + DataWater::WaterStorage(condenser.EvapWaterSupTankID).VdotRequestDemand(condenser.EvapWaterTankDemandARRID) = + condenser.EvapWaterConsumpRate; } } @@ -11594,15 +11672,15 @@ namespace RefrigeratedCase { static std::string const RoutineName("RefrigeratedCase:CalcGasCooler"); - int GasCoolerCreditWarnIndex; // Warning counter - Real64 ActualFanPower; // Fan power after adjustments for partially loaded gas cooler [W] - Real64 AirVolRatio; // Ratio of air volume needed to remove load relative to design load - Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio - Real64 FanPowerRatio; // Calculated fan power ratio - Real64 OutDbTemp; // Outdoor dry bulb temperature at gas cooler air inlet node [C] - Real64 RatedFanPower; // Rated fan power for this gas cooler [W] - Real64 TotalCondDefCredfromSysID; // Gas cooler defrost credit for single system [W] - Real64 TotalCondDefrostCreditLocal; // Total gas cooler credit from hot gas/brine defrost for cases etc. served + int GasCoolerCreditWarnIndex; // Warning counter + Real64 ActualFanPower; // Fan power after adjustments for partially loaded gas cooler [W] + Real64 AirVolRatio; // Ratio of air volume needed to remove load relative to design load + Real64 FanMinAirFlowRatio; // Minimum fan air flow ratio + Real64 FanPowerRatio; // Calculated fan power ratio + Real64 OutDbTemp; // Outdoor dry bulb temperature at gas cooler air inlet node [C] + Real64 RatedFanPower; // Rated fan power for this gas cooler [W] + Real64 TotalCondDefCredfromSysID; // Gas cooler defrost credit for single system [W] + Real64 TotalCondDefrostCreditLocal; // Total gas cooler credit from hot gas/brine defrost for cases etc. served // directly by all systems served by this gas cooler [W] Real64 TotalGasCoolerHeat; // Total gas cooler heat from system [W] Real64 TotalLoadFromSysID; // Total heat rejection load from a single detailed system [W] @@ -11667,11 +11745,8 @@ namespace RefrigeratedCase { if (GasCooler(GasCoolerID).PGasCoolerOut < 7.5e6) { // Ensure gas cooler pressure is at least 7.5 MPa for transcritical operation GasCooler(GasCoolerID).PGasCoolerOut = 7.5e6; } - GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, - GasCooler(GasCoolerID).TGasCoolerOut, - GasCooler(GasCoolerID).PGasCoolerOut, - this->RefIndex, - RoutineName); + GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSupHeatEnthalpyRefrig( + this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, GasCooler(GasCoolerID).PGasCoolerOut, this->RefIndex, RoutineName); GasCooler(GasCoolerID).TransOpFlag = true; } else { // Gas cooler in subcritical operation GasCooler(GasCoolerID).TGasCoolerOut = OutDbTemp + GasCooler(GasCoolerID).SubcriticalTempDiff; @@ -11681,15 +11756,15 @@ namespace RefrigeratedCase { this->RefrigerantName, GasCooler(GasCoolerID).PGasCoolerOut, this->RefIndex, RoutineName); } else if (GasCooler(GasCoolerID).TGasCoolerOut > GasCooler(GasCoolerID).MinCondTemp) { // Allow condensing temperature to float above the minimum - GasCooler(GasCoolerID).PGasCoolerOut = FluidProperties::GetSatPressureRefrig( - this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, this->RefIndex, RoutineName); + GasCooler(GasCoolerID).PGasCoolerOut = + FluidProperties::GetSatPressureRefrig(this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, this->RefIndex, RoutineName); } else { // Don't allow condensing temperature to drop below minimum GasCooler(GasCoolerID).TGasCoolerOut = GasCooler(GasCoolerID).MinCondTemp; - GasCooler(GasCoolerID).PGasCoolerOut = FluidProperties::GetSatPressureRefrig( - this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, this->RefIndex, RoutineName); + GasCooler(GasCoolerID).PGasCoolerOut = + FluidProperties::GetSatPressureRefrig(this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, this->RefIndex, RoutineName); } - GasCooler(GasCoolerID).HGasCoolerOut = FluidProperties::GetSatEnthalpyRefrig( - this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, this->RefIndex, RoutineName); + GasCooler(GasCoolerID).HGasCoolerOut = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, GasCooler(GasCoolerID).TGasCoolerOut, 0.0, this->RefIndex, RoutineName); GasCooler(GasCoolerID).TransOpFlag = false; } // (OutDbTemp > TransitionTemperature) @@ -11784,7 +11859,7 @@ namespace RefrigeratedCase { Real64 TempInRated(0.0); // Temperature entering compressor at rated superheat, C //Autodesk:Init Real64 TotalEnthalpyChangeActual; // Actual enthalpy change in cases and cold side of LSHX, J/kg Real64 TsatforPsuct; // Tsat for PSuction, C - Real64 TsatforPdisch(0.0); // Tsat for Pdischarge, c + Real64 TsatforPdisch(0.0); // Tsat for Pdischarge, c int NumComps; // Number of low-stage or high-stage compressors in system Real64 HHiStageCompIn; // Enthalpy at inlet of high-stage compressor (J/kg) Real64 HCaseInRated_base(0.0), HCompInRated_base(0.0); // Autodesk:Tuned Intermediate values for performance tuning @@ -11833,14 +11908,17 @@ namespace RefrigeratedCase { // Determine properties at case inlet and compressor inlet for (int StageIndex = 1; StageIndex <= min(2, this->NumStages); ++StageIndex) { - if (StageIndex == 1) { // Do single-stage or low-stage calculations + if (StageIndex == 1) { // Do single-stage or low-stage calculations if (this->NumStages == 1) { // Single-stage system - NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet + NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet TsatforPdisch = this->TCondense + DelTDischPipes; // need (Psat of (Tcond + delT corresponding to delP disch Pipes)) TsatforPsuct = this->TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) - HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeeded, 1.0, this->RefIndex, RoutineName); - this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + HsatVaporforTevapneeded = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeeded, 1.0, this->RefIndex, RoutineName); + this->HSatLiqCond = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = + FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); // HCaseIn is a function of the condenser rated subcooling, not the compressor rated subcooling // TCompIn needs to include case superheat as well as Temp change from lshx subcoolers // Calculate both here unless set previously by subcooler subroutine @@ -11852,8 +11930,7 @@ namespace RefrigeratedCase { this->TLiqInActual = this->TCondense - Condenser1.RatedSubcool; this->HCompIn = this->HCaseOut; } else { // subcooler subroutine has been called to calc TCompIn and HCaseIn - this->HCompIn = - this->HCaseOut + this->CpSatVapEvap * (this->TCompIn - (this->TEvapNeeded + CaseSuperheat)); + this->HCompIn = this->HCaseOut + this->CpSatVapEvap * (this->TCompIn - (this->TEvapNeeded + CaseSuperheat)); } // whether or not subcooler routine used PSuction = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsuct, this->RefIndex, RoutineName); NumComps = this->NumCompressors; @@ -11861,32 +11938,35 @@ namespace RefrigeratedCase { PCond = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, this->TCondense, this->RefIndex, RoutineName); PEvap = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, this->TEvapNeeded, this->RefIndex, RoutineName); this->PIntercooler = std::sqrt(PCond * PEvap); - this->TIntercooler = FluidProperties::GetSatTemperatureRefrig(this->RefrigerantName, this->PIntercooler, this->RefIndex, RoutineName); - NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet + this->TIntercooler = + FluidProperties::GetSatTemperatureRefrig(this->RefrigerantName, this->PIntercooler, this->RefIndex, RoutineName); + NeededCapacity = NeededCapacity_base; // because compressor capacity rated from txv to comp inlet TsatforPdisch = this->TIntercooler + DelTDischPipes; // need (Psat of (Tinter + delT corresponding to delP disch Pipes)) TsatforPsuct = this->TEvapNeeded - DelTSuctPipes; // need (Psat of (Tevap - delT corresponding to del P suct Pipes)) - HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeeded, 1.0, this->RefIndex, RoutineName); - this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + HsatVaporforTevapneeded = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeeded, 1.0, this->RefIndex, RoutineName); + this->HSatLiqCond = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = + FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); // HCaseIn is a function of the condenser rated subcooling, not the compressor rated subcooling // TCompIn needs to include case superheat as well as Temp change from lshx subcoolers // Calculate both here unless set previously by subcooler subroutine // HCaseOut corresponds to (tevapneeded + case superheat) if (this->NumSubcoolers == 0) { // No subcooler on this system if (this->IntercoolerType == 1) { // Flash Intercooler - this->HCaseIn = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); + this->HCaseIn = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); this->TLiqInActual = this->TIntercooler; } else if (this->IntercoolerType == 2) { // Shell-and-Coil Intercooler - this->TLiqInActual = - this->TCondense - Condenser1.RatedSubcool - - this->IntercoolerEffectiveness * (this->TCondense - Condenser1.RatedSubcool - this->TIntercooler); + this->TLiqInActual = this->TCondense - Condenser1.RatedSubcool - + this->IntercoolerEffectiveness * (this->TCondense - Condenser1.RatedSubcool - this->TIntercooler); this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - this->TLiqInActual); - } // IntercoolerType + } // IntercoolerType this->TCompIn = this->TEvapNeeded + CaseSuperheat; //+ this->HCompIn = this->HCaseOut; } else { // subcooler subroutine has been called to calc TCompIn and HCaseIn - this->HCompIn = - this->HCaseOut + this->CpSatVapEvap * (this->TCompIn - (this->TEvapNeeded + CaseSuperheat)); + this->HCompIn = this->HCaseOut + this->CpSatVapEvap * (this->TCompIn - (this->TEvapNeeded + CaseSuperheat)); } // whether or not subcooler routine used PSuction = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsuct, this->RefIndex, RoutineName); NumComps = this->NumCompressors; @@ -11895,10 +11975,13 @@ namespace RefrigeratedCase { NeededCapacity = NeededCapacity_base + this->TotCompPower; TsatforPdisch = this->TCondense + DelTDischPipes; TsatforPsuct = this->TIntercooler; - HsatVaporforTevapneeded = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); - // HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); + HsatVaporforTevapneeded = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); + // HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName + //); ////Autodesk:Tuned These don't change for 2nd stage - // CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, RoutineName ); + // CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(RefrigerantName, TCondense, 0.0, RefIndex, + //RoutineName ); ////Autodesk:Tuned These don't change for 2nd stage this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * Condenser1.RatedSubcool; this->TCompIn = this->TIntercooler; @@ -11910,16 +11993,18 @@ namespace RefrigeratedCase { // dispatch compressors to meet load, note they were listed in compressor list in dispatch order DensityActual = FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, - this->TCompIn, - PSuction, - this->RefIndex, - RoutineName); // Autodesk:Tuned Hoisted out of CompIndex loop - TotalEnthalpyChangeActual = this->HCompIn - this->HCaseIn; // Autodesk:Tuned Hoisted out of CompIndex loop - if (this->NumStages == 2) { // Autodesk:Tuned Hoisted out of CompIndex loop + this->TCompIn, + PSuction, + this->RefIndex, + RoutineName); // Autodesk:Tuned Hoisted out of CompIndex loop + TotalEnthalpyChangeActual = this->HCompIn - this->HCaseIn; // Autodesk:Tuned Hoisted out of CompIndex loop + if (this->NumStages == 2) { // Autodesk:Tuned Hoisted out of CompIndex loop if (StageIndex == 1) { - HCaseInRated_base = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); + HCaseInRated_base = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); } else if (StageIndex == 2) { - HCompInRated_base = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); + HCompInRated_base = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 1.0, this->RefIndex, RoutineName); } } for (int CompIndex = 1; CompIndex <= NumComps; ++CompIndex) { @@ -11943,7 +12028,7 @@ namespace RefrigeratedCase { HCaseInRated = this->HSatLiqCond - this->CpSatLiqCond * Compressor_CompID.RatedSubcool; } // NumStages } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" - if (this->NumStages == 1) { // Single-stage system + if (this->NumStages == 1) { // Single-stage system HCaseInRated = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - Compressor_CompID.RatedSubcool); } else if (this->NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side HCaseInRated = HCaseInRated_base - this->CpSatLiqCond * (this->TIntercooler - Compressor_CompID.RatedSubcool); @@ -11966,7 +12051,7 @@ namespace RefrigeratedCase { TempInRated = this->TIntercooler + Compressor_CompID.RatedSuperheat; } // NumStages } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" - if (this->NumStages == 1) { // Single-stage system + if (this->NumStages == 1) { // Single-stage system TempInRated = Compressor_CompID.RatedSuperheat; HCompInRated = HsatVaporforTevapneeded + this->CpSatVapEvap * (TempInRated - this->TEvapNeeded); } else if (this->NumStages == 2 && StageIndex == 1) { // Two-stage system, low-stage side @@ -11986,7 +12071,8 @@ namespace RefrigeratedCase { MassCorrection = DensityActual / DensityRated; CapacityCorrection = MassCorrection * TotalEnthalpyChangeActual / CaseEnthalpyChangeRated; Compressor_CompID.Power = CurveManager::CurveValue(Compressor_CompID.ElecPowerCurvePtr, TsatforPsuct, TsatforPdisch); - Compressor_CompID.Capacity = CapacityCorrection * CurveManager::CurveValue(Compressor_CompID.CapacityCurvePtr, TsatforPsuct, TsatforPdisch); + Compressor_CompID.Capacity = + CapacityCorrection * CurveManager::CurveValue(Compressor_CompID.CapacityCurvePtr, TsatforPsuct, TsatforPdisch); Compressor_CompID.MassFlow = Compressor_CompID.Capacity / TotalEnthalpyChangeActual; // calculate load factor for last compressor addded @@ -12122,7 +12208,7 @@ namespace RefrigeratedCase { Real64 DensityRatedLP; // Density of low pressure compressor inlet gas at rated superheat, m3/kg Real64 HCaseInRatedLT; // Enthalpy entering low temperature cases at rated subcooling, J/kg Real64 HCaseInRatedMT; // Enthalpy entering medium temperature cases at rated subcooling, J/kg - Real64 HCompInRatedHP(0.0); // Enthalpy entering high pressure compressor at rated superheat, J/kg + Real64 HCompInRatedHP(0.0); // Enthalpy entering high pressure compressor at rated superheat, J/kg Real64 HCompInRatedLP; // Enthalpy entering low pressure compressor at rated superheat, J/kg Real64 HGCOutlet; // Enthalpy at gas cooler outlet, J/kg Real64 HIdeal; // Ideal enthalpy at subcooler (for 100% effectiveness) @@ -12137,7 +12223,7 @@ namespace RefrigeratedCase { Real64 PSuctionLT; // Suction pressure in low temperature cases, Pa Real64 PSuctionMT; // Suction pressure in medium temperature cases, Pa Real64 PGCOutlet; // Gas cooler outlet pressure, Pa - Real64 QualityReceiver(0.0); // Refrigerant quality in the receiver + Real64 QualityReceiver(0.0); // Refrigerant quality in the receiver Real64 SubcoolEffect; // Heat exchanger effectiveness of the subcooler Real64 TempInRatedHP; // Temperature entering high pressure compressor at rated superheat, C Real64 TempInRatedLP; // Temperature entering low pressure compressor at rated superheat, C @@ -12151,7 +12237,7 @@ namespace RefrigeratedCase { Real64 TotalRefMassFlow; // Total mass flow through high pressure side of system, kg/s Real64 Xu; // Initial upper guess for iterative search Real64 Xl; // Initial lower guess for iterative search - Real64 Xnew(0.0); // New guess for iterative search + Real64 Xnew(0.0); // New guess for iterative search Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; @@ -12170,32 +12256,27 @@ namespace RefrigeratedCase { NeededCapacityMT = this->TotalSystemLoadMT + AccumLoadMT + this->PipeHeatLoadMT; // Determine refrigerant properties at receiver - this->CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig( - this->RefrigerantName, this->TReceiver, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqReceiver = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TReceiver, 0.0, this->RefIndex, RoutineName); // Enthalpy at the receiver bypass, J/kg - Real64 HReceiverBypass = - FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TReceiver, 1.0, this->RefIndex, RoutineName); + Real64 HReceiverBypass = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TReceiver, 1.0, this->RefIndex, RoutineName); // Determine refrigerant properties at low temperature (LT) loads (if present) // Dispatch low pressure (LP) compressors as necessary if (this->TransSysType == 2) { // LT side of TwoStage transcritical system this->HCaseInLT = this->HSatLiqReceiver; // TCompInLP and HCompInLP include case superheat plus effect of suction line heat gain - this->TCompInLP = - this->TEvapNeededLT + TransCaseSuperheat + - this->PipeHeatLoadLT / (this->CpSatVapEvapLT * this->RefMassFlowtoLTLoads); - this->HCompInLP = - this->HCaseOutLT + this->PipeHeatLoadLT / this->RefMassFlowtoLTLoads; + this->TCompInLP = this->TEvapNeededLT + TransCaseSuperheat + this->PipeHeatLoadLT / (this->CpSatVapEvapLT * this->RefMassFlowtoLTLoads); + this->HCompInLP = this->HCaseOutLT + this->PipeHeatLoadLT / this->RefMassFlowtoLTLoads; TsatforPsucLT = this->TEvapNeededLT; TsatforPdisLT = this->TEvapNeededMT; - HsatVaporforTevapneededLT = FluidProperties::GetSatEnthalpyRefrig( - this->RefrigerantName, this->TEvapNeededLT, 1.0, this->RefIndex, RoutineName); - HsatLiqforTevapNeededMT = FluidProperties::GetSatEnthalpyRefrig( - this->RefrigerantName, this->TEvapNeededMT, 0.0, this->RefIndex, RoutineName); + HsatVaporforTevapneededLT = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeededLT, 1.0, this->RefIndex, RoutineName); + HsatLiqforTevapNeededMT = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeededMT, 0.0, this->RefIndex, RoutineName); PSuctionLT = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsucLT, this->RefIndex, RoutineName); - DensityActualLT = FluidProperties::GetSupHeatDensityRefrig( - this->RefrigerantName, this->TCompInLP, PSuctionLT, this->RefIndex, RoutineName); + DensityActualLT = + FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, this->TCompInLP, PSuctionLT, this->RefIndex, RoutineName); TotalEnthalpyChangeActualLT = this->HCompInLP - this->HCaseInLT; // Dispatch low pressure (LP) compressors @@ -12233,17 +12314,14 @@ namespace RefrigeratedCase { TempInRatedLP = this->TEvapNeededLT + Compressor(CompID).RatedSuperheat; } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" TempInRatedLP = Compressor(CompID).RatedSuperheat; - HCompInRatedLP = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, - Compressor(CompID).RatedSuperheat, - PSuctionLT, - this->RefIndex, - RoutineName); + HCompInRatedLP = FluidProperties::GetSupHeatEnthalpyRefrig( + this->RefrigerantName, Compressor(CompID).RatedSuperheat, PSuctionLT, this->RefIndex, RoutineName); } } CaseEnthalpyChangeRatedLT = HCompInRatedLP - HCaseInRatedLT; - DensityRatedLP = FluidProperties::GetSupHeatDensityRefrig( - this->RefrigerantName, TempInRatedLP, PSuctionLT, this->RefIndex, RoutineName); + DensityRatedLP = + FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, TempInRatedLP, PSuctionLT, this->RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling @@ -12251,7 +12329,8 @@ namespace RefrigeratedCase { // Capacity at existing subcool/superheat over cap at rated conditions for LT loads Real64 CapacityCorrectionLT = MassCorrectionLT * TotalEnthalpyChangeActualLT / CaseEnthalpyChangeRatedLT; Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucLT, TsatforPdisLT); - Compressor(CompID).Capacity = CapacityCorrectionLT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucLT, TsatforPdisLT); + Compressor(CompID).Capacity = + CapacityCorrectionLT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucLT, TsatforPdisLT); Compressor(CompID).MassFlow = Compressor(CompID).Capacity / TotalEnthalpyChangeActualLT; Compressor(CompID).ElecConsumption = Compressor(CompID).Power * LocalTimeStep * DataGlobals::SecInHour; Compressor(CompID).CoolingEnergy = Compressor(CompID).Capacity * LocalTimeStep * DataGlobals::SecInHour; @@ -12274,8 +12353,7 @@ namespace RefrigeratedCase { this->TotCompPowerLP += Compressor(CompID).Power; } } // NumCompressorsLP - this->HCompOutLP = - this->HCompInLP + this->TotCompPowerLP / this->RefMassFlowCompsLP; + this->HCompOutLP = this->HCompInLP + this->TotCompPowerLP / this->RefMassFlowCompsLP; } // (TransSystem(SysNum)%TransSysType == 2) // Determine refrigerant properties at medium temperature (MT) loads @@ -12288,27 +12366,25 @@ namespace RefrigeratedCase { } PSuctionMT = FluidProperties::GetSatPressureRefrig(this->RefrigerantName, TsatforPsucMT, this->RefIndex, RoutineName); PGCOutlet = GasCooler(this->GasCoolerNum(1)).PGasCoolerOut; - HsatVaporforTevapneededMT = FluidProperties::GetSatEnthalpyRefrig( - this->RefrigerantName, this->TEvapNeededMT, 1.0, this->RefIndex, RoutineName); + HsatVaporforTevapneededMT = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TEvapNeededMT, 1.0, this->RefIndex, RoutineName); this->HCaseInMT = this->HSatLiqReceiver; // Enthalpy of refrigerant after leaving medium temperature loads and low pressure compressors // Combined enthalpy from the outlets of the LP compressor and MT loads, J/kg - Real64 HCaseOutLTMT = (this->RefMassFlowtoLTLoads * this->HCompOutLP + - this->RefMassFlowtoMTLoads * this->HCaseOutMT + this->PipeHeatLoadMT) / - (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads); + Real64 HCaseOutLTMT = (this->RefMassFlowtoLTLoads * this->HCompOutLP + this->RefMassFlowtoMTLoads * this->HCaseOutMT + this->PipeHeatLoadMT) / + (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads); // Total refrigerant flow rate is total flow from LT and MT loads divided by (1-x) where x is the quality of the // refrigerant entering the receiver. The receiver bypass flow rate is (x)*(Total Flow). // Iterate to find the quality of the refrigerant entering the receiver. Xu = 1.0; // upper bound on quality Xl = 0.0; // lower bound on quality - if ((GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis) > - this->HSatLiqReceiver) { + if ((GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis) > this->HSatLiqReceiver) { for (Iter = 1; Iter <= 15; ++Iter) { // Maximum of 15 iterations to find receiver quality QualityReceiver = (Xu + Xl) / 2.0; - Real64 Hnew = FluidProperties::GetSatEnthalpyRefrig( - this->RefrigerantName, this->TReceiver, QualityReceiver, this->RefIndex, RoutineName); + Real64 Hnew = + FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TReceiver, QualityReceiver, this->RefIndex, RoutineName); // estimated QualityReceiver is too high if (Hnew > (GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis)) { @@ -12316,9 +12392,7 @@ namespace RefrigeratedCase { } else { // estimated QualityReceiver is too low Xl = QualityReceiver; } - if (std::abs((Hnew - (GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis)) / Hnew) < - ErrorTol) - break; + if (std::abs((Hnew - (GasCooler(this->GasCoolerNum(1)).HGasCoolerOut + this->DelHSubcoolerDis)) / Hnew) < ErrorTol) break; } TotalRefMassFlow = (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads) / (1.0 - QualityReceiver); this->RefMassFlowReceiverBypass = QualityReceiver * TotalRefMassFlow; @@ -12328,8 +12402,7 @@ namespace RefrigeratedCase { } // %HGasCoolerOut > TransSystem(SysNum)%HSatLiqReceiver) this->HCompInHP = - (HCaseOutLTMT * (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads) + - HReceiverBypass * this->RefMassFlowReceiverBypass) / + (HCaseOutLTMT * (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads) + HReceiverBypass * this->RefMassFlowReceiverBypass) / (this->RefMassFlowtoLTLoads + this->RefMassFlowtoMTLoads + this->RefMassFlowReceiverBypass); // Iterate to find the suction temperature entering subcooler @@ -12348,11 +12421,8 @@ namespace RefrigeratedCase { TSubcoolerColdIn = Xnew; // Modify receiver inlet enthalpy and HP compressor inlet enthalpy to account for subcooler - HIdeal = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, - GasCooler(this->GasCoolerNum(1)).TGasCoolerOut, - PSuctionMT, - this->RefIndex, - RoutineName); + HIdeal = FluidProperties::GetSupHeatEnthalpyRefrig( + this->RefrigerantName, GasCooler(this->GasCoolerNum(1)).TGasCoolerOut, PSuctionMT, this->RefIndex, RoutineName); // Only use subcooler if suction gas inlet temperature less than gas cooler outlet temperature if (TSubcoolerColdIn < GasCooler(this->GasCoolerNum(1)).TGasCoolerOut) { SubcoolEffect = this->SCEffectiveness; @@ -12381,8 +12451,7 @@ namespace RefrigeratedCase { // For capacity correction of HP compressors, consider subcooler, receiver, MT loads, LT loads and LP compressors // to constitute the "load". The actual and rated conditions at the exit of the gas cooler and the inlet of the // HP compressors are used for capacity correction calculations. - DensityActualMT = FluidProperties::GetSupHeatDensityRefrig( - this->RefrigerantName, this->TCompInHP, PSuctionMT, this->RefIndex, RoutineName); + DensityActualMT = FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, this->TCompInHP, PSuctionMT, this->RefIndex, RoutineName); TotalEnthalpyChangeActualMT = this->HCompInHP - GasCooler(this->GasCoolerNum(1)).HGasCoolerOut; // Dispatch HP compressors @@ -12416,8 +12485,8 @@ namespace RefrigeratedCase { GasCooler(this->GasCoolerNum(1)).CpGasCoolerOut * Compressor(CompID).RatedSubcool; } else { // Transcritical operation HCaseInRatedMT = GasCooler(this->GasCoolerNum(1)).HGasCoolerOut; - } // (.NOT.GasCooler(SysNum)%TransOpFlag) - } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" + } // (.NOT.GasCooler(SysNum)%TransOpFlag) + } else if (SELECT_CASE_var == RatedLiquidTemperature) { // have rated liquid temperature stored in "RatedSubcool" if (!GasCooler(this->GasCoolerNum(1)).TransOpFlag) { // Subcritical operation HCaseInRatedMT = FluidProperties::GetSatEnthalpyRefrig( this->RefrigerantName, Compressor(CompID).RatedSubcool, 0.0, this->RefIndex, RoutineName); @@ -12433,17 +12502,13 @@ namespace RefrigeratedCase { TempInRatedHP = this->TEvapNeededMT + Compressor(CompID).RatedSuperheat; } else if (SELECT_CASE_var == RatedReturnGasTemperature) { // have rated compressor inlet temperature stored in "RatedSuperheat" TempInRatedHP = Compressor(CompID).RatedSuperheat; - HCompInRatedHP = FluidProperties::GetSupHeatEnthalpyRefrig(this->RefrigerantName, - Compressor(CompID).RatedSuperheat, - PSuctionMT, - this->RefIndex, - RoutineName); + HCompInRatedHP = FluidProperties::GetSupHeatEnthalpyRefrig( + this->RefrigerantName, Compressor(CompID).RatedSuperheat, PSuctionMT, this->RefIndex, RoutineName); } } CaseEnthalpyChangeRatedMT = HCompInRatedHP - HCaseInRatedMT; - DensityRatedHP = - FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, TempInRatedHP, PSuctionMT, this->RefIndex, RoutineName); + DensityRatedHP = FluidProperties::GetSupHeatDensityRefrig(this->RefrigerantName, TempInRatedHP, PSuctionMT, this->RefIndex, RoutineName); // Adjust capacity and mass flow to reflect the specific volume change due to superheating and // the increase in capacity due to extra subcooling MassCorrectionMT = DensityActualMT / DensityRatedHP; @@ -12451,10 +12516,12 @@ namespace RefrigeratedCase { if (GasCooler(this->GasCoolerNum(1)).TransOpFlag) { // System is operating in transcritical region Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).TransElecPowerCurvePtr, TsatforPsucMT, PGCOutlet); - Compressor(CompID).Capacity = CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).TransCapacityCurvePtr, TsatforPsucMT, HGCOutlet); + Compressor(CompID).Capacity = + CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).TransCapacityCurvePtr, TsatforPsucMT, HGCOutlet); } else { // System is operating in subcritical region Compressor(CompID).Power = CurveManager::CurveValue(Compressor(CompID).ElecPowerCurvePtr, TsatforPsucMT, TsatforPdisMT); - Compressor(CompID).Capacity = CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucMT, TsatforPdisMT); + Compressor(CompID).Capacity = + CapacityCorrectionMT * CurveManager::CurveValue(Compressor(CompID).CapacityCurvePtr, TsatforPsucMT, TsatforPdisMT); } // (GasCooler(SysNum)%TransOpFlag) // Mass flow through HP compressors is HP compressor refrigerating capacity divided by MT load, LT load and LP compressor power Compressor(CompID).MassFlow = @@ -12464,10 +12531,8 @@ namespace RefrigeratedCase { Compressor(CompID).LoadFactor = 1.0; // calculate load factor for last compressor added // assumes either cycling or part load eff = full load eff for last compressor - if ((this->TotCompCapacityHP + Compressor(CompID).Capacity) >= - (NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP)) { - LFLastComp = ((NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP) - this->TotCompCapacityHP) / - Compressor(CompID).Capacity; + if ((this->TotCompCapacityHP + Compressor(CompID).Capacity) >= (NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP)) { + LFLastComp = ((NeededCapacityMT + NeededCapacityLT + this->TotCompPowerLP) - this->TotCompCapacityHP) / Compressor(CompID).Capacity; Compressor(CompID).Power *= LFLastComp; Compressor(CompID).MassFlow *= LFLastComp; Compressor(CompID).Capacity *= LFLastComp; @@ -12489,12 +12554,9 @@ namespace RefrigeratedCase { this->HCompOutHP = this->HCompInHP + this->TotCompPowerHP / this->RefMassFlowCompsHP; this->RefMassFlowComps = this->RefMassFlowCompsLP + this->RefMassFlowCompsHP; this->TotCompCapacity = this->TotCompCapacityHP + this->TotCompCapacityLP; - this->AverageCompressorCOP = (this->TotCompCapacityHP - this->TotCompPowerLP) / - (this->TotCompPowerLP + this->TotCompPowerHP); - this->TotCompElecConsump = - (this->TotCompPowerLP + this->TotCompPowerHP) * LocalTimeStep * DataGlobals::SecInHour; - this->TotCompCoolingEnergy = - (this->TotCompCapacityLP + this->TotCompCapacityHP) * LocalTimeStep * DataGlobals::SecInHour; + this->AverageCompressorCOP = (this->TotCompCapacityHP - this->TotCompPowerLP) / (this->TotCompPowerLP + this->TotCompPowerHP); + this->TotCompElecConsump = (this->TotCompPowerLP + this->TotCompPowerHP) * LocalTimeStep * DataGlobals::SecInHour; + this->TotCompCoolingEnergy = (this->TotCompCapacityLP + this->TotCompCapacityHP) * LocalTimeStep * DataGlobals::SecInHour; } void RefrigSystemData::CalculateSubcoolers() @@ -12518,7 +12580,7 @@ namespace RefrigeratedCase { // ASHRAE 1006 Section 2: Refrigeration Accessories static std::string const RoutineName("CalculateSubcoolers"); - Real64 TLiqInActualLocal(0.0); // Liquid T in, after condenser, before any mechanical subcooler + Real64 TLiqInActualLocal(0.0); // Liquid T in, after condenser, before any mechanical subcooler Real64 LocalTimeStep = DataGlobals::TimeStepZone; if (UseSysTimeStep) LocalTimeStep = DataHVACGlobals::TimeStepSys; @@ -12526,31 +12588,23 @@ namespace RefrigeratedCase { // HCaseIn has to be recalculated as the starting point for the subcoolers here because // of the multiple number of iterations through this subroutine and because Tcondense is evolving. if (this->NumStages == 1) { // Single-stage compression system - this->HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->CpSatLiqCond = - FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->HCaseIn = - this->HSatLiqCond - this->CpSatLiqCond * Condenser(this->CondenserNum(1)).RatedSubcool; + this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * Condenser(this->CondenserNum(1)).RatedSubcool; // Two-stage compression with flash intercooler } else if (this->NumStages == 2 && this->IntercoolerType == 1) { - this->HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->CpSatLiqCond = - FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->HCaseIn = - FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); + this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->HCaseIn = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TIntercooler, 0.0, this->RefIndex, RoutineName); // Two-stage compression with shell-and-coil intercooler } else if (this->NumStages == 2 && this->IntercoolerType == 2) { - TLiqInActualLocal = this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - - this->IntercoolerEffectiveness * - (this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - this->TIntercooler); - this->HSatLiqCond = - FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); - this->CpSatLiqCond = - FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + TLiqInActualLocal = + this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - + this->IntercoolerEffectiveness * (this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - this->TIntercooler); + this->HSatLiqCond = FluidProperties::GetSatEnthalpyRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); + this->CpSatLiqCond = FluidProperties::GetSatSpecificHeatRefrig(this->RefrigerantName, this->TCondense, 0.0, this->RefIndex, RoutineName); this->HCaseIn = this->HSatLiqCond - this->CpSatLiqCond * (this->TCondense - TLiqInActualLocal); } // NumStages and IntercoolerType @@ -12572,9 +12626,9 @@ namespace RefrigeratedCase { // Two-stage compression with shell-and-coil intercooler } else if (this->NumStages == 2 && this->IntercoolerType == 2) { - TLiqInActualLocal = this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - - this->IntercoolerEffectiveness * - (this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - this->TIntercooler); + TLiqInActualLocal = + this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - + this->IntercoolerEffectiveness * (this->TCondense - Condenser(this->CondenserNum(1)).RatedSubcool - this->TIntercooler); } // NumStages and IntercoolerType { @@ -12618,7 +12672,7 @@ namespace RefrigeratedCase { int const SysType, bool &ErrorsFound, Optional_string_const ThisObjectType, - const Optional_bool_const& SuppressWarning) + const Optional_bool_const &SuppressWarning) { // SUBROUTINE INFORMATION: @@ -12686,70 +12740,87 @@ namespace RefrigeratedCase { static ObjexxFCL::gio::Fmt Format_101("(A)"); static ObjexxFCL::gio::Fmt Format_102("(4X,A)"); static ObjexxFCL::gio::Fmt Format_103("(2X,A)"); - static ObjexxFCL::gio::Fmt Format_104("('! ,Compressor Rack Name,',' # Refrigerated Cases Connected,# WalkIn Coolers " - "Connected, Heat Rejection Location, ','Condenser Type, COP')"); - static ObjexxFCL::gio::Fmt Format_105("('!',2x,',Refrigeration Case Number, Refrigeration Case Name,Zone Name,','Zone Node #,Zone " - "Node Name,Capacity (W/m),LHR,Temperature (C),Length (m),Fan (W/m),','Installed Lighting (W/m),Anti-Sweat " - "(W/m),Defrost (W/m)')"); + static ObjexxFCL::gio::Fmt Format_104( + "('! ,Compressor Rack Name,',' # Refrigerated Cases Connected,# WalkIn Coolers " + "Connected, Heat Rejection Location, ','Condenser Type, COP')"); + static ObjexxFCL::gio::Fmt Format_105( + "('!',2x,',Refrigeration Case Number, Refrigeration Case Name,Zone Name,','Zone Node #,Zone " + "Node Name,Capacity (W/m),LHR,Temperature (C),Length (m),Fan (W/m),','Installed Lighting (W/m),Anti-Sweat " + "(W/m),Defrost (W/m)')"); static ObjexxFCL::gio::Fmt Format_108("('!',2x,',Compressor Number,Compressor Name,Nominal Capacity (W)')"); static ObjexxFCL::gio::Fmt Format_109("('! <#Refrigeration Compressor Racks>,Number of Refrigeration Compressor Racks')"); static ObjexxFCL::gio::Fmt Format_114("(',',1X,F7.1)"); static ObjexxFCL::gio::Fmt Format_117("('! <#Detailed Refrigeration Systems>,Number of Detailed Refrigeration Systems')"); - static ObjexxFCL::gio::Fmt Format_118("('! ,Refrigeration System Name,Refrigerant Used',', # Refrigerated Cases " - "Connected, # WalkInCoolers Connected, #Air Chillers Connected',', # Secondary Loops Served, # Cascade Condensers " - "Served',', # Mechanical Subcoolers Served, # Compressors Connected',', # Compression Stages, Intercooler Type, " - "Intercooler Effectiveness',', # Subcoolers Connected, Minimum Condensing Temperature (C)')"); - static ObjexxFCL::gio::Fmt Format_119("('!',2x,', Walk In Number, Walk In Name,','Capacity (W),Temperature (C),Coil Fan " - "(W), Circulating Fan (W), ','Lighting (W),Heaters (W),Defrost (W), # Zones')"); - static ObjexxFCL::gio::Fmt Format_120("('! <#Detailed Transcritical Refrigeration Systems>,Number of Detailed Transcritical Refrigeration Systems')"); - static ObjexxFCL::gio::Fmt Format_121("('! ,Transcritical Refrigeration System Name,Refrigerant Used',', # " - "Medium Temperature Refrigerated Cases Connected, # Low Temperature Refrigerated Cases Connected',', # Medium " - "Temperature WalkInCoolers Connected, # Low Temperature WalkInCoolers Connected',', # High Pressure Compressors " - "Connected, # Low Pressure Compressors Connected',', Minimum Condensing Temperature (C)')"); + static ObjexxFCL::gio::Fmt Format_118( + "('! ,Refrigeration System Name,Refrigerant Used',', # Refrigerated Cases " + "Connected, # WalkInCoolers Connected, #Air Chillers Connected',', # Secondary Loops Served, # Cascade Condensers " + "Served',', # Mechanical Subcoolers Served, # Compressors Connected',', # Compression Stages, Intercooler Type, " + "Intercooler Effectiveness',', # Subcoolers Connected, Minimum Condensing Temperature (C)')"); + static ObjexxFCL::gio::Fmt Format_119( + "('!',2x,', Walk In Number, Walk In Name,','Capacity (W),Temperature (C),Coil Fan " + "(W), Circulating Fan (W), ','Lighting (W),Heaters (W),Defrost (W), # Zones')"); + static ObjexxFCL::gio::Fmt Format_120( + "('! <#Detailed Transcritical Refrigeration Systems>,Number of Detailed Transcritical Refrigeration Systems')"); + static ObjexxFCL::gio::Fmt Format_121( + "('! ,Transcritical Refrigeration System Name,Refrigerant Used',', # " + "Medium Temperature Refrigerated Cases Connected, # Low Temperature Refrigerated Cases Connected',', # Medium " + "Temperature WalkInCoolers Connected, # Low Temperature WalkInCoolers Connected',', # High Pressure Compressors " + "Connected, # Low Pressure Compressors Connected',', Minimum Condensing Temperature (C)')"); static ObjexxFCL::gio::Fmt Format_123("('!',2x,', Secondary System Served Name, Secondary Number')"); - static ObjexxFCL::gio::Fmt Format_126("('!',2x,', Subcooler Number, Subcooler Name, ','Name of System Providing " - "Cooling, Design Outlet Temperature (C)')"); - static ObjexxFCL::gio::Fmt Format_127("('!',2x,', Subcooler Number, Subcooler Name, ','Design Subcooling " - "(DeltaC),','Design liquid inlet temperature (C), Design vapor inlet temperature (C)')"); + static ObjexxFCL::gio::Fmt Format_126( + "('!',2x,', Subcooler Number, Subcooler Name, ','Name of System Providing " + "Cooling, Design Outlet Temperature (C)')"); + static ObjexxFCL::gio::Fmt Format_127( + "('!',2x,', Subcooler Number, Subcooler Name, ','Design Subcooling " + "(DeltaC),','Design liquid inlet temperature (C), Design vapor inlet temperature (C)')"); static ObjexxFCL::gio::Fmt Format_128("('!',2x,', System Name Connected, Condenser Number, Condenser Name')"); - static ObjexxFCL::gio::Fmt Format_129("('!',2x,',Condenser Number,Condenser Name,Rated Condensing Temperature " - "(C),','Rated Capacity (W), Rated Fan Power (W)')"); - static ObjexxFCL::gio::Fmt Format_130("('!',2x,',Condenser Number,Condenser Name,Rated Condensing Temperature " - "(C),','Rated Capacity (W), Rated Water Inlet Temperature (C), Rated Water Flow Rate (m3/s)')"); + static ObjexxFCL::gio::Fmt Format_129( + "('!',2x,',Condenser Number,Condenser Name,Rated Condensing Temperature " + "(C),','Rated Capacity (W), Rated Fan Power (W)')"); + static ObjexxFCL::gio::Fmt Format_130( + "('!',2x,',Condenser Number,Condenser Name,Rated Condensing Temperature " + "(C),','Rated Capacity (W), Rated Water Inlet Temperature (C), Rated Water Flow Rate (m3/s)')"); static ObjexxFCL::gio::Fmt Format_131( "('!',2x,',Condenser Number,Condenser Name,','Rated Capacity (W), Rated Fan Power (W)')"); - static ObjexxFCL::gio::Fmt Format_132("('!',2x,', Condenser Number, Condenser Name,',' Condensing Temperature Control " - "Type, Rated Condensing Temperature (C),',' Capacity (W), Approach Temperature Difference (DeltaC)')"); - static ObjexxFCL::gio::Fmt Format_133("('! , Secondary Number, Secondary Name,',' # Refrigerated " - "Cases Connected, # WalkIn Coolers Connected,',' Fluid Name, Capacity (W),Evap Temperature in Secondary " - "Evaporator (C),',' Approach Temperature Difference (DeltaC), Temperature Range (DeltaC), TotalPumpPower (W)')"); - static ObjexxFCL::gio::Fmt Format_134("('!',6x,', ZoneName,',' Wall/Ceiling Area (m2), UValue (W/m2-C), AreaStockDoors " - "(m2), HeightStockDoors,',' UValueStockDoors (W/m2-C), AreaGlassDoors (m2), HeightGlassDoors (m), ',' " - "UValueGlassDoors (W/m2-C)')"); + static ObjexxFCL::gio::Fmt Format_132( + "('!',2x,', Condenser Number, Condenser Name,',' Condensing Temperature Control " + "Type, Rated Condensing Temperature (C),',' Capacity (W), Approach Temperature Difference (DeltaC)')"); + static ObjexxFCL::gio::Fmt Format_133( + "('! , Secondary Number, Secondary Name,',' # Refrigerated " + "Cases Connected, # WalkIn Coolers Connected,',' Fluid Name, Capacity (W),Evap Temperature in Secondary " + "Evaporator (C),',' Approach Temperature Difference (DeltaC), Temperature Range (DeltaC), TotalPumpPower (W)')"); + static ObjexxFCL::gio::Fmt Format_134( + "('!',6x,', ZoneName,',' Wall/Ceiling Area (m2), UValue (W/m2-C), AreaStockDoors " + "(m2), HeightStockDoors,',' UValueStockDoors (W/m2-C), AreaGlassDoors (m2), HeightGlassDoors (m), ',' " + "UValueGlassDoors (W/m2-C)')"); static ObjexxFCL::gio::Fmt Format_141("('!',2x,', Subcooler Number, Subcooler Name')"); static ObjexxFCL::gio::Fmt Format_142("('! <#Secondary Refrigeration Systems>,Number of Secondary Refrigeration Systems')"); - static ObjexxFCL::gio::Fmt Format_146("('! , Secondary Number, Secondary Name,',' # Refrigerated Cases " - "Connected, # WalkIn Coolers Connected, #Air Coils Connected',' Fluid Name, Capacity (W),Evap Temperature in " - "Secondary Evaporator (C),',' Approach Temperature Difference (DeltaC), Circulating Rate, TotalPumpPower (W)')"); + static ObjexxFCL::gio::Fmt Format_146( + "('! , Secondary Number, Secondary Name,',' # Refrigerated Cases " + "Connected, # WalkIn Coolers Connected, #Air Coils Connected',' Fluid Name, Capacity (W),Evap Temperature in " + "Secondary Evaporator (C),',' Approach Temperature Difference (DeltaC), Circulating Rate, TotalPumpPower (W)')"); static ObjexxFCL::gio::Fmt Format_148("('! <#ZoneHVAC/Refrigeration Air Chiller Sets>,Number of ZoneHVAC/Refrigeration Air Chiller Sets')"); - static ObjexxFCL::gio::Fmt Format_149("('! ,Chiller Set Name,',' # Air Chillers Connected, Zone Location')"); - static ObjexxFCL::gio::Fmt Format_151("('!',2x,',Refrigeration Chiller Number, Refrigeration Chiller Name,Zone Name,','Zone " - "Node #,Zone Node Name,Sensible Capacity (W/C),Sensible Capacity (W),Evaporating Temperature (C),DT1 (C),','Fan " - "Power (W),Heater (W),Defrost (W), Air Flow Rate (m3/s)')"); + static ObjexxFCL::gio::Fmt Format_149( + "('! ,Chiller Set Name,',' # Air Chillers Connected, Zone Location')"); + static ObjexxFCL::gio::Fmt Format_151( + "('!',2x,',Refrigeration Chiller Number, Refrigeration Chiller Name,Zone Name,','Zone " + "Node #,Zone Node Name,Sensible Capacity (W/C),Sensible Capacity (W),Evaporating Temperature (C),DT1 (C),','Fan " + "Power (W),Heater (W),Defrost (W), Air Flow Rate (m3/s)')"); static ObjexxFCL::gio::Fmt Format_152("('!',2x,', Air Chiller Name, Air Chiller Number, Zone Name,')"); - static ObjexxFCL::gio::Fmt Format_160("('!',2x,',Gas Cooler Number, Gas Cooler Name, Rated Outlet Pressure " - "(Pa),','Rated Outlet Temperature (C), Rated Approach Temperature (C), Rated Capacity (W), Rated Fan Power (W)')"); + static ObjexxFCL::gio::Fmt Format_160( + "('!',2x,',Gas Cooler Number, Gas Cooler Name, Rated Outlet Pressure " + "(Pa),','Rated Outlet Temperature (C), Rated Approach Temperature (C), Rated Capacity (W), Rated Fan Power (W)')"); // write all headers applicable to this simulation if (DataHeatBalance::NumRefrigeratedRacks > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_109); // Intro to refrigeration case racks ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_104); // Refrigeration Rack header - } //(NumRefrigeratedRacks > 0) + } //(NumRefrigeratedRacks > 0) if (DataHeatBalance::NumRefrigSystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_117); // Intro to detailed systems ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_118); // Detailed system header ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) - } //(NumRefrigSystems > 0) + } //(NumRefrigSystems > 0) if (NumSimulationSecondarySystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_142); // Intro to Secondary systems int CountSecPhase = 0; @@ -12760,64 +12831,66 @@ namespace RefrigeratedCase { ++CountSecBrine; } if ((Secondary(SecondaryID).FluidType == SecFluidTypePhaseChange) && (CountSecPhase == 0)) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_146); // Secondary system header for liquid overfeed/phase change systems + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, + Format_146); // Secondary system header for liquid overfeed/phase change systems ++CountSecPhase; } } ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_123); // Secondary system load header - } //(NumSimulationSecondarySystems > 0) + } //(NumSimulationSecondarySystems > 0) if (DataHeatBalance::NumRefrigChillerSets > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_148); // Intro to Chiller set ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_149); // Chiller set header ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_151); // Intro to Air Chiller ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_152); // Air chiller header - } //(NumRefrigSystems > 0) + } //(NumRefrigSystems > 0) if (NumSimulationCases > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_105); // Case header - } //(NumSimulationCases > 0) + } //(NumSimulationCases > 0) if (NumSimulationWalkIns > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_119); // Walk-in header ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_134); // Walk-in zone-specific header - } //(NumSimulationWalkIns > 0) + } //(NumSimulationWalkIns > 0) if (NumSimulationCondAir > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_129); // Condenser, Air-Cooled header - } //(NumSimulationCondAir > 0) + } //(NumSimulationCondAir > 0) if (NumSimulationCondEvap > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_131); // Condenser, Evaporative-Cooled header - } //(NumSimulationCondEvap > 0) + } //(NumSimulationCondEvap > 0) if (NumSimulationCondWater > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_130); // Condenser, Water-Cooled header - } //(NumSimulationCondWater > 0) + } //(NumSimulationCondWater > 0) if (NumSimulationCascadeCondensers > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_132); // Condenser, Cascade header ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_128); // Cascade Load header - } //(NumSimulationCascadeCondensers > 0) + } //(NumSimulationCascadeCondensers > 0) if (NumSimulationMechSubcoolers > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_141); // Mech subcooler loads served header ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_126); // Mechanical Subcooler header - } //(NumSimulationMechSubcoolers > 0) + } //(NumSimulationMechSubcoolers > 0) if ((NumSimulationSubcoolers - NumSimulationMechSubcoolers) > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_127); // LSHX Subcooler header - } //((NumSimulationSubcoolers - NumSimulationMechSubcoolers) > 0) + } //((NumSimulationSubcoolers - NumSimulationMechSubcoolers) > 0) if (NumTransRefrigSystems > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_120); // Intro to detailed transcriticial refrigeration system ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_121); // Detailed system header if (NumSimulationCases > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_105); // Case header - } //(NumSimulationCases > 0) + } //(NumSimulationCases > 0) if (NumSimulationWalkIns > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_119); // Walk-in header ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_134); // Walk-in zone-specific header - } //(NumSimulationWalkIns > 0) + } //(NumSimulationWalkIns > 0) ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_108); // Compressor header (Always have compressor if have detailed system) if (NumSimulationGasCooler > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_160); // Gas Cooler, Air-Cooled header - } //(NumSimulationGasCooler > 0) - } //(NumTransRefrigSystems > 0) + } //(NumSimulationGasCooler > 0) + } //(NumTransRefrigSystems > 0) if (DataHeatBalance::NumRefrigeratedRacks > 0) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Refrigeration Compressor Racks, " + General::RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) + << "#Refrigeration Compressor Racks, " + General::RoundSigDigits(DataHeatBalance::NumRefrigeratedRacks); for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).HeatRejectionLocation == LocationOutdoors) { ChrOut = "Outdoors"; @@ -12834,21 +12907,25 @@ namespace RefrigeratedCase { ChrOut2 = "Water-Cooled"; } } - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Refrigeration Compressor Rack," + RefrigRack(RackNum).Name + ',' + - General::RoundSigDigits(RefrigRack(RackNum).NumCases) + ',' + - General::RoundSigDigits(RefrigRack(RackNum).NumWalkIns) + ',' + ChrOut + ',' + ChrOut2 + ',' + - General::RoundSigDigits(RefrigRack(RackNum).RatedCOP, 3); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) + << " Refrigeration Compressor Rack," + RefrigRack(RackNum).Name + ',' + General::RoundSigDigits(RefrigRack(RackNum).NumCases) + + ',' + General::RoundSigDigits(RefrigRack(RackNum).NumWalkIns) + ',' + ChrOut + ',' + ChrOut2 + ',' + + General::RoundSigDigits(RefrigRack(RackNum).RatedCOP, 3); for (int CaseNum = 1; CaseNum <= RefrigRack(RackNum).NumCases; ++CaseNum) { int CaseID = RefrigRack(RackNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); // Installed lighting power, may not be rated power + << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); // Installed lighting power, may not be rated power } } // numcases @@ -12856,94 +12933,115 @@ namespace RefrigeratedCase { int WalkInID = RefrigRack(RackNum).WalkInNum(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Walk In Cooler, " + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).ElecFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).ElecFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) + << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // zones for walk ins on rack } // walk ins on rack for (int CoilNum = 1; CoilNum <= RefrigRack(RackNum).NumCoils; ++CoilNum) { int CoilID = RefrigRack(RackNum).CoilNum(CoilNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + + General::RoundSigDigits(CoilID) + ',' + + WarehouseCoil(CoilID).ZoneName; } // numairchillers } // numracks } //(NumRefrigeratedRacks > 0) if (DataHeatBalance::NumRefrigSystems > 0) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Detailed Refrigeration Systems," + General::RoundSigDigits(DataHeatBalance::NumRefrigSystems); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) + << "#Detailed Refrigeration Systems," + General::RoundSigDigits(DataHeatBalance::NumRefrigSystems); for (int SystemNum = 1; SystemNum <= DataHeatBalance::NumRefrigSystems; ++SystemNum) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Detailed Refrigeration System," + System(SystemNum).Name + ',' + System(SystemNum).RefrigerantName + ',' + General::RoundSigDigits(System(SystemNum).NumCases) + ',' + General::RoundSigDigits(System(SystemNum).NumWalkIns) + ',' + - General::RoundSigDigits(System(SystemNum).NumCoils) + ',' + General::RoundSigDigits(System(SystemNum).NumSecondarys) + ',' + - General::RoundSigDigits(System(SystemNum).NumCascadeLoads) + ',' + General::RoundSigDigits(System(SystemNum).NumMechSCServed) + ',' + + General::RoundSigDigits(System(SystemNum).NumCoils) + ',' + General::RoundSigDigits(System(SystemNum).NumSecondarys) + + ',' + General::RoundSigDigits(System(SystemNum).NumCascadeLoads) + ',' + + General::RoundSigDigits(System(SystemNum).NumMechSCServed) + ',' + General::RoundSigDigits(System(SystemNum).NumCompressors + System(SystemNum).NumHiStageCompressors) + ',' + - General::RoundSigDigits(System(SystemNum).NumStages) + ',' + General::RoundSigDigits(System(SystemNum).IntercoolerType) + ',' + - General::RoundSigDigits(System(SystemNum).IntercoolerEffectiveness, 2) + ',' + General::RoundSigDigits(System(SystemNum).NumSubcoolers) + - ',' + General::RoundSigDigits(System(SystemNum).TCondenseMin, 1); + General::RoundSigDigits(System(SystemNum).NumStages) + ',' + General::RoundSigDigits(System(SystemNum).IntercoolerType) + + ',' + General::RoundSigDigits(System(SystemNum).IntercoolerEffectiveness, 2) + ',' + + General::RoundSigDigits(System(SystemNum).NumSubcoolers) + ',' + + General::RoundSigDigits(System(SystemNum).TCondenseMin, 1); for (int CaseNum = 1; CaseNum <= System(SystemNum).NumCases; ++CaseNum) { int CaseID = System(SystemNum).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + << " Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCases on system for (int WalkInNum = 1; WalkInNum <= System(SystemNum).NumWalkIns; ++WalkInNum) { int WalkInID = System(SystemNum).WalkInNum(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) + << " Walk-In Surfaces Facing Zone, " + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkIns on system for (int CoilNum = 1; CoilNum <= System(SystemNum).NumCoils; ++CoilNum) { int CoilID = System(SystemNum).CoilNum(CoilNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + + General::RoundSigDigits(CoilID) + ',' + + WarehouseCoil(CoilID).ZoneName; } // numairchillers for (int CascadeLoadNum = 1; CascadeLoadNum <= System(SystemNum).NumCascadeLoads; ++CascadeLoadNum) { int CascadeLoadID = System(SystemNum).CascadeLoadNum(CascadeLoadNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Cascade Load," + System(Condenser(CascadeLoadID).CascadeSysID).Name + ',' + - General::RoundSigDigits(CascadeLoadID) + ',' + Condenser(CascadeLoadID).Name; + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Cascade Load," + System(Condenser(CascadeLoadID).CascadeSysID).Name + ',' + General::RoundSigDigits(CascadeLoadID) + + ',' + Condenser(CascadeLoadID).Name; } // cascade load on detailed system for (int SecondaryNum = 1; SecondaryNum <= System(SystemNum).NumSecondarys; ++SecondaryNum) { int SecondaryID = System(SystemNum).SecondaryNum(SecondaryNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Secondary Load," + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(SecondaryID); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Secondary Load," + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(SecondaryID); } // secondary load on detailed system for (int SubcoolerNum = 1; SubcoolerNum <= NumSimulationSubcoolers; ++SubcoolerNum) { @@ -12955,21 +13053,24 @@ namespace RefrigeratedCase { if (System(SystemNum).NumStages == 1) { // Single-stage compression system for (int CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { int CompID = System(SystemNum).CompressorNum(CompressorNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors } else if (System(SystemNum).NumStages == 2) { // Two-stage compression system // Low-stage compressors for (int CompressorNum = 1; CompressorNum <= System(SystemNum).NumCompressors; ++CompressorNum) { int CompID = System(SystemNum).CompressorNum(CompressorNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Low-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Refrigeration Low-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressors // High-stage compressors for (int CompressorNum = 1; CompressorNum <= System(SystemNum).NumHiStageCompressors; ++CompressorNum) { int CompID = System(SystemNum).HiStageCompressorNum(CompressorNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration High-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Refrigeration High-Stage Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumHiStageCompressors } // NumStages @@ -12979,17 +13080,21 @@ namespace RefrigeratedCase { if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeAir) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Air-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + - General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + - ',' + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeEvap) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Evaporative-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + - General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).RatedFanPower, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeWater) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Condenser:Water-Cooled," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + - General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + - ',' + General::RoundSigDigits(Condenser(CondID).InletTemp, 1) + ',' + General::RoundSigDigits(Condenser(CondID).DesVolFlowRate, 1); + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).InletTemp, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).DesVolFlowRate, 1); } else if (SELECT_CASE_var == DataHeatBalance::RefrigCondenserTypeCascade) { { @@ -13001,9 +13106,10 @@ namespace RefrigeratedCase { } } // cascade temperature control ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Refrigeration Condenser:Cascade," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + ChrOut + ',' + - General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + - ',' + General::RoundSigDigits(Condenser(CondID).RatedApproachT, 1); + << " Refrigeration Condenser:Cascade," + General::RoundSigDigits(CondID) + ',' + Condenser(CondID).Name + ',' + ChrOut + + ',' + General::RoundSigDigits(Condenser(CondID).RatedTCondense, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).RatedCapacity, 1) + ',' + + General::RoundSigDigits(Condenser(CondID).RatedApproachT, 1); } } // condenser type @@ -13012,15 +13118,16 @@ namespace RefrigeratedCase { { auto const SELECT_CASE_var(Subcooler(SubcoolerID).SubcoolerType); if (SELECT_CASE_var == LiquidSuction) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Liquid Suction Subcooler," + General::RoundSigDigits(SubcoolerID) + - ',' + Subcooler(SubcoolerID).Name + ',' + - General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignDelT, 1) + ',' + - General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTliqIn, 1) + ',' + - General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTvapIn, 1); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Refrigeration Liquid Suction Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + + Subcooler(SubcoolerID).Name + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignDelT, 1) + + ',' + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTliqIn, 1) + ',' + + General::RoundSigDigits(Subcooler(SubcoolerID).LiqSuctDesignTvapIn, 1); } else if (SELECT_CASE_var == Mechanical) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Mechanical Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + - Subcooler(SubcoolerID).Name + ',' + Subcooler(SubcoolerID).MechSourceSys + - ',' + General::RoundSigDigits(Subcooler(SubcoolerID).MechControlTliqOut, 1); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Refrigeration Mechanical Subcooler," + General::RoundSigDigits(SubcoolerID) + ',' + Subcooler(SubcoolerID).Name + + ',' + Subcooler(SubcoolerID).MechSourceSys + ',' + + General::RoundSigDigits(Subcooler(SubcoolerID).MechControlTliqOut, 1); } } } // NumSubcoolers @@ -13029,13 +13136,15 @@ namespace RefrigeratedCase { } //(NumRefrigSystems > 0) if (NumTransRefrigSystems > 0) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Detailed Transcritical Refrigeration Systems," + General::RoundSigDigits(NumTransRefrigSystems); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) + << "#Detailed Transcritical Refrigeration Systems," + General::RoundSigDigits(NumTransRefrigSystems); for (int TransSystemNum = 1; TransSystemNum <= NumTransRefrigSystems; ++TransSystemNum) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << " Detailed Transcritical Refrigeration System," + TransSystem(TransSystemNum).Name + ',' + TransSystem(TransSystemNum).RefrigerantName + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesMT) + ',' + - General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesLT) + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsMT) + - ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsLT) + ',' + + General::RoundSigDigits(TransSystem(TransSystemNum).NumCasesLT) + ',' + + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsMT) + ',' + + General::RoundSigDigits(TransSystem(TransSystemNum).NumWalkInsLT) + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsHP) + ',' + General::RoundSigDigits(TransSystem(TransSystemNum).NumCompressorsLP) + ',' + General::RoundSigDigits(GasCooler(TransSystem(TransSystemNum).GasCoolerNum(1)).MinCondTemp, 1); @@ -13046,11 +13155,15 @@ namespace RefrigeratedCase { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Medium Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + - DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCasesMT on system for (int CaseNum = 1; CaseNum <= TransSystem(TransSystemNum).NumCasesLT; ++CaseNum) { @@ -13059,71 +13172,88 @@ namespace RefrigeratedCase { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Temperature Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + - DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCasesLT on system for (int WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsMT; ++WalkInNum) { int WalkInID = TransSystem(TransSystemNum).WalkInNumMT(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Medium Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); + << " Medium Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + + ',' + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) + << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkInsMT on system for (int WalkInNum = 1; WalkInNum <= TransSystem(TransSystemNum).NumWalkInsLT; ++WalkInNum) { int WalkInID = TransSystem(TransSystemNum).WalkInNumLT(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Temperature Refrigeration Walk In Cooler," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).NumZones); + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).NumZones); for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) + << " Walk-In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // Num zones for each walk in on system } // NumWalkInsLT on system for (int CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsHP; ++CompressorNum) { int CompID = TransSystem(TransSystemNum).CompressorNumHP(CompressorNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " High Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " High Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsHP for (int CompressorNum = 1; CompressorNum <= TransSystem(TransSystemNum).NumCompressorsLP; ++CompressorNum) { int CompID = TransSystem(TransSystemNum).CompressorNumLP(CompressorNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Low Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + - Compressor(CompID).Name + ',' + General::RoundSigDigits(Compressor(CompID).NomCap, 0); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) + << " Low Pressure Refrigeration Compressor," + General::RoundSigDigits(CompID) + ',' + Compressor(CompID).Name + ',' + + General::RoundSigDigits(Compressor(CompID).NomCap, 0); } // NumCompressorsLP if (TransSystem(TransSystemNum).NumGasCoolers >= 1) { int GasCoolerID = TransSystem(TransSystemNum).GasCoolerNum(1); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration GasCooler:Air-Cooled," + General::RoundSigDigits(GasCoolerID) + ',' + GasCooler(GasCoolerID).Name + ',' + - General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletP, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletT, 1) + - ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedApproachT, 1) + ',' + + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletP, 1) + ',' + + General::RoundSigDigits(GasCooler(GasCoolerID).RatedOutletT, 1) + ',' + + General::RoundSigDigits(GasCooler(GasCoolerID).RatedApproachT, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedCapacity, 1) + ',' + General::RoundSigDigits(GasCooler(GasCoolerID).RatedFanPower, 1); } // System(SystemNum)%NumGasCoolers >= 1 @@ -13132,7 +13262,8 @@ namespace RefrigeratedCase { } //(NumTransRefrigSystems > 0) if (NumSimulationSecondarySystems > 0) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#Secondary Refrigeration Systems," + General::RoundSigDigits(NumSimulationSecondarySystems); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) + << "#Secondary Refrigeration Systems," + General::RoundSigDigits(NumSimulationSecondarySystems); for (int SecondaryID = 1; SecondaryID <= NumSimulationSecondarySystems; ++SecondaryID) { { auto const SELECT_CASE_var(Secondary(SecondaryID).FluidType); @@ -13148,9 +13279,10 @@ namespace RefrigeratedCase { General::RoundSigDigits(Secondary(SecondaryID).PumpTotRatedPower, 3); } else if (SELECT_CASE_var == SecFluidTypePhaseChange) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) - << "Secondary Refrigeration System: Liquid Overfeed," + General::RoundSigDigits(SecondaryID) + ',' + Secondary(SecondaryID).Name + - ',' + General::RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + - ',' + Secondary(SecondaryID).FluidName + ',' + General::RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + + << "Secondary Refrigeration System: Liquid Overfeed," + General::RoundSigDigits(SecondaryID) + ',' + + Secondary(SecondaryID).Name + ',' + General::RoundSigDigits(Secondary(SecondaryID).NumCases) + ',' + + General::RoundSigDigits(Secondary(SecondaryID).NumWalkIns) + ',' + Secondary(SecondaryID).FluidName + ',' + + General::RoundSigDigits(Secondary(SecondaryID).CoolingLoadRated, 1) + ',' + General::RoundSigDigits(Secondary(SecondaryID).TEvapDesign, 2) + ',' + General::RoundSigDigits(Secondary(SecondaryID).TApproachDifRated, 2) + ',' + General::RoundSigDigits(Secondary(SecondaryID).CircRate, 3) + ',' + @@ -13161,13 +13293,17 @@ namespace RefrigeratedCase { int CaseID = Secondary(SecondaryID).CaseNum(CaseNum); if (RefrigCase(CaseID).ZoneNodeNum > 0) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << "Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + RefrigCase(CaseID).ZoneName + - ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + - General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + - ',' + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); + << "Refrigeration Case," + General::RoundSigDigits(CaseID) + ',' + RefrigCase(CaseID).Name + ',' + + RefrigCase(CaseID).ZoneName + ',' + General::RoundSigDigits(RefrigCase(CaseID).ZoneNodeNum) + ',' + + DataLoopNode::NodeID(RefrigCase(CaseID).ZoneNodeNum) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RateTotCapPerLength, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).RatedLHR, 2) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Temperature, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).Length, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).OperatingFanPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).LightingPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).AntiSweatPower, 1) + ',' + + General::RoundSigDigits(RefrigCase(CaseID).DefrostPower, 1); } } // NumCases on secondary on secondary system @@ -13175,49 +13311,57 @@ namespace RefrigeratedCase { int WalkInID = Secondary(SecondaryID).WalkInNum(WalkInNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << "Walk In," + General::RoundSigDigits(WalkInID) + ',' + WalkIn(WalkInID).Name + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignRatedCap, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).Temperature, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CoilFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).CircFanPower, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).DesignLighting, 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeaterPower, 1) + ',' + General::RoundSigDigits(WalkIn(WalkInID).DefrostCapacity, 1); for (int ZoneID = 1; ZoneID <= WalkIn(WalkInID).NumZones; ++ZoneID) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) << "Walk In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + - General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_102) + << "Walk In Surfaces Facing Zone," + WalkIn(WalkInID).ZoneName(ZoneID) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).SurfaceArea(ZoneID), 1) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValue(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightStockDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueStockDr(ZoneID), 4) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).AreaGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).HeightGlassDr(ZoneID), 2) + ',' + + General::RoundSigDigits(WalkIn(WalkInID).UValueGlassDr(ZoneID), 4); } // zones for walk ins on secondary } // walk ins on secondary for (int CoilNum = 1; CoilNum <= Secondary(SecondaryID).NumCoils; ++CoilNum) { int CoilID = Secondary(SecondaryID).CoilNum(CoilNum); - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) - << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).ZoneName; + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Air Chiller Load," + WarehouseCoil(CoilID).Name + ',' + + General::RoundSigDigits(CoilID) + ',' + + WarehouseCoil(CoilID).ZoneName; } // numairchillers } // secondary } // numsimulationsecondarys if (DataHeatBalance::NumRefrigChillerSets > 0) { - ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) << "#ZoneHVAC/Refrigeration Air Chiller Sets," + General::RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); + ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) + << "#ZoneHVAC/Refrigeration Air Chiller Sets," + General::RoundSigDigits(DataHeatBalance::NumRefrigChillerSets); for (int ChillerSetNum = 1; ChillerSetNum <= DataHeatBalance::NumRefrigChillerSets; ++ChillerSetNum) { ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_101) - << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + General::RoundSigDigits(ChillerSetNum) + ',' + - General::RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; + << "ZoneHVAC/Refrigeration Air Chiller Set," + AirChillerSet(ChillerSetNum).Name + ',' + General::RoundSigDigits(ChillerSetNum) + + ',' + General::RoundSigDigits(AirChillerSet(ChillerSetNum).NumCoils) + ',' + AirChillerSet(ChillerSetNum).ZoneName; for (int CoilNum = 1; CoilNum <= AirChillerSet(ChillerSetNum).NumCoils; ++CoilNum) { int CoilID = AirChillerSet(ChillerSetNum).CoilNum(CoilNum); ObjexxFCL::gio::write(DataGlobals::OutputFileInits, Format_103) << " Refrigeration Air Chiller," + General::RoundSigDigits(CoilID) + ',' + WarehouseCoil(CoilID).Name + ',' + WarehouseCoil(CoilID).ZoneName + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + - DataLoopNode::NodeID(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).UnitLoadFactorSens, 1) + ',' + + DataLoopNode::NodeID(WarehouseCoil(CoilID).ZoneNodeNum) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).UnitLoadFactorSens, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).RatedSensibleCap, 2) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).TEvapDesign, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).RatedTemperatureDif, 1) + ',' + - General::RoundSigDigits(WarehouseCoil(CoilID).RatedFanPower, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).HeaterPower, 1) + - ',' + General::RoundSigDigits(WarehouseCoil(CoilID).DefrostCapacity, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).RatedFanPower, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).HeaterPower, 1) + ',' + + General::RoundSigDigits(WarehouseCoil(CoilID).DefrostCapacity, 1) + ',' + General::RoundSigDigits(WarehouseCoil(CoilID).RatedAirVolumeFlow, 1); } // numairchillers } // DataHeatBalance::NumRefrigChillerSets @@ -13261,11 +13405,11 @@ namespace RefrigeratedCase { Real64 const DefaultWalkInDoorOpenFactor(0.05); // walk in door open factor (fraction time open) static std::string const RoutineName("CalculateWalkIn"); - Real64 CapApplied(0.0); // Walk In total capacity at specific operating conditions - Real64 DefrostSchedule(0.0); // WalkIn defrost schedule, between 0 and 1 - Real64 DefrostEnergyNeeded(0.0); // Energy needed to melt all ice, used with temperature termination (J) - Real64 DensityFactorFm(0.0); // called Fm in ASHRAE 2010 eq 13 page 24.5 for door infiltration - Real64 DensitySqRtFactor(0.0); // from ASHRAE 2010 eq 12 page 24.4 for door infiltration + Real64 CapApplied(0.0); // Walk In total capacity at specific operating conditions + Real64 DefrostSchedule(0.0); // WalkIn defrost schedule, between 0 and 1 + Real64 DefrostEnergyNeeded(0.0); // Energy needed to melt all ice, used with temperature termination (J) + Real64 DensityFactorFm(0.0); // called Fm in ASHRAE 2010 eq 13 page 24.5 for door infiltration + Real64 DensitySqRtFactor(0.0); // from ASHRAE 2010 eq 12 page 24.4 for door infiltration // Current value of WalkIn operating (availability) schedule Real64 WalkInSchedule = ScheduleManager::GetCurrentScheduleValue(this->SchedPtr); @@ -13277,7 +13421,7 @@ namespace RefrigeratedCase { DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); // next four values optional, so set to default before checking for schedule - Real64 StockingLoad(0.0); // Total load due to stocking WalkIn product (W) + Real64 StockingLoad(0.0); // Total load due to stocking WalkIn product (W) Real64 LightingSchedule = 1.0; Real64 HeaterSchedule = 1.0; Real64 CircFanSchedule = 1.0; @@ -13300,9 +13444,9 @@ namespace RefrigeratedCase { // CALCULATE ALL LOADS INFLUENCED BY ZONE TEMPERATURE AND RH // set to zero before summing over zones - Real64 SensibleLoadTotal(0.0); // Total sensible load on WalkIn over all zones (W) - Real64 LatentLoadTotal(0.0); // total latent load on WalkIn over all zones (W) - Real64 ZoneLatentLoad(0.0); // Latent WalkIn credit delivered to zone (W) + Real64 SensibleLoadTotal(0.0); // Total sensible load on WalkIn over all zones (W) + Real64 LatentLoadTotal(0.0); // total latent load on WalkIn over all zones (W) + Real64 ZoneLatentLoad(0.0); // Latent WalkIn credit delivered to zone (W) this->SensZoneCreditRate = 0.0; this->SensZoneCreditCoolRate = 0.0; @@ -13316,22 +13460,23 @@ namespace RefrigeratedCase { int zoneNum = this->ZoneNum(ZoneID); int zoneNodeNum = this->ZoneNodeNum(ZoneID); Real64 ZoneDryBulb = DataLoopNode::Node(zoneNodeNum).Temp; // Dry Bulb Temperature of adjacent zone - Real64 WalkInLatLoad = -ZoneLatentLoad; // Walk in cooler latent load facing particular zone (W) - Real64 DelTemp = ZoneDryBulb - TWalkIn; // Difference between zone and walk in temperatures (C) + Real64 WalkInLatLoad = -ZoneLatentLoad; // Walk in cooler latent load facing particular zone (W) + Real64 DelTemp = ZoneDryBulb - TWalkIn; // Difference between zone and walk in temperatures (C) Real64 StockDoorArea = this->AreaStockDr(ZoneID); - Real64 GlassDoorArea = this->AreaGlassDr(ZoneID); // facing a particular zone (m2) + Real64 GlassDoorArea = this->AreaGlassDr(ZoneID); // facing a particular zone (m2) Real64 UAOtherSurfaces = this->SurfaceArea(ZoneID) * this->UValue(ZoneID); // UA for non-door surfaces facing a certain zone (W/C) - Real64 ZInfilSensLoad(0.0); // Sensible load due to infiltration in one zone - Real64 ZdoorSensLoad(0.0); // Sensible load due to UA delta T through closed door in one zone + Real64 ZInfilSensLoad(0.0); // Sensible load due to infiltration in one zone + Real64 ZdoorSensLoad(0.0); // Sensible load due to UA delta T through closed door in one zone // Derate compared to fully developed flow through 100% open door - Real64 DoorFlowFactor = 0.8; // see ASHRAE Refrigeration, p13.5, 2006 + Real64 DoorFlowFactor = 0.8; // see ASHRAE Refrigeration, p13.5, 2006 if (DelTemp <= 11.0) DoorFlowFactor = 1.1; // from ASHRAE Refrigeration Loads // Get infiltration loads if either type of door is present in this zone if (StockDoorArea > 0.0 || GlassDoorArea > 0.0) { // Zone relative humidity fraction (decimal) - Real64 ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb(DataLoopNode::Node(zoneNodeNum).Temp, DataLoopNode::Node(zoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); + Real64 ZoneRHFrac = Psychrometrics::PsyRhFnTdbWPb( + DataLoopNode::Node(zoneNodeNum).Temp, DataLoopNode::Node(zoneNodeNum).HumRat, DataEnvironment::OutBaroPress, RoutineName); // Enthalpy of the air in a particular zone (J/kg) Real64 EnthalpyZoneAir = Psychrometrics::PsyHFnTdbRhPb(ZoneDryBulb, ZoneRHFrac, DataEnvironment::OutBaroPress, RoutineName); Real64 HumRatioZoneAir = Psychrometrics::PsyWFnTdbH(ZoneDryBulb, EnthalpyZoneAir, RoutineName); @@ -13349,10 +13494,10 @@ namespace RefrigeratedCase { Real64 StockDoorInfLoad = 0.0; // infiltration through stock doors in a particular zone (W) Real64 StockDoorSensHeat = 0.0; // sensible heat gain through stock doors (UA*delta T) (W) - Real64 DoorProtectEff(0.0); // Door protection effectiveness - Real64 DrHeight(0.0); // Door height (m) - Real64 DrArea(0.0); // Door area (m2) - Real64 FullFlowInfLoad(0.0); // Total load (lat + sens) due to 100% open doors w/ fully developed flow (W) + Real64 DoorProtectEff(0.0); // Door protection effectiveness + Real64 DrHeight(0.0); // Door height (m) + Real64 DrArea(0.0); // Door area (m2) + Real64 FullFlowInfLoad(0.0); // Total load (lat + sens) due to 100% open doors w/ fully developed flow (W) if (StockDoorArea > 0.0) { { @@ -13379,8 +13524,8 @@ namespace RefrigeratedCase { StockDoorSensHeat = DrArea * this->UValueStockDr(ZoneID) * DelTemp; } // have stock doors - Real64 GlassDoorSensHeat(0.0); // sensible heat gain through glass reach-in doors (UA*delta T) (W) - Real64 GlassDoorInfLoad = 0.0; // infiltration through glass reach-in doors in a particular zone (W) + Real64 GlassDoorSensHeat(0.0); // sensible heat gain through glass reach-in doors (UA*delta T) (W) + Real64 GlassDoorInfLoad = 0.0; // infiltration through glass reach-in doors in a particular zone (W) if (GlassDoorArea > 0.0) { DoorProtectEff = 0.5; // Assume glass doors have air curtain @@ -13400,8 +13545,10 @@ namespace RefrigeratedCase { // assume mass dry air infiltrating into walk-in == mass out into zone, // that is, equal air exchange (ASHRAE 2006 Refrigeration) Real64 ZoneInfilLoad = -StockDoorInfLoad - GlassDoorInfLoad; // Walk in cooler infiltration load (sens + latent) in certain zone (W) - Real64 MassDryAirRate = -ZoneInfilLoad / (EnthalpyZoneAir - EnthalpyAirWalkIn); // Mass dry air infiltrating into/out-of walkin through doors (kg/s) - Real64 WaterRemovRate = MassDryAirRate * (HumRatioZoneAir - HumRatioAirWalkIn); // Walk in cooler removes water at this rate in this zone (kg/s) + Real64 MassDryAirRate = + -ZoneInfilLoad / (EnthalpyZoneAir - EnthalpyAirWalkIn); // Mass dry air infiltrating into/out-of walkin through doors (kg/s) + Real64 WaterRemovRate = + MassDryAirRate * (HumRatioZoneAir - HumRatioAirWalkIn); // Walk in cooler removes water at this rate in this zone (kg/s) // Just as with cases, we assume no latent credit (water removal = 0) to zone or load on cooler during dripdown // To be consistent with the treatment of refrigerated cases, latent load // and latent credit are bothbased on reducing the infiltrating vapor to ice. (This is @@ -13424,7 +13571,7 @@ namespace RefrigeratedCase { // Sensible WalkIn credit delivered to a particular zone (W) Real64 ZoneSensLoad = ZInfilSensLoad + ZdoorSensLoad - UAOtherSurfaces * DelTemp; - Real64 WalkInSensLoad = -ZoneSensLoad; // Walk in cooler sensible load facing particular zone (W) + Real64 WalkInSensLoad = -ZoneSensLoad; // Walk in cooler sensible load facing particular zone (W) // Update globals for use in ZoneTemperaturePredictorCorrector (Air Heat Balance) and // Zone Equipment Manager. Sum walk-in credits to zone using existing 'casecredit' variable @@ -13465,7 +13612,7 @@ namespace RefrigeratedCase { // Total fan energy rate (W) Real64 FanLoad = this->CircFanPower * CircFanSchedule + this->CoilFanPower * (1.0 - DefrostDripDownSchedule); - Real64 HeaterLoad = this->HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) + Real64 HeaterLoad = this->HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) // Calculate floor load - using 'DataEnvironment::GroundTemp' assigned in weather manager (can be entered by user if desired) // Default value is 18C. // Total floor energy rate (W) @@ -13474,10 +13621,9 @@ namespace RefrigeratedCase { Real64 DefrostLoad; // DEFROST CALCULATIONS - if ((DefrostSchedule > 0.0) && (this->DefrostType != WalkInDefrostNone) && - (this->DefrostType != WalkInDefrostOffCycle)) { - DefrostLoad = this->DefrostCapacity * DefrostSchedule; // W - Real64 StartFrostKg = this->KgFrost; // frost load at start of time step (kg of ice) + if ((DefrostSchedule > 0.0) && (this->DefrostType != WalkInDefrostNone) && (this->DefrostType != WalkInDefrostOffCycle)) { + DefrostLoad = this->DefrostCapacity * DefrostSchedule; // W + Real64 StartFrostKg = this->KgFrost; // frost load at start of time step (kg of ice) Real64 DefrostEnergy = DefrostLoad * DataGlobals::TimeStepZoneSec; // Joules if (this->DefrostControlType == DefrostContTempTerm) { // Need to turn defrost system off early if controlled by temperature and all ice melted @@ -13490,7 +13636,7 @@ namespace RefrigeratedCase { Real64 IceSensHeatNeeded = 0.0; // Energy to raise frost temperature to 0C, used w/ temp termination (J) if (StartFrostKg > 0.0) { if (this->IceTemp < 0.0) { - Real64 StartIceTemp = this->IceTemp; // Frost temperature at start of time step [C] + Real64 StartIceTemp = this->IceTemp; // Frost temperature at start of time step [C] IceSensHeatNeeded = StartFrostKg * SpecificHeatIce * (0.0 - StartIceTemp); // Joules if (AvailDefrostEnergy >= IceSensHeatNeeded) { this->IceTemp = 0.0; @@ -13510,11 +13656,12 @@ namespace RefrigeratedCase { // see Aug 8 page 3 notes this->KgFrost = 0.0; DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / - this->DefEnergyFraction; // Joules - energy needed including E unavail to melt ice + this->DefEnergyFraction; // Joules - energy needed including E unavail to melt ice DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (this->DefrostCapacity * DataGlobals::TimeStepZoneSec))); // reduce load on walkin by energy put into ice melting - DefrostLoad = - max(0.0, (DefrostSchedule * this->DefrostCapacity - (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DataGlobals::TimeStepZoneSec)); + DefrostLoad = max(0.0, + (DefrostSchedule * this->DefrostCapacity - + (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / DataGlobals::TimeStepZoneSec)); this->IceTemp = this->TEvapDesign; } // frost melted during time step less than amount of ice at start @@ -13552,7 +13699,7 @@ namespace RefrigeratedCase { //*** See if capacity meets load and manage accumulated stored energy *********************************** SensibleLoadTotal += LightLoad + HeaterLoad + FanLoad + StockingLoad + DefrostLoad + FloorLoad; - Real64 LoadTotal = SensibleLoadTotal + LatentLoadTotal; // total load in time step (W) + Real64 LoadTotal = SensibleLoadTotal + LatentLoadTotal; // total load in time step (W) // Account for difference between load and capacity. Assume rack or system able to provide // rated capacity. If it can't, that unmet energy will be stored and discharged at the system level. @@ -13568,11 +13715,12 @@ namespace RefrigeratedCase { Real64 StoredEnergyRate = this->StoredEnergy / DataGlobals::TimeStepZone / DataGlobals::SecInHour; Real64 LoadRequested = LoadTotal + StoredEnergyRate; // Load necessary to meet current and all stored energy needs (W) - Real64 LatentCapApplied; // Walk In latent capacity at specific operating conditions + Real64 LatentCapApplied; // Walk In latent capacity at specific operating conditions Real64 SensibleCapApplied(0.0); // Walk In sensible capacity at specific operating conditions // prorate available cooling capacity for portion of time off due to drip down. - Real64 MaxCap = this->DesignRatedCap * (1.0 - DefrostDripDownSchedule); // Design chilling capacity reduced according to drip-down schedule (W) + Real64 MaxCap = + this->DesignRatedCap * (1.0 - DefrostDripDownSchedule); // Design chilling capacity reduced according to drip-down schedule (W) if (MaxCap >= LoadRequested) { // Have more at least as much capacity available as needed, even counting stored energy @@ -13613,7 +13761,8 @@ namespace RefrigeratedCase { if (this->ShowUnmetWIEnergyWarning) { ShowWarningError("Refrigeration:WalkIn: " + this->Name); ShowContinueError(" This walk-in cooler has insufficient capacity to meet the loads"); - ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + General::CreateSysTimeIntervalString()); + ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + + General::CreateSysTimeIntervalString()); ShowContinueError(" Refer to documentation for further explanation of Total Cooling Capacity."); this->ShowUnmetWIEnergyWarning = false; } // ShowStoreEnergyWarning @@ -13624,7 +13773,8 @@ namespace RefrigeratedCase { ShowWarningError("Refrigeration:WalkIn: " + this->Name); ShowContinueError(" This walkin cooler has insufficient defrost capacity to remove the excess frost accumulation."); ShowContinueError(" Check the defrost schedule or defrost capacity. "); - ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + General::CreateSysTimeIntervalString()); + ShowContinueError("... Occurrence info = " + DataEnvironment::EnvironmentName + ", " + DataEnvironment::CurMnDy + ' ' + + General::CreateSysTimeIntervalString()); this->ShowWIFrostWarning = false; } } @@ -13659,17 +13809,17 @@ namespace RefrigeratedCase { Real64 const ErrorTol(0.001); // Iterative solution tolerance - bool AtPartLoad; // Whether or not need to iterate on pump power - bool DeRate; // If true, need to derate aircoils because don't carry over unmet energy - int Iter; // loop counter - Real64 CpBrine; // Specific heat (W/kg) - Real64 DensityBrine; // Density (kg/m3) - Real64 DiffTemp; // (C) - Real64 distPipeHeatGain; // Optional (W) - Real64 Error; // Used in iterative soln for pumps needed to meet load (that has to include pump energy) - Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) - Real64 PartLdFrac; // Used to ratio pump power - Real64 PartPumpFrac; // Used to see if part pumps dispatched meets part pump load + bool AtPartLoad; // Whether or not need to iterate on pump power + bool DeRate; // If true, need to derate aircoils because don't carry over unmet energy + int Iter; // loop counter + Real64 CpBrine; // Specific heat (W/kg) + Real64 DensityBrine; // Density (kg/m3) + Real64 DiffTemp; // (C) + Real64 distPipeHeatGain; // Optional (W) + Real64 Error; // Used in iterative soln for pumps needed to meet load (that has to include pump energy) + Real64 FlowVolNeeded; // Flow rate needed to meet load (m3/s) + Real64 PartLdFrac; // Used to ratio pump power + Real64 PartPumpFrac; // Used to see if part pumps dispatched meets part pump load Real64 PrevTotalLoad; // Used in pump energy convergence test Real64 RefrigerationLoad; // Load for cases and walk-ins served by loop, does not include pump energy (W) Real64 StoredEnergyRate; // Used to meet loads unmet in previous time step (related to defrost cycles @@ -13678,7 +13828,7 @@ namespace RefrigeratedCase { Real64 TotalHotDefrostCondCredit; // Used to credit condenser when heat reclaim used for hot gas/brine defrost (W) Real64 TotalPumpPower; // Total Pumping power for loop, W Real64 TotalLoad; // Total Cooling Load on secondary loop, W - Real64 TPipesReceiver(0.0); // Temperature used for contents of pipes and/or receiver in calculating shell losses (C) + Real64 TPipesReceiver(0.0); // Temperature used for contents of pipes and/or receiver in calculating shell losses (C) Real64 VarFrac; // Pump power fraction for variable speed pump, dimensionless Real64 VolFlowRate; // Used in dispatching pumps to meet load (m3/s) @@ -13810,8 +13960,8 @@ namespace RefrigeratedCase { if (this->PumpControlType == SecPumpControlConstant) { VolFlowRate = 0.0; TotalPumpPower = 0.0; - for (int PumpID = 1; PumpID <= this->NumPumps; ++PumpID) { // dispatch pumps to meet needed flow rate - if (this->FluidType == SecFluidTypeAlwaysLiquid) { //>>>>>>>>>>>>>>>>>>>>> + for (int PumpID = 1; PumpID <= this->NumPumps; ++PumpID) { // dispatch pumps to meet needed flow rate + if (this->FluidType == SecFluidTypeAlwaysLiquid) { //>>>>>>>>>>>>>>>>>>>>> VolFlowRate += this->PumpIncrementFlowVol; TotalPumpPower += this->PumpIncrementPower; if (VolFlowRate >= FlowVolNeeded) break; @@ -13939,7 +14089,8 @@ namespace RefrigeratedCase { // Can arrive here when load call to refrigeration looks for cases/walkin systems and usetimestep is .FALSE. if ((!UseSysTimeStep) && ((NumSimulationCases > 0) || (NumSimulationWalkIns > 0))) { for (int ZoneNum = 1; ZoneNum <= DataGlobals::NumOfZones; ++ZoneNum) { - CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).SenCaseCreditToZoneEnergy = + DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; // Latent always negative CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).LatCaseCreditToZone; CaseWIZoneReport(ZoneNum).LatCoolingToZoneEnergy = CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate * DataGlobals::TimeStepZoneSec; @@ -13947,14 +14098,16 @@ namespace RefrigeratedCase { // always report positive value if (DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone <= 0.0) { CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; - CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = + -DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; CaseWIZoneReport(ZoneNum).HeatingToZoneRate = 0.0; CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = 0.0; } else { CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate = 0.0; CaseWIZoneReport(ZoneNum).SenCoolingToZoneEnergy = 0.0; CaseWIZoneReport(ZoneNum).HeatingToZoneRate = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone; - CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; + CaseWIZoneReport(ZoneNum).HeatingToZoneEnergy = + DataHeatBalance::RefrigCaseCredit(ZoneNum).SenCaseCreditToZone * DataGlobals::TimeStepZoneSec; } CaseWIZoneReport(ZoneNum).TotCoolingToZoneRate = CaseWIZoneReport(ZoneNum).SenCoolingToZoneRate + CaseWIZoneReport(ZoneNum).LatCoolingToZoneRate; @@ -14033,8 +14186,8 @@ namespace RefrigeratedCase { } else { // airchllersetpointer passed in call to subroutine not ==0 ChillerSetID = AirChillerSetPtr; if (ChillerSetID > DataHeatBalance::NumRefrigChillerSets || ChillerSetID < 1) { - ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + General::TrimSigDigits(ChillerSetID) + - ", Number of Units=" + General::TrimSigDigits(DataHeatBalance::NumRefrigChillerSets) + ", Entered Unit name=" + AirChillerSetName); + ShowFatalError("SimAirChillerSet: Invalid AirChillerSetPtr passed=" + General::TrimSigDigits(ChillerSetID) + ", Number of Units=" + + General::TrimSigDigits(DataHeatBalance::NumRefrigChillerSets) + ", Entered Unit name=" + AirChillerSetName); } // ChillerSetID makes no sense if (CheckChillerSetName(ChillerSetID)) { if (AirChillerSetName != AirChillerSet(ChillerSetID).Name) { @@ -14233,7 +14386,8 @@ namespace RefrigeratedCase { if (CoilSchedule <= 0.0) return; Real64 DefrostSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostSchedPtr); // Coil defrost schedule, between 0 and 1 - Real64 DefrostDripDownSchedule = ScheduleManager::GetCurrentScheduleValue(this->DefrostDripDownSchedPtr); // Coil drip-down schedule (allows coil to drain after defrost) + Real64 DefrostDripDownSchedule = + ScheduleManager::GetCurrentScheduleValue(this->DefrostDripDownSchedPtr); // Coil drip-down schedule (allows coil to drain after defrost) // next statement In case user doesn't understand concept of drip down schedule DefrostDripDownSchedule = max(DefrostDripDownSchedule, DefrostSchedule); // next value optional, so set to default before checking for schedule @@ -14242,50 +14396,57 @@ namespace RefrigeratedCase { // Set local subroutine variables for convenience int FanSpeedControlType = this->FanType; - Real64 AirVolumeFlowRated = this->RatedAirVolumeFlow; // Coil rated air flow (m3/s) - Real64 FanPowerRated = this->RatedFanPower; // (W) + Real64 AirVolumeFlowRated = this->RatedAirVolumeFlow; // Coil rated air flow (m3/s) + Real64 FanPowerRated = this->RatedFanPower; // (W) Real64 HeaterLoad = this->HeaterPower * HeaterSchedule; // Total heater (except defrost) energy rate (W) - Real64 DefrostCap = this->DefrostCapacity; // Design defrost capacity of Coil (W) - Real64 TEvap = this->TEvapDesign; // Evaporating temperature in the coil (C) - - Real64 CoilCapTotEstimate(0.0); // Part of loop to solve for total coil capacity as a function of inlet air conditions (W) - Real64 AirVolumeFlowMax(0.0); // Coil air flow limited by drip down schedule (m3/s) - Real64 CoilCapTotal(0.0); // Sensible plus latent load (W) - Real64 CoilInletDensity(0.0); // Coil air inlet density (kg/m3) - Real64 CoilInletDryAirCp(0.0); // Dry air specific heat at coil inlet temperature (J/kg-C) - Real64 CoilInletHumRatio(0.0); // Coil air inlet humidity ratio (kg water/kg air) - Real64 CoilInletTemp(0.0); // Inlet temperature of air to coil, not mixed zone temperature unless "middle" location selected (C) - Real64 CoilInletEnthalpy(0.0); // Coil inlet air enthalpy (J/kg) - Real64 CoilInletRHFrac(0.0); // Coil inlet air relative humidity expressed as a fraction (0 to 1) + Real64 DefrostCap = this->DefrostCapacity; // Design defrost capacity of Coil (W) + Real64 TEvap = this->TEvapDesign; // Evaporating temperature in the coil (C) + + Real64 CoilCapTotEstimate(0.0); // Part of loop to solve for total coil capacity as a function of inlet air conditions (W) + Real64 AirVolumeFlowMax(0.0); // Coil air flow limited by drip down schedule (m3/s) + Real64 CoilCapTotal(0.0); // Sensible plus latent load (W) + Real64 CoilInletDensity(0.0); // Coil air inlet density (kg/m3) + Real64 CoilInletDryAirCp(0.0); // Dry air specific heat at coil inlet temperature (J/kg-C) + Real64 CoilInletHumRatio(0.0); // Coil air inlet humidity ratio (kg water/kg air) + Real64 CoilInletTemp(0.0); // Inlet temperature of air to coil, not mixed zone temperature unless "middle" location selected (C) + Real64 CoilInletEnthalpy(0.0); // Coil inlet air enthalpy (J/kg) + Real64 CoilInletRHFrac(0.0); // Coil inlet air relative humidity expressed as a fraction (0 to 1) Real64 DefrostLoad(0.0); - Real64 DryAirMassFlowMax(0.0); // Rated volume flow rate times dry air density adjusted for schedules (kg/s) - Real64 FanPowerActual(0.0); // (W) - Real64 FrostChangekg(0.0); // Amount of frost added or melted (kg) - Real64 latLoadServed(0.0); // Energy rate used to remove water from zone air (W) + Real64 DryAirMassFlowMax(0.0); // Rated volume flow rate times dry air density adjusted for schedules (kg/s) + Real64 FanPowerActual(0.0); // (W) + Real64 FrostChangekg(0.0); // Amount of frost added or melted (kg) + Real64 latLoadServed(0.0); // Energy rate used to remove water from zone air (W) Real64 SensLoadRequestedGross(0.0); // Gross sensible load removed by coil Real64 SensLoadGross(0.0); // Sensible load met by coil (W) Real64 SHR(0.0); // Sensible heat ratio, sensible load/total load Real64 SHRCorrection(0.0); // Actual total/sensible load, NOT = Inverse SHR (unless coil efficiency = 1.0) - Real64 WaterRemovRate(0.0); // Walk in cooler removes water at this rate in this zone (kg/s) + Real64 WaterRemovRate(0.0); // Walk in cooler removes water at this rate in this zone (kg/s) if (DefrostDripDownSchedule == 1.0) { AirVolumeFlowMax = 0.0; DryAirMassFlowMax = 0.0; - } else { // DefrostDripDownSchedule < 1.0d0, cooling will occur at least part of the time step + } else { // DefrostDripDownSchedule < 1.0d0, cooling will occur at least part of the time step // Sensible load requested by zone balance (W) - Real64 SensLoadRequested = -QZnReq; // here let cooling demand be positive within subroutine - if (SensLoadRequested <= 0.0) { // No load so assume control keeps off, except that scheduled defrost still occurs + Real64 SensLoadRequested = -QZnReq; // here let cooling demand be positive within subroutine + if (SensLoadRequested <= 0.0) { // No load so assume control keeps off, except that scheduled defrost still occurs AirVolumeFlowMax = 0.0; DryAirMassFlowMax = 0.0; } else { SensLoadRequestedGross = SensLoadRequested + HeaterLoad + FanPowerRated; - Real64 ZoneMixedAirDryBulb = DataLoopNode::Node(this->ZoneNodeNum).Temp; // (C) + Real64 ZoneMixedAirDryBulb = DataLoopNode::Node(this->ZoneNodeNum).Temp; // (C) Real64 ZoneMixedAirHumRatio = DataLoopNode::Node(this->ZoneNodeNum).HumRat; // kg water/kg air in the zone mixed air - Real64 ZoneMixedAirRHFrac = Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, DataEnvironment::OutBaroPress, TrackMessage); // relative humidity of mixed air in the zone expressed as a fraction from 0 to 1 - Real64 ZoneMixedAirEnthalpy = Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, DataEnvironment::OutBaroPress, TrackMessage); // J/kg - Real64 ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); // kg/m3 - Real64 ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW(DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); // Dry air density at mixed zone conditions - Real64 DryAirMassFlowRated = AirVolumeFlowRated * ZoneDryAirDensity; // Rated volume flow rate times dry air density + Real64 ZoneMixedAirRHFrac = + Psychrometrics::PsyRhFnTdbWPb(ZoneMixedAirDryBulb, + ZoneMixedAirHumRatio, + DataEnvironment::OutBaroPress, + TrackMessage); // relative humidity of mixed air in the zone expressed as a fraction from 0 to 1 + Real64 ZoneMixedAirEnthalpy = + Psychrometrics::PsyHFnTdbRhPb(ZoneMixedAirDryBulb, ZoneMixedAirRHFrac, DataEnvironment::OutBaroPress, TrackMessage); // J/kg + Real64 ZoneMixedAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW( + DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, ZoneMixedAirHumRatio, TrackMessage); // kg/m3 + Real64 ZoneDryAirDensity = Psychrometrics::PsyRhoAirFnPbTdbW( + DataEnvironment::OutBaroPress, ZoneMixedAirDryBulb, 0.0, TrackMessage); // Dry air density at mixed zone conditions + Real64 DryAirMassFlowRated = AirVolumeFlowRated * ZoneDryAirDensity; // Rated volume flow rate times dry air density // calc t inlet to coil assuming at middle/mixed point in room bbb - // later need to do for hottest/coolest in room where Tin /= Tzonemixed // calc RH inlet to coil assuming at middle/mixed point in room @@ -14312,7 +14473,8 @@ namespace RefrigeratedCase { if (AirVolumeFlowMax > 0.0) { - Real64 TemperatureDif = min(this->MaxTemperatureDif, (CoilInletTemp - TEvap)); // difference between inlet air and evaporating temperature (deltaC) + Real64 TemperatureDif = + min(this->MaxTemperatureDif, (CoilInletTemp - TEvap)); // difference between inlet air and evaporating temperature (deltaC) if (this->RatingType == RatedCapacityTotal) { // RatingType = CapacityTotalSpecificConditions, will be doing a table lookup @@ -14324,15 +14486,19 @@ namespace RefrigeratedCase { this->RatedCapTotal * (1.0 - DefrostDripDownSchedule) * CoilSchedule; } else { // work with unit load factor (sensible only), function of DT1 (Tair in drybulb-Tevap) - Real64 SensibleCapacityMax = this->UnitLoadFactorSens * TemperatureDif * (1.0 - DefrostDripDownSchedule) * CoilSchedule; // Sensible capacity adjusted for any time in dripdown state (W) + Real64 SensibleCapacityMax = this->UnitLoadFactorSens * TemperatureDif * (1.0 - DefrostDripDownSchedule) * + CoilSchedule; // Sensible capacity adjusted for any time in dripdown state (W) if (SensibleCapacityMax > 0.0) { - Real64 ExitTemperatureEstimate = CoilInletTemp - (SensibleCapacityMax / (DryAirMassFlowMax * CoilInletDryAirCp)); // Estimated Air temperature leaving the coil (C) + Real64 ExitTemperatureEstimate = + CoilInletTemp - + (SensibleCapacityMax / (DryAirMassFlowMax * CoilInletDryAirCp)); // Estimated Air temperature leaving the coil (C) if (ExitTemperatureEstimate <= TEvap) { ShowWarningError(TrackMessage + "Refrigeration:AirCoil: " + this->Name); ShowContinueError(" The estimated air outlet temperature is less than the evaporating temperature."); } - Real64 ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb(ExitTemperatureEstimate, 1.0, DataEnvironment::OutBaroPress, TrackMessage); // Estimated Air enthalpy leaving the coil (J/kg) + Real64 ExitEnthalpyEstimate = Psychrometrics::PsyHFnTdbRhPb( + ExitTemperatureEstimate, 1.0, DataEnvironment::OutBaroPress, TrackMessage); // Estimated Air enthalpy leaving the coil (J/kg) if (ExitEnthalpyEstimate <= CoilInletEnthalpy) { CoilCapTotEstimate = (CoilInletEnthalpy - ExitEnthalpyEstimate) * AirVolumeFlowMax * CoilInletDensity; } else { @@ -14353,7 +14519,7 @@ namespace RefrigeratedCase { if (SELECT_CASE_var == SHR60) { // line from y = SHRCorrection60 value to 1. as x(SHR) goes from .6 to 1, from B. Nelson, ASHRAE August 2010 Real64 Slope = (this->SHRCorrection60 - 1.0) / (0.6 - 1.0); // Part of linear SHR60 correction factor, dimensionless - Real64 Yint = this->SHRCorrection60 - (Slope * 0.6); // Part of linear SHR60 correction factor, dimensionless + Real64 Yint = this->SHRCorrection60 - (Slope * 0.6); // Part of linear SHR60 correction factor, dimensionless SHRCorrection = Slope * SHR + Yint; } else if (SELECT_CASE_var == QuadraticSHR) { SHRCorrection = CurveManager::CurveValue(this->SHRCorrectionCurvePtr, SHR); @@ -14393,9 +14559,11 @@ namespace RefrigeratedCase { } // Rating type : CapacityTotalSpecificConditions or Sensible Unit Load Factor if (CoilCapTotEstimate > 0.0) { - Real64 ExitEnthalpy = CoilInletEnthalpy - (CoilCapTotEstimate / (AirVolumeFlowMax * CoilInletDensity)); // Air enthalpy leaving the coil (J/kg) - Real64 ExitTemperature = Psychrometrics::PsyTsatFnHPb(ExitEnthalpy, DataEnvironment::OutBaroPress, TrackMessage); // RH =1.0 at Tsat // Air temperature leaving the coil (C) - Real64 ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); // kg water/kg air + Real64 ExitEnthalpy = + CoilInletEnthalpy - (CoilCapTotEstimate / (AirVolumeFlowMax * CoilInletDensity)); // Air enthalpy leaving the coil (J/kg) + Real64 ExitTemperature = Psychrometrics::PsyTsatFnHPb( + ExitEnthalpy, DataEnvironment::OutBaroPress, TrackMessage); // RH =1.0 at Tsat // Air temperature leaving the coil (C) + Real64 ExitHumRatio = Psychrometrics::PsyWFnTdbH(ExitTemperature, ExitEnthalpy, TrackMessage); // kg water/kg air if (ExitHumRatio > CoilInletHumRatio) ExitHumRatio = CoilInletHumRatio; WaterRemovRate = DryAirMassFlowMax * (CoilInletHumRatio - ExitHumRatio); latLoadServed = WaterRemovRate * IcetoVaporEnthalpy; @@ -14415,16 +14583,16 @@ namespace RefrigeratedCase { } //(CoilCapTotEstimate > 0.0d0) Real64 FanPowerMax = FanPowerRated * (1.0 - DefrostDripDownSchedule); // Total fan energy rate, limited by dripdown period (W) - if (SensLoadGross > SensLoadRequestedGross) { // part load operation + if (SensLoadGross > SensLoadRequestedGross) { // part load operation // don't need full chiller power, reduce fan speed to reduce air flow // move fan to part power if need to - Real64 CapFac = SensLoadRequestedGross / SensLoadGross; // used to reduce fan power when don't need full coil capacity + Real64 CapFac = SensLoadRequestedGross / SensLoadGross; // used to reduce fan power when don't need full coil capacity Real64 AirVolRatio = max(this->FanMinAirFlowRatio, std::pow(CapFac, EvaporatorAirVolExponent)); // used when operating at part load // Fans limited by minimum air flow ratio { auto const SELECT_CASE_var(FanSpeedControlType); - if (SELECT_CASE_var == FanVariableSpeed) { // fan power law, adjusted for reality, applies + if (SELECT_CASE_var == FanVariableSpeed) { // fan power law, adjusted for reality, applies Real64 FanPowerRatio = std::pow(AirVolRatio, 2.5); // Used for variable speed fans, dimensionless FanPowerActual = FanPowerRatio * FanPowerMax; } else if (SELECT_CASE_var == FanConstantSpeed) { @@ -14495,7 +14663,7 @@ namespace RefrigeratedCase { Real64 IceSensHeatNeeded = 0.0; // Energy to raise frost temperature to 0C, used w/ temp termination (J) if (StartFrostKg > 0.0) { if (this->IceTemp < 0.0) { - Real64 StartIceTemp = this->IceTemp; // Frost temperature at start of time step [C] + Real64 StartIceTemp = this->IceTemp; // Frost temperature at start of time step [C] IceSensHeatNeeded = StartFrostKg * SpecificHeatIce * (0.0 - StartIceTemp); // Joules if (AvailDefrostEnergy >= IceSensHeatNeeded) { this->IceTemp = 0.0; @@ -14515,11 +14683,13 @@ namespace RefrigeratedCase { // see Aug 8 2010 page 3 notes this->KgFrost = 0.0; Real64 DefrostEnergyNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / - this->DefEnergyFraction; // Joules - energy needed including E unavail to melt ice - DefrostSchedule = min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour))); + this->DefEnergyFraction; // Joules - energy needed including E unavail to melt ice + DefrostSchedule = + min(DefrostSchedule, (DefrostEnergyNeeded / (DefrostCap * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour))); // reduce heat load on warehouse by energy put into ice melting // Defrost load that actually goes to melting ice (W) - Real64 DefrostRateNeeded = (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); + Real64 DefrostRateNeeded = + (IceSensHeatNeeded + (FrostChangekg * IceMeltEnthalpy)) / (DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour); DefrostLoad = max(0.0, (DefrostSchedule * DefrostCap - DefrostRateNeeded)); this->IceTemp = this->TEvapDesign; } // frost melted during time step less than amount of ice at start @@ -14544,7 +14714,8 @@ namespace RefrigeratedCase { DefrostLoad = 0.0; } // Defrost calculations - Real64 SensLoadFromZone = SensLoadGross - HeaterLoad - DefrostLoad - FanPowerActual; // Net sensible load removed from zone after accounting for heaters, fans, defrost [W] + Real64 SensLoadFromZone = SensLoadGross - HeaterLoad - DefrostLoad - + FanPowerActual; // Net sensible load removed from zone after accounting for heaters, fans, defrost [W] // ReportWarehouseCoil(CoilID) this->ThermalDefrostPower = DefrostLoad; @@ -14686,7 +14857,7 @@ namespace RefrigeratedCase { // to zero when called on zone timestep. Otherwise, values may be held over when // no HVAC load calls module during that zone time step. - int DemandARRID(0); // Index to water tank Demand used for evap condenser + int DemandARRID(0); // Index to water tank Demand used for evap condenser if (HaveRefrigRacks) { // HaveRefrigRacks is TRUE when NumRefrigeratedRAcks > 0 @@ -14694,14 +14865,13 @@ namespace RefrigeratedCase { for (int RackNum = 1; RackNum <= DataHeatBalance::NumRefrigeratedRacks; ++RackNum) { if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { Real64 MassFlowRate = 0.0; - PlantUtilities::SetComponentFlowRate( - MassFlowRate, - RefrigRack(RackNum).InletNode, - RefrigRack(RackNum).OutletNode, - RefrigRack(RackNum).PlantLoopNum, - RefrigRack(RackNum).PlantLoopSideNum, - RefrigRack(RackNum).PlantBranchNum, - RefrigRack(RackNum).PlantCompNum); + PlantUtilities::SetComponentFlowRate(MassFlowRate, + RefrigRack(RackNum).InletNode, + RefrigRack(RackNum).OutletNode, + RefrigRack(RackNum).PlantLoopNum, + RefrigRack(RackNum).PlantLoopSideNum, + RefrigRack(RackNum).PlantBranchNum, + RefrigRack(RackNum).PlantCompNum); } if (RefrigRack(RackNum).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (RefrigRack(RackNum).EvapWaterSupplyMode == WaterSupplyFromTank) { @@ -14718,14 +14888,13 @@ namespace RefrigeratedCase { for (int CondID = 1; CondID <= DataHeatBalance::NumRefrigCondensers; ++CondID) { if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeWater) { Real64 MassFlowRate = 0.0; - PlantUtilities::SetComponentFlowRate( - MassFlowRate, - Condenser(CondID).InletNode, - Condenser(CondID).OutletNode, - Condenser(CondID).PlantLoopNum, - Condenser(CondID).PlantLoopSideNum, - Condenser(CondID).PlantBranchNum, - Condenser(CondID).PlantCompNum); + PlantUtilities::SetComponentFlowRate(MassFlowRate, + Condenser(CondID).InletNode, + Condenser(CondID).OutletNode, + Condenser(CondID).PlantLoopNum, + Condenser(CondID).PlantLoopSideNum, + Condenser(CondID).PlantBranchNum, + Condenser(CondID).PlantCompNum); } if (Condenser(CondID).CondenserType == DataHeatBalance::RefrigCondenserTypeEvap) { if (Condenser(CondID).EvapWaterSupplyMode == WaterSupplyFromTank) { diff --git a/src/EnergyPlus/RefrigeratedCase.hh b/src/EnergyPlus/RefrigeratedCase.hh index 8e64f6cb1e7..ea63cb930b2 100644 --- a/src/EnergyPlus/RefrigeratedCase.hh +++ b/src/EnergyPlus/RefrigeratedCase.hh @@ -68,7 +68,7 @@ namespace RefrigeratedCase { struct RefrigCaseData { // Members - std::string Name; // Name of refrigerated display case + std::string Name; // Name of refrigerated display case std::string ZoneName; // Zone or Location of Display Case int NumSysAttach; // Number of systems attached to case, error if /=1 int SchedPtr; // Index to the correct availability schedule @@ -253,8 +253,8 @@ namespace RefrigeratedCase { Array1D_int CaseNum; Array1D_int CoilNum; Array1D_int WalkInNum; - int HeatRejectionLocation; // Refrigeration Compressor Rack heat rejection location - int CondenserType; // Specifies cooling mode for outdoor condenser + int HeatRejectionLocation; // Refrigeration Compressor Rack heat rejection location + int CondenserType; // Specifies cooling mode for outdoor condenser Real64 LaggedUsedWaterHeater; // Heat reclaim used to heat water in previous zone/load time step(W) Real64 LaggedUsedHVACCoil; // Heat reclaim used to heat HVAC coil in previous zone/load time step(W) Real64 EvapEffect; // Effectiveness of evaporative condenser @@ -327,18 +327,18 @@ namespace RefrigeratedCase { // Default Constructor RefrigRackData() : MyIdx(0), CoilFlag(false), EndUseSubcategory("General"), HeatRejectionLocation(0), CondenserType(0), LaggedUsedWaterHeater(0.0), - LaggedUsedHVACCoil(0.0), EvapEffect(0.9), CondenserAirFlowRate(0.0), - EvapPumpPower(0.0), ActualEvapPumpPower(0.0), EvapPumpConsumption(0.0), EvapWaterConsumpRate(0.0), EvapWaterConsumption(0.0), - EvapSchedPtr(0), BasinHeaterPowerFTempDiff(0.0), BasinHeaterSetPointTemp(2.0), BasinHeaterPower(0.0), BasinHeaterConsumption(0.0), - RatedCOP(0.0), COPFTempPtr(0), NumCases(0), NumCoils(0), NumWalkIns(0), EvapWaterSupplyMode(WaterSupplyFromMains), - EvapWaterSupTankID(0), EvapWaterTankDemandARRID(0), OutsideAirNodeNum(0), HeatRejectionZoneNum(0), HeatRejectionZoneNodeNum(0), - TotalRackLoad(0.0), RackCompressorCOP(0.0), RackCompressorPower(0.0), RackElecConsumption(0.0), RackCapacity(0.0), - RackCoolingEnergy(0.0), CondenserFanPower(0.0), TotCondFTempPtr(0), ActualCondenserFanPower(0.0), CondenserFanConsumption(0.0), - SensZoneCreditHeatRate(0.0), SensZoneCreditHeat(0.0), SensHVACCreditHeatRate(0.0), SensHVACCreditHeat(0.0), EvapFreezeWarnIndex(0), - NoFlowWarnIndex(0), HighTempWarnIndex(0), LowTempWarnIndex(0), HighFlowWarnIndex(0), HighInletWarnIndex(0), InletNode(0), - InletTemp(0.0), OutletNode(0), PlantTypeOfNum(0), PlantLoopNum(0), PlantLoopSideNum(0), PlantBranchNum(0), PlantCompNum(0), - OutletTemp(0.0), OutletTempSchedPtr(0), VolFlowRate(0.0), DesVolFlowRate(0.0), MassFlowRate(0.0), CondLoad(0.0), CondEnergy(0.0), - FlowType(1), VolFlowRateMax(0.0), MassFlowRateMax(0.0), InletTempMin(10.0), OutletTempMax(55.0), TotalCoolingLoad(0.0), ShowCOPWarning(true) + LaggedUsedHVACCoil(0.0), EvapEffect(0.9), CondenserAirFlowRate(0.0), EvapPumpPower(0.0), ActualEvapPumpPower(0.0), + EvapPumpConsumption(0.0), EvapWaterConsumpRate(0.0), EvapWaterConsumption(0.0), EvapSchedPtr(0), BasinHeaterPowerFTempDiff(0.0), + BasinHeaterSetPointTemp(2.0), BasinHeaterPower(0.0), BasinHeaterConsumption(0.0), RatedCOP(0.0), COPFTempPtr(0), NumCases(0), + NumCoils(0), NumWalkIns(0), EvapWaterSupplyMode(WaterSupplyFromMains), EvapWaterSupTankID(0), EvapWaterTankDemandARRID(0), + OutsideAirNodeNum(0), HeatRejectionZoneNum(0), HeatRejectionZoneNodeNum(0), TotalRackLoad(0.0), RackCompressorCOP(0.0), + RackCompressorPower(0.0), RackElecConsumption(0.0), RackCapacity(0.0), RackCoolingEnergy(0.0), CondenserFanPower(0.0), + TotCondFTempPtr(0), ActualCondenserFanPower(0.0), CondenserFanConsumption(0.0), SensZoneCreditHeatRate(0.0), SensZoneCreditHeat(0.0), + SensHVACCreditHeatRate(0.0), SensHVACCreditHeat(0.0), EvapFreezeWarnIndex(0), NoFlowWarnIndex(0), HighTempWarnIndex(0), + LowTempWarnIndex(0), HighFlowWarnIndex(0), HighInletWarnIndex(0), InletNode(0), InletTemp(0.0), OutletNode(0), PlantTypeOfNum(0), + PlantLoopNum(0), PlantLoopSideNum(0), PlantBranchNum(0), PlantCompNum(0), OutletTemp(0.0), OutletTempSchedPtr(0), VolFlowRate(0.0), + DesVolFlowRate(0.0), MassFlowRate(0.0), CondLoad(0.0), CondEnergy(0.0), FlowType(1), VolFlowRateMax(0.0), MassFlowRateMax(0.0), + InletTempMin(10.0), OutletTempMax(55.0), TotalCoolingLoad(0.0), ShowCOPWarning(true) { } @@ -376,8 +376,8 @@ namespace RefrigeratedCase { struct RefrigSystemData { // Members - std::string Name; // Name of refrigeration system - std::string RefrigerantName; // Name of refrigerant, must match name in FluidName + std::string Name; // Name of refrigeration system + std::string RefrigerantName; // Name of refrigerant, must match name in FluidName std::string EndUseSubcategory; // Used for reporting purposes bool SystemRejectHeatToZone; // Flag to show air-cooled condenser located inside zone bool CoilFlag; // Flag to show if coil type load on system (even if below in a secondary) @@ -392,13 +392,13 @@ namespace RefrigeratedCase { Array1D_int SubcoolerNum; // Absolute Index of subcoolers (allocated NumSubcoolers) Array1D_int WalkInNum; // absolute Index of walk ins (allocated NumWalkIns) int CompSuctControl; // Index to suction control - int HiStageWarnIndex1; // Recurring warning index when hi stage compressors unable to meet coil loads - int HiStageWarnIndex2; // Recurring warning index when hi stage compressors unable to meet coil loads - int InsuffCapWarn; // Recurring warning index when refrigeration system unable to meet coil loads - int IntercoolerType; // Intercooler type (0=none, 1=flash intercooler, 2=shell-and-coil intercooler) - int NumCases; // Number of cases on this system - int NumCoils; // Number of cases on this system - int NumCompressors; // Number of compressors on this system for single-stage systems + int HiStageWarnIndex1; // Recurring warning index when hi stage compressors unable to meet coil loads + int HiStageWarnIndex2; // Recurring warning index when hi stage compressors unable to meet coil loads + int InsuffCapWarn; // Recurring warning index when refrigeration system unable to meet coil loads + int IntercoolerType; // Intercooler type (0=none, 1=flash intercooler, 2=shell-and-coil intercooler) + int NumCases; // Number of cases on this system + int NumCoils; // Number of cases on this system + int NumCompressors; // Number of compressors on this system for single-stage systems // or number of low-stage compressors on this system for two-stage systems int NumCondensers; // Number of condensers on this system int NumGasCoolers; // Number of gas coolers on this system @@ -1038,9 +1038,9 @@ namespace RefrigeratedCase { int ReceiverZoneNum; // ID number for zone where receiver gains heat int ReceiverZoneNodeNum; // ID number for zone node where receiver gains heat Real64 ReceiverZoneHeatGain; // sensible heat gain rate to zone with receiver - int VarSpeedCurvePtr; // Pointer for variable speed pump power curve - Real64 AvailLoadCoils; // Used to determine amount of avail heat for warehouse coils - Real64 CpBrineRated; // Specific heat of secondary loop fluid at rated average + int VarSpeedCurvePtr; // Pointer for variable speed pump power curve + Real64 AvailLoadCoils; // Used to determine amount of avail heat for warehouse coils + Real64 CpBrineRated; // Specific heat of secondary loop fluid at rated average // brine temperature (J/kg-C) Real64 ChillerRefInventory; // Refrigerant inventory on cold side of loop heat exchanger Real64 CircRate; // For PhaseChange loop = mass flow at pump/mass gas out load (dimensionless) @@ -1304,23 +1304,23 @@ namespace RefrigeratedCase { int DefrostType; // Coil defrost type, Hot-gas,Electric, Hot-brine int FanType; // Index to coil fan type (fixed, two-speed, etc.) int HeaterSchedPtr; // Index to the correct availability schedule - int NumSysAttach; // Number of refrigerating systems cooling this coil (error check purpose) - int RatingType; // Indicates which type of manufacturer's rating is used - int SchedPtr; // Index to the correct availability schedule - int SCIndex; // IDs which of European standard conditions is used for rating - int SecServeID; // Index to the refrigeration system serving this coil - int SHRCorrectionType; // Index to type of correction for sensible heat ratio - int SHRCorrectionCurvePtr; // Index to Sensible heat ratio correction curve - int SysServeID; // Index to the secondary system serving this coil - int VerticalLocation; // Index to coil location, floor, ceiling, or middle - int ZoneNodeNum; // Index to the zone node for the zone served by this coil - int ZoneNum; // Index to the zone served by this coil - Real64 CorrMaterial; // Correction factor from manufacturer's rating for coil material, default 1.0 - Real64 CorrRefrigerant; // Correction factor from manufacturer's rating for refrigerant, default 1.0 - Real64 DefrostCapacity; // Design defrost Coil capacity [W] - Real64 DefrostPower; // Defrost power for electric defrost (W) - Real64 DeltaFreezeKgFrost; // Used to reverse accumulation if the zone/load time step is repeated (kg) - Real64 DefEnergyFraction; // Portion of defrost energy available to melt ice, + int NumSysAttach; // Number of refrigerating systems cooling this coil (error check purpose) + int RatingType; // Indicates which type of manufacturer's rating is used + int SchedPtr; // Index to the correct availability schedule + int SCIndex; // IDs which of European standard conditions is used for rating + int SecServeID; // Index to the refrigeration system serving this coil + int SHRCorrectionType; // Index to type of correction for sensible heat ratio + int SHRCorrectionCurvePtr; // Index to Sensible heat ratio correction curve + int SysServeID; // Index to the secondary system serving this coil + int VerticalLocation; // Index to coil location, floor, ceiling, or middle + int ZoneNodeNum; // Index to the zone node for the zone served by this coil + int ZoneNum; // Index to the zone served by this coil + Real64 CorrMaterial; // Correction factor from manufacturer's rating for coil material, default 1.0 + Real64 CorrRefrigerant; // Correction factor from manufacturer's rating for refrigerant, default 1.0 + Real64 DefrostCapacity; // Design defrost Coil capacity [W] + Real64 DefrostPower; // Defrost power for electric defrost (W) + Real64 DeltaFreezeKgFrost; // Used to reverse accumulation if the zone/load time step is repeated (kg) + Real64 DefEnergyFraction; // Portion of defrost energy available to melt ice, // used with fluid defrost with temp termination (dimensionless) Real64 DesignRefrigInventory; // Design refrigerant inventory [kg] Real64 FanMinAirFlowRatio; // Minimum air flow ratio set to preserve fan motor, dimensionless @@ -1368,24 +1368,25 @@ namespace RefrigeratedCase { Real64 TotalCoolingLoad; // Gross total cooling rate (W) Real64 TotalCoolingEnergy; // Gross total cooling energy (J) Real64 TotalElecPower; // Coil total electric - Real64 TotalElecConsumption; // Coil total electric energy (J) + Real64 TotalElecConsumption; // Coil total electric energy (J) bool ShowCoilFrostWarning; // Default Constructor WarehouseCoilData() : SecStatusFirst(false), SecStatusLast(false), SysStatusFirst(false), SysStatusLast(false), CoilFanSchedPtr(0), DefrostDripDownSchedPtr(0), DefrostSchedPtr(0), DefrostControlType(0), DefrostType(0), FanType(0), HeaterSchedPtr(0), NumSysAttach(0), - RatingType(0), SchedPtr(0), SCIndex(0), SecServeID(0), SHRCorrectionType(0), SHRCorrectionCurvePtr(0), SysServeID(0), VerticalLocation(0), ZoneNodeNum(0), ZoneNum(0), - CorrMaterial(0.0), CorrRefrigerant(0.0), DefrostCapacity(0.0), DefrostPower(0.0), DeltaFreezeKgFrost(0.0), DefEnergyFraction(0.0), - DesignRefrigInventory(0.0), FanMinAirFlowRatio(0.0), HeaterPower(0.0), HotDefrostCondCredit(0.0), IceTemp(0.0), IceTempSaved(0.0), - KgFrost(0.0), KgFrostSaved(0.0), MaxTemperatureDif(0.0), RatedAirVolumeFlow(0.0), RatedCapTotal(0.0), RatedFanPower(0.0), RatedRH(0.0), - RatedSensibleCap(0.0), RatedTemperatureDif(0.0), ReqLoad(0.0), SensHeatRatio(0.0), SHRCorrection60(0.0), Temperature(0.0), - TEvapDesign(0.0), ThermalDefrostPower(0.0), UnitLoadFactorSens(0.0), ElecHeaterPower(0.0), ElecHeaterConsumption(0.0), - ElecFanPower(0.0), ElecFanConsumption(0.0), ElecDefrostPower(0.0), ElecDefrostConsumption(0.0), LatCreditRate(0.0), LatLoadServed(0.0), - LatKgPerS_ToZone(0.0), LatCreditEnergy(0.0), ReportSensCoolCreditRate(0.0), ReportHeatingCreditRate(0.0), - ReportSensCoolCreditEnergy(0.0), ReportHeatingCreditEnergy(0.0), ReportTotalCoolCreditRate(0.0), ReportTotalCoolCreditEnergy(0.0), - SensCreditRate(0.0), SensCreditEnergy(0.0), SensCoolingEnergyRate(0.0), SensCoolingEnergy(0.0), TotalCoolingLoad(0.0), - TotalCoolingEnergy(0.0), TotalElecPower(0.0), TotalElecConsumption(0.0), ShowCoilFrostWarning(true) + RatingType(0), SchedPtr(0), SCIndex(0), SecServeID(0), SHRCorrectionType(0), SHRCorrectionCurvePtr(0), SysServeID(0), + VerticalLocation(0), ZoneNodeNum(0), ZoneNum(0), CorrMaterial(0.0), CorrRefrigerant(0.0), DefrostCapacity(0.0), DefrostPower(0.0), + DeltaFreezeKgFrost(0.0), DefEnergyFraction(0.0), DesignRefrigInventory(0.0), FanMinAirFlowRatio(0.0), HeaterPower(0.0), + HotDefrostCondCredit(0.0), IceTemp(0.0), IceTempSaved(0.0), KgFrost(0.0), KgFrostSaved(0.0), MaxTemperatureDif(0.0), + RatedAirVolumeFlow(0.0), RatedCapTotal(0.0), RatedFanPower(0.0), RatedRH(0.0), RatedSensibleCap(0.0), RatedTemperatureDif(0.0), + ReqLoad(0.0), SensHeatRatio(0.0), SHRCorrection60(0.0), Temperature(0.0), TEvapDesign(0.0), ThermalDefrostPower(0.0), + UnitLoadFactorSens(0.0), ElecHeaterPower(0.0), ElecHeaterConsumption(0.0), ElecFanPower(0.0), ElecFanConsumption(0.0), + ElecDefrostPower(0.0), ElecDefrostConsumption(0.0), LatCreditRate(0.0), LatLoadServed(0.0), LatKgPerS_ToZone(0.0), LatCreditEnergy(0.0), + ReportSensCoolCreditRate(0.0), ReportHeatingCreditRate(0.0), ReportSensCoolCreditEnergy(0.0), ReportHeatingCreditEnergy(0.0), + ReportTotalCoolCreditRate(0.0), ReportTotalCoolCreditEnergy(0.0), SensCreditRate(0.0), SensCreditEnergy(0.0), + SensCoolingEnergyRate(0.0), SensCoolingEnergy(0.0), TotalCoolingLoad(0.0), TotalCoolingEnergy(0.0), TotalElecPower(0.0), + TotalElecConsumption(0.0), ShowCoilFrostWarning(true) { } @@ -1535,7 +1536,7 @@ namespace RefrigeratedCase { int SysType, bool &ErrorsFound, Optional_string_const ThisObjectType = _, - const Optional_bool_const& SuppressWarning = _); + const Optional_bool_const &SuppressWarning = _); void ReportRefrigerationComponents(); From 7ddd022f5d84e449b173e20f4b40f4abce153d8b Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 09:33:10 -0700 Subject: [PATCH 74/86] step 1 - cleanup comments --- .../PlantHeatExchangerFluidToFluid.cc | 145 ------------------ .../PlantHeatExchangerFluidToFluid.hh | 11 -- 2 files changed, 156 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 103b4546ecd..05510834a91 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -89,22 +89,10 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS MODULE: // Simulate a generic plant heat exchanger with a variety of control options - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // OTHER NOTES: - // na - - // Using/Aliasing using namespace DataPrecisionGlobals; using namespace DataPlant; using namespace DataLoopNode; - // Data - // MODULE PARAMETER DEFINITIONS: int const CrossFlowBothUnMixed(1); int const CrossFlowBothMixed(2); int const CrossFlowSupplyLoopMixedDemandLoopUnMixed(3); @@ -133,21 +121,13 @@ namespace PlantHeatExchangerFluidToFluid { int const HeatingSupplySideLoop(501); int const CoolingSupplySideLoop(502); - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: std::string ComponentClassName("HeatExchanger:FluidToFluid"); int NumberOfPlantFluidHXs(0); bool GetInput(true); Array1D_bool CheckFluidHXs; - // SUBROUTINE SPECIFICATIONS FOR MODULE - - // Object Data Array1D FluidHX; - // Functions - void SimFluidHeatExchanger(int const LoopNum, // plant loop sim call originated from int const EP_UNUSED(LoopSideNum), // plant loop side sim call originated from std::string const &EP_UNUSED(EquipType), // type of equipment, 'PlantComponent:UserDefined' @@ -170,10 +150,8 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // Main entry point and simulation manager for heat exchanger - // Using/Aliasing using General::TrimSigDigits; - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int CompNum; if (GetInput) { @@ -249,7 +227,6 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // get input for heat exchanger model - // Using/Aliasing using BranchNodeConnections::TestCompSet; using DataGlobals::AnyEnergyManagementSystemInModel; using DataGlobals::ScheduleAlwaysOn; @@ -262,10 +239,8 @@ namespace PlantHeatExchangerFluidToFluid { using NodeInputManager::GetOnlySingleNode; using ScheduleManager::GetScheduleIndex; - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("GetFluidHeatExchangerInput: "); - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool ErrorsFound(false); int NumAlphas; // Number of elements in the alpha array int NumNums; // Number of elements in the numeric array @@ -647,17 +622,14 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // Initialize heat exchanger model - // Using/Aliasing using DataGlobals::BeginEnvrnFlag; using FluidProperties::GetDensityGlycol; using FluidProperties::GetSpecificHeatGlycol; using PlantUtilities::InitComponentNodes; using PlantUtilities::InterConnectTwoPlantLoopSides; - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineNameNoColon("InitFluidHeatExchanger"); - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: static bool MyOneTimeFlag(true); // one time flag static Array1D_bool MyEnvrnFlag; // environment flag static Array1D_bool MyFlag; @@ -889,7 +861,6 @@ namespace PlantHeatExchangerFluidToFluid { // the UA is sized for an effectiveness of 1.0 using sizing temps // the capacity uses the full HX model - // Using/Aliasing using namespace DataSizing; using DataHVACGlobals::SmallWaterVolFlow; using DataPlant::PlantFinalSizesOkayToReport; @@ -902,10 +873,8 @@ namespace PlantHeatExchangerFluidToFluid { using PlantUtilities::RegisterPlantCompDesignFlow; using ReportSizingManager::ReportSizingOutput; - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("SizeFluidHeatExchanger"); - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int PltSizNumSupSide; // Plant Sizing index for Loop Supply Side int PltSizNumDmdSide; // plant sizing index for Loop Demand Side Real64 tmpSupSideDesignVolFlowRate; @@ -1140,10 +1109,6 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // long CASE statement for different control options - // REFERENCES: - // na - - // Using/Aliasing using DataBranchAirLoopPlant::MassFlowTolerance; using DataEnvironment::OutDryBulbTemp; using DataEnvironment::OutWetBulbTemp; @@ -1152,19 +1117,8 @@ namespace PlantHeatExchangerFluidToFluid { using PlantUtilities::SetComponentFlowRate; using ScheduleManager::GetCurrentScheduleValue; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: static std::string const RoutineName("ControlFluidHeatExchanger"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 AvailSchedValue; bool ScheduledOff; bool LimitTrippedOff; @@ -2010,27 +1964,13 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // apply heat transfer model depending on type of HX used - // REFERENCES: - // na - - // Using/Aliasing using DataLoopNode::Node; using FluidProperties::GetSpecificHeatGlycol; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - // SUBROUTINE PARAMETER DEFINITIONS: int const CmaxMixedCminUnmixed(40); int const CmaxUnMixedCminMixed(41); static std::string const RoutineName("CalcFluidHeatExchanger"); - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: Real64 SupSideLoopInletTemp; Real64 DmdSideLoopInletTemp; Real64 SupSideLoopInletCp; // specific heat of fluid entering from supply side loop at inlet temp @@ -2253,29 +2193,14 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // uses E+'s Regula Falsi numercial method - // REFERENCES: - // na - - // Using/Aliasing using DataGlobals::WarmupFlag; using General::RoundSigDigits; using General::SolveRoot; using PlantUtilities::SetComponentFlowRate; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: int const MaxIte(500); // Maximum number of iterations for solver Real64 const Acc(1.e-3); // Accuracy of solver result - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: int SolFla; // Flag of solver Array1D Par(2); // Parameter array passed to solver @@ -2473,34 +2398,10 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS FUNCTION: // calculate residual value for regula falsi solver - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using PlantUtilities::SetComponentFlowRate; - // Return value Real64 Residuum; // Residual to be minimized to zero - // Argument array dimensioning - - // Locals - // FUNCTION ARGUMENT DEFINITIONS: - // Par(2) = desired supply side loop outlet temperature [C] - - // FUNCTION PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // FUNCTION LOCAL VARIABLE DECLARATIONS: int CompNum; Real64 SupSideLoopOutletTemp; Real64 MdotTrial; @@ -2531,30 +2432,6 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // update calculate results - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // USE STATEMENTS: - // na - - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // na - Node(FluidHX(CompNum).DemandSideLoop.OutletNodeNum).Temp = FluidHX(CompNum).DemandSideLoop.OutletTemp; Node(FluidHX(CompNum).SupplySideLoop.OutletNodeNum).Temp = FluidHX(CompNum).SupplySideLoop.OutletTemp; } @@ -2571,32 +2448,10 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // update heat exchanger report variables - // METHODOLOGY EMPLOYED: - // - - // REFERENCES: - // na - - // Using/Aliasing using DataGlobals::SecInHour; using DataHVACGlobals::SmallLoad; using DataHVACGlobals::TimeStepSys; - // Locals - // SUBROUTINE ARGUMENT DEFINITIONS: - - // SUBROUTINE PARAMETER DEFINITIONS: - // na - - // INTERFACE BLOCK SPECIFICATIONS: - // na - - // DERIVED TYPE DEFINITIONS: - // na - - // SUBROUTINE LOCAL VARIABLE DECLARATIONS: - // na - FluidHX(CompNum).HeatTransferEnergy = FluidHX(CompNum).HeatTransferRate * TimeStepSys * SecInHour; if ((std::abs(FluidHX(CompNum).HeatTransferRate) > SmallLoad) && (FluidHX(CompNum).DemandSideLoop.InletMassFlowRate > 0.0) && diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 23973f4ac22..6ee12d53da8 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -59,10 +59,6 @@ namespace EnergyPlus { namespace PlantHeatExchangerFluidToFluid { - // Using/Aliasing - - // Data - // MODULE PARAMETER DEFINITIONS: extern int const CrossFlowBothUnMixed; extern int const CrossFlowBothMixed; extern int const CrossFlowSupplyLoopMixedDemandLoopUnMixed; @@ -91,18 +87,11 @@ namespace PlantHeatExchangerFluidToFluid { extern int const HeatingSupplySideLoop; extern int const CoolingSupplySideLoop; - // DERIVED TYPE DEFINITIONS: - - // MODULE VARIABLE DECLARATIONS: extern std::string ComponentClassName; extern int NumberOfPlantFluidHXs; extern bool GetInput; extern Array1D_bool CheckFluidHXs; - // SUBROUTINE SPECIFICATIONS FOR MODULE - - // Types - struct PlantConnectionStruct { // Members From 55813879c9a1597e423f62068a2b69f20bdd74e2 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 10:23:13 -0700 Subject: [PATCH 75/86] step 2 - cleanup usings --- .../PlantHeatExchangerFluidToFluid.cc | 680 ++++++++---------- 1 file changed, 311 insertions(+), 369 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 05510834a91..77d7e5c42ca 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -88,11 +88,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS MODULE: // Simulate a generic plant heat exchanger with a variety of control options - - using namespace DataPrecisionGlobals; - using namespace DataPlant; - using namespace DataLoopNode; - + int const CrossFlowBothUnMixed(1); int const CrossFlowBothMixed(2); int const CrossFlowSupplyLoopMixedDemandLoopUnMixed(3); @@ -149,9 +145,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // Main entry point and simulation manager for heat exchanger - - using General::TrimSigDigits; - + int CompNum; if (GetInput) { @@ -169,12 +163,12 @@ namespace PlantHeatExchangerFluidToFluid { } else { CompNum = CompIndex; if (CompNum < 1 || CompNum > NumberOfPlantFluidHXs) { - ShowFatalError("SimFluidHeatExchanger: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + ", Number of heat exchangers =" + - TrimSigDigits(NumberOfPlantFluidHXs) + ", Entered heat exchanger name = " + EquipName); + ShowFatalError("SimFluidHeatExchanger: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Number of heat exchangers =" + + General::TrimSigDigits(NumberOfPlantFluidHXs) + ", Entered heat exchanger name = " + EquipName); } if (CheckFluidHXs(CompNum)) { if (EquipName != FluidHX(CompNum).Name) { - ShowFatalError("SimFluidHeatExchanger: Invalid CompIndex passed=" + TrimSigDigits(CompNum) + + ShowFatalError("SimFluidHeatExchanger: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", heat exchanger name=" + EquipName + ", stored name for that index=" + FluidHX(CompNum).Name); } CheckFluidHXs(CompNum) = false; @@ -207,8 +201,8 @@ namespace PlantHeatExchangerFluidToFluid { } CalcFluidHeatExchanger(CompNum, - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate, - Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).MassFlowRate); + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate, + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).MassFlowRate); UpdateFluidHeatExchanger(CompNum); @@ -227,18 +221,6 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // get input for heat exchanger model - using BranchNodeConnections::TestCompSet; - using DataGlobals::AnyEnergyManagementSystemInModel; - using DataGlobals::ScheduleAlwaysOn; - using DataSizing::AutoSize; - using EMSManager::CheckIfNodeSetPointManagedByEMS; - using EMSManager::iTemperatureMaxSetPoint; - using EMSManager::iTemperatureMinSetPoint; - using EMSManager::iTemperatureSetPoint; - using General::RoundSigDigits; - using NodeInputManager::GetOnlySingleNode; - using ScheduleManager::GetScheduleIndex; - static std::string const RoutineName("GetFluidHeatExchangerInput: "); static bool ErrorsFound(false); @@ -294,9 +276,9 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompLoop).Name = cAlphaArgs(1); if (lAlphaFieldBlanks(2)) { - FluidHX(CompLoop).AvailSchedNum = ScheduleAlwaysOn; + FluidHX(CompLoop).AvailSchedNum = DataGlobals::ScheduleAlwaysOn; } else { - FluidHX(CompLoop).AvailSchedNum = GetScheduleIndex(cAlphaArgs(2)); + FluidHX(CompLoop).AvailSchedNum = ScheduleManager::GetScheduleIndex(cAlphaArgs(2)); if (FluidHX(CompLoop).AvailSchedNum <= 0) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); ShowContinueError("Invalid " + cAlphaFieldNames(2) + " = " + cAlphaArgs(2)); @@ -305,23 +287,23 @@ namespace PlantHeatExchangerFluidToFluid { } } - FluidHX(CompLoop).DemandSideLoop.InletNodeNum = GetOnlySingleNode( - cAlphaArgs(3), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Water, NodeConnectionType_Inlet, 1, ObjectIsNotParent); - FluidHX(CompLoop).DemandSideLoop.OutletNodeNum = GetOnlySingleNode( - cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Water, NodeConnectionType_Outlet, 1, ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(3), cAlphaArgs(4), "Loop Demand Side Plant Nodes"); + FluidHX(CompLoop).DemandSideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(3), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).DemandSideLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(3), cAlphaArgs(4), "Loop Demand Side Plant Nodes"); FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRate = rNumericArgs(1); - if (FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRate == AutoSize) { + if (FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRate == DataSizing::AutoSize) { FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRateWasAutoSized = true; } - FluidHX(CompLoop).SupplySideLoop.InletNodeNum = GetOnlySingleNode( - cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Water, NodeConnectionType_Inlet, 2, ObjectIsNotParent); - FluidHX(CompLoop).SupplySideLoop.OutletNodeNum = GetOnlySingleNode( - cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), NodeType_Water, NodeConnectionType_Outlet, 2, ObjectIsNotParent); - TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(5), cAlphaArgs(6), "Loop Supply Side Plant Nodes"); + FluidHX(CompLoop).SupplySideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 2, DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).SupplySideLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode( + cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 2, DataLoopNode::ObjectIsNotParent); + BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(5), cAlphaArgs(6), "Loop Supply Side Plant Nodes"); FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRate = rNumericArgs(2); - if (FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRate == AutoSize) { + if (FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRate == DataSizing::AutoSize) { FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRateWasAutoSized = true; } @@ -347,7 +329,7 @@ namespace PlantHeatExchangerFluidToFluid { if (!lNumericFieldBlanks(3)) { FluidHX(CompLoop).UA = rNumericArgs(3); - if (FluidHX(CompLoop).UA == AutoSize) { + if (FluidHX(CompLoop).UA == DataSizing::AutoSize) { FluidHX(CompLoop).UAWasAutoSized = true; } } else { @@ -389,28 +371,28 @@ namespace PlantHeatExchangerFluidToFluid { } if (!lAlphaFieldBlanks(9)) { - FluidHX(CompLoop).SetPointNodeNum = GetOnlySingleNode(cAlphaArgs(9), + FluidHX(CompLoop).SetPointNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(9), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Sensor, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Sensor, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); // check that node actually has setpoints on it if ((FluidHX(CompLoop).ControlMode == HeatingSetPointModulated) || (FluidHX(CompLoop).ControlMode == HeatingSetPointOnOff) || (FluidHX(CompLoop).ControlMode == CoolingSetPointModulated) || (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOff) || (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride)) { - if (Node(FluidHX(CompLoop).SetPointNodeNum).TempSetPoint == SensedNodeFlagValue) { - if (!AnyEnergyManagementSystemInModel) { - ShowSevereError(RoutineName + " Missing temperature setpoint for node = " + cAlphaArgs(9)); + if (DataLoopNode::Node(FluidHX(CompLoop).SetPointNodeNum).TempSetPoint == DataLoopNode::SensedNodeFlagValue) { + if (!DataGlobals::AnyEnergyManagementSystemInModel) { + ShowSevereError(RoutineName + " Missing temperature setpoint for DataLoopNode::Node = " + cAlphaArgs(9)); ShowContinueError("Occurs for " + cCurrentModuleObject + "=\"" + cAlphaArgs(1)); ShowContinueError(" Use a setpoint manager to place a single temperature setpoint on the node"); ErrorsFound = true; } else { // need call to EMS to check node NodeEMSSetPointMissing = false; - CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, iTemperatureSetPoint, NodeEMSSetPointMissing); + EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureSetPoint, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(RoutineName + " Missing temperature setpoint for node = " + cAlphaArgs(9)); ShowContinueError("Occurs for " + cCurrentModuleObject + "=\"" + cAlphaArgs(1)); @@ -421,9 +403,9 @@ namespace PlantHeatExchangerFluidToFluid { } } else if ((FluidHX(CompLoop).ControlMode == DualDeadBandSetPointModulated) || (FluidHX(CompLoop).ControlMode == DualDeadBandSetPointOnOff)) { - if ((Node(FluidHX(CompLoop).SetPointNodeNum).TempSetPointHi == SensedNodeFlagValue) || - (Node(FluidHX(CompLoop).SetPointNodeNum).TempSetPointLo == SensedNodeFlagValue)) { - if (!AnyEnergyManagementSystemInModel) { + if ((DataLoopNode::Node(FluidHX(CompLoop).SetPointNodeNum).TempSetPointHi == DataLoopNode::SensedNodeFlagValue) || + (DataLoopNode::Node(FluidHX(CompLoop).SetPointNodeNum).TempSetPointLo == DataLoopNode::SensedNodeFlagValue)) { + if (!DataGlobals::AnyEnergyManagementSystemInModel) { ShowSevereError(RoutineName + " Missing dual temperature setpoints for node = " + cAlphaArgs(9)); ShowContinueError("Occurs for " + cCurrentModuleObject + "=\"" + cAlphaArgs(1)); ShowContinueError(" Use a setpoint manager to place a dual temperature setpoint on the node"); @@ -431,8 +413,8 @@ namespace PlantHeatExchangerFluidToFluid { } else { // need call to EMS to check node NodeEMSSetPointMissing = false; - CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, iTemperatureMinSetPoint, NodeEMSSetPointMissing); - CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, iTemperatureMaxSetPoint, NodeEMSSetPointMissing); + EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMinSetPoint, NodeEMSSetPointMissing); + EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMaxSetPoint, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(RoutineName + " Missing temperature setpoint for node = " + cAlphaArgs(9)); ShowContinueError("Occurs for " + cCurrentModuleObject + "=\"" + cAlphaArgs(1)); @@ -465,14 +447,14 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompLoop).HeatTransferMeteringEndUse = cAlphaArgs(10); if (!lAlphaFieldBlanks(11)) { - FluidHX(CompLoop).OtherCompSupplySideLoop.InletNodeNum = GetOnlySingleNode(cAlphaArgs(11), + FluidHX(CompLoop).OtherCompSupplySideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(11), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Actuator, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Actuator, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); } else { if (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); @@ -482,14 +464,14 @@ namespace PlantHeatExchangerFluidToFluid { } if (!lAlphaFieldBlanks(12)) { - FluidHX(CompLoop).OtherCompDemandSideLoop.InletNodeNum = GetOnlySingleNode(cAlphaArgs(12), + FluidHX(CompLoop).OtherCompDemandSideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(12), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), - NodeType_Water, - NodeConnectionType_Actuator, + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Actuator, 1, - ObjectIsNotParent); + DataLoopNode::ObjectIsNotParent); } else { if (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); @@ -621,13 +603,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // Initialize heat exchanger model - - using DataGlobals::BeginEnvrnFlag; - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - using PlantUtilities::InitComponentNodes; - using PlantUtilities::InterConnectTwoPlantLoopSides; - + static std::string const RoutineNameNoColon("InitFluidHeatExchanger"); static bool MyOneTimeFlag(true); // one time flag @@ -653,7 +629,7 @@ namespace PlantHeatExchangerFluidToFluid { // locate the main two connections to the plant loops errFlag = false; PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, - TypeOf_FluidToFluidPlantHtExchg, + DataPlant::TypeOf_FluidToFluidPlantHtExchg, FluidHX(CompNum).DemandSideLoop.LoopNum, FluidHX(CompNum).DemandSideLoop.LoopSideNum, FluidHX(CompNum).DemandSideLoop.BranchNum, @@ -665,15 +641,15 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.InletNodeNum, _); - if (FluidHX(CompNum).DemandSideLoop.LoopSideNum != DemandSide) { // throw error - ShowSevereError(RoutineName + " Invalid connections for " + ccSimPlantEquipTypes(TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + + if (FluidHX(CompNum).DemandSideLoop.LoopSideNum != DataPlant::DemandSide) { // throw error + ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); ShowContinueError("The \"Loop Demand Side\" connections are not on the Demand Side of a plant loop"); errFlag = true; } PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, - TypeOf_FluidToFluidPlantHtExchg, + DataPlant::TypeOf_FluidToFluidPlantHtExchg, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, @@ -685,8 +661,8 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.InletNodeNum, _); - if (FluidHX(CompNum).SupplySideLoop.LoopSideNum != SupplySide) { // throw error - ShowSevereError(RoutineName + " Invalid connections for " + ccSimPlantEquipTypes(TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + + if (FluidHX(CompNum).SupplySideLoop.LoopSideNum != DataPlant::SupplySide) { // throw error + ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); ShowContinueError("The \"Loop Supply Side\" connections are not on the Supply Side of a plant loop"); errFlag = true; @@ -694,17 +670,17 @@ namespace PlantHeatExchangerFluidToFluid { // make sure it is not the same loop on both sides. if (FluidHX(CompNum).SupplySideLoop.LoopNum == FluidHX(CompNum).DemandSideLoop.LoopNum) { // user is being too tricky, don't allow - ShowSevereError(RoutineName + " Invalid connections for " + ccSimPlantEquipTypes(TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + + ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); ShowContinueError("The \"Loop Supply Side\" and \"Loop Demand Side\" need to be on different loops."); errFlag = true; } else { - InterConnectTwoPlantLoopSides(FluidHX(CompNum).SupplySideLoop.LoopNum, + PlantUtilities::InterConnectTwoPlantLoopSides(FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).DemandSideLoop.LoopNum, FluidHX(CompNum).DemandSideLoop.LoopSideNum, - TypeOf_FluidToFluidPlantHtExchg, + DataPlant::TypeOf_FluidToFluidPlantHtExchg, true); } @@ -732,26 +708,26 @@ namespace PlantHeatExchangerFluidToFluid { LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.CompNum; { - auto const SELECT_CASE_var(PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed); - - if (SELECT_CASE_var == HowMet_ByNominalCap) { - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed = - HowMet_ByNominalCapFreeCoolCntrl; - } else if (SELECT_CASE_var == HowMet_ByNominalCapLowOutLimit) { - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed = - HowMet_ByNominalCapLowOutLimitFreeCoolCntrl; + auto const SELECT_CASE_var(DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed); + + if (SELECT_CASE_var == DataPlant::HowMet_ByNominalCap) { + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed = + DataPlant::HowMet_ByNominalCapFreeCoolCntrl; + } else if (SELECT_CASE_var == DataPlant::HowMet_ByNominalCapLowOutLimit) { + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed = + DataPlant::HowMet_ByNominalCapLowOutLimitFreeCoolCntrl; } } { auto const SELECT_CASE_var(FluidHX(CompNum).ControlSignalTemp); if (SELECT_CASE_var == WetBulbTemperature) { - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = FreeCoolControlMode_WetBulb; + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_WetBulb; } else if (SELECT_CASE_var == DryBulbTemperature) { - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = FreeCoolControlMode_DryBulb; + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_DryBulb; } else if (SELECT_CASE_var == LoopTemperature) { - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = FreeCoolControlMode_Loop; - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlNodeNum = + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_Loop; + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlNodeNum = FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum; } } @@ -793,14 +769,14 @@ namespace PlantHeatExchangerFluidToFluid { MyFlag(CompNum) = false; } // plant setup - if (BeginEnvrnFlag && MyEnvrnFlag(CompNum) && (PlantFirstSizesOkayToFinalize)) { + if (DataGlobals::BeginEnvrnFlag && MyEnvrnFlag(CompNum) && (DataPlant::PlantFirstSizesOkayToFinalize)) { - rho = GetDensityGlycol(PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, - PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, RoutineNameNoColon); FluidHX(CompNum).DemandSideLoop.MassFlowRateMax = rho * FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate; - InitComponentNodes(FluidHX(CompNum).DemandSideLoop.MassFlowRateMin, + PlantUtilities::InitComponentNodes(FluidHX(CompNum).DemandSideLoop.MassFlowRateMin, FluidHX(CompNum).DemandSideLoop.MassFlowRateMax, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, @@ -809,12 +785,12 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.BranchNum, FluidHX(CompNum).DemandSideLoop.CompNum); - rho = GetDensityGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineNameNoColon); FluidHX(CompNum).SupplySideLoop.MassFlowRateMax = rho * FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; - InitComponentNodes(FluidHX(CompNum).SupplySideLoop.MassFlowRateMin, + PlantUtilities::InitComponentNodes(FluidHX(CompNum).SupplySideLoop.MassFlowRateMin, FluidHX(CompNum).SupplySideLoop.MassFlowRateMax, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, @@ -824,12 +800,12 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.CompNum); MyEnvrnFlag(CompNum) = false; } - if (!BeginEnvrnFlag) { + if (!DataGlobals::BeginEnvrnFlag) { MyEnvrnFlag(CompNum) = true; } - FluidHX(CompNum).DemandSideLoop.InletTemp = Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; - FluidHX(CompNum).SupplySideLoop.InletTemp = Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp; + FluidHX(CompNum).DemandSideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; + FluidHX(CompNum).SupplySideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp; if (FluidHX(CompNum).ControlMode == CoolingSetPointOnOffWithComponentOverride) { // store current value for setpoint in central plant loop data structure @@ -838,8 +814,8 @@ namespace PlantHeatExchangerFluidToFluid { BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum; LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.CompNum; - PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMinCntrlTemp = - Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint - FluidHX(CompNum).TempControlTol; // issue #5626, include control tolerance + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMinCntrlTemp = + DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint - FluidHX(CompNum).TempControlTol; // issue #5626, include control tolerance } } @@ -861,18 +837,6 @@ namespace PlantHeatExchangerFluidToFluid { // the UA is sized for an effectiveness of 1.0 using sizing temps // the capacity uses the full HX model - using namespace DataSizing; - using DataHVACGlobals::SmallWaterVolFlow; - using DataPlant::PlantFinalSizesOkayToReport; - using DataPlant::PlantFirstSizesOkayToReport; - using FluidProperties::GetDensityGlycol; - using FluidProperties::GetSpecificHeatGlycol; - using OutputReportPredefined::pdchMechNomCap; - using OutputReportPredefined::pdchMechType; - using OutputReportPredefined::PreDefTableEntry; - using PlantUtilities::RegisterPlantCompDesignFlow; - using ReportSizingManager::ReportSizingOutput; - static std::string const RoutineName("SizeFluidHeatExchanger"); int PltSizNumSupSide; // Plant Sizing index for Loop Supply Side @@ -891,64 +855,64 @@ namespace PlantHeatExchangerFluidToFluid { // first deal with Loop Supply Side ErrorsFound = false; - PltSizNumSupSide = PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).PlantSizNum; - PltSizNumDmdSide = PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).PlantSizNum; + PltSizNumSupSide = DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).PlantSizNum; + PltSizNumDmdSide = DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).PlantSizNum; tmpSupSideDesignVolFlowRate = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; if (FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRateWasAutoSized) { if (PltSizNumSupSide > 0) { - if (PlantSizData(PltSizNumSupSide).DesVolFlowRate >= SmallWaterVolFlow) { - tmpSupSideDesignVolFlowRate = PlantSizData(PltSizNumSupSide).DesVolFlowRate * FluidHX(CompNum).SizingFactor; - if (PlantFirstSizesOkayToFinalize) FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; + if (DataSizing::PlantSizData(PltSizNumSupSide).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { + tmpSupSideDesignVolFlowRate = DataSizing::PlantSizData(PltSizNumSupSide).DesVolFlowRate * FluidHX(CompNum).SizingFactor; + if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; } else { tmpSupSideDesignVolFlowRate = 0.0; - if (PlantFirstSizesOkayToFinalize) FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; } - if (PlantFinalSizesOkayToReport) { - ReportSizingOutput("HeatExchanger:FluidToFluid", + if (DataPlant::PlantFinalSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Loop Supply Side Design Fluid Flow Rate [m3/s]", FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate); } - if (PlantFirstSizesOkayToReport) { - ReportSizingOutput("HeatExchanger:FluidToFluid", + if (DataPlant::PlantFirstSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Initial Loop Supply Side Design Fluid Flow Rate [m3/s]", FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate); } } else { - if (PlantFirstSizesOkayToFinalize) { + if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("SizeFluidHeatExchanger: Autosizing of requires a loop Sizing:Plant object"); ShowContinueError("Occurs in heat exchanger object=" + FluidHX(CompNum).Name); ErrorsFound = true; } } } - RegisterPlantCompDesignFlow(FluidHX(CompNum).SupplySideLoop.InletNodeNum, tmpSupSideDesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).SupplySideLoop.InletNodeNum, tmpSupSideDesignVolFlowRate); // second deal with Loop Demand Side tmpDmdSideDesignVolFlowRate = FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate; if (FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRateWasAutoSized) { - if (tmpSupSideDesignVolFlowRate > SmallWaterVolFlow) { + if (tmpSupSideDesignVolFlowRate > DataHVACGlobals::SmallWaterVolFlow) { tmpDmdSideDesignVolFlowRate = tmpSupSideDesignVolFlowRate; - if (PlantFirstSizesOkayToFinalize) FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; } else { tmpDmdSideDesignVolFlowRate = 0.0; - if (PlantFirstSizesOkayToFinalize) FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; } - if (PlantFinalSizesOkayToReport) { - ReportSizingOutput("HeatExchanger:FluidToFluid", + if (DataPlant::PlantFinalSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Loop Demand Side Design Fluid Flow Rate [m3/s]", FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate); } - if (PlantFirstSizesOkayToReport) { - ReportSizingOutput("HeatExchanger:FluidToFluid", + if (DataPlant::PlantFirstSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Initial Loop Demand Side Design Fluid Flow Rate [m3/s]", FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate); } } - RegisterPlantCompDesignFlow(FluidHX(CompNum).DemandSideLoop.InletNodeNum, tmpDmdSideDesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).DemandSideLoop.InletNodeNum, tmpDmdSideDesignVolFlowRate); // size UA if needed tmpUA = FluidHX(CompNum).UA; @@ -957,66 +921,66 @@ namespace PlantHeatExchangerFluidToFluid { if (PltSizNumSupSide > 0 && PltSizNumDmdSide > 0) { { - auto const SELECT_CASE_var(PlantSizData(PltSizNumSupSide).LoopType); - - if (SELECT_CASE_var == HeatingLoop) { - tmpDeltaTloopToLoop = std::abs((PlantSizData(PltSizNumSupSide).ExitTemp - PlantSizData(PltSizNumSupSide).DeltaT) - - PlantSizData(PltSizNumDmdSide).ExitTemp); - } else if (SELECT_CASE_var == CoolingLoop) { - tmpDeltaTloopToLoop = std::abs((PlantSizData(PltSizNumSupSide).ExitTemp + PlantSizData(PltSizNumSupSide).DeltaT) - - PlantSizData(PltSizNumDmdSide).ExitTemp); - } else if (SELECT_CASE_var == CondenserLoop) { - tmpDeltaTloopToLoop = std::abs((PlantSizData(PltSizNumSupSide).ExitTemp + PlantSizData(PltSizNumSupSide).DeltaT) - - PlantSizData(PltSizNumDmdSide).ExitTemp); - } else if (SELECT_CASE_var == SteamLoop) { - tmpDeltaTloopToLoop = std::abs((PlantSizData(PltSizNumSupSide).ExitTemp - PlantSizData(PltSizNumSupSide).DeltaT) - - PlantSizData(PltSizNumDmdSide).ExitTemp); + auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); + + if (SELECT_CASE_var == DataSizing::HeatingLoop) { + tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - + DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); + } else if (SELECT_CASE_var == DataSizing::CoolingLoop) { + tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - + DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); + } else if (SELECT_CASE_var == DataSizing::CondenserLoop) { + tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - + DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); + } else if (SELECT_CASE_var == DataSizing::SteamLoop) { + tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - + DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); } else { assert(false); } } tmpDeltaTloopToLoop = max(2.0, tmpDeltaTloopToLoop); - tmpDeltaTSupLoop = PlantSizData(PltSizNumSupSide).DeltaT; - if (tmpSupSideDesignVolFlowRate >= SmallWaterVolFlow) { + tmpDeltaTSupLoop = DataSizing::PlantSizData(PltSizNumSupSide).DeltaT; + if (tmpSupSideDesignVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { - Cp = GetSpecificHeatGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineName); - rho = GetDensityGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineName); tmpDesCap = Cp * rho * tmpDeltaTSupLoop * tmpSupSideDesignVolFlowRate; tmpUA = tmpDesCap / tmpDeltaTloopToLoop; - if (PlantFirstSizesOkayToFinalize) FluidHX(CompNum).UA = tmpUA; + if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).UA = tmpUA; } else { tmpUA = 0.0; - if (PlantFirstSizesOkayToFinalize) FluidHX(CompNum).UA = tmpUA; + if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).UA = tmpUA; } - if (PlantFinalSizesOkayToReport) { - ReportSizingOutput( + if (DataPlant::PlantFinalSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput( "HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Heat Exchanger U-Factor Times Area Value [W/C]", FluidHX(CompNum).UA); - ReportSizingOutput("HeatExchanger:FluidToFluid", + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", tmpDeltaTloopToLoop); } - if (PlantFirstSizesOkayToReport) { - ReportSizingOutput("HeatExchanger:FluidToFluid", + if (DataPlant::PlantFirstSizesOkayToReport) { + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Initial Heat Exchanger U-Factor Times Area Value [W/C]", FluidHX(CompNum).UA); - ReportSizingOutput("HeatExchanger:FluidToFluid", + ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Initial Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", tmpDeltaTloopToLoop); } } else { - if (PlantFirstSizesOkayToFinalize) { + if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("SizeFluidHeatExchanger: Autosizing of heat Exchanger UA requires a loop Sizing:Plant objects for both loops"); ShowContinueError("Occurs in heat exchanger object=" + FluidHX(CompNum).Name); ErrorsFound = true; @@ -1025,71 +989,71 @@ namespace PlantHeatExchangerFluidToFluid { } // size capacities for load range based op schemes - if (PlantFirstSizesOkayToFinalize) { + if (DataPlant::PlantFirstSizesOkayToFinalize) { if (PltSizNumSupSide > 0) { { - auto const SELECT_CASE_var(PlantSizData(PltSizNumSupSide).LoopType); - if (SELECT_CASE_var == HeatingLoop) { - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (PlantSizData(PltSizNumSupSide).ExitTemp - PlantSizData(PltSizNumSupSide).DeltaT); - } else if (SELECT_CASE_var == CoolingLoop) { - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (PlantSizData(PltSizNumSupSide).ExitTemp + PlantSizData(PltSizNumSupSide).DeltaT); - } else if (SELECT_CASE_var == CondenserLoop) { - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (PlantSizData(PltSizNumSupSide).ExitTemp + PlantSizData(PltSizNumSupSide).DeltaT); - } else if (SELECT_CASE_var == SteamLoop) { - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (PlantSizData(PltSizNumSupSide).ExitTemp - PlantSizData(PltSizNumSupSide).DeltaT); + auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); + if (SELECT_CASE_var == DataSizing::HeatingLoop) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); + } else if (SELECT_CASE_var == DataSizing::CoolingLoop) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); + } else if (SELECT_CASE_var == DataSizing::CondenserLoop) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); + } else if (SELECT_CASE_var == DataSizing::SteamLoop) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); } } } else { // don't rely on sizing, use loop setpoints // loop supply side - if (PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).LoopDemandCalcScheme == SingleSetPoint) { - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - Node(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPoint; - } else if (PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).LoopDemandCalcScheme == DualSetPointDeadBand) { - Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (Node(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPointHi + - Node(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPointLo) / + if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPoint; + } else if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPointLo) / 2.0; } } if (PltSizNumDmdSide > 0) { - Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = PlantSizData(PltSizNumDmdSide).ExitTemp; + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp; } else { // don't rely on sizing, use loop setpoints // loop demand side - if (PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).LoopDemandCalcScheme == SingleSetPoint) { - Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = - Node(PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPoint; - } else if (PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).LoopDemandCalcScheme == DualSetPointDeadBand) { - Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = - (Node(PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPointHi + - Node(PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPointLo) / + if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPoint; + } else if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = + (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPointLo) / 2.0; } } - rho = GetDensityGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineName); SupSideMdot = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate * rho; - rho = GetDensityGlycol(PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, - PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, RoutineName); DmdSideMdot = FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate * rho; CalcFluidHeatExchanger(CompNum, SupSideMdot, DmdSideMdot); FluidHX(CompNum).SupplySideLoop.MaxLoad = std::abs(FluidHX(CompNum).HeatTransferRate); } - if (PlantFinalSizesOkayToReport) { - PreDefTableEntry(pdchMechType, FluidHX(CompNum).Name, "HeatExchanger:FluidToFluid"); - PreDefTableEntry(pdchMechNomCap, FluidHX(CompNum).Name, FluidHX(CompNum).SupplySideLoop.MaxLoad); + if (DataPlant::PlantFinalSizesOkayToReport) { + OutputReportPredefined::PreDefTableEntry(OutputReportPredefined::pdchMechType, FluidHX(CompNum).Name, "HeatExchanger:FluidToFluid"); + OutputReportPredefined::PreDefTableEntry(OutputReportPredefined::pdchMechNomCap, FluidHX(CompNum).Name, FluidHX(CompNum).SupplySideLoop.MaxLoad); } } @@ -1108,15 +1072,7 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // long CASE statement for different control options - - using DataBranchAirLoopPlant::MassFlowTolerance; - using DataEnvironment::OutDryBulbTemp; - using DataEnvironment::OutWetBulbTemp; - using DataHVACGlobals::SmallLoad; - using FluidProperties::GetSpecificHeatGlycol; - using PlantUtilities::SetComponentFlowRate; - using ScheduleManager::GetCurrentScheduleValue; - + static std::string const RoutineName("ControlFluidHeatExchanger"); Real64 AvailSchedValue; @@ -1139,7 +1095,7 @@ namespace PlantHeatExchangerFluidToFluid { bool ChillerShutDown; // check if available by schedule - AvailSchedValue = GetCurrentScheduleValue(FluidHX(CompNum).AvailSchedNum); + AvailSchedValue = ScheduleManager::GetCurrentScheduleValue(FluidHX(CompNum).AvailSchedNum); if (AvailSchedValue <= 0) { ScheduledOff = true; } else { @@ -1148,12 +1104,12 @@ namespace PlantHeatExchangerFluidToFluid { // check if operational limits trip off unit LimitTrippedOff = false; - if ((Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp) || - (Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp)) { + if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp) || + (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp)) { LimitTrippedOff = true; } - if ((Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp) || - (Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp)) { + if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp) || + (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp)) { LimitTrippedOff = true; } @@ -1166,20 +1122,20 @@ namespace PlantHeatExchangerFluidToFluid { // make passive request for supply side loop flow mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1189,30 +1145,30 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == OperationSchemeModulated) { - if (std::abs(MyLoad) > SmallLoad) { - if (MyLoad < -1.0 * SmallLoad) { // requesting cooling + if (std::abs(MyLoad) > DataHVACGlobals::SmallLoad) { + if (MyLoad < -1.0 * DataHVACGlobals::SmallLoad) { // requesting cooling DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow - cp = GetSpecificHeatGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, FluidHX(CompNum).SupplySideLoop.InletTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineName); TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1222,7 +1178,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // not able to cool so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1236,7 +1192,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1249,24 +1205,24 @@ namespace PlantHeatExchangerFluidToFluid { DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { - cp = GetSpecificHeatGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { + cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, FluidHX(CompNum).SupplySideLoop.InletTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineName); TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1276,7 +1232,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // not able to heat so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1290,7 +1246,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1302,7 +1258,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { // no load mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1310,7 +1266,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1320,25 +1276,25 @@ namespace PlantHeatExchangerFluidToFluid { } } else if (SELECT_CASE_var == OperationSchemeOnOff) { - if (std::abs(MyLoad) > SmallLoad) { - if (MyLoad < SmallLoad) { // requesting cooling + if (std::abs(MyLoad) > DataHVACGlobals::SmallLoad) { + if (MyLoad < DataHVACGlobals::SmallLoad) { // requesting cooling DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1347,7 +1303,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.CompNum); } else { // not able to cool so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1361,7 +1317,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1374,19 +1330,19 @@ namespace PlantHeatExchangerFluidToFluid { DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1395,7 +1351,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.CompNum); } else { // not able to heat so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1409,7 +1365,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1421,7 +1377,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { // no load mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1429,7 +1385,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1440,25 +1396,25 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == HeatingSetPointModulated) { - SetPointTemp = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTemp > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTemp; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1468,7 +1424,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // not able are wanting to heat so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1482,7 +1438,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1493,24 +1449,24 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == HeatingSetPointOnOff) { - SetPointTemp = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTemp > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1519,7 +1475,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.CompNum); } else { // not able or are wanting to heat so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1533,7 +1489,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1544,24 +1500,24 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == CoolingSetPointModulated) { - SetPointTemp = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTemp < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTemp; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1571,7 +1527,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1585,7 +1541,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1596,24 +1552,24 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == CoolingSetPointOnOff) { - SetPointTemp = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTemp < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1622,7 +1578,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.CompNum); } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1636,7 +1592,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1647,8 +1603,8 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == DualDeadBandSetPointModulated) { - SetPointTempLo = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; - SetPointTempHi = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; + SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; + SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; DeltaTCoolSetPointDemand = SetPointTempHi - FluidHX(CompNum).DemandSideLoop.InletTemp; DeltaTCoolSetPointSupply = SetPointTempHi - FluidHX(CompNum).SupplySideLoop.InletTemp; @@ -1659,19 +1615,19 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTempHi; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1682,19 +1638,19 @@ namespace PlantHeatExchangerFluidToFluid { } else if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTempLo > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTempLo; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1704,7 +1660,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // not able or don't want conditioning mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1718,7 +1674,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1729,26 +1685,26 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == DualDeadBandSetPointOnOff) { - SetPointTempLo = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; - SetPointTempHi = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; + SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; + SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTempHi < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1758,19 +1714,19 @@ namespace PlantHeatExchangerFluidToFluid { } else if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTempLo > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1779,7 +1735,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.CompNum); } else { // not able or don't want conditioning mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1793,7 +1749,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1808,19 +1764,19 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1829,7 +1785,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.CompNum); } else { // not wanting to cool so turn off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1843,7 +1799,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1857,21 +1813,21 @@ namespace PlantHeatExchangerFluidToFluid { { auto const SELECT_CASE_var1(FluidHX(CompNum).ControlSignalTemp); if (SELECT_CASE_var1 == WetBulbTemperature) { - ControlSignalValue = OutWetBulbTemp; + ControlSignalValue = DataEnvironment::OutWetBulbTemp; } else if (SELECT_CASE_var1 == DryBulbTemperature) { - ControlSignalValue = OutDryBulbTemp; + ControlSignalValue = DataEnvironment::OutDryBulbTemp; } else if (SELECT_CASE_var1 == LoopTemperature) { // ControlSignalValue = FluidHX(CompNum)%DemandSideLoop%InletTemp - ControlSignalValue = Node(FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum).TempLastTimestep; + ControlSignalValue = DataLoopNode::Node(FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum).TempLastTimestep; } else { assert(false); } } - SetPointTemp = Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; DeltaTCooling = SetPointTemp - ControlSignalValue; // obtain shut down state - ChillerShutDown = PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum) + ChillerShutDown = DataPlant::PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum) .LoopSide(FluidHX(CompNum).OtherCompSupplySideLoop.LoopSideNum) .Branch(FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum) .Comp(FluidHX(CompNum).OtherCompSupplySideLoop.CompNum) @@ -1879,19 +1835,19 @@ namespace PlantHeatExchangerFluidToFluid { if (ChillerShutDown && (DeltaTCooling > FluidHX(CompNum).TempControlTol)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - if (mdotSupSide > MassFlowTolerance) { + if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1901,7 +1857,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1915,7 +1871,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; } - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1928,7 +1884,7 @@ namespace PlantHeatExchangerFluidToFluid { } else { // scheduled off mdotSupSide = 0.0; - SetComponentFlowRate(mdotSupSide, + PlantUtilities::SetComponentFlowRate(mdotSupSide, FluidHX(CompNum).SupplySideLoop.InletNodeNum, FluidHX(CompNum).SupplySideLoop.OutletNodeNum, FluidHX(CompNum).SupplySideLoop.LoopNum, @@ -1936,7 +1892,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); mdotDmdSide = 0.0; - SetComponentFlowRate(mdotDmdSide, + PlantUtilities::SetComponentFlowRate(mdotDmdSide, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -1963,10 +1919,7 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // apply heat transfer model depending on type of HX used - - using DataLoopNode::Node; - using FluidProperties::GetSpecificHeatGlycol; - + int const CmaxMixedCminUnmixed(40); int const CmaxUnMixedCminMixed(41); static std::string const RoutineName("CalcFluidHeatExchanger"); @@ -1987,16 +1940,16 @@ namespace PlantHeatExchangerFluidToFluid { Real64 HeatTransferRate; int CrossFlowEquation; - SupSideLoopInletTemp = Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp; - DmdSideLoopInletTemp = Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; + SupSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp; + DmdSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; - SupSideLoopInletCp = GetSpecificHeatGlycol(PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, SupSideLoopInletTemp, - PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, RoutineName); - DmdSideLoopInletCp = GetSpecificHeatGlycol(PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, + DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, DmdSideLoopInletTemp, - PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, RoutineName); SupSideCapRate = SupSideMdot * SupSideLoopInletCp; @@ -2014,8 +1967,8 @@ namespace PlantHeatExchangerFluidToFluid { CapRatio = MinCapRate / MaxCapRate; ExpCheckValue1 = std::pow(NTU, 0.22) / CapRatio; ExpCheckValue2 = -CapRatio * std::pow(NTU, 0.78); - if ((ExpCheckValue1 > EXP_UpperLimit) || (ExpCheckValue2 > EXP_UpperLimit)) { - if (-NTU >= EXP_LowerLimit) { + if ((ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) || (ExpCheckValue2 > DataPrecisionGlobals::EXP_UpperLimit)) { + if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { @@ -2031,14 +1984,14 @@ namespace PlantHeatExchangerFluidToFluid { CapRatio = MinCapRate / MaxCapRate; ExpCheckValue1 = -CapRatio * NTU; ExpCheckValue2 = -NTU; - if (ExpCheckValue1 < EXP_LowerLimit) { - if (ExpCheckValue2 >= EXP_LowerLimit) { + if (ExpCheckValue1 < DataPrecisionGlobals::EXP_LowerLimit) { + if (ExpCheckValue2 >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { Effectiveness = 1.0; } - } else if (ExpCheckValue2 < EXP_LowerLimit) { + } else if (ExpCheckValue2 < DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0; } else if ((std::exp(-NTU) == 1.0) || (NTU == 0.0) || (std::exp(-CapRatio * NTU) == 1.0)) { // don't div by zero @@ -2068,13 +2021,13 @@ namespace PlantHeatExchangerFluidToFluid { if (CrossFlowEquation == CmaxMixedCminUnmixed) { ExpCheckValue1 = -NTU; if (CapRatio == 0.0) { // protect div by zero - if (ExpCheckValue1 >= EXP_LowerLimit) { + if (ExpCheckValue1 >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { Effectiveness = 1.0; } - } else if (ExpCheckValue1 < EXP_LowerLimit) { + } else if (ExpCheckValue1 < DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 0.632 / CapRatio; Effectiveness = min(1.0, Effectiveness); } else { @@ -2084,16 +2037,16 @@ namespace PlantHeatExchangerFluidToFluid { } else if (CrossFlowEquation == CmaxUnMixedCminMixed) { ExpCheckValue1 = -CapRatio * NTU; if (CapRatio == 0.0) { - if (-NTU >= EXP_LowerLimit) { + if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { Effectiveness = 1.0; } } else { - if (ExpCheckValue1 >= EXP_LowerLimit) { + if (ExpCheckValue1 >= DataPrecisionGlobals::EXP_LowerLimit) { ExpCheckValue2 = -(1.0 / CapRatio) * (1.0 - std::exp(-CapRatio * NTU)); - if (ExpCheckValue2 < EXP_LowerLimit) { + if (ExpCheckValue2 < DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0; } else { Effectiveness = 1.0 - std::exp(ExpCheckValue2); @@ -2111,15 +2064,15 @@ namespace PlantHeatExchangerFluidToFluid { NTU = FluidHX(CompNum).UA / MinCapRate; CapRatio = MinCapRate / MaxCapRate; ExpCheckValue1 = -NTU * (1.0 - CapRatio); - if (ExpCheckValue1 > EXP_UpperLimit) { - if (-NTU >= EXP_LowerLimit) { + if (ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) { + if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { Effectiveness = 1.0; } } else if (CapRatio * std::exp(-NTU * (1.0 - CapRatio)) == 1.0) { - if (-NTU >= EXP_LowerLimit) { + if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { @@ -2134,8 +2087,8 @@ namespace PlantHeatExchangerFluidToFluid { NTU = FluidHX(CompNum).UA / MinCapRate; CapRatio = MinCapRate / MaxCapRate; ExpCheckValue1 = -NTU * (1.0 + CapRatio); - if (ExpCheckValue1 > EXP_UpperLimit) { - if (-NTU >= EXP_LowerLimit) { + if (ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) { + if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); Effectiveness = min(1.0, Effectiveness); } else { @@ -2191,13 +2144,8 @@ namespace PlantHeatExchangerFluidToFluid { // modulate demand side flow rate to hit a target leaving temperature (within tolerance) // METHODOLOGY EMPLOYED: - // uses E+'s Regula Falsi numercial method - - using DataGlobals::WarmupFlag; - using General::RoundSigDigits; - using General::SolveRoot; - using PlantUtilities::SetComponentFlowRate; - + // uses E+'s Regula Falsi numerical method + int const MaxIte(500); // Maximum number of iterations for solver Real64 const Acc(1.e-3); // Accuracy of solver result @@ -2209,7 +2157,7 @@ namespace PlantHeatExchangerFluidToFluid { Real64 SupSideMdot; // mass flow rate of fluid entering from supply side loop Real64 DmdSideMdot; // mass flow rate of fluid entering from demand side loop - SupSideMdot = Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate; + SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate; // first see if root is bracketed // min demand flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; @@ -2230,7 +2178,7 @@ namespace PlantHeatExchangerFluidToFluid { Par(1) = double(CompNum); // HX index Par(2) = TargetSupplySideLoopLeavingTemp; - SolveRoot(Acc, + General::SolveRoot(Acc, MaxIte, SolFla, DmdSideMdot, @@ -2240,13 +2188,13 @@ namespace PlantHeatExchangerFluidToFluid { Par); if (SolFla == -1) { // no convergence - if (!WarmupFlag) { + if (!DataGlobals::WarmupFlag) { if (FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount < 1) { ++FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount; ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Iteration Limit exceeded calculating demand side loop flow rate"); ShowContinueError("Simulation continues with calculated demand side mass flow rate = " + - RoundSigDigits(DmdSideMdot, 7)); + General::RoundSigDigits(DmdSideMdot, 7)); } ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Iteration Limit exceeded calculating demand side loop flow rate continues.", @@ -2257,13 +2205,13 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SolFla == -2) { // f(x0) and f(x1) have the same sign DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax * (LeavingTempFullFlow - TargetSupplySideLoopLeavingTemp) / (LeavingTempFullFlow - LeavingTempMinFlow); - if (!WarmupFlag) { + if (!DataGlobals::WarmupFlag) { if (FluidHX(CompNum).DmdSideModulatSolvFailErrorCount < 1) { ++FluidHX(CompNum).DmdSideModulatSolvFailErrorCount; ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Solver failed to calculate demand side loop flow rate"); ShowContinueError("Simulation continues with estimated demand side mass flow rate = " + - RoundSigDigits(DmdSideMdot, 7)); + General::RoundSigDigits(DmdSideMdot, 7)); } ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Solver failed to calculate demand side loop flow rate continues.", @@ -2272,7 +2220,7 @@ namespace PlantHeatExchangerFluidToFluid { DmdSideMdot); } } - SetComponentFlowRate(DmdSideMdot, + PlantUtilities::SetComponentFlowRate(DmdSideMdot, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -2283,7 +2231,7 @@ namespace PlantHeatExchangerFluidToFluid { } else if ((TargetSupplySideLoopLeavingTemp >= LeavingTempFullFlow) && (LeavingTempFullFlow > LeavingTempMinFlow)) { // run at full flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; - SetComponentFlowRate(DmdSideMdot, + PlantUtilities::SetComponentFlowRate(DmdSideMdot, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -2295,7 +2243,7 @@ namespace PlantHeatExchangerFluidToFluid { // run at min flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; - SetComponentFlowRate(DmdSideMdot, + PlantUtilities::SetComponentFlowRate(DmdSideMdot, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -2309,7 +2257,7 @@ namespace PlantHeatExchangerFluidToFluid { Par(1) = double(CompNum); // HX index Par(2) = TargetSupplySideLoopLeavingTemp; - SolveRoot(Acc, + General::SolveRoot(Acc, MaxIte, SolFla, DmdSideMdot, @@ -2319,13 +2267,13 @@ namespace PlantHeatExchangerFluidToFluid { Par); if (SolFla == -1) { // no convergence - if (!WarmupFlag) { + if (!DataGlobals::WarmupFlag) { if (FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount < 1) { ++FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount; ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Iteration Limit exceeded calculating demand side loop flow rate"); ShowContinueError("Simulation continues with calculated demand side mass flow rate = " + - RoundSigDigits(DmdSideMdot, 7)); + General::RoundSigDigits(DmdSideMdot, 7)); } ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Iteration Limit exceeded calculating demand side loop flow rate continues.", @@ -2336,13 +2284,13 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SolFla == -2) { // f(x0) and f(x1) have the same sign DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax * (LeavingTempFullFlow - TargetSupplySideLoopLeavingTemp) / (LeavingTempFullFlow - LeavingTempMinFlow); - if (!WarmupFlag) { + if (!DataGlobals::WarmupFlag) { if (FluidHX(CompNum).DmdSideModulatSolvFailErrorCount < 1) { ++FluidHX(CompNum).DmdSideModulatSolvFailErrorCount; ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Solver failed to calculate demand side loop flow rate"); ShowContinueError("Simulation continues with estimated demand side mass flow rate = " + - RoundSigDigits(DmdSideMdot, 7)); + General::RoundSigDigits(DmdSideMdot, 7)); } ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + " - Solver failed to calculate demand side loop flow rate continues.", @@ -2351,7 +2299,7 @@ namespace PlantHeatExchangerFluidToFluid { DmdSideMdot); } } - SetComponentFlowRate(DmdSideMdot, + PlantUtilities::SetComponentFlowRate(DmdSideMdot, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -2361,7 +2309,7 @@ namespace PlantHeatExchangerFluidToFluid { } else if ((TargetSupplySideLoopLeavingTemp <= LeavingTempFullFlow) && (LeavingTempFullFlow < LeavingTempMinFlow)) { // run at full flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; - SetComponentFlowRate(DmdSideMdot, + PlantUtilities::SetComponentFlowRate(DmdSideMdot, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -2372,7 +2320,7 @@ namespace PlantHeatExchangerFluidToFluid { // run at min flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; - SetComponentFlowRate(DmdSideMdot, + PlantUtilities::SetComponentFlowRate(DmdSideMdot, FluidHX(CompNum).DemandSideLoop.InletNodeNum, FluidHX(CompNum).DemandSideLoop.OutletNodeNum, FluidHX(CompNum).DemandSideLoop.LoopNum, @@ -2397,9 +2345,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS FUNCTION: // calculate residual value for regula falsi solver - - using PlantUtilities::SetComponentFlowRate; - + Real64 Residuum; // Residual to be minimized to zero int CompNum; @@ -2409,7 +2355,7 @@ namespace PlantHeatExchangerFluidToFluid { MdotTrial = DmdSideMassFlowRate; CompNum = int(Par(1)); - SupSideMdot = Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate; + SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate; CalcFluidHeatExchanger(CompNum, SupSideMdot, MdotTrial); @@ -2432,8 +2378,8 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // update calculate results - Node(FluidHX(CompNum).DemandSideLoop.OutletNodeNum).Temp = FluidHX(CompNum).DemandSideLoop.OutletTemp; - Node(FluidHX(CompNum).SupplySideLoop.OutletNodeNum).Temp = FluidHX(CompNum).SupplySideLoop.OutletTemp; + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.OutletNodeNum).Temp = FluidHX(CompNum).DemandSideLoop.OutletTemp; + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.OutletNodeNum).Temp = FluidHX(CompNum).SupplySideLoop.OutletTemp; } void ReportFluidHeatExchanger(int const CompNum) @@ -2448,13 +2394,9 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // update heat exchanger report variables - using DataGlobals::SecInHour; - using DataHVACGlobals::SmallLoad; - using DataHVACGlobals::TimeStepSys; - - FluidHX(CompNum).HeatTransferEnergy = FluidHX(CompNum).HeatTransferRate * TimeStepSys * SecInHour; + FluidHX(CompNum).HeatTransferEnergy = FluidHX(CompNum).HeatTransferRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - if ((std::abs(FluidHX(CompNum).HeatTransferRate) > SmallLoad) && (FluidHX(CompNum).DemandSideLoop.InletMassFlowRate > 0.0) && + if ((std::abs(FluidHX(CompNum).HeatTransferRate) > DataHVACGlobals::SmallLoad) && (FluidHX(CompNum).DemandSideLoop.InletMassFlowRate > 0.0) && (FluidHX(CompNum).SupplySideLoop.InletMassFlowRate > 0.0)) { FluidHX(CompNum).OperationStatus = 1.0; } else { From e8ddc35822223e413b67382c0e375155ad778728 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 10:34:35 -0700 Subject: [PATCH 76/86] step 3 - cleanup warnings --- .../PlantHeatExchangerFluidToFluid.cc | 35 +++---------------- .../PlantHeatExchangerFluidToFluid.hh | 29 ++++++++------- 2 files changed, 19 insertions(+), 45 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 77d7e5c42ca..7a0f5bf948c 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -672,7 +672,7 @@ namespace PlantHeatExchangerFluidToFluid { if (FluidHX(CompNum).SupplySideLoop.LoopNum == FluidHX(CompNum).DemandSideLoop.LoopNum) { // user is being too tricky, don't allow ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); - ShowContinueError("The \"Loop Supply Side\" and \"Loop Demand Side\" need to be on different loops."); + ShowContinueError(R"(The "Loop Supply Side" and "Loop Demand Side" need to be on different loops.)"); errFlag = true; } else { @@ -846,7 +846,6 @@ namespace PlantHeatExchangerFluidToFluid { Real64 tmpUA; Real64 tmpDeltaTSupLoop; Real64 tmpDeltaTloopToLoop(0.0); - bool ErrorsFound; Real64 Cp; Real64 rho; Real64 tmpDesCap; @@ -854,7 +853,6 @@ namespace PlantHeatExchangerFluidToFluid { Real64 DmdSideMdot; // first deal with Loop Supply Side - ErrorsFound = false; PltSizNumSupSide = DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).PlantSizNum; PltSizNumDmdSide = DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).PlantSizNum; tmpSupSideDesignVolFlowRate = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; @@ -883,7 +881,6 @@ namespace PlantHeatExchangerFluidToFluid { if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("SizeFluidHeatExchanger: Autosizing of requires a loop Sizing:Plant object"); ShowContinueError("Occurs in heat exchanger object=" + FluidHX(CompNum).Name); - ErrorsFound = true; } } } @@ -915,7 +912,6 @@ namespace PlantHeatExchangerFluidToFluid { PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).DemandSideLoop.InletNodeNum, tmpDmdSideDesignVolFlowRate); // size UA if needed - tmpUA = FluidHX(CompNum).UA; if (FluidHX(CompNum).UAWasAutoSized) { // get nominal delta T between two loops if (PltSizNumSupSide > 0 && PltSizNumDmdSide > 0) { @@ -923,18 +919,12 @@ namespace PlantHeatExchangerFluidToFluid { { auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); - if (SELECT_CASE_var == DataSizing::HeatingLoop) { + if ((SELECT_CASE_var == DataSizing::HeatingLoop) || (SELECT_CASE_var == DataSizing::SteamLoop)) { tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); - } else if (SELECT_CASE_var == DataSizing::CoolingLoop) { - tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - - DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); - } else if (SELECT_CASE_var == DataSizing::CondenserLoop) { + } else if ((SELECT_CASE_var == DataSizing::CoolingLoop) || (SELECT_CASE_var == DataSizing::CondenserLoop)) { tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); - } else if (SELECT_CASE_var == DataSizing::SteamLoop) { - tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - - DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); } else { assert(false); } @@ -983,7 +973,6 @@ namespace PlantHeatExchangerFluidToFluid { if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("SizeFluidHeatExchanger: Autosizing of heat Exchanger UA requires a loop Sizing:Plant objects for both loops"); ShowContinueError("Occurs in heat exchanger object=" + FluidHX(CompNum).Name); - ErrorsFound = true; } } } @@ -994,18 +983,12 @@ namespace PlantHeatExchangerFluidToFluid { if (PltSizNumSupSide > 0) { { auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); - if (SELECT_CASE_var == DataSizing::HeatingLoop) { + if ((SELECT_CASE_var == DataSizing::HeatingLoop) || (SELECT_CASE_var == DataSizing::SteamLoop)) { DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); - } else if (SELECT_CASE_var == DataSizing::CoolingLoop) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); - } else if (SELECT_CASE_var == DataSizing::CondenserLoop) { + } else if ((SELECT_CASE_var == DataSizing::CoolingLoop) || (SELECT_CASE_var == DataSizing::CondenserLoop)) { DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); - } else if (SELECT_CASE_var == DataSizing::SteamLoop) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); } } @@ -1082,10 +1065,6 @@ namespace PlantHeatExchangerFluidToFluid { Real64 mdotDmdSide; Real64 DeltaTCooling; Real64 DeltaTHeating; - Real64 DeltaTCoolSetPointDemand; - Real64 DeltaTCoolSetPointSupply; - Real64 DeltaTHeatSetPointDemand; - Real64 DeltaTHeatSetPointSupply; Real64 cp; // specific heat of fluid Real64 TargetLeavingTemp; // target temperature deg. C Real64 SetPointTemp; // temperature setpoint for single setpoint @@ -1606,11 +1585,7 @@ namespace PlantHeatExchangerFluidToFluid { SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - DeltaTCoolSetPointDemand = SetPointTempHi - FluidHX(CompNum).DemandSideLoop.InletTemp; - DeltaTCoolSetPointSupply = SetPointTempHi - FluidHX(CompNum).SupplySideLoop.InletTemp; DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - DeltaTHeatSetPointDemand = SetPointTempLo - FluidHX(CompNum).DemandSideLoop.InletTemp; - DeltaTHeatSetPointSupply = SetPointTempLo - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTempHi < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 6ee12d53da8..6a40d389027 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -155,7 +155,6 @@ namespace PlantHeatExchangerFluidToFluid { PlantConnectionStruct SupplySideLoop; std::string HeatTransferMeteringEndUse; std::string ComponentUserName; // user name for control-associated component - std::string ComponentClassName; // object class name for control-associated component int ComponentTypeOfNum; PlantLocatorStruct OtherCompSupplySideLoop; PlantLocatorStruct OtherCompDemandSideLoop; @@ -184,40 +183,40 @@ namespace PlantHeatExchangerFluidToFluid { // Functions - void SimFluidHeatExchanger(int const LoopNum, // plant loop sim call originated from - int const LoopSideNum, // plant loop side sim call originated from + void SimFluidHeatExchanger(int LoopNum, // plant loop sim call originated from + int LoopSideNum, // plant loop side sim call originated from std::string const &EquipType, // type of equipment, 'PlantComponent:UserDefined' std::string const &EquipName, // user name for component int &CompIndex, bool &InitLoopEquip, - Real64 const MyLoad, + Real64 MyLoad, Real64 &MaxCap, Real64 &MinCap, Real64 &OptCap, - bool const FirstHVACIteration); + bool FirstHVACIteration); void GetFluidHeatExchangerInput(); - void InitFluidHeatExchanger(int const CompNum, int const LoopNum); + void InitFluidHeatExchanger(int CompNum, int LoopNum); - void SizeFluidHeatExchanger(int const CompNum); + void SizeFluidHeatExchanger(int CompNum); - void ControlFluidHeatExchanger(int const CompNum, int const LoopNum, Real64 const MyLoad, bool const FirstHVACIteration); + void ControlFluidHeatExchanger(int CompNum, int LoopNum, Real64 MyLoad, bool FirstHVACIteration); - void CalcFluidHeatExchanger(int const CompNum, - Real64 const SupSideMdot, // mass flow rate of fluid entering from supply side loop - Real64 const DmdSideMdot // mass flow rate of fluid entering from demand side loop + void CalcFluidHeatExchanger(int CompNum, + Real64 SupSideMdot, // mass flow rate of fluid entering from supply side loop + Real64 DmdSideMdot // mass flow rate of fluid entering from demand side loop ); - void FindHXDemandSideLoopFlow(int const CompNum, Real64 const TargetSupplySideLoopLeavingTemp, int const HXActionMode); + void FindHXDemandSideLoopFlow(int CompNum, Real64 TargetSupplySideLoopLeavingTemp, int HXActionMode); - Real64 HXDemandSideLoopFlowResidual(Real64 const DmdSideMassFlowRate, + Real64 HXDemandSideLoopFlowResidual(Real64 DmdSideMassFlowRate, Array1 const &Par // Par(1) = HX index number ); - void UpdateFluidHeatExchanger(int const CompNum); + void UpdateFluidHeatExchanger(int CompNum); - void ReportFluidHeatExchanger(int const CompNum); + void ReportFluidHeatExchanger(int CompNum); } // namespace PlantHeatExchangerFluidToFluid From 2e2105cb4671435bc5cf122b594cfdcc2f4a9def Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 10:45:03 -0700 Subject: [PATCH 77/86] step 4 - remove unused statics --- .../PlantHeatExchangerFluidToFluid.cc | 31 ++++++++----------- .../PlantHeatExchangerFluidToFluid.hh | 6 +++- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 7a0f5bf948c..ec6979a7db6 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -223,13 +223,13 @@ namespace PlantHeatExchangerFluidToFluid { static std::string const RoutineName("GetFluidHeatExchangerInput: "); - static bool ErrorsFound(false); + bool ErrorsFound(false); int NumAlphas; // Number of elements in the alpha array int NumNums; // Number of elements in the numeric array int IOStat; // IO Status when calling get input subroutine - static int MaxNumAlphas(0); // argument for call to GetObjectDefMaxArgs - static int MaxNumNumbers(0); // argument for call to GetObjectDefMaxArgs - static int TotalArgs(0); // argument for call to GetObjectDefMaxArgs + int MaxNumAlphas(0); // argument for call to GetObjectDefMaxArgs + int MaxNumNumbers(0); // argument for call to GetObjectDefMaxArgs + int TotalArgs(0); // argument for call to GetObjectDefMaxArgs Array1D_string cAlphaFieldNames; Array1D_string cNumericFieldNames; Array1D_bool lNumericFieldBlanks; @@ -606,9 +606,6 @@ namespace PlantHeatExchangerFluidToFluid { static std::string const RoutineNameNoColon("InitFluidHeatExchanger"); - static bool MyOneTimeFlag(true); // one time flag - static Array1D_bool MyEnvrnFlag; // environment flag - static Array1D_bool MyFlag; bool errFlag; static std::string const RoutineName("InitFluidHeatExchanger: "); Real64 rho; @@ -617,15 +614,13 @@ namespace PlantHeatExchangerFluidToFluid { int BranchNum; int LoopCompNum; - if (MyOneTimeFlag) { - MyFlag.allocate(NumberOfPlantFluidHXs); - MyEnvrnFlag.allocate(NumberOfPlantFluidHXs); - MyFlag = true; - MyEnvrnFlag = true; - MyOneTimeFlag = false; + if (FluidHX(CompNum).MyOneTimeFlag) { + FluidHX(CompNum).MyFlag = true; + FluidHX(CompNum).MyEnvrnFlag = true; + FluidHX(CompNum).MyOneTimeFlag = false; } - if (MyFlag(CompNum)) { + if (FluidHX(CompNum).MyFlag) { // locate the main two connections to the plant loops errFlag = false; PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, @@ -766,10 +761,10 @@ namespace PlantHeatExchangerFluidToFluid { if (errFlag) { ShowFatalError(RoutineName + "Program terminated due to previous condition(s)."); } - MyFlag(CompNum) = false; + FluidHX(CompNum).MyFlag = false; } // plant setup - if (DataGlobals::BeginEnvrnFlag && MyEnvrnFlag(CompNum) && (DataPlant::PlantFirstSizesOkayToFinalize)) { + if (DataGlobals::BeginEnvrnFlag && FluidHX(CompNum).MyEnvrnFlag && (DataPlant::PlantFirstSizesOkayToFinalize)) { rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, DataGlobals::InitConvTemp, @@ -798,10 +793,10 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.LoopSideNum, FluidHX(CompNum).SupplySideLoop.BranchNum, FluidHX(CompNum).SupplySideLoop.CompNum); - MyEnvrnFlag(CompNum) = false; + FluidHX(CompNum).MyEnvrnFlag = false; } if (!DataGlobals::BeginEnvrnFlag) { - MyEnvrnFlag(CompNum) = true; + FluidHX(CompNum).MyEnvrnFlag = true; } FluidHX(CompNum).DemandSideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 6a40d389027..650093f7839 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -167,13 +167,17 @@ namespace PlantHeatExchangerFluidToFluid { int DmdSideModulatSolvNoConvergeErrorIndex; int DmdSideModulatSolvFailErrorCount; int DmdSideModulatSolvFailErrorIndex; + bool MyOneTimeFlag; + bool MyFlag; + bool MyEnvrnFlag; // Default Constructor HeatExchangerStruct() : AvailSchedNum(0), HeatExchangeModelType(0), UA(0.0), UAWasAutoSized(false), ControlMode(0), SetPointNodeNum(0), TempControlTol(0.0), ControlSignalTemp(0), MinOperationTemp(-99999.0), MaxOperationTemp(99999.0), ComponentTypeOfNum(0), SizingFactor(1.0), HeatTransferRate(0.0), HeatTransferEnergy(0.0), Effectiveness(0.0), OperationStatus(0.0), DmdSideModulatSolvNoConvergeErrorCount(0), - DmdSideModulatSolvNoConvergeErrorIndex(0), DmdSideModulatSolvFailErrorCount(0), DmdSideModulatSolvFailErrorIndex(0) + DmdSideModulatSolvNoConvergeErrorIndex(0), DmdSideModulatSolvFailErrorCount(0), DmdSideModulatSolvFailErrorIndex(0), MyOneTimeFlag(true), + MyFlag(true), MyEnvrnFlag(true) { } }; From cfc07e58f8140432a039a1af37adfe45f6e30a10 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Tue, 7 Jan 2020 11:49:50 -0600 Subject: [PATCH 78/86] Find python3 on env --- scripts/dev/license-check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dev/license-check.py b/scripts/dev/license-check.py index f4bbeae95e3..eb28e107c59 100755 --- a/scripts/dev/license-check.py +++ b/scripts/dev/license-check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import licensetext From 34c262b95fda350d9e73bb6f77b89b57305fd709 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 11:46:26 -0700 Subject: [PATCH 79/86] step 7 - structs inherit PlantLocation --- .../PlantHeatExchangerFluidToFluid.cc | 1084 ++++++++--------- .../PlantHeatExchangerFluidToFluid.hh | 25 +- .../PlantHeatExchangerFluidToFluid.unit.cc | 66 +- 3 files changed, 583 insertions(+), 592 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index ec6979a7db6..e0aa0e07017 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -177,11 +177,11 @@ namespace PlantHeatExchangerFluidToFluid { if (InitLoopEquip) { InitFluidHeatExchanger(CompNum, LoopNum); - if (LoopNum == FluidHX(CompNum).DemandSideLoop.LoopNum) { + if (LoopNum == FluidHX(CompNum).DemandSideLoop.loopNum) { MinCap = 0.0; MaxCap = FluidHX(CompNum).DemandSideLoop.MaxLoad; OptCap = FluidHX(CompNum).DemandSideLoop.MaxLoad * 0.9; - } else if (LoopNum == FluidHX(CompNum).SupplySideLoop.LoopNum) { + } else if (LoopNum == FluidHX(CompNum).SupplySideLoop.loopNum) { SizeFluidHeatExchanger(CompNum); // only call sizing from the loop that sizes are based on MinCap = 0.0; MaxCap = FluidHX(CompNum).SupplySideLoop.MaxLoad; @@ -193,7 +193,7 @@ namespace PlantHeatExchangerFluidToFluid { // for op scheme led HXs, only call controls if called from Loop Supply Side if ((FluidHX(CompNum).ControlMode == OperationSchemeModulated) || (FluidHX(CompNum).ControlMode == OperationSchemeOnOff)) { - if (LoopNum == FluidHX(CompNum).SupplySideLoop.LoopNum) { + if (LoopNum == FluidHX(CompNum).SupplySideLoop.loopNum) { ControlFluidHeatExchanger(CompNum, LoopNum, MyLoad, FirstHVACIteration); } } else { @@ -201,8 +201,8 @@ namespace PlantHeatExchangerFluidToFluid { } CalcFluidHeatExchanger(CompNum, - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate, - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).MassFlowRate); + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate, + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).MassFlowRate); UpdateFluidHeatExchanger(CompNum); @@ -287,9 +287,9 @@ namespace PlantHeatExchangerFluidToFluid { } } - FluidHX(CompLoop).DemandSideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode( + FluidHX(CompLoop).DemandSideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode( cAlphaArgs(3), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); - FluidHX(CompLoop).DemandSideLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode( + FluidHX(CompLoop).DemandSideLoop.outletNodeNum = NodeInputManager::GetOnlySingleNode( cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(3), cAlphaArgs(4), "Loop Demand Side Plant Nodes"); FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRate = rNumericArgs(1); @@ -297,9 +297,9 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRateWasAutoSized = true; } - FluidHX(CompLoop).SupplySideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode( + FluidHX(CompLoop).SupplySideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode( cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 2, DataLoopNode::ObjectIsNotParent); - FluidHX(CompLoop).SupplySideLoop.OutletNodeNum = NodeInputManager::GetOnlySingleNode( + FluidHX(CompLoop).SupplySideLoop.outletNodeNum = NodeInputManager::GetOnlySingleNode( cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 2, DataLoopNode::ObjectIsNotParent); BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(5), cAlphaArgs(6), "Loop Supply Side Plant Nodes"); FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRate = rNumericArgs(2); @@ -447,14 +447,14 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompLoop).HeatTransferMeteringEndUse = cAlphaArgs(10); if (!lAlphaFieldBlanks(11)) { - FluidHX(CompLoop).OtherCompSupplySideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(11), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Actuator, - 1, - DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).OtherCompSupplySideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(11), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Actuator, + 1, + DataLoopNode::ObjectIsNotParent); } else { if (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); @@ -464,14 +464,14 @@ namespace PlantHeatExchangerFluidToFluid { } if (!lAlphaFieldBlanks(12)) { - FluidHX(CompLoop).OtherCompDemandSideLoop.InletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(12), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Actuator, - 1, - DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).OtherCompDemandSideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(12), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Actuator, + 1, + DataLoopNode::ObjectIsNotParent); } else { if (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); @@ -625,18 +625,18 @@ namespace PlantHeatExchangerFluidToFluid { errFlag = false; PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, DataPlant::TypeOf_FluidToFluidPlantHtExchg, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, + FluidHX(CompNum).DemandSideLoop.inletNodeNum, _); - if (FluidHX(CompNum).DemandSideLoop.LoopSideNum != DataPlant::DemandSide) { // throw error + if (FluidHX(CompNum).DemandSideLoop.loopSideNum != DataPlant::DemandSide) { // throw error ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); ShowContinueError("The \"Loop Demand Side\" connections are not on the Demand Side of a plant loop"); @@ -645,18 +645,18 @@ namespace PlantHeatExchangerFluidToFluid { PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, DataPlant::TypeOf_FluidToFluidPlantHtExchg, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, + FluidHX(CompNum).SupplySideLoop.inletNodeNum, _); - if (FluidHX(CompNum).SupplySideLoop.LoopSideNum != DataPlant::SupplySide) { // throw error + if (FluidHX(CompNum).SupplySideLoop.loopSideNum != DataPlant::SupplySide) { // throw error ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); ShowContinueError("The \"Loop Supply Side\" connections are not on the Supply Side of a plant loop"); @@ -664,17 +664,17 @@ namespace PlantHeatExchangerFluidToFluid { } // make sure it is not the same loop on both sides. - if (FluidHX(CompNum).SupplySideLoop.LoopNum == FluidHX(CompNum).DemandSideLoop.LoopNum) { // user is being too tricky, don't allow + if (FluidHX(CompNum).SupplySideLoop.loopNum == FluidHX(CompNum).DemandSideLoop.loopNum) { // user is being too tricky, don't allow ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + FluidHX(CompNum).Name + "\""); ShowContinueError(R"(The "Loop Supply Side" and "Loop Demand Side" need to be on different loops.)"); errFlag = true; } else { - PlantUtilities::InterConnectTwoPlantLoopSides(FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, + PlantUtilities::InterConnectTwoPlantLoopSides(FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, DataPlant::TypeOf_FluidToFluidPlantHtExchg, true); } @@ -683,24 +683,24 @@ namespace PlantHeatExchangerFluidToFluid { if (FluidHX(CompNum).ControlMode == CoolingSetPointOnOffWithComponentOverride) { PlantUtilities::ScanPlantLoopsForNodeNum(RoutineName, - FluidHX(CompNum).OtherCompSupplySideLoop.InletNodeNum, - FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum, - FluidHX(CompNum).OtherCompSupplySideLoop.LoopSideNum, - FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum, - FluidHX(CompNum).OtherCompSupplySideLoop.CompNum); + FluidHX(CompNum).OtherCompSupplySideLoop.inletNodeNum, + FluidHX(CompNum).OtherCompSupplySideLoop.loopNum, + FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum, + FluidHX(CompNum).OtherCompSupplySideLoop.branchNum, + FluidHX(CompNum).OtherCompSupplySideLoop.compNum); PlantUtilities::ScanPlantLoopsForNodeNum(RoutineName, - FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum, - FluidHX(CompNum).OtherCompDemandSideLoop.LoopNum, - FluidHX(CompNum).OtherCompDemandSideLoop.LoopSideNum, - FluidHX(CompNum).OtherCompDemandSideLoop.BranchNum, - FluidHX(CompNum).OtherCompDemandSideLoop.CompNum); + FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum, + FluidHX(CompNum).OtherCompDemandSideLoop.loopNum, + FluidHX(CompNum).OtherCompDemandSideLoop.loopSideNum, + FluidHX(CompNum).OtherCompDemandSideLoop.branchNum, + FluidHX(CompNum).OtherCompDemandSideLoop.compNum); // revise how loads served category for other controlled equipment - LoopNum2 = FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum; - LoopSideNum = FluidHX(CompNum).OtherCompSupplySideLoop.LoopSideNum; - BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum; - LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.CompNum; + LoopNum2 = FluidHX(CompNum).OtherCompSupplySideLoop.loopNum; + LoopSideNum = FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum; + BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.branchNum; + LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.compNum; { auto const SELECT_CASE_var(DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed); @@ -723,37 +723,37 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == LoopTemperature) { DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_Loop; DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlNodeNum = - FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum; + FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum; } } } if (FluidHX(CompNum).ControlMode == TrackComponentOnOff) { - if (FluidHX(CompNum).OtherCompSupplySideLoop.InletNodeNum > 0) { + if (FluidHX(CompNum).OtherCompSupplySideLoop.inletNodeNum > 0) { PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).ComponentUserName, FluidHX(CompNum).ComponentTypeOfNum, - FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum, - FluidHX(CompNum).OtherCompSupplySideLoop.LoopSideNum, - FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum, - FluidHX(CompNum).OtherCompSupplySideLoop.CompNum, + FluidHX(CompNum).OtherCompSupplySideLoop.loopNum, + FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum, + FluidHX(CompNum).OtherCompSupplySideLoop.branchNum, + FluidHX(CompNum).OtherCompSupplySideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).OtherCompSupplySideLoop.InletNodeNum, + FluidHX(CompNum).OtherCompSupplySideLoop.inletNodeNum, _); } - if (FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum > 0) { + if (FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum > 0) { PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).ComponentUserName, FluidHX(CompNum).ComponentTypeOfNum, - FluidHX(CompNum).OtherCompDemandSideLoop.LoopNum, - FluidHX(CompNum).OtherCompDemandSideLoop.LoopSideNum, - FluidHX(CompNum).OtherCompDemandSideLoop.BranchNum, - FluidHX(CompNum).OtherCompDemandSideLoop.CompNum, + FluidHX(CompNum).OtherCompDemandSideLoop.loopNum, + FluidHX(CompNum).OtherCompDemandSideLoop.loopSideNum, + FluidHX(CompNum).OtherCompDemandSideLoop.branchNum, + FluidHX(CompNum).OtherCompDemandSideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum, + FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum, _); } } @@ -766,48 +766,48 @@ namespace PlantHeatExchangerFluidToFluid { if (DataGlobals::BeginEnvrnFlag && FluidHX(CompNum).MyEnvrnFlag && (DataPlant::PlantFirstSizesOkayToFinalize)) { - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, RoutineNameNoColon); FluidHX(CompNum).DemandSideLoop.MassFlowRateMax = rho * FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate; PlantUtilities::InitComponentNodes(FluidHX(CompNum).DemandSideLoop.MassFlowRateMin, FluidHX(CompNum).DemandSideLoop.MassFlowRateMax, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); - - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); + + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineNameNoColon); FluidHX(CompNum).SupplySideLoop.MassFlowRateMax = rho * FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; PlantUtilities::InitComponentNodes(FluidHX(CompNum).SupplySideLoop.MassFlowRateMin, FluidHX(CompNum).SupplySideLoop.MassFlowRateMax, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); FluidHX(CompNum).MyEnvrnFlag = false; } if (!DataGlobals::BeginEnvrnFlag) { FluidHX(CompNum).MyEnvrnFlag = true; } - FluidHX(CompNum).DemandSideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; - FluidHX(CompNum).SupplySideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp; + FluidHX(CompNum).DemandSideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp; + FluidHX(CompNum).SupplySideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp; if (FluidHX(CompNum).ControlMode == CoolingSetPointOnOffWithComponentOverride) { // store current value for setpoint in central plant loop data structure - LoopNum2 = FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum; - LoopSideNum = FluidHX(CompNum).OtherCompSupplySideLoop.LoopSideNum; - BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum; - LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.CompNum; + LoopNum2 = FluidHX(CompNum).OtherCompSupplySideLoop.loopNum; + LoopSideNum = FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum; + BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.branchNum; + LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.compNum; DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMinCntrlTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint - FluidHX(CompNum).TempControlTol; // issue #5626, include control tolerance @@ -848,8 +848,8 @@ namespace PlantHeatExchangerFluidToFluid { Real64 DmdSideMdot; // first deal with Loop Supply Side - PltSizNumSupSide = DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).PlantSizNum; - PltSizNumDmdSide = DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).PlantSizNum; + PltSizNumSupSide = DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).PlantSizNum; + PltSizNumDmdSide = DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).PlantSizNum; tmpSupSideDesignVolFlowRate = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; if (FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRateWasAutoSized) { if (PltSizNumSupSide > 0) { @@ -879,7 +879,7 @@ namespace PlantHeatExchangerFluidToFluid { } } } - PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).SupplySideLoop.InletNodeNum, tmpSupSideDesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).SupplySideLoop.inletNodeNum, tmpSupSideDesignVolFlowRate); // second deal with Loop Demand Side tmpDmdSideDesignVolFlowRate = FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate; @@ -904,7 +904,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate); } } - PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).DemandSideLoop.InletNodeNum, tmpDmdSideDesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).DemandSideLoop.inletNodeNum, tmpDmdSideDesignVolFlowRate); // size UA if needed if (FluidHX(CompNum).UAWasAutoSized) { @@ -929,14 +929,14 @@ namespace PlantHeatExchangerFluidToFluid { tmpDeltaTSupLoop = DataSizing::PlantSizData(PltSizNumSupSide).DeltaT; if (tmpSupSideDesignVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { - Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); tmpDesCap = Cp * rho * tmpDeltaTSupLoop * tmpSupSideDesignVolFlowRate; @@ -979,50 +979,50 @@ namespace PlantHeatExchangerFluidToFluid { { auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); if ((SELECT_CASE_var == DataSizing::HeatingLoop) || (SELECT_CASE_var == DataSizing::SteamLoop)) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); } else if ((SELECT_CASE_var == DataSizing::CoolingLoop) || (SELECT_CASE_var == DataSizing::CondenserLoop)) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); } } } else { // don't rely on sizing, use loop setpoints // loop supply side - if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPoint; - } else if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp = - (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPointHi + - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).TempSetPointNodeNum).TempSetPointLo) / - 2.0; + if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; + } else if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = + (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / + 2.0; } } if (PltSizNumDmdSide > 0) { - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp; + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp = DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp; } else { // don't rely on sizing, use loop setpoints // loop demand side - if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPoint; - } else if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp = - (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPointHi + - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).TempSetPointNodeNum).TempSetPointLo) / - 2.0; + if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp = + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; + } else if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp = + (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / + 2.0; } } - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); SupSideMdot = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate * rho; - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, RoutineName); DmdSideMdot = FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate * rho; @@ -1078,12 +1078,12 @@ namespace PlantHeatExchangerFluidToFluid { // check if operational limits trip off unit LimitTrippedOff = false; - if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp) || - (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp)) { + if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp) || + (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp)) { LimitTrippedOff = true; } - if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp) || - (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp)) { + if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp) || + (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp)) { LimitTrippedOff = true; } @@ -1097,12 +1097,12 @@ namespace PlantHeatExchangerFluidToFluid { // make passive request for supply side loop flow mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; @@ -1110,12 +1110,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else if (SELECT_CASE_var == OperationSchemeModulated) { @@ -1125,17 +1125,17 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow - cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, FluidHX(CompNum).SupplySideLoop.InletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); @@ -1143,22 +1143,22 @@ namespace PlantHeatExchangerFluidToFluid { } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); } } else { // not able to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1167,12 +1167,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); } } else { // requesting heating @@ -1180,16 +1180,16 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, FluidHX(CompNum).SupplySideLoop.InletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); @@ -1197,22 +1197,22 @@ namespace PlantHeatExchangerFluidToFluid { } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else { // not able to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1221,32 +1221,32 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } } else { // no load mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == OperationSchemeOnOff) { @@ -1256,12 +1256,12 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { @@ -1269,21 +1269,21 @@ namespace PlantHeatExchangerFluidToFluid { } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { // not able to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1292,12 +1292,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else { // requesting heating @@ -1305,33 +1305,33 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { // not able to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1340,32 +1340,32 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } } else { // no load mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == HeatingSetPointModulated) { @@ -1376,12 +1376,12 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTemp; @@ -1389,22 +1389,22 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else { // not able are wanting to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1413,12 +1413,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == HeatingSetPointOnOff) { @@ -1429,33 +1429,33 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { // not able or are wanting to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1464,12 +1464,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointModulated) { @@ -1480,34 +1480,34 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTemp; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1516,12 +1516,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointOnOff) { @@ -1532,33 +1532,33 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1567,12 +1567,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == DualDeadBandSetPointModulated) { @@ -1586,57 +1586,57 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTempHi; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTempLo > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { TargetLeavingTemp = SetPointTempLo; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else { // not able or don't want conditioning mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1645,12 +1645,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == DualDeadBandSetPointOnOff) { @@ -1663,55 +1663,55 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTempLo > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { // not able or don't want conditioning mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1720,12 +1720,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingDifferentialOnOff) { @@ -1735,33 +1735,33 @@ namespace PlantHeatExchangerFluidToFluid { // want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { // not wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1770,12 +1770,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointOnOffWithComponentOverride) { @@ -1788,7 +1788,7 @@ namespace PlantHeatExchangerFluidToFluid { ControlSignalValue = DataEnvironment::OutDryBulbTemp; } else if (SELECT_CASE_var1 == LoopTemperature) { // ControlSignalValue = FluidHX(CompNum)%DemandSideLoop%InletTemp - ControlSignalValue = DataLoopNode::Node(FluidHX(CompNum).OtherCompDemandSideLoop.InletNodeNum).TempLastTimestep; + ControlSignalValue = DataLoopNode::Node(FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum).TempLastTimestep; } else { assert(false); } @@ -1797,43 +1797,43 @@ namespace PlantHeatExchangerFluidToFluid { SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; DeltaTCooling = SetPointTemp - ControlSignalValue; // obtain shut down state - ChillerShutDown = DataPlant::PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.LoopNum) - .LoopSide(FluidHX(CompNum).OtherCompSupplySideLoop.LoopSideNum) - .Branch(FluidHX(CompNum).OtherCompSupplySideLoop.BranchNum) - .Comp(FluidHX(CompNum).OtherCompSupplySideLoop.CompNum) + ChillerShutDown = DataPlant::PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.loopNum) + .LoopSide(FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum) + .Branch(FluidHX(CompNum).OtherCompSupplySideLoop.branchNum) + .Comp(FluidHX(CompNum).OtherCompSupplySideLoop.compNum) .FreeCoolCntrlShutDown; if (ChillerShutDown && (DeltaTCooling > FluidHX(CompNum).TempControlTol)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else { mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1842,12 +1842,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } } @@ -1855,20 +1855,20 @@ namespace PlantHeatExchangerFluidToFluid { } else { // scheduled off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.InletNodeNum, - FluidHX(CompNum).SupplySideLoop.OutletNodeNum, - FluidHX(CompNum).SupplySideLoop.LoopNum, - FluidHX(CompNum).SupplySideLoop.LoopSideNum, - FluidHX(CompNum).SupplySideLoop.BranchNum, - FluidHX(CompNum).SupplySideLoop.CompNum); + FluidHX(CompNum).SupplySideLoop.inletNodeNum, + FluidHX(CompNum).SupplySideLoop.outletNodeNum, + FluidHX(CompNum).SupplySideLoop.loopNum, + FluidHX(CompNum).SupplySideLoop.loopSideNum, + FluidHX(CompNum).SupplySideLoop.branchNum, + FluidHX(CompNum).SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } @@ -1910,16 +1910,16 @@ namespace PlantHeatExchangerFluidToFluid { Real64 HeatTransferRate; int CrossFlowEquation; - SupSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).Temp; - DmdSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.InletNodeNum).Temp; + SupSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp; + DmdSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp; - SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidName, + SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, SupSideLoopInletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); - DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidName, + DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, DmdSideLoopInletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.LoopNum).FluidIndex, + DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, RoutineName); SupSideCapRate = SupSideMdot * SupSideLoopInletCp; @@ -2127,7 +2127,7 @@ namespace PlantHeatExchangerFluidToFluid { Real64 SupSideMdot; // mass flow rate of fluid entering from supply side loop Real64 DmdSideMdot; // mass flow rate of fluid entering from demand side loop - SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate; + SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; // first see if root is bracketed // min demand flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; @@ -2191,35 +2191,35 @@ namespace PlantHeatExchangerFluidToFluid { } } PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else if ((TargetSupplySideLoopLeavingTemp >= LeavingTempFullFlow) && (LeavingTempFullFlow > LeavingTempMinFlow)) { // run at full flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else if (LeavingTempMinFlow >= TargetSupplySideLoopLeavingTemp) { // run at min flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSupplySideLoop) { if ((LeavingTempFullFlow < TargetSupplySideLoopLeavingTemp) && (TargetSupplySideLoopLeavingTemp < LeavingTempMinFlow)) { @@ -2270,33 +2270,33 @@ namespace PlantHeatExchangerFluidToFluid { } } PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else if ((TargetSupplySideLoopLeavingTemp <= LeavingTempFullFlow) && (LeavingTempFullFlow < LeavingTempMinFlow)) { // run at full flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } else if (LeavingTempMinFlow <= TargetSupplySideLoopLeavingTemp) { // run at min flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.InletNodeNum, - FluidHX(CompNum).DemandSideLoop.OutletNodeNum, - FluidHX(CompNum).DemandSideLoop.LoopNum, - FluidHX(CompNum).DemandSideLoop.LoopSideNum, - FluidHX(CompNum).DemandSideLoop.BranchNum, - FluidHX(CompNum).DemandSideLoop.CompNum); + FluidHX(CompNum).DemandSideLoop.inletNodeNum, + FluidHX(CompNum).DemandSideLoop.outletNodeNum, + FluidHX(CompNum).DemandSideLoop.loopNum, + FluidHX(CompNum).DemandSideLoop.loopSideNum, + FluidHX(CompNum).DemandSideLoop.branchNum, + FluidHX(CompNum).DemandSideLoop.compNum); } } } @@ -2325,7 +2325,7 @@ namespace PlantHeatExchangerFluidToFluid { MdotTrial = DmdSideMassFlowRate; CompNum = int(Par(1)); - SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.InletNodeNum).MassFlowRate; + SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; CalcFluidHeatExchanger(CompNum, SupSideMdot, MdotTrial); @@ -2348,8 +2348,8 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // update calculate results - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.OutletNodeNum).Temp = FluidHX(CompNum).DemandSideLoop.OutletTemp; - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.OutletNodeNum).Temp = FluidHX(CompNum).SupplySideLoop.OutletTemp; + DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.outletNodeNum).Temp = FluidHX(CompNum).DemandSideLoop.OutletTemp; + DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.outletNodeNum).Temp = FluidHX(CompNum).SupplySideLoop.OutletTemp; } void ReportFluidHeatExchanger(int const CompNum) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 650093f7839..fe6e1937739 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -54,6 +54,7 @@ // EnergyPlus Headers #include #include +#include namespace EnergyPlus { @@ -92,15 +93,11 @@ namespace PlantHeatExchangerFluidToFluid { extern bool GetInput; extern Array1D_bool CheckFluidHXs; - struct PlantConnectionStruct + struct PlantConnectionStruct : PlantLocation { // Members - int LoopNum; // plant loop connection index - int LoopSideNum; // plant loop side connection index - int BranchNum; // plant loop branch connection index - int CompNum; // plant loop component connection index - int InletNodeNum; // plant loop inlet node index - int OutletNodeNum; // plant loop outlet node index + int inletNodeNum; // plant loop inlet node index + int outletNodeNum; // plant loop outlet node index Real64 MassFlowRateMin; // minimum (hardware) flow rate for component [kg/s] Real64 MassFlowRateMax; // maximum (hardware) flow rate for component [kg/s] Real64 DesignVolumeFlowRate; // design flow rate [m3/s] @@ -111,28 +108,24 @@ namespace PlantHeatExchangerFluidToFluid { Real64 OptLoad; // reports back size for load dispatch [W] Real64 InletTemp; // current inlet fluid temperature [C] Real64 InletMassFlowRate; // current inlet mass flow rate [kg/s] - Real64 OutletTemp; // componenent outlet temperature [C] + Real64 OutletTemp; // component outlet temperature [C] // Default Constructor PlantConnectionStruct() - : LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), InletNodeNum(0), OutletNodeNum(0), MassFlowRateMin(0.0), MassFlowRateMax(0.0), + : inletNodeNum(0), outletNodeNum(0), MassFlowRateMin(0.0), MassFlowRateMax(0.0), DesignVolumeFlowRate(0.0), DesignVolumeFlowRateWasAutoSized(false), MyLoad(0.0), MinLoad(0.0), MaxLoad(0.0), OptLoad(0.0), InletTemp(0.0), InletMassFlowRate(0.0), OutletTemp(0.0) { } }; - struct PlantLocatorStruct + struct PlantLocatorStruct : PlantLocation { // Members - int LoopNum; // plant loop connection index - int LoopSideNum; // plant loop side connection index - int BranchNum; // plant loop branch connection index - int CompNum; // plant loop component connection index - int InletNodeNum; // plant loop inlet node index + int inletNodeNum; // plant loop inlet node index // Default Constructor - PlantLocatorStruct() : LoopNum(0), LoopSideNum(0), BranchNum(0), CompNum(0), InletNodeNum(0) + PlantLocatorStruct() : inletNodeNum(0) { } }; diff --git a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc index 6619289a818..ceb53a8ee01 100644 --- a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc +++ b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc @@ -52,9 +52,7 @@ #include "Fixtures/EnergyPlusFixture.hh" #include -#include #include -//#include #include #include #include @@ -64,15 +62,15 @@ #include #include #include -#include #include -#include #include #include namespace EnergyPlus { -TEST_F(EnergyPlusFixture, PlantHXModulatedDualDeadDefectFileHi) +class PlantHXFixture : public EnergyPlusFixture {}; + +TEST_F(PlantHXFixture, PlantHXModulatedDualDeadDefectFileHi) { // this unit test was devised for issue #5258 which involves control logic related to plant HX not controlling well when the setpoint cannot be // met this test has complete IDF input to set up a system of four plant loops taken from the PlantLoopChain* integration tests. This test checks @@ -1162,12 +1160,12 @@ TEST_F(EnergyPlusFixture, PlantHXModulatedDualDeadDefectFileHi) EXPECT_NEAR(DataLoopNode::Node(4).Temp, 20.0, 0.01); } -TEST_F(EnergyPlusFixture, PlantHXModulatedDualDeadDefectFileLo) +TEST_F(PlantHXFixture, PlantHXModulatedDualDeadDefectFileLo) { // this unit test was devised for issue #5258 which involves control logic related to plant HX not controlling well when the setpoint cannot be // met this test has complete IDF input to set up a system of four plant loops taken from the PlantLoopChain* integration tests. - // This test checks that the HX will attempt to meet setpoint of 21 when the conditioniong fluid is 20 and cannot really make it to 21. The HX + // This test checks that the HX will attempt to meet setpoint of 21 when the conditioning fluid is 20 and cannot really make it to 21. The HX // still heats up to 20. std::string const idf_objects = delimited_string({ @@ -2256,7 +2254,7 @@ TEST_F(EnergyPlusFixture, PlantHXModulatedDualDeadDefectFileLo) EXPECT_NEAR(DataLoopNode::Node(4).Temp, 20.0, 0.01); } -TEST_F(EnergyPlusFixture, PlantHXControlWithFirstHVACIteration) +TEST_F(PlantHXFixture, PlantHXControlWithFirstHVACIteration) { // this unit test is for issue #4959. Added FirstHVACIteration to simulate and control routines // unit test checks that the change to logic for #4959 does work to affect node mass flow rate. The conditions are set up such that the demand @@ -2284,8 +2282,8 @@ TEST_F(EnergyPlusFixture, PlantHXControlWithFirstHVACIteration) // setup four plant nodes for HX DataLoopNode::Node.allocate(4); - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.InletNodeNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.OutletNodeNum = 3; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.inletNodeNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.outletNodeNum = 3; DataLoopNode::Node(1).Temp = 18.0; DataLoopNode::Node(1).MassFlowRateMaxAvail = 2.0; DataLoopNode::Node(1).MassFlowRateMax = 2.0; @@ -2294,8 +2292,8 @@ TEST_F(EnergyPlusFixture, PlantHXControlWithFirstHVACIteration) PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.InletTemp = 18.0; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.InletNodeNum = 2; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.OutletNodeNum = 4; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.inletNodeNum = 2; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.outletNodeNum = 4; DataLoopNode::Node(2).Temp = 19.0; DataLoopNode::Node(2).MassFlowRateMaxAvail = 2.0; DataLoopNode::Node(2).MassFlowRateMax = 2.0; @@ -2328,22 +2326,22 @@ TEST_F(EnergyPlusFixture, PlantHXControlWithFirstHVACIteration) DataPlant::PlantLoop(1).FluidName = "WATER"; DataPlant::PlantLoop(1).LoopSide(1).Branch(1).Comp(1).Name = PlantHeatExchangerFluidToFluid::FluidHX(1).Name; DataPlant::PlantLoop(1).LoopSide(1).Branch(1).Comp(1).TypeOf_Num = DataPlant::TypeOf_FluidToFluidPlantHtExchg; - DataPlant::PlantLoop(1).LoopSide(1).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.InletNodeNum; - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.LoopNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.LoopSideNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.BranchNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.CompNum = 1; + DataPlant::PlantLoop(1).LoopSide(1).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.inletNodeNum; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.loopNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.loopSideNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.branchNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.compNum = 1; DataPlant::PlantLoop(2).Name = "HX demand side loop "; DataPlant::PlantLoop(2).FluidIndex = 1; DataPlant::PlantLoop(2).FluidName = "WATER"; DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).Name = PlantHeatExchangerFluidToFluid::FluidHX(1).Name; DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).TypeOf_Num = DataPlant::TypeOf_FluidToFluidPlantHtExchg; - DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.InletNodeNum; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.LoopNum = 2; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.LoopSideNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.BranchNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.CompNum = 1; + DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.inletNodeNum; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.loopNum = 2; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.loopSideNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.branchNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.compNum = 1; PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.MassFlowRateMax = 2.0; // when FirstHVACIteration is true, mass flow should match design max @@ -2358,7 +2356,7 @@ TEST_F(EnergyPlusFixture, PlantHXControlWithFirstHVACIteration) EXPECT_NEAR(DataLoopNode::Node(2).MassFlowRate, 0.0, 0.001); } -TEST_F(EnergyPlusFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverride) +TEST_F(PlantHXFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverride) { // this unit test is for issue #5626. Fixed logic for CoolingSetpointOnOffWithComponentOverride. // unit test checks that the change for #5626 adjusts the temperature value used in central plant dispatch routines by the tolerance value. @@ -2383,8 +2381,8 @@ TEST_F(EnergyPlusFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverri // setup four plant nodes for HX DataLoopNode::Node.allocate(6); - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.InletNodeNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.OutletNodeNum = 3; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.inletNodeNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.outletNodeNum = 3; PlantHeatExchangerFluidToFluid::FluidHX(1).SetPointNodeNum = 3; PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.MassFlowRateMax = 2.0; @@ -2396,8 +2394,8 @@ TEST_F(EnergyPlusFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverri PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.InletTemp = 18.0; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.InletNodeNum = 2; - PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.OutletNodeNum = 4; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.inletNodeNum = 2; + PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.outletNodeNum = 4; DataLoopNode::Node(2).Temp = 19.0; DataLoopNode::Node(2).MassFlowRateMaxAvail = 2.0; DataLoopNode::Node(2).MassFlowRateMax = 2.0; @@ -2446,22 +2444,22 @@ TEST_F(EnergyPlusFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverri DataPlant::PlantLoop(1).FluidName = "WATER"; DataPlant::PlantLoop(1).LoopSide(2).Branch(1).Comp(1).Name = PlantHeatExchangerFluidToFluid::FluidHX(1).Name; DataPlant::PlantLoop(1).LoopSide(2).Branch(1).Comp(1).TypeOf_Num = DataPlant::TypeOf_FluidToFluidPlantHtExchg; - DataPlant::PlantLoop(1).LoopSide(2).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.InletNodeNum; + DataPlant::PlantLoop(1).LoopSide(2).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).SupplySideLoop.inletNodeNum; DataPlant::PlantLoop(2).Name = "HX demand side loop "; DataPlant::PlantLoop(2).FluidIndex = 1; DataPlant::PlantLoop(2).FluidName = "WATER"; DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).Name = PlantHeatExchangerFluidToFluid::FluidHX(1).Name; DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).TypeOf_Num = DataPlant::TypeOf_FluidToFluidPlantHtExchg; - DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.InletNodeNum; + DataPlant::PlantLoop(2).LoopSide(1).Branch(1).Comp(1).NodeNumIn = PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.inletNodeNum; PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.MassFlowRateMax = 2.0; PlantHeatExchangerFluidToFluid::FluidHX(1).ControlSignalTemp = PlantHeatExchangerFluidToFluid::DryBulbTemperature; - PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.InletNodeNum = 5; - PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.LoopNum = 1; - PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.LoopSideNum = 2; - PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.BranchNum = 2; - PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.CompNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.inletNodeNum = 5; + PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.loopNum = 1; + PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.loopSideNum = 2; + PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.branchNum = 2; + PlantHeatExchangerFluidToFluid::FluidHX(1).OtherCompSupplySideLoop.compNum = 1; PlantHeatExchangerFluidToFluid::NumberOfPlantFluidHXs = 1; From 6a379edb52e2520f5693364c28891cf58b64eaad Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 11:53:35 -0700 Subject: [PATCH 80/86] step 6 - remove unused externs in header --- .../PlantHeatExchangerFluidToFluid.hh | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index fe6e1937739..2e9d14cf86e 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -60,38 +60,10 @@ namespace EnergyPlus { namespace PlantHeatExchangerFluidToFluid { - extern int const CrossFlowBothUnMixed; - extern int const CrossFlowBothMixed; - extern int const CrossFlowSupplyLoopMixedDemandLoopUnMixed; - extern int const CrossFlowSupplyLoopUnMixedDemandLoopMixed; - extern int const CounterFlow; - extern int const ParallelFlow; - extern int const Ideal; - - extern int const UncontrolledOn; - extern int const OperationSchemeModulated; - extern int const OperationSchemeOnOff; - extern int const HeatingSetPointModulated; - extern int const HeatingSetPointOnOff; - extern int const CoolingSetPointModulated; - extern int const CoolingSetPointOnOff; - extern int const DualDeadBandSetPointModulated; - extern int const DualDeadBandSetPointOnOff; extern int const CoolingDifferentialOnOff; extern int const CoolingSetPointOnOffWithComponentOverride; - extern int const TrackComponentOnOff; - - extern int const WetBulbTemperature; extern int const DryBulbTemperature; - extern int const LoopTemperature; - - extern int const HeatingSupplySideLoop; - extern int const CoolingSupplySideLoop; - - extern std::string ComponentClassName; extern int NumberOfPlantFluidHXs; - extern bool GetInput; - extern Array1D_bool CheckFluidHXs; struct PlantConnectionStruct : PlantLocation { From 734c5176873b238229b882a46cd13bc3cc790598 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 13:26:50 -0700 Subject: [PATCH 81/86] step 8 - cleanup local vars --- .../PlantHeatExchangerFluidToFluid.cc | 198 ++++++++---------- 1 file changed, 85 insertions(+), 113 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index e0aa0e07017..91b30a68491 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -237,8 +237,6 @@ namespace PlantHeatExchangerFluidToFluid { Array1D_string cAlphaArgs; Array1D rNumericArgs; std::string cCurrentModuleObject; - int CompLoop; - bool NodeEMSSetPointMissing; cCurrentModuleObject = "HeatExchanger:FluidToFluid"; @@ -259,7 +257,7 @@ namespace PlantHeatExchangerFluidToFluid { if (NumberOfPlantFluidHXs > 0) { FluidHX.allocate(NumberOfPlantFluidHXs); CheckFluidHXs.dimension(NumberOfPlantFluidHXs, true); - for (CompLoop = 1; CompLoop <= NumberOfPlantFluidHXs; ++CompLoop) { + for (int CompLoop = 1; CompLoop <= NumberOfPlantFluidHXs; ++CompLoop) { inputProcessor->getObjectItem(cCurrentModuleObject, CompLoop, cAlphaArgs, @@ -391,7 +389,7 @@ namespace PlantHeatExchangerFluidToFluid { ErrorsFound = true; } else { // need call to EMS to check node - NodeEMSSetPointMissing = false; + bool NodeEMSSetPointMissing = false; EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureSetPoint, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(RoutineName + " Missing temperature setpoint for node = " + cAlphaArgs(9)); @@ -412,7 +410,7 @@ namespace PlantHeatExchangerFluidToFluid { ErrorsFound = true; } else { // need call to EMS to check node - NodeEMSSetPointMissing = false; + bool NodeEMSSetPointMissing = false; EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMinSetPoint, NodeEMSSetPointMissing); EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMaxSetPoint, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { @@ -520,7 +518,7 @@ namespace PlantHeatExchangerFluidToFluid { ShowFatalError(RoutineName + "Errors found in processing " + cCurrentModuleObject + " input."); } - for (CompLoop = 1; CompLoop <= NumberOfPlantFluidHXs; ++CompLoop) { + for (int CompLoop = 1; CompLoop <= NumberOfPlantFluidHXs; ++CompLoop) { SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Rate", OutputProcessor::Unit::W, @@ -1053,23 +1051,13 @@ namespace PlantHeatExchangerFluidToFluid { static std::string const RoutineName("ControlFluidHeatExchanger"); - Real64 AvailSchedValue; - bool ScheduledOff; - bool LimitTrippedOff; Real64 mdotSupSide; Real64 mdotDmdSide; - Real64 DeltaTCooling; - Real64 DeltaTHeating; - Real64 cp; // specific heat of fluid - Real64 TargetLeavingTemp; // target temperature deg. C - Real64 SetPointTemp; // temperature setpoint for single setpoint - Real64 SetPointTempLo; // low setpoint for dual deadband temperature setpoints - Real64 SetPointTempHi; // High setpoint for dual deadband temperature setpoints Real64 ControlSignalValue(0.0); - bool ChillerShutDown; // check if available by schedule - AvailSchedValue = ScheduleManager::GetCurrentScheduleValue(FluidHX(CompNum).AvailSchedNum); + bool ScheduledOff; + Real64 AvailSchedValue = ScheduleManager::GetCurrentScheduleValue(FluidHX(CompNum).AvailSchedNum); if (AvailSchedValue <= 0) { ScheduledOff = true; } else { @@ -1077,7 +1065,7 @@ namespace PlantHeatExchangerFluidToFluid { } // check if operational limits trip off unit - LimitTrippedOff = false; + bool LimitTrippedOff = false; if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp) || (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp)) { LimitTrippedOff = true; @@ -1121,7 +1109,7 @@ namespace PlantHeatExchangerFluidToFluid { if (std::abs(MyLoad) > DataHVACGlobals::SmallLoad) { if (MyLoad < -1.0 * DataHVACGlobals::SmallLoad) { // requesting cooling - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, @@ -1133,11 +1121,11 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow - cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, FluidHX(CompNum).SupplySideLoop.InletTemp, DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); - TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); + Real64 TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side @@ -1176,7 +1164,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // requesting heating - DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; + Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, @@ -1187,11 +1175,11 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.branchNum, FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, FluidHX(CompNum).SupplySideLoop.InletTemp, DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); - TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); + Real64 TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side @@ -1252,7 +1240,7 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == OperationSchemeOnOff) { if (std::abs(MyLoad) > DataHVACGlobals::SmallLoad) { if (MyLoad < DataHVACGlobals::SmallLoad) { // requesting cooling - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, @@ -1301,7 +1289,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { // requesting heating - DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; + Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, @@ -1370,8 +1358,8 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == HeatingSetPointModulated) { - SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; + Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTemp > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; @@ -1384,7 +1372,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - TargetLeavingTemp = SetPointTemp; + Real64 TargetLeavingTemp = SetPointTemp; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; @@ -1423,8 +1411,8 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == HeatingSetPointOnOff) { - SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; + Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTemp > FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; @@ -1474,8 +1462,8 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == CoolingSetPointModulated) { - SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTemp < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; @@ -1487,7 +1475,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.branchNum, FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - TargetLeavingTemp = SetPointTemp; + Real64 TargetLeavingTemp = SetPointTemp; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; @@ -1526,8 +1514,8 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == CoolingSetPointOnOff) { - SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTemp < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; @@ -1577,10 +1565,10 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == DualDeadBandSetPointModulated) { - SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; - SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; + Real64 SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; + Real64 SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTempHi < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool @@ -1593,7 +1581,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.branchNum, FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - TargetLeavingTemp = SetPointTempHi; + Real64 TargetLeavingTemp = SetPointTempHi; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; @@ -1616,7 +1604,7 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompNum).SupplySideLoop.branchNum, FluidHX(CompNum).SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - TargetLeavingTemp = SetPointTempLo; + Real64 TargetLeavingTemp = SetPointTempLo; FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; @@ -1655,10 +1643,10 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == DualDeadBandSetPointOnOff) { - SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; - SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; + Real64 SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; + Real64 SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTempHi < FluidHX(CompNum).SupplySideLoop.InletTemp)) { // can and want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; @@ -1730,7 +1718,7 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == CoolingDifferentialOnOff) { - DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; + Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // want to cool mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; @@ -1794,10 +1782,10 @@ namespace PlantHeatExchangerFluidToFluid { } } - SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - DeltaTCooling = SetPointTemp - ControlSignalValue; + Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + Real64 DeltaTCooling = SetPointTemp - ControlSignalValue; // obtain shut down state - ChillerShutDown = DataPlant::PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.loopNum) + bool ChillerShutDown = DataPlant::PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.loopNum) .LoopSide(FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum) .Branch(FluidHX(CompNum).OtherCompSupplySideLoop.branchNum) .Comp(FluidHX(CompNum).OtherCompSupplySideLoop.compNum) @@ -1889,43 +1877,33 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // apply heat transfer model depending on type of HX used - + + static std::string const RoutineName("CalcFluidHeatExchanger"); + int const CmaxMixedCminUnmixed(40); int const CmaxUnMixedCminMixed(41); - static std::string const RoutineName("CalcFluidHeatExchanger"); - Real64 SupSideLoopInletTemp; - Real64 DmdSideLoopInletTemp; - Real64 SupSideLoopInletCp; // specific heat of fluid entering from supply side loop at inlet temp - Real64 DmdSideLoopInletCp; // specific heat of fluid entering from demand side loop at inlet temp - Real64 SupSideCapRate; // product of specific heat and mass flow for supply side loop at inlet temp - Real64 DmdSideCapRate; // product of specific heat and mass flow for demand side loop at inlet temp - Real64 MinCapRate; // minimum capacity flow rate - Real64 MaxCapRate; // maximum capacity flow rate - Real64 NTU; // number of transfer units for heat exchanger performance model - Real64 CapRatio; - Real64 ExpCheckValue1; - Real64 ExpCheckValue2; Real64 Effectiveness(0.0); - Real64 HeatTransferRate; - int CrossFlowEquation; - SupSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp; - DmdSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp; + Real64 SupSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp; + Real64 DmdSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp; - SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + // specific heat of fluid entering from supply side loop at inlet temp + Real64 SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, SupSideLoopInletTemp, DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, RoutineName); - DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, + + // specific heat of fluid entering from demand side loop at inlet temp + Real64 DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, DmdSideLoopInletTemp, DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, RoutineName); - SupSideCapRate = SupSideMdot * SupSideLoopInletCp; - DmdSideCapRate = DmdSideMdot * DmdSideLoopInletCp; - MinCapRate = min(SupSideCapRate, DmdSideCapRate); - MaxCapRate = max(SupSideCapRate, DmdSideCapRate); + Real64 SupSideCapRate = SupSideMdot * SupSideLoopInletCp; + Real64 DmdSideCapRate = DmdSideMdot * DmdSideLoopInletCp; + Real64 MinCapRate = min(SupSideCapRate, DmdSideCapRate); + Real64 MaxCapRate = max(SupSideCapRate, DmdSideCapRate); if (MinCapRate > 0.0) { @@ -1933,10 +1911,10 @@ namespace PlantHeatExchangerFluidToFluid { auto const SELECT_CASE_var(FluidHX(CompNum).HeatExchangeModelType); if (SELECT_CASE_var == CrossFlowBothUnMixed) { - NTU = FluidHX(CompNum).UA / MinCapRate; - CapRatio = MinCapRate / MaxCapRate; - ExpCheckValue1 = std::pow(NTU, 0.22) / CapRatio; - ExpCheckValue2 = -CapRatio * std::pow(NTU, 0.78); + Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 CapRatio = MinCapRate / MaxCapRate; + Real64 ExpCheckValue1 = std::pow(NTU, 0.22) / CapRatio; + Real64 ExpCheckValue2 = -CapRatio * std::pow(NTU, 0.78); if ((ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) || (ExpCheckValue2 > DataPrecisionGlobals::EXP_UpperLimit)) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); @@ -1950,10 +1928,10 @@ namespace PlantHeatExchangerFluidToFluid { } } else if (SELECT_CASE_var == CrossFlowBothMixed) { - NTU = FluidHX(CompNum).UA / MinCapRate; - CapRatio = MinCapRate / MaxCapRate; - ExpCheckValue1 = -CapRatio * NTU; - ExpCheckValue2 = -NTU; + Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 CapRatio = MinCapRate / MaxCapRate; + Real64 ExpCheckValue1 = -CapRatio * NTU; + Real64 ExpCheckValue2 = -NTU; if (ExpCheckValue1 < DataPrecisionGlobals::EXP_LowerLimit) { if (ExpCheckValue2 >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); @@ -1974,6 +1952,7 @@ namespace PlantHeatExchangerFluidToFluid { } else if ((SELECT_CASE_var == CrossFlowSupplyLoopMixedDemandLoopUnMixed) || (SELECT_CASE_var == CrossFlowSupplyLoopUnMixedDemandLoopMixed)) { + int CrossFlowEquation; if (SupSideCapRate == MaxCapRate && FluidHX(CompNum).HeatExchangeModelType == CrossFlowSupplyLoopMixedDemandLoopUnMixed) { CrossFlowEquation = CmaxMixedCminUnmixed; } else if (SupSideCapRate == MinCapRate && FluidHX(CompNum).HeatExchangeModelType == CrossFlowSupplyLoopMixedDemandLoopUnMixed) { @@ -1986,10 +1965,10 @@ namespace PlantHeatExchangerFluidToFluid { CrossFlowEquation = CmaxMixedCminUnmixed; } - NTU = FluidHX(CompNum).UA / MinCapRate; - CapRatio = MinCapRate / MaxCapRate; + Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 CapRatio = MinCapRate / MaxCapRate; if (CrossFlowEquation == CmaxMixedCminUnmixed) { - ExpCheckValue1 = -NTU; + Real64 ExpCheckValue1 = -NTU; if (CapRatio == 0.0) { // protect div by zero if (ExpCheckValue1 >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); @@ -2005,7 +1984,7 @@ namespace PlantHeatExchangerFluidToFluid { Effectiveness = min(1.0, Effectiveness); } } else if (CrossFlowEquation == CmaxUnMixedCminMixed) { - ExpCheckValue1 = -CapRatio * NTU; + Real64 ExpCheckValue1 = -CapRatio * NTU; if (CapRatio == 0.0) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); @@ -2015,7 +1994,7 @@ namespace PlantHeatExchangerFluidToFluid { } } else { if (ExpCheckValue1 >= DataPrecisionGlobals::EXP_LowerLimit) { - ExpCheckValue2 = -(1.0 / CapRatio) * (1.0 - std::exp(-CapRatio * NTU)); + Real64 ExpCheckValue2 = -(1.0 / CapRatio) * (1.0 - std::exp(-CapRatio * NTU)); if (ExpCheckValue2 < DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0; } else { @@ -2031,9 +2010,9 @@ namespace PlantHeatExchangerFluidToFluid { } } else if (SELECT_CASE_var == CounterFlow) { - NTU = FluidHX(CompNum).UA / MinCapRate; - CapRatio = MinCapRate / MaxCapRate; - ExpCheckValue1 = -NTU * (1.0 - CapRatio); + Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 CapRatio = MinCapRate / MaxCapRate; + Real64 ExpCheckValue1 = -NTU * (1.0 - CapRatio); if (ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); @@ -2054,9 +2033,9 @@ namespace PlantHeatExchangerFluidToFluid { } } else if (SELECT_CASE_var == ParallelFlow) { - NTU = FluidHX(CompNum).UA / MinCapRate; - CapRatio = MinCapRate / MaxCapRate; - ExpCheckValue1 = -NTU * (1.0 + CapRatio); + Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 CapRatio = MinCapRate / MaxCapRate; + Real64 ExpCheckValue1 = -NTU * (1.0 + CapRatio); if (ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { Effectiveness = 1.0 - std::exp(-NTU); @@ -2080,7 +2059,7 @@ namespace PlantHeatExchangerFluidToFluid { Effectiveness = 0.0; } - HeatTransferRate = Effectiveness * MinCapRate * (SupSideLoopInletTemp - DmdSideLoopInletTemp); // + means supply side is cooled + Real64 HeatTransferRate = Effectiveness * MinCapRate * (SupSideLoopInletTemp - DmdSideLoopInletTemp); // + means supply side is cooled if (SupSideMdot > 0.0) { FluidHX(CompNum).SupplySideLoop.OutletTemp = SupSideLoopInletTemp - HeatTransferRate / (SupSideLoopInletCp * SupSideMdot); @@ -2122,22 +2101,20 @@ namespace PlantHeatExchangerFluidToFluid { int SolFla; // Flag of solver Array1D Par(2); // Parameter array passed to solver - Real64 LeavingTempMinFlow; - Real64 LeavingTempFullFlow; - Real64 SupSideMdot; // mass flow rate of fluid entering from supply side loop - Real64 DmdSideMdot; // mass flow rate of fluid entering from demand side loop - - SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; + // mass flow rate of fluid entering from supply side loop + Real64 SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; // first see if root is bracketed // min demand flow - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; + + // mass flow rate of fluid entering from demand side loop + Real64 DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; CalcFluidHeatExchanger(CompNum, SupSideMdot, DmdSideMdot); - LeavingTempMinFlow = FluidHX(CompNum).SupplySideLoop.OutletTemp; + Real64 LeavingTempMinFlow = FluidHX(CompNum).SupplySideLoop.OutletTemp; // full demand flow DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; CalcFluidHeatExchanger(CompNum, SupSideMdot, DmdSideMdot); - LeavingTempFullFlow = FluidHX(CompNum).SupplySideLoop.OutletTemp; + Real64 LeavingTempFullFlow = FluidHX(CompNum).SupplySideLoop.OutletTemp; { auto const SELECT_CASE_var(HXActionMode); @@ -2318,18 +2295,13 @@ namespace PlantHeatExchangerFluidToFluid { Real64 Residuum; // Residual to be minimized to zero - int CompNum; - Real64 SupSideLoopOutletTemp; - Real64 MdotTrial; - Real64 SupSideMdot; // mass flow rate of fluid entering from supply side loop - - MdotTrial = DmdSideMassFlowRate; - CompNum = int(Par(1)); - SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; + Real64 MdotTrial = DmdSideMassFlowRate; + int CompNum = int(Par(1)); + Real64 SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; CalcFluidHeatExchanger(CompNum, SupSideMdot, MdotTrial); - SupSideLoopOutletTemp = FluidHX(CompNum).SupplySideLoop.OutletTemp; + Real64 SupSideLoopOutletTemp = FluidHX(CompNum).SupplySideLoop.OutletTemp; Residuum = Par(2) - SupSideLoopOutletTemp; From ee7763de63a9fb106c1d724ae45ac2f6042b79c0 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 14:22:34 -0700 Subject: [PATCH 82/86] step 9 - functions to members --- .../PlantHeatExchangerFluidToFluid.cc | 1650 ++++++++--------- .../PlantHeatExchangerFluidToFluid.hh | 35 +- .../PlantHeatExchangerFluidToFluid.unit.cc | 10 +- 3 files changed, 817 insertions(+), 878 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 91b30a68491..6f767657462 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -176,37 +176,32 @@ namespace PlantHeatExchangerFluidToFluid { } if (InitLoopEquip) { - InitFluidHeatExchanger(CompNum, LoopNum); + FluidHX(CompNum).initialize(); if (LoopNum == FluidHX(CompNum).DemandSideLoop.loopNum) { MinCap = 0.0; MaxCap = FluidHX(CompNum).DemandSideLoop.MaxLoad; OptCap = FluidHX(CompNum).DemandSideLoop.MaxLoad * 0.9; } else if (LoopNum == FluidHX(CompNum).SupplySideLoop.loopNum) { - SizeFluidHeatExchanger(CompNum); // only call sizing from the loop that sizes are based on + FluidHX(CompNum).size(); // only call sizing from the loop that sizes are based on MinCap = 0.0; MaxCap = FluidHX(CompNum).SupplySideLoop.MaxLoad; OptCap = FluidHX(CompNum).SupplySideLoop.MaxLoad * 0.9; } } - InitFluidHeatExchanger(CompNum, LoopNum); + FluidHX(CompNum).initialize(); // for op scheme led HXs, only call controls if called from Loop Supply Side if ((FluidHX(CompNum).ControlMode == OperationSchemeModulated) || (FluidHX(CompNum).ControlMode == OperationSchemeOnOff)) { if (LoopNum == FluidHX(CompNum).SupplySideLoop.loopNum) { - ControlFluidHeatExchanger(CompNum, LoopNum, MyLoad, FirstHVACIteration); + FluidHX(CompNum).control(CompNum, LoopNum, MyLoad, FirstHVACIteration); } } else { - ControlFluidHeatExchanger(CompNum, LoopNum, MyLoad, FirstHVACIteration); + FluidHX(CompNum).control(CompNum, LoopNum, MyLoad, FirstHVACIteration); } - CalcFluidHeatExchanger(CompNum, - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate, + FluidHX(CompNum).calculate(DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate, DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).MassFlowRate); - - UpdateFluidHeatExchanger(CompNum); - - ReportFluidHeatExchanger(CompNum); } void GetFluidHeatExchangerInput() @@ -590,7 +585,7 @@ namespace PlantHeatExchangerFluidToFluid { } } - void InitFluidHeatExchanger(int const CompNum, int const EP_UNUSED(LoopNum)) + void HeatExchangerStruct::initialize() { // SUBROUTINE INFORMATION: @@ -603,102 +598,95 @@ namespace PlantHeatExchangerFluidToFluid { // Initialize heat exchanger model static std::string const RoutineNameNoColon("InitFluidHeatExchanger"); - - bool errFlag; static std::string const RoutineName("InitFluidHeatExchanger: "); - Real64 rho; - int LoopNum2; - int LoopSideNum; - int BranchNum; - int LoopCompNum; - - if (FluidHX(CompNum).MyOneTimeFlag) { - FluidHX(CompNum).MyFlag = true; - FluidHX(CompNum).MyEnvrnFlag = true; - FluidHX(CompNum).MyOneTimeFlag = false; + + if (this->MyOneTimeFlag) { + this->MyFlag = true; + this->MyEnvrnFlag = true; + this->MyOneTimeFlag = false; } - if (FluidHX(CompNum).MyFlag) { + if (this->MyFlag) { // locate the main two connections to the plant loops - errFlag = false; - PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, + bool errFlag = false; + PlantUtilities::ScanPlantLoopsForObject(this->Name, DataPlant::TypeOf_FluidToFluidPlantHtExchg, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, + this->DemandSideLoop.inletNodeNum, _); - if (FluidHX(CompNum).DemandSideLoop.loopSideNum != DataPlant::DemandSide) { // throw error + if (this->DemandSideLoop.loopSideNum != DataPlant::DemandSide) { // throw error ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + - FluidHX(CompNum).Name + "\""); + this->Name + "\""); ShowContinueError("The \"Loop Demand Side\" connections are not on the Demand Side of a plant loop"); errFlag = true; } - PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).Name, + PlantUtilities::ScanPlantLoopsForObject(this->Name, DataPlant::TypeOf_FluidToFluidPlantHtExchg, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, + this->SupplySideLoop.inletNodeNum, _); - if (FluidHX(CompNum).SupplySideLoop.loopSideNum != DataPlant::SupplySide) { // throw error + if (this->SupplySideLoop.loopSideNum != DataPlant::SupplySide) { // throw error ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + - FluidHX(CompNum).Name + "\""); + this->Name + "\""); ShowContinueError("The \"Loop Supply Side\" connections are not on the Supply Side of a plant loop"); errFlag = true; } // make sure it is not the same loop on both sides. - if (FluidHX(CompNum).SupplySideLoop.loopNum == FluidHX(CompNum).DemandSideLoop.loopNum) { // user is being too tricky, don't allow + if (this->SupplySideLoop.loopNum == this->DemandSideLoop.loopNum) { // user is being too tricky, don't allow ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + - FluidHX(CompNum).Name + "\""); + this->Name + "\""); ShowContinueError(R"(The "Loop Supply Side" and "Loop Demand Side" need to be on different loops.)"); errFlag = true; } else { - PlantUtilities::InterConnectTwoPlantLoopSides(FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, + PlantUtilities::InterConnectTwoPlantLoopSides(this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, DataPlant::TypeOf_FluidToFluidPlantHtExchg, true); } // find remote component if control mode is of that type. - if (FluidHX(CompNum).ControlMode == CoolingSetPointOnOffWithComponentOverride) { + if (this->ControlMode == CoolingSetPointOnOffWithComponentOverride) { PlantUtilities::ScanPlantLoopsForNodeNum(RoutineName, - FluidHX(CompNum).OtherCompSupplySideLoop.inletNodeNum, - FluidHX(CompNum).OtherCompSupplySideLoop.loopNum, - FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum, - FluidHX(CompNum).OtherCompSupplySideLoop.branchNum, - FluidHX(CompNum).OtherCompSupplySideLoop.compNum); + this->OtherCompSupplySideLoop.inletNodeNum, + this->OtherCompSupplySideLoop.loopNum, + this->OtherCompSupplySideLoop.loopSideNum, + this->OtherCompSupplySideLoop.branchNum, + this->OtherCompSupplySideLoop.compNum); PlantUtilities::ScanPlantLoopsForNodeNum(RoutineName, - FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum, - FluidHX(CompNum).OtherCompDemandSideLoop.loopNum, - FluidHX(CompNum).OtherCompDemandSideLoop.loopSideNum, - FluidHX(CompNum).OtherCompDemandSideLoop.branchNum, - FluidHX(CompNum).OtherCompDemandSideLoop.compNum); + this->OtherCompDemandSideLoop.inletNodeNum, + this->OtherCompDemandSideLoop.loopNum, + this->OtherCompDemandSideLoop.loopSideNum, + this->OtherCompDemandSideLoop.branchNum, + this->OtherCompDemandSideLoop.compNum); // revise how loads served category for other controlled equipment - LoopNum2 = FluidHX(CompNum).OtherCompSupplySideLoop.loopNum; - LoopSideNum = FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum; - BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.branchNum; - LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.compNum; + int LoopNum2 = this->OtherCompSupplySideLoop.loopNum; + int LoopSideNum = this->OtherCompSupplySideLoop.loopSideNum; + int BranchNum = this->OtherCompSupplySideLoop.branchNum; + int LoopCompNum = this->OtherCompSupplySideLoop.compNum; { auto const SELECT_CASE_var(DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed); @@ -713,7 +701,7 @@ namespace PlantHeatExchangerFluidToFluid { } { - auto const SELECT_CASE_var(FluidHX(CompNum).ControlSignalTemp); + auto const SELECT_CASE_var(this->ControlSignalTemp); if (SELECT_CASE_var == WetBulbTemperature) { DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_WetBulb; } else if (SELECT_CASE_var == DryBulbTemperature) { @@ -721,37 +709,37 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == LoopTemperature) { DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_Loop; DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlNodeNum = - FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum; + this->OtherCompDemandSideLoop.inletNodeNum; } } } - if (FluidHX(CompNum).ControlMode == TrackComponentOnOff) { - if (FluidHX(CompNum).OtherCompSupplySideLoop.inletNodeNum > 0) { - PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).ComponentUserName, - FluidHX(CompNum).ComponentTypeOfNum, - FluidHX(CompNum).OtherCompSupplySideLoop.loopNum, - FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum, - FluidHX(CompNum).OtherCompSupplySideLoop.branchNum, - FluidHX(CompNum).OtherCompSupplySideLoop.compNum, + if (this->ControlMode == TrackComponentOnOff) { + if (this->OtherCompSupplySideLoop.inletNodeNum > 0) { + PlantUtilities::ScanPlantLoopsForObject(this->ComponentUserName, + this->ComponentTypeOfNum, + this->OtherCompSupplySideLoop.loopNum, + this->OtherCompSupplySideLoop.loopSideNum, + this->OtherCompSupplySideLoop.branchNum, + this->OtherCompSupplySideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).OtherCompSupplySideLoop.inletNodeNum, + this->OtherCompSupplySideLoop.inletNodeNum, _); } - if (FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum > 0) { - PlantUtilities::ScanPlantLoopsForObject(FluidHX(CompNum).ComponentUserName, - FluidHX(CompNum).ComponentTypeOfNum, - FluidHX(CompNum).OtherCompDemandSideLoop.loopNum, - FluidHX(CompNum).OtherCompDemandSideLoop.loopSideNum, - FluidHX(CompNum).OtherCompDemandSideLoop.branchNum, - FluidHX(CompNum).OtherCompDemandSideLoop.compNum, + if (this->OtherCompDemandSideLoop.inletNodeNum > 0) { + PlantUtilities::ScanPlantLoopsForObject(this->ComponentUserName, + this->ComponentTypeOfNum, + this->OtherCompDemandSideLoop.loopNum, + this->OtherCompDemandSideLoop.loopSideNum, + this->OtherCompDemandSideLoop.branchNum, + this->OtherCompDemandSideLoop.compNum, errFlag, _, _, _, - FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum, + this->OtherCompDemandSideLoop.inletNodeNum, _); } } @@ -759,60 +747,60 @@ namespace PlantHeatExchangerFluidToFluid { if (errFlag) { ShowFatalError(RoutineName + "Program terminated due to previous condition(s)."); } - FluidHX(CompNum).MyFlag = false; + this->MyFlag = false; } // plant setup - if (DataGlobals::BeginEnvrnFlag && FluidHX(CompNum).MyEnvrnFlag && (DataPlant::PlantFirstSizesOkayToFinalize)) { + if (DataGlobals::BeginEnvrnFlag && this->MyEnvrnFlag && (DataPlant::PlantFirstSizesOkayToFinalize)) { - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, RoutineNameNoColon); - FluidHX(CompNum).DemandSideLoop.MassFlowRateMax = rho * FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate; - PlantUtilities::InitComponentNodes(FluidHX(CompNum).DemandSideLoop.MassFlowRateMin, - FluidHX(CompNum).DemandSideLoop.MassFlowRateMax, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); - - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + this->DemandSideLoop.MassFlowRateMax = rho * this->DemandSideLoop.DesignVolumeFlowRate; + PlantUtilities::InitComponentNodes(this->DemandSideLoop.MassFlowRateMin, + this->DemandSideLoop.MassFlowRateMax, + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); + + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineNameNoColon); - FluidHX(CompNum).SupplySideLoop.MassFlowRateMax = rho * FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; - PlantUtilities::InitComponentNodes(FluidHX(CompNum).SupplySideLoop.MassFlowRateMin, - FluidHX(CompNum).SupplySideLoop.MassFlowRateMax, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); - FluidHX(CompNum).MyEnvrnFlag = false; + this->SupplySideLoop.MassFlowRateMax = rho * this->SupplySideLoop.DesignVolumeFlowRate; + PlantUtilities::InitComponentNodes(this->SupplySideLoop.MassFlowRateMin, + this->SupplySideLoop.MassFlowRateMax, + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); + this->MyEnvrnFlag = false; } if (!DataGlobals::BeginEnvrnFlag) { - FluidHX(CompNum).MyEnvrnFlag = true; + this->MyEnvrnFlag = true; } - FluidHX(CompNum).DemandSideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp; - FluidHX(CompNum).SupplySideLoop.InletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp; + this->DemandSideLoop.InletTemp = DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp; + this->SupplySideLoop.InletTemp = DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp; - if (FluidHX(CompNum).ControlMode == CoolingSetPointOnOffWithComponentOverride) { + if (this->ControlMode == CoolingSetPointOnOffWithComponentOverride) { // store current value for setpoint in central plant loop data structure - LoopNum2 = FluidHX(CompNum).OtherCompSupplySideLoop.loopNum; - LoopSideNum = FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum; - BranchNum = FluidHX(CompNum).OtherCompSupplySideLoop.branchNum; - LoopCompNum = FluidHX(CompNum).OtherCompSupplySideLoop.compNum; + int LoopNum2 = this->OtherCompSupplySideLoop.loopNum; + int LoopSideNum = this->OtherCompSupplySideLoop.loopSideNum; + int BranchNum = this->OtherCompSupplySideLoop.branchNum; + int LoopCompNum = this->OtherCompSupplySideLoop.compNum; DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMinCntrlTemp = - DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint - FluidHX(CompNum).TempControlTol; // issue #5626, include control tolerance + DataLoopNode::Node(this->SetPointNodeNum).TempSetPoint - this->TempControlTol; // issue #5626, include control tolerance } } - void SizeFluidHeatExchanger(int const CompNum) + void HeatExchangerStruct::size() { // SUBROUTINE INFORMATION: @@ -832,83 +820,72 @@ namespace PlantHeatExchangerFluidToFluid { static std::string const RoutineName("SizeFluidHeatExchanger"); - int PltSizNumSupSide; // Plant Sizing index for Loop Supply Side - int PltSizNumDmdSide; // plant sizing index for Loop Demand Side - Real64 tmpSupSideDesignVolFlowRate; - Real64 tmpDmdSideDesignVolFlowRate; - Real64 tmpUA; - Real64 tmpDeltaTSupLoop; - Real64 tmpDeltaTloopToLoop(0.0); - Real64 Cp; - Real64 rho; - Real64 tmpDesCap; - Real64 SupSideMdot; - Real64 DmdSideMdot; - // first deal with Loop Supply Side - PltSizNumSupSide = DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).PlantSizNum; - PltSizNumDmdSide = DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).PlantSizNum; - tmpSupSideDesignVolFlowRate = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate; - if (FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRateWasAutoSized) { + int PltSizNumSupSide = DataPlant::PlantLoop(this->SupplySideLoop.loopNum).PlantSizNum; + int PltSizNumDmdSide = DataPlant::PlantLoop(this->DemandSideLoop.loopNum).PlantSizNum; + Real64 tmpSupSideDesignVolFlowRate = this->SupplySideLoop.DesignVolumeFlowRate; + if (this->SupplySideLoop.DesignVolumeFlowRateWasAutoSized) { if (PltSizNumSupSide > 0) { if (DataSizing::PlantSizData(PltSizNumSupSide).DesVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { - tmpSupSideDesignVolFlowRate = DataSizing::PlantSizData(PltSizNumSupSide).DesVolFlowRate * FluidHX(CompNum).SizingFactor; - if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; + tmpSupSideDesignVolFlowRate = DataSizing::PlantSizData(PltSizNumSupSide).DesVolFlowRate * this->SizingFactor; + if (DataPlant::PlantFirstSizesOkayToFinalize) this->SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; } else { tmpSupSideDesignVolFlowRate = 0.0; - if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) this->SupplySideLoop.DesignVolumeFlowRate = tmpSupSideDesignVolFlowRate; } if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Loop Supply Side Design Fluid Flow Rate [m3/s]", - FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate); + this->SupplySideLoop.DesignVolumeFlowRate); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Initial Loop Supply Side Design Fluid Flow Rate [m3/s]", - FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate); + this->SupplySideLoop.DesignVolumeFlowRate); } } else { if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("SizeFluidHeatExchanger: Autosizing of requires a loop Sizing:Plant object"); - ShowContinueError("Occurs in heat exchanger object=" + FluidHX(CompNum).Name); + ShowContinueError("Occurs in heat exchanger object=" + this->Name); } } } - PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).SupplySideLoop.inletNodeNum, tmpSupSideDesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(this->SupplySideLoop.inletNodeNum, tmpSupSideDesignVolFlowRate); // second deal with Loop Demand Side - tmpDmdSideDesignVolFlowRate = FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate; - if (FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRateWasAutoSized) { + Real64 tmpDmdSideDesignVolFlowRate = this->DemandSideLoop.DesignVolumeFlowRate; + if (this->DemandSideLoop.DesignVolumeFlowRateWasAutoSized) { if (tmpSupSideDesignVolFlowRate > DataHVACGlobals::SmallWaterVolFlow) { tmpDmdSideDesignVolFlowRate = tmpSupSideDesignVolFlowRate; - if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) this->DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; } else { tmpDmdSideDesignVolFlowRate = 0.0; - if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) this->DemandSideLoop.DesignVolumeFlowRate = tmpDmdSideDesignVolFlowRate; } if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Loop Demand Side Design Fluid Flow Rate [m3/s]", - FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate); + this->DemandSideLoop.DesignVolumeFlowRate); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Initial Loop Demand Side Design Fluid Flow Rate [m3/s]", - FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate); + this->DemandSideLoop.DesignVolumeFlowRate); } } - PlantUtilities::RegisterPlantCompDesignFlow(FluidHX(CompNum).DemandSideLoop.inletNodeNum, tmpDmdSideDesignVolFlowRate); + PlantUtilities::RegisterPlantCompDesignFlow(this->DemandSideLoop.inletNodeNum, tmpDmdSideDesignVolFlowRate); // size UA if needed - if (FluidHX(CompNum).UAWasAutoSized) { + if (this->UAWasAutoSized) { // get nominal delta T between two loops if (PltSizNumSupSide > 0 && PltSizNumDmdSide > 0) { + Real64 tmpDeltaTloopToLoop(0.0); + { auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); @@ -924,48 +901,46 @@ namespace PlantHeatExchangerFluidToFluid { } tmpDeltaTloopToLoop = max(2.0, tmpDeltaTloopToLoop); - tmpDeltaTSupLoop = DataSizing::PlantSizData(PltSizNumSupSide).DeltaT; + Real64 tmpDeltaTSupLoop = DataSizing::PlantSizData(PltSizNumSupSide).DeltaT; if (tmpSupSideDesignVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { - Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); - tmpDesCap = Cp * rho * tmpDeltaTSupLoop * tmpSupSideDesignVolFlowRate; - tmpUA = tmpDesCap / tmpDeltaTloopToLoop; - if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).UA = tmpUA; + Real64 tmpDesCap = Cp * rho * tmpDeltaTSupLoop * tmpSupSideDesignVolFlowRate; + if (DataPlant::PlantFirstSizesOkayToFinalize) this->UA = tmpDesCap / tmpDeltaTloopToLoop; } else { - tmpUA = 0.0; - if (DataPlant::PlantFirstSizesOkayToFinalize) FluidHX(CompNum).UA = tmpUA; + if (DataPlant::PlantFirstSizesOkayToFinalize) this->UA = 0.0; } if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput( - "HeatExchanger:FluidToFluid", FluidHX(CompNum).Name, "Heat Exchanger U-Factor Times Area Value [W/C]", FluidHX(CompNum).UA); + "HeatExchanger:FluidToFluid", this->Name, "Heat Exchanger U-Factor Times Area Value [W/C]", this->UA); ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", tmpDeltaTloopToLoop); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Initial Heat Exchanger U-Factor Times Area Value [W/C]", - FluidHX(CompNum).UA); + this->UA); ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - FluidHX(CompNum).Name, + this->Name, "Initial Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", tmpDeltaTloopToLoop); } } else { if (DataPlant::PlantFirstSizesOkayToFinalize) { ShowSevereError("SizeFluidHeatExchanger: Autosizing of heat Exchanger UA requires a loop Sizing:Plant objects for both loops"); - ShowContinueError("Occurs in heat exchanger object=" + FluidHX(CompNum).Name); + ShowContinueError("Occurs in heat exchanger object=" + this->Name); } } } @@ -977,63 +952,63 @@ namespace PlantHeatExchangerFluidToFluid { { auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); if ((SELECT_CASE_var == DataSizing::HeatingLoop) || (SELECT_CASE_var == DataSizing::SteamLoop)) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = + DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp = (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); } else if ((SELECT_CASE_var == DataSizing::CoolingLoop) || (SELECT_CASE_var == DataSizing::CondenserLoop)) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = + DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp = (DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT); } } } else { // don't rely on sizing, use loop setpoints // loop supply side - if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; - } else if (DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp = - (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / + if (DataPlant::PlantLoop(this->SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { + DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp = + DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; + } else if (DataPlant::PlantLoop(this->SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { + DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp = + (DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / 2.0; } } if (PltSizNumDmdSide > 0) { - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp = DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp; + DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp = DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp; } else { // don't rely on sizing, use loop setpoints // loop demand side - if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp = - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; - } else if (DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp = - (DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + - DataLoopNode::Node(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / + if (DataPlant::PlantLoop(this->DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::SingleSetPoint) { + DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp = + DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; + } else if (DataPlant::PlantLoop(this->DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { + DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp = + (DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / 2.0; } } - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); - SupSideMdot = FluidHX(CompNum).SupplySideLoop.DesignVolumeFlowRate * rho; - rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, + Real64 SupSideMdot = this->SupplySideLoop.DesignVolumeFlowRate * rho; + rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, DataGlobals::InitConvTemp, - DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, RoutineName); - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.DesignVolumeFlowRate * rho; + Real64 DmdSideMdot = this->DemandSideLoop.DesignVolumeFlowRate * rho; - CalcFluidHeatExchanger(CompNum, SupSideMdot, DmdSideMdot); - FluidHX(CompNum).SupplySideLoop.MaxLoad = std::abs(FluidHX(CompNum).HeatTransferRate); + this->calculate(SupSideMdot, DmdSideMdot); + this->SupplySideLoop.MaxLoad = std::abs(this->HeatTransferRate); } if (DataPlant::PlantFinalSizesOkayToReport) { - OutputReportPredefined::PreDefTableEntry(OutputReportPredefined::pdchMechType, FluidHX(CompNum).Name, "HeatExchanger:FluidToFluid"); - OutputReportPredefined::PreDefTableEntry(OutputReportPredefined::pdchMechNomCap, FluidHX(CompNum).Name, FluidHX(CompNum).SupplySideLoop.MaxLoad); + OutputReportPredefined::PreDefTableEntry(OutputReportPredefined::pdchMechType, this->Name, "HeatExchanger:FluidToFluid"); + OutputReportPredefined::PreDefTableEntry(OutputReportPredefined::pdchMechNomCap, this->Name, this->SupplySideLoop.MaxLoad); } } - void ControlFluidHeatExchanger(int const CompNum, int const EP_UNUSED(LoopNum), Real64 const MyLoad, bool FirstHVACIteration) + void HeatExchangerStruct::control(int const CompNum, int const EP_UNUSED(LoopNum), Real64 const MyLoad, bool FirstHVACIteration) { // SUBROUTINE INFORMATION: @@ -1053,11 +1028,10 @@ namespace PlantHeatExchangerFluidToFluid { Real64 mdotSupSide; Real64 mdotDmdSide; - Real64 ControlSignalValue(0.0); // check if available by schedule bool ScheduledOff; - Real64 AvailSchedValue = ScheduleManager::GetCurrentScheduleValue(FluidHX(CompNum).AvailSchedNum); + Real64 AvailSchedValue = ScheduleManager::GetCurrentScheduleValue(this->AvailSchedNum); if (AvailSchedValue <= 0) { ScheduledOff = true; } else { @@ -1066,776 +1040,777 @@ namespace PlantHeatExchangerFluidToFluid { // check if operational limits trip off unit bool LimitTrippedOff = false; - if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp) || - (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp < FluidHX(CompNum).MinOperationTemp)) { + if ((DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp < this->MinOperationTemp) || + (DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp < this->MinOperationTemp)) { LimitTrippedOff = true; } - if ((DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp) || - (DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp > FluidHX(CompNum).MaxOperationTemp)) { + if ((DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp > this->MaxOperationTemp) || + (DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp > this->MaxOperationTemp)) { LimitTrippedOff = true; } if (!ScheduledOff && !LimitTrippedOff) { { - auto const SELECT_CASE_var(FluidHX(CompNum).ControlMode); + auto const SELECT_CASE_var(this->ControlMode); if (SELECT_CASE_var == UncontrolledOn) { // make passive request for supply side loop flow - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if (SELECT_CASE_var == OperationSchemeModulated) { if (std::abs(MyLoad) > DataHVACGlobals::SmallLoad) { if (MyLoad < -1.0 * DataHVACGlobals::SmallLoad) { // requesting cooling - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + if (DeltaTCooling > this->TempControlTol) { // can do cooling so turn on + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow - Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, - FluidHX(CompNum).SupplySideLoop.InletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, + this->SupplySideLoop.InletTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); - Real64 TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); + Real64 TargetLeavingTemp = this->SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); - FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); + this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->SupplySideLoop.compNum); } } else { // not able to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->SupplySideLoop.compNum); } } else { // requesting heating - Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + Real64 DeltaTHeating = this->DemandSideLoop.InletTemp - this->SupplySideLoop.InletTemp; + if (DeltaTHeating > this->TempControlTol) { // can do heating so turn on + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, - FluidHX(CompNum).SupplySideLoop.InletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, + this->SupplySideLoop.InletTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); - Real64 TargetLeavingTemp = FluidHX(CompNum).SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); + Real64 TargetLeavingTemp = this->SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); - FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); + this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } else { // no load mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == OperationSchemeOnOff) { if (std::abs(MyLoad) > DataHVACGlobals::SmallLoad) { if (MyLoad < DataHVACGlobals::SmallLoad) { // requesting cooling - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { // can do cooling so turn on - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + if (DeltaTCooling > this->TempControlTol) { // can do cooling so turn on + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // requesting heating - Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - if (DeltaTHeating > FluidHX(CompNum).TempControlTol) { // can do heating so turn on - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + Real64 DeltaTHeating = this->DemandSideLoop.InletTemp - this->SupplySideLoop.InletTemp; + if (DeltaTHeating > this->TempControlTol) { // can do heating so turn on + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } else { // no load mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == HeatingSetPointModulated) { - Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTemp > FluidHX(CompNum).SupplySideLoop.InletTemp)) { + Real64 SetPointTemp = DataLoopNode::Node(this->SetPointNodeNum).TempSetPoint; + Real64 DeltaTHeating = this->DemandSideLoop.InletTemp - this->SupplySideLoop.InletTemp; + if ((DeltaTHeating > this->TempControlTol) && (SetPointTemp > this->SupplySideLoop.InletTemp)) { // can and want to heat - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTemp; - FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); + this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able are wanting to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == HeatingSetPointOnOff) { - Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTemp > FluidHX(CompNum).SupplySideLoop.InletTemp)) { + Real64 SetPointTemp = DataLoopNode::Node(this->SetPointNodeNum).TempSetPoint; + Real64 DeltaTHeating = this->DemandSideLoop.InletTemp - this->SupplySideLoop.InletTemp; + if ((DeltaTHeating > this->TempControlTol) && (SetPointTemp > this->SupplySideLoop.InletTemp)) { // can and want to heat - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able or are wanting to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointModulated) { - Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTemp < FluidHX(CompNum).SupplySideLoop.InletTemp)) { + Real64 SetPointTemp = DataLoopNode::Node(this->SetPointNodeNum).TempSetPoint; + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + if ((DeltaTCooling > this->TempControlTol) && (SetPointTemp < this->SupplySideLoop.InletTemp)) { // can and want to cool - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTemp; - FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); + this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointOnOff) { - Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTemp < FluidHX(CompNum).SupplySideLoop.InletTemp)) { + Real64 SetPointTemp = DataLoopNode::Node(this->SetPointNodeNum).TempSetPoint; + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + if ((DeltaTCooling > this->TempControlTol) && (SetPointTemp < this->SupplySideLoop.InletTemp)) { // can and want to cool - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == DualDeadBandSetPointModulated) { - Real64 SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; - Real64 SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTempHi < FluidHX(CompNum).SupplySideLoop.InletTemp)) { + Real64 SetPointTempLo = DataLoopNode::Node(this->SetPointNodeNum).TempSetPointLo; + Real64 SetPointTempHi = DataLoopNode::Node(this->SetPointNodeNum).TempSetPointHi; + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + Real64 DeltaTHeating = this->DemandSideLoop.InletTemp - this->SupplySideLoop.InletTemp; + if ((DeltaTCooling > this->TempControlTol) && (SetPointTempHi < this->SupplySideLoop.InletTemp)) { // can and want to cool - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTempHi; - FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); + this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } - } else if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTempLo > FluidHX(CompNum).SupplySideLoop.InletTemp)) { + } else if ((DeltaTHeating > this->TempControlTol) && (SetPointTempLo > this->SupplySideLoop.InletTemp)) { // can and want to heat - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTempLo; - FindHXDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); + this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able or don't want conditioning mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == DualDeadBandSetPointOnOff) { - Real64 SetPointTempLo = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointLo; - Real64 SetPointTempHi = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPointHi; - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - Real64 DeltaTHeating = FluidHX(CompNum).DemandSideLoop.InletTemp - FluidHX(CompNum).SupplySideLoop.InletTemp; - if ((DeltaTCooling > FluidHX(CompNum).TempControlTol) && (SetPointTempHi < FluidHX(CompNum).SupplySideLoop.InletTemp)) { + Real64 SetPointTempLo = DataLoopNode::Node(this->SetPointNodeNum).TempSetPointLo; + Real64 SetPointTempHi = DataLoopNode::Node(this->SetPointNodeNum).TempSetPointHi; + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + Real64 DeltaTHeating = this->DemandSideLoop.InletTemp - this->SupplySideLoop.InletTemp; + if ((DeltaTCooling > this->TempControlTol) && (SetPointTempHi < this->SupplySideLoop.InletTemp)) { // can and want to cool - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); - } else if ((DeltaTHeating > FluidHX(CompNum).TempControlTol) && (SetPointTempLo > FluidHX(CompNum).SupplySideLoop.InletTemp)) { + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); + } else if ((DeltaTHeating > this->TempControlTol) && (SetPointTempLo > this->SupplySideLoop.InletTemp)) { // can and want to heat - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able or don't want conditioning mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingDifferentialOnOff) { - Real64 DeltaTCooling = FluidHX(CompNum).SupplySideLoop.InletTemp - FluidHX(CompNum).DemandSideLoop.InletTemp; - if (DeltaTCooling > FluidHX(CompNum).TempControlTol) { + Real64 DeltaTCooling = this->SupplySideLoop.InletTemp - this->DemandSideLoop.InletTemp; + if (DeltaTCooling > this->TempControlTol) { // want to cool - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointOnOffWithComponentOverride) { + Real64 ControlSignalValue(0.0); + { - auto const SELECT_CASE_var1(FluidHX(CompNum).ControlSignalTemp); + auto const SELECT_CASE_var1(this->ControlSignalTemp); if (SELECT_CASE_var1 == WetBulbTemperature) { ControlSignalValue = DataEnvironment::OutWetBulbTemp; } else if (SELECT_CASE_var1 == DryBulbTemperature) { ControlSignalValue = DataEnvironment::OutDryBulbTemp; } else if (SELECT_CASE_var1 == LoopTemperature) { - // ControlSignalValue = FluidHX(CompNum)%DemandSideLoop%InletTemp - ControlSignalValue = DataLoopNode::Node(FluidHX(CompNum).OtherCompDemandSideLoop.inletNodeNum).TempLastTimestep; + ControlSignalValue = DataLoopNode::Node(this->OtherCompDemandSideLoop.inletNodeNum).TempLastTimestep; } else { assert(false); } } - Real64 SetPointTemp = DataLoopNode::Node(FluidHX(CompNum).SetPointNodeNum).TempSetPoint; + Real64 SetPointTemp = DataLoopNode::Node(this->SetPointNodeNum).TempSetPoint; Real64 DeltaTCooling = SetPointTemp - ControlSignalValue; // obtain shut down state - bool ChillerShutDown = DataPlant::PlantLoop(FluidHX(CompNum).OtherCompSupplySideLoop.loopNum) - .LoopSide(FluidHX(CompNum).OtherCompSupplySideLoop.loopSideNum) - .Branch(FluidHX(CompNum).OtherCompSupplySideLoop.branchNum) - .Comp(FluidHX(CompNum).OtherCompSupplySideLoop.compNum) + bool ChillerShutDown = DataPlant::PlantLoop(this->OtherCompSupplySideLoop.loopNum) + .LoopSide(this->OtherCompSupplySideLoop.loopSideNum) + .Branch(this->OtherCompSupplySideLoop.branchNum) + .Comp(this->OtherCompSupplySideLoop.compNum) .FreeCoolCntrlShutDown; - if (ChillerShutDown && (DeltaTCooling > FluidHX(CompNum).TempControlTol)) { + if (ChillerShutDown && (DeltaTCooling > this->TempControlTol)) { // can and want to cool - mdotSupSide = FluidHX(CompNum).SupplySideLoop.MassFlowRateMax; + mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { - mdotDmdSide = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } @@ -1843,31 +1818,28 @@ namespace PlantHeatExchangerFluidToFluid { } else { // scheduled off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - FluidHX(CompNum).SupplySideLoop.inletNodeNum, - FluidHX(CompNum).SupplySideLoop.outletNodeNum, - FluidHX(CompNum).SupplySideLoop.loopNum, - FluidHX(CompNum).SupplySideLoop.loopSideNum, - FluidHX(CompNum).SupplySideLoop.branchNum, - FluidHX(CompNum).SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } - void CalcFluidHeatExchanger(int const CompNum, - Real64 const SupSideMdot, // mass flow rate of fluid entering from supply side loop - Real64 const DmdSideMdot // mass flow rate of fluid entering from demand side loop - ) + void HeatExchangerStruct::calculate(Real64 const SupSideMdot, Real64 const DmdSideMdot) { // SUBROUTINE INFORMATION: - // AUTHOR B.Griffith, derived from CalcEconHeatExchanger by Sankaranarayanan K P aug. 2007 + // AUTHOR B.Griffith, derived from CalcEconHeatExchanger by Sankaranarayanan K P aug. 2007 // DATE WRITTEN November 2012 // MODIFIED na // RE-ENGINEERED na @@ -1883,21 +1855,19 @@ namespace PlantHeatExchangerFluidToFluid { int const CmaxMixedCminUnmixed(40); int const CmaxUnMixedCminMixed(41); - Real64 Effectiveness(0.0); - - Real64 SupSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).Temp; - Real64 DmdSideLoopInletTemp = DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).Temp; + Real64 SupSideLoopInletTemp = DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp; + Real64 DmdSideLoopInletTemp = DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp; // specific heat of fluid entering from supply side loop at inlet temp - Real64 SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidName, + Real64 SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, SupSideLoopInletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).SupplySideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, RoutineName); // specific heat of fluid entering from demand side loop at inlet temp - Real64 DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidName, + Real64 DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, DmdSideLoopInletTemp, - DataPlant::PlantLoop(FluidHX(CompNum).DemandSideLoop.loopNum).FluidIndex, + DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, RoutineName); Real64 SupSideCapRate = SupSideMdot * SupSideLoopInletCp; @@ -1908,101 +1878,101 @@ namespace PlantHeatExchangerFluidToFluid { if (MinCapRate > 0.0) { { - auto const SELECT_CASE_var(FluidHX(CompNum).HeatExchangeModelType); + auto const SELECT_CASE_var(this->HeatExchangeModelType); if (SELECT_CASE_var == CrossFlowBothUnMixed) { - Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 NTU = this->UA / MinCapRate; Real64 CapRatio = MinCapRate / MaxCapRate; Real64 ExpCheckValue1 = std::pow(NTU, 0.22) / CapRatio; Real64 ExpCheckValue2 = -CapRatio * std::pow(NTU, 0.78); if ((ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) || (ExpCheckValue2 > DataPrecisionGlobals::EXP_UpperLimit)) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else { - Effectiveness = 1.0 - std::exp((std::pow(NTU, 0.22) / CapRatio) * (std::exp(-CapRatio * std::pow(NTU, 0.78)) - 1.0)); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp((std::pow(NTU, 0.22) / CapRatio) * (std::exp(-CapRatio * std::pow(NTU, 0.78)) - 1.0)); + this->Effectiveness = min(1.0, this->Effectiveness); } } else if (SELECT_CASE_var == CrossFlowBothMixed) { - Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 NTU = this->UA / MinCapRate; Real64 CapRatio = MinCapRate / MaxCapRate; Real64 ExpCheckValue1 = -CapRatio * NTU; Real64 ExpCheckValue2 = -NTU; if (ExpCheckValue1 < DataPrecisionGlobals::EXP_LowerLimit) { if (ExpCheckValue2 >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else if (ExpCheckValue2 < DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } else if ((std::exp(-NTU) == 1.0) || (NTU == 0.0) || (std::exp(-CapRatio * NTU) == 1.0)) { // don't div by zero - Effectiveness = 0.0; + this->Effectiveness = 0.0; } else { - Effectiveness = 1.0 / ((1.0 / (1.0 - std::exp(-NTU))) + (CapRatio / (1.0 - std::exp(-CapRatio * NTU))) - (1.0 / NTU)); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 / ((1.0 / (1.0 - std::exp(-NTU))) + (CapRatio / (1.0 - std::exp(-CapRatio * NTU))) - (1.0 / NTU)); + this->Effectiveness = min(1.0, this->Effectiveness); } } else if ((SELECT_CASE_var == CrossFlowSupplyLoopMixedDemandLoopUnMixed) || (SELECT_CASE_var == CrossFlowSupplyLoopUnMixedDemandLoopMixed)) { int CrossFlowEquation; - if (SupSideCapRate == MaxCapRate && FluidHX(CompNum).HeatExchangeModelType == CrossFlowSupplyLoopMixedDemandLoopUnMixed) { + if (SupSideCapRate == MaxCapRate && this->HeatExchangeModelType == CrossFlowSupplyLoopMixedDemandLoopUnMixed) { CrossFlowEquation = CmaxMixedCminUnmixed; - } else if (SupSideCapRate == MinCapRate && FluidHX(CompNum).HeatExchangeModelType == CrossFlowSupplyLoopMixedDemandLoopUnMixed) { + } else if (SupSideCapRate == MinCapRate && this->HeatExchangeModelType == CrossFlowSupplyLoopMixedDemandLoopUnMixed) { CrossFlowEquation = CmaxUnMixedCminMixed; - } else if (DmdSideCapRate == MaxCapRate && FluidHX(CompNum).HeatExchangeModelType == CrossFlowSupplyLoopUnMixedDemandLoopMixed) { + } else if (DmdSideCapRate == MaxCapRate && this->HeatExchangeModelType == CrossFlowSupplyLoopUnMixedDemandLoopMixed) { CrossFlowEquation = CmaxMixedCminUnmixed; - } else if (DmdSideCapRate == MinCapRate && FluidHX(CompNum).HeatExchangeModelType == CrossFlowSupplyLoopUnMixedDemandLoopMixed) { + } else if (DmdSideCapRate == MinCapRate && this->HeatExchangeModelType == CrossFlowSupplyLoopUnMixedDemandLoopMixed) { CrossFlowEquation = CmaxUnMixedCminMixed; } else { CrossFlowEquation = CmaxMixedCminUnmixed; } - Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 NTU = this->UA / MinCapRate; Real64 CapRatio = MinCapRate / MaxCapRate; if (CrossFlowEquation == CmaxMixedCminUnmixed) { Real64 ExpCheckValue1 = -NTU; if (CapRatio == 0.0) { // protect div by zero if (ExpCheckValue1 >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else if (ExpCheckValue1 < DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 0.632 / CapRatio; - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 0.632 / CapRatio; + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = (1.0 / CapRatio) * (1.0 - std::exp(CapRatio * std::exp(-NTU) - 1.0)); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = (1.0 / CapRatio) * (1.0 - std::exp(CapRatio * std::exp(-NTU) - 1.0)); + this->Effectiveness = min(1.0, this->Effectiveness); } } else if (CrossFlowEquation == CmaxUnMixedCminMixed) { Real64 ExpCheckValue1 = -CapRatio * NTU; if (CapRatio == 0.0) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else { if (ExpCheckValue1 >= DataPrecisionGlobals::EXP_LowerLimit) { Real64 ExpCheckValue2 = -(1.0 / CapRatio) * (1.0 - std::exp(-CapRatio * NTU)); if (ExpCheckValue2 < DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } else { - Effectiveness = 1.0 - std::exp(ExpCheckValue2); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(ExpCheckValue2); + this->Effectiveness = min(1.0, this->Effectiveness); } } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } } else { @@ -2010,77 +1980,88 @@ namespace PlantHeatExchangerFluidToFluid { } } else if (SELECT_CASE_var == CounterFlow) { - Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 NTU = this->UA / MinCapRate; Real64 CapRatio = MinCapRate / MaxCapRate; Real64 ExpCheckValue1 = -NTU * (1.0 - CapRatio); if (ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else if (CapRatio * std::exp(-NTU * (1.0 - CapRatio)) == 1.0) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else { - Effectiveness = (1.0 - std::exp(-NTU * (1.0 - CapRatio))) / (1.0 - CapRatio * std::exp(-NTU * (1.0 - CapRatio))); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = (1.0 - std::exp(-NTU * (1.0 - CapRatio))) / (1.0 - CapRatio * std::exp(-NTU * (1.0 - CapRatio))); + this->Effectiveness = min(1.0, this->Effectiveness); } } else if (SELECT_CASE_var == ParallelFlow) { - Real64 NTU = FluidHX(CompNum).UA / MinCapRate; + Real64 NTU = this->UA / MinCapRate; Real64 CapRatio = MinCapRate / MaxCapRate; Real64 ExpCheckValue1 = -NTU * (1.0 + CapRatio); if (ExpCheckValue1 > DataPrecisionGlobals::EXP_UpperLimit) { if (-NTU >= DataPrecisionGlobals::EXP_LowerLimit) { - Effectiveness = 1.0 - std::exp(-NTU); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = 1.0 - std::exp(-NTU); + this->Effectiveness = min(1.0, this->Effectiveness); } else { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } } else { - Effectiveness = (1.0 - std::exp(-NTU * (1.0 + CapRatio))) / (1.0 + CapRatio); - Effectiveness = min(1.0, Effectiveness); + this->Effectiveness = (1.0 - std::exp(-NTU * (1.0 + CapRatio))) / (1.0 + CapRatio); + this->Effectiveness = min(1.0, this->Effectiveness); } } else if (SELECT_CASE_var == Ideal) { - Effectiveness = 1.0; + this->Effectiveness = 1.0; } else { assert(false); } } } else { // no capacity - Effectiveness = 0.0; + this->Effectiveness = 0.0; } - Real64 HeatTransferRate = Effectiveness * MinCapRate * (SupSideLoopInletTemp - DmdSideLoopInletTemp); // + means supply side is cooled + this->HeatTransferRate = this->Effectiveness * MinCapRate * (SupSideLoopInletTemp - DmdSideLoopInletTemp); // + means supply side is cooled if (SupSideMdot > 0.0) { - FluidHX(CompNum).SupplySideLoop.OutletTemp = SupSideLoopInletTemp - HeatTransferRate / (SupSideLoopInletCp * SupSideMdot); + this->SupplySideLoop.OutletTemp = SupSideLoopInletTemp - this->HeatTransferRate / (SupSideLoopInletCp * SupSideMdot); } else { - FluidHX(CompNum).SupplySideLoop.OutletTemp = SupSideLoopInletTemp; + this->SupplySideLoop.OutletTemp = SupSideLoopInletTemp; } if (DmdSideMdot > 0.0) { - FluidHX(CompNum).DemandSideLoop.OutletTemp = DmdSideLoopInletTemp + HeatTransferRate / (DmdSideLoopInletCp * DmdSideMdot); + this->DemandSideLoop.OutletTemp = DmdSideLoopInletTemp + this->HeatTransferRate / (DmdSideLoopInletCp * DmdSideMdot); + } else { + this->DemandSideLoop.OutletTemp = DmdSideLoopInletTemp; + } + + this->SupplySideLoop.InletTemp = SupSideLoopInletTemp; + this->SupplySideLoop.InletMassFlowRate = SupSideMdot; + this->DemandSideLoop.InletTemp = DmdSideLoopInletTemp; + this->DemandSideLoop.InletMassFlowRate = DmdSideMdot; + + DataLoopNode::Node(this->DemandSideLoop.outletNodeNum).Temp = this->DemandSideLoop.OutletTemp; + DataLoopNode::Node(this->SupplySideLoop.outletNodeNum).Temp = this->SupplySideLoop.OutletTemp; + + this->HeatTransferEnergy = this->HeatTransferRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; + + if ((std::abs(this->HeatTransferRate) > DataHVACGlobals::SmallLoad) && (this->DemandSideLoop.InletMassFlowRate > 0.0) && + (this->SupplySideLoop.InletMassFlowRate > 0.0)) { + this->OperationStatus = 1.0; } else { - FluidHX(CompNum).DemandSideLoop.OutletTemp = DmdSideLoopInletTemp; + this->OperationStatus = 0.0; } - FluidHX(CompNum).Effectiveness = Effectiveness; - FluidHX(CompNum).HeatTransferRate = HeatTransferRate; - FluidHX(CompNum).SupplySideLoop.InletTemp = SupSideLoopInletTemp; - FluidHX(CompNum).SupplySideLoop.InletMassFlowRate = SupSideMdot; - FluidHX(CompNum).DemandSideLoop.InletTemp = DmdSideLoopInletTemp; - FluidHX(CompNum).DemandSideLoop.InletMassFlowRate = DmdSideMdot; } - void FindHXDemandSideLoopFlow(int const CompNum, Real64 const TargetSupplySideLoopLeavingTemp, int const HXActionMode) + void HeatExchangerStruct::findDemandSideLoopFlow(int const CompNum, Real64 const TargetSupplySideLoopLeavingTemp, int const HXActionMode) { // SUBROUTINE INFORMATION: @@ -2102,19 +2083,19 @@ namespace PlantHeatExchangerFluidToFluid { Array1D Par(2); // Parameter array passed to solver // mass flow rate of fluid entering from supply side loop - Real64 SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; + Real64 SupSideMdot = DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).MassFlowRate; // first see if root is bracketed // min demand flow // mass flow rate of fluid entering from demand side loop - Real64 DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; - CalcFluidHeatExchanger(CompNum, SupSideMdot, DmdSideMdot); - Real64 LeavingTempMinFlow = FluidHX(CompNum).SupplySideLoop.OutletTemp; + Real64 DmdSideMdot = this->DemandSideLoop.MassFlowRateMin; + this->calculate(SupSideMdot, DmdSideMdot); + Real64 LeavingTempMinFlow = this->SupplySideLoop.OutletTemp; // full demand flow - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; - CalcFluidHeatExchanger(CompNum, SupSideMdot, DmdSideMdot); - Real64 LeavingTempFullFlow = FluidHX(CompNum).SupplySideLoop.OutletTemp; + DmdSideMdot = this->DemandSideLoop.MassFlowRateMax; + this->calculate(SupSideMdot, DmdSideMdot); + Real64 LeavingTempFullFlow = this->SupplySideLoop.OutletTemp; { auto const SELECT_CASE_var(HXActionMode); @@ -2125,78 +2106,80 @@ namespace PlantHeatExchangerFluidToFluid { Par(1) = double(CompNum); // HX index Par(2) = TargetSupplySideLoopLeavingTemp; + auto f = std::bind(&HeatExchangerStruct::demandSideFlowResidual, this, std::placeholders::_1, std::placeholders::_2); + General::SolveRoot(Acc, MaxIte, SolFla, DmdSideMdot, - HXDemandSideLoopFlowResidual, - FluidHX(CompNum).DemandSideLoop.MassFlowRateMin, - FluidHX(CompNum).DemandSideLoop.MassFlowRateMax, + f, + this->DemandSideLoop.MassFlowRateMin, + this->DemandSideLoop.MassFlowRateMax, Par); if (SolFla == -1) { // no convergence if (!DataGlobals::WarmupFlag) { - if (FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount < 1) { - ++FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount; - ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + + if (this->DmdSideModulatSolvNoConvergeErrorCount < 1) { + ++this->DmdSideModulatSolvNoConvergeErrorCount; + ShowWarningError(ComponentClassName + " named " + this->Name + " - Iteration Limit exceeded calculating demand side loop flow rate"); ShowContinueError("Simulation continues with calculated demand side mass flow rate = " + General::RoundSigDigits(DmdSideMdot, 7)); } - ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + + ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + this->Name + " - Iteration Limit exceeded calculating demand side loop flow rate continues.", - FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorIndex, + this->DmdSideModulatSolvNoConvergeErrorIndex, DmdSideMdot, DmdSideMdot); } } else if (SolFla == -2) { // f(x0) and f(x1) have the same sign - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax * (LeavingTempFullFlow - TargetSupplySideLoopLeavingTemp) / + DmdSideMdot = this->DemandSideLoop.MassFlowRateMax * (LeavingTempFullFlow - TargetSupplySideLoopLeavingTemp) / (LeavingTempFullFlow - LeavingTempMinFlow); if (!DataGlobals::WarmupFlag) { - if (FluidHX(CompNum).DmdSideModulatSolvFailErrorCount < 1) { - ++FluidHX(CompNum).DmdSideModulatSolvFailErrorCount; - ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + + if (this->DmdSideModulatSolvFailErrorCount < 1) { + ++this->DmdSideModulatSolvFailErrorCount; + ShowWarningError(ComponentClassName + " named " + this->Name + " - Solver failed to calculate demand side loop flow rate"); ShowContinueError("Simulation continues with estimated demand side mass flow rate = " + General::RoundSigDigits(DmdSideMdot, 7)); } - ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + + ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + this->Name + " - Solver failed to calculate demand side loop flow rate continues.", - FluidHX(CompNum).DmdSideModulatSolvFailErrorIndex, + this->DmdSideModulatSolvFailErrorIndex, DmdSideMdot, DmdSideMdot); } } PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if ((TargetSupplySideLoopLeavingTemp >= LeavingTempFullFlow) && (LeavingTempFullFlow > LeavingTempMinFlow)) { // run at full flow - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + DmdSideMdot = this->DemandSideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if (LeavingTempMinFlow >= TargetSupplySideLoopLeavingTemp) { // run at min flow - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; + DmdSideMdot = this->DemandSideLoop.MassFlowRateMin; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSupplySideLoop) { if ((LeavingTempFullFlow < TargetSupplySideLoopLeavingTemp) && (TargetSupplySideLoopLeavingTemp < LeavingTempMinFlow)) { @@ -2204,82 +2187,84 @@ namespace PlantHeatExchangerFluidToFluid { Par(1) = double(CompNum); // HX index Par(2) = TargetSupplySideLoopLeavingTemp; + auto f = std::bind(&HeatExchangerStruct::demandSideFlowResidual, this, std::placeholders::_1, std::placeholders::_2); + General::SolveRoot(Acc, MaxIte, SolFla, DmdSideMdot, - HXDemandSideLoopFlowResidual, - FluidHX(CompNum).DemandSideLoop.MassFlowRateMin, - FluidHX(CompNum).DemandSideLoop.MassFlowRateMax, + f, + this->DemandSideLoop.MassFlowRateMin, + this->DemandSideLoop.MassFlowRateMax, Par); if (SolFla == -1) { // no convergence if (!DataGlobals::WarmupFlag) { - if (FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount < 1) { - ++FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorCount; - ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + + if (this->DmdSideModulatSolvNoConvergeErrorCount < 1) { + ++this->DmdSideModulatSolvNoConvergeErrorCount; + ShowWarningError(ComponentClassName + " named " + this->Name + " - Iteration Limit exceeded calculating demand side loop flow rate"); ShowContinueError("Simulation continues with calculated demand side mass flow rate = " + General::RoundSigDigits(DmdSideMdot, 7)); } - ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + + ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + this->Name + " - Iteration Limit exceeded calculating demand side loop flow rate continues.", - FluidHX(CompNum).DmdSideModulatSolvNoConvergeErrorIndex, + this->DmdSideModulatSolvNoConvergeErrorIndex, DmdSideMdot, DmdSideMdot); } } else if (SolFla == -2) { // f(x0) and f(x1) have the same sign - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax * (LeavingTempFullFlow - TargetSupplySideLoopLeavingTemp) / + DmdSideMdot = this->DemandSideLoop.MassFlowRateMax * (LeavingTempFullFlow - TargetSupplySideLoopLeavingTemp) / (LeavingTempFullFlow - LeavingTempMinFlow); if (!DataGlobals::WarmupFlag) { - if (FluidHX(CompNum).DmdSideModulatSolvFailErrorCount < 1) { - ++FluidHX(CompNum).DmdSideModulatSolvFailErrorCount; - ShowWarningError(ComponentClassName + " named " + FluidHX(CompNum).Name + + if (this->DmdSideModulatSolvFailErrorCount < 1) { + ++this->DmdSideModulatSolvFailErrorCount; + ShowWarningError(ComponentClassName + " named " + this->Name + " - Solver failed to calculate demand side loop flow rate"); ShowContinueError("Simulation continues with estimated demand side mass flow rate = " + General::RoundSigDigits(DmdSideMdot, 7)); } - ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + FluidHX(CompNum).Name + + ShowRecurringWarningErrorAtEnd(ComponentClassName + " named " + this->Name + " - Solver failed to calculate demand side loop flow rate continues.", - FluidHX(CompNum).DmdSideModulatSolvFailErrorIndex, + this->DmdSideModulatSolvFailErrorIndex, DmdSideMdot, DmdSideMdot); } } PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if ((TargetSupplySideLoopLeavingTemp <= LeavingTempFullFlow) && (LeavingTempFullFlow < LeavingTempMinFlow)) { // run at full flow - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMax; + DmdSideMdot = this->DemandSideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if (LeavingTempMinFlow <= TargetSupplySideLoopLeavingTemp) { // run at min flow - DmdSideMdot = FluidHX(CompNum).DemandSideLoop.MassFlowRateMin; + DmdSideMdot = this->DemandSideLoop.MassFlowRateMin; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - FluidHX(CompNum).DemandSideLoop.inletNodeNum, - FluidHX(CompNum).DemandSideLoop.outletNodeNum, - FluidHX(CompNum).DemandSideLoop.loopNum, - FluidHX(CompNum).DemandSideLoop.loopSideNum, - FluidHX(CompNum).DemandSideLoop.branchNum, - FluidHX(CompNum).DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } } - Real64 HXDemandSideLoopFlowResidual(Real64 const DmdSideMassFlowRate, + Real64 HeatExchangerStruct::demandSideFlowResidual(Real64 const DmdSideMassFlowRate, Array1 const &Par // Par(1) = HX index number ) { @@ -2296,56 +2281,17 @@ namespace PlantHeatExchangerFluidToFluid { Real64 Residuum; // Residual to be minimized to zero Real64 MdotTrial = DmdSideMassFlowRate; - int CompNum = int(Par(1)); - Real64 SupSideMdot = DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate; + Real64 SupSideMdot = DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).MassFlowRate; - CalcFluidHeatExchanger(CompNum, SupSideMdot, MdotTrial); + this->calculate(SupSideMdot, MdotTrial); - Real64 SupSideLoopOutletTemp = FluidHX(CompNum).SupplySideLoop.OutletTemp; + Real64 SupSideLoopOutletTemp = this->SupplySideLoop.OutletTemp; Residuum = Par(2) - SupSideLoopOutletTemp; return Residuum; } - void UpdateFluidHeatExchanger(int const CompNum) - { - - // SUBROUTINE INFORMATION: - // AUTHOR B. Griffith - // DATE WRITTEN December 2012 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // update calculate results - - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.outletNodeNum).Temp = FluidHX(CompNum).DemandSideLoop.OutletTemp; - DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.outletNodeNum).Temp = FluidHX(CompNum).SupplySideLoop.OutletTemp; - } - - void ReportFluidHeatExchanger(int const CompNum) - { - - // SUBROUTINE INFORMATION: - // AUTHOR B. Griffith - // DATE WRITTEN December, 2012 - // MODIFIED na - // RE-ENGINEERED na - - // PURPOSE OF THIS SUBROUTINE: - // update heat exchanger report variables - - FluidHX(CompNum).HeatTransferEnergy = FluidHX(CompNum).HeatTransferRate * DataHVACGlobals::TimeStepSys * DataGlobals::SecInHour; - - if ((std::abs(FluidHX(CompNum).HeatTransferRate) > DataHVACGlobals::SmallLoad) && (FluidHX(CompNum).DemandSideLoop.InletMassFlowRate > 0.0) && - (FluidHX(CompNum).SupplySideLoop.InletMassFlowRate > 0.0)) { - FluidHX(CompNum).OperationStatus = 1.0; - } else { - FluidHX(CompNum).OperationStatus = 0.0; - } - } - } // namespace PlantHeatExchangerFluidToFluid } // namespace EnergyPlus diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 2e9d14cf86e..64a6d18aad5 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -145,6 +145,20 @@ namespace PlantHeatExchangerFluidToFluid { MyFlag(true), MyEnvrnFlag(true) { } + + void initialize(); + + void size(); + + void calculate(Real64 SupSideMdot, Real64 DmdSideMdot); + + void control(int CompNum, int LoopNum, Real64 MyLoad, bool FirstHVACIteration); + + void findDemandSideLoopFlow(int CompNum, Real64 TargetSupplySideLoopLeavingTemp, int HXActionMode); + + Real64 demandSideFlowResidual(Real64 DmdSideMassFlowRate, + Array1 const &Par // Par(1) = HX index number + ); }; // Object Data @@ -166,27 +180,6 @@ namespace PlantHeatExchangerFluidToFluid { void GetFluidHeatExchangerInput(); - void InitFluidHeatExchanger(int CompNum, int LoopNum); - - void SizeFluidHeatExchanger(int CompNum); - - void ControlFluidHeatExchanger(int CompNum, int LoopNum, Real64 MyLoad, bool FirstHVACIteration); - - void CalcFluidHeatExchanger(int CompNum, - Real64 SupSideMdot, // mass flow rate of fluid entering from supply side loop - Real64 DmdSideMdot // mass flow rate of fluid entering from demand side loop - ); - - void FindHXDemandSideLoopFlow(int CompNum, Real64 TargetSupplySideLoopLeavingTemp, int HXActionMode); - - Real64 HXDemandSideLoopFlowResidual(Real64 DmdSideMassFlowRate, - Array1 const &Par // Par(1) = HX index number - ); - - void UpdateFluidHeatExchanger(int CompNum); - - void ReportFluidHeatExchanger(int CompNum); - } // namespace PlantHeatExchangerFluidToFluid } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc index ceb53a8ee01..4d091ec2421 100644 --- a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc +++ b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc @@ -74,7 +74,7 @@ TEST_F(PlantHXFixture, PlantHXModulatedDualDeadDefectFileHi) { // this unit test was devised for issue #5258 which involves control logic related to plant HX not controlling well when the setpoint cannot be // met this test has complete IDF input to set up a system of four plant loops taken from the PlantLoopChain* integration tests. This test checks - // that the HX will attempt to meet setpoint of 19 when the conditioniong fluid is 20 and cannot really make it to 19. The HX still cools to down + // that the HX will attempt to meet setpoint of 19 when the conditioning fluid is 20 and cannot really make it to 19. The HX still cools to down // to 20. std::string const idf_objects = delimited_string({ @@ -2346,13 +2346,13 @@ TEST_F(PlantHXFixture, PlantHXControlWithFirstHVACIteration) // when FirstHVACIteration is true, mass flow should match design max bool testFirstHVACIteration = true; - PlantHeatExchangerFluidToFluid::ControlFluidHeatExchanger(1, 1, -1000.0, testFirstHVACIteration); + PlantHeatExchangerFluidToFluid::FluidHX(1).control(1, 1, -1000.0, testFirstHVACIteration); EXPECT_NEAR(DataLoopNode::Node(2).MassFlowRate, PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.MassFlowRateMax, 0.001); // when FirstHVACIteration is false, mass flow should be zero testFirstHVACIteration = false; - PlantHeatExchangerFluidToFluid::ControlFluidHeatExchanger(1, 1, -1000.0, testFirstHVACIteration); + PlantHeatExchangerFluidToFluid::FluidHX(1).control(1, 1, -1000.0, testFirstHVACIteration); EXPECT_NEAR(DataLoopNode::Node(2).MassFlowRate, 0.0, 0.001); } @@ -2469,14 +2469,14 @@ TEST_F(PlantHXFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverride) DataLoopNode::Node(3).TempSetPoint = 11.0; // now call the init routine - PlantHeatExchangerFluidToFluid::InitFluidHeatExchanger(1, 1); + PlantHeatExchangerFluidToFluid::FluidHX(1).initialize(); // check value in FreeCoolCntrlMinCntrlTemp EXPECT_NEAR(DataPlant::PlantLoop(1).LoopSide(2).Branch(2).Comp(1).FreeCoolCntrlMinCntrlTemp, 11.0, 0.001); // change the tolerance and check the result, issue 5626 fix subtracts tolerance PlantHeatExchangerFluidToFluid::FluidHX(1).TempControlTol = 1.5; - PlantHeatExchangerFluidToFluid::InitFluidHeatExchanger(1, 1); + PlantHeatExchangerFluidToFluid::FluidHX(1).initialize(); // EXPECT_NEAR(DataPlant::PlantLoop(1).LoopSide(2).Branch(2).Comp(1).FreeCoolCntrlMinCntrlTemp, 9.5, 0.001); // From 145d2c146bbc23d2faec0f57aa19640fcb23040a Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 14:27:55 -0700 Subject: [PATCH 83/86] step 10 - move SetupOutputVariable to member function --- .../PlantHeatExchangerFluidToFluid.cc | 148 +++++++++--------- .../PlantHeatExchangerFluidToFluid.hh | 4 +- 2 files changed, 80 insertions(+), 72 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 6f767657462..65ace23dcbc 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -512,77 +512,84 @@ namespace PlantHeatExchangerFluidToFluid { if (ErrorsFound) { ShowFatalError(RoutineName + "Errors found in processing " + cCurrentModuleObject + " input."); } + } - for (int CompLoop = 1; CompLoop <= NumberOfPlantFluidHXs; ++CompLoop) { - - SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Rate", - OutputProcessor::Unit::W, - FluidHX(CompLoop).HeatTransferRate, - "System", - "Average", - FluidHX(CompLoop).Name); - - SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Energy", - OutputProcessor::Unit::J, - FluidHX(CompLoop).HeatTransferEnergy, - "System", - "Sum", - FluidHX(CompLoop).Name, - _, - "ENERGYTRANSFER", - FluidHX(CompLoop).HeatTransferMeteringEndUse, - _, - "Plant"); - - SetupOutputVariable("Fluid Heat Exchanger Loop Supply Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, - FluidHX(CompLoop).SupplySideLoop.InletMassFlowRate, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Loop Supply Side Inlet Temperature", - OutputProcessor::Unit::C, - FluidHX(CompLoop).SupplySideLoop.InletTemp, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Loop Supply Side Outlet Temperature", - OutputProcessor::Unit::C, - FluidHX(CompLoop).SupplySideLoop.OutletTemp, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Loop Demand Side Mass Flow Rate", - OutputProcessor::Unit::kg_s, - FluidHX(CompLoop).DemandSideLoop.InletMassFlowRate, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Loop Demand Side Inlet Temperature", - OutputProcessor::Unit::C, - FluidHX(CompLoop).DemandSideLoop.InletTemp, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Loop Demand Side Outlet Temperature", - OutputProcessor::Unit::C, - FluidHX(CompLoop).DemandSideLoop.OutletTemp, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Operation Status", - OutputProcessor::Unit::None, - FluidHX(CompLoop).OperationStatus, - "System", - "Average", - FluidHX(CompLoop).Name); - SetupOutputVariable("Fluid Heat Exchanger Effectiveness", - OutputProcessor::Unit::None, - FluidHX(CompLoop).Effectiveness, - "System", - "Average", - FluidHX(CompLoop).Name); - } + void HeatExchangerStruct::setupOutputVars() + { + SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Rate", + OutputProcessor::Unit::W, + this->HeatTransferRate, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Energy", + OutputProcessor::Unit::J, + this->HeatTransferEnergy, + "System", + "Sum", + this->Name, + _, + "ENERGYTRANSFER", + this->HeatTransferMeteringEndUse, + _, + "Plant"); + + SetupOutputVariable("Fluid Heat Exchanger Loop Supply Side Mass Flow Rate", + OutputProcessor::Unit::kg_s, + this->SupplySideLoop.InletMassFlowRate, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Loop Supply Side Inlet Temperature", + OutputProcessor::Unit::C, + this->SupplySideLoop.InletTemp, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Loop Supply Side Outlet Temperature", + OutputProcessor::Unit::C, + this->SupplySideLoop.OutletTemp, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Loop Demand Side Mass Flow Rate", + OutputProcessor::Unit::kg_s, + this->DemandSideLoop.InletMassFlowRate, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Loop Demand Side Inlet Temperature", + OutputProcessor::Unit::C, + this->DemandSideLoop.InletTemp, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Loop Demand Side Outlet Temperature", + OutputProcessor::Unit::C, + this->DemandSideLoop.OutletTemp, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Operation Status", + OutputProcessor::Unit::None, + this->OperationStatus, + "System", + "Average", + this->Name); + + SetupOutputVariable("Fluid Heat Exchanger Effectiveness", + OutputProcessor::Unit::None, + this->Effectiveness, + "System", + "Average", + this->Name); } void HeatExchangerStruct::initialize() @@ -601,6 +608,7 @@ namespace PlantHeatExchangerFluidToFluid { static std::string const RoutineName("InitFluidHeatExchanger: "); if (this->MyOneTimeFlag) { + this->setupOutputVars(); this->MyFlag = true; this->MyEnvrnFlag = true; this->MyOneTimeFlag = false; diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 64a6d18aad5..36f2f5fe41a 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -146,6 +146,8 @@ namespace PlantHeatExchangerFluidToFluid { { } + void setupOutputVars(); + void initialize(); void size(); @@ -164,8 +166,6 @@ namespace PlantHeatExchangerFluidToFluid { // Object Data extern Array1D FluidHX; - // Functions - void SimFluidHeatExchanger(int LoopNum, // plant loop sim call originated from int LoopSideNum, // plant loop side sim call originated from std::string const &EquipType, // type of equipment, 'PlantComponent:UserDefined' From 2e0245b3b6f011654b5d771ca6955f585dd47c37 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 14:48:42 -0700 Subject: [PATCH 84/86] steps 11 & 12 - inherit PlantComponent and move over to plantCompPtr calling structure --- src/EnergyPlus/Plant/PlantManager.cc | 2 + .../PlantHeatExchangerFluidToFluid.cc | 130 ++++++++---------- .../PlantHeatExchangerFluidToFluid.hh | 27 ++-- src/EnergyPlus/PlantLoopEquip.cc | 19 +-- .../PlantHeatExchangerFluidToFluid.unit.cc | 14 +- 5 files changed, 74 insertions(+), 118 deletions(-) diff --git a/src/EnergyPlus/Plant/PlantManager.cc b/src/EnergyPlus/Plant/PlantManager.cc index 1de5f8f3c2c..8897244feca 100644 --- a/src/EnergyPlus/Plant/PlantManager.cc +++ b/src/EnergyPlus/Plant/PlantManager.cc @@ -96,6 +96,7 @@ #include #include #include +#include #include #include #include @@ -1267,6 +1268,7 @@ namespace EnergyPlus { } else if (LoopSideNum == SupplySide) { this_comp.CurOpSchemeType = FreeRejectionOpSchemeType; } + this_comp.compPtr = PlantHeatExchangerFluidToFluid::HeatExchangerStruct::factory(CompNames(CompNum)); } else if (UtilityRoutines::SameString(this_comp_type, "Generator:MicroTurbine")) { this_comp.TypeOf_Num = TypeOf_Generator_MicroTurbine; this_comp.GeneralEquipType = GenEquipTypes_Generator; diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 65ace23dcbc..30a4a7ffd29 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -124,18 +124,49 @@ namespace PlantHeatExchangerFluidToFluid { Array1D FluidHX; - void SimFluidHeatExchanger(int const LoopNum, // plant loop sim call originated from - int const EP_UNUSED(LoopSideNum), // plant loop side sim call originated from - std::string const &EP_UNUSED(EquipType), // type of equipment, 'PlantComponent:UserDefined' - std::string const &EquipName, // user name for component - int &CompIndex, - bool &InitLoopEquip, - Real64 const MyLoad, - Real64 &MaxCap, - Real64 &MinCap, - Real64 &OptCap, - bool const FirstHVACIteration) + PlantComponent *HeatExchangerStruct::factory(std::string const &objectName) { + // Process the input data for heat exchangers if it hasn't been done already + if (GetInput) { + GetFluidHeatExchangerInput(); + GetInput = false; + } + // Now look for this particular object + for (auto &obj : FluidHX) { + if (obj.Name == objectName) { + return &obj; + } + } + // If we didn't find it, fatal + ShowFatalError("LocalPlantFluidHXFactory: Error getting inputs for object named: " + objectName); // LCOV_EXCL_LINE + // Shut up the compiler + return nullptr; // LCOV_EXCL_LINE + } + + void HeatExchangerStruct::onInitLoopEquip(const PlantLocation &EP_UNUSED(calledFromLocation)) + { + this->initialize(); + } + + void HeatExchangerStruct::getDesignCapacities(const PlantLocation &calledFromLocation, Real64 &MaxLoad, Real64 &MinLoad, Real64 &OptLoad) + { + if (calledFromLocation.loopNum == this->DemandSideLoop.loopNum) { + MinLoad = 0.0; + MaxLoad = this->DemandSideLoop.MaxLoad; + OptLoad = this->DemandSideLoop.MaxLoad * 0.9; + } else if (calledFromLocation.loopNum == this->SupplySideLoop.loopNum) { + this->size(); // only call sizing from the loop that sizes are based on + MinLoad = 0.0; + MaxLoad = this->SupplySideLoop.MaxLoad; + OptLoad = this->SupplySideLoop.MaxLoad * 0.9; + } + } + + void HeatExchangerStruct::simulate(const PlantLocation &calledFromLocation, + bool const FirstHVACIteration, + Real64 &CurLoad, + bool const EP_UNUSED(RunFlag)) + { // SUBROUTINE INFORMATION: // AUTHOR B. Griffith @@ -145,63 +176,20 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // Main entry point and simulation manager for heat exchanger - - int CompNum; - if (GetInput) { - GetFluidHeatExchangerInput(); - GetInput = false; - } - - // Find the correct Equipment - if (CompIndex == 0) { - CompNum = UtilityRoutines::FindItemInList(EquipName, FluidHX); - if (CompNum == 0) { - ShowFatalError("SimFluidHeatExchanger: HeatExchanger:FluidToFluid not found"); - } - CompIndex = CompNum; - } else { - CompNum = CompIndex; - if (CompNum < 1 || CompNum > NumberOfPlantFluidHXs) { - ShowFatalError("SimFluidHeatExchanger: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + ", Number of heat exchangers =" + - General::TrimSigDigits(NumberOfPlantFluidHXs) + ", Entered heat exchanger name = " + EquipName); - } - if (CheckFluidHXs(CompNum)) { - if (EquipName != FluidHX(CompNum).Name) { - ShowFatalError("SimFluidHeatExchanger: Invalid CompIndex passed=" + General::TrimSigDigits(CompNum) + - ", heat exchanger name=" + EquipName + ", stored name for that index=" + FluidHX(CompNum).Name); - } - CheckFluidHXs(CompNum) = false; - } - } - - if (InitLoopEquip) { - FluidHX(CompNum).initialize(); - if (LoopNum == FluidHX(CompNum).DemandSideLoop.loopNum) { - MinCap = 0.0; - MaxCap = FluidHX(CompNum).DemandSideLoop.MaxLoad; - OptCap = FluidHX(CompNum).DemandSideLoop.MaxLoad * 0.9; - } else if (LoopNum == FluidHX(CompNum).SupplySideLoop.loopNum) { - FluidHX(CompNum).size(); // only call sizing from the loop that sizes are based on - MinCap = 0.0; - MaxCap = FluidHX(CompNum).SupplySideLoop.MaxLoad; - OptCap = FluidHX(CompNum).SupplySideLoop.MaxLoad * 0.9; - } - } - - FluidHX(CompNum).initialize(); + this->initialize(); // for op scheme led HXs, only call controls if called from Loop Supply Side - if ((FluidHX(CompNum).ControlMode == OperationSchemeModulated) || (FluidHX(CompNum).ControlMode == OperationSchemeOnOff)) { - if (LoopNum == FluidHX(CompNum).SupplySideLoop.loopNum) { - FluidHX(CompNum).control(CompNum, LoopNum, MyLoad, FirstHVACIteration); + if ((this->ControlMode == OperationSchemeModulated) || (this->ControlMode == OperationSchemeOnOff)) { + if (calledFromLocation.loopNum == this->SupplySideLoop.loopNum) { + this->control(calledFromLocation.loopNum, CurLoad, FirstHVACIteration); } } else { - FluidHX(CompNum).control(CompNum, LoopNum, MyLoad, FirstHVACIteration); + this->control(calledFromLocation.loopNum, CurLoad, FirstHVACIteration); } - FluidHX(CompNum).calculate(DataLoopNode::Node(FluidHX(CompNum).SupplySideLoop.inletNodeNum).MassFlowRate, - DataLoopNode::Node(FluidHX(CompNum).DemandSideLoop.inletNodeNum).MassFlowRate); + this->calculate(DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).MassFlowRate, + DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).MassFlowRate); } void GetFluidHeatExchangerInput() @@ -1016,7 +1004,7 @@ namespace PlantHeatExchangerFluidToFluid { } } - void HeatExchangerStruct::control(int const CompNum, int const EP_UNUSED(LoopNum), Real64 const MyLoad, bool FirstHVACIteration) + void HeatExchangerStruct::control(int const EP_UNUSED(LoopNum), Real64 const MyLoad, bool FirstHVACIteration) { // SUBROUTINE INFORMATION: @@ -1109,7 +1097,7 @@ namespace PlantHeatExchangerFluidToFluid { RoutineName); Real64 TargetLeavingTemp = this->SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); - this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); + this->findDemandSideLoopFlow(TargetLeavingTemp, CoolingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, @@ -1163,7 +1151,7 @@ namespace PlantHeatExchangerFluidToFluid { RoutineName); Real64 TargetLeavingTemp = this->SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); - this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); + this->findDemandSideLoopFlow(TargetLeavingTemp, HeatingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, @@ -1355,7 +1343,7 @@ namespace PlantHeatExchangerFluidToFluid { if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTemp; - this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); + this->findDemandSideLoopFlow(TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, @@ -1458,7 +1446,7 @@ namespace PlantHeatExchangerFluidToFluid { this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTemp; - this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); + this->findDemandSideLoopFlow(TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, @@ -1564,7 +1552,7 @@ namespace PlantHeatExchangerFluidToFluid { this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTempHi; - this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, CoolingSupplySideLoop); + this->findDemandSideLoopFlow(TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, @@ -1587,7 +1575,7 @@ namespace PlantHeatExchangerFluidToFluid { this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTempLo; - this->findDemandSideLoopFlow(CompNum, TargetLeavingTemp, HeatingSupplySideLoop); + this->findDemandSideLoopFlow(TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, @@ -2069,7 +2057,7 @@ namespace PlantHeatExchangerFluidToFluid { } } - void HeatExchangerStruct::findDemandSideLoopFlow(int const CompNum, Real64 const TargetSupplySideLoopLeavingTemp, int const HXActionMode) + void HeatExchangerStruct::findDemandSideLoopFlow(Real64 const TargetSupplySideLoopLeavingTemp, int const HXActionMode) { // SUBROUTINE INFORMATION: @@ -2111,9 +2099,7 @@ namespace PlantHeatExchangerFluidToFluid { if (SELECT_CASE_var == HeatingSupplySideLoop) { if ((LeavingTempFullFlow > TargetSupplySideLoopLeavingTemp) && (TargetSupplySideLoopLeavingTemp > LeavingTempMinFlow)) { // need to solve - Par(1) = double(CompNum); // HX index Par(2) = TargetSupplySideLoopLeavingTemp; - auto f = std::bind(&HeatExchangerStruct::demandSideFlowResidual, this, std::placeholders::_1, std::placeholders::_2); General::SolveRoot(Acc, @@ -2192,9 +2178,7 @@ namespace PlantHeatExchangerFluidToFluid { } else if (SELECT_CASE_var == CoolingSupplySideLoop) { if ((LeavingTempFullFlow < TargetSupplySideLoopLeavingTemp) && (TargetSupplySideLoopLeavingTemp < LeavingTempMinFlow)) { // need to solve - Par(1) = double(CompNum); // HX index Par(2) = TargetSupplySideLoopLeavingTemp; - auto f = std::bind(&HeatExchangerStruct::demandSideFlowResidual, this, std::placeholders::_1, std::placeholders::_2); General::SolveRoot(Acc, diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 36f2f5fe41a..2ad5f9c1831 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -55,6 +55,7 @@ #include #include #include +#include namespace EnergyPlus { @@ -102,7 +103,7 @@ namespace PlantHeatExchangerFluidToFluid { } }; - struct HeatExchangerStruct + struct HeatExchangerStruct : PlantComponent { // Members std::string Name; @@ -146,6 +147,14 @@ namespace PlantHeatExchangerFluidToFluid { { } + static PlantComponent *factory(std::string const &objectName); + + void onInitLoopEquip(const PlantLocation &calledFromLocation) override; + + void getDesignCapacities(const PlantLocation &calledFromLocation, Real64 &MaxLoad, Real64 &MinLoad, Real64 &OptLoad) override; + + void simulate(const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag) override; + void setupOutputVars(); void initialize(); @@ -154,9 +163,9 @@ namespace PlantHeatExchangerFluidToFluid { void calculate(Real64 SupSideMdot, Real64 DmdSideMdot); - void control(int CompNum, int LoopNum, Real64 MyLoad, bool FirstHVACIteration); + void control(int LoopNum, Real64 MyLoad, bool FirstHVACIteration); - void findDemandSideLoopFlow(int CompNum, Real64 TargetSupplySideLoopLeavingTemp, int HXActionMode); + void findDemandSideLoopFlow(Real64 TargetSupplySideLoopLeavingTemp, int HXActionMode); Real64 demandSideFlowResidual(Real64 DmdSideMassFlowRate, Array1 const &Par // Par(1) = HX index number @@ -166,18 +175,6 @@ namespace PlantHeatExchangerFluidToFluid { // Object Data extern Array1D FluidHX; - void SimFluidHeatExchanger(int LoopNum, // plant loop sim call originated from - int LoopSideNum, // plant loop side sim call originated from - std::string const &EquipType, // type of equipment, 'PlantComponent:UserDefined' - std::string const &EquipName, // user name for component - int &CompIndex, - bool &InitLoopEquip, - Real64 MyLoad, - Real64 &MaxCap, - Real64 &MinCap, - Real64 &OptCap, - bool FirstHVACIteration); - void GetFluidHeatExchangerInput(); } // namespace PlantHeatExchangerFluidToFluid diff --git a/src/EnergyPlus/PlantLoopEquip.cc b/src/EnergyPlus/PlantLoopEquip.cc index 25d9bada75d..aaef57cc98a 100644 --- a/src/EnergyPlus/PlantLoopEquip.cc +++ b/src/EnergyPlus/PlantLoopEquip.cc @@ -186,7 +186,6 @@ namespace PlantLoopEquip { using Pumps::SimPumps; using ScheduleManager::GetCurrentScheduleValue; using WaterThermalTanks::SimWaterThermalTank; - using PlantHeatExchangerFluidToFluid::SimFluidHeatExchanger; using BaseboardRadiator::UpdateBaseboardPlantConnection; using HVACVariableRefrigerantFlow::SimVRFCondenserPlant; using HWBaseboardRadiator::UpdateHWBaseboardPlantConnection; @@ -647,23 +646,7 @@ namespace PlantLoopEquip { } else if (GeneralEquipType == GenEquipTypes_HeatExchanger) { if (EquipTypeNum == TypeOf_FluidToFluidPlantHtExchg) { - SimFluidHeatExchanger(LoopNum, - LoopSideNum, - sim_component.TypeOf, - sim_component.Name, - EquipNum, - InitLoopEquip, - CurLoad, - MaxLoad, - MinLoad, - OptLoad, - FirstHVACIteration); - if (InitLoopEquip) { - sim_component.MaxLoad = MaxLoad; - sim_component.MinLoad = MinLoad; - sim_component.OptLoad = OptLoad; - sim_component.CompNum = EquipNum; - } + sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag); } else { ShowSevereError("SimPlantEquip: Invalid Heat Exchanger Type=" + sim_component.TypeOf); diff --git a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc index 4d091ec2421..0ce9b499183 100644 --- a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc +++ b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc @@ -2346,13 +2346,13 @@ TEST_F(PlantHXFixture, PlantHXControlWithFirstHVACIteration) // when FirstHVACIteration is true, mass flow should match design max bool testFirstHVACIteration = true; - PlantHeatExchangerFluidToFluid::FluidHX(1).control(1, 1, -1000.0, testFirstHVACIteration); + PlantHeatExchangerFluidToFluid::FluidHX(1).control(1, -1000.0, testFirstHVACIteration); EXPECT_NEAR(DataLoopNode::Node(2).MassFlowRate, PlantHeatExchangerFluidToFluid::FluidHX(1).DemandSideLoop.MassFlowRateMax, 0.001); // when FirstHVACIteration is false, mass flow should be zero testFirstHVACIteration = false; - PlantHeatExchangerFluidToFluid::FluidHX(1).control(1, 1, -1000.0, testFirstHVACIteration); + PlantHeatExchangerFluidToFluid::FluidHX(1).control(1, -1000.0, testFirstHVACIteration); EXPECT_NEAR(DataLoopNode::Node(2).MassFlowRate, 0.0, 0.001); } @@ -2477,16 +2477,6 @@ TEST_F(PlantHXFixture, PlantHXControl_CoolingSetpointOnOffWithComponentOverride) // change the tolerance and check the result, issue 5626 fix subtracts tolerance PlantHeatExchangerFluidToFluid::FluidHX(1).TempControlTol = 1.5; PlantHeatExchangerFluidToFluid::FluidHX(1).initialize(); - -// EXPECT_NEAR(DataPlant::PlantLoop(1).LoopSide(2).Branch(2).Comp(1).FreeCoolCntrlMinCntrlTemp, 9.5, 0.001); -// -// // Force Effectiveness = 1 when -NTU < EXP_LowerLimit #6516 -// PlantHeatExchangerFluidToFluid::FluidHX(1).HeatExchangeModelType = PlantHeatExchangerFluidToFluid::CrossFlowBothMixed; -// PlantHeatExchangerFluidToFluid::FluidHX(1).UA = 9000.0; -// -// PlantHeatExchangerFluidToFluid::CalcFluidHeatExchanger(1, 0.1, 0.1); -// EXPECT_NEAR(PlantHeatExchangerFluidToFluid::FluidHX(1).Effectiveness, 1.0, 0.001); - } } // namespace EnergyPlus From f3052e903439f5ccd5cecee7b6ddafbab7f5200d Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 14:52:35 -0700 Subject: [PATCH 85/86] step 14 - apply style --- .../PlantHeatExchangerFluidToFluid.cc | 1154 +++++++++-------- .../PlantHeatExchangerFluidToFluid.hh | 14 +- .../PlantHeatExchangerFluidToFluid.unit.cc | 8 +- 3 files changed, 594 insertions(+), 582 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 30a4a7ffd29..977da0f8990 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -88,7 +88,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS MODULE: // Simulate a generic plant heat exchanger with a variety of control options - + int const CrossFlowBothUnMixed(1); int const CrossFlowBothMixed(2); int const CrossFlowSupplyLoopMixedDemandLoopUnMixed(3); @@ -166,7 +166,7 @@ namespace PlantHeatExchangerFluidToFluid { bool const FirstHVACIteration, Real64 &CurLoad, bool const EP_UNUSED(RunFlag)) - { + { // SUBROUTINE INFORMATION: // AUTHOR B. Griffith @@ -189,7 +189,7 @@ namespace PlantHeatExchangerFluidToFluid { } this->calculate(DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).MassFlowRate, - DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).MassFlowRate); + DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).MassFlowRate); } void GetFluidHeatExchangerInput() @@ -207,9 +207,9 @@ namespace PlantHeatExchangerFluidToFluid { static std::string const RoutineName("GetFluidHeatExchangerInput: "); bool ErrorsFound(false); - int NumAlphas; // Number of elements in the alpha array - int NumNums; // Number of elements in the numeric array - int IOStat; // IO Status when calling get input subroutine + int NumAlphas; // Number of elements in the alpha array + int NumNums; // Number of elements in the numeric array + int IOStat; // IO Status when calling get input subroutine int MaxNumAlphas(0); // argument for call to GetObjectDefMaxArgs int MaxNumNumbers(0); // argument for call to GetObjectDefMaxArgs int TotalArgs(0); // argument for call to GetObjectDefMaxArgs @@ -268,20 +268,44 @@ namespace PlantHeatExchangerFluidToFluid { } } - FluidHX(CompLoop).DemandSideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(3), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 1, DataLoopNode::ObjectIsNotParent); - FluidHX(CompLoop).DemandSideLoop.outletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(4), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 1, DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).DemandSideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(3), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + 1, + DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).DemandSideLoop.outletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(4), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + 1, + DataLoopNode::ObjectIsNotParent); BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(3), cAlphaArgs(4), "Loop Demand Side Plant Nodes"); FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRate = rNumericArgs(1); if (FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRate == DataSizing::AutoSize) { FluidHX(CompLoop).DemandSideLoop.DesignVolumeFlowRateWasAutoSized = true; } - FluidHX(CompLoop).SupplySideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(5), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Inlet, 2, DataLoopNode::ObjectIsNotParent); - FluidHX(CompLoop).SupplySideLoop.outletNodeNum = NodeInputManager::GetOnlySingleNode( - cAlphaArgs(6), ErrorsFound, cCurrentModuleObject, cAlphaArgs(1), DataLoopNode::NodeType_Water, DataLoopNode::NodeConnectionType_Outlet, 2, DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).SupplySideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(5), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Inlet, + 2, + DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).SupplySideLoop.outletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(6), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Outlet, + 2, + DataLoopNode::ObjectIsNotParent); BranchNodeConnections::TestCompSet(cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(5), cAlphaArgs(6), "Loop Supply Side Plant Nodes"); FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRate = rNumericArgs(2); if (FluidHX(CompLoop).SupplySideLoop.DesignVolumeFlowRate == DataSizing::AutoSize) { @@ -353,13 +377,13 @@ namespace PlantHeatExchangerFluidToFluid { if (!lAlphaFieldBlanks(9)) { FluidHX(CompLoop).SetPointNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(9), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Sensor, - 1, - DataLoopNode::ObjectIsNotParent); + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Sensor, + 1, + DataLoopNode::ObjectIsNotParent); // check that node actually has setpoints on it if ((FluidHX(CompLoop).ControlMode == HeatingSetPointModulated) || (FluidHX(CompLoop).ControlMode == HeatingSetPointOnOff) || (FluidHX(CompLoop).ControlMode == CoolingSetPointModulated) || (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOff) || @@ -373,7 +397,8 @@ namespace PlantHeatExchangerFluidToFluid { } else { // need call to EMS to check node bool NodeEMSSetPointMissing = false; - EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureSetPoint, NodeEMSSetPointMissing); + EMSManager::CheckIfNodeSetPointManagedByEMS( + FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureSetPoint, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(RoutineName + " Missing temperature setpoint for node = " + cAlphaArgs(9)); ShowContinueError("Occurs for " + cCurrentModuleObject + "=\"" + cAlphaArgs(1)); @@ -394,8 +419,10 @@ namespace PlantHeatExchangerFluidToFluid { } else { // need call to EMS to check node bool NodeEMSSetPointMissing = false; - EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMinSetPoint, NodeEMSSetPointMissing); - EMSManager::CheckIfNodeSetPointManagedByEMS(FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMaxSetPoint, NodeEMSSetPointMissing); + EMSManager::CheckIfNodeSetPointManagedByEMS( + FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMinSetPoint, NodeEMSSetPointMissing); + EMSManager::CheckIfNodeSetPointManagedByEMS( + FluidHX(CompLoop).SetPointNodeNum, EMSManager::iTemperatureMaxSetPoint, NodeEMSSetPointMissing); if (NodeEMSSetPointMissing) { ShowSevereError(RoutineName + " Missing temperature setpoint for node = " + cAlphaArgs(9)); ShowContinueError("Occurs for " + cCurrentModuleObject + "=\"" + cAlphaArgs(1)); @@ -428,14 +455,15 @@ namespace PlantHeatExchangerFluidToFluid { FluidHX(CompLoop).HeatTransferMeteringEndUse = cAlphaArgs(10); if (!lAlphaFieldBlanks(11)) { - FluidHX(CompLoop).OtherCompSupplySideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(11), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Actuator, - 1, - DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).OtherCompSupplySideLoop.inletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(11), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Actuator, + 1, + DataLoopNode::ObjectIsNotParent); } else { if (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); @@ -445,14 +473,15 @@ namespace PlantHeatExchangerFluidToFluid { } if (!lAlphaFieldBlanks(12)) { - FluidHX(CompLoop).OtherCompDemandSideLoop.inletNodeNum = NodeInputManager::GetOnlySingleNode(cAlphaArgs(12), - ErrorsFound, - cCurrentModuleObject, - cAlphaArgs(1), - DataLoopNode::NodeType_Water, - DataLoopNode::NodeConnectionType_Actuator, - 1, - DataLoopNode::ObjectIsNotParent); + FluidHX(CompLoop).OtherCompDemandSideLoop.inletNodeNum = + NodeInputManager::GetOnlySingleNode(cAlphaArgs(12), + ErrorsFound, + cCurrentModuleObject, + cAlphaArgs(1), + DataLoopNode::NodeType_Water, + DataLoopNode::NodeConnectionType_Actuator, + 1, + DataLoopNode::ObjectIsNotParent); } else { if (FluidHX(CompLoop).ControlMode == CoolingSetPointOnOffWithComponentOverride) { ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + cAlphaArgs(1) + "\", invalid entry."); @@ -504,12 +533,8 @@ namespace PlantHeatExchangerFluidToFluid { void HeatExchangerStruct::setupOutputVars() { - SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Rate", - OutputProcessor::Unit::W, - this->HeatTransferRate, - "System", - "Average", - this->Name); + SetupOutputVariable( + "Fluid Heat Exchanger Heat Transfer Rate", OutputProcessor::Unit::W, this->HeatTransferRate, "System", "Average", this->Name); SetupOutputVariable("Fluid Heat Exchanger Heat Transfer Energy", OutputProcessor::Unit::J, @@ -565,19 +590,10 @@ namespace PlantHeatExchangerFluidToFluid { "Average", this->Name); - SetupOutputVariable("Fluid Heat Exchanger Operation Status", - OutputProcessor::Unit::None, - this->OperationStatus, - "System", - "Average", - this->Name); + SetupOutputVariable( + "Fluid Heat Exchanger Operation Status", OutputProcessor::Unit::None, this->OperationStatus, "System", "Average", this->Name); - SetupOutputVariable("Fluid Heat Exchanger Effectiveness", - OutputProcessor::Unit::None, - this->Effectiveness, - "System", - "Average", - this->Name); + SetupOutputVariable("Fluid Heat Exchanger Effectiveness", OutputProcessor::Unit::None, this->Effectiveness, "System", "Average", this->Name); } void HeatExchangerStruct::initialize() @@ -591,7 +607,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS SUBROUTINE: // Initialize heat exchanger model - + static std::string const RoutineNameNoColon("InitFluidHeatExchanger"); static std::string const RoutineName("InitFluidHeatExchanger: "); @@ -619,8 +635,8 @@ namespace PlantHeatExchangerFluidToFluid { _); if (this->DemandSideLoop.loopSideNum != DataPlant::DemandSide) { // throw error - ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + - this->Name + "\""); + ShowSevereError(RoutineName + " Invalid connections for " + + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + this->Name + "\""); ShowContinueError("The \"Loop Demand Side\" connections are not on the Demand Side of a plant loop"); errFlag = true; } @@ -639,26 +655,26 @@ namespace PlantHeatExchangerFluidToFluid { _); if (this->SupplySideLoop.loopSideNum != DataPlant::SupplySide) { // throw error - ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + - this->Name + "\""); + ShowSevereError(RoutineName + " Invalid connections for " + + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + this->Name + "\""); ShowContinueError("The \"Loop Supply Side\" connections are not on the Supply Side of a plant loop"); errFlag = true; } // make sure it is not the same loop on both sides. if (this->SupplySideLoop.loopNum == this->DemandSideLoop.loopNum) { // user is being too tricky, don't allow - ShowSevereError(RoutineName + " Invalid connections for " + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + - this->Name + "\""); + ShowSevereError(RoutineName + " Invalid connections for " + + DataPlant::ccSimPlantEquipTypes(DataPlant::TypeOf_FluidToFluidPlantHtExchg) + " name = \"" + this->Name + "\""); ShowContinueError(R"(The "Loop Supply Side" and "Loop Demand Side" need to be on different loops.)"); errFlag = true; } else { PlantUtilities::InterConnectTwoPlantLoopSides(this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - DataPlant::TypeOf_FluidToFluidPlantHtExchg, - true); + this->SupplySideLoop.loopSideNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + DataPlant::TypeOf_FluidToFluidPlantHtExchg, + true); } // find remote component if control mode is of that type. @@ -685,7 +701,8 @@ namespace PlantHeatExchangerFluidToFluid { int LoopCompNum = this->OtherCompSupplySideLoop.compNum; { - auto const SELECT_CASE_var(DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed); + auto const SELECT_CASE_var( + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed); if (SELECT_CASE_var == DataPlant::HowMet_ByNominalCap) { DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).HowLoadServed = @@ -699,11 +716,14 @@ namespace PlantHeatExchangerFluidToFluid { { auto const SELECT_CASE_var(this->ControlSignalTemp); if (SELECT_CASE_var == WetBulbTemperature) { - DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_WetBulb; + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = + DataPlant::FreeCoolControlMode_WetBulb; } else if (SELECT_CASE_var == DryBulbTemperature) { - DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_DryBulb; + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = + DataPlant::FreeCoolControlMode_DryBulb; } else if (SELECT_CASE_var == LoopTemperature) { - DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = DataPlant::FreeCoolControlMode_Loop; + DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlMode = + DataPlant::FreeCoolControlMode_Loop; DataPlant::PlantLoop(LoopNum2).LoopSide(LoopSideNum).Branch(BranchNum).Comp(LoopCompNum).FreeCoolCntrlNodeNum = this->OtherCompDemandSideLoop.inletNodeNum; } @@ -749,32 +769,32 @@ namespace PlantHeatExchangerFluidToFluid { if (DataGlobals::BeginEnvrnFlag && this->MyEnvrnFlag && (DataPlant::PlantFirstSizesOkayToFinalize)) { Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, - DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, - RoutineNameNoColon); + DataGlobals::InitConvTemp, + DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, + RoutineNameNoColon); this->DemandSideLoop.MassFlowRateMax = rho * this->DemandSideLoop.DesignVolumeFlowRate; PlantUtilities::InitComponentNodes(this->DemandSideLoop.MassFlowRateMin, - this->DemandSideLoop.MassFlowRateMax, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.MassFlowRateMax, + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineNameNoColon); + DataGlobals::InitConvTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineNameNoColon); this->SupplySideLoop.MassFlowRateMax = rho * this->SupplySideLoop.DesignVolumeFlowRate; PlantUtilities::InitComponentNodes(this->SupplySideLoop.MassFlowRateMin, - this->SupplySideLoop.MassFlowRateMax, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.MassFlowRateMax, + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); this->MyEnvrnFlag = false; } if (!DataGlobals::BeginEnvrnFlag) { @@ -831,15 +851,15 @@ namespace PlantHeatExchangerFluidToFluid { } if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Loop Supply Side Design Fluid Flow Rate [m3/s]", - this->SupplySideLoop.DesignVolumeFlowRate); + this->Name, + "Loop Supply Side Design Fluid Flow Rate [m3/s]", + this->SupplySideLoop.DesignVolumeFlowRate); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Initial Loop Supply Side Design Fluid Flow Rate [m3/s]", - this->SupplySideLoop.DesignVolumeFlowRate); + this->Name, + "Initial Loop Supply Side Design Fluid Flow Rate [m3/s]", + this->SupplySideLoop.DesignVolumeFlowRate); } } else { if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -862,15 +882,15 @@ namespace PlantHeatExchangerFluidToFluid { } if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Loop Demand Side Design Fluid Flow Rate [m3/s]", - this->DemandSideLoop.DesignVolumeFlowRate); + this->Name, + "Loop Demand Side Design Fluid Flow Rate [m3/s]", + this->DemandSideLoop.DesignVolumeFlowRate); } if (DataPlant::PlantFirstSizesOkayToReport) { ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Initial Loop Demand Side Design Fluid Flow Rate [m3/s]", - this->DemandSideLoop.DesignVolumeFlowRate); + this->Name, + "Initial Loop Demand Side Design Fluid Flow Rate [m3/s]", + this->DemandSideLoop.DesignVolumeFlowRate); } } PlantUtilities::RegisterPlantCompDesignFlow(this->DemandSideLoop.inletNodeNum, tmpDmdSideDesignVolFlowRate); @@ -886,11 +906,13 @@ namespace PlantHeatExchangerFluidToFluid { auto const SELECT_CASE_var(DataSizing::PlantSizData(PltSizNumSupSide).LoopType); if ((SELECT_CASE_var == DataSizing::HeatingLoop) || (SELECT_CASE_var == DataSizing::SteamLoop)) { - tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - - DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); + tmpDeltaTloopToLoop = + std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp - DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - + DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); } else if ((SELECT_CASE_var == DataSizing::CoolingLoop) || (SELECT_CASE_var == DataSizing::CondenserLoop)) { - tmpDeltaTloopToLoop = std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - - DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); + tmpDeltaTloopToLoop = + std::abs((DataSizing::PlantSizData(PltSizNumSupSide).ExitTemp + DataSizing::PlantSizData(PltSizNumSupSide).DeltaT) - + DataSizing::PlantSizData(PltSizNumDmdSide).ExitTemp); } else { assert(false); } @@ -901,14 +923,14 @@ namespace PlantHeatExchangerFluidToFluid { if (tmpSupSideDesignVolFlowRate >= DataHVACGlobals::SmallWaterVolFlow) { Real64 Cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineName); + DataGlobals::InitConvTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineName); Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineName); + DataGlobals::InitConvTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineName); Real64 tmpDesCap = Cp * rho * tmpDeltaTSupLoop * tmpSupSideDesignVolFlowRate; if (DataPlant::PlantFirstSizesOkayToFinalize) this->UA = tmpDesCap / tmpDeltaTloopToLoop; @@ -918,20 +940,20 @@ namespace PlantHeatExchangerFluidToFluid { if (DataPlant::PlantFinalSizesOkayToReport) { ReportSizingManager::ReportSizingOutput( "HeatExchanger:FluidToFluid", this->Name, "Heat Exchanger U-Factor Times Area Value [W/C]", this->UA); - ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", - tmpDeltaTloopToLoop); + ReportSizingManager::ReportSizingOutput( + "HeatExchanger:FluidToFluid", + this->Name, + "Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", + tmpDeltaTloopToLoop); } if (DataPlant::PlantFirstSizesOkayToReport) { - ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Initial Heat Exchanger U-Factor Times Area Value [W/C]", - this->UA); - ReportSizingManager::ReportSizingOutput("HeatExchanger:FluidToFluid", - this->Name, - "Initial Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", - tmpDeltaTloopToLoop); + ReportSizingManager::ReportSizingOutput( + "HeatExchanger:FluidToFluid", this->Name, "Initial Heat Exchanger U-Factor Times Area Value [W/C]", this->UA); + ReportSizingManager::ReportSizingOutput( + "HeatExchanger:FluidToFluid", + this->Name, + "Initial Loop-to-loop Temperature Difference Used to Size Heat Exchanger U-Factor Times Area Value [C]", + tmpDeltaTloopToLoop); } } else { if (DataPlant::PlantFirstSizesOkayToFinalize) { @@ -963,9 +985,9 @@ namespace PlantHeatExchangerFluidToFluid { DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; } else if (DataPlant::PlantLoop(this->SupplySideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { DataLoopNode::Node(this->SupplySideLoop.inletNodeNum).Temp = - (DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + - DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / - 2.0; + (DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / + 2.0; } } @@ -978,21 +1000,21 @@ namespace PlantHeatExchangerFluidToFluid { DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPoint; } else if (DataPlant::PlantLoop(this->DemandSideLoop.loopNum).LoopDemandCalcScheme == DataPlant::DualSetPointDeadBand) { DataLoopNode::Node(this->DemandSideLoop.inletNodeNum).Temp = - (DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + - DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / - 2.0; + (DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointHi + + DataLoopNode::Node(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).TempSetPointNodeNum).TempSetPointLo) / + 2.0; } } Real64 rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineName); + DataGlobals::InitConvTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineName); Real64 SupSideMdot = this->SupplySideLoop.DesignVolumeFlowRate * rho; rho = FluidProperties::GetDensityGlycol(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, - DataGlobals::InitConvTemp, - DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, - RoutineName); + DataGlobals::InitConvTemp, + DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, + RoutineName); Real64 DmdSideMdot = this->DemandSideLoop.DesignVolumeFlowRate * rho; this->calculate(SupSideMdot, DmdSideMdot); @@ -1019,7 +1041,7 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // long CASE statement for different control options - + static std::string const RoutineName("ControlFluidHeatExchanger"); Real64 mdotSupSide; @@ -1055,12 +1077,12 @@ namespace PlantHeatExchangerFluidToFluid { // make passive request for supply side loop flow mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; @@ -1068,12 +1090,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if (SELECT_CASE_var == OperationSchemeModulated) { @@ -1083,40 +1105,40 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTCooling > this->TempControlTol) { // can do cooling so turn on mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { // if supply side loop has massflow, request demand side flow Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - this->SupplySideLoop.InletTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineName); + this->SupplySideLoop.InletTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineName); Real64 TargetLeavingTemp = this->SupplySideLoop.InletTemp - std::abs(MyLoad) / (cp * mdotSupSide); this->findDemandSideLoopFlow(TargetLeavingTemp, CoolingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->SupplySideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->SupplySideLoop.compNum); } } else { // not able to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1125,12 +1147,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->SupplySideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->SupplySideLoop.compNum); } } else { // requesting heating @@ -1138,39 +1160,39 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTHeating > this->TempControlTol) { // can do heating so turn on mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 cp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - this->SupplySideLoop.InletTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineName); + this->SupplySideLoop.InletTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineName); Real64 TargetLeavingTemp = this->SupplySideLoop.InletTemp + std::abs(MyLoad) / (cp * mdotSupSide); this->findDemandSideLoopFlow(TargetLeavingTemp, HeatingSupplySideLoop); } else { // no flow on supply side so do not request flow on demand side mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1179,32 +1201,32 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } else { // no load mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == OperationSchemeOnOff) { @@ -1214,12 +1236,12 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTCooling > this->TempControlTol) { // can do cooling so turn on mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { @@ -1227,21 +1249,21 @@ namespace PlantHeatExchangerFluidToFluid { } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1250,12 +1272,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // requesting heating @@ -1263,33 +1285,33 @@ namespace PlantHeatExchangerFluidToFluid { if (DeltaTHeating > this->TempControlTol) { // can do heating so turn on mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a // fresh demand side inlet temperature value if (FirstHVACIteration) { @@ -1298,32 +1320,32 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } else { // no load mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == HeatingSetPointModulated) { @@ -1334,12 +1356,12 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to heat mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTemp; @@ -1347,22 +1369,22 @@ namespace PlantHeatExchangerFluidToFluid { } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able are wanting to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1371,12 +1393,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == HeatingSetPointOnOff) { @@ -1387,33 +1409,33 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to heat mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able or are wanting to heat so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1422,12 +1444,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointModulated) { @@ -1438,34 +1460,34 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTemp; this->findDemandSideLoopFlow(TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1474,12 +1496,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointOnOff) { @@ -1490,33 +1512,33 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able or are wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1525,12 +1547,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == DualDeadBandSetPointModulated) { @@ -1544,57 +1566,57 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTempHi; this->findDemandSideLoopFlow(TargetLeavingTemp, CoolingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if ((DeltaTHeating > this->TempControlTol) && (SetPointTempLo > this->SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { Real64 TargetLeavingTemp = SetPointTempLo; this->findDemandSideLoopFlow(TargetLeavingTemp, HeatingSupplySideLoop); } else { mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else { // not able or don't want conditioning mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1603,12 +1625,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == DualDeadBandSetPointOnOff) { @@ -1621,55 +1643,55 @@ namespace PlantHeatExchangerFluidToFluid { // can and want to cool mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if ((DeltaTHeating > this->TempControlTol) && (SetPointTempLo > this->SupplySideLoop.InletTemp)) { // can and want to heat mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not able or don't want conditioning mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1678,12 +1700,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingDifferentialOnOff) { @@ -1693,33 +1715,33 @@ namespace PlantHeatExchangerFluidToFluid { // want to cool mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { // not wanting to cool so turn off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1728,12 +1750,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSetPointOnOffWithComponentOverride) { @@ -1757,42 +1779,42 @@ namespace PlantHeatExchangerFluidToFluid { Real64 DeltaTCooling = SetPointTemp - ControlSignalValue; // obtain shut down state bool ChillerShutDown = DataPlant::PlantLoop(this->OtherCompSupplySideLoop.loopNum) - .LoopSide(this->OtherCompSupplySideLoop.loopSideNum) - .Branch(this->OtherCompSupplySideLoop.branchNum) - .Comp(this->OtherCompSupplySideLoop.compNum) - .FreeCoolCntrlShutDown; + .LoopSide(this->OtherCompSupplySideLoop.loopSideNum) + .Branch(this->OtherCompSupplySideLoop.branchNum) + .Comp(this->OtherCompSupplySideLoop.compNum) + .FreeCoolCntrlShutDown; if (ChillerShutDown && (DeltaTCooling > this->TempControlTol)) { // can and want to cool mdotSupSide = this->SupplySideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); if (mdotSupSide > DataBranchAirLoopPlant::MassFlowTolerance) { mdotDmdSide = this->DemandSideLoop.MassFlowRateMax; } else { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else { mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); // issue 4959, make demand side flow request on first hvac iteration so demand side loop can run as a trial to get a fresh // demand side inlet temperature value if (FirstHVACIteration) { @@ -1801,12 +1823,12 @@ namespace PlantHeatExchangerFluidToFluid { mdotDmdSide = 0.0; } PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } @@ -1814,20 +1836,20 @@ namespace PlantHeatExchangerFluidToFluid { } else { // scheduled off mdotSupSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotSupSide, - this->SupplySideLoop.inletNodeNum, - this->SupplySideLoop.outletNodeNum, - this->SupplySideLoop.loopNum, - this->SupplySideLoop.loopSideNum, - this->SupplySideLoop.branchNum, - this->SupplySideLoop.compNum); + this->SupplySideLoop.inletNodeNum, + this->SupplySideLoop.outletNodeNum, + this->SupplySideLoop.loopNum, + this->SupplySideLoop.loopSideNum, + this->SupplySideLoop.branchNum, + this->SupplySideLoop.compNum); mdotDmdSide = 0.0; PlantUtilities::SetComponentFlowRate(mdotDmdSide, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } @@ -1856,15 +1878,15 @@ namespace PlantHeatExchangerFluidToFluid { // specific heat of fluid entering from supply side loop at inlet temp Real64 SupSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidName, - SupSideLoopInletTemp, - DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, - RoutineName); + SupSideLoopInletTemp, + DataPlant::PlantLoop(this->SupplySideLoop.loopNum).FluidIndex, + RoutineName); // specific heat of fluid entering from demand side loop at inlet temp Real64 DmdSideLoopInletCp = FluidProperties::GetSpecificHeatGlycol(DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidName, - DmdSideLoopInletTemp, - DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, - RoutineName); + DmdSideLoopInletTemp, + DataPlant::PlantLoop(this->DemandSideLoop.loopNum).FluidIndex, + RoutineName); Real64 SupSideCapRate = SupSideMdot * SupSideLoopInletCp; Real64 DmdSideCapRate = DmdSideMdot * DmdSideLoopInletCp; @@ -2071,7 +2093,7 @@ namespace PlantHeatExchangerFluidToFluid { // METHODOLOGY EMPLOYED: // uses E+'s Regula Falsi numerical method - + int const MaxIte(500); // Maximum number of iterations for solver Real64 const Acc(1.e-3); // Accuracy of solver result @@ -2102,14 +2124,8 @@ namespace PlantHeatExchangerFluidToFluid { Par(2) = TargetSupplySideLoopLeavingTemp; auto f = std::bind(&HeatExchangerStruct::demandSideFlowResidual, this, std::placeholders::_1, std::placeholders::_2); - General::SolveRoot(Acc, - MaxIte, - SolFla, - DmdSideMdot, - f, - this->DemandSideLoop.MassFlowRateMin, - this->DemandSideLoop.MassFlowRateMax, - Par); + General::SolveRoot( + Acc, MaxIte, SolFla, DmdSideMdot, f, this->DemandSideLoop.MassFlowRateMin, this->DemandSideLoop.MassFlowRateMax, Par); if (SolFla == -1) { // no convergence if (!DataGlobals::WarmupFlag) { @@ -2145,35 +2161,35 @@ namespace PlantHeatExchangerFluidToFluid { } } PlantUtilities::SetComponentFlowRate(DmdSideMdot, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if ((TargetSupplySideLoopLeavingTemp >= LeavingTempFullFlow) && (LeavingTempFullFlow > LeavingTempMinFlow)) { // run at full flow DmdSideMdot = this->DemandSideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if (LeavingTempMinFlow >= TargetSupplySideLoopLeavingTemp) { // run at min flow DmdSideMdot = this->DemandSideLoop.MassFlowRateMin; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } else if (SELECT_CASE_var == CoolingSupplySideLoop) { if ((LeavingTempFullFlow < TargetSupplySideLoopLeavingTemp) && (TargetSupplySideLoopLeavingTemp < LeavingTempMinFlow)) { @@ -2181,14 +2197,8 @@ namespace PlantHeatExchangerFluidToFluid { Par(2) = TargetSupplySideLoopLeavingTemp; auto f = std::bind(&HeatExchangerStruct::demandSideFlowResidual, this, std::placeholders::_1, std::placeholders::_2); - General::SolveRoot(Acc, - MaxIte, - SolFla, - DmdSideMdot, - f, - this->DemandSideLoop.MassFlowRateMin, - this->DemandSideLoop.MassFlowRateMax, - Par); + General::SolveRoot( + Acc, MaxIte, SolFla, DmdSideMdot, f, this->DemandSideLoop.MassFlowRateMin, this->DemandSideLoop.MassFlowRateMax, Par); if (SolFla == -1) { // no convergence if (!DataGlobals::WarmupFlag) { @@ -2224,40 +2234,40 @@ namespace PlantHeatExchangerFluidToFluid { } } PlantUtilities::SetComponentFlowRate(DmdSideMdot, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if ((TargetSupplySideLoopLeavingTemp <= LeavingTempFullFlow) && (LeavingTempFullFlow < LeavingTempMinFlow)) { // run at full flow DmdSideMdot = this->DemandSideLoop.MassFlowRateMax; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } else if (LeavingTempMinFlow <= TargetSupplySideLoopLeavingTemp) { // run at min flow DmdSideMdot = this->DemandSideLoop.MassFlowRateMin; PlantUtilities::SetComponentFlowRate(DmdSideMdot, - this->DemandSideLoop.inletNodeNum, - this->DemandSideLoop.outletNodeNum, - this->DemandSideLoop.loopNum, - this->DemandSideLoop.loopSideNum, - this->DemandSideLoop.branchNum, - this->DemandSideLoop.compNum); + this->DemandSideLoop.inletNodeNum, + this->DemandSideLoop.outletNodeNum, + this->DemandSideLoop.loopNum, + this->DemandSideLoop.loopSideNum, + this->DemandSideLoop.branchNum, + this->DemandSideLoop.compNum); } } } } Real64 HeatExchangerStruct::demandSideFlowResidual(Real64 const DmdSideMassFlowRate, - Array1 const &Par // Par(1) = HX index number + Array1 const &Par // Par(1) = HX index number ) { @@ -2269,7 +2279,7 @@ namespace PlantHeatExchangerFluidToFluid { // PURPOSE OF THIS FUNCTION: // calculate residual value for regula falsi solver - + Real64 Residuum; // Residual to be minimized to zero Real64 MdotTrial = DmdSideMassFlowRate; diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 2ad5f9c1831..542d6a96417 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -85,9 +85,9 @@ namespace PlantHeatExchangerFluidToFluid { // Default Constructor PlantConnectionStruct() - : inletNodeNum(0), outletNodeNum(0), MassFlowRateMin(0.0), MassFlowRateMax(0.0), - DesignVolumeFlowRate(0.0), DesignVolumeFlowRateWasAutoSized(false), MyLoad(0.0), MinLoad(0.0), MaxLoad(0.0), OptLoad(0.0), - InletTemp(0.0), InletMassFlowRate(0.0), OutletTemp(0.0) + : inletNodeNum(0), outletNodeNum(0), MassFlowRateMin(0.0), MassFlowRateMax(0.0), DesignVolumeFlowRate(0.0), + DesignVolumeFlowRateWasAutoSized(false), MyLoad(0.0), MinLoad(0.0), MaxLoad(0.0), OptLoad(0.0), InletTemp(0.0), InletMassFlowRate(0.0), + OutletTemp(0.0) { } }; @@ -120,7 +120,7 @@ namespace PlantHeatExchangerFluidToFluid { PlantConnectionStruct DemandSideLoop; // plant connections and data for the side of HX connected to demand side PlantConnectionStruct SupplySideLoop; std::string HeatTransferMeteringEndUse; - std::string ComponentUserName; // user name for control-associated component + std::string ComponentUserName; // user name for control-associated component int ComponentTypeOfNum; PlantLocatorStruct OtherCompSupplySideLoop; PlantLocatorStruct OtherCompDemandSideLoop; @@ -142,8 +142,8 @@ namespace PlantHeatExchangerFluidToFluid { : AvailSchedNum(0), HeatExchangeModelType(0), UA(0.0), UAWasAutoSized(false), ControlMode(0), SetPointNodeNum(0), TempControlTol(0.0), ControlSignalTemp(0), MinOperationTemp(-99999.0), MaxOperationTemp(99999.0), ComponentTypeOfNum(0), SizingFactor(1.0), HeatTransferRate(0.0), HeatTransferEnergy(0.0), Effectiveness(0.0), OperationStatus(0.0), DmdSideModulatSolvNoConvergeErrorCount(0), - DmdSideModulatSolvNoConvergeErrorIndex(0), DmdSideModulatSolvFailErrorCount(0), DmdSideModulatSolvFailErrorIndex(0), MyOneTimeFlag(true), - MyFlag(true), MyEnvrnFlag(true) + DmdSideModulatSolvNoConvergeErrorIndex(0), DmdSideModulatSolvFailErrorCount(0), DmdSideModulatSolvFailErrorIndex(0), + MyOneTimeFlag(true), MyFlag(true), MyEnvrnFlag(true) { } @@ -168,7 +168,7 @@ namespace PlantHeatExchangerFluidToFluid { void findDemandSideLoopFlow(Real64 TargetSupplySideLoopLeavingTemp, int HXActionMode); Real64 demandSideFlowResidual(Real64 DmdSideMassFlowRate, - Array1 const &Par // Par(1) = HX index number + Array1 const &Par // Par(1) = HX index number ); }; diff --git a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc index 0ce9b499183..3c34d195b5c 100644 --- a/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc +++ b/tst/EnergyPlus/unit/PlantHeatExchangerFluidToFluid.unit.cc @@ -51,24 +51,26 @@ #include #include "Fixtures/EnergyPlusFixture.hh" -#include -#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include namespace EnergyPlus { -class PlantHXFixture : public EnergyPlusFixture {}; +class PlantHXFixture : public EnergyPlusFixture +{ +}; TEST_F(PlantHXFixture, PlantHXModulatedDualDeadDefectFileHi) { From ebb89d2cd397bbd61580a3de86b32f2760111afe Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Tue, 7 Jan 2020 15:17:25 -0700 Subject: [PATCH 86/86] add clear_state --- src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc | 12 ++++++++++-- src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh | 3 +++ tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc index 977da0f8990..b3340071305 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.cc @@ -117,12 +117,20 @@ namespace PlantHeatExchangerFluidToFluid { int const HeatingSupplySideLoop(501); int const CoolingSupplySideLoop(502); - std::string ComponentClassName("HeatExchanger:FluidToFluid"); + std::string const ComponentClassName("HeatExchanger:FluidToFluid"); + int NumberOfPlantFluidHXs(0); bool GetInput(true); + Array1D FluidHX; Array1D_bool CheckFluidHXs; - Array1D FluidHX; + void clear_state() + { + NumberOfPlantFluidHXs = 0; + GetInput = true; + FluidHX.deallocate(); + CheckFluidHXs.deallocate(); + } PlantComponent *HeatExchangerStruct::factory(std::string const &objectName) { diff --git a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh index 542d6a96417..0ff713bd2e4 100644 --- a/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh +++ b/src/EnergyPlus/PlantHeatExchangerFluidToFluid.hh @@ -64,6 +64,7 @@ namespace PlantHeatExchangerFluidToFluid { extern int const CoolingDifferentialOnOff; extern int const CoolingSetPointOnOffWithComponentOverride; extern int const DryBulbTemperature; + extern int NumberOfPlantFluidHXs; struct PlantConnectionStruct : PlantLocation @@ -177,6 +178,8 @@ namespace PlantHeatExchangerFluidToFluid { void GetFluidHeatExchangerInput(); + void clear_state(); + } // namespace PlantHeatExchangerFluidToFluid } // namespace EnergyPlus diff --git a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc index 1375b8669f7..aa91d4be11c 100644 --- a/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc +++ b/tst/EnergyPlus/unit/Fixtures/EnergyPlusFixture.cc @@ -181,6 +181,7 @@ #include #include #include +#include #include #include #include @@ -430,6 +431,7 @@ void EnergyPlusFixture::clear_all_states() PlantCentralGSHP::clear_state(); PlantChillers::clear_state(); PlantCondLoopOperation::clear_state(); + PlantHeatExchangerFluidToFluid::clear_state(); PlantLoadProfile::clear_state(); PlantLoopSolver::clear_state(); PlantManager::clear_state();