View Full Version : Scaling silo contents to kg using hydrostatic sensor

DairyBoy

March 25th, 2017, 06:56 AM

I'm having a brain-glitch in trying to display the liquid contents of a silo in kg.

There is a 0-1 bar sensor at the base of the silo. The silo has a conical base. The product has a specific gravity of 1.2.

I've used my tried and trusted function block for the silo volume in litres and added a stage at the beginning and end to correct for the SG of the product. If the silo was a plain vertical cylinder I'd just multiply the final result by the SG to give me kg but as there's a conical base I figured that for a SG other than 1 the sensed height of the product would be incorrect which would affect the calculation for the conical stage and the cone/cylinder interface dimension.

So, I've compensated for the SG at the beginning by using "input level*(1/SG)", then done the volume calc for the whole silo and then I've multiplied the resulting volume (in litres) by the SG to give kg. And it comes out wrong. (Of course, you all say).

Please share your knowledge with someone who's thought long and hard (although apparently not enough) but is still unable to see the wood for the trees. Thank you.

Steve Bailey

March 25th, 2017, 09:09 AM

The key is correctly calculating volume. For the cylindrical portion of the tank, the formula is PI * R^2 * H where R is the radius of the tank and H is the height above the base of the cylinder (not the height above the pressure sensor).

The same formula works for the conical portion, but R varies with the height by the relationship R = H * Tan(x) where x is the angle the wall of the cone makes with the vertical. Also, H is the distance above the pointed end of the cone. Be sure to correct for that if the pressure sensor is not located at that location.

When the liquid height is in the conical portion you only need to use the formula for that portion of the tank. Once the level gets into the cylindrical portion you use the formula for that and add the value for the full conical portion. Once you correctly calculate the volume in liters multiply by the specific gravity to get the weight in kilograms.

danw

March 25th, 2017, 09:59 AM

You don't mention using mH2O or mmH2O pressure units.

1.00 bar = 10197mmwc (water column)

Level measurement should be in water column units (or converted to water column units) which then converts to physical level by dividing by SG.

calculate level = Pressure mmwc/SG.

Convert to volume: cylinder + conical dish. Convert to mass by multiplying by 1.2 (SG)

I figured that for a SG other than 1 the sensed height of the product would be incorrect which would affect the calculation for the conical stage and the cone/cylinder interface dimension.

Not True. Hydrostatic head pressure sensing provides the correct level measurement regardless of the shape of the vessel.

Steve Bailey

March 25th, 2017, 11:50 AM

I misspoke in my earlier post. The volume of the conical section is (PI * R^2 * H)/3.

Diameter157

March 25th, 2017, 01:11 PM

hydrostatic pressure: p = density(rho) * g * h

p = Pascal (1bar = 100000Pascal)

rho = being in kg/l (1.2)

g = specific gravity (~9.81 N/kg depending on geographical location)

h = height in meters

So first convert the pressure in bars to pascal then to a height in meters of the fluid.

h=p/(g*rho)

Next convert the height in meters to the volume of the fluid.

Assuming the sensor is at the very bottom of the cone,...

We have 2 situations, either we are in the cone part at the bottom or we are above the cone part.

first calculate pi and the Surface area of the the circle

pi=4*arctan(1)

S=Dē*pi/4

with D= diameter of cylinder

if h < h_cone

then V=h*S/3

else V=h_cone*S/3+(h-h_cone)*S

Now you have the volume you can times it by the density to get the weight or you could just not divide it by the density in the first step.

If it is for Siemens, I have the code somewhere in ladder and also in scl.

DairyBoy

March 26th, 2017, 09:48 AM

Thank you for your answers. I used the phrase "tried & trusted" because I know that the cone/cyl calculation is good.

There are many ways of being dumb and here's mine: I was simulating the sensor input with a substitute tag. For SG=1 all was fine. But when I changed the SG I neglected to change the simulated sensor input (*1.2) so the calculation was still being performed on a simulated height value based on water. :o:

DanW, re "not true", I know what you are saying but if the input value is not converted to water equivalent at the outset then for the cone section the the perceived height will be incorrect for SG other than 1 and this will affect the result of the cone section calculation. Had it been a cylinder all the way I wouldn't do anything as it's a hydrostatic sensor and the multiplication is implicit, so calculated litres is already *1.2

Diameter157

March 26th, 2017, 01:17 PM

You should be able to convert the pressure in bars to a weight(mass) in kgs without inputting the specific gravity (rho).

If your liquid weighs twice as much, it will cause twice as much pressure.

I would suggest making a new function block for converting pressure to kgs instead of reusing your litres one and building on top of it, especially for clarity when someone else looks at the code.

.