Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
3 changes: 3 additions & 0 deletions src/ANCREC.H
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ class record // base class for records
RC CDEC oer( const char* message, ... ) const;
RC CDEC oWarn( const char* message, ... ) const;
RC CDEC oInfo( const char* message, ... ) const;
RC CDEC orer(const char* message, ...) const;
RC CDEC orWarn(const char* message, ...) const;
RC CDEC orInfo(const char* message, ...) const;

RC orMsg( int erOp, const char* message, ...) const;

Expand Down
23 changes: 23 additions & 0 deletions src/CGCOMP.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,17 @@ RC IZXRAT::iz_SetupNonAirNet() // interzone transfer one-time initialization
return RCOK;
} // IZXRAT::iz_SetupNonAirNet
//-----------------------------------------------------------------------------
bool IZXRAT::iz_HasVentEffect() const // determine whether this IZXRAT can "vent"
// returns 1 iff iz vent mode (iz_ad[ 1]) differs from infil-only iz_ad[ 0]
{
bool bVentEffect =
iz_IsFixedFlow() ? iz_ad[1].ad_mdotP != iz_ad[0].ad_mdotP
: iz_ad[1].ad_Ae != iz_ad[0].ad_Ae;

return bVentEffect;

} // IZXRAT::iz_HasVentEffect
//-----------------------------------------------------------------------------
void ZNR::zn_AddIZXFERs() // add generated IZXFERs (for RSYS, )
{
if (!zn_IsConvRad())
Expand Down Expand Up @@ -1090,6 +1101,18 @@ RC IZXRAT::iz_BegHour() // set hour constants
// update coefficients
// else
// nothing needed

if (iz_HasVentEffect()) // if this IZXRAT can "vent"
{ ZNR* zp;
if (iz_zi1 > 0)
{ zp = ZrB.GetAt(iz_zi1);
zp->zn_anVentEffect++;
}
if (iz_zi2 > 0)
{ zp = ZrB.GetAt(iz_zi2);
zp->zn_anVentEffect++;
}
}
return RCOK;
} // IZXRAT::iz_BegHour
//-----------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion src/CNDTYPES.DEF
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,10 @@ PIPESEGP -- "class PIPESEG*" 4 none
ON "on" //
}

*choicn VENTAVAILVC { // all-zone vent availability
*choicn VENTAVAILVC { // vent availability
NONE "None"
WHOLEBLDG "WholeBuilding"
ZONAL "Zonal"
RSYSOAV "RSYSOAV"
}

Expand Down
31 changes: 17 additions & 14 deletions src/CNGUTS.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,11 @@ LOCAL RC FC NEAR doBegIvl() // simulation run start-of-interval processing: init
Sets SGRAT entries, valid for a month (has hourly storage slots).
Returns cos solar incidence angle for hour for month via arg. cgsolar.cpp. */

// zone "early" inits -- zone gains etc.
ZNR* zp;
RLUP(ZrB, zp)
EF( zp->zn_BegHour1())

// zero meters for hour
// must precede DHW
MTR* mtr;
Expand Down Expand Up @@ -1222,13 +1227,6 @@ LOCAL RC FC NEAR doHourGains() // set hour's zone & mass gains & daylighting stu
{
RC rc = RCOK;

// zero zone gains
ZNR* zp;
RLUP( ZrB, zp)
{ zp->qrIgTot = zp->qrIgTotO = zp->qrIgTotIz = zp->qrIgAir = 0.f;
zp->znSGain = zp->znLGain = zp->znLitDmd = zp->znLitEu = 0.;
}

// zero mass (radiant) gains
MSRAT* mse;
RLUP( MsR, mse)
Expand Down Expand Up @@ -1371,8 +1369,7 @@ RC GAIN::gn_DoHour() const // derive and apply hourly heat gains
if (gnPX < 0.)
{ // neg gain allowed but not expected
// flag in debug build for investigation
char* zname = zp ? strtprintf( "%s:", zp->name) : "";
printf( "\n%s%s gn < 0", zname, name);
orWarn( "gain < 0 (%0.1f)", gnPX);
}
#endif
// accumulate DL-reduced energy consumption by meter
Expand Down Expand Up @@ -1502,11 +1499,17 @@ LOCAL void FC NEAR doIvlAccum()

#if defined( _DEBUG)
// debug aid -- check latent balance
if (fabs( pZR->curr.S.qlBal) > .02f) // if unbal > 0.02 Btu
{ ZNR* zp = pZR->zr_GetZone();
if (zp->zn_IsConvRad())
printf( "\n'%s' latent unbal: %.2f (case=%d)\n", zp->name,
pZR->curr.S.qlBal, zp->zn_wCase);
if (fabs(pZR->curr.S.qlBal) > .02f)
{ float qlAbsSum = VAbsSum<float, double>(&pZR->curr.S.ZRw1, ZRnW);
if (qlAbsSum > 1.f)
{ float qlErrF = pZR->curr.S.qlBal / qlAbsSum;
if (fabs( qlErrF) > 0.0001f)
{ ZNR* zp = pZR->zr_GetZone();
if (zp->zn_IsConvRad())
zp->orWarn("latent unbal = %.2f Btu (%.5f, case=%d)",
pZR->curr.S.qlBal, qlErrF, zp->zn_wCase);
}
}
}
#endif

Expand Down
Loading