Esempio n. 1
0
        public static IEnumerable <WP.Paragraph> Calculate(ProjectTruss projectTrussToCalculate, ISteelRepository steelRepository)
        {
            var barsCalculationParagraph = new List <WP.Paragraph>();
            var trussToCalculate         = projectTrussToCalculate.Truss;
            var projectToCalculate       = projectTrussToCalculate.Project;

            barsCalculationParagraph.Add(FormulaCreator.CenterBigTextParagraph($"Расчет фермы"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Проект: {projectToCalculate.Code} - {projectToCalculate.Description}"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Ферма: {projectTrussToCalculate.TrussName}."));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Шаг ферм: {projectTrussToCalculate.TrussSpacing} мм, нагрузка на 1м2: {projectTrussToCalculate.Load} кгс/м2."));
            barsCalculationParagraph.Add(FormulaCreator.CenterBigTextParagraph($"Информация о ферме"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Пролет: {trussToCalculate.Span} мм"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Уклон: {trussToCalculate.Slope}"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Высота на опоре: {trussToCalculate.SupportDepth} мм"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Количество панелей: {trussToCalculate.PanelAmount}"));
            barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Тип нагрузки: {trussToCalculate.LoadType}"));



            var barsToCalc = trussToCalculate.Bar.OrderBy(bar => bar.BarNumber);

            foreach (var bar in barsToCalc)
            {
                barsCalculationParagraph.AddRange(FormulaCreator.GenerateParagraphWithBarText(bar));

                var Ry = steelRepository.GetStrength(bar.Steel, bar.Section.Thickness);
                barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Расчетное сопротивления стержня по пределу текучести: {Ry} кгс/м2"));
                if (bar.ActualForce < 0)
                {
                    var ecc = bar.ActualMoment / Math.Abs(bar.ActualForce) * 100;
                    var m   = ecc * bar.Section.Area / bar.Section.SectionModulusX;

                    if (Math.Abs(bar.Moment) < TOLERANCE || m <= 0.1)
                    {
                        barsCalculationParagraph.Add(bar.ActualMoment == 0
                            ? FormulaCreator.TextParagraph($"Стержень рассчитывается на сжатие")
                            : FormulaCreator.TextParagraph($"Влияние момента незначительно, стержень рассчитывается на сжатие"));
                        barsCalculationParagraph.AddRange(CalculateForce(bar, Ry));
                    }
                    else
                    {
                        barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Стержень рассчитывается на сжатие с изгибом"));
                        barsCalculationParagraph.AddRange(CalculateForceMoment(bar, Ry));
                    }
                }
                else
                {
                    barsCalculationParagraph.Add(FormulaCreator.TextParagraph($"Стержень рассчитывается на растяжение"));
                    bar.CalcType   = "расчет на растяжение";
                    bar.CalcResult = bar.ActualForce / bar.Section.Area / Ry * 100;
                    barsCalculationParagraph.Add(FormulaCreator.GenerateParagraphWithAxialTensionFormula(bar, Ry));
                }
            }

            return(barsCalculationParagraph);
        }
Esempio n. 2
0
        public static IEnumerable <WP.Paragraph> CalculateForceMoment(Bar bar, float Ry)
        {
            var report = new List <WP.Paragraph>();

            var section = bar.Section;
            var ecc     = bar.ActualMoment / Math.Abs(bar.ActualForce) * 100;

            report.Add(FormulaCreator.GenerateParagraphWithText($"Эксцентриситет:"));
            report.Add(FormulaCreator.EccentricityParagraph(bar, ecc));

            var m = ecc * section.Area / section.SectionModulusX;

            report.Add(FormulaCreator.GenerateParagraphWithText($"Относительный эксцентриситет:"));
            report.Add(FormulaCreator.ReffEccentricityParagraph(bar, ecc, m));

            var lambda_x = bar.Length / section.RadiusOfGyrationX / 10;

            report.Add(FormulaCreator.GenerateParagraphWithText("Гибкость стержня: "));
            report.Add(FormulaCreator.LambdaParagraph(bar, lambda_x));

            var lambda_x_ref = lambda_x * (float)Math.Sqrt(Ry / E);

            report.Add(FormulaCreator.GenerateParagraphWithText("Условная гибкость стержня: "));
            report.Add(FormulaCreator.LambdaRefParagraph(lambda_x, lambda_x_ref, Ry, E));

            var af_aw = section.Width / 2F / section.Height;

            report.Add(FormulaCreator.GenerateParagraphWithText("Коэффициент η определяем по таблице 73 в зависимости от относительного эксцентриситета m, условной гибкости стержня и отношении площади полок к площади стенок сечения:"));
            report.Add(FormulaCreator.AreaFractionParagraph(bar, af_aw));

            var etta = Etta(af_aw, lambda_x_ref, m, bar);

            report.Add(FormulaCreator.GenerateParagraphWithText($"η = {etta}"));

            var mef = m * etta;

            report.Add(FormulaCreator.GenerateParagraphWithText("Приведенный относительный коэффициент: "));
            report.Add(FormulaCreator.MefParagraph(m, etta, mef));

            var fie = GetFie(lambda_x_ref, mef);

            report.Add(FormulaCreator.GenerateParagraphWithText($"По таблице 74 СНиП II-23-81* определяем коэффициент φe: {fie}"));



            bar.CalcResult = Math.Abs(bar.ActualForce) / bar.Section.Area / Ry * 100 / fie;
            report.Add(FormulaCreator.GenerateParagraphWithText($"Проверка стержня на потерю устойчивости в плоскости:"));
            report.Add(FormulaCreator.GenerateParagraphWithAxialCompressionFormula(bar, Ry, fie, true));
            bar.CalcType = "расчет на в/ц сжатие";
            return(report);
        }
Esempio n. 3
0
        public static IEnumerable <WP.Paragraph> CalculateForce(Bar bar, float Ry)
        {
            var report = new List <WP.Paragraph>();
            var lambda = bar.Length / bar.Section.RadiusOfGyrationX / 10;

            report.Add(FormulaCreator.GenerateParagraphWithText("Гибкость стержня: "));
            report.Add(FormulaCreator.LambdaParagraph(bar, lambda));

            var lambdaRef = lambda * (float)Math.Sqrt(Ry / E);

            report.Add(FormulaCreator.GenerateParagraphWithText("Условная гибкость стержня: "));
            report.Add(FormulaCreator.LambdaRefParagraph(lambda, lambdaRef, Ry, E));

            float fi;

            if (lambdaRef > 0 && lambdaRef <= 2.5)
            {
                fi = (float)(1 - (0.073 - 5.53 * Ry / E) * (float)Math.Pow(lambdaRef, 1.5));
            }
            else if (lambdaRef > 2.5 && lambdaRef <= 4.5)
            {
                fi = (float)(1.47 - 13 * Ry / E - (0.371 - 27.3 * Ry / E) * lambdaRef +
                             (0.0275 - 5.53 * Ry / E) * lambdaRef * lambdaRef);
            }
            else if (lambdaRef > 4.5)
            {
                fi = 332 / (lambdaRef * lambdaRef * (51 - lambdaRef));
            }
            else
            {
                throw new ArgumentException($"Incorrect lambda ref coefficient = {lambdaRef} in bar {bar.ElementType} - {bar.BarNumber}");
            }
            report.Add(FormulaCreator.GenerateParagraphWithText($"По таблице 72 СНиП II-23-81* определяем коэффициент φ: {fi}"));

            report.Add(FormulaCreator.GenerateParagraphWithText($"Проверка стержня на потерю устойчивости:"));
            bar.CalcResult = Math.Abs(Math.Abs(bar.ActualForce) / bar.Section.Area / fi / Ry * 100);
            report.Add(FormulaCreator.GenerateParagraphWithAxialCompressionFormula(bar, Ry, fi, false));
            bar.CalcType = "расчет на сжатие";
            return(report);
        }