예제 #1
0
        public List <WellData> ParseSkv(string filename)
        {
            Converter converter = new Converter();

            var result = new List <WellData>();
            var sr     = new StreamReader(filename);

            string[] buf;
            sr.ReadLine();
            sr.ReadLine();
            sr.ReadLine();
            while (!sr.EndOfStream)
            {
                buf = sr.ReadLine().Split(new char[] { ' ', '\t' });
                if ((buf.Count() == 8) && (buf.Count(x => x == "") == 0))
                {
                    result.Add(new WellData
                    {
                        Name = buf[0],
                        Data = new wells_measurements()
                        {
                            measure_date = Convert.ToDateTime(buf[1]),
                            gas_output   = (float)(Convert.ToDouble(buf[2]) * 1000 / converter.ToSec(1, Units.Day)),
                            cond_output  = (float)(converter.ToKG(Convert.ToDouble(buf[3]), Units.T) / converter.ToSec(1, Units.Day)),
                            wellhead_P   = (float)(converter.ToPascal(Convert.ToDouble(buf[4]))),
                            wellhead_T   = (float)(converter.ToK(Convert.ToDouble(buf[5]), Units.C)),
                            inlet_P      = (float)(converter.ToPascal(Convert.ToDouble(buf[6]))),
                            inlet_T      = (float)(converter.ToK(Convert.ToDouble(buf[7]), Units.C))
                        }
                    });
                }
            }
            return(result);
        }
예제 #2
0
        public List <SborData> ParseSbor(string filename)
        {
            Converter converter = new Converter();

            var result = new List <SborData>();
            var sr     = new StreamReader(filename);

            string[] buf;
            sr.ReadLine();
            sr.ReadLine();
            sr.ReadLine();
            while (!sr.EndOfStream)
            {
                buf = sr.ReadLine().Split(new char[] { ' ', '\t' });
                if ((buf.Count() == 3) && (buf.Count(x => x == "") == 0))
                {
                    result.Add(new SborData
                    {
                        Date = Convert.ToDateTime(buf[0]),
                        P    = converter.ToPascal(Convert.ToDouble(buf[1])),
                        T    = converter.ToK(Convert.ToDouble(buf[2]), Units.C)
                    });
                }
            }
            return(result);
        }
예제 #3
0
        public List<WellData> ParseSkv(string filename)
        {
            Converter converter = new Converter();

            var result = new List<WellData>();
            var sr = new StreamReader(filename);
            string[] buf;
            sr.ReadLine();
            sr.ReadLine();
            sr.ReadLine();
            while (!sr.EndOfStream)
            {
                buf = sr.ReadLine().Split(new char[] { ' ', '\t' });
                if ((buf.Count() == 8)&&(buf.Count(x => x == "") == 0))
                    result.Add(new WellData
                    {
                        Name = buf[0],
                        Data = new wells_measurements()
                        {
                            measure_date = Convert.ToDateTime(buf[1]),
                            gas_output = (float)(Convert.ToDouble(buf[2]) * 1000 / converter.ToSec(1, Units.Day)),
                            cond_output = (float)(converter.ToKG(Convert.ToDouble(buf[3]), Units.T) / converter.ToSec(1, Units.Day)),
                            wellhead_P = (float)(converter.ToPascal(Convert.ToDouble(buf[4]))),
                            wellhead_T = (float)(converter.ToK(Convert.ToDouble(buf[5]), Units.C)),
                            inlet_P = (float)(converter.ToPascal(Convert.ToDouble(buf[6]))),
                            inlet_T = (float)(converter.ToK(Convert.ToDouble(buf[7]), Units.C))
                        }
                    });
            }
            return result;
        }
예제 #4
0
        public List<SborData> ParseSbor(string filename)
        {
            Converter converter = new Converter();

            var result = new List<SborData>();
            var sr = new StreamReader(filename);
            string[] buf;
            sr.ReadLine();
            sr.ReadLine();
            sr.ReadLine();
            while (!sr.EndOfStream)
            {
                buf = sr.ReadLine().Split(new char[] { ' ', '\t' });
                if ((buf.Count() == 3)&&(buf.Count(x => x == "") == 0))
                    result.Add(new SborData
                    {
                        Date = Convert.ToDateTime(buf[0]),
                        P = converter.ToPascal(Convert.ToDouble(buf[1])),
                        T = converter.ToK(Convert.ToDouble(buf[2]), Units.C)
                    });
            }
            return result;
        }