Closed JavalVyas2000 closed 5 months ago
So, my first reaction here is that this is user error. How can O2 be inert if you also have CO2, CO, H2O, and hydrocarbons? What happens if O2 is removed from the inert species list?
I checked the DOF after removing O2 and it was the same.
Another possible issue I found with this is that the Gibbs Reactor makes the lagrange_mult variable for all the elements in the property package but does not consider if the element is linearly independent. As the linearly independent elements have the lagrange_mult as a free variable. This made the DOF to be 0 in this case.
The
inert_species_balance
function in gibbs reactor does not create the balance for all the inert species, but only for the ones that are linearly independent with element balance as per the logic in the function. This increases the degrees of freedom as the variables are created for all the species including inerts but there are no constraints addressing the linearly independent with element balance.The previous version of gibbs reactor use to create the constraints for all the inert species commit id - 119656fcfc9d249d844f680b14c74da991e6f9dd
To give an example of this, look at the below example
This gives shows that the model does not create constraints for N2 and Ar as they are linearly independent, but creates constraints for O2 as it has O. This makes the dof to increase by 2 of the flowsheet for each Gibbs Reactor.