コード例 #1
0
        /// <summary>
        /// Calculate the moment of inertia for cracking section.
        /// </summary>
        /// <param name="inNMM">The acting forces.</param>
        /// <returns>Returns moment of inertia for cracking section.</returns>
        public double InertiaOfCrackingSection(InternalForcesContainer inNMM)
        {
            double momentOfInertiaCrackingConcreteSection = 0.0;

            solver.SolveResistance(inNMM.ForceFx, inNMM.MomentMy, 0.0);
            SetOfForces solverNMM        = solver.GetInternalForces(Autodesk.CodeChecking.Concrete.ResultType.Section);
            double      neutralAxisDist  = solver.GetNeutralAxisDistance();
            double      centerOfInertiaY = solverGeometry.CenterOfInertia.Y;
            double      stressArea       = solver.GetConcreteStressArea();
            double      comprHeight      = -neutralAxisDist;
            Steel       steel            = solver.GetSteel();

            Autodesk.CodeChecking.Concrete.Concrete concrete = solver.GetConcrete();
            double bottomWidth = solverGeometry.Point(1).X - solverGeometry.Point(0).X;
            double n           = steel.ModulusOfElasticity / concrete.ModulusOfElasticity;

            momentOfInertiaCrackingConcreteSection  = comprHeight * comprHeight * comprHeight * bottomWidth / 3.0; // bh^3/12 + b*h*(0.5*h)^2
            momentOfInertiaCrackingConcreteSection += n * (solver.GetMomentOfInertiaX(Autodesk.CodeChecking.Concrete.ResultType.Rebars) + Math.Abs(neutralAxisDist) * solver.GetArea(Autodesk.CodeChecking.Concrete.ResultType.Rebars));
            switch (crossSectionType)
            {
            case SectionShapeType.RectangularBar:
                break;

            case SectionShapeType.T:
            {
                bool   bottomMoreCompression = inNMM.MomentMy >= 0.0;
                double TotalWidth            = solverGeometry.Point(4).X - solverGeometry.Point(5).X;
                if (bottomMoreCompression)
                {
                    double WithoutSlabHeight = solverGeometry.Point(2).Y - solverGeometry.Point(1).Y;
                    if (comprHeight > WithoutSlabHeight)
                    {
                        double partT = (comprHeight - WithoutSlabHeight);
                        momentOfInertiaCrackingConcreteSection += Math.Pow(comprHeight - 0.5 * partT, 2) * (TotalWidth - bottomWidth);
                        momentOfInertiaCrackingConcreteSection += (TotalWidth - bottomWidth) * partT * partT * partT / 12.0;
                    }
                }
                else
                {
                    double SlabHeight = solverGeometry.Point(4).Y - solverGeometry.Point(3).Y;
                    SlabHeight = Math.Min(SlabHeight, comprHeight);
                    momentOfInertiaCrackingConcreteSection += Math.Pow(comprHeight - 0.5 * SlabHeight, 2) * (TotalWidth - bottomWidth);
                    momentOfInertiaCrackingConcreteSection += (TotalWidth - bottomWidth) * SlabHeight * SlabHeight * SlabHeight / 12.0;
                }
            }
            break;

            default:
                throw new Exception("InertiaOfCrackingSection. Unhandled cross section type. Only R and T cross-sections can be used on this path.");
            }
            return(momentOfInertiaCrackingConcreteSection);
        }
コード例 #2
0
        /// <summary>
        /// Case 1: Cross section characteristics
        /// </summary>
        public void Case1()
        {
            // geometry definition
            Geometry geometry = new Geometry();

            geometry.Add(0.0, 0.0);
            geometry.Add(0.0, 0.2);
            geometry.Add(0.2, 0.2);
            geometry.Add(0.2, 0.6);
            geometry.Add(0.5, 0.6);
            geometry.Add(0.5, 0.3);
            geometry.Add(0.8, 0.3);
            geometry.Add(0.8, 0.0);
            // rebars definition
            List <Rebar> rebars = new List <Rebar>();

            // rebar area A = d*d*pi/4
            rebars.Add(new Rebar(0.05, 0.05, 0.010 * 0.010 * Math.PI / 4.0));
            rebars.Add(new Rebar(0.75, 0.05, 0.012 * 0.012 * Math.PI / 4.0));
            rebars.Add(new Rebar(0.75, 0.25, 0.020 * 0.020 * Math.PI / 4.0));
            rebars.Add(new Rebar(0.45, 0.55, 0.050 * 0.050 * Math.PI / 4.0));
            rebars.Add(new Rebar(0.25, 0.55, 0.020 * 0.020 * Math.PI / 4.0));
            rebars.Add(new Rebar(0.05, 0.15, 0.015 * 0.015 * Math.PI / 4.0));
            // concrete parameters
            Concrete concrete = new Concrete();

            concrete.ModulusOfElasticity = 30e9;
            // steel parameters
            Steel steel = new Steel();

            steel.ModulusOfElasticity = 200e9;
            // solver creation and parameterization
            RCSolver solver = RCSolver.CreateNewSolver(geometry);

            solver.SetRebars(rebars);
            solver.SetConcrete(concrete);
            solver.SetSteel(steel);
            // result for concrete
            double  Ac  = solver.GetArea(ResultType.Concrete);
            Point2D Cc  = solver.GetCenterOfInertia(ResultType.Concrete);
            double  Icx = solver.GetMomentOfInertiaX(ResultType.Concrete);
            double  Icy = solver.GetMomentOfInertiaY(ResultType.Concrete);
            // result for rebars
            double  As  = solver.GetArea(ResultType.Rebars);
            Point2D Cs  = solver.GetCenterOfInertia(ResultType.Rebars);
            double  Isx = solver.GetMomentOfInertiaX(ResultType.Rebars);
            double  Isy = solver.GetMomentOfInertiaY(ResultType.Rebars);
            // result for reduced
            double  Aeff  = solver.GetArea(ResultType.Section);
            Point2D Ceff  = solver.GetCenterOfInertia(ResultType.Section);
            double  Ieffx = solver.GetMomentOfInertiaX(ResultType.Section);

            double Ieffy = solver.GetMomentOfInertiaY(ResultType.Section);

            // result presentation

            sb.AppendLine();
            sb.AppendLine(decoration);
            sb.AppendLine("Case 1: Cross section characteristics");
            sb.AppendLine(decoration);
            sb.AppendLine(FormatOutput("Ac", Ac, 6));
            sb.AppendLine(FormatOutput("Ccx", Cc.X, 6));
            sb.AppendLine(FormatOutput("Ccy", Cc.Y, 6));
            sb.AppendLine(FormatOutput("Icx", Icx, 6));
            sb.AppendLine(FormatOutput("Icy", Icy, 6));
            sb.AppendLine(FormatOutput("As", As, 6));
            sb.AppendLine(FormatOutput("Csx", Cs.X, 6));
            sb.AppendLine(FormatOutput("Csy", Cs.Y, 6));
            sb.AppendLine(FormatOutput("Isx", Isx, 6));
            sb.AppendLine(FormatOutput("Isy", Isy, 6));
            sb.AppendLine(FormatOutput("Aeff", Aeff, 6));
            sb.AppendLine(FormatOutput("Ceffx", Ceff.X, 6));
            sb.AppendLine(FormatOutput("Ceffy", Ceff.Y, 6));
            sb.AppendLine(FormatOutput("Ieffx", Ieffx, 6));
            sb.AppendLine(FormatOutput("Ieffy", Ieffy, 6));
        }