示例#1
0
  def plotDry(self,kbri,koil,pref,ksat_well,gdry,phit,SO,gr,facies,vsh,kdry_well):


    plt.rcParams.update({'font.size': 12,'legend.fontsize': 12})

    kdry = Gassman.kdry(ksat_well,phit,SO,vsh,kbri,koil)

    n1 = len(ksat_well)
    dry_ratio = np.zeros(n1)
    #for i in range(n1):  
      #print(vsh[i])
    fig = figure(4, figsize=(13, 4))
    ax = plt.subplot(1,2,1)
    #ax.set_xlabel('porosity $\phi$')
    ax.set_ylabel('K dry (Pa)')
    #plot(self._phi[:],self._kdry_l[1,:],'b')
    #plot(self._phi[:],self._kdry_l[2,:],'b')
    plot(self._phi[:],self._kdry_l[pref,:],'b')
    plot(self._phi[:],self._kdry_c[:],'b')
    #plot(self._phi[:],self._kdryConstant[3,:],'b')
    plot(self._phi[:],self._kdryConstant[5,:],'b')
    plot(self._phi[:],self._kdryConstant[7,:],'b')
    plot(self._phi[:],self._kdryConstant[9,:],'b')
    #ax.set_xticklabels([])
    ax.set_xlabel('porosity $\phi$')

    #plot(self._phi[:],self._kdryConstant[18,:],'b')
    ylim(1.e9,1.5e10) 
    xlim(0,0.5) 
    p=ax.scatter(phit,kdry_well,c=vsh,edgecolor='none')
    #p=ax.scatter(phit,kdry,c='r')
    p.set_clim([0,.5])
    cbar= plt.colorbar(p)
    cbar.set_label('Vsh')
    #plt.rcParams.update({'font.size': 12,'legend.fontsize': 12})

    bx = plt.subplot(1,2,2)
    bx.set_xlabel('porosity $\phi$')
    bx.set_ylabel('G dry (Pa)')
    plot(self._phi[:],self._gdry_l[pref,:],'b')
    plot(self._phi[:],self._gdry_c[:],'b')
    plot(self._phi[:],self._gdryConstant[5,:],'b')
    plot(self._phi[:],self._gdryConstant[7,:],'b')
    plot(self._phi[:],self._gdryConstant[9,:],'b')
    ylim(1e9,1.5e10) 
    xlim(0,0.5) 
    #bx.set_yticklabels([])




    p=bx.scatter(phit,gdry,c=vsh,edgecolor='none')
    cbar= fig.colorbar(p)
    cbar.set_label('Vsh')
    p.set_clim([0,.5])
    fig.savefig('model_calibration.png', bbox_inches='tight')


    fig = figure(5, figsize=(6, 6))
    ax = plt.subplot(1,1,1)
    ax.set_xlabel('porosity $\phi$')
    ax.set_ylabel('K dry (Pa)')
    #plot(self._phi[:],self._kdry_l[1,:],'b')
    #plot(self._phi[:],self._kdry_l[2,:],'b')
    plot(self._phi[:],self._kdry_l[pref,:],'b')
    plot(self._phi[:],self._kdry_c[:],'b')
    #plot(self._phi[:],self._kdryConstant[2,:],'b')
    plot(self._phi[:],self._kdryConstant[5,:],'b')
    plot(self._phi[:],self._kdryConstant[7,:],'b')
    plot(self._phi[:],self._kdryConstant[9,:],'b')
    ylim(1.e9,4e10) 
    xlim(0,0.5) 
    fig.savefig('teory_model.pdf')
示例#2
0
  def plotDryratio(self,title,kbri,koil,ksat_well,gdry,kdry_well,phit,SO,gr,facies,depth,dmin,dmax,vsh):
    #phid,phit,ksat_well,vsh_iw,g,SO,depth,well,facies,sid = np.loadtxt(fileName,unpack=True)
    kdry= Gassman.kdry(ksat_well,phit,SO,vsh,kbri,koil)
    n1 = len(ksat_well)
    dry_ratio = np.zeros(n1)
    for i in range(n1):  
      #print(vsh[i],depth[i])  
      dry_ratio[i]=(kdry_well[i]+4.0/3.0*gdry[i])/gdry[i] 
      dry_ratio[i]=np.power(dry_ratio[i],0.5)




    fig = figure(7, figsize=(8, 6))
    fig.suptitle(title)

    bx = plt.subplot(1,3,1)
    bx.set_xlabel('Gamma Ray')
    bx.set_ylabel('Depth (feet)')
    bx.xaxis.set_major_locator(MaxNLocator(4))
    p=bx.plot(gr,depth,c='k')
    bx.set_ylim(dmax,dmin) 
    #bx.set_title('')
    #bx.set_yticklabels([])


    colors=[1.0,2.,3.,4.,5.,6.,7.,8.,9.,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0]
    n = len(depth)
    for i in range(n):
      for j in range(len(colors)):
        if facies[i] == colors[j]:
          if colors[j] >=5 and colors[j]<=9:
            j = 4
            c1='k'
            p=bx.scatter(gr[i],depth[i],c=c1)
          elif colors[j] >=50 and colors[j]<=90:
            j = 13
            c1='k'
            p=bx.scatter(gr[i],depth[i],c=c1)
          else:
            c1=cm.hsv((j+1)/float(len(colors)),1)
            p=bx.scatter(gr[i],depth[i],c=c1,edgecolor='none')
    bx.set_xlim(0,160)


    bx = plt.subplot(1,3,2)
    bx.set_xlabel('Vp/Vs dry ratio')
    #bx.set_ylabel('Depth (ft)')
    #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none')
    p1=bx.plot(dry_ratio,depth,c='k')
    bx.xaxis.set_major_locator(MaxNLocator(4))
    #p.set_clim([0,0.5])
    #cbar= plt.colorbar(p)
    #cbar.set_label('Oil saturation')
    ylim(dmax,dmin) 
    bx.set_yticklabels([])

    xlim(1.4,1.65) 

    '''
    bx = plt.subplot(1,5,3)
    bx.set_xlabel('Oil saturation')
    #bx.set_ylabel('Depth (ft)')
    #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none')
    p1=bx.plot(SO,depth,c='k')
    bx.xaxis.set_major_locator(MaxNLocator(4))
    #p.set_clim([0,0.5])
    #cbar= plt.colorbar(p)
    #cbar.set_label('Oil saturation')
    bx.set_yticklabels([])

    ylim(dmax,dmin) 
    xlim(0,0.5) 
    '''

    kbri=2.8e9
    koil=0.829e9
    rhobri=1030
    rhooil=0.66e3
    #kgassman(kdry_well,phit,SO,vsh,kbri,koil,rhobri,rhooil)
    ksatR,rhosatR,soR,kfluid=Gassman.kgassman(kdry_well,phit,SO,vsh,kbri,koil,rhobri,rhooil)



    bx = plt.subplot(1,3,3)
    bx.set_xlabel('Kdry(GPa)')
    #bx.set_ylabel('Depth (ft)')
    #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none')
    bx.plot(kdry_well/1e9,depth,c='k')
    bx.plot(kdry/1e9,depth,c='r',label='kdry obs')

    bx.set_xlim(0.0,17.0) 

    #bx2 = bx.twiny()
    #bx2.plot(kfluid/1e9,depth,c='b',label='kfluid')
    #plt.legend()
    #bx2.set_xlabel('Kfluid(GPa)',color='b')
    bx.set_yticklabels([])

    bx.xaxis.set_major_locator(MaxNLocator(4))
    #p.set_clim([0,0.5])
    #cbar= plt.colorbar(p)
    #cbar.set_label('Oil saturation')
    bx.set_ylim(dmax,dmin) 
    #bx2.set_ylim(dmax,dmin) 
    fig.savefig(title+'QC2.pdf')

    #bx2.set_xlim(0.0 ,2.5) 
    '''
    bx = plt.subplot(1,5,3)
    bx.set_xlabel('Oil saturation')
    #bx.set_ylabel('Depth (ft)')
    #p=bx.scatter(dry_ratio,depth,c=SO,edgecolor='none')
    #p1=bx.plot(SO,depth,c='k')
    p2=bx.plot(soR,depth,c='k')
    bx.xaxis.set_major_locator(MaxNLocator(4))
    #p.set_clim([0,0.5])
    #cbar= plt.colorbar(p)
    #cbar.set_label('Oil saturation')
    bx.set_yticklabels([])

    ylim(dmax,dmin) 
    xlim(0,0.5) 
    '''
    '''