Exemplo n.º 1
0
        //List<Borehole> b2 = new List<Borehole>();
        //public Borehole b1;

        public void save(WellLog LogType, int count, double startMD, double interval, Double[] array, string name)
        {
            //Borehole b1;
            //int count = LogType.SampleCount;

            List <WellLogSample> TypeLog = new List <WellLogSample>(LogType.Samples);
            Borehole             b1      = LogType.Borehole;

            //List<Borehole> b2 = new List<Borehole>();
            using (ITransaction trans = DataManager.NewTransaction())
            {
                IPropertyVersionService pvs  = PetrelSystem.PropertyVersionService;
                ILogTemplate            glob = pvs.FindTemplateByMnemonics(name);
                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 * interval;
                    float  val = (float)array[i2];
                    tsamples[i2] = new WellLogSample(md, val);
                }
                log.Samples = tsamples;
                trans.Commit();
            }
        }
Exemplo n.º 2
0
        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");
        }
            private WellLog CreateWellLog(WellLog originalWellLog, double multiplier, WellLogVersion wellLogVersion)
            {
                //
                WellLog wellLog = WellLog.NullObject;
                //
                var borehole = originalWellLog.Borehole;

                //
                using (var transaction = DataManager.NewTransaction())
                {
                    transaction.Lock(borehole);
                    //
                    wellLog = borehole.Logs.CreateWellLog(wellLogVersion);
                    //
                    var wellLogSamples = new List <WellLogSample>();
                    foreach (var wellLogSample in originalWellLog.Samples)
                    {
                        wellLogSamples.Add(new WellLogSample(wellLogSample.MD, (float)(multiplier * wellLogSample.Value)));
                    }
                    //
                    wellLog.Samples = wellLogSamples.ToArray();
                    //
                    transaction.Commit();
                }
                //
                return(wellLog);
            }
            public static WellLogVersion CreateWellLogVersionFromWellLog(WellLog wellLog)
            {
                WellLogVersion wellLogVersion = WellLogVersion.NullObject;
                //
                Borehole borehole = wellLog.Borehole;
                //
                Template wellLogTemplate = wellLog.WellLogVersion.Template;
                //
                WellRoot wellRoot = WellRoot.Get(PetrelProject.PrimaryProject);
                //
                var logVersionCollection = wellRoot.LogVersionCollection;

                //
                if (!borehole.Logs.CanCreateWellLog(wellLog.WellLogVersion))
                {
                    using (var transaction = DataManager.NewTransaction())
                    {
                        transaction.Lock(logVersionCollection);
                        //
                        wellLogVersion = logVersionCollection.CreateWellLogVersion("Copied " + wellLog.WellLogVersion.Name,
                                                                                   wellLogTemplate);
                        //
                        transaction.Commit();
                    }
                }
                //
                return(wellLogVersion);
            }
Exemplo n.º 5
0
        protected override void PrepareData()
        {
            DevKit.Store.CapServerProviders = DevKit.Store.CapServerProviders
                                              .Where(x => x.DataSchemaVersion == OptionsIn.DataVersion.Version131.Value)
                                              .ToArray();

            Well = new Well
            {
                Uid      = DevKit.Uid(),
                Name     = DevKit.Name("Well"),
                TimeZone = DevKit.TimeZone
            };
            Wellbore = new Wellbore
            {
                Uid       = DevKit.Uid(),
                Name      = DevKit.Name("Wellbore"),
                UidWell   = Well.Uid,
                NameWell  = Well.Name,
                MDCurrent = new MeasuredDepthCoord(0, MeasuredDepthUom.ft)
            };
            WellLog = new WellLog
            {
                Uid          = DevKit.Uid(),
                Name         = DevKit.Name("WellLog"),
                UidWell      = Well.Uid,
                NameWell     = Well.Name,
                UidWellbore  = Wellbore.Uid,
                NameWellbore = Wellbore.Name
            };

            QueryEmptyList = DevKit.List(new WellLog());
        }
Exemplo n.º 6
0
        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 async Task WellLog131_PutObject_Can_Add_WellLog()
        {
            AddParents();
            await RequestSessionAndAssert();

            var handler = _client.Handler <IStoreCustomer>();
            var uri     = WellLog.GetUri();

            var dataObject = CreateDataObject <WellLogList, WellLog>(uri, WellLog);

            // Get Object Expecting it Not to Exist
            await GetAndAssert(handler, uri, Energistics.EtpErrorCodes.NotFound);

            // Put Object
            await PutAndAssert(handler, dataObject);

            // Get Object
            var args = await GetAndAssert(handler, uri);

            // Check Data Object XML
            Assert.IsNotNull(args?.Message.DataObject);
            var xml = args.Message.DataObject.GetString();

            var result = Parse <WellLogList, WellLog>(xml);

            Assert.IsNotNull(result);
        }
Exemplo n.º 8
0
        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 async Task WellLog131_PutObject_Can_Update_WellLog()
        {
            AddParents();
            await RequestSessionAndAssert();

            var handler = _client.Handler <IStoreCustomer>();
            var uri     = WellLog.GetUri();

            // Add a Comment to Data Object
            WellLog.CommonData = new CommonData()
            {
                Comments = "Test PutObject"
            };

            var dataObject = CreateDataObject <WellLogList, WellLog>(uri, WellLog);

            // Get Object Expecting it Not to Exist
            await GetAndAssert(handler, uri, Energistics.EtpErrorCodes.NotFound);

            // Put Object for Add
            await PutAndAssert(handler, dataObject);

            // Get Added Object
            var args = await GetAndAssert(handler, uri);

            // Check Added Data Object XML
            Assert.IsNotNull(args?.Message.DataObject);
            var xml = args.Message.DataObject.GetString();

            var result = Parse <WellLogList, WellLog>(xml);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.CommonData.Comments);

            // Remove Comment from Data Object
            result.CommonData.Comments = null;

            var updateDataObject = CreateDataObject <WellLogList, WellLog>(uri, result);

            // Put Object for Update
            await PutAndAssert(handler, updateDataObject);

            // Get Updated Object
            args = await GetAndAssert(handler, uri);

            // Check Added Data Object XML
            Assert.IsNotNull(args?.Message.DataObject);
            var updateXml = args.Message.DataObject.GetString();

            result = Parse <WellLogList, WellLog>(updateXml);
            Assert.IsNotNull(result);

            // Test Data Object overwrite
            Assert.IsNull(result.CommonData.Comments);
        }
Exemplo n.º 10
0
        public void fromimpedance()
        {
            //int count;
            //count = ImpLog.SampleCount;
            List <WellLogSample> LogImp = new List <WellLogSample>(ImpLog.Samples);
            List <WellLogSample> LogVel = new List <WellLogSample>(VelLog.Samples);

            TwoLogCheck C2    = new TwoLogCheck(ImpLog, VelLog);
            int         count = C2.count;

            if (count == 0)
            {
                PetrelLogger.ErrorBox("INPUT LOGS DO NOT HAVE SAME DEPTH SPACING");
                return;
            }
            int startImp = C2.startLog1, startVel = C2.startLog2;

            double[] rhob = new double[count];

            for (int i = 0; i < count; i++)
            {
                if (LogImp[i + startImp].Value.ToString() == "NaN")
                {
                    continue;
                }

                if (LogVel[i + startVel].Value.ToString() == "NaN")
                {
                    continue;
                }
                rhob[i] = (double)LogImp[i + startImp].Value / LogVel[i + startVel].Value;
            }
            Borehole b1 = ImpLog.Borehole;

            using (ITransaction trans = DataManager.NewTransaction())
            {
                IPropertyVersionService pvs  = PetrelSystem.PropertyVersionService;
                ILogTemplate            glob = pvs.FindTemplateByMnemonics("Density");
                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  = C2.startMD + C2.interval1 * i2;
                    float  val = (float)rhob[i2];
                    tsamples[i2] = new WellLogSample(md, val);
                }
                log.Samples = tsamples;
                trans.Commit();
            }
            PetrelLogger.InfoBox("The Density Log has been created in the same Well");
        }
        private void tgtWellLog_DragDrop(object sender, DragEventArgs e)
        {
            WellLog welllog = e.Data.GetData(typeof(object)) as WellLog;

            if (welllog == null)
            {
                PetrelLogger.ErrorBox("Объект не является каротажной кривой!");
                return;
            }
            tmpargs.NovozhentsevWellLog = welllog;
            UpdateUIFormArgs();
        }
Exemplo n.º 12
0
 private void xDropper_DragDrop(object sender, DragEventArgs e)
 {
     logX = (WellLog)e.Data.GetData(typeof(WellLog));
     if (logX != null)
     {
         xText.Text = logX.Name;
     }
     else
     {
         xText.Text = "";
         MessageBox.Show("Not a valid Well Log");
     }
 }
Exemplo n.º 13
0
        public async Task WellLog131_GetResources_Can_Get_All_WellLog_Resources()
        {
            AddParents();
            DevKit.AddAndAssert <WellLogList, WellLog>(WellLog);
            await RequestSessionAndAssert();

            var uri       = WellLog.GetUri();
            var parentUri = uri.Parent;

            await GetResourcesAndAssert(parentUri);

            var folderUri = parentUri.Append(uri.ObjectType);

            await GetResourcesAndAssert(folderUri);
        }
Exemplo n.º 14
0
        //WellLog WellLog1, WellLog2;
        public TwoLogCheck(WellLog LogType1, WellLog LogType2)
        {
            List<WellLogSample> Log1 = new List<WellLogSample>(LogType1.Samples);
            List<WellLogSample> Log2 = new List<WellLogSample>(LogType2.Samples);
            //Console.WriteLine(Log1.Count);
            //Console.WriteLine(Log2.Count);

            interval1 = Log1[1].MD - Log1[0].MD;
            interval2 = Log2[1].MD - Log2[0].MD;
            if (Math.Abs(interval1 - interval2) < 10e-4d)
            {
                if ( Math.Abs(Log1[0].MD - Log2[0].MD)>10e-4 || Math.Abs(Log1[Log1.Count - 1].MD - Log2[Log2.Count - 1].MD)>10e-4)
                {
                    if (Log1[0].MD > Log2[0].MD)
                        startMD = Log1[0].MD;
                    else
                        startMD = Log2[0].MD;
                    if (Log1[Log1.Count - 1].MD > Log2[Log2.Count - 1].MD)
                        endMD = Log2[Log2.Count - 1].MD;
                    else
                        endMD = Log1[Log1.Count].MD;
                    for (int xxx = 0; xxx < Log1.Count; xxx++)
                    {
                        if (Math.Abs(Log1[xxx].MD - startMD)<10e-4)
                            startLog1 = xxx;
                        if (Math.Abs(Log1[xxx].MD - endMD)<10e-4)
                            endLog1 = xxx;
                    }
                    for (int xxx = 0; xxx < Log2.Count; xxx++)
                    {
                        if (Math.Abs(Log2[xxx].MD - startMD)<10e-4)
                            startLog2 = xxx;
                        if (Math.Abs(Log2[xxx].MD - endMD)<10e-4)
                            endLog2 = xxx;
                    }
                    count = endLog1 - startLog1 + 1;
                }
                else
                {
                    count = Log1.Count;
                    startMD = Log1[0].MD;
                    endMD = Log1[Log1.Count - 1].MD;
                }
            }
        }
Exemplo n.º 15
0
        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");
        }
Exemplo n.º 16
0
        public void TestSetUp()
        {
            Logger.Debug($"Executing {TestContext.TestName}");
            DevKit = new DevKit131Aspect(TestContext);

            DevKit.Store.CapServerProviders = DevKit.Store.CapServerProviders
                                              .Where(x => x.DataSchemaVersion == OptionsIn.DataVersion.Version131.Value)
                                              .ToArray();

            Well = new Well
            {
                Uid  = DevKit.Uid(),
                Name = DevKit.Name("Well"),

                TimeZone = DevKit.TimeZone
            };
            Wellbore = new Wellbore
            {
                Uid  = DevKit.Uid(),
                Name = DevKit.Name("Wellbore"),

                UidWell   = Well.Uid,
                NameWell  = Well.Name,
                MDCurrent = new MeasuredDepthCoord(0, MeasuredDepthUom.ft)
            };
            WellLog = new WellLog
            {
                Uid  = DevKit.Uid(),
                Name = DevKit.Name("WellLog"),

                UidWell      = Well.Uid,
                NameWell     = Well.Name,
                UidWellbore  = Wellbore.Uid,
                NameWellbore = Wellbore.Name
            };

            QueryEmptyList = DevKit.List(new WellLog());

            BeforeEachTest();
            OnTestSetUp();
        }
Exemplo n.º 17
0
        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 FromAcImp()
        {
            int count;

            count = AcImpLog.SampleCount;
            List <WellLogSample> LogAcImp = new List <WellLogSample>(AcImpLog.Samples);

            double[] RC = new double[count];

            for (int i = 0; i < count; i++)
            {
                if (i != count - 1)
                {
                    RC[i] = (LogAcImp[i + 1].Value - LogAcImp[i].Value) / (LogAcImp[i + 1].Value + LogAcImp[i].Value);
                }
            }
            Borehole b1 = AcImpLog.Borehole;

            using (ITransaction trans = DataManager.NewTransaction())
            {
                IPropertyVersionService pvs  = PetrelSystem.PropertyVersionService;
                ILogTemplate            glob = pvs.FindTemplateByMnemonics("Reflection coefficients");
                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  = LogAcImp[i2].MD;
                    float  val = (float)RC[i2];
                    tsamples[i2] = new WellLogSample(md, val);
                }
                log.Samples = tsamples;
                trans.Commit();
            }
            PetrelLogger.InfoBox("The Reflection coefficient Log has been created in the same Well");
        }
Exemplo n.º 19
0
        public LogAnalysisUI()
        {
            InitializeComponent();
            this.porWell = WellLog.NullObject; this.swWell = WellLog.NullObject; this.vshWell = WellLog.NullObject;
            this.comboLogs1.SelectedIndex = 0;
            this.comboLogs2.SelectedIndex = 0;
            OK.Image = PetrelImages.OK;

            if (this.comboLogs2.SelectedIndex == 0 && this.comboLogs1.SelectedIndex == 0)
            {
                this.DensityPan1.Visible = true;
                this.DensityPan2.Visible = false;
                this.DensityPan2.Visible = false;
                this.PorosityPan1.Visible = false;
                this.PorosityPan2.Visible = false;
                this.PorosityPan3.Visible = false;
                this.PorosityPan4.Visible = false;
                this.RCPan.Visible = false;
                this.VelocityPan1.Visible = false;
                this.VelocityPan2.Visible = false;
                this.VelocityPan3.Visible = false;
                this.ShaleVolumePan1.Visible = false;
                this.ShaleVolumePan2.Visible = false;
                this.ImpedancePan1.Visible = false;
                this.ImpedancePan2.Visible = false;
                this.ImpedancePan3.Visible = false;
                this.ElasticPan1.Visible = false;
                this.ElasticPan2.Visible = false;
                this.ElasticPan3.Visible = false;
                this.ElasticPan4.Visible = false;

            }

            GCText.Text = "0.31";
            GEText.Text = "0.25";
        }
Exemplo n.º 20
0
        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");
        }
Exemplo n.º 21
0
        public void fromvelocity()
        {
            int count;
            List <WellLogSample> LogVel = new List <WellLogSample>(velLog.Samples);

            count = velLog.SampleCount;

            double[] rhob = new double[count];

            for (int i = 0; i < count; i++)
            {
                vel     = (double)LogVel[i].Value;
                rhob[i] = 1000.0d * gcoef * Math.Pow(vel, gexp);
            }
            Borehole b1 = velLog.Borehole;

            using (ITransaction trans = DataManager.NewTransaction())
            {
                IPropertyVersionService pvs  = PetrelSystem.PropertyVersionService;
                ILogTemplate            glob = pvs.FindTemplateByMnemonics("Density");
                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  = LogVel[i2].MD;
                    float  val = (float)rhob[i2];
                    tsamples[i2] = new WellLogSample(md, val);
                }
                log.Samples = tsamples;
                trans.Commit();
            }
            PetrelLogger.InfoBox("The Density Log has been created in the same Well");
        }
Exemplo n.º 22
0
 public Density(WellLog LogType)
 {
     this.velLog = LogType;
 }
Exemplo n.º 23
0
 public Density(WellLog LogType1, WellLog LogType2, WellLog LogType3)
 {
     this.porLog = LogType1;
     this.swLog = LogType2;
     this.vshLog = LogType3;
 }
Exemplo n.º 24
0
        //Shale volume is calculated from here
        public void GrDrop_DragDrop(object sender, DragEventArgs e)
        {
            object dropped = e.Data.GetData(typeof(object));
            GrWell = dropped as WellLog;
            if (GrWell == null)
            {
                e.Effect = DragDropEffects.None;
                PetrelLogger.InfoBox("Error:This is not a Well Log");

            }
            else
            {
                e.Effect = DragDropEffects.All;
                GrText.Text = GrWell.Name;
            }
        }
Exemplo n.º 25
0
 public ShaleVolume(WellLog LogType)
 {
     this.grLog = LogType;
 }
Exemplo n.º 26
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.comboDensity.SelectedItem == null || this.comboSonic.SelectedItem == null || this.BRname == null)
     {
         PetrelLogger.ErrorBox("INVALID INPUT");
     }
     else
     {
         if (this.comboDensity.SelectedItem.ToString() == this.comboSonic.SelectedItem.ToString())
         {
             PetrelLogger.ErrorBox("WRONG INPUT");
             return;
         }
         WellLog densityLog = null;
         WellLog sonicLog   = null;
         if (this.mainCombo.SelectedIndex == 0 || this.mainCombo.SelectedIndex == 1)
         {
             if (this.comboDensity.SelectedItem == null || this.comboSonic.SelectedItem == null)
             {
                 PetrelLogger.InfoOutputWindow("!!Process Terminated. Log Missing!!");
             }
             else
             {
                 foreach (WellLog log in wlog)
                 {
                     if (this.comboDensity.SelectedItem.ToString() == log.Name)
                     {
                         densityLog = log;
                     }
                     else if (this.comboSonic.SelectedItem.ToString() == log.Name)
                     {
                         sonicLog = log;
                     }
                 }
             }
             if (!(densityLog == null || sonicLog == null))
             {
                 PetrelLogger.InfoOutputWindow("!!Iteration started!!");
                 RACO obj1 = new RACO(densityLog, sonicLog);
                 obj1.rhoC           = Convert.ToInt32(this.densityClayText.Text);
                 obj1.rhoQ           = Convert.ToInt32(this.densityQuartzText.Text);
                 obj1.rhoW           = Convert.ToInt32(this.densityWaterText.Text);
                 obj1.rhoO           = Convert.ToInt32(this.densityOilText.Text);
                 obj1.Kc             = Convert.ToInt64(this.bulkClayText.Text) * 1000000;
                 obj1.Kq             = Convert.ToInt64(this.bulkQuartzText.Text) * 1000000;
                 obj1.Kw             = Convert.ToInt64(this.bulkWaterText.Text) * 1000000;
                 obj1.Ko             = Convert.ToInt64(this.bulkOilText.Text) * 1000000;
                 obj1.Gc             = Convert.ToInt64(this.shearClayText.Text) * 1000000;
                 obj1.Gq             = Convert.ToInt64(this.shearQuartzText.Text) * 1000000;
                 obj1.RPMndex        = this.comboRPM.SelectedIndex;
                 obj1.porLog         = this.porText.Text;
                 obj1.clayLog        = this.claycontText.Text;
                 obj1.waterLog       = this.waterSatText.Text;
                 obj1.minPor         = Convert.ToDouble(this.minPorText.Text);
                 obj1.maxPor         = Convert.ToDouble(this.maxPorText.Text);
                 obj1.minWater       = Convert.ToDouble(this.minWaterText.Text);
                 obj1.maxWater       = Convert.ToDouble(this.maxWaterText.Text);
                 obj1.minClay        = Convert.ToDouble(this.minClayText.Text);
                 obj1.maxClay        = Convert.ToDouble(this.maxClayText.Text);
                 obj1.maincomboIndex = this.mainCombo.SelectedIndex;
                 obj1.b1             = BR;
                 obj1.workingFunction();
                 PetrelLogger.InfoOutputWindow("Process Completed");
             }
         }
     }
 }
Exemplo n.º 27
0
        //double[] LogPhie, LogSw, LogVsh;
        //WellLog LogType4;

        public void fromporosity()
        {
            //int count;
            //count = porLog.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);
            //List<WellLogSample> LogRhob = new List<WellLogSample>(LogType4.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[] rhob = 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;
                rhof    = sw * rhow + (1 - sw) * rhoh;
                rhom    = vsh * rhosh + (1 - vsh - phie) * rhomat;
                rhob[i] = phie * rhof + rhom;
                //PetrelLogger.InfoOutputWindow(rhob.ToString());
                //LogRhob[count].Value = (float)rhob;
            }
            Borehole b1 = porLog.Borehole;

            using (ITransaction trans = DataManager.NewTransaction())
            {
                IPropertyVersionService pvs  = PetrelSystem.PropertyVersionService;
                ILogTemplate            glob = pvs.FindTemplateByMnemonics("Density");
                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)rhob[i2];
                    tsamples[i2] = new WellLogSample(md, val);
                }
                log.Samples = tsamples;
                trans.Commit();
            }
            PetrelLogger.InfoBox("The Density Log has been created in the same Well");
        }
Exemplo n.º 28
0
        //Impedance is from Gardners relation is calculate here
        public void SonDrop3_DragDrop(object sender, DragEventArgs e)
        {
            object dropped = e.Data.GetData(typeof(object));
            //PetrelLogger.InfoBox(dropped.ToString());
            SdtWell3 = dropped as WellLog;

            if (SdtWell3 == null)
            {

                e.Effect = DragDropEffects.None;
                //porText1.Text = porWell.Name;
                PetrelLogger.InfoBox("Error:This is not a Well Log");
                return;

            }

            sonText3.Text = SdtWell3.Name;
        }
Exemplo n.º 29
0
 public ShaleVolume(WellLog LogType,int j)
 {
     this.spLog = LogType;
 }
Exemplo n.º 30
0
 public Velocity(WellLog LogType)
 {
     this.densLog = LogType;
 }
Exemplo n.º 31
0
 public Density(WellLog LogType1, WellLog LogType2)
 {
     this.ImpLog = LogType1;
     this.VelLog = LogType2;
 }
Exemplo n.º 32
0
 public Velocity(WellLog LogType1, WellLog LogType2, WellLog LogType3, int j)
 {
     this.porLog = LogType1;
     this.swLog = LogType2;
     this.vshLog = LogType3;
 }
Exemplo n.º 33
0
        public void DensDrop4_DragDrop(object sender, DragEventArgs e)
        {
            object dropped = e.Data.GetData(typeof(object));
            //PetrelLogger.InfoBox(dropped.ToString());
            DensWell4 = dropped as WellLog;

            if (DensWell4 == null)
            {

                e.Effect = DragDropEffects.None;
                //porText1.Text = porWell.Name;
                PetrelLogger.InfoBox("Error:This is not a Well Log");
                return;

            }

            DensText4.Text = DensWell4.Name;
        }
Exemplo n.º 34
0
 //public double rhob;
 public Impedance(WellLog LogType, int k)
 {
     this.densLog = LogType;
 }
Exemplo n.º 35
0
 public Impedance(WellLog LogType1, WellLog LogType2)
 {
     this.velLog = LogType1;
     this.densLog = LogType2;
 }
Exemplo n.º 36
0
 public Impedance(WellLog LogType)
 {
     this.dtLog = LogType;
 }
 public ReflectionCoefficient(WellLog LogType)
 {
     this.AcImpLog = LogType;
 }
Exemplo n.º 38
0
 public ElasticConstants(WellLog LogType1, int j)
 {
     this.vpvsLog = LogType1;
 }
Exemplo n.º 39
0
 public Density(WellLog LogType)
 {
     this.velLog = LogType;
 }
Exemplo n.º 40
0
 public ElasticConstants(WellLog LogType)
 {
     this.vshLog = LogType;
 }
Exemplo n.º 41
0
 public Density(WellLog LogType1, WellLog LogType2)
 {
     this.ImpLog = LogType1;
     this.VelLog = LogType2;
 }
Exemplo n.º 42
0
 //Calculating Elastic constants from here
 //Poison Ratio1
 public void vshDrop8_DragDrop(object sender, DragEventArgs e)
 {
     object dropped = e.Data.GetData(typeof(object));
     vshWell8 = dropped as WellLog;
     if (vshWell8 == null)
     {
         e.Effect = DragDropEffects.None;
         PetrelLogger.InfoBox("Error:This is not a Well Log");
         //vshText.Text = vshWell.Name;
     }
     else
     {
         e.Effect = DragDropEffects.All;
         vshText8.Text = vshWell8.Name;
     }
 }
Exemplo n.º 43
0
 public Density(WellLog LogType1, WellLog LogType2, WellLog LogType3)
 {
     this.porLog = LogType1;
     this.swLog  = LogType2;
     this.vshLog = LogType3;
 }
Exemplo n.º 44
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Workstep1UI"/> class.
        /// </summary>
        /// <param name="workstep">the workstep instance</param>
        /// <param name="args">the arguments</param>
        /// <param name="context">the underlying context in which this UI is being used</param>
        public CrossPlotUI(WellLog _x, WellLog _y, WellLog _z)
        {
            InitializeComponent();
            logX = _x;
            logY = _y;
            logZ = _z;
            DoubleBuffered = true;
            ResizeRedraw = true;
            List<WellLogSample> listX = new List<WellLogSample>(logX.Samples);
            List<WellLogSample> listY = new List<WellLogSample>(logY.Samples);
            List<WellLogSample> listZ = new List<WellLogSample>(logZ.Samples);
            if (listX.Count == 0 || listY.Count == 0 || listZ.Count == 0)
            {
                PetrelLogger.ErrorBox("NULL LOG found");

            }
            else
            {
                List<float> xvals = new List<float>(listX.Count);
                List<float> yvals = new List<float>(listY.Count);
                List<float> zvals = new List<float>(listZ.Count);
                List<WellLogSample> abc = new List<WellLogSample>(logX.Samples);
                for (int i = 0; i < listX.Count; i++)
                {
                    xvals.Add(listX[i].Value);
                    yvals.Add(listY[i].Value);
                    zvals.Add(listZ[i].Value);
                }
                xvals.Sort();
                yvals.Sort();
                zvals.Sort();

                List<float> valsx = new List<float>(logX.SampleCount);
                List<WellLogSample> samp = new List<WellLogSample>(logX.Samples);
                for (int i = 0; i < samp.Count; i++)
                {
                    valsx.Add(samp[i].Value);
                }
                valsx.Sort();
                centerX.Value = (decimal)valsx[0];
                float delta = 10000;
                for (int i = 0; i < valsx.Count - 1; i++)
                {
                    if (delta > valsx[i + 1] - valsx[i] &&
                        valsx[i + 1] - valsx[i] > 0.00001)
                        delta = valsx[i + 1] - valsx[i];
                }
                deltaX.Value = (decimal)delta;

                List<float> valsy = new List<float>(logY.SampleCount);
                samp = new List<WellLogSample>(logY.Samples);
                for (int i = 0; i < samp.Count; i++)
                {
                    valsy.Add(samp[i].Value);
                }
                valsy.Sort();
                centerY.Value = (decimal)valsy[0];
                delta = 100000;
                for (int i = 0; i < valsy.Count - 1; i++)
                {
                    if (delta > valsy[i + 1] - valsy[i] &&
                        valsy[i + 1] - valsy[i] > 0.00001)
                        delta = valsy[i + 1] - valsy[i];
                }
                deltaY.Value = (decimal)delta;
                List<float> valsz = new List<float>(logZ.SampleCount);
                samp = new List<WellLogSample>(logZ.Samples);
                for (int i = 0; i < samp.Count; i++)
                {
                    valsz.Add(samp[i].Value);
                }
                valsz.Sort();
                centerZ.Value = (decimal)valsz[0];
                delta = 100000;
                for (int i = 0; i < valsz.Count - 1; i++)
                {
                    if (delta > valsz[i + 1] - valsz[i] &&
                        valsz[i + 1] - valsz[i] > 0.00001)
                        delta = valsz[i + 1] - valsz[i];
                }
                deltaZ.Value = (decimal)delta;

                float xc = (float)centerX.Value;
                float yc = (float)centerY.Value;
                float zc = (float)centerZ.Value;
                float dx = (float)deltaX.Value;
                float dy = (float)deltaY.Value;
                float dz = (float)deltaZ.Value;
                Point3[] vals = new Point3[listX.Count];
                double[] min = new double[3];
                double[] max = new double[3];
                Point3[] minP = new Point3[3];
                Point3[] maxP = new Point3[3];
                max[0] = double.NegativeInfinity;
                max[1] = double.NegativeInfinity;
                max[2] = double.NegativeInfinity;
                min[0] = double.PositiveInfinity;
                min[1] = double.PositiveInfinity;
                min[2] = double.PositiveInfinity;
                for (int i = 0; i < listX.Count; i++)
                {
                    vals[i] = new Point3((listX[i].Value - xc) / dx, (listY[i].Value - yc) / dy,
                        (listZ[i].Value - zc) / dz);
                    if (vals[i].X < min[0])
                    {
                        min[0] = vals[i].X;
                        minP[0] = vals[i];
                    }
                    if (vals[i].Y < min[1])
                    {
                        min[1] = vals[i].Y;
                        minP[1] = vals[i];
                    }
                    if (vals[i].Z < min[2])
                    {
                        min[2] = vals[i].Z;
                        minP[2] = vals[i];
                    }
                    if (vals[i].X > max[0])
                    {
                        max[0] = vals[i].X;
                        maxP[0] = vals[i];
                    }
                    if (vals[i].Y > max[1])
                    {
                        max[1] = vals[i].Y;
                        maxP[1] = vals[i];
                    }
                    if (vals[i].Z > max[2])
                    {
                        max[2] = vals[i].Z;
                        maxP[2] = vals[i];
                    }
                }

                sr = new Surface3DRenderer(70, 35, 40, 0, 0, ClientRectangle.Width, ClientRectangle.Height,
                    0, 0, vals, min, max, minP, maxP);
                Invalidate();
            }
        }
Exemplo n.º 45
0
        //WellLog WellLog1, WellLog2;

        public ThreeLogCheck(WellLog LogType1, WellLog LogType2, WellLog LogType3)
        {
            List <WellLogSample> Log1 = new List <WellLogSample>(LogType1.Samples);
            List <WellLogSample> Log2 = new List <WellLogSample>(LogType2.Samples);
            List <WellLogSample> Log3 = new List <WellLogSample>(LogType3.Samples);

            //Console.WriteLine(Log1.Count);
            //Console.WriteLine(Log2.Count);

            interval1 = Log1[1].MD - Log1[0].MD;
            interval2 = Log2[1].MD - Log2[0].MD;
            interval3 = Log3[1].MD - Log3[0].MD;
            if (Math.Abs(interval1 - interval2) < 10e-4d && Math.Abs(interval1 - interval3) < 10e-4d && Math.Abs(interval2 - interval2) < 10e-4d)
            {
                if (Math.Abs(Log1[0].MD - Log2[0].MD) > 10e-4 || Math.Abs(Log1[Log1.Count - 1].MD - Log2[Log2.Count - 1].MD) > 10e-4 || Math.Abs(Log1[0].MD - Log3[0].MD) > 10e-4 || Math.Abs(Log1[Log1.Count - 1].MD - Log3[Log3.Count - 1].MD) > 10e-4 || Math.Abs(Log2[0].MD - Log3[0].MD) > 10e-4 || Math.Abs(Log2[Log2.Count - 1].MD - Log3[Log3.Count - 1].MD) > 10e-4)
                {
                    if (Log1[0].MD > Math.Max(Log2[0].MD, Log3[0].MD))
                    {
                        startMD = Log1[0].MD;
                    }
                    else if (Log2[0].MD > Math.Max(Log1[0].MD, Log3[0].MD))
                    {
                        startMD = Log2[0].MD;
                    }
                    else if (Log3[0].MD > Math.Max(Log1[0].MD, Log2[0].MD))
                    {
                        startMD = Log3[0].MD;
                    }

                    if (Log1[Log1.Count - 1].MD < Math.Min(Log2[Log2.Count - 1].MD, Log3[Log3.Count - 1].MD))
                    {
                        endMD = Log1[Log1.Count - 1].MD;
                    }
                    else if (Log2[Log2.Count - 1].MD < Math.Min(Log1[Log1.Count - 1].MD, Log3[Log3.Count - 1].MD))
                    {
                        endMD = Log2[Log2.Count - 1].MD;
                    }
                    else if (Log3[Log3.Count - 1].MD < Math.Min(Log1[Log1.Count - 1].MD, Log2[Log2.Count - 1].MD))
                    {
                        endMD = Log3[Log3.Count - 1].MD;
                    }


                    for (int xxx = 0; xxx < Log1.Count; xxx++)
                    {
                        if (Math.Abs(Log1[xxx].MD - startMD) < 10e-4)
                        {
                            startLog1 = xxx;
                        }
                        if (Math.Abs(Log1[xxx].MD - endMD) < 10e-4)
                        {
                            endLog1 = xxx;
                        }
                    }
                    for (int xxx = 0; xxx < Log2.Count; xxx++)
                    {
                        if (Math.Abs(Log2[xxx].MD - startMD) < 10e-4)
                        {
                            startLog2 = xxx;
                        }
                        if (Math.Abs(Log2[xxx].MD - endMD) < 10e-4)
                        {
                            endLog2 = xxx;
                        }
                    }

                    for (int xxx = 0; xxx < Log3.Count; xxx++)
                    {
                        if (Math.Abs(Log3[xxx].MD - startMD) < 10e-4)
                        {
                            startLog3 = xxx;
                        }
                        if (Math.Abs(Log3[xxx].MD - endMD) < 10e-4)
                        {
                            endLog3 = xxx;
                        }
                    }
                    count = endLog1 - startLog1 + 1;
                }
                else
                {
                    count   = Log1.Count;
                    startMD = Log1[0].MD;
                    endMD   = Log1[Log1.Count - 1].MD;
                }
            }
        }
Exemplo n.º 46
0
 private void xDropper_DragDrop(object sender, DragEventArgs e)
 {
     logX = (WellLog)e.Data.GetData(typeof(WellLog));
     if (logX != null)
     {
         xText.Text = logX.Name;
     }
     else
     {
         xText.Text = "";
         MessageBox.Show("Not a valid Well Log");
     }
 }
Exemplo n.º 47
0
 public ElasticConstants(WellLog LogType1, WellLog LogType2, WellLog LogType3)
 {
     this.densLog = LogType1;
     this.dtLog   = LogType2;
     this.poisLog = LogType3;
 }
Exemplo n.º 48
0
 public void DensDrop_DragDrop(object sender, DragEventArgs e)
 {
     object dropped = e.Data.GetData(typeof(object));
     DensWell2 = dropped as WellLog;
     if (DensWell2 == null)
     {
         e.Effect = DragDropEffects.None;
         PetrelLogger.InfoBox("Error:This is not a Well Log");
         //swText.Text = swWell.Name;
     }
     else
     {
         e.Effect = DragDropEffects.All;
         //PetrelLogger.InfoBox("Something's is IN");
         DensText2.Text = DensWell2.Name;
     }
 }
Exemplo n.º 49
0
 public RACO(WellLog density, WellLog sonic)
 {
     this.density = density;
     this.sonic = sonic;
 }
Exemplo n.º 50
0
        //WellLog WellLog1, WellLog2;
        public ThreeLogCheck(WellLog LogType1, WellLog LogType2, WellLog LogType3)
        {
            List<WellLogSample> Log1 = new List<WellLogSample>(LogType1.Samples);
            List<WellLogSample> Log2 = new List<WellLogSample>(LogType2.Samples);
            List<WellLogSample> Log3 = new List<WellLogSample>(LogType3.Samples);
            //Console.WriteLine(Log1.Count);
            //Console.WriteLine(Log2.Count);

            interval1 = Log1[1].MD - Log1[0].MD;
            interval2 = Log2[1].MD - Log2[0].MD;
            interval3 = Log3[1].MD - Log3[0].MD;
            if (Math.Abs(interval1 - interval2) < 10e-4d && Math.Abs(interval1 - interval3) < 10e-4d && Math.Abs(interval2 - interval2) < 10e-4d)
            {
                if (Math.Abs(Log1[0].MD - Log2[0].MD)>10e-4 || Math.Abs(Log1[Log1.Count - 1].MD - Log2[Log2.Count - 1].MD)>10e-4 || Math.Abs(Log1[0].MD - Log3[0].MD)>10e-4 || Math.Abs(Log1[Log1.Count - 1].MD - Log3[Log3.Count - 1].MD)>10e-4 || Math.Abs(Log2[0].MD - Log3[0].MD)>10e-4 || Math.Abs(Log2[Log2.Count - 1].MD - Log3[Log3.Count - 1].MD)>10e-4)
                {
                    if (Log1[0].MD > Math.Max(Log2[0].MD, Log3[0].MD))
                        startMD = Log1[0].MD;
                    else if (Log2[0].MD > Math.Max(Log1[0].MD, Log3[0].MD))
                        startMD = Log2[0].MD;
                    else if (Log3[0].MD > Math.Max(Log1[0].MD, Log2[0].MD))
                        startMD = Log3[0].MD;

                    if (Log1[Log1.Count - 1].MD < Math.Min(Log2[Log2.Count - 1].MD, Log3[Log3.Count-1].MD))
                        endMD = Log1[Log1.Count - 1].MD;
                    else if (Log2[Log2.Count - 1].MD < Math.Min(Log1[Log1.Count - 1].MD, Log3[Log3.Count - 1].MD))
                        endMD = Log2[Log2.Count-1].MD;
                    else if (Log3[Log3.Count - 1].MD < Math.Min(Log1[Log1.Count - 1].MD, Log2[Log2.Count - 1].MD))
                        endMD = Log3[Log3.Count-1].MD;

                    for (int xxx = 0; xxx < Log1.Count; xxx++)
                    {
                        if (Math.Abs(Log1[xxx].MD - startMD)<10e-4)
                            startLog1 = xxx;
                        if (Math.Abs(Log1[xxx].MD - endMD)<10e-4)
                            endLog1 = xxx;
                    }
                    for (int xxx = 0; xxx < Log2.Count; xxx++)
                    {
                        if (Math.Abs(Log2[xxx].MD - startMD)<10e-4)
                            startLog2 = xxx;
                        if (Math.Abs(Log2[xxx].MD - endMD)<10e-4)
                            endLog2 = xxx;
                    }

                    for (int xxx = 0; xxx < Log3.Count; xxx++)
                    {
                        if (Math.Abs(Log3[xxx].MD - startMD)<10e-4)
                            startLog3 = xxx;
                        if (Math.Abs(Log3[xxx].MD - endMD)<10e-4)
                            endLog3 = xxx;
                    }
                    count = endLog1 - startLog1 + 1;
                }
                else
                {
                    count = Log1.Count;
                    startMD = Log1[0].MD;
                    endMD = Log1[Log1.Count - 1].MD;
                }
               }
        }
Exemplo n.º 51
0
 /// <summary>
 /// Sets additional default values for the specified data object.
 /// </summary>
 /// <param name="dataObject">The data object.</param>
 /// <param name="uri">The URI.</param>
 partial void SetAdditionalDefaultValues(WellLog dataObject, EtpUri uri)
 {
     dataObject.IndexType = LogIndexType.unknown;
 }
Exemplo n.º 52
0
        //Porosity from gamma ray log is calculated here
        public void GrDrop1_DragDrop(object sender, DragEventArgs e)
        {
            object dropped = e.Data.GetData(typeof(object));
            //PetrelLogger.InfoBox(dropped.ToString());
            NporWell = dropped as WellLog;

            if (NporWell == null)
            {

                e.Effect = DragDropEffects.None;
                //porText1.Text = porWell.Name;
                PetrelLogger.InfoBox("Error:This is not a Well Log");
                return;

            }

            e.Effect = DragDropEffects.All;
            GrText1.Text = NporWell.Name;
        }