It seems that I cannot attach example files in the first post ....There are differences in results from both simulators. The FIRST thing is that "Coonversion Reactor" in HYSYS accepts multiple-inlets while in DWSIM to create a similar effect a mixer at the UPSTREAM of reactor is required.
The results shown below has two key differences
1] The extent of the reaction are dfferent
2] Calculated temperature of DWSIM (after reactor) is 94C less than in HYSYS
The FIRST thing is that "Coonversion Reactor" in HYSYS accepts multiple-inlets while in DWSIM to create a similar effect a mixer at the UPSTREAM of reactor is required.
This is by design.
1] The extent of the reaction are dfferent
2] Calculated temperature of DWSIM (after reactor) is 94C less than in HYSYS
For some reason the conversion of the remaining amount is reaching 57%, not 60%. I'll check it out.
Regards,
Daniel
Last edit: Daniel Medeiros 2017-12-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For some reason the conversion of the remaining amount is reaching 57%, not 60%
No ...if you check out HYSYS sim file reaction extent is 37% (that is intentional because air is a limiting factor). That is also the deduction from DWSIM results (the Mole Fraction of outlet vapour stream has ZERO O2)
Last edit: ioncube 2017-12-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In this case, DWSIM is showing the conversion relative to the initial (feed) amount of the base compound. If all conversions are relative to the initial mole amounts and the first reaction conversion is defined as 40%, then the other should be 60% (40 + 60 = 100% conversion). Am I missing something?
EDIT: sorry, I got it. I'm with a hell of a headache right now and wasn't thinking clearly.
Last edit: Daniel Medeiros 2017-12-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You got everything right! If the 1st rxn achieved 100% extent (that is 40% conversion w.r.t Base component CH4 as defined by user) ...the 2nd rxn doesnt necessarily will achieve 100% extent (that is 60%) WHY ....because the limiting component air (precisely O2) is exhausted
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
oK Daniel the problem is confirmed to be in DWSIM enthalpy calculation algorithm for reactions. I have reproduced same results as that of HYSYS in COCO as well ....everything same except Temperature https://prntscr.com/hu9iat
BTW COCO failed to autocalculate max. extent of RXN2 (whereas DWSIM successfully did that). COCO gave error that O2 has become -ive in outlet so I have to manually reduce 0.6 extent of RXN2 to 0.576. HYSYS represenatation of this extent is different & it also gave me temporary headache :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sure. I think that for parallel reactions I'll have to setup and solve some kind of linear system with linear constraints as well... first DWSIM task for 2018.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The energy balance is fixed. No more negative flows.
I've implemented a parallel reaction solver which may not give the same result as HYSYS', but it is mathematically correct and preserves the mass balance. Basically it tries to find a set of conversion values as close as possible to the defined ones while keeping all mole amounts non-negative.
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems that I cannot attach example files in the first post ....There are differences in results from both simulators. The FIRST thing is that "Coonversion Reactor" in HYSYS accepts multiple-inlets while in DWSIM to create a similar effect a mixer at the UPSTREAM of reactor is required.
The results shown below has two key differences
1] The extent of the reaction are dfferent
2] Calculated temperature of DWSIM (after reactor) is 94C less than in HYSYS
https://prntscr.com/httwbe
https://prntscr.com/httwnx
Here are the two cases attached
This is by design.
For some reason the conversion of the remaining amount is reaching 57%, not 60%. I'll check it out.
Regards,
Daniel
Last edit: Daniel Medeiros 2017-12-29
No ...if you check out HYSYS sim file reaction extent is 37% (that is intentional because air is a limiting factor). That is also the deduction from DWSIM results (the Mole Fraction of outlet vapour stream has ZERO O2)
Last edit: ioncube 2017-12-29
In this case, DWSIM is showing the conversion relative to the initial (feed) amount of the base compound. If all conversions are relative to the initial mole amounts and the first reaction conversion is defined as 40%, then the other should be 60% (40 + 60 = 100% conversion). Am I missing something?
EDIT: sorry, I got it. I'm with a hell of a headache right now and wasn't thinking clearly.
Last edit: Daniel Medeiros 2017-12-29
You got everything right! If the 1st rxn achieved 100% extent (that is 40% conversion w.r.t Base component CH4 as defined by user) ...the 2nd rxn doesnt necessarily will achieve 100% extent (that is 60%) WHY ....because the limiting component air (precisely O2) is exhausted
May I ask you to create a bug ticket regarding the difference in the results? https://sourceforge.net/p/dwsim/tickets/
oK Daniel the problem is confirmed to be in DWSIM enthalpy calculation algorithm for reactions. I have reproduced same results as that of HYSYS in COCO as well ....everything same except Temperature
https://prntscr.com/hu9iat
Not necessarily the enthalpy. I think that the error is in the calculated conversion... I have to take a look at the code.
BTW COCO failed to autocalculate max. extent of RXN2 (whereas DWSIM successfully did that). COCO gave error that O2 has become -ive in outlet so I have to manually reduce 0.6 extent of RXN2 to 0.576. HYSYS represenatation of this extent is different & it also gave me temporary headache :(
Maybe you could take a look at the code by yourself and spot the issue: https://github.com/DanWBR/dwsim5/blob/master/DWSIM.UnitOperations/Reactors/Conversion.vb#L57
I am afraid Daniel thiugh I do know a lot about EXCEL-VBA ...this seems to be beyond my comprehension
Sure. I think that for parallel reactions I'll have to setup and solve some kind of linear system with linear constraints as well... first DWSIM task for 2018.
Thanks for your timely response
You can try this pre-release build: https://github.com/DanWBR/dwsim5/releases/latest
The energy balance is fixed. No more negative flows.
I've implemented a parallel reaction solver which may not give the same result as HYSYS', but it is mathematically correct and preserves the mass balance. Basically it tries to find a set of conversion values as close as possible to the defined ones while keeping all mole amounts non-negative.
Daniel
Problem is RESOLVED . Thanks!