[PATCH] Fix up SAC calculations for ATM/bar confusion

Jukka jukka.lind at kolumbus.fi
Sun Feb 24 13:17:42 PST 2013


On 24.02.2013 20:23, Linus Torvalds wrote:
> ....
>
>    Note that Poltsi reported differences larger than the difference of
>    BAR/ATM, so this is not the cause. I'll continue to look at this. ]
>
I have noticed something which surely distords SAC-calculation when 
using 300 bar tanks. Subsurface is not taking into account the air 
unlinear compressibility above 270 bar.

Function bar_comp = -0.0007*bar*bar + 1.109*bar + 0.8
would work from 250 to 300 bar very well (= close to wikipedia's table 
at temp 27 C)
where bar == pressure in bar  and  bar_comp == the pressure which will 
give correct air surface volume when multiplied with tank volume and 
divided with SURFACE_PRESSURE.

Should the compressibility factor be counted in to_ATM (and not in 
calculate_airuse or calculate_sac) ? To me the excessive calculation 
between cuft, bar, L, atm, mbar seems confusing. Is it really necessary 
? If we put the factor to to_ATM shall we fix or break everything ?

Jukka
(I know it's easy for me to tell other how to do it and NOT SENDING ANY 
PATCH..)



More information about the subsurface mailing list