Exemplo n.º 1
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for the 2002 IS1893 code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="periodOption">The time period option.</param>
 /// <param name="Ct">The code-specified Ct factor. [L].
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
 /// <param name="userSpecifiedPeriod">The user specified time period. [s]
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="soilType">Type of the soil.</param>
 /// <param name="R">The response modification factor.</param>
 /// <param name="I">The importance factor.</param>
 /// <param name="ZOption">The method of input for the seismic zone factor.</param>
 /// <param name="Z">The seismic zone factor, Z.
 /// If <paramnamef name="ZOption" /> = <see cref="eSource.PerCode" />, this item should be one of the following: 0.10, 0.16, 0.24, 0.36.</param>
 /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_IS_1893_2002 soilType,
                     double R,
                     double I,
                     eSource ZOption,
                     double Z)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetIS1893_2002(name,
                                                                   (int)loadDirection,
                                                                   eccentricity,
                                                                   (int)periodOption,
                                                                   Ct,
                                                                   userSpecifiedPeriod,
                                                                   userSpecifiedHeights,
                                                                   coordinateTopZ,
                                                                   coordinateBottomZ,
                                                                   (int)ZOption,
                                                                   Z,
                                                                   (int)soilType,
                                                                   I,
                                                                   R);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException(API_DEFAULT_ERROR_CODE);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for the 1994 UBC code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="periodOption">The time period option.</param>
 /// <param name="Ct">The code-specified Ct factor.
 /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
 /// <param name="userSpecifiedPeriod">The user specified time period. [s]
 /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
 /// <param name="I">The importance factor.</param>
 /// <param name="ZOption">The method of input for the seismic zone factor.</param>
 /// <param name="Z">The seismic zone factor, Z.
 /// If <paramref name="ZOption" /> = <see cref="eSource.PerCode" />, this item should be one of the following: 0.075, 0.15, 0.20, 0.30, 0.40.</param>
 /// <param name="S">This is 1, 1.2, 1.5 or 2, indicating the site coefficient.</param>
 /// <param name="RW">The numerical coefficient, Rw.</param>
 /// <exception cref="CSiException"></exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     ref double I,
                     eSource ZOption,
                     double Z,
                     double S,
                     double RW)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetUBC94(name,
                                                             (int)loadDirection,
                                                             eccentricity,
                                                             (int)periodOption,
                                                             Ct,
                                                             userSpecifiedPeriod,
                                                             userSpecifiedHeights,
                                                             coordinateTopZ,
                                                             coordinateBottomZ,
                                                             (int)ZOption,
                                                             Z,
                                                             S,
                                                             I,
                                                             RW);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException();
     }
 }
        public void DisplayWelcomeScreen()
        {
            Console.WriteLine("----------========= Welcome to Journal events  =========----------\n\n");
            Console.WriteLine("Please choose the source:\n\t1. DataBase\n\t2. File\nEnter key \"1\" to choose first option. \"2\" to choose second option. Press the Escape (Esc) key to quit\n");
            ConsoleKeyInfo key;

            do
            {
                key = Console.ReadKey();
                Console.WriteLine("");
                switch (key.Key)
                {
                case ConsoleKey.D1:
                    m_selectedSource = eSource.DataBase;
                    DisplayMenu(eSource.DataBase);
                    break;

                case ConsoleKey.D2:
                    m_selectedSource = eSource.File;
                    DisplayMenu(eSource.File);
                    break;

                case ConsoleKey.Escape:
                    Environment.Exit(0);
                    break;
                }
            }while (key.Key != ConsoleKey.Escape);
        }
        public void LoadEvents(eSource source)
        {
            m_retrievedListofJournals = journalService.GetData(source);
            string selectedSource = source == eSource.DataBase ? "DataBase" : "File";

            Console.WriteLine("The data has been uploaded from {0}", selectedSource);

            DisplayMenu(source);
        }
Exemplo n.º 5
0
        /// <summary>
        /// This function retrieves auto seismic loading parameters for the 2003 IBC code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="periodOption">The time period option.</param>
        /// <param name="Ct">The code-specified Ct factor. [L]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
        /// <param name="userSpecifiedPeriod">The user specified time period. [s]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="siteClass">The site class.</param>
        /// <param name="omega">The system overstrength factor.</param>
        /// <param name="R">The response modification factor.</param>
        /// <param name="Ss">The response acceleration for short periods, (g).</param>
        /// <param name="S1">The response acceleration for a one second period, (g).</param>
        /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
        /// <param name="Fa">The site coefficient Fa.</param>
        /// <param name="Fv">The site coefficient Fv.</param>
        /// <param name="Cd">The deflection amplification factor.</param>
        /// <param name="Sg">The sg.</param>
        /// <exception cref="CSiException"></exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref eTimePeriodOption periodOption,
                            ref double Ct,
                            ref double userSpecifiedPeriod,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref eSiteClass_IBC_2003 siteClass,
                            ref double omega,
                            ref double R,
                            ref double Ss,
                            ref double S1,
                            ref eSource seismicCoefficientSource,
                            ref double Fa,
                            ref double Fv,
                            ref double Cd,
                            ref eSeismicGroup_IBC_2003 Sg)
        {
            int csiLoadDirection            = 0;
            int csiPeriodOption             = 0;
            int csiSiteClass                = 0;
            int csiSeismicCoefficientSource = 0;
            int csiSeismicGroup             = 0;

            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetIBC2003(name,
                                                                      ref csiLoadDirection,
                                                                      ref eccentricity,
                                                                      ref csiPeriodOption,
                                                                      ref Ct,
                                                                      ref userSpecifiedPeriod,
                                                                      ref userSpecifiedHeights,
                                                                      ref coordinateTopZ,
                                                                      ref coordinateBottomZ,
                                                                      ref csiSeismicGroup,
                                                                      ref csiSeismicCoefficientSource,
                                                                      ref csiSiteClass,
                                                                      ref Ss,
                                                                      ref S1,
                                                                      ref Fa,
                                                                      ref Fv,
                                                                      ref R,
                                                                      ref omega,
                                                                      ref Cd);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            loadDirection            = (eSeismicLoadDirection)csiLoadDirection;
            periodOption             = (eTimePeriodOption)csiPeriodOption;
            siteClass                = (eSiteClass_IBC_2003)csiSiteClass;
            seismicCoefficientSource = (eSource)csiSeismicCoefficientSource;
            Sg = (eSeismicGroup_IBC_2003)csiSeismicGroup;
        }
Exemplo n.º 6
0
            public MidiTrackState()
            {
                _channelStates = new ChannelState[kNumberOfChannels];
                for (int i = 0; i < kNumberOfChannels; i++)
                {
                    _channelStates[i] = new ChannelState();
                }

                _source = eSource.AnyLiveSource;
            }
Exemplo n.º 7
0
        /// <summary>
        /// This function retrieves auto seismic loading parameters for the 1995 NBCC code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="periodOption">The time period option.</param>
        /// <param name="CtType">The structure type.</param>
        /// <param name="userSpecifiedPeriod">The user specified time period. [s]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="R">The force modification factor.</param>
        /// <param name="I">The importance factor.</param>
        /// <param name="Ds">The dimension of the lateral load resisting system in the direction of the applied forces. [L].
        /// This only applies when <paramref name="CtType" /> = <see cref="eCtType_NBCC_1995.Other" />.</param>
        /// <param name="Za">The acceleration related zone, Za.</param>
        /// <param name="Zv">The velocity related zone, Zv.</param>
        /// <param name="ZvRatioSource">How the zonal velocity ratio, V, is specified.</param>
        /// <param name="ZvRatio">The zonal velocity ratio, V.</param>
        /// <param name="F">The foundation factor.</param>
        /// <exception cref="CSiException"></exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref eTimePeriodOption periodOption,
                            ref eCtType_NBCC_1995 CtType,
                            ref double userSpecifiedPeriod,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref double R,
                            ref double I,
                            ref double Ds,
                            ref eZa_NBCC_1995 Za,
                            ref eZv_NBCC_1995 Zv,
                            ref eSource ZvRatioSource,
                            ref double ZvRatio,
                            ref double F)
        {
            int csiLoadDirection = 0;
            int csiPeriodOption  = 0;
            int csiCtType        = 0;
            int csiZa            = 0;
            int csiZv            = 0;
            int csiZvRatioSource = 0;

            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetNBCC95(name,
                                                                     ref csiLoadDirection,
                                                                     ref eccentricity,
                                                                     ref csiCtType,
                                                                     ref Ds,
                                                                     ref csiPeriodOption,
                                                                     ref userSpecifiedPeriod,
                                                                     ref userSpecifiedHeights,
                                                                     ref coordinateTopZ,
                                                                     ref coordinateBottomZ,
                                                                     ref csiZa,
                                                                     ref csiZv,
                                                                     ref csiZvRatioSource,
                                                                     ref ZvRatio,
                                                                     ref I,
                                                                     ref F,
                                                                     ref R);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            loadDirection = (eSeismicLoadDirection)csiLoadDirection;
            periodOption  = (eTimePeriodOption)csiPeriodOption;
            CtType        = (eCtType_NBCC_1995)csiCtType;
            Za            = (eZa_NBCC_1995)csiZa;
            Zv            = (eZv_NBCC_1995)csiZv;
            ZvRatioSource = (eSource)csiZvRatioSource;
        }
Exemplo n.º 8
0
        /// <summary>
        /// This function retrieves auto seismic loading parameters for seismically isolated buildings using the 1997 UBC code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="soilType">Type of the soil.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
        /// <param name="Z">This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
        /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
        /// <param name="Cv">The seismic coefficient, Cv.</param>
        /// <param name="nearSourceSource">Indicates the source  of the near source factor coefficients Na and Nv.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramref name="Z" /> = 0.4.</param>
        /// <param name="seismicSourceType">Type of the seismic source.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramref name="Z" /> = 0.4 and <paramref name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
        /// <param name="distanceToSeismicSource">This is the distance to the seismic source in kilometers.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramref name="Z" /> = 0.4 and <paramref name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
        /// <param name="Nv">The near source factor coefficient, Nv.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.UserDefined" />.</param>
        /// <param name="Ri">The overstrength factor, Ri.</param>
        /// <param name="Bd">The coefficient for damping.</param>
        /// <param name="KDmax">The maximum effective stiffness of the isolation system. [F/L].</param>
        /// <param name="KDmin">The minimum effective stiffness of the isolation system. [F/L].</param>
        /// <exception cref="CSiException"></exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref eSiteClass_UBC_97 soilType,
                            ref double Z,
                            ref eSource seismicCoefficientSource,
                            ref double Cv,
                            ref eSource nearSourceSource,
                            ref eSourceType_UBC_97 seismicSourceType,
                            ref double distanceToSeismicSource,
                            ref double Nv,
                            ref double Ri,
                            ref double Bd,
                            ref double KDmax,
                            ref double KDmin)
        {
            int csiLoadDirection            = 0;
            int csiSoilType                 = 0;
            int csiSeismicCoefficientSource = 0;
            int csiNearSourceSource         = 0;
            int csiSeismicSourceType        = 0;

            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetUBC97Iso(name,
                                                                       ref csiLoadDirection,
                                                                       ref eccentricity,
                                                                       ref userSpecifiedHeights,
                                                                       ref coordinateTopZ,
                                                                       ref coordinateBottomZ,
                                                                       ref csiSeismicCoefficientSource,
                                                                       ref csiSoilType,
                                                                       ref Z,
                                                                       ref Cv,
                                                                       ref csiNearSourceSource,
                                                                       ref csiSeismicSourceType,
                                                                       ref distanceToSeismicSource,
                                                                       ref Nv,
                                                                       ref Ri,
                                                                       ref Bd,
                                                                       ref KDmax,
                                                                       ref KDmin);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            loadDirection            = (eSeismicLoadDirection)csiLoadDirection;
            soilType                 = (eSiteClass_UBC_97)csiSoilType;
            seismicCoefficientSource = (eSource)csiSeismicCoefficientSource;
            nearSourceSource         = (eSource)csiNearSourceSource;
            seismicSourceType        = (eSourceType_UBC_97)csiSeismicSourceType;
        }
Exemplo n.º 9
0
        /// <summary>
        /// This function retrieves auto seismic loading parameters for the 1997 NEHRP code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="periodOption">The time period option.</param>
        /// <param name="Ct">The code-specified Ct factor.
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
        /// <param name="userSpecifiedPeriod">The user specified time period. [s]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="siteClass">The site class.
        /// This only applies when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" />.</param>
        /// <param name="R">The response modification factor.</param>
        /// <param name="Ss">The response acceleration for short periods, (g).</param>
        /// <param name="S1">The response acceleration for a one second period, (g).</param>
        /// <param name="Fa">The site coefficient Fa.</param>
        /// <param name="Fv">The site coefficient Fv.</param>
        /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
        /// <param name="Sg">The seismic group.</param>
        /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref eTimePeriodOption periodOption,
                            ref double Ct,
                            ref double userSpecifiedPeriod,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref eSiteClass_NEHRP_1997 siteClass,
                            ref double R,
                            ref double Ss,
                            ref double S1,
                            ref double Fa,
                            ref double Fv,
                            ref eSource seismicCoefficientSource,
                            ref eSeismicGroup_NEHRP_1997 Sg)
        {
            int csiLoadDirection            = 0;
            int csiPeriodOption             = 0;
            int csiSiteClass                = 0;
            int csiSeismicCoefficientSource = 0;
            int csiSg = 0;


            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetNEHRP97(name,
                                                                      ref csiLoadDirection,
                                                                      ref eccentricity,
                                                                      ref csiPeriodOption,
                                                                      ref Ct,
                                                                      ref userSpecifiedPeriod,
                                                                      ref userSpecifiedHeights,
                                                                      ref coordinateTopZ,
                                                                      ref coordinateBottomZ,
                                                                      ref csiSg,
                                                                      ref csiSeismicCoefficientSource,
                                                                      ref csiSiteClass,
                                                                      ref Ss,
                                                                      ref S1,
                                                                      ref Fa,
                                                                      ref Fv,
                                                                      ref R);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadDirection            = (eSeismicLoadDirection)csiLoadDirection;
            periodOption             = (eTimePeriodOption)csiPeriodOption;
            siteClass                = (eSiteClass_NEHRP_1997)csiSiteClass;
            seismicCoefficientSource = (eSource)csiSeismicCoefficientSource;
            Sg = (eSeismicGroup_NEHRP_1997)csiSg;
        }
Exemplo n.º 10
0
        public void DisplayMenu(eSource source)
        {
            string selectedSource = source == eSource.DataBase ? "DataBase" : "File";

            Console.Write("\nMain Features:\n\t");
            Console.WriteLine("1. Adding new journal events.\n\t" +
                              "2. Save events to DataBase and to File.\n\t" +
                              "3. Load events from the {0}\n\t" +
                              "4. Output events to the screen.\n\t" +
                              "5. Finding elements by the text of an event\n\t" +
                              "6. Press the Escape (Esc) key to quit. \n", selectedSource);

            ConsoleKeyInfo key;

            do
            {
                key = Console.ReadKey();
                switch (key.Key)
                {
                case ConsoleKey.D1:
                    AddEvent();
                    break;

                case ConsoleKey.D2:
                    SaveEvents();
                    break;

                case ConsoleKey.D3:
                    LoadEvents(source);
                    break;

                case ConsoleKey.D4:
                    OutputEvents();
                    break;

                case ConsoleKey.D5:
                    SearchEvents();
                    break;

                case ConsoleKey.D6:
                    Environment.Exit(0);
                    break;

                case ConsoleKey.Escape:
                    Environment.Exit(0);
                    break;
                }
            }while (key.Key != ConsoleKey.Escape);
        }
Exemplo n.º 11
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for the 1997 UBC code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="periodOption">The time period option.</param>
 /// <param name="Ct">The code-specified Ct factor.
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
 /// <param name="userSpecifiedPeriod">The user specified time period. [s]
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="soilType">Type of the soil.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
 /// <param name="R">The overstrength factor.</param>
 /// <param name="I">The importance factor.</param>
 /// <param name="Z">This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
 /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
 /// <param name="Ca">The seismic coefficient, Ca.</param>
 /// <param name="Cv">The seismic coefficient, Cv.</param>
 /// <param name="nearSourceSource">Indicates the source  of the near source factor coefficients Na and Nv.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramnamef name="Z" /> = 0.4.</param>
 /// <param name="seismicSourceType">Type of the seismic source.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramnamef name="Z" /> = 0.4 and <paramnamef name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
 /// <param name="distanceToSeismicSource">This is the distance to the seismic source in kilometers.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramnamef name="Z" /> = 0.4 and <paramnamef name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
 /// <param name="Na">The near source factor coefficient, Na.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.UserDefined" />.</param>
 /// <param name="Nv">The near source factor coefficient, Nv.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.UserDefined" />.</param>
 /// <exception cref="CSiException"></exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_UBC_97 soilType,
                     double R,
                     double I,
                     double Z,
                     eSource seismicCoefficientSource,
                     double Ca,
                     double Cv,
                     eSource nearSourceSource,
                     eSourceType_UBC_97 seismicSourceType,
                     double distanceToSeismicSource,
                     double Na,
                     double Nv)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetUBC97(name,
                                                             (int)loadDirection,
                                                             eccentricity,
                                                             (int)periodOption,
                                                             Ct,
                                                             userSpecifiedPeriod,
                                                             userSpecifiedHeights,
                                                             coordinateTopZ,
                                                             coordinateBottomZ,
                                                             (int)seismicCoefficientSource,
                                                             (int)soilType,
                                                             Z,
                                                             Ca,
                                                             Cv,
                                                             (int)nearSourceSource,
                                                             (int)seismicSourceType,
                                                             distanceToSeismicSource,
                                                             Na,
                                                             Nv,
                                                             I,
                                                             R);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException();
     }
 }
Exemplo n.º 12
0
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     ref double I,
                     eSource ZOption,
                     double Z,
                     double S,
                     double RW)
 {
 }
Exemplo n.º 13
0
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_IS_1893_2002 soilType,
                     double R,
                     double I,
                     eSource ZOption,
                     double Z)
 {
 }
Exemplo n.º 14
0
 /// <summary>
 /// Constructor for a WEB extension
 /// </summary>
 /// <param name="smallBasicExtension">The database entry for this web downloadable extension</param>
 public Extension(SmallBasicExtension smallBasicExtension)
 {
     this.smallBasicExtension = smallBasicExtension;
     Source = eSource.WEB;
     try
     {
         Name       = smallBasicExtension.Name;
         SBVersion  = new Version(smallBasicExtension.SBVersion);
         ExtVersion = new Version(smallBasicExtension.ExtVersion);
     }
     catch (Exception ex)
     {
         Errors.Add(ex.Message);
     }
     Valid &= Errors.Count == 0;
 }
Exemplo n.º 15
0
        /// <summary>
        /// This function retrieves auto seismic loading parameters for the 2002 IS1893 code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="periodOption">The time period option.</param>
        /// <param name="Ct">The code-specified Ct factor. [L].
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
        /// <param name="userSpecifiedPeriod">The user specified time period. [s]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="soilType">Type of the soil.</param>
        /// <param name="R">The response modification factor.</param>
        /// <param name="I">The importance factor.</param>
        /// <param name="ZOption">The method of input for the seismic zone factor.</param>
        /// <param name="Z">The seismic zone factor, Z.
        /// If <paramref name="ZOption" /> = <see cref="eSource.PerCode" />, this item should be one of the following: 0.10, 0.16, 0.24, 0.36.</param>
        /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref eTimePeriodOption periodOption,
                            ref double Ct,
                            ref double userSpecifiedPeriod,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref eSiteClass_IS_1893_2002 soilType,
                            ref double R,
                            ref double I,
                            ref eSource ZOption,
                            ref double Z)
        {
            int csiLoadDirection     = 0;
            int csiPeriodOption      = 0;
            int csiSoilType          = 0;
            int csiSeismicZoneOption = 0;

            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetIS1893_2002(name,
                                                                          ref csiLoadDirection,
                                                                          ref eccentricity,
                                                                          ref csiPeriodOption,
                                                                          ref Ct,
                                                                          ref userSpecifiedPeriod,
                                                                          ref userSpecifiedHeights,
                                                                          ref coordinateTopZ,
                                                                          ref coordinateBottomZ,
                                                                          ref csiSeismicZoneOption,
                                                                          ref Z,
                                                                          ref csiSoilType,
                                                                          ref I,
                                                                          ref R);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadDirection = (eSeismicLoadDirection)csiLoadDirection;
            periodOption  = (eTimePeriodOption)csiPeriodOption;
            soilType      = (eSiteClass_IS_1893_2002)csiSoilType;
            ZOption       = (eSource)csiSeismicZoneOption;
        }
Exemplo n.º 16
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for the 2003 IBC code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="periodOption">The time period option.</param>
 /// <param name="Ct">The code-specified Ct factor. [L]
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
 /// <param name="userSpecifiedPeriod">The user specified time period. [s]
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="siteClass">The site class.</param>
 /// <param name="omega">The system overstrength factor.</param>
 /// <param name="R">The response modification factor.</param>
 /// <param name="Ss">The response acceleration for short periods, (g).</param>
 /// <param name="S1">The response acceleration for a one second period, (g).</param>
 /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
 /// <param name="Fa">The site coefficient Fa.</param>
 /// <param name="Fv">The site coefficient Fv.</param>
 /// <param name="Cd">The deflection amplification factor.</param>
 /// <param name="Sg">The sg.</param>
 /// <exception cref="CSiException"></exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_IBC_2003 siteClass,
                     double omega,
                     double R,
                     double Ss,
                     double S1,
                     eSource seismicCoefficientSource,
                     double Fa,
                     double Fv,
                     double Cd,
                     eSeismicGroup_IBC_2003 Sg)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetIBC2003(name,
                                                               (int)loadDirection,
                                                               eccentricity,
                                                               (int)periodOption,
                                                               Ct,
                                                               userSpecifiedPeriod,
                                                               userSpecifiedHeights,
                                                               coordinateTopZ,
                                                               coordinateBottomZ,
                                                               (int)Sg,
                                                               (int)seismicCoefficientSource,
                                                               (int)siteClass,
                                                               Ss,
                                                               S1,
                                                               Fa,
                                                               Fv,
                                                               R,
                                                               omega,
                                                               Cd);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException();
     }
 }
Exemplo n.º 17
0
 public void GetLoad(string name,
                     ref eSeismicLoadDirection loadDirection,
                     ref double eccentricity,
                     ref eTimePeriodOption periodOption,
                     ref eCtType_NBCC_1995 CtType,
                     ref double userSpecifiedPeriod,
                     ref bool userSpecifiedHeights,
                     ref double coordinateTopZ,
                     ref double coordinateBottomZ,
                     ref double R,
                     ref double I,
                     ref double Ds,
                     ref eZa_NBCC_1995 Za,
                     ref eZv_NBCC_1995 Zv,
                     ref eSource ZvRatioSource,
                     ref double ZvRatio,
                     ref double F)
 {
 }
Exemplo n.º 18
0
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     eCtType_NBCC_1995 CtType,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     double R,
                     double I,
                     double Ds,
                     eZa_NBCC_1995 Za,
                     eZv_NBCC_1995 Zv,
                     eSource ZvRatioSource,
                     double ZvRatio,
                     double F)
 {
 }
Exemplo n.º 19
0
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_NEHRP_1997 siteClass,
                     double R,
                     double Ss,
                     double S1,
                     double Fa,
                     double Fv,
                     eSource seismicCoefficientSource,
                     eSeismicGroup_NEHRP_1997 Sg)
 {
 }
Exemplo n.º 20
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for seismically isolated buildings using the 1997 UBC code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="soilType">Type of the soil.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
 /// <param name="Z">This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
 /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
 /// <param name="Cv">The seismic coefficient, Cv.</param>
 /// <param name="nearSourceSource">Indicates the source  of the near source factor coefficients Na and Nv.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramnamef name="Z" /> = 0.4.</param>
 /// <param name="seismicSourceType">Type of the seismic source.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramnamef name="Z" /> = 0.4 and <paramnamef name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
 /// <param name="distanceToSeismicSource">This is the distance to the seismic source in kilometers.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramnamef name="Z" /> = 0.4 and <paramnamef name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
 /// <param name="Nv">The near source factor coefficient, Nv.
 /// This item is applicable only when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.UserDefined" />.</param>
 /// <param name="Ri">The overstrength factor, Ri.</param>
 /// <param name="Bd">The coefficient for damping.</param>
 /// <param name="KDmax">The maximum effective stiffness of the isolation system. [F/L].</param>
 /// <param name="KDmin">The minimum effective stiffness of the isolation system. [F/L].</param>
 /// <exception cref="CSiException"></exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_UBC_97 soilType,
                     double Z,
                     eSource seismicCoefficientSource,
                     double Cv,
                     eSource nearSourceSource,
                     eSourceType_UBC_97 seismicSourceType,
                     double distanceToSeismicSource,
                     double Nv,
                     double Ri,
                     double Bd,
                     double KDmax,
                     double KDmin)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetUBC97Iso(name,
                                                                (int)loadDirection,
                                                                eccentricity,
                                                                userSpecifiedHeights,
                                                                coordinateTopZ,
                                                                coordinateBottomZ,
                                                                (int)seismicCoefficientSource,
                                                                (int)soilType,
                                                                Z,
                                                                Cv,
                                                                (int)nearSourceSource,
                                                                (int)seismicSourceType,
                                                                distanceToSeismicSource,
                                                                Nv,
                                                                Ri,
                                                                Bd,
                                                                KDmax,
                                                                KDmin);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException();
     }
 }
Exemplo n.º 21
0
        /// <summary>
        /// This function retrieves auto seismic loading parameters for the 1994 UBC code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="periodOption">The time period option.</param>
        /// <param name="Ct">The code-specified Ct factor.
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
        /// <param name="userSpecifiedPeriod">The user specified time period. [s]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="I">The importance factor.</param>
        /// <param name="ZOption">The method of input for the seismic zone factor.</param>
        /// <param name="Z">The seismic zone factor, Z.
        /// If <paramref name="ZOption" /> = <see cref="eSource.PerCode" />, this item should be one of the following: 0.075, 0.15, 0.20, 0.30, 0.40.</param>
        /// <param name="S">This is 1, 1.2, 1.5 or 2, indicating the site coefficient.</param>
        /// <param name="RW">The numerical coefficient, Rw.</param>
        /// <exception cref="CSiException"></exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref eTimePeriodOption periodOption,
                            ref double Ct,
                            ref double userSpecifiedPeriod,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref double I,
                            ref eSource ZOption,
                            ref double Z,
                            ref double S,
                            ref double RW)
        {
            int csiLoadDirection = 0;
            int csiPeriodOption  = 0;
            int csiZOption       = 0;

            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetUBC94(name,
                                                                    ref csiLoadDirection,
                                                                    ref eccentricity,
                                                                    ref csiPeriodOption,
                                                                    ref Ct,
                                                                    ref userSpecifiedPeriod,
                                                                    ref userSpecifiedHeights,
                                                                    ref coordinateTopZ,
                                                                    ref coordinateBottomZ,
                                                                    ref csiZOption,
                                                                    ref Z,
                                                                    ref S,
                                                                    ref I,
                                                                    ref RW);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException();
            }

            loadDirection = (eSeismicLoadDirection)csiLoadDirection;
            periodOption  = (eTimePeriodOption)csiPeriodOption;
            ZOption       = (eSource)csiZOption;
        }
Exemplo n.º 22
0
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_UBC_97 soilType,
                     double Z,
                     eSource seismicCoefficientSource,
                     double Cv,
                     eSource nearSourceSource,
                     eSourceType_UBC_97 seismicSourceType,
                     double distanceToSeismicSource,
                     double Nv,
                     double Ri,
                     double Bd,
                     double KDmax,
                     double KDmin)
 {
 }
Exemplo n.º 23
0
 public void GetLoad(string name,
                     ref eSeismicLoadDirection loadDirection,
                     ref double eccentricity,
                     ref eTimePeriodOption periodOption,
                     ref double Ct,
                     ref double userSpecifiedPeriod,
                     ref bool userSpecifiedHeights,
                     ref double coordinateTopZ,
                     ref double coordinateBottomZ,
                     ref eSiteClass_IBC_2003 siteClass,
                     ref double omega,
                     ref double R,
                     ref double Ss,
                     ref double S1,
                     ref eSource seismicCoefficientSource,
                     ref double Fa,
                     ref double Fv,
                     ref double Cd,
                     ref eSeismicGroup_IBC_2003 Sg)
 {
 }
Exemplo n.º 24
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for the 1997 NEHRP code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="periodOption">The time period option.</param>
 /// <param name="Ct">The code-specified Ct factor.
 /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
 /// <param name="userSpecifiedPeriod">The user specified time period. [s]
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="siteClass">The site class.
 /// This only applies when <paramnamef name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" />.</param>
 /// <param name="R">The response modification factor.</param>
 /// <param name="Ss">The response acceleration for short periods, (g).</param>
 /// <param name="S1">The response acceleration for a one second period, (g).</param>
 /// <param name="Fa">The site coefficient Fa.</param>
 /// <param name="Fv">The site coefficient Fv.</param>
 /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
 /// <param name="Sg">The seismic group.</param>
 /// <exception cref="CSiException">API_DEFAULT_ERROR_CODE</exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_NEHRP_1997 siteClass,
                     double R,
                     double Ss,
                     double S1,
                     double Fa,
                     double Fv,
                     eSource seismicCoefficientSource,
                     eSeismicGroup_NEHRP_1997 Sg)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetNEHRP97(name,
                                                               (int)loadDirection,
                                                               eccentricity,
                                                               (int)periodOption,
                                                               Ct,
                                                               userSpecifiedPeriod,
                                                               userSpecifiedHeights,
                                                               coordinateTopZ,
                                                               coordinateBottomZ,
                                                               (int)Sg,
                                                               (int)seismicCoefficientSource,
                                                               (int)siteClass,
                                                               Ss,
                                                               S1,
                                                               Fa,
                                                               Fv,
                                                               R);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException(API_DEFAULT_ERROR_CODE);
     }
 }
Exemplo n.º 25
0
 /// <summary>
 /// This function assigns auto seismic loading parameters for the 1995 NBCC code.
 /// </summary>
 /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
 /// <param name="loadDirection">The seismic load direction.</param>
 /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
 /// <param name="periodOption">The time period option.</param>
 /// <param name="CtType">The structure type.</param>
 /// <param name="userSpecifiedPeriod">The user specified time period. [s]
 /// This only applies when <paramnamef name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
 /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
 /// Else, the program determines the elevations.</param>
 /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
 /// This only applies when <paramnamef name="userSpecifiedHeights" /> = True.</param>
 /// <param name="R">The force modification factor.</param>
 /// <param name="I">The importance factor.</param>
 /// <param name="Ds">The dimension of the lateral load resisting system in the direction of the applied forces. [L].
 /// This only applies when <paramnamef name="CtType" /> = <see cref="eCtType_NBCC_1995.Other" />.</param>
 /// <param name="Za">The acceleration related zone, Za.</param>
 /// <param name="Zv">The velocity related zone, Zv.</param>
 /// <param name="ZvRatioSource">How the zonal velocity ratio, V, is specified.</param>
 /// <param name="ZvRatio">The zonal velocity ratio, V.</param>
 /// <param name="F">The foundation factor.</param>
 /// <exception cref="CSiException"></exception>
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     eCtType_NBCC_1995 CtType,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     double R,
                     double I,
                     double Ds,
                     eZa_NBCC_1995 Za,
                     eZv_NBCC_1995 Zv,
                     eSource ZvRatioSource,
                     double ZvRatio,
                     double F)
 {
     _callCode = _sapModel.LoadPatterns.AutoSeismic.SetNBCC95(name,
                                                              (int)loadDirection,
                                                              eccentricity,
                                                              (int)CtType,
                                                              Ds,
                                                              (int)periodOption,
                                                              userSpecifiedPeriod,
                                                              userSpecifiedHeights,
                                                              coordinateTopZ,
                                                              coordinateBottomZ,
                                                              (int)Za,
                                                              (int)Zv,
                                                              (int)ZvRatioSource,
                                                              ZvRatio,
                                                              I,
                                                              F,
                                                              R);
     if (throwCurrentApiException(_callCode))
     {
         throw new CSiException();
     }
 }
Exemplo n.º 26
0
 public List <Journal> GetData(eSource source)
 {
     try
     {
         if (source == eSource.DataBase)
         {
             return(repoJournal.GetData());
         }
         else
         {
             string         rootPath   = System.Environment.CurrentDirectory.Replace(@"MagazineConsoleApp\bin\Debug", @"Magazine.Data\Uploads\");
             string         fileName   = "UploadedEvents.csv";
             string         pathToFile = rootPath + fileName;
             List <Journal> lst        = new List <Journal>();
             using (CsvReader csvReader = new CsvReader(new StreamReader(pathToFile), hasHeaders: false))
             {
                 while (csvReader.ReadNextRecord())
                 {
                     string mes     = csvReader[0];
                     string dateStr = csvReader[1];
                     if (string.IsNullOrEmpty(mes) || string.IsNullOrEmpty(dateStr))
                     {
                         continue;
                     }
                     DateTime datetime = Convert.ToDateTime(dateStr);
                     lst.Add(new Journal {
                         Message = mes, MessageDate = datetime
                     });
                 }
             }
             return(lst);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         return(default(List <Journal>));
     }
 }
Exemplo n.º 27
0
 public void SetLoad(string name,
                     eSeismicLoadDirection loadDirection,
                     double eccentricity,
                     eTimePeriodOption periodOption,
                     double Ct,
                     double userSpecifiedPeriod,
                     bool userSpecifiedHeights,
                     double coordinateTopZ,
                     double coordinateBottomZ,
                     eSiteClass_UBC_97 soilType,
                     double R,
                     double I,
                     double Z,
                     eSource seismicCoefficientSource,
                     double Ca,
                     double Cv,
                     eSource nearSourceSource,
                     eSourceType_UBC_97 seismicSourceType,
                     double distanceToSeismicSource,
                     double Na,
                     double Nv)
 {
 }
Exemplo n.º 28
0
        /// <summary>
        /// Returns auto seismic loading parameters for the 1997 UBC code.
        /// </summary>
        /// <param name="name">The name of an existing Quake-type load pattern with a corresponding auto seismic load assignment.</param>
        /// <param name="loadDirection">The seismic load direction.</param>
        /// <param name="eccentricity">The eccentricity ratio that applies to all diaphragms.</param>
        /// <param name="periodOption">The time period option.</param>
        /// <param name="Ct">The code-specified Ct factor.
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.Approximate" /> or <see cref="eTimePeriodOption.ProgramCalculated" />.</param>
        /// <param name="userSpecifiedPeriod">The user specified time period. [s]
        /// This only applies when <paramref name="periodOption" /> = <see cref="eTimePeriodOption.UserDefined" /></param>
        /// <param name="userSpecifiedHeights">True: Top and bottom elevations of the seismic load are user specified.
        /// Else, the program determines the elevations.</param>
        /// <param name="coordinateTopZ">Global Z-coordinate at the highest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="coordinateBottomZ">Global Z-coordinate at the lowest level where auto seismic loads are applied. [L].
        /// This only applies when <paramref name="userSpecifiedHeights" /> = True.</param>
        /// <param name="soilType">Type of the soil.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
        /// <param name="R">The overstrength factor.</param>
        /// <param name="I">The importance factor.</param>
        /// <param name="Z">This is 0.075, 0.15, 0.2, 0.3 or 0.4, indicating the seismic zone factor.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /></param>
        /// <param name="seismicCoefficientSource">The seismic coefficient source.</param>
        /// <param name="Ca">The seismic coefficient, Ca.</param>
        /// <param name="Cv">The seismic coefficient, Cv.</param>
        /// <param name="nearSourceSource">Indicates the source  of the near source factor coefficients Na and Nv.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramref name="Z" /> = 0.4.</param>
        /// <param name="seismicSourceType">Type of the seismic source.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramref name="Z" /> = 0.4 and <paramref name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
        /// <param name="distanceToSeismicSource">This is the distance to the seismic source in kilometers.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.PerCode" /> and <paramref name="Z" /> = 0.4 and <paramref name="nearSourceSource" /> = <see cref="eSource.PerCode" />.</param>
        /// <param name="Na">The near source factor coefficient, Na.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.UserDefined" />.</param>
        /// <param name="Nv">The near source factor coefficient, Nv.
        /// This item is applicable only when <paramref name="seismicCoefficientSource" /> = <see cref="eSource.UserDefined" />.</param>
        /// <exception cref="CSiException"><see cref="CSiApiBase.API_DEFAULT_ERROR_CODE" /></exception>
        public void GetLoad(string name,
                            ref eSeismicLoadDirection loadDirection,
                            ref double eccentricity,
                            ref eTimePeriodOption periodOption,
                            ref double Ct,
                            ref double userSpecifiedPeriod,
                            ref bool userSpecifiedHeights,
                            ref double coordinateTopZ,
                            ref double coordinateBottomZ,
                            ref eSiteClass_UBC_97 soilType,
                            ref double R,
                            ref double I,
                            ref double Z,
                            ref eSource seismicCoefficientSource,
                            ref double Ca,
                            ref double Cv,
                            ref eSource nearSourceSource,
                            ref eSourceType_UBC_97 seismicSourceType,
                            ref double distanceToSeismicSource,
                            ref double Na,
                            ref double Nv)
        {
            int csiLoadDirection            = 0;
            int csiPeriodOption             = 0;
            int csiSoilType                 = 0;
            int csiSeismicCoefficientSource = 0;
            int csiNearSourceSource         = 0;
            int csiSeismicSourceType        = 0;

            _callCode = _sapModel.LoadPatterns.AutoSeismic.GetUBC97(name,
                                                                    ref csiLoadDirection,
                                                                    ref eccentricity,
                                                                    ref csiPeriodOption,
                                                                    ref Ct,
                                                                    ref userSpecifiedPeriod,
                                                                    ref userSpecifiedHeights,
                                                                    ref coordinateTopZ,
                                                                    ref coordinateBottomZ,
                                                                    ref csiSeismicCoefficientSource,
                                                                    ref csiSoilType,
                                                                    ref Z,
                                                                    ref Ca,
                                                                    ref Cv,
                                                                    ref csiNearSourceSource,
                                                                    ref csiSeismicSourceType,
                                                                    ref distanceToSeismicSource,
                                                                    ref Na,
                                                                    ref Nv,
                                                                    ref I,
                                                                    ref R);
            if (throwCurrentApiException(_callCode))
            {
                throw new CSiException(API_DEFAULT_ERROR_CODE);
            }

            loadDirection            = (eSeismicLoadDirection)csiLoadDirection;
            periodOption             = (eTimePeriodOption)csiPeriodOption;
            soilType                 = (eSiteClass_UBC_97)csiSoilType;
            seismicCoefficientSource = (eSource)csiSeismicCoefficientSource;
            nearSourceSource         = (eSource)csiNearSourceSource;
            seismicSourceType        = (eSourceType_UBC_97)csiSeismicSourceType;
        }
Exemplo n.º 29
0
 /// <summary>
 /// Constructor for a LOCAL extension
 /// </summary>
 public Extension()
 {
     Source = eSource.LOCAL;
 }