3 Replies Latest reply on Sep 6, 2017 1:13 PM by Dan Fishman

    Creating the  BWRS equation of state in PI Performance Equation

    mchaaya

      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,

      Michel.

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

          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!

          2 of 2 people found this helpful
          • Re: Creating the  BWRS equation of state in PI Performance Equation
            Roger Palmen

            I have built similar logic in AF Analysis before, so agree with Dallas that that is the way i would go. But theoretically PE could do the same, it's just a lot harder!

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

              Similar to what Dallas Swift mentioned, I would consider data access technologies.  We have many customers using our calculation engine Edict to solve similar problems.