[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
CAPE-OPEN • View topic - Equilibrium Reactor Unit-COFE Crash

Equilibrium Reactor Unit-COFE Crash

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

Moderator: jasper

Equilibrium Reactor Unit-COFE Crash

Postby nrgeng » 27 July 2014, 12:07

As part of an investigation of the usefulness of a particular reaction, two simulations were conducted at different temperatures using an Equilibrium Reactor Unit. The lower temperature (LT) simulation presented no problems during the study, but the high temperature (HT) simulation crashed above a threshold temperature of 550 C.

Since the LT simulation was well behaved, could the problem be caused by a "fast" reaction occurring at the HT? The data are (1) Keq = 3.0E+07 @ 300 C and (2) Keq = 1.3E+010 @ 800 C. If this indeed is the case, could the problem be detected and a error message be generated so as not to allow COFE to crash? You loose all of your changes when the crash occurs and recovery is by the use of Task Manager––not pretty.

PS. In the past, an error message has been generated regarding convergence.
nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Equilibrium Reactor Unit-COFE Crash

Postby jasper » 27 July 2014, 14:16

Can you send me a document with this behaviour so that I can check what is happening?
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Equilibrium Reactor Unit-COFE Crash 2

Postby nrgeng » 27 July 2014, 16:04

nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Equilibrium Reactor Unit-COFE Crash

Postby jasper » 28 July 2014, 08:32

Why this will not solve is a discussion we have had before.

The equilibrium reactions are solved in terms of reaction extent. You choose an equilibrium constant of 1.3e10, so the reaction is nearly instantaneous. If you are actually interested in the amount of unreacted material (which will be, considering the reaction order, somewhere in the sqtr(1.3E+010) concentration range), I think you will need to set up a specifialized solver and formulate the problem solving specifically for the amount of material that remains unreacted. The equilibrium reactor is not formulated that way, and such a problem is perhaps a bit too specific for the equilibrium reactor to change its formulation.

The reaction is

H2O + CH3OH -> 3 H2 + CO

The error, formulated as

f(X) = 3*ln(C[H2]) + ln(C[CO]) - ln(C[H2O]) - ln(C[CH3OH]) - ln(K)

and the degree of freedom is the normalized reaction extent, such that

f(H20) / fTot0 = f0(H2)/fTot0 + 3*X
f(CO) / fTot0 = f0(CO)/fTot0 + X
f(H2O) / fTot0 = f0(H2O)/fTot0 - X
f(CH3OH) / fTot0 = f0(CH3OH)/fTot0 - X

Now we need to find X such that f(X) is small, which requires solving X with a very high accuraty (do the math: fill out the above and differentiate w.r.t. X).

A new reaction standard specification is being formulated, that allows for completely instantaneous reactions. At that point, the reaction implementations in COUSCOUS will probably be revised to cater for this.

Remains the question why you see a crash. You should be seeing a convergence problem like I do:

error: calculate failed for unit Equilibrium 550: Solution failed: maximum number of iterations exceeded

For the one outside the loop this happens rather quickly. For the one inside the loop all iterations fail, which takes a bit longer. But if you are solving in a back ground thread, you should simply be able to abort the calculation. It takes about 10 - 12 seconds for me to abort, as the current reactor needs to finish not converging.

I cannot reproduce the crash. Can you give more info on how to make it crash?
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Equilibrium Reactor Unit-COFE Crash 3

Postby nrgeng » 28 July 2014, 11:30

nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Equilibrium Reactor Unit-COFE Crash

Postby jasper » 28 July 2014, 11:59

On the non-responsiveness, are you allowing a background thread? (edit -> preferences, Allow flowsheet solving in a background thread).

Regarding when can something not be solved: when

- d f(X) / d(X) becomes very high, or when f(X) changes more than the desired accuracy while X changes at machine precision
- when noise in f(X) makes that d f(X) / d(X) cannot be determined with sufficient accuracy

So it is not just a matter of how high is the equilibrium constant. It is more likely a matter of how close is the actual solution to one of the values of composition becoming zero (check the corresponding d f(X) / d X term that results from it). The best test really is: will it converge or not. I am not sure of any test that would tell you with certainty before attempting to solve.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain


Return to COCO (AmsterCHEM)

Who is online

Users browsing this forum: No registered users and 2 guests