public void CompoundShapeReturnsPNA_WT()
        {
            //Properties
            double d        = 8.49;
            double b_f      = 10.4;
            double t_w      = 0.585;
            double t_f      = 0.985;
            double k        = 1.39;
            double y_p      = 0.706;
            double refValue = d - y_p;

            CompoundShapePart    TopFlange = new CompoundShapePart(b_f, t_f, new Point2D(0, d - t_f / 2));
            PartWithDoubleFillet TopFillet = new PartWithDoubleFillet(k, t_w, new Point2D(0, d - t_f), true);
            CompoundShapePart    Web       = new CompoundShapePart(t_w, d - t_f - k, new Point2D(0, d / 2));

            List <CompoundShapePart> tee = new List <CompoundShapePart>()
            {
                TopFlange,
                TopFillet,
                Web,
            };

            ArbitraryCompoundShape shape = new ArbitraryCompoundShape(tee, null);
            double y_pCalculated         = shape.y_pBar;
            double actualTolerance       = EvaluateActualTolerance(y_pCalculated, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public void CompoundShapeReturnsPNA_W()
        {
            //Properties
            double d   = 17.7;
            double b_f = 6.00;
            double t_w = 0.300;
            double t_f = 0.425;
            double k   = 0.827;

            double refValue = d / 2;

            CompoundShapePart    TopFlange    = new CompoundShapePart(b_f, t_f, new Point2D(0, d - t_f / 2));
            CompoundShapePart    BottomFlange = new CompoundShapePart(b_f, t_f, new Point2D(0, t_f / 2));
            CompoundShapePart    Web          = new CompoundShapePart(t_w, d - 2 * (t_f + k), new Point2D(0, d / 2));
            PartWithDoubleFillet TopFillet    = new PartWithDoubleFillet(k, t_w, new Point2D(0, d - t_f), true);
            PartWithDoubleFillet BottomFillet = new PartWithDoubleFillet(k, t_w, new Point2D(0, t_f), false);


            List <CompoundShapePart> Ishape = new List <CompoundShapePart>()
            {
                BottomFlange,
                BottomFillet,
                Web,
                TopFillet,
                TopFlange,
            };

            ArbitraryCompoundShape shape = new ArbitraryCompoundShape(Ishape, null);
            double y_pCalculated         = shape.y_pBar;
            double actualTolerance       = EvaluateActualTolerance(y_pCalculated, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public void CompoundShapeReturnsPNA_SymmetricIShape()
        {
            //Properties
            double d   = 10;
            double b_f = 8;
            double t_w = 1;
            double t_f = 1;

            double refValue = d / 2;

            CompoundShapePart TopFlange    = new CompoundShapePart(b_f, t_f, new Point2D(0, d - t_f / 2));
            CompoundShapePart BottomFlange = new CompoundShapePart(b_f, t_f, new Point2D(0, t_f / 2));
            CompoundShapePart Web          = new CompoundShapePart(t_w, d - 2 * t_f, new Point2D(0, d / 2));

            List <CompoundShapePart> Ishape = new List <CompoundShapePart>()
            {
                BottomFlange,
                Web,
                TopFlange
            };

            ArbitraryCompoundShape shape = new ArbitraryCompoundShape(Ishape, null);
            double y_pCalculated         = shape.y_pBar;
            double actualTolerance       = EvaluateActualTolerance(y_pCalculated, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
Example #4
0
        private ISliceableSection CalculateTransformedSection()
        {
            var           TransformedRebarShapes = GetTransformedRebarShapes(Section.SliceableShape.YMax, Section.SliceableShape.YMin);
            CompoundShape compoundShape          = this.Section.SliceableShape as CompoundShape;

            if (compoundShape != null)
            {
                List <CompoundShapePart> parts = compoundShape.RectanglesXAxis.Select(cs => cs).ToList();
                var UniqueYPointsForBars       = this.LongitudinalBars.Select(b => b.Coordinate.Y).Distinct();
                foreach (var YPoint in UniqueYPointsForBars)
                {
                    var pointsAtThisY = TransformedRebarShapes.Where(b => b.GetElasticCentroidCoordinate().Y == YPoint);
                    if (pointsAtThisY != null)
                    {
                        double            A_total   = pointsAtThisY.Sum(p => p.A);
                        double            b_total   = pointsAtThisY.Sum(p => p.XMax - p.XMin);
                        double            h_average = A_total / b_total;
                        CompoundShapePart part      = new CompoundShapePart(b_total, h_average, new Point2D(0, YPoint));
                        parts.Add(part);
                    }
                }
                ArbitraryCompoundShape combinedShape = new ArbitraryCompoundShape(parts, null);

                return(combinedShape);
            }
            else
            {
                return(Section.SliceableShape as ISliceableSection);
            }
        }
Example #5
0
        public void CompoundShapeReturnsSlicePlaneLocation()
        {
            ArbitraryCompoundShape shape = GetCustomTeeShape();
            double YPlane = shape.GetSlicePlaneTopOffset(6.25);

            Assert.AreEqual(3.5, YPlane);
        }
Example #6
0
        public void CompoundShapeReturnsTopSLiceAtOffset()
        {
            ArbitraryCompoundShape shape    = GetCustomTeeShape();
            IMoveableSection       topSLice = shape.GetTopSliceSection(3.5, SlicingPlaneOffsetType.Top);

            Assert.AreEqual(6.25, topSLice.A);
        }
Example #7
0
        public void CompoundShapeReturnsTopSliceOfArea()
        {
            ArbitraryCompoundShape shape    = GetCustomTeeShape();
            IMoveableSection       topSlice = shape.GetTopSliceOfArea(6.25);

            Assert.AreEqual(6.25, topSlice.A);
            Assert.AreEqual(3.5, topSlice.YMin);
        }
Example #8
0
        private ArbitraryCompoundShape GetCustomTeeShape()
        {
            List <CompoundShapePart> rectX = new List <CompoundShapePart>()
            {
                new CompoundShapePart(0.5, 6, new Point2D(0, 3)),
                new CompoundShapePart(5, 1, new Point2D(0, 6.5)),
            };
            ArbitraryCompoundShape shape = new ArbitraryCompoundShape(rectX, null);

            return(shape);
        }
        public void CompoundShapeReturnsPlasticSectionModulusZx()
        {
            List <CompoundShapePart> rectX = new List <CompoundShapePart>()
            {
                new CompoundShapePart(125, 8, new Point2D(0, 112)),
                new CompoundShapePart(6, 100, new Point2D(0, 58)),
                new CompoundShapePart(75, 8, new Point2D(0, 4))
            };
            ArbitraryCompoundShape shape = new ArbitraryCompoundShape(rectX, null);
            double Zx = shape.Z_x;

            Assert.AreEqual(94733.3, Math.Round(Zx, 1));
        }