protected double GetCompressionBlockDepth(double RebarResultant, FlexuralCompressionFiberPosition CompressionFiberPosition)
        {
            //double fc = Section.Material.SpecifiedCompressiveStrength;
            double           RequiredConcreteArea = 0;
            IMoveableSection compressedSection    = null;

            double WhitneyBlockStress = GetWhitneyBlockStress();

            RequiredConcreteArea = RebarResultant / (WhitneyBlockStress);
            if (RequiredConcreteArea > this.Section.SliceableShape.A)
            {
                //TODO: go directly to strain compatibility solution
            }
            switch (CompressionFiberPosition)
            {
            case FlexuralCompressionFiberPosition.Top:

                compressedSection = this.Section.SliceableShape.GetTopSliceOfArea(RequiredConcreteArea);
                break;

            case FlexuralCompressionFiberPosition.Bottom:
                compressedSection = this.Section.SliceableShape.GetBottomSliceOfArea(RequiredConcreteArea);
                break;

            default:
                throw new CompressionFiberPositionException();
            }

            //Get corresponding strain
            double a = compressedSection.YMax - compressedSection.YMin;


            return(a);
        }
        protected double GetCompressionBlockDepth(double RebarResultant, FlexuralCompressionFiberPosition CompressionFiberPosition)
        {
            double           fc = Section.Material.SpecifiedCompressiveStrength;
            double           RequiredConcreteArea = 0;
            IMoveableSection compressedSection    = null;

            switch (CompressionFiberPosition)
            {
            case FlexuralCompressionFiberPosition.Top:
                RequiredConcreteArea = RebarResultant / (0.85 * fc);
                compressedSection    = this.Section.SliceableShape.GetTopSliceOfArea(RequiredConcreteArea);
                break;

            case FlexuralCompressionFiberPosition.Bottom:
                RequiredConcreteArea = RebarResultant / (0.85 * fc);
                compressedSection    = this.Section.SliceableShape.GetBottomSliceOfArea(RequiredConcreteArea);
                break;

            default:
                throw new CompressionFiberPositionException();
            }

            //Get corresponding strain
            double a = compressedSection.YMax - compressedSection.YMin;


            return(a);
        }
        /// <summary>
        /// Iterates the section until a top or bottom slice (as specified)
        /// is of requested area.
        /// </summary>
        /// <param name="Area"></param>
        /// <param name="sliceType"></param>
        /// <returns></returns>
        private IMoveableSection getSliceOfArea(double Area, SliceType sliceType)
        {
            double Atar       = 0; //target area
            double YOffsetTop = 0;

            if (Area > this.A)
            {
                throw new Exception("Section analysis failed. Area of section sub-part exceeds the total area of cross section.");
            }
            else
            {
                if (sliceType == SliceType.Top) // need to return the TOP portion of given area
                {
                    Atar = Area;
                }
                else // need to return the BOTTOM portion of given area
                {
                    Atar = this.A - Area;
                }
                YOffsetTop = GetSlicePlaneTopOffset(Atar);
            }
            double SlicePlaneYCoordinte;

            SlicePlaneYCoordinte = this.YMax - YOffsetTop;

            IMoveableSection s = getSliceAtCoordinate(SlicePlaneYCoordinte, sliceType);

            return(s);
        }
Ejemplo n.º 4
0
        private double BottomAreaDeltaCalculationFunction(double SliceAxisY)
        {
            cutSection = this.GetBottomSliceSection(SliceAxisY, SlicingPlaneOffsetType.Top);
            double SliceArea = cutSection.A;

            return(targetArea - SliceArea);
        }
Ejemplo n.º 5
0
        public void CompoundShapeReturnsTopSLiceAtOffset()
        {
            ArbitraryCompoundShape shape    = GetCustomTeeShape();
            IMoveableSection       topSLice = shape.GetTopSliceSection(3.5, SlicingPlaneOffsetType.Top);

            Assert.AreEqual(6.25, topSLice.A);
        }
        protected IMoveableSection GetCompressedConcreteSection(LinearStrainDistribution StrainDistribution,
                                                                FlexuralCompressionFiberPosition compFiberPos, double SlicingPlaneOffset)
        {
            IMoveableSection  compressedPortion = null;
            ISliceableSection sec = this.Section.SliceableShape as ISliceableSection;

            //if (StrainDistribution.TopFiberStrain >= 0 && StrainDistribution.BottomFiberStrain >= 0)
            //{
            double SectionHeight = sec.YMax - sec.YMin;

            if (SlicingPlaneOffset > SectionHeight)
            {
                compressedPortion = this.Section.SliceableShape;
            }
            else
            {
                switch (compFiberPos)
                {
                case FlexuralCompressionFiberPosition.Top:
                    compressedPortion = sec.GetTopSliceSection(SlicingPlaneOffset, SlicingPlaneOffsetType.Top);
                    break;

                case FlexuralCompressionFiberPosition.Bottom:
                    compressedPortion = sec.GetBottomSliceSection(SlicingPlaneOffset, SlicingPlaneOffsetType.Bottom);
                    break;

                default:
                    throw new CompressionFiberPositionException();
                }
            }

            return(compressedPortion);
        }
Ejemplo n.º 7
0
        public void CompoundShapeReturnsBottomSliceAtCoordinate()
        {
            CompoundShape    shape    = GetRectangularShape();
            IMoveableSection topSlice = shape.GetBottomSliceSection(2, SlicingPlaneOffsetType.Bottom);

            Assert.AreEqual(24, topSlice.A);
            Assert.AreEqual(-4, topSlice.YMax);
        }
Ejemplo n.º 8
0
        public void CompoundShapeReturnsBottomSliceOfArea()
        {
            CompoundShape    shape       = GetRectangularShape();
            IMoveableSection bottomSlice = shape.GetBottomSliceOfArea(6);

            Assert.AreEqual(6, bottomSlice.A);
            Assert.AreEqual(-5.5, bottomSlice.YMax);
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
0
        private double GetZ_x()
        {
            IMoveableSection topSlice = this.GetTopSliceSection(YMax - PlasticCentroidCoordinate.Y, SlicingPlaneOffsetType.Top);
            IMoveableSection botSlice = this.GetBottomSliceSection(YMax - PlasticCentroidCoordinate.Y, SlicingPlaneOffsetType.Top);
            double           Z        = topSlice.A * (topSlice.PlasticCentroidCoordinate.Y - PlasticCentroidCoordinate.Y) +
                                        botSlice.A * (PlasticCentroidCoordinate.Y - botSlice.PlasticCentroidCoordinate.Y);

            return(Z);
        }
Ejemplo n.º 11
0
        private double GetZ_y()
        {
            PolygonShape     NinetyDegreeShape = GetRotatedShape(90.0);
            IMoveableSection topSlice          = NinetyDegreeShape.GetTopSliceSection(XMax - PlasticCentroidCoordinate.X, SlicingPlaneOffsetType.Top);
            IMoveableSection botSlice          = NinetyDegreeShape.GetBottomSliceSection(XMax - PlasticCentroidCoordinate.X, SlicingPlaneOffsetType.Top);
            double           Z = topSlice.A * (topSlice.PlasticCentroidCoordinate.Y - PlasticCentroidCoordinate.Y) +
                                 botSlice.A * (PlasticCentroidCoordinate.Y - botSlice.PlasticCentroidCoordinate.Y);

            return(Z);
        }
        protected ForceMomentContribution GetConcreteWhitneyForceResultant(LinearStrainDistribution StrainDistribution, FlexuralCompressionFiberPosition compFiberPosition,
                                                                           double CompressedRebarArea, double CompressedRebarCentroidCoordinate)
        {
            ForceMomentContribution ConcreteCompressionContribution = new ForceMomentContribution();

            // CalculateBeta and compression block height
            double c = GetDistanceToNeutralAxis(StrainDistribution, compFiberPosition);
            double h = Section.SliceableShape.YMax - Section.SliceableShape.YMin;
            double a;

            if (c == double.PositiveInfinity || c == double.NegativeInfinity)
            {
                a = h;
            }
            else
            {
                a = GetCompressionBlockDepth(c);
                if (a > h)
                {
                    a = h;
                }
            }


            //double CentroidYToTopEdge = (Section.SliceableShape.YMax-Section.SliceableShape.YMin)-Section.SliceableShape.y_Bar;
            //double neutralAxisToBottomOfCompressedShapeOffset = CentroidYToTopEdge - a;
            IMoveableSection  compressedPortion = null;
            ISliceableSection sec = this.Section.SliceableShape as ISliceableSection;

            if (sec != null)
            {
                compressedPortion = GetCompressedConcreteSection(StrainDistribution, compFiberPosition, a);
            }
            //this analysis subtracts the area of bars from the section but the location of the centroid of the
            //compressed section is not modified
            double A  = compressedPortion.A - CompressedRebarArea;
            double fc = Section.Material.SpecifiedCompressiveStrength;

            double WhitneyBlockStress     = GetWhitneyBlockStress();
            double ConcreteResultantForce = A * WhitneyBlockStress;

            ConcreteCompressionContribution.Force = ConcreteResultantForce;


            double concreteForceCentroidDistance = compressedPortion.GetElasticCentroidCoordinate().Y - Section.SliceableShape.GetElasticCentroidCoordinate().Y;

            ConcreteCompressionContribution.Moment = concreteForceCentroidDistance * ConcreteResultantForce;

            return(ConcreteCompressionContribution);
        }
Ejemplo n.º 13
0
        public void SliceTopReturnsPolygonForRectangle()
        {
            var Points = new List <Point2D>
            {
                new Point2D(-1, -1),
                new Point2D(-1, 1),
                new Point2D(1, 1),
                new Point2D(1, -1)
            };
            var rect = new GenericShape(Points);
            IMoveableSection sect = rect.GetTopSliceSection(1, SlicingPlaneOffsetType.Top);

            Assert.AreEqual(1.0, sect.YMax);
        }
        protected ForceMomentContribution GetConcreteWhitneyForceResultant(LinearStrainDistribution StrainDistribution, FlexuralCompressionFiberPosition compFiberPosition)
        {
            ForceMomentContribution ConcreteCompressionContribution = new ForceMomentContribution();

            // CalculateBeta and compression block height
            double c = GetDistanceToNeutralAxis(StrainDistribution, compFiberPosition);
            double h = Section.SliceableShape.YMax - Section.SliceableShape.YMin;
            double a;

            if (c == double.PositiveInfinity)
            {
                a = h;
            }
            else
            {
                a = GetCompressionBlockDepth(c);
                if (a > h)
                {
                    a = h;
                }
            }


            double            CentroidYToTopEdge = (Section.SliceableShape.YMax - Section.SliceableShape.YMin) - Section.SliceableShape.y_Bar;
            double            neutralAxisToBottomOfCompressedShapeOffset = CentroidYToTopEdge - a;
            IMoveableSection  compressedPortion = null;
            ISliceableSection sec = this.Section.SliceableShape as ISliceableSection;

            if (sec != null)
            {
                compressedPortion = GetCompressedConcreteSection(StrainDistribution, compFiberPosition, a);
            }
            double A  = compressedPortion.A;
            double fc = Section.Material.SpecifiedCompressiveStrength;

            double ConcreteResultantForce = A * 0.85 * fc;

            ConcreteCompressionContribution.Force = ConcreteResultantForce;


            double concreteForceCentroidDistance = compressedPortion.GetElasticCentroidCoordinate().Y;

            ConcreteCompressionContribution.Moment = concreteForceCentroidDistance * ConcreteResultantForce;

            return(ConcreteCompressionContribution);
        }
        private void CalculateCrackedSectionTransformedShapes(double kd, FlexuralCompressionFiberPosition compFiber)
        {
            compressedConcretePortion = null;
            CompShapeTransformed      = new List <IMoveableSection>();
            TensBarsTransformed       = new List <IMoveableSection>();
            CrackedMomentOfInertiaCompressedShapes = new List <IMoveableSection>();
            CrackedMomentOfInertiaTensionShapes    = new List <IMoveableSection>();

            double YNeutral = GetYNeutral(kd);

            switch (compFiber)
            {
            case FlexuralCompressionFiberPosition.Top:

                //1. Concrete Shape (compression)
                compressedConcretePortion = this.Section.SliceableShape.GetTopSliceSection(kd, SlicingPlaneOffsetType.Top);
                //2. Steel bars (compression)
                CompShapeTransformed = GetTransformedRebarShapes(this.Section.SliceableShape.YMax, YNeutral);
                CompShapeTransformed.Add(compressedConcretePortion);
                CrackedMomentOfInertiaCompressedShapes = CompShapeTransformed;
                //3 Steel bars (tension)
                TensBarsTransformed = GetTransformedRebarShapes(YNeutral, this.Section.SliceableShape.YMin);
                CrackedMomentOfInertiaTensionShapes = TensBarsTransformed;
                break;

            case FlexuralCompressionFiberPosition.Bottom:

                //1. Concrete Shape (compression)
                compressedConcretePortion = this.Section.SliceableShape.GetBottomSliceSection(kd, SlicingPlaneOffsetType.Bottom);
                //2. Steel bars (compression)
                CompShapeTransformed = GetTransformedRebarShapes(YNeutral, this.Section.SliceableShape.YMin);
                CompShapeTransformed.Add(compressedConcretePortion);
                CrackedMomentOfInertiaCompressedShapes = CompShapeTransformed;
                //3 Steel bars (tension)
                TensBarsTransformed = GetTransformedRebarShapes(this.Section.SliceableShape.YMax, YNeutral);
                CrackedMomentOfInertiaTensionShapes = TensBarsTransformed;
                break;

                break;

            default:
                throw new CompressionFiberPositionException();
            }
        }
Ejemplo n.º 16
0
        private double TopAndBottomAreaDifferenceFunction(double Y)
        {
            double OffsetFromTop = YMax - Y;

            if (OffsetFromTop == 0)
            {
                return(this.A);
            }
            else if (OffsetFromTop >= YMax - YMin)
            {
                return(-this.A);
            }
            else
            {
                IMoveableSection topSlice = this.GetTopSliceSection(OffsetFromTop, SlicingPlaneOffsetType.Top);
                IMoveableSection botSlice = this.GetBottomSliceSection(OffsetFromTop, SlicingPlaneOffsetType.Top);
                return(topSlice.A - botSlice.A);
            }
        }
        private double BottomAreaDeltaCalculationFunction(double SliceAxisY)
        {
            cutSection = this.GetBottomSliceSection(SliceAxisY, SlicingPlaneOffsetType.Top);

            double SliceArea = 0;

            if (cutSection != null)
            {
                SliceArea = cutSection.A;
            }
            else
            {
                if (SliceAxisY == this.YMax - this.YMin)
                {
                    SliceArea = this.A;
                }
            }

            return(targetArea - SliceArea);
        }
        public virtual double GetCrackedMomentOfInertia(FlexuralCompressionFiberPosition compFiberPosition)
        {
            //Get LinearStrainDistribution from flexural result
            double kd = FindCrackedSectionNeutralAxis(compFiberPosition);

            IMoveableSection        concreteShape = GetConcreteShape();
            List <IMoveableSection> allShapes     = GetRebarShapes();
            //allShapes.Add(concreteShape);

            double Ix = 0.0;
            //Find centroid
            double SumAreaDistance = allShapes.Sum(s => s.A * s.GetElasticCentroidCoordinate().Y);
            double SumArea         = allShapes.Sum(s => s.A);
            double YCentr          = SumAreaDistance / SumArea;

            //Find moment of inertia
            double I_cr = allShapes.Sum(s => s.A * Math.Pow(YCentr - s.GetElasticCentroidCoordinate().Y, 2.0) + s.I_x);

            return(I_cr);
        }
Ejemplo n.º 19
0
        private double LeftAndRightAreaDifferenceFunction(double X)
        {
            double OffsetFromTop = X - XMin;

            if (OffsetFromTop == 0)
            {
                return(this.A);
            }
            else if (OffsetFromTop >= XMax - XMin)
            {
                return(-this.A);
            }
            else
            {
                PolygonShape RotatedPoly = this.GetRotatedShape(90);

                IMoveableSection topSlice = RotatedPoly.GetTopSliceSection(OffsetFromTop, SlicingPlaneOffsetType.Top);
                IMoveableSection botSlice = RotatedPoly.GetBottomSliceSection(OffsetFromTop, SlicingPlaneOffsetType.Top);
                return(botSlice.A - topSlice.A);
            }
        }
Ejemplo n.º 20
0
        public double GetFlexuralStrength(double SumQ_n)
        {
            this.SumQ_n = SumQ_n;
            double A_s           = SteelSection.A;
            double MaximumTForce = A_s * F_y;

            //Equations (C-I3-7) and  (C-I3-8)
            this.C_Slab = GetCForce();

            double SteelSectionHeight = (SteelSection.YMax - SteelSection.YMin);
            double d_3 = SteelSectionHeight - SteelSection.y_pBar; // distance from Py to the top of the steel section
            double d_1 = Get_d_1();                                //distance from the centroid of the compression force, C, in the concrete to the top of the steel section
            double d_2;                                            //distance from the centroid of the compression force in the steel section to the top of the steel section
            double C;

            if (C_Slab >= MaximumTForce)
            {
                //Section is fully composite
                C   = MaximumTForce;
                d_2 = 0;
                DistanceFromTopOfSteelToPNY = 0;
            }
            else
            {
                //Section is partially composite
                double           C_steel  = (MaximumTForce - C_Slab) / 2.0;
                double           A_sPrime = C_steel / F_y;
                IMoveableSection compressedSteelSection = SteelSection.GetTopSliceOfArea(A_sPrime);
                DistanceFromTopOfSteelToPNY = compressedSteelSection.YMax - compressedSteelSection.YMin;
                var C_steelCoordinate = compressedSteelSection.GetElasticCentroidCoordinate();
                d_2 = SteelSectionHeight - C_steelCoordinate.Y;
                C   = C_Slab + C_steel;
            }
            double P_y    = MaximumTForce;
            double phiM_n = 0.9 * (C * (d_1 + d_2) + P_y * (d_3 - d_2)); // (C-I3-10)

            PNYCalculated = true;
            return(phiM_n);
        }
        private void CalculateCrackedSectionTransformedShapes(double kd, FlexuralCompressionFiberPosition compFiber)
        {
            compressedConcretePortion = null;
            CompShapeTransformed = new List<IMoveableSection>();
            TensBarsTransformed = new List<IMoveableSection>();
            CrackedMomentOfInertiaCompressedShapes = new List<IMoveableSection>();
            CrackedMomentOfInertiaTensionShapes = new List<IMoveableSection>();

            double YNeutral = GetYNeutral(kd);

            switch (compFiber)
            {
                case FlexuralCompressionFiberPosition.Top:

                    //1. Concrete Shape (compression)
                    compressedConcretePortion = this.Section.SliceableShape.GetTopSliceSection(kd, SlicingPlaneOffsetType.Top);
                    //2. Steel bars (compression)
                    CompShapeTransformed= GetTransformedRebarShapes( this.Section.SliceableShape.YMax,  YNeutral);
                    CompShapeTransformed.Add(compressedConcretePortion);
                    CrackedMomentOfInertiaCompressedShapes = CompShapeTransformed;
                    //3 Steel bars (tension)
                    TensBarsTransformed = GetTransformedRebarShapes(YNeutral, this.Section.SliceableShape.YMin);
                    CrackedMomentOfInertiaTensionShapes = TensBarsTransformed;
                    break;
                case FlexuralCompressionFiberPosition.Bottom:

                    //1. Concrete Shape (compression)
                    compressedConcretePortion = this.Section.SliceableShape.GetBottomSliceSection(kd, SlicingPlaneOffsetType.Bottom);
                    //2. Steel bars (compression)
                    CompShapeTransformed = GetTransformedRebarShapes(YNeutral, this.Section.SliceableShape.YMin);
                    CompShapeTransformed.Add(compressedConcretePortion);
                    CrackedMomentOfInertiaCompressedShapes = CompShapeTransformed;
                    //3 Steel bars (tension)
                    TensBarsTransformed = GetTransformedRebarShapes(this.Section.SliceableShape.YMax, YNeutral);
                    CrackedMomentOfInertiaTensionShapes = TensBarsTransformed;
                    break;

                    break;
                default:
                    throw new CompressionFiberPositionException();
            }


        }
Ejemplo n.º 22
0
 private double BottomAreaDeltaCalculationFunction(double SliceAxisY)
 {
     cutSection = this.GetBottomSliceSection(SliceAxisY, SlicingPlaneOffsetType.Top);
     double SliceArea = cutSection.A;
     return targetArea - SliceArea;
 }