Skip to content

Commit

Permalink
Merge pull request #7804 from NREL/update_ssz_zsz_mtr_files_to_fmt
Browse files Browse the repository at this point in the history
Update ssz zsz mtr files to fmt
  • Loading branch information
mitchute authored Mar 2, 2020
2 parents ca68d45 + accdc5e commit 2c629a9
Show file tree
Hide file tree
Showing 49 changed files with 1,359 additions and 840 deletions.
16 changes: 8 additions & 8 deletions src/EnergyPlus/CommandLineInterface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ namespace CommandLineInterface {

outputMtdFileName = outputFilePrefix + normalSuffix + ".mtd";
outputMddFileName = outputFilePrefix + normalSuffix + ".mdd";
outputMtrFileName = outputFilePrefix + normalSuffix + ".mtr";
OutputFiles::getSingleton().mtr.fileName = outputFilePrefix + normalSuffix + ".mtr";
outputRddFileName = outputFilePrefix + normalSuffix + ".rdd";
outputShdFileName = outputFilePrefix + normalSuffix + ".shd";
outputDfsFileName = outputFilePrefix + normalSuffix + ".dfs";
Expand All @@ -442,12 +442,12 @@ namespace CommandLineInterface {
outputMapTabFileName = outputFilePrefix + mapSuffix + ".tab";
outputMapCsvFileName = outputFilePrefix + mapSuffix + ".csv";
outputMapTxtFileName = outputFilePrefix + mapSuffix + ".txt";
outputZszCsvFileName = outputFilePrefix + zszSuffix + ".csv";
outputZszTabFileName = outputFilePrefix + zszSuffix + ".tab";
outputZszTxtFileName = outputFilePrefix + zszSuffix + ".txt";
outputSszCsvFileName = outputFilePrefix + sszSuffix + ".csv";
outputSszTabFileName = outputFilePrefix + sszSuffix + ".tab";
outputSszTxtFileName = outputFilePrefix + sszSuffix + ".txt";
OutputFiles::getSingleton().outputZszCsvFileName = outputFilePrefix + zszSuffix + ".csv";
OutputFiles::getSingleton().outputZszTabFileName = outputFilePrefix + zszSuffix + ".tab";
OutputFiles::getSingleton().outputZszTxtFileName = outputFilePrefix + zszSuffix + ".txt";
OutputFiles::getSingleton().outputSszCsvFileName = outputFilePrefix + sszSuffix + ".csv";
OutputFiles::getSingleton().outputSszTabFileName = outputFilePrefix + sszSuffix + ".tab";
OutputFiles::getSingleton().outputSszTxtFileName = outputFilePrefix + sszSuffix + ".txt";
outputAdsFileName = outputFilePrefix + adsSuffix + ".out";
outputExtShdFracFileName = outputFilePrefix + shdSuffix + ".csv";
if (suffixType == "L" || suffixType == "l") {
Expand Down Expand Up @@ -896,7 +896,7 @@ namespace CommandLineInterface {
if (iostatus != 0) {
ShowFatalError("EnergyPlus: Could not open file \"" + MVIfile + "\" for output (write).");
}
ObjexxFCL::gio::write(fileUnitNumber, readvarsFmt) << outputMtrFileName;
ObjexxFCL::gio::write(fileUnitNumber, readvarsFmt) << OutputFiles::getSingleton().mtr.fileName;
ObjexxFCL::gio::write(fileUnitNumber, readvarsFmt) << outputMtrCsvFileName;
ObjexxFCL::gio::close(fileUnitNumber);
}
Expand Down
6 changes: 0 additions & 6 deletions src/EnergyPlus/DataGlobals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ namespace DataGlobals {
int StdOutputRecordCount(0); // Count of Standard output records
int OutputFileDebug(0); // Unit number for debug outputs
int OutputFilePerfLog(0); // Unit number for performance log outputs
int OutputFileZoneSizing(0); // Unit number of zone sizing calc output file
int OutputFileSysSizing(0); // Unit number of system sizing calc output file
int OutputFileMeters(0); // Unit number for meters output
std::ostream *mtr_stream(nullptr); // Internal stream used for mtr output (used for performance)
int OutputFileShadingFrac(0); // Unit number for shading output
int StdMeterRecordCount(0); // Count of Meter output records
Expand Down Expand Up @@ -315,9 +312,6 @@ namespace DataGlobals {
StdOutputRecordCount = 0;
OutputFileDebug = 0;
OutputFilePerfLog = 0;
OutputFileZoneSizing = 0;
OutputFileSysSizing = 0;
OutputFileMeters = 0;
OutputFileShadingFrac = 0;
StdMeterRecordCount = 0;
OutputFileBNDetails = 0;
Expand Down
5 changes: 0 additions & 5 deletions src/EnergyPlus/DataGlobals.hh
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,8 @@ namespace DataGlobals {
extern int OutputStandardError; // Unit number for the standard error output file
extern std::ostream *err_stream; // Internal stream used for err output (used for performance)
extern int StdOutputRecordCount; // Count of Standard output records
extern std::ostream *eio_stream; // Internal stream used for eio output (used for unit tests)
extern int OutputFileDebug; // Unit number for debug outputs
extern int OutputFilePerfLog; // Unit number for performance log outputs
extern int OutputFileZoneSizing; // Unit number of zone sizing calc output file
extern int OutputFileSysSizing; // Unit number of system sizing calc output file
extern int OutputFileMeters; // Unit number for meters output
extern std::ostream *mtr_stream; // Internal stream used for mtr output (used for performance)
extern int OutputFileShadingFrac; // Unit number for shading output
extern int StdMeterRecordCount; // Count of Meter output records
extern int OutputFileBNDetails; // Unit number for Branch-Node Details
Expand Down
7 changes: 0 additions & 7 deletions src/EnergyPlus/DataStringGlobals.hh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ namespace DataStringGlobals {

extern std::string outputMtdFileName;
extern std::string outputMddFileName;
extern std::string outputMtrFileName;
extern std::string outputRddFileName;
extern std::string outputShdFileName;
extern std::string outputTblCsvFileName;
Expand Down Expand Up @@ -130,12 +129,6 @@ namespace DataStringGlobals {
extern std::string outputSlnFileName;
extern std::string outputSciFileName;
extern std::string outputWrlFileName;
extern std::string outputZszCsvFileName;
extern std::string outputZszTabFileName;
extern std::string outputZszTxtFileName;
extern std::string outputSszCsvFileName;
extern std::string outputSszTabFileName;
extern std::string outputSszTxtFileName;
extern std::string outputScreenCsvFileName;
extern std::string outputSqlFileName;
extern std::string outputSqliteErrFileName;
Expand Down
7 changes: 0 additions & 7 deletions src/EnergyPlus/DataStringGlobals.in.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ namespace DataStringGlobals {
std::string outputSMMsgPackFileName("eplusout_runperiod.msgpack");
std::string outputMtdFileName("eplusout.mtd");
std::string outputMddFileName("eplusout.mdd");
std::string outputMtrFileName("eplusout.mtr");
std::string outputRddFileName("eplusout.rdd");
std::string outputShdFileName("eplusout.shd");
std::string outputTblCsvFileName("eplustbl.csv");
Expand All @@ -179,12 +178,6 @@ namespace DataStringGlobals {
std::string outputSlnFileName("eplusout.sln");
std::string outputSciFileName("eplusout.sci");
std::string outputWrlFileName("eplusout.wrl");
std::string outputZszCsvFileName("epluszsz.csv");
std::string outputZszTabFileName("epluszsz.tab");
std::string outputZszTxtFileName("epluszsz.txt");
std::string outputSszCsvFileName("eplusssz.csv");
std::string outputSszTabFileName("eplusssz.tab");
std::string outputSszTxtFileName("eplusssz.txt");
std::string outputScreenCsvFileName("eplusscreen.csv");
std::string outputSqlFileName("eplusout.sql");
std::string outputSqliteErrFileName("eplussqlite.err");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public:
virtual Real64 getGroundTempAtTimeInMonths(Real64 const, int const) = 0;

protected:
static void write_ground_temps(OutputFiles::OutputFile &os, const std::string &name, const Array1D<Real64> &data)
static void write_ground_temps(OutputFile &os, const std::string &name, const Array1D<Real64> &data)
{
print(os,
"! <Site:GroundTemperature:{}>,Jan{{C}},Feb{{C}},Mar{{C}},Apr{{C}},May{{C}},Jun{{C}},Jul{{C}},Aug{{C}},Sep{{C}},Oct{{C}},Nov{{C}},Dec{{C}}\n", name);
Expand Down
33 changes: 22 additions & 11 deletions src/EnergyPlus/HVACManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ namespace HVACManager {
using DataGlobals::MetersHaveBeenInitialized;
using DataGlobals::NumOfZones;
using DataGlobals::OutputFileDebug;
using DataGlobals::OutputFileMeters;
using DataGlobals::OutputFileStandard;
using DataGlobals::RunOptCondEntTemp;
using DataGlobals::SecInHour;
Expand Down Expand Up @@ -219,7 +218,7 @@ namespace HVACManager {
ReportAirHeatBalanceFirstTimeFlag = true;
}

void ManageHVAC()
void ManageHVAC(OutputFiles &outputFiles)
{

// SUBROUTINE INFORMATION:
Expand Down Expand Up @@ -303,7 +302,9 @@ namespace HVACManager {

// SUBROUTINE PARAMETER DEFINITIONS:
static ObjexxFCL::gio::Fmt EndOfHeaderFormat("('End of Data Dictionary')"); // End of data dictionary marker
static constexpr auto EndOfHeaderString("End of Data Dictionary"); // End of data dictionary marker
static ObjexxFCL::gio::Fmt EnvironmentStampFormat("(a,',',a,3(',',f7.2),',',f7.2)"); // Format descriptor for environ stamp
static constexpr auto EnvironmentStampFormatStr("{},{},{:7.2F},{:7.2F},{:7.2F},{:7.2F}\n"); // Format descriptor for environ stamp
static ObjexxFCL::gio::Fmt fmtLD("*");

// INTERFACE BLOCK SPECIFICATIONS:
Expand Down Expand Up @@ -539,7 +540,7 @@ namespace HVACManager {
UpdateTabularReports(OutputProcessor::TimeStepType::TimeStepSystem);
}
if (ZoneSizingCalc) {
UpdateZoneSizing(DuringDay);
UpdateZoneSizing(OutputFiles::getSingleton(), DuringDay);
UpdateFacilitySizing(DuringDay);
}
EIRPlantLoopHeatPumps::EIRPlantLoopHeatPump::checkConcurrentOperation();
Expand All @@ -552,16 +553,21 @@ namespace HVACManager {
if (PrintEnvrnStampWarmup) {
if (PrintEndDataDictionary && DoOutputReporting && !PrintedWarmup) {
ObjexxFCL::gio::write(OutputFileStandard, EndOfHeaderFormat);
ObjexxFCL::gio::write(OutputFileMeters, EndOfHeaderFormat);
print(outputFiles.mtr, "{}\n", EndOfHeaderString);
PrintEndDataDictionary = false;
}
if (DoOutputReporting && !PrintedWarmup) {
ObjexxFCL::gio::write(OutputFileStandard, EnvironmentStampFormat)
<< "1"
<< "Warmup {" + cWarmupDay + "} " + EnvironmentName << Latitude << Longitude << TimeZoneNumber << Elevation;
ObjexxFCL::gio::write(OutputFileMeters, EnvironmentStampFormat)
<< "1"
<< "Warmup {" + cWarmupDay + "} " + EnvironmentName << Latitude << Longitude << TimeZoneNumber << Elevation;
print(outputFiles.mtr,
EnvironmentStampFormatStr,
"1",
"Warmup {" + cWarmupDay + "} " + EnvironmentName,
Latitude,
Longitude,
TimeZoneNumber,
Elevation);
PrintEnvrnStampWarmup = false;
}
PrintedWarmup = true;
Expand All @@ -580,16 +586,21 @@ namespace HVACManager {
if (PrintEnvrnStampWarmup) {
if (PrintEndDataDictionary && DoOutputReporting && !PrintedWarmup) {
ObjexxFCL::gio::write(OutputFileStandard, EndOfHeaderFormat);
ObjexxFCL::gio::write(OutputFileMeters, EndOfHeaderFormat);
print(outputFiles.mtr, "{}\n", EndOfHeaderString);
PrintEndDataDictionary = false;
}
if (DoOutputReporting && !PrintedWarmup) {
ObjexxFCL::gio::write(OutputFileStandard, EnvironmentStampFormat)
<< "1"
<< "Warmup {" + cWarmupDay + "} " + EnvironmentName << Latitude << Longitude << TimeZoneNumber << Elevation;
ObjexxFCL::gio::write(OutputFileMeters, EnvironmentStampFormat)
<< "1"
<< "Warmup {" + cWarmupDay + "} " + EnvironmentName << Latitude << Longitude << TimeZoneNumber << Elevation;
print(outputFiles.mtr,
EnvironmentStampFormatStr,
"1",
"Warmup {" + cWarmupDay + "} " + EnvironmentName,
Latitude,
Longitude,
TimeZoneNumber,
Elevation);
PrintEnvrnStampWarmup = false;
}
PrintedWarmup = true;
Expand Down
3 changes: 2 additions & 1 deletion src/EnergyPlus/HVACManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <EnergyPlus/EnergyPlus.hh>

namespace EnergyPlus {
class OutputFiles;

namespace HVACManager {

Expand All @@ -73,7 +74,7 @@ namespace HVACManager {
// Functions
void clear_state();

void ManageHVAC();
void ManageHVAC(OutputFiles &outputFiles);

void SimHVAC();

Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HVACSizingSimulationManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void ManageHVACSizingSimulation(OutputFiles &outputFiles, bool &ErrorsFound)

ManageExteriorEnergyUse();

ManageHeatBalance();
ManageHeatBalance(outputFiles);

BeginHourFlag = false;
BeginDayFlag = false;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatBalanceAirManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4218,7 +4218,7 @@ namespace HeatBalanceAirManager {
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
// na

ManageHVAC();
ManageHVAC(OutputFiles::getSingleton());

// Do Final Temperature Calculations for Heat Balance before next Time step
SumHmAW = 0.0;
Expand Down
29 changes: 18 additions & 11 deletions src/EnergyPlus/HeatBalanceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
#include <EnergyPlus/MatrixDataManager.hh>
#include <EnergyPlus/NodeInputManager.hh>
#include <EnergyPlus/OutAirNodeManager.hh>
#include <EnergyPlus/OutputFiles.hh>
#include <EnergyPlus/OutputProcessor.hh>
#include <EnergyPlus/OutputReportTabular.hh>
#include <EnergyPlus/PhaseChangeModeling/HysteresisModel.hh>
Expand Down Expand Up @@ -282,7 +283,7 @@ namespace HeatBalanceManager {
UniqueConstructNames.clear();
}

void ManageHeatBalance()
void ManageHeatBalance(OutputFiles &outputFiles)
{

// SUBROUTINE INFORMATION:
Expand Down Expand Up @@ -335,7 +336,7 @@ namespace HeatBalanceManager {
// Get the heat balance input at the beginning of the simulation only
if (ManageHeatBalanceGetInputFlag) {
GetHeatBalanceInput(); // Obtains heat balance related parameters from input file
HeatBalanceIntRadExchange::InitSolarViewFactors(OutputFiles::getSingleton());
HeatBalanceIntRadExchange::InitSolarViewFactors(outputFiles);

// Surface octree setup
// The surface octree holds live references to surfaces so it must be updated
Expand Down Expand Up @@ -368,13 +369,13 @@ namespace HeatBalanceManager {
// in the Surface Heat Balance Manager). In the future, this may be improved.
ManageSurfaceHeatBalance();
ManageEMS(emsCallFromEndZoneTimestepBeforeZoneReporting, anyRan); // EMS calling point
RecKeepHeatBalance(OutputFiles::getSingleton()); // Do any heat balance related record keeping
RecKeepHeatBalance(outputFiles); // Do any heat balance related record keeping

// This call has been moved to the FanSystemModule and does effect the output file
// You do get a shift in the Air Handling System Summary for the building electric loads
// IF ((.NOT.WarmupFlag).AND.(DayOfSim.GT.0)) CALL RCKEEP ! Do fan system accounting (to be moved later)

ReportHeatBalance(); // Manage heat balance reporting until the new reporting is in place
ReportHeatBalance(outputFiles); // Manage heat balance reporting until the new reporting is in place

ManageEMS(emsCallFromEndZoneTimestepAfterZoneReporting, anyRan); // EMS calling point

Expand All @@ -393,7 +394,7 @@ namespace HeatBalanceManager {
}

if (!WarmupFlag && EndDayFlag && DayOfSim == 1 && !DoingSizing) {
ReportWarmupConvergence(OutputFiles::getSingleton());
ReportWarmupConvergence(outputFiles);
}
}

Expand Down Expand Up @@ -5904,7 +5905,7 @@ namespace HeatBalanceManager {
// Beginning of Reporting subroutines for the HB Module
// *****************************************************************************

void ReportHeatBalance()
void ReportHeatBalance(OutputFiles &outputFiles)
{

// SUBROUTINE INFORMATION:
Expand Down Expand Up @@ -5940,8 +5941,9 @@ namespace HeatBalanceManager {

// SUBROUTINE PARAMETER DEFINITIONS:
static ObjexxFCL::gio::Fmt EndOfHeaderFormat("('End of Data Dictionary')"); // End of data dictionary marker
static constexpr auto EndOfHeaderString("End of Data Dictionary"); // End of data dictionary marker
static ObjexxFCL::gio::Fmt EnvironmentStampFormat("(a,',',a,3(',',f7.2),',',f7.2)"); // Format descriptor for environ stamp
static ObjexxFCL::gio::Fmt EndOfDataFormat("(\"End of Data\")"); // Signifies the end of the data block in the output file
static constexpr auto EnvironmentStampFormatStr("{},{},{:7.2F},{:7.2F},{:7.2F},{:7.2F}\n"); // Format descriptor for environ stamp

// INTERFACE BLOCK SPECIFICATIONS:
// na
Expand Down Expand Up @@ -5975,16 +5977,21 @@ namespace HeatBalanceManager {
if (PrintEnvrnStampWarmup) {
if (PrintEndDataDictionary && DoOutputReporting) {
ObjexxFCL::gio::write(OutputFileStandard, EndOfHeaderFormat);
ObjexxFCL::gio::write(OutputFileMeters, EndOfHeaderFormat);
print(outputFiles.mtr, "{}\n", EndOfHeaderString);
PrintEndDataDictionary = false;
}
if (DoOutputReporting) {
ObjexxFCL::gio::write(OutputFileStandard, EnvironmentStampFormat)
<< "1"
<< "Warmup {" + cWarmupDay + "} " + EnvironmentName << Latitude << Longitude << TimeZoneNumber << Elevation;
ObjexxFCL::gio::write(OutputFileMeters, EnvironmentStampFormat)
<< "1"
<< "Warmup {" + cWarmupDay + "} " + EnvironmentName << Latitude << Longitude << TimeZoneNumber << Elevation;
print(outputFiles.mtr,
EnvironmentStampFormatStr,
"1",
"Warmup {" + cWarmupDay + "} " + EnvironmentName,
Latitude,
Longitude,
TimeZoneNumber,
Elevation);
PrintEnvrnStampWarmup = false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HeatBalanceManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace HeatBalanceManager {
// Needed for unit tests, should not be normally called.
void clear_state();

void ManageHeatBalance();
void ManageHeatBalance(OutputFiles &outputFiles);

// Get Input Section of the Module
//******************************************************************************
Expand Down Expand Up @@ -218,7 +218,7 @@ namespace HeatBalanceManager {
// Beginning of Reporting subroutines for the HB Module
// *****************************************************************************

void ReportHeatBalance();
void ReportHeatBalance(OutputFiles &outputFiles);

// End of Reporting subroutines for the HB Module

Expand Down
Loading

0 comments on commit 2c629a9

Please sign in to comment.