public void save() { List <WellLogSample> LogDens = new List <WellLogSample>(densLog.Samples); Borehole b1 = densLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Velocity"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = LogDens[i2].MD; float val = (float)vel[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Velocity Log has been created in the same Well"); }
public void FromSonic() { int count = dtLog.SampleCount; List <WellLogSample> LogDt = new List <WellLogSample>(dtLog.Samples); double[] Imp = new double[count]; for (int i = 0; i < count; i++) { Imp[i] = 1000.0d * GCoef * Math.Pow(1 / dtLog[i].Value, GExp) / dtLog[i].Value; } Borehole b1 = dtLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Acoustic Impedance"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = LogDt[i2].MD; float val = (float)Imp[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Impedance Log has been created in the same Well"); }
public void FromDensity() { //int count = Math.Min(velLog.SampleCount, densLog.SampleCount); List <WellLogSample> LogVel = new List <WellLogSample>(velLog.Samples); List <WellLogSample> LogDens = new List <WellLogSample>(densLog.Samples); TwoLogCheck c2 = new TwoLogCheck(velLog, densLog); int count = c2.count; if (count == 0) { PetrelLogger.ErrorBox("INPUT LOGS DO NOT HAVE SAME DEPTH SPACING"); return; } double startMD = c2.startMD, endMD = c2.endMD; int startVel = c2.startLog1, startDens = c2.startLog2; double[] Imp = new double[count]; for (int i = 0; i < count; i++) { if (LogDens[i + startDens].Value.ToString() == "NaN") { continue; } if (LogVel[i + startVel].Value.ToString() == "NaN") { continue; } vel = LogVel[i + startVel].Value; rhob = LogDens[i + startDens].Value; Imp[i] = vel * rhob; } Borehole b1 = densLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Acoustic Impedance"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = startMD + i2 * c2.interval2; float val = (float)Imp[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Impedance Log has been created in the same Well"); }
public void FromVpvs() { int count = vpvsLog.SampleCount; List <WellLogSample> LogVpvs = new List <WellLogSample>(vpvsLog.Samples); poisn = new double[count]; for (int i = 0; i < count; i++) { vpvs = LogVpvs[i].Value; poisn[i] = 0.5d * (Math.Pow(vpvs, 2) - 2.0d) / (Math.Pow(vpvs, 2) - 1.0d); } save(vpvsLog, vpvsLog.SampleCount, LogVpvs[0].MD, LogVpvs[1].MD - LogVpvs[0].MD, poisn, "Poissons ratio"); PetrelLogger.InfoBox("The Poisson Ratio Log has been created in the same Well"); }
public void FromDensDt1() { //int count = Math.Min(densLog.SampleCount, dtLog.SampleCount); //count = Math.Min(count, poisLog.SampleCount); List <WellLogSample> LogDens = new List <WellLogSample>(densLog.Samples); List <WellLogSample> LogDt = new List <WellLogSample>(dtLog.Samples); List <WellLogSample> LogPois = new List <WellLogSample>(poisLog.Samples); ThreeLogCheck C1 = new ThreeLogCheck(densLog, dtLog, poisLog); int count = C1.count; if (count == 0) { PetrelLogger.ErrorBox("INPUT LOGS DO NOT HAVE SAME DEPTH SPACING"); return; } int startDens = C1.startLog1, startDt = C1.startLog2, startPois = C1.startLog3; shearmod = new double[count]; for (int i = 0; i < count; i++) { if (LogDens[i + startDens].Value.ToString() == "NaN") { continue; } if (LogDt[i + startDt].Value.ToString() == "NaN") { continue; } if (LogPois[i + startPois].Value.ToString() == "NaN") { continue; } pois = LogPois[i + startPois].Value; c = 0.5 * (1 - 2 * pois) / (1 - pois); dens = LogDens[i + startDens].Value; dt = LogDt[i + startDt].Value; shearmod[i] = c * dens * 1.34 * Math.Pow(10, 10) / (Math.Pow(dt, 2)); } save(densLog, C1.count, C1.startMD, C1.interval1, shearmod, "Shear modulus"); PetrelLogger.InfoBox("The Shear Modulus Log has been created in the same Well"); }
public void FromVsh() { int count = vshLog.SampleCount; List <WellLogSample> LogVsh = new List <WellLogSample>(vshLog.Samples); poisn = new double[count]; for (int i = 0; i < count; i++) { vsh = LogVsh[i].Value; poisn[i] = 0.125 * vsh * 100.0d + 0.27; } double interval = LogVsh[1].MD - LogVsh[0].MD; save(vshLog, vshLog.SampleCount, LogVsh[0].MD, interval, poisn, "Poissons ratio"); PetrelLogger.InfoBox("The Poisson Ratio Log has been created in the same Well"); }
public void FromGamma() { int count; count = grLog.SampleCount; List <WellLogSample> LogGr = new List <WellLogSample>(grLog.Samples); double[] vsh = new double[count]; double[] Gr = new double[count]; for (int i = 0; i < count; i++) { Gr[i] = LogGr[i].Value; vsh[i] = (LogGr[i].Value - Gr0) / (Gr100 - Gr0); } double max = 0, min = 0; for (int k = 0; k < count; k++) { max = Math.Max(Gr[k], max); min = Math.Min(Gr[k], min); } Borehole b1 = grLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("VShale"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = LogGr[i2].MD; float val = (float)vsh[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Shale Volume Fraction Log has been created in the same Well"); }
public void FromDensity2() { int count = densLog.SampleCount; List <WellLogSample> LogDens = new List <WellLogSample>(densLog.Samples); Velocity V1 = new Velocity(densLog); V1.GCoef = GCoef; V1.GExp = GExp; V1.FromDensity(); double[] Imp = new double[count]; for (int i = 0; i < count; i++) { rhob = LogDens[i].Value; Imp[i] = V1.vel[i] * rhob; } Borehole b1 = densLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Acoustic Impedance"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = LogDens[i2].MD; float val = (float)Imp[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Impedance Log has been created in the same Well"); }
public void FromSP() { int count; count = spLog.SampleCount; List <WellLogSample> LogSp = new List <WellLogSample>(spLog.Samples); double[] vsh = new double[count]; double[] Sp = new double[count]; for (int i = 0; i < count; i++) { Sp[i] = LogSp[i].Value; vsh[i] = (LogSp[i].Value - Sp0) / (Sp100 - Sp0); } Borehole b1 = spLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("VShale"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = LogSp[i2].MD; float val = (float)vsh[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Shale Volume Fraction Log has been created in the same Well"); }
public void FromPorosity2() { //int count; //count = Math.Min(porLog.SampleCount, vshLog.SampleCount); //count = Math.Min(count, swLog.SampleCount); List <WellLogSample> LogPhie = new List <WellLogSample>(porLog.Samples); List <WellLogSample> LogSw = new List <WellLogSample>(swLog.Samples); List <WellLogSample> LogVsh = new List <WellLogSample>(vshLog.Samples); ThreeLogCheck C1 = new ThreeLogCheck(porLog, swLog, vshLog); int count = C1.count; if (count == 0) { PetrelLogger.ErrorBox("INPUT LOGS DO NOT HAVE SAME DEPTH SPACING"); return; } int startPor = C1.startLog1, startSw = C1.startLog2, startVsh = C1.startLog3; double[] vel = new double[count]; for (int i = 0; i < count; i++) { if (LogPhie[i + startPor].Value.ToString() == "NaN") { continue; } if (LogSw[i + startSw].Value.ToString() == "NaN") { continue; } if (LogVsh[i + startVsh].Value.ToString() == "NaN") { continue; } phie = (double)LogPhie[i + startPor].Value; sw = (double)LogSw[i + startSw].Value; vsh = (double)LogVsh[i + startVsh].Value; c = vsh / (1 - phie); vf = sw / dtw + (1 - sw) / dth; vm = c / dtsh + (1 - c) / dtmat; vel[i] = Math.Pow((1 - phie), 2) * vm + phie * vf; //vel[i] = 1 / dt; } Borehole b1 = porLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Velocity"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = C1.startMD + C1.interval1 * i2; float val = (float)vel[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Velocity Log has been created in the same Well"); }
public void FromDensity() { //int count; //count = Math.Min(densLog.SampleCount, vshLog.SampleCount); //count = Math.Min(count, swLog.SampleCount); List <WellLogSample> LogDens = new List <WellLogSample>(densLog.Samples); List <WellLogSample> LogSw = new List <WellLogSample>(swLog.Samples); List <WellLogSample> LogVsh = new List <WellLogSample>(vshLog.Samples); ThreeLogCheck C1 = new ThreeLogCheck(densLog, swLog, vshLog); int count = C1.count; if (count == 0) { PetrelLogger.ErrorBox("INPUT LOGS DO NOT HAVE SAME DEPTH SPACING"); return; } int startDens = C1.startLog1, startSw = C1.startLog2, startVsh = C1.startLog3; double[] phie = new double[count]; for (int i = 0; i < count; i++) { if (LogDens[i + startDens].Value.ToString() == "NaN") { continue; } if (LogSw[i + startSw].Value.ToString() == "NaN") { continue; } if (LogVsh[i + startVsh].Value.ToString() == "NaN") { continue; } dens = (double)LogDens[i + startDens].Value; sw = (double)LogSw[i + startSw].Value; vsh = (double)LogVsh[i + startVsh].Value; rhof = sw * rhow + (1 - sw) * rhoh; phie[i] = (dens - (1 - vsh) * rhomat - vsh * rhosh) / (rhof - rhomat - vsh * rhosh); } Borehole b1 = densLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Porosity"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = C1.startMD + i2 * C1.interval1; float val = (float)phie[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Porosity Log has been created in the same Well"); }
public void FromNeutron() { //int count; //count = GnLog.SampleCount; //count=Math.Min(GnLog.SampleCount, vshLog.SampleCount); List <WellLogSample> LogGn = new List <WellLogSample>(GnLog.Samples); List <WellLogSample> LogVsh = new List <WellLogSample>(vshLog.Samples); TwoLogCheck C4 = new TwoLogCheck(GnLog, vshLog); int count = C4.count; if (count == 0) { PetrelLogger.ErrorBox("INPUT LOGS DO NOT HAVE SAME DEPTH SPACING"); return; } int startGn = C4.startLog1, startVsh = C4.startLog2; double[] phie = new double[count]; for (int i = 0; i < count; i++) { if (LogGn[i + startGn].Value.ToString() == "NaN") { continue; } if (LogVsh[i + startVsh].Value.ToString() == "NaN") { continue; } Gn = (double)LogGn[i + startGn].Value; vsh = (double)LogVsh[i + startVsh].Value; phie[i] = Gn - vsh * Gnsh * 100; } Borehole b1 = vshLog.Borehole; using (ITransaction trans = DataManager.NewTransaction()) { IPropertyVersionService pvs = PetrelSystem.PropertyVersionService; ILogTemplate glob = pvs.FindTemplateByMnemonics("Porosity"); PropertyVersion pv = pvs.FindOrCreate(glob); trans.Lock(b1); WellLog log = b1.Logs.CreateWellLog(pv); //log.Name = "rhoB"; WellLogSample[] tsamples = new WellLogSample[count]; for (int i2 = 0; i2 < count; i2++) { double md = C4.startMD + i2 * C4.interval1; float val = (float)phie[i2]; tsamples[i2] = new WellLogSample(md, val); } log.Samples = tsamples; trans.Commit(); } PetrelLogger.InfoBox("The Porosity Log has been created in the same Well"); }