我这里有个实例,也许对你有用
Below, for simplisity, calculations are made for all facies based on the facies 3&4 equation
Kp=Sqrt( Perm/Pore)
Kp=If( Kp>160,160 ,Kp )
Exp=(0.489*Kp)+15.8069
Swirr=3.9164*Pow(10,-9)*Pow( Kp, 4)-1.7772*Pow(10,-6 )*Pow( Kp,3 )+2.9150*Pow(10,-4)*Pow( Kp,2 )-0.022168*Kp+0.81183
Swirr=If( Swirr<0,0 , Swirr)
All cells with Facies code 2 will be overwritten using input from Facies 2 equations
Kp=If( Facies=2,Sqrt( Perm/Pore), Kp)
Kp=If( Facies=2 And Kp>160,100 ,Kp )
Exp=If( Facies=2,(0.1942*Kp) +12.926,Exp )
Swirr=If(Facies=2,3.7711*Pow(10,-8)*Pow( Kp, 4)-1.0551*Pow(10,-5 )*Pow( Kp,3 )+1.0593*Pow(10,-3)*Pow( Kp,2 )-0.048049*Kp+1.0639, Swirr)
Swirr=3.7711*Pow(10,-8)*Pow( Kp, 4)-1.0551*Pow(10,-5 )*Pow( Kp,3 )+1.0593*Pow(10,-3)*Pow( Kp,2 )-0.048049*Kp+1.0639
Swirr=If( Swirr<0,0 , Swirr)
In the next step, the final calculations are made based on these facies dependant parameters
C=200/( Pow( 1-Swirr,Exp ))
Sw=1-(Pow( ffm_Oil_water_contact/C,1/Exp ))
All cells with Facies code 1 will be overwritten and assigned Sw=1
Sw=If( Sw<0.158,0.158 , Sw)
Sw=If( Facies=1,1 , Sw)