I'm trying to simulate a steam methanol reforming reaction, but having a really hard time getting the Gibbs reactor to converge. Does DWSIM use previous results to start the next calculation? If so, how can one "reset" the calculation to start from scratch.
Methanol reforming typically happens at 230C. However, in order to get a Gibbs reactor that converges, I had to increase feed temperature to 800C. I then tried to walk down the temperature by copying vapor stream data to the reactor under "Initial Estimates". Doing it this way, I was able to walk down temperature to about 550C. However, no lower.
The convergence behaviour seems to be unpredictable and somewhat unstable.
Can anyone recommend guidelines on how to get Gibbs reactors to converge? Checklists of what to check etc?
Regards
Jan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you use the Solution Inspector, you'll notice that newton's method is suggesting a very high variable change in the first iteration, which can be solved with a small value for the upper limit of the damping factor. Check the attached file.
Thank you for looking into this. I am still struggling to converge the
Gibbs reactor though.
When I open your file, I have a converged solution. However, if I hit
"Solve Flowsheet" again, I get a "Convergence Error". Even when I copy the
outlet vapor stream to Initial Estimates, and try to re-run, I get a
convergence error.
This one should work. It seems that the solver is numerically dependent on the platform where it is running on top of (.NET or Mono). The initial estimates property is not exposed through the Cross-Platform UI, but you can change the current values before running the calculation with a python script - check the 'Scripts' tab.
Thank you - I was on Update 15, now 16 after today's update.
I'm using the classic UI, which does indeed show an "Initial Estimates"
tab.
Thanks Daniel - very impressed with Solution Inspector! Wow. I am still
not "home" on this.
Here's what I tried, with somewhat unexpected behaviour:
When I opened your latest file. If I immediate hit "Solve
Flowsheet", the flowsheet does not converge. (Doesn't make sense, from
just re-running your solved file?).
I then opened the Gibbs reactor in the flowsheet, selected Initial
Estimates and clicked on "Copy from Outlet Vapor Stream". I then tried
re-running it, still did not converge.
I opened the script, and also copied the Initial Estimates values
from the outlet vapor stream flow (i.e. a previously converged solution),
into the script values. I re-ran, but still no convergence.
I next tried to change the initial estimates in the script to be
somewhat to be close to, but not exactly the original solution. Still no
convergence.
I next tried, just for the heck to try some other Property methods.
However, I still could not get the same flowsheet to converge the Gibbs
block.
I was finally able to get it to converge by reducing the Upper Limit
of the Damping Factor down to 0.0001, and increasing the maximum number of
internal loop iterations to 100,000.
Daniel, the above behavior suggests to me that the initial estimates are
still not taken into consideration, neither by the UI nor the script
definition?
It is also confusing to me that a flowsheet that converged for you, would
not converge again once I ran it. A suggestion, but would it not make
sense that whenever a simulation is re-run after opening, that it initially
sets initial values from the last converged solution? Or perhaps a button
that writes the last known solution as initial values to all streams prior
to calculation?
This one should work. It seems that the solver is numerically dependent on
the platform where it is running on top of (.NET or Mono). The initial
estimates panel is not exposed through the Cross-Platform UI, but you can
change it through a script - check the Script section.
The problem is not with the initial estimates (which are always taken into consideration), but with the newton convergence process. It seems that, when there are very small values involved, the suggested variable updates depend on cpu precision, and can show some instabilities, specially in this case where I use numerical derivatives. Maybe I can avoid this by using Log vars instead. Will do some experimentation on the subject.
Regards
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I'm trying to simulate a steam methanol reforming reaction, but having a really hard time getting the Gibbs reactor to converge. Does DWSIM use previous results to start the next calculation? If so, how can one "reset" the calculation to start from scratch.
Methanol reforming typically happens at 230C. However, in order to get a Gibbs reactor that converges, I had to increase feed temperature to 800C. I then tried to walk down the temperature by copying vapor stream data to the reactor under "Initial Estimates". Doing it this way, I was able to walk down temperature to about 550C. However, no lower.
The convergence behaviour seems to be unpredictable and somewhat unstable.
Can anyone recommend guidelines on how to get Gibbs reactors to converge? Checklists of what to check etc?
Regards
Jan
Hi Jan,
can you attach your simulation file?
Hi Daniel. Sorry missed your reply. I have attached a simulation file here.
If you use the Solution Inspector, you'll notice that newton's method is suggesting a very high variable change in the first iteration, which can be solved with a small value for the upper limit of the damping factor. Check the attached file.
Daniel
Thank you for looking into this. I am still struggling to converge the
Gibbs reactor though.
When I open your file, I have a converged solution. However, if I hit
"Solve Flowsheet" again, I get a "Convergence Error". Even when I copy the
outlet vapor stream to Initial Estimates, and try to re-run, I get a
convergence error.
How can I help debug this behaviour?
Regards
Jan
Last edit: Daniel Medeiros 2018-09-03
Are you running v5.2 Update 14 or newer?
This one should work. It seems that the solver is numerically dependent on the platform where it is running on top of (.NET or Mono). The initial estimates property is not exposed through the Cross-Platform UI, but you can change the current values before running the calculation with a python script - check the 'Scripts' tab.
Regards
Daniel
Last edit: Daniel Medeiros 2018-09-03
Daniel
Thank you - I was on Update 15, now 16 after today's update.
I'm using the classic UI, which does indeed show an "Initial Estimates"
tab.
Thanks Daniel - very impressed with Solution Inspector! Wow. I am still
not "home" on this.
Here's what I tried, with somewhat unexpected behaviour:
Flowsheet", the flowsheet does not converge. (Doesn't make sense, from
just re-running your solved file?).
Estimates and clicked on "Copy from Outlet Vapor Stream". I then tried
re-running it, still did not converge.
from the outlet vapor stream flow (i.e. a previously converged solution),
into the script values. I re-ran, but still no convergence.
somewhat to be close to, but not exactly the original solution. Still no
convergence.
However, I still could not get the same flowsheet to converge the Gibbs
block.
of the Damping Factor down to 0.0001, and increasing the maximum number of
internal loop iterations to 100,000.
Daniel, the above behavior suggests to me that the initial estimates are
still not taken into consideration, neither by the UI nor the script
definition?
It is also confusing to me that a flowsheet that converged for you, would
not converge again once I ran it. A suggestion, but would it not make
sense that whenever a simulation is re-run after opening, that it initially
sets initial values from the last converged solution? Or perhaps a button
that writes the last known solution as initial values to all streams prior
to calculation?
Regards
Jan
On Mon, Sep 3, 2018 at 12:58 PM Daniel Medeiros danwbr@users.sourceforge.net wrote:
Hi Jan,
The problem is not with the initial estimates (which are always taken into consideration), but with the newton convergence process. It seems that, when there are very small values involved, the suggested variable updates depend on cpu precision, and can show some instabilities, specially in this case where I use numerical derivatives. Maybe I can avoid this by using Log vars instead. Will do some experimentation on the subject.
Regards
Daniel