Skip to content

Commit

Permalink
Merge branch 'develop' into global_dataTimings
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchute committed Nov 5, 2020
2 parents 9a79fe0 + 649ab48 commit 40518b1
Show file tree
Hide file tree
Showing 8 changed files with 998 additions and 701 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4241,7 +4241,7 @@ \subsubsection{Inputs}
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws return air. This node name must also be specified as a zone return air node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. It may also be included in \hyperref[nodelist]{NodeList} object that is specified as a zone return air node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. (Ref. Group - Zone Equipment \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} and Group - Node-Branch Management \hyperref[nodelist]{NodeList}).
\paragraph{Field: Outdoor Air Node Name}
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws outdoor air. This node name must also be specified in an \hyperref[outdoorairnode]{OutdoorAir:Node} or \hyperref[outdoorairnodelist]{OutdoorAir:NodeList} object. If this field is blank, a node name will be created internally. (Ref. Group - Node-Branch Management \hyperref[outdoorairnode]{OutdoorAir:Node} and \hyperref[outdoorairnodelist]{OutdoorAir:NodeList}).
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws outdoor air. This node name must also be specified in an \hyperref[outdoorairnode]{OutdoorAir:Node} or \hyperref[outdoorairnodelist]{OutdoorAir:NodeList} object. (Ref. Group - Node-Branch Management \hyperref[outdoorairnode]{OutdoorAir:Node} and \hyperref[outdoorairnodelist]{OutdoorAir:NodeList}).
\paragraph{Field: Supply Air Node Name}
This alpha input field specifies the name of the HVAC system node to which the hybrid unit sends supply air. This node name must also be specified as zone inlet node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. It may also be included in \hyperref[nodelist]{NodeList} object that is specified as a zone inlet node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. (Ref. Group - Zone Equipment \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} and Group - Node-Branch Management \hyperref[nodelist]{NodeList}).
Expand Down
7 changes: 6 additions & 1 deletion src/EnergyPlus/FileSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,14 @@ namespace FileSystem {
}

std::string pathTail;
if (parentPath == ".")
std::string currentDir = ".";
std::string currentDirWithSep = currentDir + DataStringGlobals::pathChar;
if ((parentPath == currentDir || parentPath == currentDirWithSep) && path.find(currentDirWithSep) == std::string::npos)
// If parent path is the current directory and the original path does not already contain
// the current directory in the string, then leave the path tail as-is.
pathTail = path;
else
// otherwise strip off any preceding content from the path tail
pathTail = path.substr(parentPath.size(), path.size() - parentPath.size());

char *absolutePathTemp = realpath(parentPath.c_str(), NULL);
Expand Down
27 changes: 9 additions & 18 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ namespace HVACVariableRefrigerantFlow {
Real64 LoopDXCoolCoilRTF(0.0); // holds value of DX cooling coil RTF
Real64 LoopDXHeatCoilRTF(0.0); // holds value of DX heating coil RTF
Real64 CondenserWaterMassFlowRate(0.0); // VRF water-cooled condenser mass flow rate (kg/s)
Real64 CurrentEndTimeLast; // end time of last time step
Array1D_bool HeatingLoad; // defines a heating load on VRFTerminalUnits
Array1D_bool CoolingLoad; // defines a cooling load on VRFTerminalUnits
Array1D_bool LastModeHeating; // defines last mode was heating mode
Expand Down Expand Up @@ -515,9 +516,7 @@ namespace HVACVariableRefrigerantFlow {
Real64 HREIRFTConst; // stead-state EIR fraction
Real64 HRInitialEIRFrac; // Fractional cooling degradation at the start of heat recovery from cooling mode
Real64 HREIRTC; // Time constant used to recover from initial degradation in cooling heat recovery
static Real64 CurrentEndTime; // end time of current time step
static Real64 CurrentEndTimeLast; // end time of last time step
static Real64 TimeStepSysLast; // system time step on last time step
Real64 CurrentEndTime; // end time of current time step
Real64 SUMultiplier; // multiplier for simulating mode changes
Real64 CondPower; // condenser power [W]
Real64 CondCapacity; // condenser heat rejection [W]
Expand Down Expand Up @@ -1119,7 +1118,7 @@ namespace HVACVariableRefrigerantFlow {
VRF(VRFCond).HRTimer = 0.0;
}

// calculate end time of current time step to determine if max capacity reset is required
// Calculate the capacity modification factor (SUMultiplier) for the HR mode transition period
CurrentEndTime = double((state.dataGlobal->DayOfSim - 1) * 24) + CurrentTime - TimeStepZone + DataHVACGlobals::SysTimeElapsed;

if (VRF(VRFCond).ModeChange || VRF(VRFCond).HRModeChange) {
Expand All @@ -1146,7 +1145,6 @@ namespace HVACVariableRefrigerantFlow {
}
VRF(VRFCond).SUMultiplier = SUMultiplier;

TimeStepSysLast = DataHVACGlobals::TimeStepSys;
CurrentEndTimeLast = CurrentEndTime;

if (VRF(VRFCond).HeatRecoveryUsed && VRF(VRFCond).HRCoolingActive) {
Expand Down Expand Up @@ -5062,8 +5060,7 @@ namespace HVACVariableRefrigerantFlow {
}
}

void
InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool const FirstHVACIteration, Real64 &OnOffAirFlowRatio, Real64 &QZnReq)
void InitVRF(EnergyPlusData &state, int const VRFTUNum, int const ZoneNum, bool const FirstHVACIteration, Real64 &OnOffAirFlowRatio, Real64 &QZnReq)
{

// SUBROUTINE INFORMATION:
Expand Down Expand Up @@ -5111,9 +5108,8 @@ namespace HVACVariableRefrigerantFlow {
int TUListIndex; // pointer to TU list for this VRF system
int IndexToTUInTUList; // index to TU in TerminalUnilList
Real64 RhoAir; // air density at InNode
static Real64 CurrentEndTime; // end time of current time step
static Real64 CurrentEndTimeLast; // end time of last time step
static Real64 TimeStepSysLast; // system time step on last time step
Real64 CurrentEndTime; // end time of current time step
Real64 TimeStepSysLast(0.0); // system time step on last time step
Real64 TempOutput; // Sensible output of TU
Real64 LoadToCoolingSP; // thermostat load to cooling setpoint (W)
Real64 LoadToHeatingSP; // thermostat load to heating setpoint (W)
Expand Down Expand Up @@ -6236,7 +6232,7 @@ namespace HVACVariableRefrigerantFlow {
} // IF(MyVRFFlag(VRFTUNum))THEN

// calculate end time of current time step to determine if max capacity reset is required
CurrentEndTime = CurrentTime + DataHVACGlobals::SysTimeElapsed;
CurrentEndTime = double((state.dataGlobal->DayOfSim - 1) * 24) + CurrentTime - TimeStepZone + DataHVACGlobals::SysTimeElapsed;

// Initialize the maximum allowed terminal unit capacity. Total terminal unit capacity must not
// exceed the available condenser capacity. This variable is used to limit the terminal units
Expand Down Expand Up @@ -10212,9 +10208,7 @@ namespace HVACVariableRefrigerantFlow {
Real64 HRCapTC; // Time constant used to recover from initial degradation in cooling heat recovery
Real64 HRInitialEIRFrac; // Fractional cooling degradation at the start of heat recovery from cooling mode
Real64 HREIRTC; // Time constant used to recover from initial degradation in cooling heat recovery
static Real64 CurrentEndTime; // end time of current time step
static Real64 CurrentEndTimeLast; // end time of last time step
static Real64 TimeStepSysLast; // system time step on last time step
Real64 CurrentEndTime; // end time of current time step
Real64 SUMultiplier; // multiplier for simulating mode changes
Real64 CondPower; // condenser power [W]
Real64 CondCapacity; // condenser heat rejection [W]
Expand Down Expand Up @@ -11277,7 +11271,6 @@ namespace HVACVariableRefrigerantFlow {

// Calculate the capacity modification factor (SUMultiplier) for the HR mode transition period
{
// calculate end time of current time step to determine if max capacity reset is required
CurrentEndTime = double((state.dataGlobal->DayOfSim - 1) * 24) + CurrentTime - TimeStepZone + DataHVACGlobals::SysTimeElapsed;

if (this->ModeChange || this->HRModeChange) {
Expand All @@ -11304,7 +11297,6 @@ namespace HVACVariableRefrigerantFlow {
}
this->SUMultiplier = SUMultiplier;

TimeStepSysLast = DataHVACGlobals::TimeStepSys;
CurrentEndTimeLast = CurrentEndTime;
}

Expand Down Expand Up @@ -14550,12 +14542,11 @@ namespace HVACVariableRefrigerantFlow {
LoopDXCoolCoilRTF = 0.0;
LoopDXHeatCoilRTF = 0.0;
CondenserWaterMassFlowRate = 0.0;

CurrentEndTimeLast = 0.0;
GetVRFInputFlag = true;
MyOneTimeFlag = true;
MyOneTimeSizeFlag = true;
ZoneEquipmentListNotChecked = true;

VRF.deallocate();
VrfUniqueNames.clear();
VRFTU.deallocate();
Expand Down
Loading

5 comments on commit 40518b1

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

global_dataTimings (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3028 of 3029 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 736
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

global_dataTimings (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1553 of 1553 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

global_dataTimings (mitchute) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (722 of 722 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

global_dataTimings (mitchute) - x86_64-MacOS-10.15-clang-11.0.0: OK (2989 of 2989 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

global_dataTimings (mitchute) - Win64-Windows-10-VisualStudio-16: OK (2245 of 2245 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.