Page 1 of 2

Ammonia Synthesis

Posted: 09 May 2014, 21:56
by ermorgan
Hello,

I'm trying to use COCO to calculate the reaction rates listed in the attached PDF. I'm putting in Equation 2 and 3 from the paper, but so far haven't got it to work. It seems straightforward, and I've successfully done a similar simulation with methanol synthesis. I attached the FSD and I'm hoping that someone has some suggestions for getting this to compile. I think I'm missing something simple, but I don't want to spend another few hours on it!

Thanks!

Re: Ammonia Synthesis

Posted: 10 May 2014, 06:37
by jasper
Your reaction rate is defined as

4.75/2200*(1000/3600)*(((17900*exp(-87090/(R*T)))*((X("Nitrogen")*(P/100000)))*(X("Hydrogen")*(P/100000))^1.5/(X("Ammonia")*P/100000))-27500000000000000*exp(-198464/(R*T))*(X("Ammonia")*P/100000)/(X("Hydrogen")*P/100000)^1.5)

and gives infinity at the very first iteration because X("Ammonia") is zero and is it divided by. After that composition becomes NaN which in CAPE-OPEN is equivalent to not set. The error message does not get a clarity prize, but the problem is division by composition, which has a value of zero.

Re: Ammonia Synthesis

Posted: 10 May 2014, 07:14
by jasper
An update is now available (CUP) that provides a clearer error message: failed to calculate (...): division by zero

Re: Ammonia Synthesis

Posted: 16 May 2014, 22:35
by ermorgan
Hi Jasper,

Thanks for the responses and sorry for the late reply, I've been travelling.

I just added a bit of NH3 to the feed and got a much better result.

As always, thanks for a great software.

Eric

Re: Ammonia Synthesis

Posted: 17 May 2014, 08:44
by jasper
Glad to hear it works!

Re: Ammonia Synthesis

Posted: 23 May 2014, 20:20
by ermorgan
Hi Jasper,

I'm trying to model the ammonia synthesis loop that was in the attached PDF at the beginning of this thread. I stripped down the model to be very simple: compression, a flash, a recycle compressor, a heater and then another compressor to ensure that the outlet stream is correct. I can't obtain convergence at a tolerance of 0.001 in both the mass balance and the recycle. I've tried literally hundreds of times with no luck. I'm hoping that there's something I'm doing wrong that will be immediately obvious to you. Any thoughts?

The more complicated NH3 model is also in a book by Luyben, so it might make a good starting point for your example flowsheets!

Thanks,

Eric

Re: Ammonia Synthesis

Posted: 23 May 2014, 20:56
by jasper
Are your kinetics correct? What it looks like, at first glance, is that you do not convert a sufficient amount of nitrogen in your reactor. This is building up, increasing the recycle rate. That in turn causes high superficial velocities in the reactor, bringing down the conversion. The reactor integration fails due to the combination of small particles, high packing density and high superficial velocity, which cases the pressure drop be be so high that pressure goes to zero.

Re: Ammonia Synthesis

Posted: 23 May 2014, 20:57
by jasper
I did not check the PDF, but if there is a converged answer in there, you can of course use that to check your kinetics by manually breaking the recycle and specifying the expected reactor feed.

Re: Ammonia Synthesis

Posted: 24 May 2014, 21:47
by ermorgan
Thanks for the advice, Jasper. Indeed, you appear to be correct - the kinetics were wrong. I'm not sure exactly what's going on, except that the PDF that I provided might have had the wrong reaction units, given as kmolNH3/(kgcat*hr). Since COCO requires mol/(sec*kgcat) I added a conversion factor of 1000/3600, which appears to be the problem. I calculated some reaction rates by hand (Matlab) and compared them to the COCO output. The answers were off by a factor of about 3.47 (~3600/1000). Once I removed the conversion factor I was able to get the values listed in Streams 10/11 in the PDF. However, it appears that the model used in the PDF didn't calculate pressure drop and prescribed a value of 1bar instead. Anyway, it works!

Thanks,

Eric

Re: Ammonia Synthesis

Posted: 25 May 2014, 06:28
by jasper
Glad to hear it!