예제 #1
0
        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");
        }
예제 #2
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");
        }
예제 #3
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");
        }
예제 #4
0
        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");
        }
예제 #5
0
        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");
        }
예제 #6
0
        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");
        }