예제 #1
0
        private string getLineSection(LineElement l)
        {
            if (l.Properties is StraightFrameProps)
            {
                Model.Section.FrameSection sec = ((StraightFrameProps)l.Properties).Section;
                return("\n" + sec.Description);
            }

            return(string.Empty);
        }
예제 #2
0
 /// <summary>
 /// Gets the stress at the point specified by (pt22, pt33) in the Line's contour local axes, given the internal
 /// forces diagrams for Axial and Moments in 2 and 3.
 /// </summary>
 /// <param name="line">The line to calculate the stress to</param>
 /// <param name="s1">The axial internal forces diagram for the Line</param>
 /// <param name="m22">The Moment in 2 internal forces diagram for the Line</param>
 /// <param name="m33">The Moment in 3 internal forces diagram for the Line</param>
 /// <param name="pointIndex">The index of the diagram to use at the moment,
 /// corresponds to the position in the Local-1 Axis</param>
 /// <param name="pt22">The point in the Local-2 Axis, corresponds to contour [.][1]</param>
 /// <param name="pt33">The point in the Local-2 Axis, corresponds to contour [.][0]</param>
 /// <returns>The stress at the specified point.</returns>
 public float GetStressAtPoint(Model.Section.FrameSection section, float[,] s1, float[,] m22, float[,] m33, int pointIndex, float pt22, float pt33)
 {
     return((s1[pointIndex, 1] / section.Area) + (m22[pointIndex, 1] * pt22 / section.I22) - (m33[pointIndex, 1] * pt33 / section.I33));
 }
예제 #3
0
        private string getLineDesignInfo(LineElement l, float xPos)
        {
            string smallDistance = units.UnitName(Canguro.Model.UnitSystem.Units.SmallDistance);
            string area          = units.UnitName(Canguro.Model.UnitSystem.Units.Area);
            string distance      = units.UnitName(Canguro.Model.UnitSystem.Units.Distance);

            string ret;

            Model.Section.FrameSection sec = ((StraightFrameProps)l.Properties).Section;

            if (sec.Material.DesignProperties is Canguro.Model.Material.SteelDesignProps)
            {
                ret = Culture.Get("CanguroViewReportsSteelDesignWrapper") + "\n\n";

                Model.Results.SteelDesignSummary      designSum   = model.Results.DesignSteelSummary[l.Id];
                Model.Results.SteelDesignPMMDetails   designPMM   = model.Results.DesignSteelPMMDetails[l.Id];
                Model.Results.SteelDesignShearDetails designShear = model.Results.DesignSteelShearDetails[l.Id];

                // Steel Design Summary
                ret = "\n";
                if (!string.IsNullOrEmpty(designSum.Status) && !designSum.Status.Equals("No Messages"))
                {
                    ret += designSum.Status + "\n";
                }
                if (!string.IsNullOrEmpty(designSum.ErrMsg))
                {
                    ret += designSum.ErrMsg + "\n";
                }
                if (!string.IsNullOrEmpty(designSum.WarnMsg))
                {
                    ret += designSum.WarnMsg + "\n";
                }
                ret += Culture.Get("CanguroViewReportsSteelDesignWrapperRatio") + ": " + designSum.Ratio.ToString("F5");

                // Steel Design PMM Details
                ret += "\n\n" + Culture.Get("CanguroViewReportsSteelDesignPMMWrapper") + "\n\n";
                if (!string.IsNullOrEmpty(designPMM.Status) && !designPMM.Status.Equals("No Messages"))
                {
                    ret += designPMM.Status + "\n";
                }
                if (!string.IsNullOrEmpty(designPMM.ErrMsg))
                {
                    ret += designPMM.ErrMsg + "\n";
                }
                if (!string.IsNullOrEmpty(designPMM.WarnMsg))
                {
                    ret += designPMM.WarnMsg + "\n";
                }
                ret += Culture.Get("CanguroViewReportsSteelDesignPMMWrapperTotalRatio") + ": " + designPMM.TotalRatio.ToString("F5") + "\n";
                ret += Culture.Get("CanguroViewReportsSteelDesignPMMWrapperPRatio") + ": " + designPMM.PRatio.ToString("F5") + "\n";
                ret += Culture.Get("CanguroViewReportsSteelDesignPMMWrapperMMajRatio") + ": " + designPMM.MMajRatio.ToString("F5") + "\n";
                ret += Culture.Get("CanguroViewReportsSteelDesignPMMWrapperMMinRatio") + ": " + designPMM.MMinRatio.ToString("F5") + "\n";

                // Steel Design Shear Details
                ret += "\n\n" + Culture.Get("CanguroViewReportsSteelDesignShearWrapper") + "\n\n";
                if (!string.IsNullOrEmpty(designShear.Status) && !designShear.Status.Equals("No Messages"))
                {
                    ret += designShear.Status + "\n";
                }
                if (!string.IsNullOrEmpty(designShear.ErrMsg))
                {
                    ret += designShear.ErrMsg + "\n";
                }
                if (!string.IsNullOrEmpty(designShear.WarnMsg))
                {
                    ret += designShear.WarnMsg + "\n";
                }
                ret += Culture.Get("CanguroViewReportsSteelDesignShearWrapperVMajorRatio") + ": " + designShear.VMajorRatio.ToString("F5") + "\n";
                ret += Culture.Get("CanguroViewReportsSteelDesignShearWrapperVMinorRatio") + ": " + designShear.VMinorRatio.ToString("F5");
            }
            else
            {
                ret = Culture.Get("CanguroViewReportsConcreteBeamDesignWrapper") + "\n\n";

                // Concrete Design
                if (sec.ConcreteProperties is Model.Section.ConcreteBeamSectionProps)
                {
                    Model.Results.ConcreteBeamDesign design = model.Results.DesignConcreteBeam[l.Id];

                    ret = "\n";
                    if (!string.IsNullOrEmpty(design.Status) && !design.Status.Equals("No Messages"))
                    {
                        ret += design.Status + "\n";
                    }
                    if (!string.IsNullOrEmpty(design.ErrMsg))
                    {
                        ret += design.ErrMsg + "\n";
                    }
                    if (!string.IsNullOrEmpty(design.WarnMsg))
                    {
                        ret += design.WarnMsg + "\n";
                    }
                    ret += Culture.Get("CanguroViewReportsConcreteBeamDesignWrapperBottomRebarArea") + ": " + units.FromInternational(design.FBotArea, Canguro.Model.UnitSystem.Units.Area).ToString("G3") + area + "\n";
                    ret += Culture.Get("CanguroViewReportsConcreteBeamDesignWrapperTopRebarArea") + ": " + units.FromInternational(design.FTopArea, Canguro.Model.UnitSystem.Units.Area).ToString("G3") + area + "\n";
                    ret += Culture.Get("CanguroViewReportsConcreteBeamDesignWrapperVRebar") + ": " + units.FromInternational(units.Convert(design.VRebar, Canguro.Model.UnitSystem.Units.Distance, Canguro.Model.UnitSystem.Units.SmallDistance), Canguro.Model.UnitSystem.Units.SmallDistance).ToString("G3") + smallDistance + "2/" + distance;
                }
                else if (sec.ConcreteProperties is Model.Section.ConcreteColumnSectionProps)
                {
                    Model.Results.ConcreteColumnDesign design = model.Results.DesignConcreteColumn[l.Id];

                    ret = "\n";
                    if (!string.IsNullOrEmpty(design.Status) && !design.Status.Equals("No Messages"))
                    {
                        ret += design.Status + "\n";
                    }
                    if (!string.IsNullOrEmpty(design.ErrMsg))
                    {
                        ret += design.ErrMsg + "\n";
                    }
                    if (!string.IsNullOrEmpty(design.WarnMsg))
                    {
                        ret += design.WarnMsg + "\n";
                    }

                    Model.Section.ConcreteColumnSectionProps cProps = (Model.Section.ConcreteColumnSectionProps)sec.ConcreteProperties;
                    float rebarArea = cProps.NumberOfBars * Model.Section.BarSizes.Instance.GetArea(cProps.BarSize);

                    ret += Culture.Get("CanguroViewReportsConcreteColumnDesignWrapperPMMArea") + ": " + units.FromInternational(design.PMMArea, Canguro.Model.UnitSystem.Units.Area).ToString("G3") + area + " (" + (rebarArea / design.PMMArea).ToString("F") + "%)\n";
                    ret += Culture.Get("CanguroViewReportsConcreteColumnDesignWrapperPMMRatio") + ": " + design.PMMRatio + "\n";
                    ret += Culture.Get("CanguroViewReportsConcreteColumnDesignWrapperVMajRebar") + ": " + units.FromInternational(units.Convert(design.VMajRebar, Canguro.Model.UnitSystem.Units.Distance, Canguro.Model.UnitSystem.Units.SmallDistance), Canguro.Model.UnitSystem.Units.SmallDistance).ToString("G3") + smallDistance + "^2/" + distance + "\n";
                    ret += Culture.Get("CanguroViewReportsConcreteColumnDesignWrapperVMinRebar") + ": " + units.FromInternational(units.Convert(design.VMinRebar, Canguro.Model.UnitSystem.Units.Distance, Canguro.Model.UnitSystem.Units.SmallDistance), Canguro.Model.UnitSystem.Units.SmallDistance).ToString("G3") + smallDistance + "^2/" + distance + "\n";
                }
            }

            return(ret);
        }