I am wishing to setup (eventually as a server value, but for now in processbook) a simple tank accumulator.
Lets say I have a lube oil tank and I am concerned with sulphur. If I was doing this in excel, it would look something like this:
Volume of tank (1000m3 A) at Sulphur (B) of 5 ppm receives a volume (C) of 500m3 with a sulphur (D) of 22 ppm in one hour. (Each bolded letter is a separate pi tag)
In excel, the resulting tank has a volume of 1500 cubes with a sulphur of 10.66
This is calculated by:
((1000x5)+(500*22))/(1000+500) = ((5000)+(11000))/1500 = 10.66
You can then rinse and repeat
But how would i do this in PI? Also this is most likely better run every minute as the flow will often change as will the sulphur content.