Updates for OilCalcs, OilCalcsHD and Oil Calculator Pro released

Today an update was released for OilCalcs and OilCalcsHD, for the iPhone and iPad.

For Oil Calculator Pro (for Android) the same update was released a few days ago.

The update achieves the following:

- 1. Fixes a bug in table 6, 54 and 60 (1980 versions) where odd densities were sometimes rounded up to the nearest even density instead of rounded down.

- 2. Implements the special application tables 6C, 54C and 60C, 1980 version. The 2004 version of all special application tables was implemented in an earlier release.

The reason for maintaining the 1980 version for all tables is that there are quite a few countries that have not adopted the 2004 version of the ASTM tables. As per API guidelines, legally there is no obligation to adopt the latest standards, as long as all parties involved in transactions agree upon the standard to be used.

For downloads, please see the provided links here under:

 

download in the appstore   OilcalcsHD for iPad version 1.1.1 can be downloaded here.

download in the appstore   Oilcalcs for iPhone version 1.1.3 can be downloaded here.

Get it on Google Play    The latest version of Oil Calculator Pro can be downloaded here.

OilcalcsHD for iPad version 1.1.0 – Volumetric shrinkage added to blending tools

Oilcalcs HD for iPad has been updated to version 1.1.0 today, and now includes volumetric shrinkage calculations in the two fuel blending tools, just like its iPhone counterpart Oilcalcs and its Android counterpart OilCalcsPro.

As mentioned in a previous post for the Android app, both blending tools now include formulas from API MPMS Chapter 12.3 to calculate volumetric shrinkage as a result of mixing hydrocarbons.

In the new version, both blending tools include shrinkage calculation and in the “Fuel blend two components” tool the actual shrinkage is displayed in the results:

Updated blending tools with shrinkage calculation

Updated blending tools with shrinkage calculation

For more information regarding volumetric shrinkage, please refer to our post “API MPMS Ch 12.3 – Volumetric shrinkage when mixing hydro carbons” which explains the theory behind shrinkage as well as the formulas used.

The user manual for the iPad version of Oilcalcs is currently being compiled. It will be available for free download in the tab “User Manuals for oil calculators”, just like the iPhone and Android versions of the manual which are already available online.

download in the appstore   OilcalcsHD for iPad version 1.1.0 can be downloaded here.

Oilcalcs for iPhone version 1.1.2 – Volumetric shrinkage added to blending tools

Oilcalcs for iPhone has been updated to version 1.1.2 today, and now includes volumetric shrinkage calculations in the two fuel blending tools, just like its Android counterpart, OilCalcsPro.

As mentioned in a previous post for the Android app, both blending tools now include formulas from API MPMS Chapter 12.3 to calculate volumetric shrinkage as a result of mixing hydrocarbons.

Next in line for updating is OilcalcsHD, the iPad version of Oilcalcs, which will hopefully be ready towards the end of this month (end of June).

Once the update for OilcalcsHD has been released we will also publish the user manuals for the iPhone and iPad version of Oilcalcs. They will be available for free download in the tab “User Manuals for oil calculators”, just like the Android version manual which is already available online.

download in the appstore   Oilcalcs for iPhone version 1.1.2 can be downloaded here.

API MPMS Ch 12.3 – Volumetric shrinkage when mixing hydro carbons

In my previous post I promised to discuss API MPMS Chapter 12.3 – Volumetric shrinkage resulting from blending light hydrocarbons with crude oils.

As mentioned in the earlier post, whenever two hydrocarbons of different density are mixed, it can be observed that the resulting total volume is not equal to the sum of the two individual components.

Depending on the properties of the two constituents, the total volume could be either smaller, or larger than the sum of the two constituents, although generally when mixing fuel oils or fuel oil and crude oil, the tendency seems to be a positive shrinkage.

Following extensive research, API published Chapter 12.3 in 1996, as an improvement to API bulletin 2509C. Compared to bulletin 2509C the new chapter 12.3 has both a bigger density range and a larger mixing ratio range. Also the empirical formulas have been adjusted to fit a larger set of data and are consequently a lot more accurate across the full ranges.

Two formulas have been developed for calculating the shrinkage, one for SI Metric Units and one for Imperial Units:

For SI Metric Units the following formula is used:

S = 2.69 * 10^4 * C * (100 – C)^0.819 * (1/dL – 1/dH)^2.28

where

S = volumetric shrinkage as percentage of the total mixture ideal volume

C = concentration in liquid volume percent of lighter component

dL = density of light component

dH =  density of heavy component

 

For Imperial Units the following formula is used:

S = 4.86 * 10^-8 * C * (100 – C)^0.819 * G^2.28

where

S = volumetric shrinkage as percentage of the total mixture ideal volume

C = concentration in liquid volume percent of lighter component

G = difference in API gravity of light and heavy component

To give an example for both Units:

SI Metric Units:

Blend 6,000 M³ of crude with a density of 824.0 kg/M³ with 300 M³ of natural gasoline with a density of 651.0 kg/M³

The concentration C of the light component is:

     300 / (300 + 6000) = 4.76%

The shrinkage will be:

      S = 2.69 * 10^4 * 4.76 * (100 – 4.76)^0.819 * (1/651 – 1/824)^2.28 =0.0585%

Therefore the total actual volume will be:

      6,300 * (1 – 0.000585) = 6,296.31 M³

The average density of the mix will be:

      (6,000 * 824 + 300 * 651) / 6,296.31 = 816.2 kg/M³

whereas the theoretical mix density would have been:

      (6,000 * 824 + 300 * 651) / 6,300 = 815.8 kg/M³

Imperial Units:

Blend 120,000 Bbls of RMG fuel with an API gravity of 15.2° with 60,000 Bbls of crude with an API gravity of 45°

The concentration C of the light component is:

     60,000 / (60,000 + 120,000) = 33.3%

The shrinkage will be:

      S = 4.86 * 10^-8 * 33.3 * (100 – 33.3)^0.819 * (45 – 15.2) ^2.28 = 0.116%

Therefore the total actual volume will be:

      180,000 * (1 – 0.00116) = 179,791.2 Bbls

The average API gravity of the mix cannot be established simply using the two API gravities. They must be converted first to densities, and the final density can then be reconverted to API gravity.

The average density will be:

      (120,000 * 964 + 60,000 * 801.3) / 179,791.2 = 910.8

whereas the theoretical mix density would have been:

      (120,000 * 964 + 60,000 * 801.3) / 180,000 = 909.8

Consequently the average API gravity will be: 23.8 °

Whereas the theoretical API gravity would have been: 23.9 °

From the last example it is obvious that the influence of mixing with a lighter component can be considerable. In this example, a 33.3% mix resulted in a volumetric loss of 0.116%. As can be seen from the formulas, the higher the difference in API gravity or density, the higher the loss of volume.

If you would apply this to a situation where an oil tanker discharges 120,000 M³ fuel oil into shore tanks that contain 60,000 M³ of crude oil (using the API gravities from the example above), this 0.116% loss means an actual volume loss of 208 M³.

The volumetric loss is obviously compensated by the increase in density but normally in cases like this the density of the mix will be established by sample testing, meaning that a considerable loss in weight can occur depending on the outcome of the density testing.

The above calculations can all be verified on Oil Calculator Pro for Android, as well as with Oilcalcs for iPhone.

The updated version of Oilcalcs and OilcalcsHD for iPhone and iPad will also have this feature added to the blending tools, but the update has not yet been released.

We are currently working hard to push the update out to the Appstore, and will let you know once it has been released.

 

Get it on Google Play    The latest version of Oil Calculator Pro can be downloaded here.

download in the appstore   Oilcalcs for iPhone version 1.1.2 can be downloaded here.

Oil Calculator Pro for Android – volumetric shrinkage calculation added

An update has been released for Oil Calculator Pro for Android, which now is on version 1.0.4

The updated addresses several bugfixes in the quantity record editor, as well as a bug in the LPG density calculator.

Also in this update volumetric shrinkage calculation as per API MPMS Chapter 12.3 has been added to the two blending utilities.

It is a well known phenomenon when mixing hydro carbons of different density, that the total volume after mixing is not the same as the sum of the two components.

Depending on the properties of the two components the total volume can be either more or less than the sum of the two components, although when mixing fuel oils or fuel oil with crude oil, in most cases there will be a reduction in total volume rather than an increase.

API started collecting data concerning shrinkage of oil volumes as the result of mixing in the 1950s, and the first API paper that concerned itself with shrinkage and the definition of empirical formulas to calculate shrinkage, Publication 2509C, was published in 1962.

In subsequent years it became apparent that the formulas as defined in publication 2509C were not sufficient to cover the entire range of hydro carbons that are nowadays blended, and eventually API arranged for one more study to be conducted that ultimately led to the publication of API MPS Chapter 12.3 in 1996.

A separate blog post will be dedicated to a more indepth discussion of API MPMS Chapter 12.3 and its use. For now let it suffice to say that Oil Calculator Pro for Android uses the formulas as defined in  API MPMS Chapter 12.3.

It is worth noting that while many articles that discuss shrinkage, focus on the phenomenon of shrinkage when blending fuel oil with crude oil. The same principles however apply when mixing fuel oils with different densities.

Although lubrication oils are equally subject to the shrinkage phenomenon, API MPMS Chapter 12.3 does not apply to lubrication oils, and the formulas can therefore not be applied.

A study was carried out in 2011 by J. Shansool et al, titled “Volumetric behaviour of mixtures of different oil stocks”, that sheds a bit more light on the behavior of lubrication oils. The white paper is available online in this link.

Get it on Google Play    The latest version of Oil Calculator Pro can be downloaded here.

Oil Calculator Pro for Android – one more important update

On 6th May 2014 we published an update to Oil Calculator Pro for Android that fixed a variety of bugs.

Today we have released one more update, that addresses the bugs which make the app crash when using European and certain other keyboards, such as Dutch, Danish, Vietnamese and several others.

These keyboards use a comma instead of a dot for decimal numbers and because Android itself contains a bug within its localization features, it is a bit of a nightmare for us developers to swerve around the bumps in the road when it comes to dealing with localization.

The latest fix ensures that even if the user has a European keyboard and enters commas in places where the app is expecting a dot, internally the comma is replaced with a dot.

For users from the US and Asia (except Vietnam and Indonesia) there will be no visible change with this update.

All users from Europe (except UK), Indonesia and some African countries (Nigeria, Cameroon) are advised to update to version 1.0.3 as soon as possible.

 

 

Get it on Google Play

 

 

ASTM Petroleum table 54 version 2004 and its implementation – Part 2

This article discusses the implementation methods for ASTM Petroleum table 54 C as per API MPMS Chapter 11.1 version 2004/2007.

In my previous post we talked about the implementation method used to calculate the CTPL (correction for temperature and pressure on a liquid) using table 54, for products, crude oil and lubrication oils.

I briefly mentioned table 54C, but since the implementation method for table 54C differs slightly from its counterparts for table A, B and D and the article was already lengthy enough, I thought it a good idea to cover table C separately.

Recapitulating from the previous post we saw that for table 54 the following inputs are required:

- commodity group A, B or D (if a pre-calculated thermal expansion coefficient α60 is not given)

- α60 (if commodity group A, B or D is not given)

- observed temperature and base temperature °C

- density at 15 °C (if we need not only CTL but also CPL)

- alternate pressure

The implementation then returns as output:

 – the combined correction factor for temperature and pressure (CTPL)

- the scaled compressibility factor (Fp)

In other words, for table 54C we use as input α60, observed temperature, density 15 °C, alternate pressure and base temperature (which is 15 °C).

With the above information the  CTL can very quickly be calculated if that is all what is required. The iteration process that was described in the previous post is used to establish the density at 60 °F corresponding to the input density 15 °C, but for calculating only the CTL if α60 is given we do not need this.

If both CTL and CPL are required then the entire process as described in the previous post must be completed, the difference being that instead of calculating α60 using K0, K1 and K2 based on the commodity group, we simply use the value given.

The CTL then follows from the formula as given previously:

CTL = exp(-α * tDiff * [1 + 0.8 * α * (tDiff + 0.01374979547)])

This means also that if we do need the compressibility factor as well, we need to supply a density 15 °C, and instead of calculating α60 during the iteration process, we use the α60 as supplied initially, and go through the iteration process as described.

Let us take an example from the protocol for producing table 54C as described in APIMPMS 11.1.8.24:

α60 = 0.0009005 /°F (= 0.000500222 /°C)

observed temperature = 35.25 °C

tau = observed temperature T(Celsius) / 630: 35.25/630 = 0.055952380952381

delta = (a1+(a2+(a3+(a4+(a5+(a6+(a7+a8*tau)tau)tau)tau)tau)tau)tau)tau: -0.008961120743

with the factors a1…a8 given as:

a1 = -0.148759

a2 = -0.267408

a3 = 1.080760

a4 = 1.269056

a5 = -4.089591

a6 = -1.871251

a7 = 7.438081

a8 = -3.536296

The resulting IPTS68 temperature T68 is then:

T68,C = T90 – delta : 35.25 - (-0.008961120743) = 35.258961120743

T68,F = T68  * 1.8 + 32:

T68,F = 35.258961120743* 1.8 + 32 = 95.466130017337

tDiff = T68,F – 60.0068749:

tDiff = 95.466130017337 60.0068749 = 35.459255117337

Using tDiff and α60, we can now calculate a CTL:

CTL = exp(-α * tDiff * [1 + 0.8 * α * (tDiff + 0.013749795470)]):

CTL (observed temperature) = 0.982171549176

Now correct to base temperature:

tau = base temperature T(Celsius) / 630: 15/630 = 0.0238095238095238

delta = (a1+(a2+(a3+(a4+(a5+(a6+(a7+a8*tau)tau)tau)tau)tau)tau)tau)tau: -0.00367850903840073

T68,C = T90 – delta : 15 - (-0.00367850903840073) = 15.003678509038 

T68,F = 15.003678509038  * 1.8 + 32 = 59.006621316269

tDiff = T68,F – 60.0068749:

tDiff = 59.006621316269 – 60.0068749 = -1.000253583731

Using tDiff and α, we can now calculate the CTL corrected for the base temperature  15 °C:

final CTL = CTL (observed temperature) / (exp(-α * tDiff * [1 + 0.8 * α * (tDiff + 0.01374979547)]))

final CTL = 0.982171549176 / (exp(-α * tDiff * [1 + 0.8 * α * (tDiff + 0.01374979547)]))

final CTL = 0.981680247250

final CTL (rounded) = 0.98168

This corresponds with the value as per sample tables produced by API.

That brings us to the end of this blog post! If you would like to know a bit more about the ‘Special Applications’, else where in this blog is an article called “The use of ASTM table 6/24/54/60 C with special applications”, that explains a bit more about practical calculations using the thermal expansion coefficient α.

As always, we value your comments and ideas so please leave a message at the end of this blog, or email us if you have questions, queries or criticism!

Finally, the calculations shown here can be verified using Oilcalcs for iPhone /Oilcalcs HD for iPad which can be downloaded here:

download in the appstore   Oilcalcs for iPhone

download in the appstore   Oilcalcs HD for iPad

Alternatively Oil Calculator Pro is also perfectly suited for this and is available for download in the Google Play Store:

Get it on Google Play Oil Calculator Pro