1 of 1 people found this helpful
Interesting question! Just out of curiosity, how will you use this EoS? It seems like it would be useful for calculating pressure given temperature, molar density, and mole fraction of compounds but I would think pressure is easier to measure directly than mole fraction or molar density.
How many different compounds are in the mixture? AF analyses (I would stay away from PE for this problem) can't do FOR loops, so the summation terms will be the hardest part. Assuming that you use AF, I can see two options to get this working: (1) configure a new attribute for every term in the summations then make a rollup or (2) hard code the summations in the analysis itself. This wouldn't be too bad if there are only 1 or 2 compounds (if j>=i then 1 compound = 11 terms, 2 compounds = 26 terms). Any more than that and you start to run into a combinatorial problem, particularly with the A0, C0, D0, and E0 terms (3 compounds = 45 terms, 4 compounds = 68 terms, etc.).
You might be better off using one of our data access technologies (AFSDK, PI OLEDB, PI Web API) to read values into a custom application that runs the calculation.
I hope that helps!