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
1 change: 1 addition & 0 deletions src/CNRECS.DEF
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,7 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent.
*declare "void iz_SetupAfMtrs();"
*declare "RC iz_SetupNonAirNet();"
*declare "bool iz_HasVentEffect() const;"
*declare "bool iz_NotifyZonesIfVentEffect() const;"
*declare "bool iz_MightBeNatVent() const;"
*declare "RC iz_BegHour();"
*declare "RC iz_BegSubhr();"
Expand Down
36 changes: 25 additions & 11 deletions src/cgcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,7 @@ bool IZXRAT::iz_HasVentEffect() const // determine whether this IZXRAT can "vent
// can vary during run due to expressions
// returns true 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;
Expand All @@ -1832,6 +1833,27 @@ bool IZXRAT::iz_HasVentEffect() const // determine whether this IZXRAT can "vent

} // IZXRAT::iz_HasVentEffect
//-----------------------------------------------------------------------------
bool IZXRAT::iz_NotifyZonesIfVentEffect() const // tell zones about possible vent impact
// returns true iff this IZXRAT has controllable vent area or flow
{
bool bEffect = iz_IsAirNet() && iz_HasVentEffect(); // true iff this IZXRAT can "vent"
if (bEffect)
{
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 bEffect;
} // IZXRAT::iz_NotifyZonesIfVentEffect
//-----------------------------------------------------------------------------
void ZNR::zn_AddIZXFERs() // add generated IZXFERs (for RSYS, )
{

Expand Down Expand Up @@ -1911,17 +1933,6 @@ RC IZXRAT::iz_BegHour() // set hour constants
// 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 Expand Up @@ -2009,6 +2020,9 @@ RC IZXRAT::iz_BegSubhr() // set subhr constants
}
}

// increment zn
iz_NotifyZonesIfVentEffect();

return rc;
} // IZXRAT::iz_BegSubhr
//------------------------------------------------------------------------------
Expand Down
8 changes: 5 additions & 3 deletions src/cnloads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ RC ZNR::zn_BegHour1() // "early" hourly initializations
{
qrIgTot = qrIgTotO = qrIgTotIz = qrIgAir = 0.f;
znSGain = znLGain = znLitDmd = znLitEu = 0.;
zn_anVentEffect = 0; // # of IZXRATs that *could* impact this
// zone when operated in vent mode.
// see IZXRAT::iz_HasVentEffect()

if (Top.isBegRun)
{ // prior hour setpoints
Expand Down Expand Up @@ -399,6 +396,11 @@ RC ZNR::zn_BegSubhr1() // zone start of subhour, part 1
// OTOH, this is foolproof and simple, 2-16
zn_qDHWLoss = zn_qDHWLossAir = zn_qDHWLossRad = zn_qHPWH = zn_hpwhAirX = 0.;

// vent utility
zn_anVentEffect = 0; // # of IZXRATs that *could* impact this
// zone when operated in vent mode.
// see IZXRAT::iz_HasVentEffect()

return RCOK;
} // ZNR::zn_BegSubhr1
//-----------------------------------------------------------------------------
Expand Down
156 changes: 78 additions & 78 deletions test/ref-win32-msvc/ASHP_DFNG.REP

Large diffs are not rendered by default.

148 changes: 74 additions & 74 deletions test/ref-win32-msvc/DHWDU.rep

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions test/ref-win32-msvc/DHW_AQUATHERMAIRE.REP
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ DHWSYS (kBtu)

! Log for Run 001:

! CSE 0.921.0+wudays-check.d4ed889a.60.dirty for Win32 console
! CSE 0.921.0+fix-vent-effect.ed07abee.151.dirty for Win32 console



Expand Down Expand Up @@ -3685,7 +3685,7 @@ Feb 2083.2 0 0 0 484.00 0 0 0 99.903 36.983 0
Mar 1973.7 0 0 0 412.66 0 0 0 14.707 40.891 0 0 0 384.03 776.52 46.787 193.66 37.214 0 67.221 0 0 0 0 0
Apr 1816.4 0 0 0 406.21 0 0 0 20.467 39.625 0 0 0 339.01 685.92 45.278 187.67 32.871 0 59.377 0 0 0 0 0
May 1735.4 0 0 0 353.99 0 0 57.088 0 40.946 0 0 0 316.41 640.19 46.787 193.92 30.680 0 55.419 0 0 0 0 0
Jun 1694.6 70.875 0 0 278.37 0 0 111.78 0 39.625 0 0 0 291.62 590.04 45.278 187.67 28.277 0 51.077 0 0 0 0 0
Jun 1694.6 70.876 0 0 278.37 0 0 111.78 0 39.625 0 0 0 291.62 590.04 45.278 187.67 28.277 0 51.077 0 0 0 0 0
Jul 1883.7 222.50 0 0 229.59 0 0 132.05 0 40.946 0 0 0 308.88 624.95 46.787 193.92 29.950 0 54.099 0 0 0 0 0
Aug 1892.1 154.58 0 0 236.75 0 0 126.78 0 40.946 0 0 0 331.48 670.67 46.787 193.92 32.141 0 58.058 0 0 0 0 0
Sep 1806.3 0 0 0 264.89 0 0 91.613 0 39.625 0 0 0 357.24 722.79 45.278 187.67 34.639 0 62.570 0 0 0 0 0
Expand Down Expand Up @@ -3735,13 +3735,13 @@ DHWSYS (kBtu)
Nov 743.632 0 0 0 0 0 0 986.929 -247.49 0 1.204 -0.0000 0 0 0 0 0 0 0 2.990 1.872
Dec 803.454 0 0 0 0 0 0 1068.00 -272.28 0 3.184 -0.0000 0 0 0 0 0 0.00534 0 4.545 1.723

Yr 8869.15 0 0 0 0 0 0 11662.8 -2831.1 0 .000048 -0.0000 0 0 0 0 0 0.850 0 36.631 2.067
Yr 8869.15 0 0 0 0 0 0 11662.8 -2831.1 0 .000039 -0.0000 0 0 0 0 0 0.850 0 36.631 2.067



! Log for Run 002:

! CSE 0.921.0+wudays-check.d4ed889a.60.dirty for Win32 console
! CSE 0.921.0+fix-vent-effect.ed07abee.151.dirty for Win32 console



Expand All @@ -3760,18 +3760,18 @@ Input for Run 002:



! CSE 0.921.0+wudays-check.d4ed889a.60.dirty for Win32 console run(s) done: Tue 27-Feb-24 12:48:01 pm
! CSE 0.921.0+fix-vent-effect.ed07abee.151.dirty for Win32 console run(s) done: Fri 26-Apr-24 3:22:09 pm

! Executable: d:\cse\msvc\cse.exe
! 26-Feb-24 5:13 pm (VS 14.29 2873344 bytes) (HPWH 1.23.0+HEAD.4609465.28)
! Executable: d:\cse\builds\cse.exe
! 26-Apr-24 3:11 pm (VS 14.29 2910208 bytes) (HPWH 1.23.0+HEAD.2c3b199.129)
! Command line: -x! -t1 dhw_aquathermaire
! Input file: D:\cse\test\dhw_aquathermaire.cse
! Report file: D:\CSE\TEST\DHW_AQUATHERMAIRE.REP

! Timing info --

! Input: Time = 0.15 Calls = 2 T/C = 0.0740
! Input: Time = 0.14 Calls = 2 T/C = 0.0720
! AutoSizing: Time = 0.00 Calls = 0 T/C = 0.0000
! Simulation: Time = 8.61 Calls = 2 T/C = 4.3070
! Simulation: Time = 8.09 Calls = 2 T/C = 4.0470
! Reports: Time = 0.00 Calls = 2 T/C = 0.0015
! Total: Time = 8.77 Calls = 1 T/C = 8.7700
! Total: Time = 8.25 Calls = 1 T/C = 8.2450
Loading