From b544a6b2579a88bb6f0e99aa483cabb0c717c752 Mon Sep 17 00:00:00 2001 From: Chip Barnaby Date: Thu, 1 Jun 2023 12:41:19 -0400 Subject: [PATCH 1/4] iz_linkedFlowMult initial implementation --- src/CNRECS.DEF | 6 +++ src/cgcomp.cpp | 75 ++++++++++++++-------------------- src/cncult.cpp | 1 + test/ref/ASHPPKGROOM.REP | 87 ++++++++++++++++++++-------------------- 4 files changed, 82 insertions(+), 87 deletions(-) diff --git a/src/CNRECS.DEF b/src/CNRECS.DEF index 43580d570..deeaa1cb9 100644 --- a/src/CNRECS.DEF +++ b/src/CNRECS.DEF @@ -3033,6 +3033,12 @@ RECORD IZXRAT "izXfer" *RAT // interzone heat transfers: conductive and/or vent. *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) + *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 + // initially implemented for DOAS only, 6-1-2023 + + *s FRAC iz_ASEF // apparent sensible effectiveness (for _ANHERV) *s FRAC iz_LEF // latent effectiveness (for _ANHERV) *s FRAC iz_SRE // HVI sensible recovery efficiency (for _ANHERV) diff --git a/src/cgcomp.cpp b/src/cgcomp.cpp index e5fe01cc1..3891851b8 100644 --- a/src/cgcomp.cpp +++ b/src/cgcomp.cpp @@ -1016,7 +1016,7 @@ RC DOAS::oa_CkfDOAS() // input checks return rc; -} +} // DOAS::oa_CkfDOAS //----------------------------------------------------------------------------- RC DOAS::oa_Setup(DOAS* iRat) { @@ -1035,18 +1035,15 @@ RC DOAS::oa_Setup(DOAS* iRat) float exhFanVfDemand = 0.f; IZXRAT* izx; - RLUP( IzxR, izx) + RLUPC( IzxR, izx, izx->iz_doas == ss) { - if (izx->iz_IsDOAS() && izx->iz_doas == ss) + if (izx->iz_vfMin > 0.f) { - if (izx->iz_vfMin > 0.f) - { - supFanVfDemand += izx->iz_vfMin; - } - else - { - exhFanVfDemand -= izx->iz_vfMin; - } + supFanVfDemand += izx->iz_vfMin * izx->iz_linkedFlowMult; + } + else + { + exhFanVfDemand -= izx->iz_vfMin * izx->iz_linkedFlowMult; } } @@ -1071,14 +1068,10 @@ RC DOAS::oa_Setup(DOAS* iRat) // Adjust IZXFER flows IZXRAT* izx; - RLUP( IzxR, izx) - { - if (izx->iz_IsDOAS() && izx->iz_doas == ss) + RLUPC(IzxR, izx, izx->iz_doas == ss) + { if (izx->iz_vfMin > 0.f) { - if (izx->iz_vfMin > 0.f) - { - izx->iz_vfMin *= supFlowRatio; - } + izx->iz_vfMin *= supFlowRatio; } } } @@ -1099,14 +1092,10 @@ RC DOAS::oa_Setup(DOAS* iRat) // Adjust IZXFER flows IZXRAT* izx; - RLUP( IzxR, izx) - { - if (izx->iz_IsDOAS() && izx->iz_doas == ss) + RLUPC( IzxR, izx, izx->iz_doas == ss) + { if (izx->iz_vfMin < 0.f) { - if (izx->iz_vfMin < 0.f) - { - izx->iz_vfMin *= exhFlowRatio; - } + izx->iz_vfMin *= exhFlowRatio; } } } @@ -1159,29 +1148,26 @@ RC DOAS::oa_BegSubhr() { RC rc = RCOK; // Get total air flow rates and calculate mixed exhaust air state - oa_supAF.af_amf = 0.; - oa_exhAF.af_amf = 0.; + oa_supAF.af_Init(); + oa_exhAF.af_Init(); float supVf = 0.f; - float exhVf = 0.f; + // float exhVf = 0.f; not used IZXRAT* izx; - RLUP( IzxR, izx) + RLUPC(IzxR, izx, izx->iz_doas == ss) { - if (izx->iz_IsDOAS() && izx->iz_doas == ss) + if (izx->iz_vfMin > 0.f) { - if (izx->iz_vfMin > 0.f) - { - supVf += izx->iz_vfMin; - } - else - { - ZNR* zpx = ZrB.GetAt( izx->iz_zi1); - AIRSTATE zoneAir; - zpx->zn_GetAirStateLs( zoneAir); - float rhoX = zpx->zn_rho0ls; - exhVf -= izx->iz_vfMin; - AIRFLOW zoneExhAF(-izx->iz_vfMin * rhoX * 60.f, zoneAir); - oa_exhAF.af_Mix(zoneExhAF); - } + supVf += izx->iz_vfMin * izx->iz_linkedFlowMult; + } + else + { + ZNR* zpx = ZrB.GetAt( izx->iz_zi1); + AIRSTATE zoneAir; + zpx->zn_GetAirStateLs( zoneAir); + float rhoX = zpx->zn_rho0ls; + // exhVf -= izx->iz_vfMin * izx->iz_linkedFlowMult; + AIRFLOW zoneExhAF(-izx->iz_vfMin * izx->iz_linkedFlowMult * rhoX * 60.f, zoneAir); + oa_exhAF.af_Mix(zoneExhAF); } } oa_supAF.af_amf = supVf * Top.tp_rhoMoistOSh * 60.f; @@ -1625,6 +1611,7 @@ x } rc |= require(when, IZXRAT_DOAS); } break; + case C_IZNVTYCH_ANIZFLOW: case C_IZNVTYCH_ANEXTFLOW: rc |= disallowN("when izNVType is flow AIRNET", diff --git a/src/cncult.cpp b/src/cncult.cpp index 61210f96c..64a5fe7f4 100644 --- a/src/cncult.cpp +++ b/src/cncult.cpp @@ -1459,6 +1459,7 @@ CULT( "izDOAS", DAT, IZXRAT_DOAS, 0, 0, VEOI, TYREF, &OAiB, 0.f, CULT( "izHConst", DAT, IZXRAT_UA, 0, 0, VHRLY, TYFL, 0, 0.f, N, N), CULT( "izNVType", DAT, IZXRAT_NVCNTRL,0, 0, VEOI, TYCH, 0, C_IZNVTYCH_NONE, N, N), CULT( "izAFCat", DAT, IZXRAT_AFCATI, 0, 0, VEOI, TYCH, 0, 0, N, N), +CULT( "izLinkedFlowMult",DAT,IZXRAT_LINKEDFLOWMULT,0,0,VEOI, TYFL, 0, 1.f, N, N), CULT( "izALo", DAT, IZXRAT_A1, 0, 0, VHRLY, TYFL, 0, 0.f, N, N), CULT( "izAHi", DAT, IZXRAT_A2, 0, 0, VHRLY, TYFL, 0, 0.f, N, N), CULT( "izL1", DAT, IZXRAT_L1, 0, 0, VEOI, TYFL, 0, 0.f, N, N), diff --git a/test/ref/ASHPPKGROOM.REP b/test/ref/ASHPPKGROOM.REP index f1ea8a927..f6be8cd1b 100644 --- a/test/ref/ASHPPKGROOM.REP +++ b/test/ref/ASHPPKGROOM.REP @@ -529,16 +529,16 @@ Top repBotM 6 129 0 0 1 1 nz 0 0 0 repTestPfx 6 130 0 0 1 4 0 0 0 0 ck5aa5 6 285 4 0 0 1 nz 0 0 0 - material 5 0 16400 0 0 0 material 0 0 487 0 - construction 5 0 16400 0 0 0 construction 0 0 476 0 - foundation 5 0 16 0 0 0 foundation 0 0 464 0 - glazeType 5 0 16 0 0 0 glazeType 0 0 45d 0 - zone 5 0 16400 0 0 0 zone 0 0 338 0 - izXfer 5 0 16384 0 0 0 izXfer 0 0 2db 0 + material 5 0 16400 0 0 0 material 0 0 488 0 + construction 5 0 16400 0 0 0 construction 0 0 477 0 + foundation 5 0 16 0 0 0 foundation 0 0 465 0 + glazeType 5 0 16 0 0 0 glazeType 0 0 45e 0 + zone 5 0 16400 0 0 0 zone 0 0 339 0 + izXfer 5 0 16384 0 0 0 izXfer 0 0 2dc 0 afmeter 5 0 16 0 0 0 AFMETER 0 0 23d 0 loadmeter 5 0 16 0 0 0 LOADMETER 0 0 23a 0 rsys 5 0 16400 0 0 0 RSYS 0 0 29f 0 - doas 5 0 16 0 0 0 doas 0 0 30b 0 + doas 5 0 16 0 0 0 doas 0 0 30c 0 dhwdayuse 5 0 16 0 0 0 DHWDayUse 0 0 229 0 dhwmeter 5 0 16 0 0 0 DHWMETER 0 0 240 0 dhwsys 5 0 0 0 0 0 DHWSYS 0 0 1a7 0 @@ -547,15 +547,15 @@ Top battery 5 0 0 0 0 0 Battery 0 0 12b 0 shadex 5 0 0 0 0 0 SHADEX 0 0 11c 0 airHandler 5 0 16 0 0 0 airHandler 0 0 117 0 - meter 5 0 16400 0 0 0 meter 0 0 3a1 0 - gain 5 0 32 0 0 0 gain 0 0 39a 0 - reportCol 5 0 32 0 0 0 reportCol 0 0 38a 0 - exportCol 5 0 32 0 0 0 exportCol 0 0 380 0 - report 5 0 32 0 0 0 report 0 0 377 0 - export 5 0 32 0 0 0 export 0 0 361 0 - reportfile 5 0 0 0 0 0 reportFile 0 0 34c 0 - exportfile 5 0 0 0 0 0 exportFile 0 0 345 0 - importfile 5 0 16 0 0 0 importFile 0 0 33f 0 + meter 5 0 16400 0 0 0 meter 0 0 3a2 0 + gain 5 0 32 0 0 0 gain 0 0 39b 0 + reportCol 5 0 32 0 0 0 reportCol 0 0 38b 0 + exportCol 5 0 32 0 0 0 exportCol 0 0 381 0 + report 5 0 32 0 0 0 report 0 0 378 0 + export 5 0 32 0 0 0 export 0 0 362 0 + reportfile 5 0 0 0 0 0 reportFile 0 0 34d 0 + exportfile 5 0 0 0 0 0 exportFile 0 0 346 0 + importfile 5 0 16 0 0 0 importFile 0 0 340 0 heatPlant 5 0 16 0 0 0 heatPlant 0 0 7a 0 coolPlant 5 0 16 0 0 0 coolPlant 0 0 4b 0 towerPlant 5 0 16 0 0 0 towerPlant 0 0 3d 0 @@ -927,6 +927,7 @@ izXfer Parent: Top izHConst 6 5 0 0 739 2 0 0 0 0 izNVType 6 6 16384 0 1 16 nz 0 0 0 izAFCat 6 7 0 0 1 16 0 0 0 0 + izLinkedFlowMult 6 21 0 0 1 2 0 1 0 0 izALo 6 10 16384 0 739 2 0 0 0 0 izAHi 6 11 0 0 739 2 0 0 0 0 izL1 6 12 0 0 1 2 0 0 0 0 @@ -938,25 +939,25 @@ izXfer Parent: Top izExp 6 17 16384 0 1 2 0 0.5 0 0 izVfMin 6 19 0 0 1763 2 0 0 0 0 izVfMax 6 20 0 0 1763 2 0 0 0 0 - izASEF 6 21 0 0 1763 2 0 0 0 0 - izLEF 6 22 0 0 1763 2 0 0 0 0 - izSRE 6 23 0 0 1763 2 0 0 0 0 - izASRE 6 24 0 0 1763 2 0 0 0 0 - izRVFanHeatF 6 25 0 0 1763 2 0 0 0 0 - izVfExhRat 6 26 0 0 1763 2 0 1 0 0 - izEATR 6 27 0 0 1763 2 0 0 0 0 - izFanVfDs 6 29 0 0 1 2 0 0 0 0 - izFanPress 6 33 0 0 1 2 0 0.3 0 0 - izFanEff 6 34 0 0 1 2 0 0.08 0 0 - izFanShaftBhp 6 35 0 0 1 2 0 0 0 0 - izFanElecPwr 6 36 0 0 1 2 0 0 0 0 - izFanMtr 6 46 0 0 1 8192 meter 0 0 0 0 - izFanEndUse 6 47 0 0 1 16 nz 0 0 0 - izFanType 6 28 4 0 0 16 nz 0 0 0 - izFanVfMxF 6 32 4 0 0 2 0 1 0 0 - izFanMotPos 6 39 4 0 0 16 nz 0 0 0 - izFanCurvePy 6 40 128 0 1 2 0 0 nz 0 - izFanMotEff 6 38 4 0 0 2 0 1 0 0 + izASEF 6 22 0 0 1763 2 0 0 0 0 + izLEF 6 23 0 0 1763 2 0 0 0 0 + izSRE 6 24 0 0 1763 2 0 0 0 0 + izASRE 6 25 0 0 1763 2 0 0 0 0 + izRVFanHeatF 6 26 0 0 1763 2 0 0 0 0 + izVfExhRat 6 27 0 0 1763 2 0 1 0 0 + izEATR 6 28 0 0 1763 2 0 0 0 0 + izFanVfDs 6 30 0 0 1 2 0 0 0 0 + izFanPress 6 34 0 0 1 2 0 0.3 0 0 + izFanEff 6 35 0 0 1 2 0 0.08 0 0 + izFanShaftBhp 6 36 0 0 1 2 0 0 0 0 + izFanElecPwr 6 37 0 0 1 2 0 0 0 0 + izFanMtr 6 47 0 0 1 8192 meter 0 0 0 0 + izFanEndUse 6 48 0 0 1 16 nz 0 0 0 + izFanType 6 29 4 0 0 16 nz 0 0 0 + izFanVfMxF 6 33 4 0 0 2 0 1 0 0 + izFanMotPos 6 40 4 0 0 16 nz 0 0 0 + izFanCurvePy 6 41 128 0 1 2 0 0 nz 0 + izFanMotEff 6 39 4 0 0 2 0 1 0 0 endIzxfer 13 0 0 0 0 0 0 0 0 0 @@ -1988,7 +1989,7 @@ inverse Parent: Top ivX 6 6 8 0 1771 2 0 0 0 0 ivY 6 7 8 0 1771 2 0 0 0 0 endInverse 13 0 0 0 0 0 0 0 0 0 -! CSE 0.916.0+auxfeff.ad2e5053.2 for Win32 console +! CSE 0.917.0 for Win32 console @@ -3551,18 +3552,18 @@ Input for Run 001: -! CSE 0.916.0+auxfeff.ad2e5053.2 for Win32 console run(s) done: Wed 31-May-23 3:22:00 pm +! CSE 0.917.0 for Win32 console run(s) done: Thu 01-Jun-23 12:28:29 pm ! Executable: d:\cse\msvc\cse.exe -! 31-May-23 3:18 pm (VS 14.29 2749952 bytes) (HPWH 1.22.0) +! 01-Jun-23 12:16 pm (VS 14.29 2749952 bytes) (HPWH 1.22.0) ! Command line: -x! -t1 ashppkgroom ! Input file: D:\cse\test\ashppkgroom.cse ! Report file: D:\cse\test\ashppkgroom.rep ! Timing info -- -! Input: Time = 0.10 Calls = 2 T/C = 0.0485 -! AutoSizing: Time = 0.30 Calls = 1 T/C = 0.2960 -! Simulation: Time = 6.61 Calls = 1 T/C = 6.6090 -! Reports: Time = 0.00 Calls = 1 T/C = 0.0030 -! Total: Time = 7.01 Calls = 1 T/C = 7.0120 +! Input: Time = 0.10 Calls = 2 T/C = 0.0480 +! AutoSizing: Time = 0.30 Calls = 1 T/C = 0.2990 +! Simulation: Time = 6.64 Calls = 1 T/C = 6.6400 +! Reports: Time = 0.00 Calls = 1 T/C = 0.0020 +! Total: Time = 7.04 Calls = 1 T/C = 7.0420 From 10cf7e4608689b7403cfc71b87a36ca47a2a45f7 Mon Sep 17 00:00:00 2001 From: Chip Barnaby Date: Thu, 1 Jun 2023 13:01:58 -0400 Subject: [PATCH 2/4] Stub documentation for izLinkedFlowMult --- doc/src/records/izxfer.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/src/records/izxfer.md b/doc/src/records/izxfer.md index 01db822f1..42bec4892 100644 --- a/doc/src/records/izxfer.md +++ b/doc/src/records/izxfer.md @@ -103,6 +103,17 @@ Name of DOAS where air is supplied from (**izVfMin** > 0), or exhausting to (**i required: "when izNVType = AIRNETDOAS", variability: "constant") %> +**izLinkedFlowMult=*float*** + +Flow multiplier TODO + +<%= member_table( + units: "--", + legal_range: "*x* $\\gt$ 0", + default: "1", + required: "No", + variability: "constant") %> + Give izHConst for a conductive transfer between zones. Give izNVType other than NONE and the following variables for a convective (air) transfer between the zones or between a zone and outdoors. Both may be given if desired. Not known to work properly as of July 2011 **izHConst=*float*** From 65b86fe0d4783ea0acea152f9fdbdfe557f43817 Mon Sep 17 00:00:00 2001 From: Chip Barnaby Date: Mon, 12 Jun 2023 17:54:37 -0400 Subject: [PATCH 3/4] improve comments --- src/cgcomp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cgcomp.cpp b/src/cgcomp.cpp index 3891851b8..228f2ca3a 100644 --- a/src/cgcomp.cpp +++ b/src/cgcomp.cpp @@ -1150,8 +1150,9 @@ RC DOAS::oa_BegSubhr() // Get total air flow rates and calculate mixed exhaust air state oa_supAF.af_Init(); oa_exhAF.af_Init(); - float supVf = 0.f; - // float exhVf = 0.f; not used + float supVf = 0.f; // total supply flow provided by this DOAS, cfm + // float exhVf = 0.f; // total exhaust flow for this DOAS, cfm + // not used, activate if needed IZXRAT* izx; RLUPC(IzxR, izx, izx->iz_doas == ss) { @@ -1165,7 +1166,7 @@ RC DOAS::oa_BegSubhr() AIRSTATE zoneAir; zpx->zn_GetAirStateLs( zoneAir); float rhoX = zpx->zn_rho0ls; - // exhVf -= izx->iz_vfMin * izx->iz_linkedFlowMult; + // exhVf -= izx->iz_vfMin * izx->iz_linkedFlowMult; activate if needed AIRFLOW zoneExhAF(-izx->iz_vfMin * izx->iz_linkedFlowMult * rhoX * 60.f, zoneAir); oa_exhAF.af_Mix(zoneExhAF); } From f2bcc7cb5e739161e48300416a07fa422888bbc4 Mon Sep 17 00:00:00 2001 From: Chip Barnaby Date: Mon, 12 Jun 2023 19:01:30 -0400 Subject: [PATCH 4/4] Completed IZXFER izLinkedFlowMult documentation --- doc/src/records/izxfer.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/src/records/izxfer.md b/doc/src/records/izxfer.md index 42bec4892..df7961e6a 100644 --- a/doc/src/records/izxfer.md +++ b/doc/src/records/izxfer.md @@ -105,7 +105,11 @@ Name of DOAS where air is supplied from (**izVfMin** > 0), or exhausting to (**i **izLinkedFlowMult=*float*** -Flow multiplier TODO +Specifies a multiplier applied to air flow to/from any associated DOAS. This supports use of a single modeled zone to represent multiple actual zones while preserving the total DOAS air flow and energy consumption. + +For example, consider a DOAS-linked IZXFER with izVfMin = 100 and izLinkedFlowMult = 5. The zone specified by izZn1 receives 100 cfm while the DOAS specified by izDOAS is modeled as if the supply flow is 500 cfm. Thus the DOAS behavior (fan energy use etc.) approximates that of a DOAS serving 5 zones, but only one zone is simulated. + +Note izLinkedFlowMult has no effect on the air flow to or from the zone specified by izZn1. <%= member_table( units: "--", @@ -114,6 +118,7 @@ Flow multiplier TODO required: "No", variability: "constant") %> + Give izHConst for a conductive transfer between zones. Give izNVType other than NONE and the following variables for a convective (air) transfer between the zones or between a zone and outdoors. Both may be given if desired. Not known to work properly as of July 2011 **izHConst=*float***