Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/src/records/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Specifies air handler(s) to be reported, for *rpType*=AH, AHSIZE, or AHLOAD.
units: "",
legal_range: "name of an *AIRHANDLER*, ALL, SUM",
default: "*none*",
required: "Required for *rpType*=AH, AHSIZE, or AHSIZE",
required: "Required for *rpType*=AH, AHSIZE, or AHLOAD",
variability: "constant") %>

**rpTu=*tuName***
Expand Down
6 changes: 5 additions & 1 deletion src/CNRECS.DEF
Original file line number Diff line number Diff line change
Expand Up @@ -4391,8 +4391,10 @@ RECORD DHWSYS "DHWSYS" *RAT // input / runtime DHW system
//=============================================================================
RECORD HPWHLINK "HPWHLink" *SUBSTRUCT // Ecotope's HPWH tank and heater
*prefix hw_
*excon
*exdes

*declare "RC Validate( int options=0);"
*declare "static WStr hw_GetHPWHVersion();"
*declare "static void hw_HPWHMessageCallback( const std::string message, void* contextPtr);"
*declare "void hw_HPWHReceiveMessage( const std::string message);"
Expand Down Expand Up @@ -5109,7 +5111,9 @@ RECORD DHWUSE "DHWUse" *RAT // input / runtime DHW single draw
//=============================================================================
RECORD DHWSOLARSYS "DHWSolarSys" *RAT // input / runtime DHW solar system
*prefix sw_

*exdes
*ovrcopy // overide Copy()
*declare "virtual DHWSOLARSYS& CopyFrom( const record *src, int copyName=1, int dupPtrs=0);"
*declare "virtual void ReceiveRuntimeMessage(const char* msg);"
*declare "RC sw_CkF();"
*declare "RC sw_Init();"
Expand Down
6 changes: 1 addition & 5 deletions src/cnguts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2815,10 +2815,6 @@ void TOPRAT::tp_DoDateDowStuff() // do date, day of week, and holiday stuff for

// note .xJDay set by callers: used to set .shoy early every subhour.

// allocate date string storage once. Small, error unlikely, abort ok. dmpak.cpp.
if (!dateStr)
dmal( DMPP( dateStr), max( size_t( TDDATELENMAX+1), strlen("ddd Jan xxx cooling design day xx")), ABT); // small, error unlikely, let program abort.

if (tp_autoSizing) // set at start setup, cncult2.cpp
{
// get autosizing Julian day, month, mday, wday. Preset by callers: (tp_dsDayI), .tp_dsDay, .auszMon, .jDay, (.xJDay).
Expand All @@ -2837,7 +2833,7 @@ void TOPRAT::tp_DoDateDowStuff() // do date, day of week, and holiday stuff for
tp_date.mday, monStr.CStr());
else
t = monStr;
dateStr = strtcat(t, " cooling design day"); // eg "Jan cooling design day"
dateStr = strtcat(t, " cooling design day", NULL); // eg "Jan cooling design day"
}
else // heating design day. Not month-specific.
{
Expand Down
17 changes: 0 additions & 17 deletions src/cvpak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ p break;

case DTFLOAT:
floatCase: // number-choice comes here (from default) if does not contain choice
#if 1
{
NANDAT nd = *(NANDAT *)data;
if (!ISNUM(nd)) // check for non-number, cnglob.h macro, debug aid 2-27-92.
Expand All @@ -329,22 +328,6 @@ p break;
}
val = *(float*)data; // conver float value to print to double
}
#else
if (!ISNUM( *(void **)data)) // check for non-number, cnglob.h macro, debug aid 2-27-92.
{
if (ISNCHOICE( *(void **)data)) // if number-choice choice (nan; unexpected here)
goto choiceCase;
if (ISNANDLE( *(void **)data)) // if unset or expr n (nan's) (insurance)
{
if (ISUNSET( *(void **)data))
strcpy( str, "<unset>"); // say <unset>
else
sprintf( str, "<expr %d>", (INT)EXN(*(void **)data)); // say <epxr n>
break;
}
}
val = *(float *)data; // conver float value to print to double
#endif
valValue: // double, [percent] join here
val = cvIntoEx( val, units); // convert value to ext units
#ifdef FMTPVMASK
Expand Down
15 changes: 15 additions & 0 deletions src/dhwcalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2719,6 +2719,10 @@ RC DHWUSE::wu_CalcHotF( // find mix fraction
///////////////////////////////////////////////////////////////////////////////
// HPWHLINK: interface to Ecotope heat pump water heater model
///////////////////////////////////////////////////////////////////////////////
HPWHLINK::HPWHLINK()
{
}
//-----------------------------------------------------------------------------
HPWHLINK::~HPWHLINK() // d'tor
{
hw_Cleanup();
Expand All @@ -2737,8 +2741,19 @@ void HPWHLINK::hw_Cleanup()
hw_pFCSV = nullptr;
}

hw_pNodePowerExtra_W.clear();

} // HPWHLINK::hw_Cleanup
//-----------------------------------------------------------------------------
#if 0
// complete if needed, 7-23
RC HPWHLINK::Validate(int /*options*/)
{
RC rc = RCOK;
return rc;
} // HPWHLINK::Validate
#endif
//-----------------------------------------------------------------------------
/*static*/ void HPWHLINK::hw_HPWHMessageCallback(
const std::string message,
void* contextPtr)
Expand Down
20 changes: 20 additions & 0 deletions src/dhwsolar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@
// DHWSOLARSYS: represents a solar water heating system
// 1 or more collectors + tank + pump
///////////////////////////////////////////////////////////////////////////////
/*virtual*/ DHWSOLARSYS::~DHWSOLARSYS()
{
} // DHWSOLARSYS::~DHWSOLARSYS
//---------------------------------------------------------------------------
/*virtual*/ void DHWSOLARSYS::Copy(const record* pSrc, int options/*=0*/)
{
sw_tank.hw_pNodePowerExtra_W.vector::~vector<double>();
record::Copy(pSrc, options);
// base class calls FixUp() and (if _DEBUG) Validate()
new(&sw_tank.hw_pNodePowerExtra_W) std::vector<double>(((const DHWSOLARSYS*)pSrc)->sw_tank.hw_pNodePowerExtra_W);
} // DHWSOLARSYS::Copy
//----------------------------------------------------------------------------
/*virtual*/ DHWSOLARSYS& DHWSOLARSYS::CopyFrom(const record* pSrc, int copyName/*= 1*/, int dupPtrs/*= 0*/)
{
sw_tank.hw_pNodePowerExtra_W.vector::~vector<double>();
record::CopyFrom(pSrc, copyName, dupPtrs);
new(&sw_tank.hw_pNodePowerExtra_W) std::vector<double>(((const DHWSOLARSYS*)pSrc)->sw_tank.hw_pNodePowerExtra_W);
return *this;
} // DHWSOLARSYS::CopyFrom
//----------------------------------------------------------------------------
/*virtual*/ void DHWSOLARSYS::ReceiveRuntimeMessage(const char* msg)
// callback from HPWH for reporting error messages
{
Expand Down
35 changes: 21 additions & 14 deletions test/3ZoneAirNet.cse → test/3ZAirNetAH.cse
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
// AirNet test case

// #define to enable zone cooling
#undef COOLING

// ----- TOP LEVEL -----
// WfName="U1.et1" //
WfName = "fresno.et1"
WfName = "CA_FRESNO-YOSEMITE-IAP_723890S_STYP20.epw"
BEGDay=Jan 1 //
ENDDay=Dec 31 //
ebTolHour=.001 ebTolDay=.001 ebTolMon=.001
Jan1DOW=Tue
wuDays=30 //
nSubSteps=30 //
nSubSteps=10 //
skyModel=anisotropic //

WindF=0.25 //site located exactly at weather station with
Expand Down Expand Up @@ -68,6 +65,21 @@ REPORT
reportCol colVal=@izxfer[ "H344"].ad[ 0].mdotP colHead="H344"
endReport

REPORT rpType=AH rpAH=MainAH rpFreq=hour rpDayBeg=Jun 30 rpDayEnd=Jul 1
REPORT rpType=AH rpAH=MainAH rpFreq=hour rpDayBeg=Jul 31 rpDayEnd=Aug 1

#if 0
// does not work: choices are unprobable.
REPORT
rpType=UDT rpFreq=HOUR rpDayBeg=Jul 31 rpDayEnd=Aug 1 rpCpl = -1
reportCol colHead = "Day" colVal = $dayOfYear
reportCol colHead="Hour" colVal=$hour
reportCol colHead="ahTsSp" colVal=@AIRHANDLER[1].ahtssp colWid=6 colDec = 2
ENDREPORT
#endif



//----- ZONE SECTION -----

ZONE Z1
Expand All @@ -80,14 +92,12 @@ REPORT
tuhcType = ELECTRIC
tuhcCaptRat = 100000

#if defined( COOLING)
TERMINAL Z1C
tuAh="MainAH"
tuSRLeak=0.0 //no duct leaks
tuVfMxC=10000
tuVfMn=0
tuTC=80.5 //cooling setpoint
#endif


ZONE Z2
Expand All @@ -99,14 +109,12 @@ REPORT
tuhcType = ELECTRIC
tuhcCaptRat = 1000000

#if defined( COOLING)
TERMINAL Z2C
tuAh="MainAH"
tuSRLeak=0.0 //no duct leaks
tuVfMxC=10000
tuVfMn=0
tuTC=70.5 //cooling setpoint
#endif


ZONE Z3
Expand All @@ -118,22 +126,22 @@ REPORT
tuhcType = ELECTRIC
tuhcCaptRat = 1000000

#if defined( COOLING)
TERMINAL Z3C
tuAh="MainAH"
tuSRLeak=0.0 //no duct leaks
tuVfMxC=10000
tuVfMn=0
tuTC=60.5 //cooling setpoint
#endif



#if defined( COOLING)
AIRHANDLER "MainAH"
ahSched=ON
ahTsSp = 50 //fixed supply temp, vol varies down to 0 flow 1/20 bw
ahTsSp = select( $month==6, 55, $month==7, 57, $month==8, RA, default 55)
ahfanCycles=No //1/20 bw
ahTsRaMn = 60 ahTsMx = 60
ahTsRaMx = 80 ahTsMn = 50

oaVfDsMn=0
oaMnCtrl=VOLUME //
oaMnFrac=0
Expand All @@ -158,7 +166,6 @@ REPORT
ahccType=ELECTRIC
ahccCapTRat=1000000 //very large
ahccCapSRat=1000000 //No latent load capacity BESTEST p.19
#endif



Expand Down
Loading