Пример #1
0
        public double GetK1(WindExposureCategory windExposureCategory, TopographyType TopographyType, double HToLh)
        {
            double K1OverHToLh = GetK1OverHToLh(windExposureCategory, TopographyType, HToLh);
            double K1          = K1OverHToLh * HToLh;

            return(K1);
        }
 public BuildingDirectionalProcedureElement(double Width, double Length, double Height, double WindSpeed, WindExposureCategory windExposureType,
     WindEnclosureType EnclosureClass,
     WindStructureDynamicResponseType StructureDynamicClass, double Damping, ICalcLog CalcLog)
     : base(Width, Length, Height, WindSpeed, windExposureType, EnclosureClass, StructureDynamicClass, Damping, CalcLog)
 {
     
 }
 public double GetVelocityPressureExposureCoefficientKz(double z, WindExposureCategory windExposureCategory, WindVelocityLocation location)
 {
     double zg = GetTerrainExposureConstant(TerrainExposureConstant.zg, windExposureCategory);
     double alpha = GetTerrainExposureConstant(TerrainExposureConstant.alpha, windExposureCategory);
     double Kz = GetVelocityPressureExposureCoefficientKz(z, zg, alpha, location);
     return Kz;
 }
Пример #4
0
        public double GetGustFacor
            (
            WindStructureDynamicResponseType DynamicClassification,
            double B    ,
            double h    ,
            double L    ,
            double beta ,
            double n1   ,
            double V    ,
            WindExposureCategory WindExposure
            )
        {
            this.Width = B;
            this.Height = h;
            this.Length = L;
            this.Damping = beta;
            this.n1 = n1;
            this.WindSpeed = V;


            double G = 0.85;
            CalculateTerrainCoefficients(WindExposure);
            if (DynamicClassification == WindStructureDynamicResponseType.Flexible)
            {

                double z_ob = GetEquivalentHeightZob();
                double Iz = GetTurbulenceIntensityIz();
                double V_z_ob = GetMeanHourlyWindVz();
                double Lz = GetIntegralLengthScaleOfTurbulenceLz();
                double R = GetResonantResponseFactorR();
                double gQ = 3.4;
                double gv = 3.4;
                double gR = GetPeakFactorForResonantResponse_gr();
                double Q = GetBackgroundResponseFactorQ();
                G = GetGustFacrorFlexible(gQ,  Q,  gR,  R,  gv,  Iz);
            }
            else
            {
                double z_ob = GetEquivalentHeightZob();
                double Iz = GetTurbulenceIntensityIz();
                double Lz = GetIntegralLengthScaleOfTurbulenceLz();
                double Q = GetBackgroundResponseFactorQ();
                double gQ = 3.4;
                double gv = 3.4;

                #region g
                ICalcLogEntry gEntry = new CalcLogEntry();
                gEntry.ValueName = "g";
                gEntry.Reference = "";
                gEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Wind/GustFactor/WindGustFactorRigidgv.docx";
                gEntry.FormulaID = null; //reference to formula from code
                gEntry.VariableValue = Math.Round(3.4, 3).ToString();
                #endregion
                this.AddToLog(gEntry);
                G =GetGustFactorRigid(gQ, gv, Q, Iz);
                
            }
            return G;
        }
Пример #5
0
        public double GetVelocityPressureExposureCoefficientKz(double z, WindExposureCategory windExposureCategory, WindVelocityLocation location)
        {
            double zg    = GetTerrainExposureConstant(TerrainExposureConstant.zg, windExposureCategory);
            double alpha = GetTerrainExposureConstant(TerrainExposureConstant.alpha, windExposureCategory);
            double Kz    = GetVelocityPressureExposureCoefficientKz(z, zg, alpha, location);

            return(Kz);
        }
        public double GetGustFacor
        (
            WindStructureDynamicResponseType DynamicClassification,
            double B,
            double h,
            double L,
            double beta,
            double n1,
            double V,
            WindExposureCategory WindExposure
        )
        {
            this.Width     = B;
            this.Height    = h;
            this.Length    = L;
            this.Damping   = beta;
            this.n1        = n1;
            this.WindSpeed = V;


            double G = 0.85;

            CalculateTerrainCoefficients(WindExposure);
            if (DynamicClassification == WindStructureDynamicResponseType.Flexible)
            {
                double z_ob   = GetEquivalentHeightZob();
                double Iz     = GetTurbulenceIntensityIz();
                double V_z_ob = GetMeanHourlyWindVz();
                double Lz     = GetIntegralLengthScaleOfTurbulenceLz();
                double R      = GetResonantResponseFactorR();
                double gQ     = 3.4;
                double gv     = 3.4;
                double gR     = GetPeakFactorForResonantResponse_gr();
                double Q      = GetBackgroundResponseFactorQ();
                G = GetGustFacrorFlexible(gQ, Q, gR, R, gv, Iz);
            }
            else
            {
                double z_ob = GetEquivalentHeightZob();
                double Iz   = GetTurbulenceIntensityIz();
                double Lz   = GetIntegralLengthScaleOfTurbulenceLz();
                double Q    = GetBackgroundResponseFactorQ();
                double gQ   = 3.4;
                double gv   = 3.4;

                #region g
                ICalcLogEntry gEntry = new CalcLogEntry();
                gEntry.ValueName            = "g";
                gEntry.Reference            = "";
                gEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Wind/GustFactor/WindGustFactorRigidgv.docx";
                gEntry.FormulaID            = null; //reference to formula from code
                gEntry.VariableValue        = Math.Round(3.4, 3).ToString();
                #endregion
                this.AddToLog(gEntry);
                G = GetGustFactorRigid(gQ, gv, Q, Iz);
            }
            return(G);
        }
Пример #7
0
 private string GetExposureCategoryString(WindExposureCategory windExposureCategory)
 {
     if (windExposureCategory == WindExposureCategory.AboveTreelineMountain)
     {
         return("above the treeline in windswept mountainous areas");
     }
     else
     {
         return(windExposureCategory.ToString());
     }
 }
Пример #8
0
        public double GetK1OverHToLh(WindExposureCategory windExposureCategory, TopographyType TopographyType, double HToLh)
        {

            #region Read Table

            var SampleValue = new { ExposureCategory = "", TopographyType = "", K1OverHToLh = "" }; // sample
            var K1OverHToLhList = ListFactory.MakeList(SampleValue);

            using (StringReader reader = new StringReader(Resources.ASCE7_10F26_8_1K1OverHToLh))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string[] Vals = line.Split(',');
                    if (Vals.Count() == 3)
                    {
                        string thisTopographyType = (string)Vals[0];
                        string thisExposureCategory = (string)Vals[1];
                        string thisK1OverHToLh = (string)Vals[2];

                        K1OverHToLhList.Add(new
                        {
                            ExposureCategory = thisExposureCategory,
                            TopographyType = thisTopographyType,
                            K1OverHToLh = thisK1OverHToLh
                        });
                    }
                }

            }

            #endregion

            var tableValues = from K1OverHToLhEntry in K1OverHToLhList
                              where (K1OverHToLhEntry.ExposureCategory == windExposureCategory.ToString()
                                  && K1OverHToLhEntry.TopographyType == TopographyType.ToString())
                              select K1OverHToLhEntry;
            var result = (tableValues.ToList()).FirstOrDefault().K1OverHToLh;

            double K1OverHToLh = 0.0;
            if (result != null)
            {
                K1OverHToLh = Double.Parse(result, CultureInfo.InvariantCulture);
            }
            else
            {
                throw new ParameterNotFoundInTableException("K1OverHToLh");
            }
            return K1OverHToLh;
        }
Пример #9
0
        public double GetK1OverHToLh(WindExposureCategory windExposureCategory, TopographyType TopographyType, double HToLh)
        {
            #region Read Table

            var SampleValue     = new { ExposureCategory = "", TopographyType = "", K1OverHToLh = "" }; // sample
            var K1OverHToLhList = ListFactory.MakeList(SampleValue);

            using (StringReader reader = new StringReader(Resources.ASCE7_10F26_8_1K1OverHToLh))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string[] Vals = line.Split(',');
                    if (Vals.Count() == 3)
                    {
                        string thisTopographyType   = (string)Vals[0];
                        string thisExposureCategory = (string)Vals[1];
                        string thisK1OverHToLh      = (string)Vals[2];

                        K1OverHToLhList.Add(new
                        {
                            ExposureCategory = thisExposureCategory,
                            TopographyType   = thisTopographyType,
                            K1OverHToLh      = thisK1OverHToLh
                        });
                    }
                }
            }

            #endregion

            var tableValues = from K1OverHToLhEntry in K1OverHToLhList
                              where (K1OverHToLhEntry.ExposureCategory == windExposureCategory.ToString() &&
                                     K1OverHToLhEntry.TopographyType == TopographyType.ToString())
                              select K1OverHToLhEntry;
            var result = (tableValues.ToList()).FirstOrDefault().K1OverHToLh;

            double K1OverHToLh = 0.0;
            if (result != null)
            {
                K1OverHToLh = Double.Parse(result, CultureInfo.InvariantCulture);
            }
            else
            {
                throw new ParameterNotFoundInTableException("K1OverHToLh");
            }
            return(K1OverHToLh);
        }
Пример #10
0
        public double GetKzt(
            double x, 
            double z,
            double H, 
            double Lh, 
            WindExposureCategory windExposureCategory,
            TopographicLocation TopographicLocation,
            TopographyType TopographyType
            )
        {
            double HToLh = H/Lh;
            double Mu = this.GetMu(TopographyType,TopographicLocation);
            double gamma = Getgamma(TopographyType);
            double K1OverHToLh = GetK1OverHToLh(windExposureCategory, TopographyType, HToLh);
            double K1 = GetK1(K1OverHToLh, HToLh);
            double K2 = GetK2(x,Mu,Lh);
            double K3 = GetK3(gamma, z, Lh);

            double Kzt = Math.Pow(1.0 + K1 * K2 * K3, 2.0);

            
            #region Kzt
            ICalcLogEntry KztEntry = new CalcLogEntry();
            KztEntry.ValueName = "Kzt";
            KztEntry.AddDependencyValue("WindExposureCategory", windExposureCategory.ToString() );
            KztEntry.AddDependencyValue("HillShape", GetHillShapeString(TopographyType));
            KztEntry.AddDependencyValue("LocationRelativeToCrest",GetLocationString(TopographicLocation) );
            KztEntry.AddDependencyValue("HToLh", Math.Round(HToLh, 3));
            KztEntry.AddDependencyValue("z", Math.Round(z, 3));
            KztEntry.AddDependencyValue("x", Math.Round(x, 3));
            KztEntry.AddDependencyValue("Lh", Math.Round(Lh, 3));
            KztEntry.AddDependencyValue("mu", Math.Round(Mu, 3));
            KztEntry.AddDependencyValue("gamma", Math.Round(gamma, 3));
            KztEntry.AddDependencyValue("K1OverHToLh", Math.Round(K1OverHToLh, 3));
            KztEntry.AddDependencyValue("K1", Math.Round(K1, 3));
            KztEntry.AddDependencyValue("K2", Math.Round(K2, 3));
            KztEntry.AddDependencyValue("K3", Math.Round(K3, 3));
            KztEntry.Reference = "";
            KztEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Wind/WindTopographicFactor.docx";
            KztEntry.FormulaID = null; //reference to formula from code
            KztEntry.VariableValue = Math.Round(Kzt, 3).ToString();
            #endregion
            this.AddToLog(KztEntry);
            return Kzt;

        }
        public double GetKzt(
            double x,
            double z,
            double H,
            double Lh,
            WindExposureCategory windExposureCategory,
            TopographicLocation TopographicLocation,
            TopographyType TopographyType
            )
        {
            double HToLh       = H / Lh;
            double Mu          = this.GetMu(TopographyType, TopographicLocation);
            double gamma       = Getgamma(TopographyType);
            double K1OverHToLh = GetK1OverHToLh(windExposureCategory, TopographyType, HToLh);
            double K1          = GetK1(K1OverHToLh, HToLh);
            double K2          = GetK2(x, Mu, Lh);
            double K3          = GetK3(gamma, z, Lh);

            double Kzt = Math.Pow(1.0 + K1 * K2 * K3, 2.0);


            #region Kzt
            ICalcLogEntry KztEntry = new CalcLogEntry();
            KztEntry.ValueName = "Kzt";
            KztEntry.AddDependencyValue("WindExposureCategory", windExposureCategory.ToString());
            KztEntry.AddDependencyValue("HillShape", GetHillShapeString(TopographyType));
            KztEntry.AddDependencyValue("LocationRelativeToCrest", GetLocationString(TopographicLocation));
            KztEntry.AddDependencyValue("HToLh", Math.Round(HToLh, 3));
            KztEntry.AddDependencyValue("z", Math.Round(z, 3));
            KztEntry.AddDependencyValue("x", Math.Round(x, 3));
            KztEntry.AddDependencyValue("Lh", Math.Round(Lh, 3));
            KztEntry.AddDependencyValue("mu", Math.Round(Mu, 3));
            KztEntry.AddDependencyValue("gamma", Math.Round(gamma, 3));
            KztEntry.AddDependencyValue("K1OverHToLh", Math.Round(K1OverHToLh, 3));
            KztEntry.AddDependencyValue("K1", Math.Round(K1, 3));
            KztEntry.AddDependencyValue("K2", Math.Round(K2, 3));
            KztEntry.AddDependencyValue("K3", Math.Round(K3, 3));
            KztEntry.Reference            = "";
            KztEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Wind/WindTopographicFactor.docx";
            KztEntry.FormulaID            = null; //reference to formula from code
            KztEntry.VariableValue        = Math.Round(Kzt, 3).ToString();
            #endregion
            this.AddToLog(KztEntry);
            return(Kzt);
        }
Пример #12
0
        public double GetExposureFactor(WindExposureCategory windExposureCategory, SnowRoofExposure RoofExposure)
        {
            var Tv11      = new { Exposure = WindExposureCategory.B, SnowRoofExposure = SnowRoofExposure.PartiallyExposed, Ce = 0.0 }; // sample
            var ValueList = ListFactory.MakeList(Tv11);

            using (StringReader reader = new StringReader(Resources.ASCE7_10T7_2SnowCe))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string[] Vals = line.Split(',');
                    if (Vals.Count() == 3)
                    {
                        WindExposureCategory _exp    = (WindExposureCategory)Enum.Parse(typeof(WindExposureCategory), Vals[0]);
                        SnowRoofExposure     _SnoExp = (SnowRoofExposure)Enum.Parse(typeof(SnowRoofExposure), Vals[1]);
                        double _Ce = double.Parse(Vals[2], CultureInfo.InvariantCulture);

                        ValueList.Add(new { Exposure = _exp, SnowRoofExposure = _SnoExp, Ce = _Ce });
                    }
                }
            }

            var CeValues = from sc in ValueList where (sc.Exposure == windExposureCategory && sc.SnowRoofExposure == RoofExposure) select sc;
            var Ce       = CeValues.ToList().FirstOrDefault().Ce;

            string ExposureCategoryString = GetExposureCategoryString(windExposureCategory);
            string RoofExposureString     = GetRoofExposureString(RoofExposure);


            #region Ce
            ICalcLogEntry CeEntry = new CalcLogEntry();
            CeEntry.ValueName = "Ce";
            CeEntry.AddDependencyValue("WindExposureCategory", ExposureCategoryString);
            CeEntry.AddDependencyValue("RoofExposure", RoofExposureString);
            CeEntry.Reference            = "";
            CeEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowExposureFactor.docx";
            CeEntry.FormulaID            = null; //reference to formula from code
            CeEntry.VariableValue        = Math.Round(Ce, 3).ToString();
            #endregion
            this.AddToLog(CeEntry);

            return(Ce);
        }
Пример #13
0
        public double GetTerrainExposureConstant(TerrainExposureConstant TerrainExposureConstant, WindExposureCategory WindExposure)
        {
            if (terrainCoefficientsNeedCalculation == true)
	        {
		        CalculateTerrainCoefficients(WindExposure);
                terrainCoefficientsNeedCalculation=false;
	        }
            switch (TerrainExposureConstant)
	        {
		        case TerrainExposureConstant.alpha:          return alpha;
                case TerrainExposureConstant.zg:             return zg;
                case TerrainExposureConstant.alpha_ob:       return alpha_ob;
                case TerrainExposureConstant.b_ob:           return b_ob;
                case TerrainExposureConstant.c:              return c;
                case TerrainExposureConstant.l:              return l;
                case TerrainExposureConstant.epsilon_ob:     return epsilon_overbar;
                case TerrainExposureConstant.zmin:           return zmin;
                default: throw new Exception("Unrecognized terrain _windExposure constant.");
	        }
        }
Пример #14
0
 public double GetK1(WindExposureCategory windExposureCategory, TopographyType TopographyType, double HToLh)
 {
     double K1OverHToLh = GetK1OverHToLh(windExposureCategory, TopographyType, HToLh);
     double K1 = K1OverHToLh * HToLh;
     return K1;
 }
 public BuildingDirectionalProcedureElement(double Width, double Length, double Height, double WindSpeed, WindExposureCategory windExposureType,
                                            WindEnclosureType EnclosureClass,
                                            WindStructureDynamicResponseType StructureDynamicClass, double Damping, ICalcLog CalcLog)
     : base(Width, Length, Height, WindSpeed, windExposureType, EnclosureClass, StructureDynamicClass, Damping, CalcLog)
 {
 }
Пример #16
0
        public WindStructure(double Width, double Length, double Height, double WindSpeed, WindExposureCategory windExposureType,
                             WindEnclosureType EnclosureClass, WindStructureDynamicResponseType StructureDynamicClass,
                             double Damping, ICalcLog CalcLog) : base(CalcLog)
        {
            this.width                   = Width;
            this.length                  = Length;
            this.height                  = Height;
            this.windSpeed               = WindSpeed;
            this._windExposure           = windExposureType;
            this.enclosureClassification = EnclosureClass;
            this.dynamicClassification   = StructureDynamicClass;
            this.damping                 = Damping;


            terrainCoefficientsNeedCalculation = true;
        }
Пример #17
0
        private void CalculateTerrainCoefficients( WindExposureCategory WindExposure)
        {
            this.WindExposure = WindExposure;
            terrainCoefficientsNeedCalculation = false;

            var Tv11 = new { Exposure = WindExposureCategory.B, alpha = 0.0, zg = 0.0, alpha_ob = 0.0, b_ob = 0.0, c = 0.0, l = 0.0, epsilon_overbar = 0.0, zmin = 0.0 }; // sample
            var TerrainCoefficientList = ListFactory.MakeList(Tv11);

            using (StringReader reader = new StringReader(Resources.ASCE7_10T26_9_1))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string[] Vals = line.Split(',');
                    if (Vals.Count() == 9)
                    {
                        WindExposureCategory _exp = (WindExposureCategory)Enum.Parse(typeof(WindExposureCategory), Vals[0]);
                        double _alpha = double.Parse(Vals[1], CultureInfo.InvariantCulture);
                        double _zg = double.Parse(Vals[2], CultureInfo.InvariantCulture);
                        double _alpha_ob = double.Parse(Vals[3], CultureInfo.InvariantCulture);
                        double _b_ob = double.Parse(Vals[4], CultureInfo.InvariantCulture);
                        double _c = double.Parse(Vals[5], CultureInfo.InvariantCulture);
                        double _l = double.Parse(Vals[6], CultureInfo.InvariantCulture);
                        double _epsilon_ob = double.Parse(Vals[7], CultureInfo.InvariantCulture);
                        double _zmin = double.Parse(Vals[8], CultureInfo.InvariantCulture);

                        TerrainCoefficientList.Add(new { Exposure = _exp, alpha = _alpha, zg = _zg, alpha_ob = _alpha_ob, b_ob = _b_ob, c = _c, l = _l, epsilon_overbar = _epsilon_ob, zmin = _zmin });
                    }
                }

            }

            var ScValues = from sc in TerrainCoefficientList where (sc.Exposure == WindExposure) select sc;
            var ScResult = ScValues.ToList()[0];   

            if (ScResult != null)
            {
                alpha = ScResult.alpha;
                zg = ScResult.zg;
                alpha_ob = ScResult.alpha_ob;
                b_ob = ScResult.b_ob;
                c = ScResult.c;
                l = ScResult.l;
                epsilon_overbar = ScResult.epsilon_overbar;
                zmin = ScResult.zmin;


                
                #region ExposureConst
                ICalcLogEntry ExposureConstEntry = new CalcLogEntry();
                ExposureConstEntry.ValueName = "ExposureConst";
                    ExposureConstEntry.AddDependencyValue("WindExposureCategory", WindExposure.ToString());
                    ExposureConstEntry.AddDependencyValue("alpha"           ,Math.Round(alpha           ,3));
                    ExposureConstEntry.AddDependencyValue("zg"              ,Math.Round(zg              ,3));
                    ExposureConstEntry.AddDependencyValue("alphob"         ,Math.Round(alpha_ob        ,3));
                    ExposureConstEntry.AddDependencyValue("b_ob"            ,Math.Round(b_ob            ,3));
                    ExposureConstEntry.AddDependencyValue("c"               ,Math.Round(c               ,3));
                    ExposureConstEntry.AddDependencyValue("l"               ,Math.Round(l               ,3));
                    ExposureConstEntry.AddDependencyValue("epsilon_overbar" ,Math.Round(epsilon_overbar ,3));
                    ExposureConstEntry.AddDependencyValue("zmin"            ,Math.Round(zmin            ,3));

                ExposureConstEntry.Reference = "";
                ExposureConstEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Wind/GustFactor/TerrainExposureConstants.docx";
                ExposureConstEntry.FormulaID = null; //reference to formula from code
                ExposureConstEntry.VariableValue = WindExposure.ToString();
                #endregion
                this.AddToLog(ExposureConstEntry);
                terrainCoefficientsNeedCalculation = false;
            }
            else
            {
                throw new Exception("_windExposure not found. Failed to retrieve _windExposure coefficients");
            }

        }
Пример #18
0
        private void CalculateTerrainCoefficients(WindExposureCategory WindExposure)
        {
            this.WindExposure = WindExposure;
            terrainCoefficientsNeedCalculation = false;

            var Tv11 = new { Exposure = WindExposureCategory.B, alpha = 0.0, zg = 0.0, alpha_ob = 0.0, b_ob = 0.0, c = 0.0, l = 0.0, epsilon_overbar = 0.0, zmin = 0.0 }; // sample
            var TerrainCoefficientList = ListFactory.MakeList(Tv11);

            using (StringReader reader = new StringReader(Resources.ASCE7_10T26_9_1))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    string[] Vals = line.Split(',');
                    if (Vals.Count() == 9)
                    {
                        WindExposureCategory _exp = (WindExposureCategory)Enum.Parse(typeof(WindExposureCategory), Vals[0]);
                        double _alpha             = double.Parse(Vals[1], CultureInfo.InvariantCulture);
                        double _zg         = double.Parse(Vals[2], CultureInfo.InvariantCulture);
                        double _alpha_ob   = double.Parse(Vals[3], CultureInfo.InvariantCulture);
                        double _b_ob       = double.Parse(Vals[4], CultureInfo.InvariantCulture);
                        double _c          = double.Parse(Vals[5], CultureInfo.InvariantCulture);
                        double _l          = double.Parse(Vals[6], CultureInfo.InvariantCulture);
                        double _epsilon_ob = double.Parse(Vals[7], CultureInfo.InvariantCulture);
                        double _zmin       = double.Parse(Vals[8], CultureInfo.InvariantCulture);

                        TerrainCoefficientList.Add(new { Exposure = _exp, alpha = _alpha, zg = _zg, alpha_ob = _alpha_ob, b_ob = _b_ob, c = _c, l = _l, epsilon_overbar = _epsilon_ob, zmin = _zmin });
                    }
                }
            }

            var ScValues = from sc in TerrainCoefficientList where (sc.Exposure == WindExposure) select sc;
            var ScResult = ScValues.ToList()[0];

            if (ScResult != null)
            {
                alpha           = ScResult.alpha;
                zg              = ScResult.zg;
                alpha_ob        = ScResult.alpha_ob;
                b_ob            = ScResult.b_ob;
                c               = ScResult.c;
                l               = ScResult.l;
                epsilon_overbar = ScResult.epsilon_overbar;
                zmin            = ScResult.zmin;



                #region ExposureConst
                ICalcLogEntry ExposureConstEntry = new CalcLogEntry();
                ExposureConstEntry.ValueName = "ExposureConst";
                ExposureConstEntry.AddDependencyValue("WindExposureCategory", WindExposure.ToString());
                ExposureConstEntry.AddDependencyValue("alpha", Math.Round(alpha, 3));
                ExposureConstEntry.AddDependencyValue("zg", Math.Round(zg, 3));
                ExposureConstEntry.AddDependencyValue("alphob", Math.Round(alpha_ob, 3));
                ExposureConstEntry.AddDependencyValue("b_ob", Math.Round(b_ob, 3));
                ExposureConstEntry.AddDependencyValue("c", Math.Round(c, 3));
                ExposureConstEntry.AddDependencyValue("l", Math.Round(l, 3));
                ExposureConstEntry.AddDependencyValue("epsilon_overbar", Math.Round(epsilon_overbar, 3));
                ExposureConstEntry.AddDependencyValue("zmin", Math.Round(zmin, 3));

                ExposureConstEntry.Reference            = "";
                ExposureConstEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Wind/GustFactor/TerrainExposureConstants.docx";
                ExposureConstEntry.FormulaID            = null; //reference to formula from code
                ExposureConstEntry.VariableValue        = WindExposure.ToString();
                #endregion
                this.AddToLog(ExposureConstEntry);
                terrainCoefficientsNeedCalculation = false;
            }
            else
            {
                throw new Exception("_windExposure not found. Failed to retrieve _windExposure coefficients");
            }
        }
Пример #19
0
        public double GetTerrainExposureConstant(TerrainExposureConstant TerrainExposureConstant, WindExposureCategory WindExposure)
        {
            if (terrainCoefficientsNeedCalculation == true)
            {
                CalculateTerrainCoefficients(WindExposure);
                terrainCoefficientsNeedCalculation = false;
            }
            switch (TerrainExposureConstant)
            {
            case TerrainExposureConstant.alpha:          return(alpha);

            case TerrainExposureConstant.zg:             return(zg);

            case TerrainExposureConstant.alpha_ob:       return(alpha_ob);

            case TerrainExposureConstant.b_ob:           return(b_ob);

            case TerrainExposureConstant.c:              return(c);

            case TerrainExposureConstant.l:              return(l);

            case TerrainExposureConstant.epsilon_ob:     return(epsilon_overbar);

            case TerrainExposureConstant.zmin:           return(zmin);

            default: throw new Exception("Unrecognized terrain _windExposure constant.");
            }
        }