[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/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 - Questions on CSTR & Equilibrium

Questions on CSTR & Equilibrium

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

Moderator: jasper

Questions on CSTR & Equilibrium

Postby nrgeng » 17 May 2013, 23:34

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

Re: Questions on CSTR & Equilibrium

Postby jasper » 18 May 2013, 09:25

This looks like a numerical problem. Not surprising if the magnitude of the K value is that high....

Can you send an example fsd so that I can check what exactly is happening?
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Questions on CSTR & Equilibrium 1.1

Postby nrgeng » 18 May 2013, 16:39

I e-mailed a flowsheet that exhibits the described problem. Hope you can find a solution.
nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Questions on CSTR & Equilibrium

Postby jasper » 18 May 2013, 19:19

I do not think that for this one I will find a ready made solution. As you can see from the Gibbs reactor, the conversion of the reaction is about 100%*(1-1.2e-8), or 99.9999988%. The Gibbs reactor converges because it is looking for a minimum and terminates where it can no longer get the value smaller, so chances are there is a pretty big relative error on your calculated equilibrium constant. The Equilibrium and CSTR reactors however want to converge on a relative tolerance of the given equilibrium constant, by variation of reaction extent. It has an error tolerance of 1e-4 by default, so this means you need to converge the reaction extent to a relative precision of about 1e-12 or so. This is not feasible. The errors in the underlying thermo routines are several orders of magnitude larger to begin with.

Are you really interested in the exact remaining concentrations of oxygen and methane? As a good approximation, it all burns. Why do you not model this as a reaction with a fixed conversion of 100%?
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Questions on CSTR & Equilibrium 1.2

Postby nrgeng » 19 May 2013, 01:21

You have just given me a glimpse of the difference between the Real world and the world of COCO simulation. In the Real world, I would use this partial oxidation reaction to provide energy to an endothermic reaction in the same reactor. Here in the world of COCO simulation I will have to use two reactors, one (Equilibrium) and another (Fixed Conversion) with an energy stream connecting them.

OK, I can do it! Thanks for the explanation. :P
nrgeng
 
Posts: 239
Joined: 16 February 2013, 12:45
Location: USA

Re: Questions on CSTR & Equilibrium

Postby jasper » 19 May 2013, 06:49

This would be one way to do it. This is of course not a restriction of the flowsheeter, but rather because there is no unit operation available that mixes equilibrium reactions with reactions that are irreversible and instantaneous. Partly this is because there is no way yet to indicate in a CAPE-OPEN reaction package that are reaction is indeed irreversible and instantaneous (it is not quite equivalent to an equilibrium reaction with a zero or infinite equilibrium constant). The next version of the reaction specification should fix this, it is in the making. Perhaps at this point COUSCOUS will contain a reactor that handles it properly.

In the mean time of course it is not so difficult to put in something that is equivalent. Your suggestion is good as long as the reactions are not coupled (e.g. there is not another reaction that produces methane). Otherwise you could think of a custom unit operation that does the calculations, e.g. in Excel using the solver or in Matlab or Scilab, using root finders.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Questions on CSTR & Equilibrium

Postby colancto » 21 May 2013, 21:52

I think this discussion shows that it is indeed worth being able to describe a reaction as irreversible-instantaneous. There is also the issue of convergence criteria at each level of the model that ought to be tighter and tighter when going deeper in the system. We have missed somehow this one when designing the thermo interfaces. Not sure it would be safe to have such a numerical criteria defined as a Parameter with a specific name. The nice thing with a Parameter is that everything is already in place and there is no need to define a new interface.
User avatar
colancto
Administrateur
 
Posts: 92
Joined: 23 October 2012, 11:46

Re: Questions on CSTR & Equilibrium

Postby jasper » 22 May 2013, 07:33

Tigher thermo tolerance would in this particular case likely not help. We are at the limit of what can be represented by a double precision number.
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 16 guests