#---------------------------------------------------------------- # Oil Initially In Place # Monte Carlo simulation for estimating geologic oil reserves... # KOSOVA Robert, SHEHU Valentina, NAÇO Adrian, # XHAFAJ Evgjeni, STANA Alma, YMERI Agim #---------------------------------------------------------------- # Requiere cargar el paquete triangle: triangle_0.12.tar.gz library(triangle) #---------------------------------------------------------------- # N=10000 # # Oilfield area (m2) Area<-rtriangle(N,1500000, 3500000, 2500000) # # Thickness (m) Thickness<-rtriangle(N,8,30,15) # # Porosity ratio (fraction) Porosity<-rtriangle(N,0.05,0.35,0.22) # # Oil Saturation (fraction) OilSaturation<-rtriangle(N,0.5,0.88,0.75) # # Density of oil (ton/m3) OilDensity<-rtriangle(N,0.5,0.95,0.85) # # Formation Volume Factor (m3 reservoir/m3 std conditions) Boil<-runif(N,1.18,1.22) # # Oil Initially In Place OIIP<-Area*Thickness*Porosity*OilSaturation*OilDensity/Boil #---------------------------------------------------------------- # OIIP (ton) summary(OIIP) #---------------------------------------------------------------- # Intervalo de Confianza 95% para la media SD=sd(OIIP) T=qt(p=0.975, df=N-1) OIIP_MAX=mean(OIIP)+T*SD/sqrt(N) OIIP_MIN=mean(OIIP)-T*SD/sqrt(N) mean(OIIP) OIIP_MAX OIIP_MIN #--------------------------------------------------------------- # Proven reserves P90 (ton) quantile(OIIP,p=0.1) # Proven and Possible Reserves (P50) (ton) quantile(OIIP,p=0.5) # Proven, Possible and Probable Reserves (P10) (ton) quantile(OIIP,p=0.9) # par(mfrow=c(2,1)) hist(OIIP) plot(ecdf(OIIP)) #----------------------------------------------------------------