cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Solving Cubic EOS

mnori
12-Amethyst

Solving Cubic EOS


Is possible by using a MathCAD function to solve cubic EOS with Cardano's Formula ? Is the Polyroot function based on numerical method ? What is polyroot default tollerance?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Massimiliano. You can try to translate into mathcad this:  http://www.egr.msu.edu/~lira/computer/EXCEL/PREOS.XLS

There also equate fugacitys to find the VLE points (with solver in excel, that's is stress.). I also use PR in mathcad, but using polyroots I have enough good numeric approximation, and (for me) don't needs Cardano formula.

Regards.

View solution in original post

8 REPLIES 8

May be so:

Card.png

StuartBruff
23-Emerald II
(To:mnori)

Massimiliano Nori wrote:


Is possible by using a MathCAD function to solve cubic EOS with Cardano's Formula ? Is the Polyroot function based on numerical method ? What is polyroot default tollerance?

What's the problem you're trying to solve and why do you want Cardano's formula (method?) specifically? 

If you're concerned about numerics then, as Valery showed, the symbolic processor will handle cubics.  Here's Prime's solution to the canonical cubic example ..

Stuart

mnori
12-Amethyst
(To:StuartBruff)


I would like to apply this method as alternative to Polyroot for calculating "Andrews bell" for the vapour-liquid equilibrium of elemental mercury. The volumetric cubic equation ( e.g. Peng-Robinson ) is coupled with the isofugacity condition.

Hi Massimiliano. You can try to translate into mathcad this:  http://www.egr.msu.edu/~lira/computer/EXCEL/PREOS.XLS

There also equate fugacitys to find the VLE points (with solver in excel, that's is stress.). I also use PR in mathcad, but using polyroots I have enough good numeric approximation, and (for me) don't needs Cardano formula.

Regards.

mnori
12-Amethyst
(To:AlvaroDíaz)

Hi Alvaro,

Thank your for your file. I translated it into MathCAD. Have you used polyroots also with non cubic EOS as CPA EOS or Caharnan-Sterling derived EOS?

Regards,

Here my PR sheet. It's easy to generalize this to the other two classical cubic EOS, but guess not those that you mentioning. For more complicated models I use hysys or refprop. Also for mixtures. This worksheet is just for teach how those software's finally implement EOS for simulations and solve Cengel and others books problems.

What is really pending in the attaching is a "correct" (in the practical sense, not theatrically) guess value for T for inverting, and find h(P,x), or s, or u. For h(T,x) the inversion looks ok, because Lee Kessler eq gives a good guess for P. And having T,P and x can found any other.

Notice that I use da/dT but there are explicit expression. Also it is not implemented Cp and Cv(T,P). Those others uses da^2/dT^2, and probably for those could be a a bad idea use mcad derivatives, instead of the explicit and precalculated ones.

Finally, there are a very good discussions in the forum about polyrrots, and the mcad code for your own polyroot by companion matrix. Cardano is good for excel, so you don't need to use the solver for the roots.

Attached is mc11 file, and can have a lot of problems in other versions. So, hope this helps.

PR.gif

The mc attach here.

pr2.gif

mnori
12-Amethyst
(To:AlvaroDíaz)

Thank you very much for your work and comments.

I have attached a mc 15.0 file with the Cardano Formula's.

The second file is a working in progress for a Caharnan- Starling derived EOS. The EOS solution is obtained through the use of Find in the solve Block.

Top Tags