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

Wet coil epsilon-NTU model #2364

Merged
merged 77 commits into from
Apr 20, 2021
Merged

Wet coil epsilon-NTU model #2364

merged 77 commits into from
Apr 20, 2021

Conversation

AntoineGautier
Copy link
Contributor

@AntoineGautier AntoineGautier commented Feb 11, 2021

The feature branch was created based on what is described in #2001 (comment).

TODO before merging:

  • @kim1077 to include (manually) recent local modifications (posterior to 456406e) and UA nominal computation.
    • Included as Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTUWithRated. @AntoineGautier to refactor within WetCoilEffectivenessNTU.
  • Resolve warning
The initial conditions are not fully specified. Dymola has selected default initial conditions.
Assuming fixed start value for the continuous states: hexWetNTU.dryWetCalcs.fullywet.TWatOutHat(start = 283.15)

Copy link
Contributor Author

@AntoineGautier AntoineGautier left a comment

Choose a reason for hiding this comment

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

@kim1077 See my comments. The main one is the refactoring that I think is required to get rid of a lot of duplicated code from existing classes, which will make the model maintenance really cumbersome.

Copy link
Contributor Author

@AntoineGautier AntoineGautier left a comment

Choose a reason for hiding this comment

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

@kim1077 I refactored to conditionally include UA_nominal computation. Please see the couple comments I have on the newly added classes.

Comment on lines 1 to 2
old_StoreProtectedVariables = Advanced.StoreProtectedVariables;
Advanced.StoreProtectedVariables = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mwetter This was needed to plot the dry fraction hexWetNTU.dryWetCalcs.dryFra and illustrate that the validation case covers all the conditions from fully dry to fully wet (and originally to compare with the dry fraction computed by WetCoilCounterFlow but I see you removed that addition as it triggered an event).
Even if it is not used for validation any more, I think plotting hexWetNTU.dryWetCalcs.dryFra still makes sense to illustrate what the validation case covers.

Copy link
Member

Choose a reason for hiding this comment

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

@AntoineGautier : Please see #2417

@AntoineGautier
Copy link
Contributor Author

TODO before merging: investigate the issue in Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating where Dymola computes hexWetNTU_TX.Q1_flow equal to 0 due to hexWetNTU_TX.dryWetCalcs.fullyDry.eps being equal to 0.
This is due to the following code snippet in Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU.

  Modelica.Blocks.Sources.RealExpression cp_a2Exp(
    final y = if allowFlowReversal2
    then 
      fra_a2 * Medium2.specificHeatCapacityCp(state_a2_inflow)
      + fra_b2 * Medium2.specificHeatCapacityCp(state_b2_inflow)
    else 
      Medium2.specificHeatCapacityCp(state_a2_inflow))

Setting allowFlowReversal2=false solves the issue.
OCT computes hexWetNTU_TX.Q1_flow properly whatever the setting of allowFlowReversal2.

This is a workaround for a bug in Dymola, see #622 (comment)
@AntoineGautier
Copy link
Contributor Author

This is ready to merge when all tests pass.
(I tracked the workaround for Dymola's bug on the issue page, see #622 (comment)).

@mwetter mwetter merged commit 2cb81f3 into master Apr 20, 2021
@mwetter mwetter deleted the issue622_wetCoil branch April 20, 2021 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants