示例#1
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");
        }
示例#2
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");
        }
示例#3
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");
        }
示例#4
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");
        }
示例#5
0
        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");
        }