Cargocal.com - Customised Solutions For The Tanker IndustrySN's Oil Calculations (Premium) Add-in   (Oil Software)      

The Grey Background is a Watt-Reduction Theme.  Every milli-Watt counts.

 Reduce....>>  Reuse ...>> Recycle ...>> Rethink...>> Repair  

Home

Downloads

Definitions

Survey Documentation

 

 

 

 

Where to Advertise?

World Tourist Attractions

Best Place To Advertise

INDIA

Check Your DNA

Buy BigLoveAsia

ConceptsForum.com 

Universal Prayer

Link40.com - Connecting The Top 40, A Directory Service

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SN's Oil Calculations (Premium) Add-in

Pricing/Purchase

In addition to the functions available in the standard version  and advanced version,  the following functions are made available in the Premium version.

This will keep the file size small and give fast calculations. (See Calling .DLL Function vs. Visual Basic Worksheet Function)

Further, you can access and call the functions in multiple projects at the same time. However, a registered Dll has to be purchased for each machine it is being used on. Select the level from Standard, Advanced, Premium or Universal according to your need.

Extract the zipped file to "C:\Cargocal". Then from the Start-Run button, register the add-in by typing RegSvr32 "c:\cargocal\SNsPmOil.dll". Then from Excel, Tools-Addins, click on the 'Automation, button. Select SNsPmOil.PmOilCalc from the list or use the Browse button to the Cargocal folder and select the add-in SNsPmOil.dll   With the universal add-in, the name is SNsUOil.UOilCalc

The functions are -

(New) GasVolInTk(MeasPress As Double, TkTotalVol As Double, TkRatedPress As Double) As Double    ' if Pressures are in PSI and Volume is in CuFT then result is in CuFT.  If Pressures are in Bar and Volume in CBM, the result is in CBM.

(New) BTUtoKCal(BTU As Double, Optional RoundTo As Integer = 3) As Double

(New) BTUtoKJ(BTU As Double, Optional RoundTo As Integer = 3) As Double 

(New) MTLNGtoCFT(MT As Double, Optional RoundTo As Integer = 3) As Double         'LNG Liquid MT   to   Normal Liquid CFT

(New) MTLNGtoBBl(MT As Double, Optional RoundTo As Integer = 3) As Double         'LNG Liquid MT   to   Barrels Liquid

(New) MTLNGtoCM(MT As Double, Optional RoundTo As Integer = 3) As Double         'LNG Liquid MT   to   CBM Liquid

(New) MTLNGtoNCM(MT As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid MT to Normal CBM Gas

(New) MTLNGtoSCF(MT As Double, Optional RoundTo As Integer = 3) As Double         '  Liquid MT to SCF - Standard Cubic Feet gas

(New) MTLNGtoMMBTU(MT As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid MT to thermal unit

(New) MTLNGtoMMkCal(MT As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid MT to thermal unit

(New) MTLNGtoMMkJ(MT As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid MT to thermal unit

(New) BBlsLNGtoCFT(BBLs As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid BBLS to Normal CFT Liquid

(New) BBlsLNGtoMT(BBLs As Double, Optional RoundTo As Integer = 3) As Double         'Liquid BBLS to MT Liquid

(New) BBlsLNGtoCM(BBLs As Double, Optional RoundTo As Integer = 3) As Double         'Liquid BBLS to CBM Liquid

(New) BBlsLNGtoNCM(BBLs As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid BBLS to Normal CBM Gas

(New) BBlsLNGtoSCF(BBLs As Double, Optional RoundTo As Integer = 3) As Double         'Liquid BBLS to SCF - Standard Cubic Feet gas

(New) BBlsLNGtoMMBTU(BBLs As Double, Optional RoundTo As Integer = 3) As Double         'Liquid BBLS to thermal unit

(New) BBlsLNGtoMMkCal(BBLs As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid BBLS to thermal unit

(New) BBlsLNGtoMMkJ(BBLs As Double, Optional RoundTo As Integer = 3) As Double         ' Liquid BBLS to thermal unit

BBlsPerMT(APIDensity As Double,  Optional AD As String, Optional Tables As String = "54A" ) As Double    ' if API, pass 'A' in second parameter.  Example formula =BBlsPerMT(40,"A")  or BBlsPerMT(0.8247)  where 0.8247 is density.  Both Results =7.6408 Bbls per MT

CrudePriceMT(APIorDens As Double, CostPrUSBBl As Double, Optional AD As String = "API") As Double    ' if Density, pass 'd' in third parameter.  Example formula =CrudePriceMT(0.8494,47.5,"d")    or  if in API    =CrudePriceMT(35,47.5)     Result for both = 352.365

OOIP(TankSideLength As Double, PayHeight As Double, EffPorosity As Double, WaterSatur As Double, Optional FeetMetres As String = "F") As Double    ' Original Oil In Place - in Reservoir Barrels.  If dimensions in metres instead of feet, pass 'M' in last parameter.  Example formula = OOIP(125,12,0.152,1.125,"m")     = 29959.87  reservoir barrels

ShortTonFmMT(dblMT As Double, Optional RoundTo as Integer = 3) As Double                                 'If you want to round to other than 3 places of decimal, pass that value as integer in second parameter. Example   =ShortTonFmMT(1000.51, 2)  Result is 1102.87   By default the result would be 1102.873

MTFmShortTon(ShortTon As Double, Optional RoundTo as Integer = 3) As Double

AvPoundsFmMT(dblMT As Double, Optional RoundTo as Integer = 3) As Double                            'Get AvoirdupoisPounds from Metric Tonnes

MTFmAvPounds(AvoirdupoisPounds As Double, Optional RoundTo as Integer = 3) As Double

CBMToImpGal(CBM As Double, Optional RoundTo as Integer = 3) As Double                                'Get Imperial Gallons from Cubic Metres

ImpGalToCBM(ImperialGallons As Double, Optional RoundTo as Integer = 3) As Double

CBMToUSGal(CBM As Double, Optional RoundTo as Integer = 3) As Double

USGalToCBM(USGallons As Double, Optional RoundTo as Integer = 3) As Double

CBMToCuFeet(CBM As Double, Optional RoundTo as Integer = 3) As Double

CuFeetToCBM(CubicFeet As Double, Optional RoundTo as Integer = 3) As Double

kgSqCMtoBar(kgPerSqCM As Double, Optional RoundTo as Integer = 3) As Double

kgSqCMtoMPa(kgPerSqCM As Double, Optional RoundTo as Integer = 3) As Double

kgSqCMtoAtmos(kgPerSqCM As Double, Optional RoundTo as Integer = 3) As Double

kgSqCMtoTorr(kgPerSqCM As Double, Optional RoundTo as Integer = 3) As Double

kgSqCMtoPSI(kgPerSqCM As Double, Optional RoundTo as Integer = 3) As Double

HeelDeg(NetMoments As Double, Displacement As Double, GoM As Double) As Double

ListInDeg(PortDr As Double, StbdDr As Double, Beam As Double, Optional MF As String = "M") As Double   ' if drafts in feet, pass MF = "F"

IntpTrimListCorr(mTrim As Double, mUll As Double, TbCol1 As Range, TbCol2 As Range, Optional delta As Double = 1) As Double

'Pass the trim as double, measured ullage as double and two corresponding columns as ranges.

 

 

IntpTOV(CorrdUll As Double, TbUlg As Range, TbVol As Range) As Double

CrudeWaxPct(WtPct149 As Double, WxPct149 As Double, WtPct232 As Double, WxPct232 As Double, WtPct342 As Double, WxPct342 As Double, WtPct369 As Double, WxPct369 As Double) As Double

CrudeCloudPt(Wt149 As Double, CP149 As Double, Wt232 As Double, CP232 As Double, Wt342 As Double, CP342 As Double, Wt369 As Double, CP369 As Double) As Double   

ViscAtTemp(oVis As Double, TkTempC As Double, BFactor As Double, ResultTempC As Double) As Double  
BFactorFmVisc(oVis1 As Double, TkTempC1 As Double, oVis2 As Double, TkTempC2 As Double) As Double  

BlendVols(TkVols As Range) As Double    'This saves tank volumes, tank-wise, in program memory.  Computes percentage for each tank against total volume and stores this in memory for use by the following Blend functions.  Function returns the total of all tanks

BlendItem(TkItem As Range, TkVols As Range) As Double.  'Computes and returns the blended value for the selected range Item [example: API, Temp, Vanadium, etc]

BlendWeight(TkApi As Range, TkVol As Range) As Double    'Computes and returns the weight for single tank basis tank API and Volume

BlendVisc(TkVisc As Range, TkApi As Range, TkVols As Range) As Double    'Computes and returns the blend viscosity for all the tanks. The parameters to be passed to the function are: Ranges containing Viscosity, API and Volumes

BlendPourPt(TkPourPt As Range, TkVols As Range) As Double     'Computes and returns the blend Pour Point  for all the tanks. The parameters to be passed to the function are: Ranges containing Pour Point and Volumes

Trim & Stability

RoofCorr(Temp As Double, CF As String, APIorDens As Double, Tables As String, WtOfRoof As Double, Optional LiqType As String = "C") As Double

ShellCorr(Insu As Boolean, CF As String, AmbT As Double, TkT As Double, RefT As Double, TkType As Byte) As Double   'TkType is from 1 to 4,  where coeffs are -
Type 1 -  If CF = "F" Then TCoeff = 0.0000062  if 'C' Then  TCoeff = 0.0000112

Type 2 -  If CF = "F" Then TCoeff = 0.0000096   if 'C' Then  TCoeff = 0.0000173
Type 3 -  If CF = "F" Then TCoeff = 0.00000883   if 'C' Then  TCoeff = 0.0000159
Type 4 - If CF = "F" Then TCoeff = 0.000006   if 'C' Then  TCoeff = 0.0000108

NetMassOrWTFmGSV(GSVol As Double, Tables As String, APIorDens As Double, Temperature As Double, FWPct As Double, SedPct As Double, Optional MassOrWt As String = "M", Optional AD As String = "D", Optional CentFarh As String = "C", Optional FWType As String = "F") As Double

DensAtTankTemp(Table As String, APIorDens As Double, DegC As Double) As Double    ' A more comprehensive function to obtain density at tank temperature.

DensInAir(Dens As Double) As Double

PlaySound(FileName As String) As Integer         ' Plays the sound file once. example formula =IF(H14>2000000,PlaySound("c:\cargocal\Err.wav"),"")

DraftAtLPFwd(FwdDrafts As Range, AftDrafts As Range, FwdOffset As Double, AftOffset As Double, LBP As Double) As Double

DraftAtLPFwd(FwdDrafts As Range, AftDrafts As Range, FwdOffset As Double, AftOffset As Double, LBP As Double) As Double

DraftMeanOfMeans(FwdDrafts As Range, AftDrafts  As Range, FwdOffset As Double, AftOffset As Double, LBP As Double) As Double

AppString(JoinRange As Range, Optional Separator As String = "Zm^") As String                ' used in VBE or in the file

UnAppString(A() As String, PassedStr As String, Optional Separator As String = "Zm^")      ' used in VBE, pass an array.  The function will populate the passed array with the string split by the separator value.

RunFile(FilePath As String)                                                   'Open and Run any file.  Example =if(H1>20000,Runfile("c:\medJournal\cholesterol.pdf"),"")

GenRandomNum(Optional FromNum As Double = 0, Optional ToNum As Double = 10, Optional WholeNum As Boolean = False)As Double

GenInputBox(Prompt As String, OrigText As String, TitleBar As String,, Optional DataType As Integer = 1 + 2)    'Example =if(H1>20000,GenInputBox("Enter Last Overhaul run hours","0","Customised Solutions",8),"")  Note - valid datatypes are

value    Meaning          
0         a Formula
1         a Number                                                      Use sum of numbers for multiple data types

2         Text (a string)                                                Example: 2 + 4 for Text and logical.

4         A logical value (True or False)                           
8         A cell reference, as a Range object
16       An error value, such as #N/A
64       An array of values

OpenRunCMD(Prompt As String, Title As String)     'Shows a custom run command dialog box.

ShowPCClock() as String   'Shows the PC clock icon in the system tray, Opens the Date & Time Dialog Box.  Click on  Excel in the task bar to bring the D&T box to the front .  Example -  =if(H1+1<now(),showpcclock,"")

ShowControlPanel() As String                   'Example =if(H1>20000,ShowControlPanel(),"")

ShowRegSettings() As String                 'Example =if(H1>20000,ShowRegSettings(),"")  ' Region Settings

ShowDispSettings() As String                                                           ' ScreenSaver tab Example =if(H1>20000,ShowDispSettings(),"")

StartScreenSaver() As String                      'Example =if(H1>20000,StartScreenSaver(),"")

OpenExplorer() As String

OpenWebPage(Url As String)                      '  Opens passed web page url in default browser

RunOnTime(MacroName As String, AfterNSeconds As Long)                                            'Example = if(H1>20000,RunOnTime("TT",10),StopOnTime("TT",10,False))  Where TT is a name of a macro you have written.

StopOnTime(MacroName As String, AfterNSeconds As Long)                                          'Example = if(H1>20000,RunOnTime("TT",10),StopOnTime("TT",10,False))

Where TT is a name of a macro you have written.

LogE(dVal As Double) As Double        ' Natural Log

Some Derived Mathematical Functions -

Sec(dVal As Double) As Double
Cosec(dVal As Double) As Double
Cotan(dVal As Double) As Double
Arcsin(dVal As Double) As Double     'Inverse Sine
Arccos(dVal As Double) As Double     'Inverse CoSine
Arcsec(dVal As Double) As Double     ' Inverse Secant
Arccosec(dVal As Double) As Double     'Inverse Cosecant
Arccotan(dVal As Double) As Double     'Inverse CoTangent
HSin(dVal As Double) As Double     ' Hyperbolic Sine
HCos(dVal As Double) As Double     ' Hyperbolic CoSine
HTan(dVal As Double) As Double     ' Hyperbolic Tangent
HSec(dVal As Double) As Double     ' Hyperbolic Secant
HCosec(dVal As Double) As Double     ' Hyperbolic CoSecant
HCotan(dVal As Double) As Double     ' Hyperbolic CoTangent
HArcsin(dVal As Double) As Double     ' Hyperbolic ArcSine
HArccos(dVal As Double) As Double     ' Hyperbolic ArcCoSine
HArctan(dVal As Double) As Double     ' Hyperbolic ArcTangent
HArcsec(dVal As Double) As Double     ' Hyperbolic ArcSecant
HArccosec(dVal As Double) As Double     ' Hyperbolic ArcCoSecant
HArccotan(dVal As Double) As Double     'Inverse Hyperbolic Cotangent
LogN(dVal As Double, N As Double) As Double     'Logarithm of number dVal to base N

For sake of uniformity, temperature to be passed is in degrees Centigrade to all the functions and is automatically changed to Fahrenheit internally, if required.  (Unless either is allowed by the argument 'CF' as string).

Though most of the functions can be used by any application (not limited to MS Excel), some of the functions need data from an Excel range.  Therefore in the "Universal' addin, we have supplemented the list of functions which require ranges with the following, where the user will pass data in an array instead.

UAppString(JoinRange() As String, Optional Separator As String = "Zm^") As String
UDraftAtLPAft(FwdDrafts() As Double, AftDrafts() As Double, FwdOffset As Double, AftOffset As Double, LBP As Double) As Double
UDraftAtLPFwd(FwdDrafts() As Double, AftDrafts() As Double, FwdOffset As Double, AftOffset As Double, LBP As Double) As Double
UDraftMeanOfMeans(FwdDrafts() As Double, AftDrafts() As Double, FwdOffset As Double, AftOffset As Double, LBP As Double) As Double
UBlendVols(TkVols() As Double) As Double
UBlendItem(TkItem() As Double, TkVols() As Double) As Double
UBlendPourPt(TkPourPt() As Double, TkVols() As Double) As Double
UBlendVisc(TkVisc() As Double, TkApi() As Double, TkVols() As Double) As Double
UBlendWeight(TkApi As Double, TkVol As Double) As Double    'This is the same as BlendWeight as only single cells are involved
UIntpTrimListCorr(mTrim As Double, mUll As Double, TabCol1() As Double, TabCol2() As Double, Optional delta As Double = 1) As Double
UIntpTOV(CorrdUll As Double, TUll() As Double, TVol() As Double) As Double

STANDARD FUNCTIONS

ADVANCED FUNCTIONS
Users may send their queries to   for any clarification.

This project has a limit of 100 calculations and / or prevents printing with the unregistered copy.  With 100 calculations, the user can test the usefulness of this add-in substantially for a tank or two.  To get the registered version, click on the button below to purchase via secure transactions and send us by e-mail the file "licSNOilPCID.pvf" generated by the project (you may find this file in 'C:\Cargocal\DllP) or if not found, send us the Product ID. .  We will send you the release code file by return e-mail.

Individual PC Licence - Select Version

 Experiencing Problems with PayPal? Contact us for Bank to Bank transfer details

or  Buy The Source Code - Enable you to create your own VBE Code or Add-ins - Click on 'Pay Now' button below.

Select Source Code Version

 Experiencing Problems with PayPal? Contact us for Bank to Bank transfer details

Home 

Home                 Ullage Reports           VEF Reports           Work Rest Hours                        << Top >>

Bunker Reports

Make your own spreadsheets or standalone projects.  Download the oil calculations add-in dll(s) with all the functions you need for the tanker industry.

Can't find' Do a custom search here   

                  Contact Us       

ęCopyright Sovereign Newzealand« 1999-2013                      Terms & Conditions / Privacy Statement

Advertise With Us