SCRIPT OVERVIEW


 ITEM #PF-00  US$295.00

Crain’s Petro/Fusion Scripts comprise a set of log analysis algorithms based on Chapters 10 through 17 of Crain’s Petrophysical Handbook, online at www.spec200.net. They cover conventional and organic-rich oil, gas, and tar sand reservoirs. The key results are shale volume, effective porosity, lithology, water saturation, permeability, net pay, and mappable reservoir properties, as well as mechanical rock properties for stimulation design and seismic attribute analysis.

Crain’s Petro/Fusion Scripts are split into 9 modules for easy reading, but they can be attached end-to-end for a seamless single program. Code for both Metric and English units is provided. The “comment symbol” is used to inactivate code not needed for a particular run. It is open-source, so you can edit, add, or delete code at any time.

Crain’s Petro/Fusion Scripts
are written with the syntax used in GeoGraphix Prizm User Defined Equation language. With some careful find-and-replace commands, this code can be converted to Python or Java, or added to commercial software like PowerLog or any other package that supports user defined equations.

To use
Crain’s Petro/Fusion Scripts as user defined equations in commercial software, load the scripts, fix any syntax issues, declare variables as required, and test carefully.

To write your own program, you will need to do some or all of the following:
1. Declare data types as log curve or as single-valued parameter.
2. Create an equivalent to the “isNull(XXX[])” function used in these scripts.
3. Create parameter-value and logic-switch interface with defaults and definitions.
Go to  
www.spec2000.net/downloads/4metaesp.xlsx   to see an example executed in Excel. This spreadsheet is a working model with all the analysis models in Crain’s Petro/Fusion Scripts.
4. Parameters and logic switches apply to a single depth interval, eg. IntervalTop to IntervalBase. If you need different parameters or logic for another interval, you will need to create  a code overlay for interval zoning and an interface for that purpose.

Crain’s Petro/Fusion Scripts span the most common petrophysical analysis models but do not include LAS file input, output, or management, depth plot or crossplot support, or a run-time environment.

SCRIPT SAMPLE
Here is an example that illustrate the code used in
Crain’s Petro/Fusion Scripts .

; Gamma ray correction for hole size
;
IF (IsNull(GR[])==0 AND useGRcor = 1)
; MWT =  kg/m3 CAL = mm
   GRcor[] = GR[] * (1 + 0.000322 * (MWT - 1000)) * (1 + 0.0024 * (CAL[] - 203))
; MWT = lb/gao CAL = inch
;   GRcor[] = GR[] * (1 + 0.04 * (MWT - 8.3)) * (1.0 + 0.06 * (CAL - 8))
ELSE
   GRcor[] = GR[]
END IF
;
IF (IsNull(CGR[])==0 AND useGRcor = 1)
   GRcor[] = CGR[]
END IF
;
; Shale volume from gamma ray - linear model
;
IF (IsNull(GRcor[]==1) OR runVshg = 0)
   Vshg[] = 1
ELSE
   Vshg[] = min(1, max(0, (GRcor[] - GRcln) / (GRshl - GRcln))
END IF
;


SCRIPT CONTENTS
Crain’s Petro/Fusion Scripts – MODULE 01 – Data Housekeeping  CPH Chapter 7
   Creates DEMS from PHID when DENS is missing
   Create PHID_SS, PHID_LS[ PHID_DL if any are missing
   Create PHIN_SS, PHIN_LS, PHIN_DL if any are missing

Crain’s Petro/Fusion Scripts – MODULE 02 – Shale Volume  CPH Chapter 11
   Apply borehole corrections to GR - optional
   Calculate Vsh[] from 8 mpdels
      VSHmin  Vshg  Vshc  Vshx  Vshr  Vshs  Vshth  Vsh0
    Choose model for final Vsh

Crain’s Petro/Fusion Scripts – MODULE 03 – Effective Porosity  CPH Chapter 12
    Create bad hole flag and gas flag
    Calculate PHIe[] from 7 models
       PHIxnd   PHIxns  PHIdc   PHIsc   PHInc   PHINcpsc   PHInmr   PHImax[]
    Correct for gas and bad hole where needed
    Choose model for final PHIe

Crain’s Petro/Fusion Scripts
– MODULE 04 – Organic Rich Reservoirs  CPH Chapter 17
    Calculate TOC[] from 5 models (2 Issler  3 Passey)
       TOCIs   TOCId   TOCPs   TOCPd   TOCPn 
    Choose model for final TOC
    Convert TOC to Vkerogen
    Calculate kerogen and shale corrected PHIe
    Choose PHIe from this model or from Module 03.

Crain’s Petro/Fusion Scripts – MODULE 05 – Lithology  CPH Chapter 13
    Calculate DTCma, DENSma and Uma.
    Calculate Vmin1,Vmin2,Vmin3 from one of 5 models.
       PE_2min   DENSma_2min   DTCma_2min   Uma-DENSma_3min   PE-DTC-DENS_3min.
    Choose model for final Vmin
    Trigger coal, anhydrite, or salt, set Vmin4 = 1, Vsh, PHIe,Vmin1,2,3 = 0.

Crain’s Petro/Fusion Scripts – MODULE 06  – Water Saturation  CPH Chapters 5 and 14
    Calculate Tmpr, RWFT, RWa   
    Calculate water saturation from 3 models
       SWa  SWs  SWbkl
    Choose model for final Sw
    Calculate SWir, BVirr, BVhyd, BVwtr
    Special case for Tar Sand, with/wirhout midzone gas – optional
    Calculate BVtar, BVgas, BVwtr, TARwtfrac, WTRwtfrac

Crain’s Petro/Fusion Scripts – MODULE 07  – Permeability  CPH Chapter 15
    Calculate permeability from 4 models
       PERMwr  PERMxplt  oil, gas, water zones
       PERMtar  Kmax[] and Kv  special cases for tar sands
    Choose model for final Perm

Crain’s Petro/Fusion Scripts – MODULE 08  – Mappable Properties  CPH Chapter 16
    Create PAYflag[] - oil/gas or tar
    Calculate mappable properties NetH, PV, HPV, PermH
    Create Resflag[] - oil/gas/water
    Calculate mappable properties ResNetH,ResPV, ResPermH

Crain’s Petro/Fusion Scripts – MODULE 09  – Mechanical Properties  CPH Chapter 10
     Create
DTCsyn,  DTSsyn,  DENSsyn from petrophysical answers - optional
     Calculate DTCma, DTSma, DENSma

     Calculate SHRnod,  PRatio,  BULKmod,  BIOTconst,  Ymod[], BRTLindex for porous and non-porous cases
   
Calculate Po, Pp, Pclosure

YOU use thESE SOFTWARE SCRIPTS at your sole risk and responsibility. NO WARRANTY IS EXPRESSED OR IMPLIED. WE WILL NOT BE RESPONSIBLE FOR ANY LOSS OR CONSEQUENTIAL DAMAGES. TYPOS AND LOGIC ERRORS MAY EXIST.
 

Page Views ---- Since 15 Jul 2020
Copyright 1978 - 2020 E. R. Crain, P.Eng. All Rights Reserved