idaes-pse icon indicating copy to clipboard operation
idaes-pse copied to clipboard

1D Heat Exchanger needs Upwinding

Open dallan-keylogic opened this issue 8 months ago • 12 comments
trafficstars

Presently, then HeatExchanger1D model uses a backwards difference for discretization on both sides, regardless of the flow mode. For countercurrent flow, it is an upwind method for the hot side and a downwind method for the cold side. If fluid holdup dynamics are considered, downwind methods are unstable. However, we've discovered that even for the steady state model an upwind difference is only conditionally stable. It's analogous to using a forward Euler method to solve an initial value problem---if the temperature increases too much in a single step, whether due to a large heat transfer coefficient, low heat capacity, or low flow rate, you can see oscillations in the heat duty.

The naive solution is to simply switch the discretization on the cold side. However, due to discretization error, energy is not conserved. There is a workaround---offsetting the forward and reverse domains by 1. This is equivalent to a first-order finite volume method, and energy is then conserved. The problem then is that having two domains offset by 1 leads to modeling errors when the user forgets whether a unit model level variable or constraint is indexed by the hot side or the cold side.

A better solution is probably collocation. Professor Biegler suggested looking at Lagrange-Legendre collocation, because it is symmetric forwards and backwards. Somebody needs to verify that degrees of freedom are correctly managed at the domain inlets and outlets, however.

dallan-keylogic avatar Feb 26 '25 19:02 dallan-keylogic