CalebBell / thermo

Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)
MIT License
594 stars 114 forks source link

Add the Schmidt-Wenzel EOS #29

Closed alexchandel closed 3 years ago

alexchandel commented 4 years ago

Ignoring alpha functions, this library has 3 EOS templates, VDW, RK, and PR.

The Schmidt-Wenzel equation of state improves on the fixed-Zc van der Waals, (Soave-)Redlich-Kwong, and Peng-Robinson equations, by allowing Zc to vary with Pitzer's ω. It has superior behavior near the critical point for all ω, and generally superior Tr behavior when customized with a modern alpha function.

To calculate only requires one additional step: the calculation of the molecule's β (reduced hard-ball volume) from ω, using the relation "(6ω+1)β³ + 3 β² + 3 β - 1 = 0", easily done via a cubic formula (note the root changes at (-1 + 2√2 / 3) & -1/6). From that follow the intermediate values "ζc = 1/(3 (1 + β ω)), Ωa = (1 - ζc(1 - β))³, Ωb = β ζc", and calculation proceeds as usual.

Note that SW reduces to (S)RK when ω = 0, and almost becomes PR when ω = 1/3.

Please add the Schmidt-Wenzel EOS.

CalebBell commented 4 years ago

Hi Alex, Adding an equation of state is pretty involved and counts on a whole lot of things being correct about the implementation.

For higher accuracy, Helmholtz models as implemented in CoolProp are recommended; for multicomponent mixtures, the PR and family are the recommended models because they can still be relatively fast with many components. I am not sure how this EOS works with mixtures.

alexchandel commented 4 years ago

Schmidt-Wenzel is technically a small modification of SRK / PR, and thus its implementation will appear very similar. It's also as fast as PR, but with greater accuracy.

The SW EOS supports the same range of mixing rules & combining rules (van der Waals, Wang-Sandler, Huron-Vidal, etc) as VDW, PR, & SRK. Like alpha functions, these aren't specific to an EOS.

CalebBell commented 3 years ago

Hi Alex, You have posted quite a few times and helped several users. Thank you for that. I have released a new, comprehensive redesign of the library with a new interface that should avoid some of the fundamental issues that were previously present.

It's not realistic to do all the fixes and features all the time. If you are still interested in this feature though, I can provide advice and help for you to develop it. Sincerely, Caleb