Closed sbugosen closed 1 year ago
Also, if you decide not to include a conversion constraint and just fix the outlet temperature in the reactor, you can also do that and you'll end up with 2 degrees of freedom, as expected. In this case, you should comment out constraint "max_reformer_outlet_temp" and replace that with "m.fs.reformer.outlet.temperature[0].fix(1060)".
So the question is, do we include a conversion constraint, or do we fix outlet reformer temperature?
@sbugosen I figured out why Lagrange multipliers for inert species are included: they are multiplied by coefficients of zero because the elements Ar
and N
don't appear in any other species, but are also multiplied by a mutable parameter, m.fs.reformer.gibbs_scaling
, so IncidenceGraphInterface
doesn't properly filter them out. I've opened a Pyomo PR to fix this here: https://github.com/Pyomo/pyomo/pull/2882. In the meantime, the workaround is to manually exclude them when iterating over igraph.variables
.
@Robbybp Glad I was able to contribute in some way to this :). I'm still trying to debug the implicit ATR (the other PR). At least ALAMO and FullSpace are already solved.
It looks good!
Hi Robert, regarding the degrees of freedom, I added a conversion constraint and now the degrees of freedom are 2, as expected. However, as discussed, it's better if you also take a look at the file because of your experience. Maybe I missed something.
Also, I modified the constraints to have a more interesting optimization problem. The file runs and the results are reasonable.