1 Reply Latest reply on Aug 10, 2017 1:36 PM by tswift

    Creating the  BWRS equation of state in PI Performance Equation


      Hi All,

      I'm trying to import a calculation into PI PE.

      Has anyone ever tried to recreate the Benedict–Webb–Rubin (BWRS) equation of state in PI?

      I'm trying to get the BWRS density result.

      Benedict–Webb–Rubin equation - Wikipedia


      Best Regards,


        • Re: Creating the  BWRS equation of state in PI Performance Equation

          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!

          1 of 1 people found this helpful