示例#1
0
        public bool AddRange(Point center, EcoObjectsList list, PetrochemicalType petrochemicaltype, float concentration = 0.0f, float watertime = 0.0f)
        {
            list.ForEach(p => this.Add(new GroundPollution(p,
                                                           p.coordinates.Distance(center.coordinates),
                                                           Helper.GeoAngle(center, p),
                                                           petrochemicaltype,
                                                           concentration,
                                                           watertime
                                                           )));

            return(true);
        }
示例#2
0
        public WaterBlur(XmlNode node)
        {
            XmlNode groudblur = node.SelectSingleNode(".//GroundBlur");

            if (groudblur != null)
            {
                this.groudblur = new GroundBlur(groudblur);
            }
            else
            {
                this.groudblur = null;
            }

            XmlNode coordinates_list = node.SelectSingleNode(".//CoordinatesList");

            if (coordinates_list != null)
            {
                this.border = CoordinatesList.CreateCoordinatesList(coordinates_list);
            }
            else
            {
                this.border = null;
            }

            this.radius       = Helper.GetFloatAttribute(node, "radius", 0.0f);
            this.toobporosity = Helper.GetFloatAttribute(node, "toobporosity", 0.0f);
            this.toobheight   = Helper.GetFloatAttribute(node, "toobheight", 0.0f);

            XmlNode eco_objects_list = node.SelectSingleNode(".//EcoObjectsList");

            if (eco_objects_list != null)
            {
                this.ecoobjectslist = EcoObjectsList.CreateEcoObjectsList(eco_objects_list);
            }
            else
            {
                this.ecoobjectslist = null;
            }

            XmlNode water_pollution_list = node.SelectSingleNode(".//WaterPollutionList");

            if (water_pollution_list != null)
            {
                this.watepollutionlist = WaterPollutionList.CreateWaterPollutionList(water_pollution_list);
            }
            else
            {
                this.watepollutionlist = null;
            }
        }
示例#3
0
        }                                                                // список точек в водном пятне


        public WaterBlur(IDBContext db, GroundBlur groundblur)
        {
            this.groudblur    = groundblur;
            this.toobporosity = this.groudblur.spreadpoint.groundtype.porosity / 2.0f;    // считаем такой пористость водоносного слоя
            this.toobheight   = 1.0f;                                                     // считаем мощность водоносного слоя = 1

            this.radius =
                this.groudblur.restmass /                                                                   // макс. радиус поиска природоохранных объектов
                (
                    this.toobheight *                                                                       // мощность слоя грунтовых вод (1м)
                    2.0f * this.groudblur.radius /                                                          // площадь трубы
                    2.0f *                                                                                  // треугольник
                    this.groudblur.waterproperties.density *                                                // плотность воды
                    this.groudblur.spreadpoint.groundtype.porosity *                                        // пористость грунта /2 c водой
                    this.groudblur.spreadpoint.groundtype.watercapacity *                                   // капилярная влагоемкость грунта                                                      // максиальная маса нефтепродукта, кот. может быть адсорбирована грунтом (кг)
                    (float)Math.Pow(this.groudblur.spreadpoint.petrochemicaltype.dynamicviscosity, 2) *     // динамическая вязкость ???
                    this.groudblur.waterproperties.tension /                                                // коэфициент поверхностного натяжения воды
                    (
                        this.groudblur.spreadpoint.petrochemicaltype.tension *                              // коэфициент поверхностного натяжения нефтепродукта
                        (float)Math.Pow(this.groudblur.waterproperties.viscocity, 2)                        //  вязкость воды
                    )
                );

            //this.limitadsorbedmass =                                                                     // максиальная маса нефтепродукта, кот. может быть адсорбирована грунтом (кг)
            //                                   this.avgdeep *                                                           // средняя глубина грутовы вод
            //                                   this.square *                                                            // площадь пролива
            //                                   this.waterproperties.density *                                           // плотность воды
            //                                   this.spreadpoint.groundtype.porosity *                                   // пористость грунта
            //                                   this.spreadpoint.groundtype.watercapacity *                              // капилярная влагоемкость грунта                                                     // максиальная маса нефтепродукта, кот. может быть адсорбирована грунтом (кг)
            //                                   (float)Math.Pow(this.spreadpoint.petrochemicaltype.dynamicviscosity, 2) *       // динамическая вязкость
            //                                   this.waterproperties.tension /                                           // коэфициент поверхностного натяжения воды
            //                                   (
            //                                   this.spreadpoint.petrochemicaltype.tension *                             // коэфициент поверхностного натяжения нефтепродукта
            //                                   (float)Math.Pow(this.waterproperties.viscocity, 2)                       //  вязкость воды
            //                                   );



            this.ecoobjectslist    = EcoObjectsList.CreateEcoObjectsList(db, this.groudblur.spreadpoint, this.groudblur.radius, this.radius);
            this.watepollutionlist = new WaterPollutionList();
            float sv = 0;

            foreach (EcoObject o in this.ecoobjectslist)
            {
                float h1 = this.groudblur.spreadpoint.height - o.height;                          //раница высот
                float h2 = o.waterdeep - this.groudblur.spreadpoint.waterdeep;                    //раница глубин
                float h  = (h2 == 0?h1:h2);

                float d = this.groudblur.spreadpoint.coordinates.Distance(o.coordinates);          //растояние
                float a = d <= 0.0f ? 0.0f : h / d;                                                //гидравлический угол
                float v = a <= 0?0.0f:this.groudblur.spreadpoint.groundtype.waterfilter * a;       //горинтальная скорость
                sv += v;                                                                           //сумма скоростей для нормирования
                this.watepollutionlist.Add(new WaterPollution(o, d, a, this.groudblur.spreadpoint.petrochemicaltype, v, 0.0f, v > 0.0f?d / v:Const.TIME_INFINITY));
            }
            this.border = new CoordinatesList();

            foreach (WaterPollution p in this.watepollutionlist)
            {
                if (p.speedhorizontal > 0.0f)
                {
                    // p.maxconcentration = ((p.speedhorizontal / sv) * this.groudblur.restmass) / (2.0f * this.groudblur.radius * p.distance * 1.0f);
                    p.maxconcentration = ((p.speedhorizontal / sv) * this.groudblur.restmass) / (2.0f * this.groudblur.radius * p.distance * 1.0f * p.groundtype.density);
                }
            }
        }
示例#4
0
文件: GroundBlur.cs 项目: smw60/EGH02
        public GroundBlur(SpreadPoint spreadpoint)
        {
            this.spreadpoint = spreadpoint;
            RGEContext db = new RGEContext();    // заглушка, выставить правильный контекст //blinova

            this.bordercoordinateslist = new CoordinatesList();

            if (this.spreadpoint.groundtype.watercapacity >= this.spreadpoint.groundtype.porosity)
            {
                throw new EGHDBException(string.Format(errormssageformat, "Влагоемкость грунта не может быть  больше или равна  пористости"));
            }

            if (this.spreadpoint.groundtype.watercapacity >= this.spreadpoint.groundtype.soilmoisture)
            {
                throw new EGHDBException(string.Format(errormssageformat, "Влагоемкость грунта не может быть  больше или равна  влажности грунта"));
            }

            if (this.spreadpoint.petrochemicaltype.tension <= 0)
            {
                throw new EGHDBException(string.Format(errormssageformat, "Коэффициент поверностного натяжение нефтеродукта не может быть меньше или равным нулю "));
            }


            { // коэф. разлива
                float k = SpreadingCoefficient.GetByData(db, this.spreadpoint.groundtype, this.spreadpoint.petrochemicaltype, this.spreadpoint.volume, 0.0f);
                this.spreadingcoefficient = new SpreadingCoefficient(0, this.spreadpoint.groundtype, this.spreadpoint.petrochemicaltype, 0.0f, this.spreadpoint.volume, 0.0f, 0.02f, k);
            }
            if (this.spreadingcoefficient.koef <= 0.0f)
            {
                //this.spreadingcoefficient = new SpreadingCoefficient(0, this.spreadpoint.groundtype, this.spreadpoint.petrochemicaltype, 0.0f, this.spreadpoint.volume, 0.0f, 0.02f, 5.0f);  // заглушка
                throw new EGHDBException(string.Format(errormssageformat, "Коэффициент разлива не может быть меньше или равен нулю"));
            }



            { // свойства воды
                WaterProperties x = new WaterProperties();
                // RGEContext db = new RGEContext();// заглушка, выставить правильный контекст //blinova
                float delta = 0.0f;
                if (WaterProperties.Get(db, 20.0f, out x, out delta))
                {
                    this.waterproperties = x;
                }
            }
            if (this.waterproperties.viscocity <= 0)
            {
                throw new EGHDBException(string.Format(errormssageformat, "Вязкость воды  не может быть меньше или равным нулю "));
            }


            this.square = this.spreadpoint.volume * this.spreadingcoefficient.koef;                  // площадь  пятна

            this.radius = (float)Math.Sqrt(square / Math.PI);                                        // радиус  пятна

            this.petrochemicalheight = this.spreadpoint.volume / this.square;                        // высота слоя разлитого нефтепродукта (м)

            this.totalmass = this.spreadpoint.volume * this.spreadpoint.petrochemicaltype.density;   // масса пролива



            this.anchorpointlist = AnchorPointList.CreateNear(this.spreadpoint.coordinates, this.radius);

            this.ecoobjectsearchradius = this.radius;
            this.ecoobjecstlist        = EcoObjectsList.CreateEcoObjectsList(db, this.spreadpoint, this.ecoobjectsearchradius);

            this.groundpolutionlist = new GroundPollutionList(this.spreadpoint);
            this.groundpolutionlist.AddRange(this.spreadpoint, this.anchorpointlist, this.spreadpoint.petrochemicaltype);
            this.groundpolutionlist.AddRange(this.spreadpoint, this.ecoobjecstlist, this.spreadpoint.petrochemicaltype);


            //  переделать как метод this.groundpolutionlist
            this.avgdeep =                                                                              // средняя глубина грунтовых вод по опорным точкам  и техногенному  объекту
                           (
                anchorpointlist.sumwaterdeep +
                (this.spreadpoint.riskobject != null ? this.spreadpoint.waterdeep : 0.0f)
                           ) /
                           (anchorpointlist.Count + 1);


            this.limitadsorbedmass =                                                                           // максиальная маса нефтепродукта, кот. может быть адсорбирована грунтом (кг)
                                     this.avgdeep *                                                            // средняя глубина грутовы вод
                                     this.square *                                                             // площадь пролива
                                     this.waterproperties.density *                                            // плотность воды
                                     this.spreadpoint.groundtype.porosity * (0.01f) *                          // пористость грунта  * 0.01 (smw 2017.06.18)
                                     this.spreadpoint.groundtype.watercapacity *                               // капилярная влагоемкость грунта                                                     // максиальная маса нефтепродукта, кот. может быть адсорбирована грунтом (кг)
                                     (float)Math.Pow(this.spreadpoint.petrochemicaltype.dynamicviscosity, 2) * // динамическая вязкость
                                     this.waterproperties.tension /                                            // коэфициент поверхностного натяжения воды
                                     (
                this.spreadpoint.petrochemicaltype.tension *                                                   // коэфициент поверхностного натяжения нефтепродукта
                (float)Math.Pow(this.waterproperties.viscocity, 2)                                             //  вязкость воды
                                     );



            this.adsorbedmass = (limitadsorbedmass >= this.totalmass ? this.totalmass : limitadsorbedmass);             // адсорбированная масса нефтепродукта в грунте т - М1

            this.restmass = (this.adsorbedmass >= this.totalmass ? 0 : this.totalmass - this.adsorbedmass);             // масса нефтепродукта достигшая грунтовых вод



            this.depth = (this.restmass > 0 ? this.avgdeep : (float)Math.Round(this.avgdeep * (this.totalmass / this.limitadsorbedmass), 3)); // глубина проникновения нефтепродукта в грунт

            if (this.depth > 0)                                                                                                               // если глубина проникновения > 0
            {
                this.concentrationinsoil =                                                                                                    // средняя концентрация нефтепродуктов в грунте

                                           this.adsorbedmass /                                                                                // адсорбированная масса нефтепродукта в грунте
                                           (
                    this.square *                                                                                                             // площадь  пятна
                    this.depth *                                                                                                              // глубина проникновения нефтепродукта в грунт
                    this.spreadpoint.groundtype.density                                                                                       // средняя плотность грунта
                                           );
            }
            else
            {
                this.concentrationinsoil = 0.0f;
            }



            {                                                        //   вертикальная скорость проникновения нефтепродукта в грунт (м/с)
                float ka =                                           // формула аверьянова
                           this.spreadpoint.groundtype.waterfilter * // коэф. фильтрации воды
                           (
                    this.spreadpoint.groundtype.soilmoisture -       // влажность грунта
                    this.spreadpoint.groundtype.watercapacity        // капилярная влагоемкость грунта
                           ) /
                           (
                    this.spreadpoint.groundtype.porosity -                                        //  пористость грунта
                    this.spreadpoint.groundtype.watercapacity                                     // капилярная влагоемкость грунта
                           );

                float r =                                                                          // коэффициент задержки
                          (
                    this.spreadpoint.petrochemicaltype.dynamicviscosity *                          // вязкость нефтепродукта
                    this.waterproperties.density                                                   // плотность воды
                          ) /
                          (
                    this.waterproperties.viscocity *                                               // вязкость воды
                    this.spreadpoint.petrochemicaltype.density                                     // плотность нефтепродукта
                          );

                this.speedvertical = this.petrochemicalheight *                                    //  А.Авхимович: высота слоя разлитого нефтепродукта (м)             // вы
                                     (ka / r);                                                     // вертикальная скорость проникновения нефтепродукта в грунт (м/с)
            }

            this.timeconcentrationinsoil =                                                         // время достижения усреднееной концентации  в грунте
                                           this.depth /                                            // глубина проникновения нефтепродукта в грунт
                                           this.speedvertical;                                     // вертикальная скорость проникновения нефтепродукта в грунт (м/с)


            if (this.restmass > 0)
            {
                this.timewatercomletion =                                                           // время продвижения нефтепродукта до грунтовых вод
                                          this.avgdeep /                                            // средняя глубина грунтовых вод по опорным точкам (м)
                                          this.speedvertical;                                       // вертикальная скорость проникновения нефтепродукта в грунт (м/с)

                this.dtimemaxwaterconc =                                                            // время (с) достижения  максимальной концентрации  нефтепродуктом грунтовых вод  после достиженич границы грунтовых вод
                                         this.petrochemicalheight /                                 // высота слоя разлитого нефтепродукта (м)
                                         (
                    this.speedvertical *                                                            // вертикальная скорость проникновения нефтепродукта в грунт (м/с)
                    this.spreadpoint.groundtype.porosity                                            // пористость грунта
                                         );

                this.timemaxwaterconc = this.timewatercomletion + this.dtimemaxwaterconc;                // время (с) достижения  максимальной концентрации на уровне грунтовых вод
            }
            else
            {
                this.timewatercomletion = Const.TIME_INFINITY;                                         // никогда
                this.dtimemaxwaterconc  = Const.TIME_INFINITY;                                         // никогда
                this.timemaxwaterconc   = Const.TIME_INFINITY;                                         // никогда
            }


            {
                if (restmass > 0)                                    // если не все адсорбировалось в грунте
                {
                    this.ozcorrection =                              // OZ-поправка
                                        this.petrochemicalheight *   // высота слоя разлитого нефтепродукта (м)
                                        this.restmass /              // масса нефтепродукта достигшая грунтовых вод (кг)
                                        this.totalmass;              // масса пролива (кг)

                    this.maxconcentrationwater = (float)             // максимальной концентрация на уровне грунтовых вод кг/м3
                                                 (
                        this.restmass /                              // масса нефтепродукта достигшая грунтовых вод (кг)
                        (Math.PI * this.radius * this.radius) * 1.0f // объем воды
                        /
                        (this.ozcorrection * Math.Sqrt(2 * Math.PI)) // поправка 0Z
                                                 );
                }
                else // если все адсорбировалось в грунте
                {
                    this.ozcorrection          = 0.0f;
                    this.maxconcentrationwater = 0.0f;
                }
            }
        }
示例#5
0
文件: GroundBlur.cs 项目: smw60/EGH02
        public GroundBlur(XmlNode node)
        {
            {
                XmlNode x = node.SelectSingleNode(".//SpreadPoint");
                if (x != null)
                {
                    this.spreadpoint = new SpreadPoint(x);
                }
                else
                {
                    this.spreadpoint = null;
                }
            }


            XmlNode coordinates_list = node.SelectSingleNode(".//CoordinatesList");

            if (coordinates_list != null)
            {
                this.bordercoordinateslist = CoordinatesList.CreateCoordinatesList(coordinates_list);
            }
            else
            {
                this.bordercoordinateslist = null;
            }

            XmlNode spreading_coef = node.SelectSingleNode(".//SpreadingCoefficient");

            if (spreading_coef != null)
            {
                this.spreadingcoefficient = new SpreadingCoefficient(spreading_coef);
            }
            else
            {
                this.spreadingcoefficient = null;
            }

            this.square            = Helper.GetFloatAttribute(node, "square", 0.0f);
            this.radius            = Helper.GetFloatAttribute(node, "radius", 0.0f);
            this.totalmass         = Helper.GetFloatAttribute(node, "totalmass", 0.0f);
            this.limitadsorbedmass = Helper.GetFloatAttribute(node, "limitadsorbedmass", 0.0f);

            this.avgdeep             = Helper.GetFloatAttribute(node, "avgdeep", 0.0f);
            this.petrochemicalheight = Helper.GetFloatAttribute(node, "petrochemicalheight", 0.0f);
            this.adsorbedmass        = Helper.GetFloatAttribute(node, "adsorbedmass", 0.0f);
            this.restmass            = Helper.GetFloatAttribute(node, "restmass", 0.0f);

            this.depth = Helper.GetFloatAttribute(node, "depth", 0.0f);
            this.concentrationinsoil     = Helper.GetFloatAttribute(node, "concentrationinsoil", 0.0f);
            this.timeconcentrationinsoil = Helper.GetFloatAttribute(node, "timeconcentrationinsoil", 0.0f);
            this.speedvertical           = Helper.GetFloatAttribute(node, "speedvertical", 0.0f);

            this.timewatercomletion    = Helper.GetFloatAttribute(node, "timewatercomletion", 0.0f);
            this.dtimemaxwaterconc     = Helper.GetFloatAttribute(node, "dtimemaxwaterconc", 0.0f);
            this.timemaxwaterconc      = Helper.GetFloatAttribute(node, "timemaxwaterconc", 0.0f);
            this.maxconcentrationwater = Helper.GetFloatAttribute(node, "maxconcentrationwater", 0.0f);
            this.ozcorrection          = Helper.GetFloatAttribute(node, "ozcorrection", 0.0f);
            this.ecoobjectsearchradius = Helper.GetFloatAttribute(node, "ecoobjectsearchradius", 0.0f);

            {
                XmlNode x = node.SelectSingleNode(".//AnchorPointList");
                if (x != null)
                {
                    this.anchorpointlist = AnchorPointList.CreateAnchorPointList(x);
                }
                else
                {
                    this.anchorpointlist = null;
                }
            }
            {
                XmlNode x = node.SelectSingleNode(".//GroundPollutionList");
                if (x != null)
                {
                    this.groundpolutionlist = GroundPollutionList.Create(x);
                }
                else
                {
                    this.groundpolutionlist = null;
                }
            }
            {
                XmlNode x = node.SelectSingleNode(".//WaterProperties");
                if (x != null)
                {
                    this.waterproperties = new WaterProperties(x);
                }
                else
                {
                    this.waterproperties = null;
                }
            }
            {
                XmlNode x = node.SelectSingleNode(".//EcoObjectsList");
                if (x != null)
                {
                    this.ecoobjecstlist = EcoObjectsList.CreateEcoObjectsList(x);
                }
                else
                {
                    this.ecoobjecstlist = null;
                }
            }
        }
示例#6
0
 public GroundPollutionList(Point center, EcoObjectsList list, PetrochemicalType petrochemicaltype, float concentration = 0.0f, float watertime = 0.0f)
 {
     this.AddRange(center, list, petrochemicaltype, concentration, watertime);
 }