示例#1
0
        /// <summary>
        /// Adds a new JupiterIntake to the well
        /// </summary>
        /// <param name="IDNumber"></param>
        /// <returns></returns>
        public override IIntake AddNewIntake(int IDNumber)
        {
            JupiterIntake JI = new JupiterIntake(this, IDNumber);

            _intakes.Add(JI);
            return(JI);
        }
示例#2
0
        private IIntake AddNewIntake(IIntake intake)
        {
            JupiterIntake Ji = new JupiterIntake(this, intake);

            _intakes.Add(Ji);
            return(Ji);
        }
示例#3
0
        public IWellCollection ReadWellsInSteps()
        {
            string[] NotExtractionPurpose = new string[] { "A", "G", "I", "J", "L", "R", "U", "M", "P" };
            string[] ExtractionUse        = new string[] { "C", "V", "VA", "VD", "VH", "VI", "VM", "VP", "VV" };
            string[] NotExtractionUse     = new string[] { "A", "G", "I", "J", "L", "R", "U", "M", "P" };

            IWellCollection Wells = new IWellCollection();
            JupiterWell     CurrentWell;
            JupiterIntake   CurrentIntake;

            #region Borehole
            JXL.ReadWellsOnly();
            //Loop the wells
            foreach (var Boring in JXL.BOREHOLE)
            {
                CurrentWell = new JupiterWell(Boring.BOREHOLENO);
                Wells.Add(CurrentWell);

                if (!Boring.IsXUTMNull())
                {
                    CurrentWell.X = Boring.XUTM;
                }
                else //If no x set x to 0!
                {
                    CurrentWell.X = 0;
                }

                if (!Boring.IsYUTMNull())
                {
                    CurrentWell.Y = Boring.YUTM;
                }
                else
                {
                    CurrentWell.Y = 0;
                }

                CurrentWell.Description = Boring.LOCATION;
                if (Boring.ELEVATION == -999 & Boring.CTRPELEVA != -999)
                {
                    CurrentWell.Terrain = Boring.CTRPELEVA;
                }
                else
                {
                    CurrentWell.Terrain = Boring.ELEVATION;
                }

                if (!Boring.IsDRILLDEPTHNull())
                {
                    CurrentWell.Depth = Boring.DRILLDEPTH;
                }

                CurrentWell.UsedForExtraction = true;

                CurrentWell.Use     = Boring.USE;
                CurrentWell.Purpose = Boring.PURPOSE;

                //Hvis USE er noget andet end indvinding
                if (NotExtractionUse.Contains(Boring.USE.ToUpper()))
                {
                    CurrentWell.UsedForExtraction = false;
                }

                //Hvis den er oprettet med et andet formål og USE ikke er sat til indvinding er det ikke en indvindingsboring
                if (NotExtractionPurpose.Contains(Boring.PURPOSE.ToUpper()) & !ExtractionUse.Contains(Boring.USE.ToUpper()))
                {
                    CurrentWell.UsedForExtraction = false;
                }

                if (!Boring.IsDRILENDATENull())
                {
                    CurrentWell.StartDate = Boring.DRILENDATE;
                }
                if (!Boring.IsABANDONDATNull())
                {
                    CurrentWell.EndDate = Boring.ABANDONDAT;
                }
            }
            JXL.BOREHOLE.Clear();
            #endregion

            #region Intakes
            //Intakes
            JXL.ReadIntakes();
            foreach (var Intake in JXL.INTAKE)
            {
                if (Wells.Contains(Intake.BOREHOLENO))
                {
                    JupiterIntake I = Wells[Intake.BOREHOLENO].AddNewIntake(Intake.INTAKENO) as JupiterIntake;
                    if (I != null)
                    {
                        if (!Intake.IsSTRINGNONull())
                        {
                            I.StringNo = Intake.STRINGNO;
                            I.ResRock  = Intake.RESERVOIRROCK;
                        }
                    }
                }
            }

            foreach (var Casing in JXL.CASING)
            {
                if (Wells.Contains(Casing.BOREHOLENO))
                {
                    if (!Casing.IsSTRINGNONull())
                    {
                        IIntake I = Wells[Casing.BOREHOLENO].Intakes.FirstOrDefault(var => ((JupiterIntake)var).StringNo == Casing.STRINGNO);
                        if (I != null)
                        {
                            if (!Casing.IsBOTTOMNull())
                            {
                                I.Depth = Casing.BOTTOM;
                            }
                        }
                    }
                }
            }
            JXL.INTAKE.Clear();
            JXL.CASING.Clear();
            #endregion

            #region Screens
            //Screens
            JXL.ReadScreens();
            foreach (var screen in JXL.SCREEN)
            {
                if (Wells.Contains(screen.BOREHOLENO))
                {
                    CurrentIntake = Wells[screen.BOREHOLENO].Intakes.FirstOrDefault(var => var.IDNumber == screen.INTAKENO) as JupiterIntake;
                    if (CurrentIntake != null)
                    {
                        Screen CurrentScreen = new Screen(CurrentIntake);
                        if (!screen.IsTOPNull())
                        {
                            CurrentScreen.DepthToTop = screen.TOP;
                        }
                        if (!screen.IsBOTTOMNull())
                        {
                            CurrentScreen.DepthToBottom = screen.BOTTOM;
                        }
                        CurrentScreen.Number = screen.SCREENNO;

                        if (!screen.IsSTARTDATENull())
                        {
                            CurrentScreen.StartDate = screen.STARTDATE;
                        }

                        if (!screen.IsENDDATENull())
                        {
                            CurrentScreen.EndDate = screen.ENDDATE;
                        }
                    }
                }
            }
            JXL.SCREEN.Clear();
            #endregion

            return(Wells);
        }