Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1st pass on using air distribution effectiveness in OA calculation #9678

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

rraustad
Copy link
Contributor

@rraustad rraustad commented Sep 28, 2022

Pull request overview

NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

ToDo:

  • Modify at least 1 example file to use air distribution effectiveness < 1
  • Docs to explain the use of cooling and heating AD effectiveness with respect to TUs and ATMixers
  • Report ATMixer primary flow sizing to eio?

@rraustad rraustad added the Defect Includes code to repair a defect in EnergyPlus label Sep 28, 2022
@@ -6355,7 +6360,7 @@ void AirTerminalMixerData::InitATMixer(EnergyPlusData &state, bool const FirstHV
airLoopOAFrac = state.dataAirLoop->AirLoopFlow(this->AirLoopNum).OAFrac;
if (airLoopOAFrac > 0.0) {
vDotOAReq = DataSizing::calcDesignSpecificationOutdoorAir(state, this->OARequirementsPtr, this->ZoneNum, UseOccSchFlag, true);
mDotFromOARequirement = vDotOAReq * state.dataEnvrn->StdRhoAir / airLoopOAFrac;
mDotFromOARequirement = vDotOAReq * state.dataEnvrn->StdRhoAir / (airLoopOAFrac * this->ADEff);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be done here is include ADEff inside calcDesignSpecificationOutdoorAir so other models will also get this update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the change needed to see differences in the simulation results. Without this change there are only diffs in the eio.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the best solution, but I don't think we want to be mixing extra functionality into DesignSpecification:OutdoorAir. The issue here is that some of the info is in DesignSpecification:OutdoorAir and some is in DesignSpecification:ZoneAirDistribution. I think these sorts of complexities should be handled at the parent level and these design spec object models should be kept simple, just the dry results please, and let the parents do what they need with the specification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ATMixer receives OA from the system. There is no adjustment at the ATMixer. So maybe the system (DOAS) is not providing the correct amount of OA. I'm still looking at that. It appears the TUs do need this adjustment and I will look at that after I figure out if the ATMixer really has an issue.

@rraustad
Copy link
Contributor Author

rraustad commented Sep 28, 2022

I get the change I expect to the eio but without the change to adjust OA during the simulation there are no diffs. I think this change needs to be generic and this branch is not there yet.

image

@rraustad
Copy link
Contributor Author

The first question is should the zone OA quantity be adjusted by zone air distribution effectiveness. I believe the answer is yes but no model is currently doing this. The issue description shows that MinOA is getting adjusted during sizing which makes sense. But without also adjusting the OA quantity during the simulation the zone ADEff is not accounted for.

std::min(state.dataSize->ZoneSizingInput(SizingInputNum).ZoneADEffCooling,
state.dataSize->ZoneSizingInput(SizingInputNum).ZoneADEffHeating);
state.dataSingleDuct->SysATMixer(ATMixerNum).DesignPrimaryAirVolRate /=
state.dataSingleDuct->SysATMixer(ATMixerNum).ADEff;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a one time init in GetATMixers that adjusts the ATMixer primary flow based on zone distribution effectiveness. This is all good except without also adjusting the zone OA calculated during the simulation this one time init only affects the size, not the operating flow rate.

@@ -323,6 +323,7 @@ namespace SingleDuct {
Real64 DesignPrimaryAirVolRate; // System sizing adjustments, filled from design OA spec using sizing mode flags.
DataZoneEquipment::PerPersonVentRateMode OAPerPersonMode; // mode for how per person rates are determined, DCV or design.
bool printWarning; // flag to print warnings only once
Real64 ADEff = 1.0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am questioning where this saved data should live. The DesignSpecification:ZoneAirDistribution object name can be entered in the Sizing:Zone object. This object name can also be entered in Controller:MechanicalVentilation. So somewhere this data needs to be saved. Also, there is an effectiveness for both cooling and heating, so using the min of these to determine OA seems wrong. If cooling eff=1 and heating eff=0.8 then OA during heating and cooling should be different.

@rraustad
Copy link
Contributor Author

Interesting, no diffs. What I see in every unit test is this. Same for example files?

    "  DesignSpecification:ZoneAirDistribution,",
    "    SZ DSOA EAST ZONE Design Spec Zone Air Dist,  !- Name",
    "    1,                       !- Zone Air Distribution Effectiveness in Cooling Mode {dimensionless}",
    "    1;                       !- Zone Air Distribution Effectiveness in Heating Mode {dimensionless}",

@rraustad
Copy link
Contributor Author

The first change (lines 6278 - 6282) adjusts the ATMixer DesignPrimaryAirVolRate to match what is reported in the eio. These design flow rates for the ATMixer are not reported to the eio so this was never noticed.

0.1298 + 0.059 + 0.1298 + 0.059 + 0.236 = 0.6136.

image

The second change (line 6363) adjusts the ATMixer's raw OA to include air distribution effectivenss and provides the correct flow rates as seen in this figure. This is all in the parent object so things look good so far. Now on to the TUs.

@rraustad rraustad marked this pull request as draft October 14, 2022 14:31
@nrel-bot-3
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

3 similar comments
@nrel-bot-3
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-3
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

nrel-bot commented Feb 4, 2023

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@Myoldmopar
Copy link
Member

@rraustad how are you feeling about this branch? It's draft, which is fine, I just want to attach a milestone to it if you intend on getting it moving forward sometime.

@nrel-bot
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

1 similar comment
@nrel-bot-2c
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 8 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 7 days since this pull request was last updated.

7 similar comments
@nrel-bot-2b
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2b
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2b
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 9 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

1 similar comment
@nrel-bot-2b
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2b
Copy link

@rraustad it has been 9 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 8 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

2 similar comments
@nrel-bot
Copy link

nrel-bot commented Dec 9, 2023

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

nrel-bot commented Jan 6, 2024

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@rraustad
Copy link
Contributor Author

rraustad commented Feb 2, 2024

@Myoldmopar @mjwitte I need some help with these steps to move this foward.

  1. Move CalcOAMassFlow from a member of DualDuct and SingleDuct to be inherited by each

  2. Actually use the cooling and heating air distribution effectiveness as an adjustment to OA quantity (instead of the min used now during design) in the call to where zone OA is calculated. That would either be calcDesignSpecificationOutdoorAir or CalcOAMassFlow. These examples seem correct for what each does but does not actually apply a heating and cooling eff during the simulation. These examples only adjust design data and what needs to happen is an adjustment during the simulation.

     // save Voz for predefined outdoor air summary report
     Real64 MinEz = std::min(finalZoneSizing.ZoneADEffCooling, finalZoneSizing.ZoneADEffHeating);
    
     if (finalZoneSizing.ZoneADEffCooling > 0.0 || finalZoneSizing.ZoneADEffHeating > 0.0) {
         finalZoneSizing.MinOA /= min(finalZoneSizing.ZoneADEffCooling, finalZoneSizing.ZoneADEffHeating);
         calcFinalZoneSizing.MinOA = finalZoneSizing.MinOA;
     }
    
  3. Figure out a way to apply either the cooling or heating effectiveness to the calculation of OA mass flow for TUs (i.e., how do I know if the TU is in cooling or heating mode?). Tsupply versus Tzone should dictate the buoyancy? except I don't know that until the end of the TU calcs of the reheat coil, if present. QZnReq? wait for next iteration to know if system or zone coils are active?

    DesignSpecification:ZoneAirDistribution,
      \min-fields 1
      \memo This object is used to describe zone air distribution in terms of air distribution
      \memo effectiveness and secondary recirculation fraction. It is referenced by Sizing:Zone
      \memo and Controller:MechanicalVentilation objects
       A1,  \field Name
        \required-field
        \type alpha
        \reference DesignSpecificationZoneAirDistributionNames
       N1,  \field Zone Air Distribution Effectiveness in Cooling Mode
        \type real
        \default 1.0
        \minimum> 0.0
        \units dimensionless
       N2,  \field Zone Air Distribution Effectiveness in Heating Mode
        \type real
        \default 1.0
        \minimum> 0.0
        \units dimensionless
       A2,  \field Zone Air Distribution Effectiveness Schedule Name
        \type object-list
        \object-list ScheduleNames
        \note optionally used to replace Zone Air Distribution Effectiveness in Cooling and
        \note Heating Mode
       N3,  \field Zone Secondary Recirculation Fraction
        \type real
        \default 0.0
        \minimum 0.0
        \units dimensionless
       N4;  \field Minimum Zone Ventilation Efficiency
        \type real
        \default 0.0
        \minimum 0.0
        \maximum 1.0
        \units dimensionless

@mjwitte
Copy link
Contributor

mjwitte commented Feb 6, 2024

Some thoughts:
0. Grabbing the ADEff* from the sizing struct is fine - if there is one, but will it be there is there's no HVAC Sizing active? Since "Design Specification Outdoor Air Object Name" in terminal units can be different from the one used in Sizing:Zone, would it be better to add a new field to the terminal unit for "Design Specification Zone Air Distribution Object Name".

  1. Would it make sense to have the various terminal units to inherit the air distribution unit, DataDefineEquip::ZoneAirEquip and put the calcOA function there? And that could make the effectiveness adjustment, and possibly make a duct leakage adjustment?
  2. nothing to add here
  3. I would use whatever the governing load is that the terminal unit is trying to control to, QZoneReq or equivalent.

@nrel-bot-2c
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

7 similar comments
@nrel-bot
Copy link

nrel-bot commented Apr 3, 2024

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

nrel-bot commented May 1, 2024

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-3
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

1 similar comment
@nrel-bot-2
Copy link

@rraustad @Myoldmopar it has been 28 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 7 days since this pull request was last updated.

3 similar comments
@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2c
Copy link

@rraustad it has been 7 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 8 days since this pull request was last updated.

@nrel-bot-2
Copy link

@rraustad it has been 7 days since this pull request was last updated.

1 similar comment
@nrel-bot-2
Copy link

@rraustad it has been 7 days since this pull request was last updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AirTerminal:SingleDuct:Mixer does not account for DesignSpecification:ZoneAirDistribution
9 participants