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
26 changes: 26 additions & 0 deletions doc/src/records/doas.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,32 @@ End use to which fan energy is recorded (in METER specified by oaSupFanMtr). Se
required: "No",
variability: "constant") %>

**oaTEx=*float***

Alternative supply fan source air dry bulb temperature. If given, oaTEx overrides the outdoor dry-bulb temperature read from the weather file or derived from design conditions.

Caution: oaTEx is not checked for reasonableness.

<%= member_table(
units: "^o^F",
legal_range: "",
default: "Outdoor dry-bulb",
required: "No",
variability: "subhourly") %>

**oaWEx=*float***

Alternative supply fan source air air humidity ratio. If given, oaWEx overrides the outdoor humidity ratio derived from weather file data or design conditions.

Caution: oaWEx is not checked against saturation -- there is no verification that the value provided is physically possible.

<%= member_table(
units: "",
legal_range: "$\\gt$ 0",
default: "Outdoor humidity ratio",
required: "No",
variability: "subhourly") %>

## DOAS Exhaust Fan Data Members

**oaExhFanVfDs=*float***
Expand Down
53 changes: 52 additions & 1 deletion doc/src/records/izxfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Optional name of interzone transfer; give after the word "IZXFER" if desired.

**izNVType=*choice***

Choice determining interzone ventilation
Choice specifying the type of ventilation or leakage model to be used.

<%= csv_table(<<END, :row_header => false)
NONE, No interzone ventilation
Expand All @@ -38,6 +38,8 @@ Choice determining interzone ventilation
END
%>

Note that optional inputs izTEx, izWEx, and izWindSpeed can override the outside conditions assumed for ivNVTypes that are connected to ambient (AIRNETEXT, AIRNETEXTFAN, AIRNETEXTFLOW, and AIRNETHERV).

<%= member_table(
units: "",
legal_range: "*choices above*",
Expand Down Expand Up @@ -154,6 +156,55 @@ Additional vent area (high vent or VentOn). If used in AIRNET, izAHi &gt; izALo
required: "No",
variability: "hourly") %>

**izTEx=*float***

Alternative exterior air dry bulb temperature for this vent. Allowed only with izNVTypes that use outdoor air (AIRNETEXT, AIRNETEXTFAN, AIRNETEXTFLOW, and AIRNETHERV). If given, izTEx overrides the outdoor dry-bulb temperature read from the weather file or derived from design conditions.

Caution: izTEx is not checked for reasonableness.

One use of izTEx is in representation of leaks in surfaces adjacent to zones not being simulated. "Pseudo-interior" surface leakage can be created as follows (where "Z1" is the name of the leak's zone and izALo and izHD are set to appropriate values) --

IZXFER RLF izNVTYPE=AirNetExt izZN1="Z1" izALo=.1 izHD=10 izTEx=@zone["Z1"].tzls izWEx=@zone["Z1"].wzls

This will allow Z1's pressure to be realistic without inducing thermal loads that would occur if the leak source had outdoor conditions.

<%= member_table(
units: "^o^F",
legal_range: "",
default: "Outdoor dry-bulb",
required: "No",
variability: "subhourly") %>

**izWEx=*float***

Alternative exterior air humidity ratio seen by this vent. Allowed only with izNVTypes that use outdoor air (AIRNETEXT, AIRNETEXTFAN, AIRNETEXTFLOW, and AIRNETHERV). If given, izWEx overrides the outdoor humidity ratio derived from weather file data or design conditions.

Caution: izWEx is not checked against saturation -- there is no verification that the value provided is physically possible.

See izTEx example just above.

<%= member_table(
units: "",
legal_range: "$\\gt$ 0",
default: "Outdoor humidity ratio",
required: "No",
variability: "subhourly") %>

**izWindSpeed=*float***

Alternative windspeed seen by this vent. Allowed only with izNVTypes that use outdoor air (AIRNETEXT, AIRNETEXTFAN, AIRNETEXTFLOW, and AIRNETHERV). If given, izWindSpeed overrides the windspeed read from the weather file or derived from design conditions.

No adjustments such as TOP windF or ZONE znWindFLkg are applied to izWindSpeed when it is used in derivation of wind-driven air flow.

Note that izCpr must be non-0 for izWindSpeed to have any effect.

<%= member_table(
units: "mph",
legal_range: "$\\ge$ 0",
default: "Zone adjusted windspeed",
required: "No",
variability: "subhourly") %>

**izL1=*float***

Length or width of AIRNETHORIZ opening.
Expand Down
2 changes: 1 addition & 1 deletion doc/src/records/zone.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Wind speed modifier factor. The weather file wind speed is multiplied by this f
<%= member_table(
units: "",
legal_range: "x $\\geq$ 0",
default: "derived from zn_eaveZ and infShld",
default: "derived from znEaveZ and infShld",
required: "No",
variability: "constant")
%>
Expand Down
17 changes: 16 additions & 1 deletion src/CNRECS.DEF
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,11 @@ RECORD DOAS "doas" *RAT
*i TI oa_loadMtri // LOADMTR idx for accumulation of coil output
*declare "LOADMTR* oa_pLoadMtr;"

*s TEMP oa_tEx // DOAS exterior air drybulb temp, F
// default = current ambient dry bulb (from weather file)
*s FRAC_GZ oa_wEx // DOAS exterior air humidity ratio, lb/lb
// default = current ambient humidity ratio (from weather file)

// Heat Exchanger
*r *nest HEATEXCHANGER oa_hx // heat exchanger substruct

Expand All @@ -2927,7 +2932,7 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent.
*excon // explicit constructor
*declare "void FixUp();" // virtual
*declare "RC Validate( int options=0);"
*declare "RC iz_CkfIZXFER();"
*declare "RC iz_Ckf( bool bRuntime);"
*declare "RC iz_ValidateAIRNETHelper() const;"
*declare "int iz_PathLenToAmbientHelper() const;"
*declare "void iz_ClearResults( int iV);"
Expand All @@ -2942,6 +2947,7 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent.
*declare "void iz_SetupPresDep();"
*declare "void iz_GetZn2Conditions();"
*declare "void iz_ClearZn2Conditions();"
*declare "bool iz_GetExteriorAirState( AIRSTATE& asExt) const;"
*declare "void iz_GetExteriorConditions( float windPresV);"
*declare "void iz_GetDOASConditions();"
*declare "RC iz_CalcHERV();"
Expand All @@ -2955,6 +2961,7 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent.
*declare "bool iz_IsExterior() const { return iz_nvcntrl == C_IZNVTYCH_ANEXT || iz_nvcntrl == C_IZNVTYCH_ANEXTFAN || iz_nvcntrl == C_IZNVTYCH_ANEXTFLOW; }"
*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 || iz_IsHERVIZ(); }"
*declare "bool iz_IsHERV() const { return iz_nvcntrl == C_IZNVTYCH_ANHERV; }"
*declare "bool iz_IsHERVExt() const { return iz_IsHERV() && iz_zi2 == 0; }"
*declare "bool iz_IsHERVIZ() const { return iz_IsHERV() && iz_zi2 != 0 && iz_zi1 != iz_zi2; }"
*declare "int iz_IsCZ( int iZn) const;"
*declare "bool iz_IsFan() const { return iz_nvcntrl == C_IZNVTYCH_ANIZFAN || iz_nvcntrl == C_IZNVTYCH_ANEXTFAN; }"
Expand Down Expand Up @@ -3026,11 +3033,19 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent.
*i FRAC_GZ iz_cd // orifice coefficient, dimless (user input, default 0.8)
*r FLOAT iz_exp // power law exponent, (user input, default 0.5)
*i FLOAT iz_cpr // wind pressure coefficient (ignored if not _ANEXT)


// fan volume flow (cfm, += into zone1; if <0, fan is exhaust)
*s AFLOW iz_vfMin // min vent flow rate, cfm (for fixed flow types)
// (*net* supply flow for _ANHERV)
*s AFLOW iz_vfMax // max vent flow rate, cfm (for fixed flow types)
*s TEMP iz_tEx // vent exterior air drybulb temp for ANEXT, ANEXTFAN, ANEXTFLOW, and ANEXTHERV, F
// default = current ambient dry bulb (from weather file)
*s FRAC_GZ iz_wEx // vent exterior air humidity ratio, lb/lb
// default = current ambient humidity ratio (from weather file)
*s FLOAT_GEZ iz_windSpeed // windspeed seen by this vent, mph
// default = zone-adjusted windspeed
*declare "bool iz_hasOverriddenExteriorConditions;"
*i FLOAT_GZ iz_linkedFlowMult // multiplier for flow to/from linked zone or DOAS or ...
// applied to flow seen by "other" zone or device (but not this zone)
// supports zone multiplier schemes
Expand Down
97 changes: 80 additions & 17 deletions src/cgcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ o
o} /* cgnvhnit */
#endif

/* *********************** INFILTRATION ************************** */
///////////////////////////////////////////////////////////////////////////////
// Infiltration
//-----------------------------------------------------------------------------
RC ZNR::zn_InfilSetup() // Initialize infiltration values for zone

Expand Down Expand Up @@ -251,13 +252,24 @@ static constexpr float fShield[5][2] =
float f = SC * alpha * pow(Z / 32.8f, gamma);
return f;
} // TOPRAT::tp_WindFactor
//-------------------------------------------------------------------------------
//-----------------------------------------------------------------------------
static float WindPresV( // wind velocity pressure
float windV, // wind velocity at eave height, mph
// (including height or shielding adjustments if any)
float rhoMoist)
// returns wind velocity pressure, lbf/ft2
{
float vx = windV * 5280.f / 3600.f; // adjusted wind vel, ft/sec
return float(.5 * rhoMoist * vx * vx / g0Std);

} // ::WindPresV
//-----------------------------------------------------------------------------
float TOPRAT::tp_WindPresV( // wind velocity pressure
float windV) const // wind velocity at eave height, mph
// returns wind velocity pressure, lbf / ft2
// (including height or shielding adjustments if any)
// returns wind velocity pressure, lbf/ft2
{
float vx = windV * 5280.f / 3600.f; // adjusted wind vel, ft/sec
return float( .5 * tp_rhoMoistOSh * vx * vx / g0Std);
return WindPresV(windV, tp_rhoMoistOSh);
} // TOPRAT::tp_WindPresV
//===============================================================================

Expand Down Expand Up @@ -838,7 +850,8 @@ RC IZXRAT::iz_CalcHERV() // set mbrs re HERV model
// some sources say dry AMF, not fully understood
// minor difference in any case, 5-16-2013
// TODO: condensation and defrost, 5-16-2013
AIRSTATE asIn( Top.tDbOSh, Top.wOSh);
AIRSTATE asIn;
iz_GetExteriorAirState(asIn);
iz_air2.as_HX( asIn, ad.ad_mdotP, // supply air (=ambient)
asX, ad.ad_mdotX, // exhaust air (=z1 or some other zone)
iz_SRE > 0.f ? iz_SRE : iz_ASEF,
Expand Down Expand Up @@ -1176,7 +1189,9 @@ RC DOAS::oa_BegSubhr()
// Calculate supply air conditions

// Inlet (OA) conditions
AIRFLOW inletAF(oa_supAF.af_amf, Top.tDbOSh, Top.wOSh);
AIRFLOW inletAF(oa_supAF.af_amf,
IsSet(DOAS_TEX) ? oa_tEx : Top.tDbOSh,
IsSet(DOAS_WEX) ? oa_wEx : Top.wOSh);

// Exhuast air conditions
double exhC = oa_exhAF.af_AmfCp(); // fan flow in heat cap units (Btuh/F)
Expand Down Expand Up @@ -1355,7 +1370,9 @@ IZXRAT::IZXRAT( basAnc *b, TI i, SI noZ/*=0*/) // c'tor
} // IZXRAT::Validate
//-----------------------------------------------------------------------------
#define ZFAN(m) (IZXRAT_FAN + FAN_##m) // re IZXFER fan check and setup
RC IZXRAT::iz_CkfIZXFER() // input checks
RC IZXRAT::iz_Ckf( // input checks
bool bRuntime) // false: input (from izStarCkf())
// true: runtime
// called from izStarCkf (at input) *and* from iz_Setup() just below
{
RC rc = RCOK;
Expand Down Expand Up @@ -1397,8 +1414,33 @@ RC IZXRAT::iz_CkfIZXFER() // input checks
iz_fan.fn_setup2( -1); // clear all fan mbrs
}

// exterior conditions override checks
// some are runtime-only: expressions are resolved + no dup messages
// consolidated flag to simplify runtime code
iz_hasOverriddenExteriorConditions = IsSet(IZXRAT_TEX) || IsSet(IZXRAT_WEX) || IsSet(IZXRAT_WINDSPEED);

if (!iz_IsExterior() && !iz_IsHERVExt())
rc |= disallowN(when, IZXRAT_TEX, IZXRAT_WEX, IZXRAT_WINDSPEED, 0);

if (bRuntime)
{
if (IsSet(IZXRAT_WINDSPEED))
{ // overridden windspeed does nothing if iz_cpr == 0
if (iz_cpr == 0.f)
oInfo("izWindSpeed has no effect because izCpr = 0");
}
else
{ // iz_windSpeed not set, so default is used
// May be inadvertent if other overrides are present
if (iz_hasOverriddenExteriorConditions && iz_cpr != 0.)
oInfo("izWindSpeed not given but izTEx and/or izWEx are."
"\n Default weather file wind speed will be used -- is that intended?"
"\n Add izCpr=0 to disable wind-driven flow.");
}
}

return rc;
} // IZXRAT::iz_CkfIZXFER
} // IZXRAT::iz_Ckf
//-----------------------------------------------------------------------------
int IZXRAT::iz_AIRNETVentType() const // categorize vent
// returns -1=not AIRNET 0=fixed flow 1=IZ pressure dependent
Expand Down Expand Up @@ -1467,8 +1509,7 @@ RC IZXRAT::iz_Setup( // set up run record

*this = *izie; // copy record, incl name, excl internal front overhead.

rc |= iz_CkfIZXFER(); // check run record
// insurance: not known to be needed
rc |= iz_Ckf( true); // check run record

// TODO re input
// z1 != z2
Expand Down Expand Up @@ -1960,19 +2001,21 @@ RC IZXRAT::iz_BegSubhr() // set subhr constants
#endif

if (iz_pAF)
iz_SetFromAF( iz_pAF);
iz_SetFromAF(iz_pAF);
else if (iz_IsHERV())
rc |= iz_CalcHERV();
else
{ if (iz_IsExterior())
{
if (iz_IsExterior())
// zone 2 is exterior
iz_GetExteriorConditions( zp1->zn_windPresV);
iz_GetExteriorConditions(zp1->zn_windPresV);
else if (iz_IsAirNetIZ())
// zone 2 is zone
iz_GetZn2Conditions();
else if (iz_IsDOAS())
// zone 2 is DOAS
// zone 2 is DOAS
iz_GetDOASConditions();

#if defined( _DEBUG)
else
errCrit( ABT, "Missing IZXRAT::iz_BegSubhr() code");
Expand Down Expand Up @@ -2018,13 +2061,33 @@ void IZXRAT::iz_ClearResults(
iz_ad[iV].ad_ClearResults();
} // IZXRAT::iz_ClearResults
//-----------------------------------------------------------------------------
bool IZXRAT::iz_GetExteriorAirState(
AIRSTATE& asExt) const
{
if (iz_hasOverriddenExteriorConditions)
asExt.as_Set(
IsSet(IZXRAT_TEX) ? iz_tEx : Top.tDbOSh,
IsSet(IZXRAT_WEX) ? iz_wEx : Top.wOSh);
else
asExt.as_Set( Top.tDbOSh, Top.wOSh);
return iz_hasOverriddenExteriorConditions;
} // IZXRAT::iz_GetExteriorAIRSTATE
//-----------------------------------------------------------------------------
void IZXRAT::iz_GetExteriorConditions(
float windPresV) // wind velocity pressure, lbf/ft2
// if relevant
// set source conditions to ambient
{
iz_air2.as_Set(Top.tDbOSh, Top.wOSh);
iz_rho2 = Top.tp_rhoMoistOSh;
if (iz_GetExteriorAirState( iz_air2))
{ iz_rho2 = iz_air2.as_RhoMoist();
if (IsSet(iz_windSpeed))
windPresV = WindPresV( iz_windSpeed, iz_rho2);
}
else
{ iz_rho2 = Top.tp_rhoMoistOSh;
// windPresV: use caller's
}

iz_pres2 = // exterior pressure constant for subhr
iz_cpr * windPresV // pressure coeff * velocity pressure
- iz_hz * iz_rho2; // plus stack
Expand Down
9 changes: 8 additions & 1 deletion src/cncult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,10 @@ CULT( "oaCoilCMtr", DAT, DOAS_COILCMTRI, 0, 0, VEOI, TYREF, &MtriB, 0

CULT( "oaLoadMtr", DAT, DOAS_LOADMTRI, 0, 0, VEOI, TYREF, &LdMtriB, N, N, N),

// exterior conditions override
CULT( "oaTEx", DAT, DOAS_TEX, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "oaWEx", DAT, DOAS_WEX, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),

// Heat Exchanger
CULT( "oaHXVfDs", DAT, HX(VFDS), 0, 0, VEOI, TYFL, 0, 0.f, N, N),
CULT( "oaHXf2", DAT, HX(F2), 0, 0, VEOI, TYFL, 0, 0.75f, N, N),
Expand Down Expand Up @@ -1443,7 +1447,7 @@ RC izStarCkf([[maybe_unused]] CULT* c, void *p, [[maybe_unused]] void* p2, [[may

// ONLY argument 'p' is used.
{
return ((IZXRAT* )p)->iz_CkfIZXFER();
return ((IZXRAT* )p)->iz_Ckf( false);
} // sfStarCkf
//---------------------------------------------------------------------------
#define ZFAN(m) (IZXRAT_FAN + FAN_##m)
Expand Down Expand Up @@ -1471,6 +1475,9 @@ CULT( "izCpr", DAT, IZXRAT_CPR, 0, 0, VEOI, TYFL, 0, 0.f,
CULT( "izExp", DAT, IZXRAT_EXP, 0, 0, VEOI, TYFL, 0, .5f, N, N),
CULT( "izVfMin", DAT, IZXRAT_VFMIN, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izVfMax", DAT, IZXRAT_VFMAX, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izTEx", DAT, IZXRAT_TEX, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izWEx", DAT, IZXRAT_WEX, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izWindSpeed", DAT, IZXRAT_WINDSPEED,0,0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izASEF", DAT, IZXRAT_ASEF, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izLEF", DAT, IZXRAT_LEF, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
CULT( "izSRE", DAT, IZXRAT_SRE, 0, 0, VSUBHRLY,TYFL, 0, 0.f, N, N),
Expand Down
6 changes: 0 additions & 6 deletions src/cncult4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ RC topCol( int isExport)
evfTx( colEvf,2) ); // text for evf bits,cuparse.cpp,2=noun eg "each hour"
}

#if 0
// translate cuparse data types to cvpak data types for use at runtime, in string-or-float value VALNDT structure.
if (!colip->colVal.vt_SetDT(colip->colVal.vt_dt))
colip->oer( (char *)MH_S0547, colip->colVal.vt_dt); // "Bad data type (colVal.dt) %d"
#endif

// default width if not given. Note: gap is defaulted to 1 per CULT table, and is limit-checked for nonNegative.
if (!colp->colWid)
colp->colWid = isExport ? EXDEFWID : RPDEFWID; /* tentative -- presumably type-dependent etc etc
Expand Down
Loading