HomeLatest ThreadsGreatest ThreadsForums & GroupsMy SubscriptionsMy Posts
DU Home » Latest Threads » Forums & Groups » Topics » Science » Science (Group) » Nice review of the Peng R...

Sat Jun 4, 2016, 09:30 AM

Nice review of the Peng Robinson alpha functions just published.

This past Christmas I bought my kid Mathematica Student Edition and have been playing, as I did through much of his and his brother's childhood, with his "toy."

I've been very interested in recent years in high temperature - one might say "explosive" - reformation reactions driven by oxidation in supercritical water.

The Peng-Robinson equation, a cubic equation, is of some relevance in the thermodynamics of this situation. It's one of the "simplified" cubic equations of state, but, um, it's not actually simplified, and contains a number of parameters involved with the reduced temerature.

Last night, in the "ASAP" section of one of my favorite journals Industrial Chemistry and Engineering Research I came across this very nice review of the forms of the "α" in that equation, and it's quite nice and informative.

Here it is: Comparison of 20 Alpha Functions Applied in the Peng–Robinson Equation of State for Vapor Pressure Estimation.

Esoteric, but very cool.

I think I'll spend much of the weekend playing with my kid's toy. Mathematica is a very cool program, but I never really used it, and it's a great way to learn it. I haven't programmed much in 20 or 30 years, but life is wonderful, if short.

5 replies, 3690 views

Reply to this thread

Back to top Alert abuse

Always highlight: 10 newest replies | Replies posted after I mark a forum
Replies to this discussion thread
Arrow 5 replies Author Time Post
Reply Nice review of the Peng Robinson alpha functions just published. (Original post)
NNadir Jun 2016 OP
hunter Jun 2016 #1
NNadir Jun 2016 #2
Jim__ Jun 2016 #3
NNadir Jun 2016 #4
NNadir Jun 2016 #5

Response to NNadir (Original post)

Sat Jun 4, 2016, 05:31 PM

1. Peng Robinson alpha functions are not my idea of recreation...

... but to put it in layman's terms (or at least any layman with a high school physics level of education...) is it fair to say these are an elaboration of the familiar gas equation pV=nRT useful when materials stop behaving ideally?

The ideal gas law is something every high school student ought to know... sigh.

I've played a little with Mathematica on my Raspberry Pi 2. It's free. It's slow. (It ought to be not-so-slow on the new Pi 3.)

http://www.wolfram.com/raspberry-pi

If anyone wants to learn programming these days then Javascript and HTML5 are the way to go. I offered my kids the same advice when they were in high school, even before Google won the browser wars and Adobe Flash was deprecated, but my children decided to be English majors, not computer programmers or scientists. Even so, I'll bet they recognize the ideal gas equation.

My first college computer programming class was Fortran. We wrote our programs on graph paper or special programming forms, then we punched our cards, put a rubber band around them, and left them in the box for processing overnight.



https://en.wikipedia.org/wiki/Keypunch

In the morning we'd fix the single mistake that had halted the compiler (or more embarrassingly, fix whatever was wrong with our JCL cards) and try again.

If I wanted to I could still write programs in Fortran and convert them almost magically to Javascript using tools such as Emscripten. Images of my old MSDOS machines run perfectly well on emulators that are written entirely in Javascript and run on ARM architectures. That amuses me. I've got programs I wrote in Turbo-Pascal and 8086 assembly that run faster on my cheap Chromebook than they ever did on the original machines.

Yep, life is wonderful.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to hunter (Reply #1)

Sat Jun 4, 2016, 06:12 PM

2. Yes, it evolved from the ideal gas law. In the 19th century, people recognized that...

...the ideal gas law predicted that has the temperature approached zero, the volume would approach zero. This, and the experimental fact that the law was useful only as a first approximation lead to a famous refinement, the van der Waals equation:



This is, in fact, a cubic equation. It includes a term treating molecules as perfect spheres with fixed volume, as well as a term for the attractive force between molecules which are known, to this day, as "van der Waal's forces" I once wrote an HP41C program to solve it in terms of moles of gas as a function of pressure when I was doing a hydrogenation back when I was a student. The simplest way to have solved the equation would have been to use Newton's method for solving equations, but I knew there was an exact root equation, since Galois proved that cubic equations were the highest order of equations that could be solved by roots. But since I'm hardly Galois, I had no idea what that root equation was, but I tracked it down in the 1943 edition of the Handbook of Chemistry and Physics and spent a day or two getting the HP41C program to solve it debugged.

It worked OK for the hydrogenations, close enough for organic chemistry anyway. It was a waste of time to do this, by the way, but it I did it for fun and to satisfy a certain neuroses

The Peng Robinson equation was a huge refinement of previous refinements of the van der Waals equation, notably the Redlich-Kwong (RK) equation introduced in the 1940's and the Souave Redlich Kwong equation, a further refinement introduced in the early 1970's. The Peng Robinson paper was published in 1976. It is one of the most cited papers in chemistry; Google Scholar lists close to 8,000 citations.

Here is the equation:



There are Peng Robinson solvers all over the internet, and of course, commercial software to do it as well. But they're no fun. Also it's not clear that one can easily program in alternate functions, like those listed in the paper cited in the OP.

The Peng Robinson equation usually uses "the reduced" temperatures and pressures, which is the ratio, with the thermodynamic temperature scale used, between the lab temperature and the critical temperature, in the case of temperature, and ratio of the system pressure and the critical pressure.

Mathematica, by the way, spits out the root solution formula for cubic equation in algebraic format in less than a second, significantly less than a second. It is easy to assign values to the equation's terms and get a numerical solution for both the real and the two imaginary roots. (I programmed to HP41C to give the imaginary roots as well, something a Newtonian solution doesn't give.)

It's great fun.

I'm sure this is more than you wanted to know, but I hope you enjoyed it anyway.



Reply to this post

Back to top Alert abuse Link here Permalink


Response to NNadir (Reply #2)

Sun Jun 5, 2016, 11:08 AM

3. Just a note, quartic equations can be solved by radicals.

Galois showed why quintic equations and above could not generally be solved by radicals.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to Jim__ (Reply #3)

Sun Jun 5, 2016, 11:54 AM

4. Thanks Jim, for the correction.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to Jim__ (Reply #3)

Sun Jun 5, 2016, 12:54 PM

5. Further to your correction, I ran the solution in Mathematica.

It spit out the algebraic form of the solution.

That's a nasty set of radicals.

Thanks again.

Reply to this post

Back to top Alert abuse Link here Permalink

Reply to this thread