Heat Exchanger Unit--Matrix Singularity

Discusses use of COCO, the process simulation and modelling software suite from AmsterCHEM, downloadable from http://www.cocosimulator.org

Moderator: jasper

Heat Exchanger Unit--Matrix Singularity

Postby nrgeng » 29 January 2014, 01:18

I am experiencing a time consuming problem with the Heat Exchanger Unit:

(1) Changing the Unit's outlet temperature by 1 C, from 135 C to 136 C, results in the Error Message, "Jacobian decomposition failed: matrix singularity." The flow sheet does not solve. The solution can be restored by changing back to 135 C.

(2) Changing the Unit's outlet temperature by 1 C, from 135 C to 134 C, results in the Error Message, "Jacobian decomposition failed: matrix singularity." The flow sheet does not solve. The solution cannot be restored by changing back to 135 C.

This seems unusual to me. Can you explain why the flow sheet fails or describe the procedure by which a solution can be obtained without manual intervention (automatically)?

I have e-mailed a fsd file that exhibits the problem.

PS. My procedure is to use multiple manual attempts, usually many, until the flow sheet solves. I would rather have the computer perform this tedious task for me.
nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Heat Exchanger Unit--Matrix Singularity

Postby jasper » 29 January 2014, 09:45

If you remove the controller, feed controller and temperature measurement from the test case, set the outlet temperature to 136 C you can set up a parametric study that demonstrates the problem. The whole problem has one degree of freedom (the measured variable minus the setpoint, temperature of stream 112) and one parameter (the contolled variable, the water flow rate) and the singularity stems from the derivative of the measured variable w.r.t. the controlled variable being zero.

So run the study with varying water feed rate (between 10 and 90 mol/s, with some 100 intervals) and take temperature of 112 as an output. Plot temperature as a function of flow rate.

You will see a large flat region; if any iteration ends up in there the problem is singular. This is the boiling temperature of water of course, at 0.2 MPa. This flat region goes all the way down to about 13 mol/s. It starts at about 82.5 mol/s.

You also see a region where the evalution cannot be done, because the specification to the heat exchanger becomes infeasible (too much heat needs to be exchanged, and a temperature cross-over results). This is above about 85 mol/s.

The problem specification is actually feasible, as the 136 C is in the region between 82.5 and 85 mol/s, but the solver has problems finding it because the feasible region is that small.

For the solver to work, the initial guess must be in the feasible region, and it is not. It is at about 80 mol/s. If you set a feasible initial guess (e.g. 84 mol/s, note that you have to set this as the initial guess for the controlled variable at the information stream; this is the cut stream) it will convergce. I am sure however that you cut this example out of a bigger problem and identifying where the feasible region is is not always an option.

In the case of this particular one dimensional problem, bracketing and bisection may help to find a solution in a more stable manner, but one dimensional problems are not typical and it would not be worth the effort implementing a particular solver for one dimensional problems.

So I am not sure what to suggest how to solve this in a generic manner as I do not know the structure of your actual problem. What may help is to get rid of the zero slope region on the cool side of your heat exchanger. It is possible to make this fluid something else than pure water, something that has a finite contribution to the slope in the two phase region? A small addition of a second compound?

You can avoid manual attempts by doing the parametric study, there you can see where to pick your initial guess. Of course I cannot use a bunch of random points as initial guess. Although this may be ... well, I would not call it feasible ... in one dimension, it certainly is not feasible in multiple dimensions.
Attachments
graph.png
variation of outlet temperature with inlet flow rate
graph.png (6.96 KiB) Viewed 8737 times
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain


Return to COCO (AmsterCHEM)

Who is online

Users browsing this forum: Google [Bot] and 6 guests