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

The wet coil generates an unrealistic sensible heat exchange rate #3027

Closed
SenHuang19 opened this issue May 21, 2022 · 23 comments · Fixed by #3049
Closed

The wet coil generates an unrealistic sensible heat exchange rate #3027

SenHuang19 opened this issue May 21, 2022 · 23 comments · Fixed by #3049

Comments

@SenHuang19
Copy link

In Buildings.Fluid.HeatExchangers.WetCoilCounterFlow, the sensible heat exchange rate is calculated by:

  Modelica.Units.SI.HeatFlowRate QSen2_flow=Q2_flow - QLat2_flow
    "Sensible heat input into air stream (negative if air is cooled)";

If Q2_flow is lower than QLat2_flow, then QSen2_flow is positive even Q2_flow andQLat2_flow are negative.
In this case, the coil is heating the air.

This error can be triggered when the water flow rate is lower while the air flow rate is still high (e.g., the air-side economizer is on). In this case, the Q2_flow is lower but QLat2_flow may be higher since it is not directly related to the water side condition, as shown below:

image

@SenHuang19
Copy link
Author

@mwetter
Can you please let me know is there is a fix to this?

@mwetter
Copy link
Member

mwetter commented May 24, 2022

@SenHuang19 I plan to look at it this week but have a few other items to finish before I can devote time on analyzing this. Do you have a small unit test that reproduces the issue? This always helps in debugging and making sure the issue does not occur again when models are being revised.

@SenHuang19
Copy link
Author

@mwetter
Thank you so much for your explanation.
Should I attach the unit test model here?

@mwetter
Copy link
Member

mwetter commented May 25, 2022

Easiest would be to make a PR to issue3027_wetCoil_sensibleHeat or let me know your local branch that contains the unit test.

@SenHuang19
Copy link
Author

Thanks, I will make a PR then. Can you please point me to an example of the unit test? Just want to make sure I follow the convention.

@mwetter
Copy link
Member

mwetter commented May 25, 2022

Simply adding a small unit test that reproduces the problem would suffice, e.g., a test as we have for any other model, but with parameters configured so that it reproduces the problem you observe. This way we can analyze it, fix it, and it becomes part of the CI tests.

@SenHuang19
Copy link
Author

Sure, please take a look at #3043.

@mwetter
Copy link
Member

mwetter commented May 25, 2022

Thanks. I processed your PR and the model Buildings.Fluid.HeatExchangers.Validation.WetCoilCounterFlowLowWaterFlowRate now reproduces the issue. I will need to look further, it looks like the Lewis number analogy overestimates the amount of vapor that should be condensed at very low water flow rates.

@SenHuang19
Copy link
Author

Thanks. Please let me know if I can help on it. We have some measurement data, which may be useful for the validation.

mwetter added a commit that referenced this issue May 26, 2022
@mwetter
Copy link
Member

mwetter commented May 26, 2022

In HexElementLatent, water is removed from the air volume if condensation occurs. This is taken into account in ConservationEquation. ConservationEquation contains

    mb_flow = sum(ports.m_flow);
    Hb_flow = sum(ports_H_flow);

   // in this model, we use simplify_mWat_flow = true
    der(m) = mb_flow + (if simplify_mWat_flow then 0 else mWat_flow_internal);

for i in 1:nPorts loop
    ports_H_flow[i]     = semiLinear(ports[i].m_flow, inStream(ports[i].h_outflow), ports[i].h_outflow)
      "Enthalpy flow";
    for j in 1:Medium.nXi loop
      ports_mXi_flow[i,j] = semiLinear(ports[i].m_flow, inStream(ports[i].Xi_outflow[j]), ports[i].Xi_outflow[j])
        "Component mass flow";
    end for;
  end for;
...
  mb_flow = sum(ports.m_flow);
 der(U) = Hb_flow + Q_flow;
...

Therefore, Q_flow need to be removed from the component as this sensible heat is used to condense the water vapor.
Moreover, within HexElementLatent this heat is obtained from the water stream and hence it must not be added to mas.

If HexElementLatent is changed to the following (note the gains of gain.k=0 and gain1.k=1, whereas the original version has gain.k = -1 and gain1.k=1):
image
then the temperatures are not increasing beyond the inlet temperatures if the water mass flow rate is at or near zero:
image

@mwetter
Copy link
Member

mwetter commented May 26, 2022

@SenHuang19 : In the plot you uploaded at #3049 (comment), what is the expected result? The plot shows temLeaAir.T <= temEntAir.T except during fast transients such as near 8.8E6 seconds. Is this your concern, and if so, isn't this because of the dynamics of the heat exchanger?

@SenHuang19
Copy link
Author

Yes, I was expecting that temLeaAir.T <= temEntAir.T is true all the time.
I agree that abnormal behaviors during fast transients are not directly related to this issue.

By the way, can you please elaborate on how the dynamics of the heat exchanger affect the heat balance of the air?

@mwetter
Copy link
Member

mwetter commented May 26, 2022

@SenHuang19 : Please check the temperatures of mas in the elements that compute the heat exchange. My guess, without looking at the simulation in detail, is that these temperatures are still sufficiently constant when the air inlet has a fast transient, and thereby they stabilize the air leaving temperature.

mwetter added a commit that referenced this issue May 27, 2022
mwetter added a commit that referenced this issue May 28, 2022
* Updated release notes and date

* Added bug fix for #3027, updated releases notes and date
mwetter added a commit that referenced this issue May 28, 2022
* Added test case from #3043

Files were added manually to exclude the large file Buildings/Resources/Data/Fluid/HeatExchangers/Examples/WetCoilCounterFlowPescribedBoundary.dat

* Simplified example

* Avoided division by zero if nEle=1

* Updated reference results for #3027
@SenHuang19
Copy link
Author

SenHuang19 commented May 31, 2022

@mwetter Thanks a lot for your explanation.
I ran more simulations to better understand the issue.
image
As shown in the above figure, there are 3 periods during which the outlet air temperature is higher than the inlet air temperature.
For Period 1, I believe it is caused by the poor initial values for the temperatures;
For Period 2, the water flow rate was suddenly reduced to 0. In this case, the mas prevents the outlet air temp from being equal to the inlet air temp immediately. Note that the Q2 even becomes positive in this process
For Period 3, I am not sure if it is caused by the downstream temperature when the mass flow of the air approaches 0.

@mwetter
Copy link
Member

mwetter commented May 31, 2022

@SenHuang19 : Period 1 can be ignored as the mass flow rate is 0, and hence sta_* is not informative as it is not clear what the flow direction is.

For Period 2, the energy seems to be stored in mas. Can you verify that this is the only energy flow as it seems to be a large amount of energy after m2_flow = 0.

For Period 3, mass flow rates are 0, and also Q_flow = 0. This is fine. (A tool has no information as to what is upstream or downstream for computing sta* if m_flow = 0.)

@SenHuang19
Copy link
Author

@mwetter I created a simple example to reproduce the issues for Period 2 and 3.
Can you please take a look at it?

@mwetter
Copy link
Member

mwetter commented Jun 9, 2022

Merged to branch issue3027_WetCoilCounterFlowLowFlowRate, commit ae9de6d.

What exactly do you want me to look at? The model seems fine:
image
Note that vol1 has no flow at the indicated point, its temperature is still high, which is what the outlet temperature sensor reports.

@mwetter mwetter reopened this Jun 9, 2022
@SenHuang19
Copy link
Author

SenHuang19 commented Jun 9, 2022

Thanks for your information.
There are two questions I would like to clarify:

  1. Why the outlet air temperature increases a little bit when the air flow approaches 0
  2. I understand the positive value of Q2_flow is caused by the thermal inertia but I wonder if this will occur in real world. Right now we attempted to use the simulation output as the dataset for testing AFDD algorithms. We concerned that this may make AFDD algorithms believe there are sensor faults.
    image

@mwetter
Copy link
Member

mwetter commented Jun 13, 2022

@SenHuang19 : The outlet air temperature increases because the water vol1.T and the metal of the heat exchanger mas.T are higher than the air temperature. Around t=1000 to t=2000, there is no water flow rate, so that energy heats up the air. The results look correct to me.

This dynamic is configured via the parameters tau1, tau2 and tau_m. You may be able to tune these parameters if you have measured data of the transient behavior.

@SenHuang19
Copy link
Author

@mwetter Thank you so much for your detailed explanation.
I did notice that the temperature hex.T1[1] is higher than both hex.T2[1] and hex.T_m[1][1]. Eventually, those three temperatures become very close.
image
In this case, the outlet air temperature is highly associated with hex.T1[1] but I am not sure if the hex.T1[1] at zero flow is always trustable? In this case, if we make the air flow rate to be 0 at t=1500, the outlet air temperature is then decreased:
image
I do understand the model implementation is correct but wonder if we should ignore the heat transfer between the metal and the fluid if the mass flow rate of the fluid is approaching to 0?

@mwetter
Copy link
Member

mwetter commented Jun 14, 2022

@SenHuang19 : The variable hex1.T[1] is a state, hence I don't see why it should not be trustable (under the assumption of the model). hex2.T[1] correctly increases at zero flow because it gets heat from the warmer state hex.T_m[1]. I don't know how you configured senTemAirOut.T but if it is as in the model WetCoilCounterFlowLowWaterFlowRate on the master, we have senTemAirOut.T = hex.T2[1].

@SenHuang19
Copy link
Author

@mwetter :
I thought 1) there may be numerical issue such as dividing-by-zero when calculating hex1.t[1] under a low mass flow rate; 2) the heat transfer coefficient calculation may not consider low mass flow rate conditions.
If those are not the cases, I don't have any other questions.
We used senTemAirOut.T = hex.T2[1] in our example as well.
Thank you so much for your helps.

@mwetter
Copy link
Member

mwetter commented Dec 19, 2022

This has been corrected on the master branch.

@mwetter mwetter closed this as completed Dec 19, 2022
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 a pull request may close this issue.

2 participants