/// <summary>
        ///    Constructor 
        /// </summary>
        /// <param name="FilletSize">Height of circular spandrel (e.g "k" dimension for wide flange I-beams).</param>
        /// <param name="RectangleWidth">Solid rectangle width (e.g web width for wide flange I-beams). </param>
        /// <param name="InsertionPoint"> Insertion point (at wider part). </param>
        /// <param name="IsTopWidened">Defines if wider part is at the top or bottom.</param>
        /// 

        public PartWithDoubleFillet(double FilletSize, double RectangleWidth, Point2D InsertionPoint, bool IsTopWidened)
            {
                this.Size = FilletSize;
                this.InsertionPoint = InsertionPoint;
                isTopWidened = IsTopWidened;
                this.SolidRectangleWidth = RectangleWidth;
            }
        public ConcreteSectionFlexure GetRectangularSectionFourSidesDistributed(double b, double h,
    double A_sTopBottom, double A_sLeftRight, double c_centTopBottom, double c_centLeftRight, IConcreteMaterial mat, IRebarMaterial rebarMaterial)
        {

            double YTop = h / 2.0 - c_centTopBottom;
            double YBottom = -h / 2.0 + c_centTopBottom;
            double XLeft = -b / 2.0 + c_centLeftRight;
            double XRight = b / 2.0 - c_centLeftRight;

            Point2D P1 = new Point2D(XLeft, YTop);
            Point2D P2 = new Point2D(XRight, YTop);
            Point2D P3 = new Point2D(XRight, YBottom);
            Point2D P4 = new Point2D(XLeft, YBottom);

            RebarLine topLine = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
            RebarLine bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);

            RebarLine leftLine = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
            RebarLine rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);

            List<RebarPoint> LongitudinalBars = new List<RebarPoint>();

            LongitudinalBars.AddRange(topLine.RebarPoints);
            LongitudinalBars.AddRange(bottomLine.RebarPoints);
            LongitudinalBars.AddRange(leftLine.RebarPoints);
            LongitudinalBars.AddRange(rightLine.RebarPoints);


            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
            CalcLog log = new CalcLog();

            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log);
            return sectionFlexure;
        }
示例#3
0
        private void AddL()
        {
            CharacteristicDimension = l_vertical;

            Point2D p1_temp = new Point2D(-l_horizontal/2.0,-l_vertical/2.0);
            Point2D p2_temp = new Point2D(-l_horizontal/2.0,l_vertical/2.0);
            Point2D p3_temp = new Point2D(l_horizontal/2.0,l_vertical/2.0);


            List<FilletWeldLine> templines = new List<FilletWeldLine>()
            {
                new FilletWeldLine(p1_temp,p2_temp,leg,F_EXX,Nsub,0,IsLoadedOutOfPlane),
                new FilletWeldLine(p2_temp,p3_temp,leg,F_EXX,Nsub,0,IsLoadedOutOfPlane)
            };
            FilletWeldLoadDeformationGroupBase tempGroup = new FilletWeldLoadDeformationGroupBase(templines);
            var centroid = tempGroup.GetElasticCentroid();

            Point2D p1 = new Point2D(p1_temp.X - centroid.X, p1_temp.Y - centroid.Y);
            Point2D p2 = new Point2D(p2_temp.X - centroid.X, p2_temp.Y - centroid.Y);
            Point2D p3 = new Point2D(p3_temp.X - centroid.X, p3_temp.Y - centroid.Y);


            List<FilletWeldLine> lines = new List<FilletWeldLine>()
            {
                new FilletWeldLine(p1,p2,leg,F_EXX,Nsub,0,IsLoadedOutOfPlane),
                new FilletWeldLine(p2,p3,leg,F_EXX,Nsub,90.0,IsLoadedOutOfPlane) //horizontal leg
            };
            Lines = lines;

        }
示例#4
0
 public FilletWeldElement(Point2D StartNode, Point2D EndNode, double Leg, double ElectrodeStrength, bool IsLoadedOutOfPlane =false)
     :base(Leg,ElectrodeStrength)
 {
     this.NodeI = StartNode;
     this.NodeJ = EndNode;
     this.IsLoadedOutOfPlane = IsLoadedOutOfPlane;
 }
     /// <summary>
     /// Creates instance of section cut through holes, in order to calculate net properties
     /// </summary>
     /// <param name="Name"></param>
     /// <param name="t_p">Plate thickness</param>
     /// <param name="d_p">Depth (vertical height) of plate</param>
     /// <param name="N_rows">Number of horizontal rows of bolts</param>
     /// <param name="d_hole">Bolt hole diamter</param>
     /// <param name="l_edgeTop">Centerline distance from top row of bolts to plate top edge</param>
     /// <param name="l_edgeBottom">Centerline distance from top row of bolts to plate bottom edge</param>
     /// <param name="Centroid">Plate centroid</param>
 public SectionOfPlateWithHoles(string Name, double t_p, double d_p, double N_rows, double d_hole, double l_edgeTop, double l_edgeBottom, Point2D Centroid)
     : base(Name,t_p,d_p,Centroid)
 {
     this.N_rows= N_rows;
     this.d_hole= d_hole;
     this.t_p= t_p;
     this.d_p= d_p;
     this.l_edgeTop= l_edgeTop;
     this.l_edgeBottom= l_edgeBottom;
 }
示例#6
0
 protected override double GetElementForce(ILocationArrayElement el, Point2D Center, ILocationArrayElement furthestBolt, double angle)
 {
     double Delta_u = furthestBolt.LimitDeformation;
     double LiMax = furthestBolt.GetDistanceToPoint(Center);
     double xi = el.Location.X - Center.X;
     double yi = el.Location.Y - Center.Y;
     double ri = Math.Sqrt(xi * xi + yi * yi);                   //radial distance from center to this element
     double Delta = Delta_u * ri / LiMax;                        //this bolt deformation
     double iRn = Math.Pow(1 - Math.Exp(-10.0 * Delta), 0.55);   //force developed by this element
     return iRn;
 }
示例#7
0
 public RebarLine(double A_total, Point2D StartPoint, Point2D EndPoint,
     IRebarMaterial rebarMaterial, bool setBackCornerBars, bool IsEpoxyCoated =false, int NumberOfSubdivisions = 20)
 {
     this.A_total = A_total;
     this.NodeI = StartPoint;
     this.NodeJ = EndPoint;
     this.isEpoxyCoated = IsEpoxyCoated;
     this.rebarMaterial = rebarMaterial;
     this.NumberOfSubdivisions = NumberOfSubdivisions;
     this.setBackCornerBars = setBackCornerBars;
 }
示例#8
0
        public GenericShape(List<List<IntPoint>> Polygon)
        {

            List<Point2D> newVertices = new List<Point2D>();

            foreach (var pathPoint in Polygon[0])
            {
                Point2D pt = new Point2D(pathPoint.X, pathPoint.Y);
                newVertices.Add(pt);
            }
            Vertices = newVertices;
        }
 /// <summary>
 /// Two-way shear section
 /// </summary>
 /// <param name="Material">Concrete material</param>
 /// <param name="Segments">Shear perimeter segments</param>
 /// <param name="d">Effective slab section</param>
 /// <param name="b_x">Column dimension (normal to slab edge for edge column)</param>
 /// <param name="b_y">Column dimension (parallel to slab edge for edge column)</param>
 /// <param name="AtColumnFace">Identifies if the section is adjacent to column face (typical) or away from column face (as is the case with shear studs away from the face)</param>
 /// <param name="ColumnType">Identifies if the column is located at the interior, slab edge, or slab corner</param>
 public ConcreteSectionTwoWayShear(IConcreteMaterial Material, List<PerimeterLineSegment> Segments, double d,
     double b_x, double b_y, bool AtColumnFace, PunchingPerimeterConfiguration ColumnType, Point2D ColumnCenter)
 {
     this.Material    =Material      ;
     this.Segments    =Segments      ;
     this.d           =d             ;
     this.b_x         =b_x           ;
     this.b_y         =b_y           ;
     this.AtColumnFace=AtColumnFace  ;
     this.ColumnType = ColumnType    ;
     this.ColumnCenter = ColumnCenter;
 }
 /// <summary>
 /// Calculates moment of inertia around X-axis of the group with respect to
 /// any 2D point in the plane of the weld.
 /// </summary>
 /// <param name="refPoint">Point to calculate moment of inertia around</param>
 /// <returns> rMoment of Inertia X</returns>
 public double CalculateMomentOfIntertiaX(Point2D refPoint)
 {
     double Ix = 0;
     if (lines==null)
     {
         throw new WeldSegmentsNotDefinedException();
     }
     foreach (var line in Lines)
     {
         double thisLineIx = line.GetInertiaXAroundPoint(refPoint);
         Ix = Ix + thisLineIx;
     }
     return Ix;
 }
示例#11
0
        //Centroid is correctly located ONLY for non self intersecting polygon
        //http://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon
        //http://stackoverflow.com/questions/9815699/how-to-calculate-centroid

    static Point2D Compute2DPolygonCentroid(List<Point2D> vertices)
    {
        Point2D centroid = new Point2D( 0.0, 0.0 );
        double signedArea = 0.0;
        double x0 = 0.0; // Current vertex X
        double y0 = 0.0; // Current vertex Y
        double x1 = 0.0; // Next vertex X
        double y1 = 0.0; // Next vertex Y
        double a = 0.0;  // Partial signed area

        // For all vertices except last
        int i=0;
        for (i = 0; i < vertices.Count - 1; ++i)
        {
            x0 = vertices[i].X;
            y0 = vertices[i].Y;
            x1 = vertices[i+1].X;
            y1 = vertices[i+1].Y;
            a = x0*y1 - x1*y0;
            signedArea += a;
            centroid.X += (x0 + x1)*a;
            centroid.Y += (y0 + y1)*a;
        }

        // Do last vertex
        x0 = vertices[i].X;
        y0 = vertices[i].Y;
        x1 = vertices[0].X;
        y1 = vertices[0].Y;
        a = x0*y1 - x1*y0;
        signedArea += a;
        centroid.X += (x0 + x1)*a;
        centroid.Y += (y0 + y1)*a;

        signedArea *= 0.5;
        centroid.X /= (6*signedArea);
        centroid.Y /= (6*signedArea);

        return centroid;
    }
示例#12
0
 public double GetDistanceToPoint(Point2D otherPoint)
 {
     double dx = this.X - otherPoint.X;
     double dy = this.Y - otherPoint.Y;
     return Math.Sqrt(Math.Pow(dx, 2) + Math.Pow(dy, 2));
 }
示例#13
0
 public SectionBase(string Name, ICalcLog Log)
 {
     this.name = Name;
     plasticCentroidCoordinate = new Point2D(0,0);
     elasticCentroidCoordinate = new Point2D(0,0);
 }
示例#14
0
        public override double GetSumAreaDistanceX(Point2D refPoint)
        {

            double A = GetArea();
            double dx = this.Centroid.X - refPoint.X;
            return A*dx;
        }
示例#15
0
        /// <summary>
        /// Gets centroid of combined component double quarter-circle + rectangle.
        /// </summary>
        /// <returns></returns>
            public override Point2D GetCentroid()
            {
                if (Size >0)
                {
                    if (centroid == null)
                    {
                        double y_c;
                        double y_circ;

                        y_circ = GetCircularSpandrelCentroid();
                        y_c = (2 * GetCircularSpandrelArea() * GetCircularSpandrelCentroid() + b_rect * r * r / 2) / GetArea();

                        if (this.isTopWidened == true)
                        {
                            centroid = new Point2D(InsertionPoint.X, InsertionPoint.Y - y_c);
                        }
                        else
                        {
                            centroid = new Point2D(InsertionPoint.X, InsertionPoint.Y + y_c);
                        }
                    } 
                }
                else
                {
                    centroid = new Point2D(InsertionPoint.X, InsertionPoint.Y);
                }

                return centroid;
            }
 public double CalculatePolarMomentOfInertia(Point2D centroid)
 {
     double Ix = CalculateMomentOfIntertiaX(centroid);
     double Iy = CalculateMomentOfIntertiaY(centroid);
     double J = Ix + Iy;
     return J;
 }
示例#17
0
 public override double GetSumAreaDistanceY(Point2D refPoint)
 {
     double A = GetArea();
     double dy = this.Centroid.Y - refPoint.Y;
     return A * dy;
 }
示例#18
0
 public abstract double GetSumAreaDistanceY(Point2D refPoint);
示例#19
0
 public IWeldElement GetFurthestElement(Point2D point)
 {
     var result = WeldElements.MaxBy(x => x.GetCentroidDistanceToNode(point));
     return result;
 }
示例#20
0
        protected override void CalculateElements()
        {
            WeldElements = new List<IWeldElement>();
            double dx = NodeJ.X - NodeI.X;
            double dy = NodeJ.Y - NodeI.Y;
            
            Vector seg = new Vector(dx, dy);
            int N = NumberOfSubdivisions;

            double segDx;
            double segDy;

            segDx = dx / N;
            segDy = dy / N;

            for (int i = 0; i < NumberOfSubdivisions; i++)
            {
                Point2D stPt = new Point2D(NodeI.X + i * segDx, NodeI.Y + i * segDy);
                Point2D enPt = new Point2D(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy);
                //Need to change this to be independent of fillet weld type
                FilletWeldElement weld = new FilletWeldElement(stPt, enPt, Leg, ElectrodeStrength, IsLoadedOutOfPlane);
                WeldElements.Add(weld);
            }
        }
示例#21
0
 public abstract double GetPolarMomentOfInetriaAroundPoint(Point2D center);
示例#22
0
        /// <summary>
        /// Returns the list of lines for calculation of punching shear perimeter properties
        /// </summary>
        /// <param name="Configuration">Configuration of punching perimeter</param>
        /// <param name="c_x">Column dimension parallel to X-axis</param>
        /// <param name="c_y">Column dimension  parallel to Y-axis</param>
        /// <param name="d"> Effective depth of punching shear perimeter</param>
        /// <returns></returns>
        public List<PerimeterLineSegment> GetPerimeterSegments(PunchingPerimeterConfiguration Configuration, double c_x, double c_y, double d)
        {
            double b_x; // punching perimeter dimension perpendicular to free edge
            double b_y; // punching perimeter dimension parallel to free edge 
            Point2D p1  =null;
            Point2D p2  =null;
            Point2D p3  =null;
            Point2D p4 = null;


            if (Configuration == PunchingPerimeterConfiguration.Interior)
	        {
		        b_x = c_x + d;
                b_y = c_y + d;

                p1 = new Point2D(-b_x / 2.0, -b_y / 2.0);
                p2 = new Point2D(-b_x / 2.0, b_y / 2.0);
                p3 = new Point2D(b_x / 2.0, b_y / 2.0);
                p4 = new Point2D(b_x / 2.0, -b_y / 2.0);
	        }
            else if (Configuration == PunchingPerimeterConfiguration.EdgeLeft || Configuration == PunchingPerimeterConfiguration.EdgeRight)
            {
                b_x = c_x + d / 2.0;
                b_y = c_y + d;

                p1 = new Point2D(-b_x / 2.0, -b_y / 2.0);
                p2 = new Point2D(-b_x / 2.0, b_y / 2.0);
                p3 = new Point2D(b_x / 2.0, b_y / 2.0);
                p4 = new Point2D(b_x / 2.0, -b_y / 2.0);
            }
            else if (Configuration == PunchingPerimeterConfiguration.EdgeTop || Configuration == PunchingPerimeterConfiguration.EdgeBottom)
            {
                b_x = c_x + d;
                b_y = c_y + d / 2.0;
            }
            else
            {
                b_x = c_x + d / 2.0;
                b_y = c_y + d/2.0;
            }


            p1 = new Point2D(-b_x / 2.0, -b_y / 2.0);
            p2 = new Point2D(-b_x / 2.0, b_y / 2.0);
            p3 = new Point2D(b_x / 2.0, b_y / 2.0);
            p4 = new Point2D(b_x / 2.0, -b_y / 2.0);

            switch (Configuration)
            {
                case PunchingPerimeterConfiguration.Interior:
                   

                    return new List<PerimeterLineSegment>()
                    {
                        new PerimeterLineSegment(p1,p2 ),
                        new PerimeterLineSegment(p2,p3 ),
                        new PerimeterLineSegment(p3,p4 ),
                        new PerimeterLineSegment(p4,p1 )
                    };

                    break;
                case PunchingPerimeterConfiguration.EdgeLeft:


                    return new List<PerimeterLineSegment>()
                    {
                        new PerimeterLineSegment(p1,p4 ),
                        new PerimeterLineSegment(p4,p3 ),
                        new PerimeterLineSegment(p3,p2 ),
                    };

                case PunchingPerimeterConfiguration.EdgeRight:


                    return new List<PerimeterLineSegment>()
                    {
                        new PerimeterLineSegment(p4,p1 ),
                        new PerimeterLineSegment(p1,p2 ),
                        new PerimeterLineSegment(p2,p3 ),
                    };
                    break;

                case PunchingPerimeterConfiguration.EdgeTop:


                    return new List<PerimeterLineSegment>()
                    {
                        new PerimeterLineSegment(p2,p1 ),
                        new PerimeterLineSegment(p1,p4 ),
                        new PerimeterLineSegment(p4,p3 ),
                    };
                    break;

                case PunchingPerimeterConfiguration.EdgeBottom:


                    return new List<PerimeterLineSegment>()
                    {
                        new PerimeterLineSegment(p1,p2 ),
                        new PerimeterLineSegment(p2,p3 ),
                        new PerimeterLineSegment(p3,p4 ),
                    };
                    break;



                default:
                    throw new Exception("Unrecognized punching perimeter column type");
                    break;

                    throw new Exception("Corner cases were not implemented");
            }

        }
        /// <summary>
        /// Finds the controlling element in the weld group.
        /// </summary>
        /// <param name="Center">Instantaneous center (IC) of rotation.</param>
        /// <returns></returns>
        protected override ILocationArrayElement FindUltimateDeformationElement(Point2D Center)
        {
            FilletWeldElement governingElement = null;
            double DeltaMaxToRMin = double.PositiveInfinity;

            foreach (var we in WeldElements)
            {
                double DeltaFracture_n = GetElementFractureDeformation(we.LegLength, we.GetAngleTheta(Center));
                double DeltaUltimate_n = GetElementUltimateForceDeformation(we.LegLength, we.GetAngleTheta(Center));
                double rn = we.GetDistanceToPoint(Center);

                //store ultmate deformation and distance to IC for further use.
                we.LimitDeformation = DeltaFracture_n;
                we.UltimateLoadDeformation = DeltaUltimate_n;
                we.DistanceFromCentroid = rn;
                
                if (DeltaFracture_n / rn < DeltaMaxToRMin)
                {
                    DeltaMaxToRMin = DeltaFracture_n / rn;
                    governingElement = we;
                }
            }
            return governingElement;
        }
        protected override double GetElementForce(ILocationArrayElement element, Point2D center, ILocationArrayElement controllingWeld, double angle)
        {
            FilletWeldElement el = element as FilletWeldElement;
            FilletWeldElement cp = controllingWeld as FilletWeldElement;
            double elementForce =0;
            if (el!=null && cp !=null)
            {
                double theta = el.GetAngleTheta(center);
                        
                //this weld actual deformation
                double Delta_r = el.DistanceFromCentroid * (cp.LimitDeformation / cp.DistanceFromCentroid);
                //this weld ultimate deformation
                double pi = Delta_r / el.UltimateLoadDeformation;
                //double pi = Delta_r / el.LimitDeformation;
                //calculate element force
                elementForce = el.CalculateNominalShearStrength(pi, theta);


            }
            return elementForce;

        }
示例#25
0
 /// <summary>
 /// Constructor with Location as Point2D type.
 /// </summary>
 /// <param name="Location">Coordinates of center of element</param>
 public BoltPoint(Point2D Location)
 {
     this.Location = Location;
 }
示例#26
0
 /// <summary>
 /// Fillet weld line constructor
 /// </summary>
 /// <param name="p1">Point i</param>
 /// <param name="p2">Point j</param>
 /// <param name="leg">Weld size (leg)</param>
 /// <param name="F_EXX">Electrode stength</param>
 /// <param name="NumberOfSubdivisions">Number of sub-segments, used for instantaneous center of rotation calculations</param>
 /// <param name="theta">Angle from vertical (degrees)</param>
 public FilletWeldLine(Point2D p1, Point2D p2, double leg, double F_EXX, int NumberOfSubdivisions,double theta=0.0,  bool IsLoadedOutOfPlane=false)
 {
     // TODO: Complete member initialization
     this.NodeI = p1;
     this.NodeJ = p2;
     this.Leg = leg;
     this.ElectrodeStrength = F_EXX;
     this.NumberOfSubdivisions = NumberOfSubdivisions;
     this.theta = theta;
     this.IsLoadedOutOfPlane = IsLoadedOutOfPlane;
 }
示例#27
0
 public double GetDistanceToPoint(Point2D point)
 {
     return Math.Sqrt(Math.Pow(point.X-this.Location.X,2)+Math.Pow(point.Y - this.Location.Y,2));
 }
示例#28
0
        /// <summary>
        ///     Constructor
        /// </summary>
        /// <param name="FilletSize">Height of circular spandrel (e.g "k" dimension for wide flange I-beams).</param>
        /// <param name="RectangleWidth">Solid rectangle width (e.g web width for wide flange I-beams). </param>
        /// <param name="InsertionPoint"> Insertion point (at wider part). </param>
        /// <param name="IsTopWidened">Defines if wider part is at the top or bottom.</param>
        /// 

        public PartWithSingleFillet(double FilletSize, double RectangleWidth, Point2D InsertionPoint, bool IsTopWidened)
            : base(FilletSize, RectangleWidth, InsertionPoint, IsTopWidened)
        {

        }
            public plasticRectangle(double b, double h, Point2D Centroid):
                base(b,h, Centroid)
            {

            }
示例#30
0
 public abstract double GetInertiaXAroundPoint(Point2D center);