Replies: 9 comments
-
|
I don't have personal experience with the Bad scaling can certainly result in infeasibility when the underlying model is feasible. If you have tiny mole fractions of certain components, IPOPT may think a bound is active when the mole fraction takes a small-but-nonzero value. Also, the enthalpy balance contains numbers many orders of magnitude greater than anything else in the problem, which makes it hard to get a residual small enough to meet IPOPT's tolerance without scaling. For a brief overview of scaling, check out Section 2 of this paper. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot for your reply!! We fixed the unfeasibility issue and now we are able to run and find an optimal solution on our sofc model based on the soec current tests. But we are encountering a weird behaviour of the solver, we get a different result (actual output values) every time we run the code and restart the kernel. Even changing the path of the .py file will cause a big difference between runs. We are using IPOPT, so the seeding is not the issue here. This does not happen with the models present on the IDAES repo so we are missing for sure some important characteristic of the solver behavioiur. Any idaes? :) |
Beta Was this translation helpful? Give feedback.
-
|
Did you manage to resolve your degrees of freedom issue? I'm not sure how IPOPT acts with nonzero degrees of freedom and no objective function. |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Thanks for your reply! Yes we did manage to get DOF = 0 for the whole model (to check we use print(degrees_of_freedom(model))), but when we print the DOF for each unit model those are not zero, and vary for each one. Is that a normal behaviour in you opinion? DOF = 0 should be for the whole model? |
Beta Was this translation helpful? Give feedback.
-
This is normal. Those degrees of freedom correspond to the variables on the inlet ports of each unit model and are taken care of by arc constraints at the flowsheet level. Note that 1) Pyomo supports centimeters as a unit, 2) I don't know how it will react to having numbers in the units field, and 3) you've misplaced parentheses in the units for Despite it being present in the version of the model in the repo, fixing Generally we like to keep performance constraints like this at the flowsheet level rather than having them exist at the unit model level. You may need to scale "flow_mol_phase_comp" as well.
From looking at the Jupyter notebook, IPOPT is still returning infeasible: That would explain why the mixer isn't conserving material---the equations aren't being solved to the prescribed tolerance. As for why you might be having infeasibility, the current density you want to use, There are more sophisticated ways of determining exactly which variable bounds or constraints IPOPT think are active by looking at the dual variables, but presently Pyomo makes it something of a pain to get them. Streamlining that process is on the list of future additions to the diagnostics toolbox, though. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much for the very explanative and fast reply! We implemented your suggestions in SOFC_unit.py and were able to fix the mixer behaviour. Now our Jupyter Notebook (SOFC_run_script.ipynb) returns an our problem seems to lie in the temperature variables, woud it make sense to .fix a possible outlet temperature of the outlet streams and then .unfix them? We saw it is something that was done in the SoecDesign.py: and like this in its Jup Notebook:
Our aim would be to create a model that gives us the values of the outlet temperatures, therefore we are having a hard time understanding the logic of doing so. Would an upper boundary for the outlets' temperature work in the same way? We appreciate any help, but we also know we are asking for a lot of input and feedback. As this is our first time working with IDAES we are still very much in the learning process. Thanks a lot for the suggestions so far, they have been incredibly helpful. |
Beta Was this translation helpful? Give feedback.
-
IPOPT can solve underconstrained problems to find a feasible point. However, if you're missing an equation, the solution may not be physically meaningful.
The In terms of your energy balances, you might try adding a constraint equating the fuel side and oxygen side temperatures. Hopefully that works, check the Dulmage-Mendelsohn partition to make sure your model isn't structurally singular (which is a necessary but not sufficient condition for your model to give physically meaningful results). |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot for your reply! We kept working on our model and implement your suggestions, so this Q&A has been super helpful. We are trying to study now how the stoichiometric reactor works for two main reasons:
We assume our reactor is adiabatic, it doesn't lose heat to the environment and the heat created from the esothermic reaction is entirely passed to the reaction products so generally we would put
Any suggestion is appreciated, thank you for your time |
Beta Was this translation helpful? Give feedback.
-
Are you assuming that the stoichiometric reactor object is adiabatic or that the entire SOC module is adiabatic? If the stoichiometric reactor is adiabatic, then you don't need a heat object and want
If you're using the modular property framework, you just add a second reaction with a second index. I don't think there's any specific example, but here I added a second (parallel) reaction for Methanol synthesis creating formaldehyde (with made up numbers for parameters). Reactions in series don't pose a problem writing equations, but you need to be careful that all flow rates remain positive when specifying extents of reaction. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone! We are trying to design a SOFC model on IDAES using the SoecDesign present here in the repository under power generation units (idaes/models_extra/power_generation/unit_models/soec_design.py). Is anyone else working on something similar or did in the past? We are encountering infeasability errors in the model convergence and think we might have a scaling factor issue. Also the SOEC model when running has DOF=1, is that correct? From my understanding the DOF should be 0 for the unit models present in the SOFC but DOF = 1 or the whole flowsheet? It is possible that infeasability errors arise from just the scaling factors and not from errors in the Constraints? Thank you very much in advance for any help and I am open to discuss further about SOFCs!
Beta Was this translation helpful? Give feedback.
All reactions