You are on page 1of 2

Imports System.

Math
Imports System.Windows.Forms.DataVisualization.Charting
Public Class Form1
Dim Vp, Vs, p, phi As Double
Dim k_q = 37.6
Dim k_w = 2.25
Dim k_g = 0.025
Dim rho_q = 2.7
Dim rho_w = 1.0
Dim rho_g = 0.065
Dim Vp_dr = 2.797
Dim Vs_dr = 1.8
Private Sub Chart1_Click(ByVal sender As System.Object, ByVal e As System.Ev
entArgs) Handles Button1.Click
phi = TextBox4.Text
Dim miu_d, k_dry, miu_sat, Sw, Sg, Kf, K_sat, rho_eff, Vp_sat, Vs_sat As
Double
'The shear moduli for dry case
miu_d = rho_q * (1 - phi) * ((Vs_dr) ^ 2)
k_dry = rho_q * (1 - phi) * ((Vp_dr) ^ 2) - (4 / 3) * miu_d
miu_sat = miu_d
'setup the chart
With Chart1.ChartAreas(0)
.AxisX.Minimum = 0
.AxisX.Maximum = 100
.AxisX.Interval = 10
.AxisX.Title = "Hydrocarbon Saturation (gas) "
.AxisY.Title = "Vs & Vp"
.BackColor = Color.FloralWhite 'AntiqueWhite 'LightSkyBlue
.BackSecondaryColor = Color.White
.BackGradientStyle = GradientStyle.HorizontalCenter
.BorderColor = Color.Blue
.BorderDashStyle = ChartDashStyle.Solid
.BorderWidth = 1
End With
'draw the chart
Chart1.Series.Clear()
Chart1.Series.Add("Sg vs Vs")
Chart1.Series.Add("Sg vs Vp")
With Chart1.Series(0)
.ChartType = DataVisualization.Charting.SeriesChartType.Spline
.BorderWidth = 2
.Color = Color.Blue
'Using the woods relation
Dim M As Double
For M = 5 To 100 Step 1
Sw = M
Sg = M - 1
'woods equation
Kf = (k_w * k_g) / ((k_g * Sw) + (Sg * k_w))
'Isotropic Gassmann's Equation
K_sat = k_dry + (((1 - ((k_dry) / k_q)) ^ 2) / (((phi) / Kf) + (
(1 - phi) / k_q) - ((k_dry) / ((k_q) ^ 2))))
rho_eff = rho_q * (1 - phi) + (rho_w * Sw + rho_g * (1 - Sw)) *
phi
Vp_sat = Sqrt((K_sat + (4 / 3) * miu_sat) / (rho_eff))

Vs_sat = Sqrt((miu_sat) / (rho_eff))


.Points.AddXY(Sg, Vs_sat)
Next
End With
With Chart1.Series(1)
.ChartType = DataVisualization.Charting.SeriesChartType.Spline
.BorderWidth = 2
.Color = Color.Green
Dim m, Sw1, Sg1 As Double
For m = 5 To 100 Step 1
Sw1 = m
Sg1 = m - 1
'woods equation
Kf = (k_w * k_g) / ((k_g * Sw1) + (Sg1 * k_w))
'Isotropic Gassmann's Equation
K_sat = k_dry + (((1 - ((k_dry) / k_q)) ^ 2) / (((phi) / Kf) + (
(1 - phi) / k_q) - ((k_dry) / ((k_q) ^ 2))))
rho_eff = rho_q * (1 - phi) + (rho_w * Sw1 + rho_g * (1 - Sw1))
* phi
Vp_sat = Sqrt((K_sat + (4 / 3) * miu_sat) / (rho_eff))
Vs_sat = Sqrt((miu_sat) / (rho_eff))
.Points.AddXY(Sg1, Vp_sat)
Next
End With
End Sub

You might also like