Skip to content

Feature Specification: Wet Coil Model

Michael O'Keefe edited this page Feb 1, 2017 · 4 revisions

Feature Specification: Wet Coil Model

Author Big Ladder Software LLC
Revision 1.0 (2017-01-18; 16:20)
Author Michael Wetter (reviewed)
Revision 1.1 (2017-01-19; 11:00)
Author Big Ladder Software
Revision 1.2 (2017-01-20; 11:40)

Table of Contents

1. Summary

This feature specification describes the proposed implementation and design of a new coil heat exchanger model capable of simulating moisture condensation while also performing faster than the existing Buildings.Fluid.HeatExchangers.WetCoilCounterFlow model. The model will be based on an effectiveness-NTU relation following the derivation in Elmahdy and Mitalas 1977 and, specifically, following a similar model based on the same technical paper offered within EnergyPlus.

2. Rationale

Effectiveness-NTU relations are performant while also allowing for handling of moisture. Furthermore, so long as the effectiveness-NTU relationships exist, it is fairly easy to support multiple coil configurations such as those listed in Buildings.Fluid.Types.HeatExchangerConfiguration. An effectiveness-NTU model that handles moisture condensation is currently successfully used by EnergyPlus as a cooling coil. The code that implements the EnergyPlus model can be found here and here. The model is said to provide "good prediction of the air and water outlet conditions without requiring ... detailed geometric input" [EnergyPlus Engineering Reference 8.6].

3. Overview of Proposed Model

This overview is largely based on experience from the EnergyPlus implementation of the proposed model and review of the existing literature, especially Elmahdy and Mitalas 1977, which is referenced by the EnergyPlus implementation.

The model supports two configurations: cross-flow and counter-flow. The model calculates the UA values required for a dry, wet, and partially wet/partially dry coil. Specifically, the EnergyPlus implementation can operate in one of two modes:

  • a "simple analysis" mode where the coil is seen as either entirely wet with condensation or entirely dry
  • a "detailed analysis" mode where the coil is simulated as partially wet and partially dry (requiring iteration to determine where the transition occurs)

Of particular note: the simple analysis mode will switch between "all-wet" and "all-dry" only, causing a possible "sudden jump" in the predicted heat transfer of the coil. Because of this, we cannot use this model within the Modelica Buildings Library as all models should be once continuously differentiable for efficiency reasons (see this link for more details). The detailed analysis mode should allow for a smoother transition between "all-wet" and "all-dry" characteristics that is once continuously differentiable.

Note that the EnergyPlus documentation mentions that the "detailed analysis" mode is "significantly slower than the simple model" but we believe the "detailed analysis" approach will still be faster than the Buildings.Fluid.HeatExchangers.WetCoilCounterFlow we are trying to replace.

We assume that fluid one is a liquid (nominally, water) and fluid two (nominally, air) is a gas containing water although we won't make any further assumptions beyond that to preserve the generality of the model and fluid media the end-user desires to simulate. EnergyPlus and the literature term the heat transfer from fluid 1 to the coil as internal (inside the coil, if you will) and, similarly, the heat transfer from fluid 2 to the coil is termed external. Fin resistance is currently treated as part of the fluid 2 (i.e., "air-side") resistance in the EnergyPlus model and the literature, although we will look for opportunities to make parameters open to modification by the user.

At the highest level, we can reuse classes in the Buildings library to arrive at the following potential implementation:

Model Overview

Figure 1: Model Overview

The model in Figure 1 is a screen capture from the Dymola tool for Modelica. It depicts the major parts of the proposed new model. We show an instance of a new class to be created for this effort called HeaterCoolerHumidifier_u which has control inputs for both (de)humidification rates and heat flow. In addition, we can also specify the temperature of the condensate. This new object, HeaterCoolerHumidifier_u, is used to both heat and (de)humidify fluid 2 (nominally air). We use an instance of HeaterCooler_u which can be used for fluid 1 to set the heat flow to that fluid.

The model extends Buildings.Fluid.Interfaces.FourPortHeatMassExchanger to leverage previous work on port layout, fundamental equations, and icons. Our task is then to come up with the relationships for the heat to transfer between the fluids and the condensate flow (if any): i.e., to create the inner workings of the block wetEffNtuCalcs.

A high-level pseudo-code of the model structure appears below where the wetEffNtuCalcs block is where all the new functionality will live:

model WetEffectivenessNTU
  "Heat exchanger using effectiveness-NTU including moisture condensation"
  extends Fluid.Interfaces.FourPortHeatMassExchanger(show_T=false);

  HeaterCooler_u heaToFlu1;
  HeaterCoolerHumidifier_u heaHumToFlu2;
  WetEffNtuCalcs wetEffNtuCal(...);
  Modelica.Blocks.Math.Gain gai(k=-1)
    "Change sign of heat transfer to positive for heat added to fluid1";

equation
  // ...
  // connect(...);
  // ...
end WetEffectivenessNTU;

The functionality that occurs within wetEffNtuCal can be summarized at the high-level as follows based on the EnergyPlus model:

  • initial calculation:
    • determine the coil surface state at design conditions: "all-wet", "all-dry", or "partially-wet/partially-dry"
    • calculate design-level values from user-inputs for design condition (calculation of required parameters at simulation start)
  • for each time-step:
    • determine the coil surface state at current time: "all-wet", "all-dry", or "partially-wet/partially-dry"
    • calculate the coil heat transfer based on effectiveness-NTU method and calculate condensate flow if all or partially wet (otherwise condensate flow is 0)

Heat transfer in the model is based on enthalpy when dealing with moisture rather than temperature so as to model latent effects. This requires the use of enthalpy-based heat transfer coefficients for the wet portions of the coil. The relationship between UA based on temperature and UA based on enthalpy is:

UA_h = UA / Cp;

where

  • UA is the conventional heat transfer coefficient
  • Cp is the specific heat of the air

3.1 Implementation Strategy

A new Buildings.Fluid.HeatExchangers.HeaterCoolerHumidifier_u object will be created which extends Buildings.Fluid.MassExchangers.Humidifier_u and adds functionality similar to that of Buildings.Fluid.HeatExchangers.HeaterCooler_u . This is better than having a class that composes separate instances of Buildings.Fluid.HeatExchangers.HeaterCooler_u and Buildings.Fluid.MassExchangers.Humidifier_u for fluid 2 as it reduces the number of Buildings.Fluid.MixingVolumes.MixingVolume instances that need to be created and also removes the ambiguity of which volume to remove condensate from and which to add/remove heat to/from. The object Buildings.Fluid.HeatExchangers.WetEffNtuCalcs will perform the needed calculations to supply inputs to the above-mentioned objects: total heat transfer into fluid 1, sensible heat flow into fluid 2, condensate flow out of fluid 2, and condensate temperature.

Our approach has been to:

  1. Read through the EnergyPlus documentation and implementation code related to their cooling coil model in detail, extracting the relevant pieces
  2. Read through and extract equations from the primary literature source for the EnergyPlus model, Elmahdy and Mitalas 1977
  3. Sort, organize, simplify and consolidate the above into a Modelica class framework for this task

Step 3 above represents the bulk of the work in implementing the specified model. In this feature specification, we try to show enough to allow review of general direction.

Based on preliminary discussions with Michael Wetter of LBNL, we intend to:

  • build graphical models where possible as these are easier to understand and review
  • create a base-class for effectiveness-NTU based on enthalpy. If possible, we will separate out the moisture-specific information so as to allow Buildings.Fluid.HeatExchangers.DryEffectivenessNTU to be refactored with it.

We plan to extend the following base classes:

  • Buildings.Fluid.Interfaces.FourPortHeatMassExchanger

3.2 Detrmining Coil Surface States: All Wet, All Dry, Partially Dry/Partially Wet

Determination of the coil surface state is a crucial part of this model. We must, however, determine the surface state without introducing numerical issues for the solver. Specifically, we must keep all model equations as once-continually differentiable. To do so, we plan to use Modelica's smooth(1, ...) function along with explicit noEvent(...) calls to prevent if statements/expressions from being treated as "crossing functions" that create stopping events for the solver to consider. Additionally, the smooth(p, expr) function indicates to the Modelica compiler that the expression is p times continuously differentiable. That is, "expr is continuous in all real variables appearing in the expression and all partial derivatives with respect to all appearing real variables exist and are continuous up to order p" (see the Modelica Documentation).

Note: in the discussion below, we use explicit variables for the states at inlet/outlet, however, the actual implementation will make use stream variables (i.e., inStream, etc.) and built-in media/psychrometric functions.

There are some slight differences in how the surface states are determined between Elmahdy and Mitalas 1977 and EnergyPlus.

From Elmahdy and Mitalas 1977, the coil state can be determined by comparing the coil surface temperature with the dew point temperature of the air at the inlet. The equations used are captured in the code snippet below:

  // ...
  Real fraWet(min=0.0, max=1.0)
    "Fraction of the coil surface that is wet";
  Modelica.SIunits.Temperature T2inSur
    "Surface temperature of coil at fluid 2 ('air') inlet";
  Modelica.SIunits.Temperature T2outSur
    "Surface temperature of coil at fluid 2 ('air') outlet";
  Modelica.SIunits.Temperature T2inDewPoi
    "Dew point temperature of fluid 2 ('air') at inlet";
  // ...
equation
  // ...
  fraWet =
    if smooth(1, noEvent(T2inSur < T2inDewPoi)) then
      1.0
    else if smooth(1, noEvent(T2outSur > T2inDewPoi)) then
      0.0
    else
      // call a function to calculate the fraction wet
      calcWetFraction(...);
  // ...

The EnergyPlus algorithm uses slightly different variable values for determing the coil surface states. For a "detailed" analysis that includes an ability to determine "partially wet/partially dry":

  // ...
  Real fraWet(min=0.0, max=1.0)
    "Fraction of the coil surface that is wet";
  Modelica.SIunits.Temperature T1in
    "Temperature of fluid 1 ('water') at inlet";
  Modelica.SIunits.Temperature T2inSur
    "Surface temperature of coil at fluid 2 ('air') inlet";
  Modelica.SIunits.Temperature T2inDewPoi
    "Dew point temperature of fluid 2 ('air') at inlet";
  // ...
equation
  // ...
  fraWet =
    if smooth(1, noEvent(T2inDewPoi < T1in)) then
      0.0
    else
      if smooth(1, noEvent(T2inDewPoi < T2inSur)) then
        calcWetFraction(...)
      else
        1.0;
  // ...

EnergyPlus also presents a "SimpleAnalysis" model. However, as discussed above, this is not an option we can consider as we may not be able to guarantee that the model, if used with steady-state models for the cooling loop, will always have a solution, or that the solution, if it exists, is unique.

We will investigate the above two determinations for surface state to determine if they are equivalent and/or if one is definitively better than the other.

3.3 Testing and Validation Strategy

The model, when given sufficient operating conditions, should operate completely dry and thus can be compared to the Buildings.Fluid.HeatExchangers.DryEffectivenessNTU model for those operating regions. We should also be able to compare to the EnergyPlus version of the model under "Detailed Analysis" mode. Additionally, we should be able to compare to the Buildings.Fluid.HeatExchangers.WetCoilCounterFlow although we note it may be difficult to get comparable models due to the differences in parameters.

Our task will be to identify the performance of our new model relative to Buildings.Fluid.HeatExchangers.WetCoilCounterFlow. We will also need to verify the correctness of our model relative to an equivalent EnergyPlus model in "detailed" analysis mode, the Buildings.Fluid.HeatExchangers.WetCoilCounterFlow model, the Buildings.Fluid.HeatExchangers.DryEffectivenessNTU (in the 100% dry regime), and possibly with analytical solutions such as [Gvozdenac (2012)].

We will test each model to exercise the coil in "all-wet", "all-dry", and "partially wet/partially dry" regimes. We will also exercise the coil in a reasonable example case, such as Buildings.Examples.VAVReheat.ClosedLoop, to ensure it works with the rest of the library. In addition, we will examine and report on metrics for how Dymola (and possibly JModelica) is able to transform and flatten equations. Possible metrics would include: the number of equations, number of algebraic loops, etc.

4. Questions

  • The proposed model switches between dry, wet, and partial dry/wet. Will the "hard switching" between states cause problems for connected components in creating issues with the derivative? Will we need to implement some sort of "differentiable transition" between coil surface states?

mwetter: Yes. Hard switches are inefficient and can lead to the situation that no solution or multiple solutions exist. Hence, models need to be C1 with bounded derivatives (for bounded input).

  • What is the best way to calculate properties of a given fluid state using the Modelica Buildings Library? Specifically, if we need to calculate and get properties from a "design point" that is independent of the fluid's state point at ports, what is the best way to handle this? EnergyPlus has all sorts of "psychrometric functions" but it seems better to leverage the Modelica Media infrastructure.

mwetter: Psychrometric blocks and functions are in Buildings.Utilities.Psychrometrics. See for example https://github.com/lbl-srg/modelica-buildings/blob/master/Buildings/Fluid/Interfaces/ConservationEquation.mo#L140 for how we compute media properties.

5. Discussion

mwetter: I don't see why we need to discretize the model. I think a smooth transition would suffice. Let's discuss on the call.

mokeefe: We've removed any references to discretization and will focus fully on a C1 model with bounded derivatives.

6. Actual Implementation

TBD

7. References

Elmahdy and Mitalas 1977

Elmahdy, A. and Mitalas, G. (1977). "A simple model for cooling and dehumidifying coils for use in calculating energy requirements for buildings". ASHRAE Transactions. Vol 83. Issue 2. Available on-line: http://nparc.cisti-icist.nrc-cnrc.gc.ca/eng/view/object/?id=be9bd2b1-2c2d-46e6-a608-ec2e30f2a401

EnergyPlus Engineering Reference 8.6

EnergyPlus Development Team. (2016). "Engineering Reference v8.6: Chilled-Water-Based Air Cooling Coil". Available online: http://bigladdersoftware.com/epx/docs/8-6/engineering-reference/coils.html#chilled-water-based-air-cooling-coil

Gvozdenac 2012

D. Gvozdenac (2012). Analytical Solution of Dynamic Response of Heat Exchanger, Heat Exchangers - Basics Design Applications, Dr. Jovan Mitrovic (Ed.), InTech, DOI: 10.5772/35944. Available from: http://www.intechopen.com/books/heat-exchangers-basics-design-application/analytical-solution-of-dynamic-response-of-heat-exchangers