Skip to content

Commit 9ba17dd

Browse files
authored
Merge pull request #109 from cse-sim/reportinfil
HPWHsim mix fix; iz_afCat checking
2 parents 9431a00 + c7f3361 commit 9ba17dd

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

src/CGCOMP.CPP

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,9 @@ RC IZXRAT::iz_CkfIZXFER() // input checks
876876
iz_exp = 0.f;
877877
}
878878

879+
if (!iz_CanHaveAFCat())
880+
ignore(IZXRAT_AFCAT, when);
881+
879882
// horizontal opening
880883
// stairangle defaults
881884
// L1 and L2 required else disallowed
@@ -1046,7 +1049,9 @@ x }
10461049
void IZXRAT::iz_SetupAfMtrs()
10471050
{
10481051
// Air flow category
1049-
if (!IsSet(IZXRAT_AFCAT))
1052+
if (!iz_CanHaveAFCat())
1053+
iz_afCat = -1;
1054+
else if (!IsSet(IZXRAT_AFCAT))
10501055
iz_afCat = iz_AfCatDefault(); // default category (may return -1)
10511056

10521057
// AFMTR ptrs: NULL if no meter specified -> no air flow accounting
@@ -1079,8 +1084,8 @@ void IZXRAT::iz_SetupAfMtrs()
10791084
AFCAT IZXRAT::iz_AfCatDefault() const
10801085
{
10811086
AFCAT afCat;
1082-
if (!iz_IsAirNet())
1083-
afCat = -1; // track only airnet flows
1087+
if (!iz_CanHaveAFCat())
1088+
afCat = -1; // not trackable
10841089
else if (iz_IsSysAir())
10851090
afCat = C_AFCAT_HVAC;
10861091
else if (iz_IsDuctLk())
@@ -1608,7 +1613,7 @@ RC AIRNET::an_Calc( // airnet flow balance
16081613
const int ANDBZMAX = 5;
16091614
double rVSave[ ANDBZMAX];
16101615
double jacSave[ ANDBZMAX*ANDBZMAX];
1611-
int bDbPrint = DbDo( dbdAIRNET);
1616+
bool bDbPrint = DbDo( dbdAIRNET);
16121617
#endif
16131618

16141619
TMRSTART( TMR_AIRNET);
@@ -1714,9 +1719,11 @@ RC AIRNET::an_Calc( // airnet flow balance
17141719
}
17151720
#if defined( DEBUGDUMP)
17161721
// save info for debug print (changed by gaussjb())
1717-
VCopy( rVSave, nzDb, rV);
1718-
for (zi=0; zi < nzDb; zi++)
1719-
VCopy( &jacSave[ zi*nzDb], nzDb, &an_jac[ zi*an_nz]);
1722+
if (bDbPrint)
1723+
{ VCopy(rVSave, nzDb, rV);
1724+
for (zi = 0; zi < nzDb; zi++)
1725+
VCopy(&jacSave[zi*nzDb], nzDb, &an_jac[zi*an_nz]);
1726+
}
17201727
#endif
17211728
// solve for pressure corrections
17221729
int gjRet = gaussjb( an_jac, an_nz, rV, 1);

src/CNRECS.DEF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2788,6 +2788,7 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent.
27882788
*declare "RC iz_EndSubhr();"
27892789
// CAUTION: the following depend on C_IZNVTYCH_xxx values
27902790
*declare "BOOL iz_IsAirNet() const { return iz_nvcntrl > C_IZNVTYCH_TWOWAY; }"
2791+
*declare "BOOL iz_CanHaveAFCat() const { return iz_IsAirNet(); }"
27912792
*declare "BOOL iz_IsExterior() const { return iz_nvcntrl == C_IZNVTYCH_ANEXT || iz_nvcntrl == C_IZNVTYCH_ANEXTFAN || iz_nvcntrl == C_IZNVTYCH_ANEXTFLOW; }"
27922793
*declare "BOOL iz_IsAirNetIZ() const { return iz_nvcntrl == C_IZNVTYCH_ANIZ || iz_nvcntrl == C_IZNVTYCH_ANIZFAN || iz_nvcntrl == C_IZNVTYCH_ANIZFLOW || iz_nvcntrl == C_IZNVTYCH_ANHORIZ; }"
27932794
*declare "BOOL iz_IsHERV() const { return iz_nvcntrl == C_IZNVTYCH_ANHERV; }"

vendor/HPWHsim

0 commit comments

Comments
 (0)