Example #1
0
        private void addConcentratedMomentDeflection(LineElement line, float lineLength, ConcentratedSpanLoad load, float[,] controlPoints, float dirComponent, float scale, float EI)
        {
            float a, b;
            float RA, M;
            float c1, c3, c4;
            float x = 0.0f, deflection = 0.0f, angle = 0.0f;

            ConcentratedSpanLoad csl = (ConcentratedSpanLoad)load;

            a  = csl.D * lineLength;
            b  = lineLength - a;
            M  = csl.L;
            RA = M / lineLength;
            c3 = M * (-lineLength * lineLength / 3f - a * a / 2f) / lineLength;
            c1 = a * M + c3;
            c4 = M * a * a / 2f;

            // Flechas, angulos
            for (int i = 0; i < controlPoints.GetLength(0); i++)
            {
                x                    = controlPoints[i, 0] * lineLength;
                deflection           = addConcentratedMomentDeflection(load, x, lineLength, ref angle, a, b, RA, M, c1, c3, c4) * scale / EI;
                controlPoints[i, 1] += (deflection * dirComponent);
                controlPoints[i, 2] += angle * dirComponent / EI;
            }
        }
Example #2
0
        private void store(OleDbConnection cn, uint itemId, string loadCase, DirectionalLineLoad obj)
        {
            string sql      = "";
            string dir      = obj.Direction.ToString();
            string dirFrame = "GLOBAL";

            if (obj.Direction != LineLoad.LoadDirection.Gravity)
            {
                dirFrame = dir.Substring(0, dir.Length - 1).ToUpper();
                dir      = dir.Substring(dir.Length - 1);
            }

            if (obj is ConcentratedSpanLoad)
            {
                ConcentratedSpanLoad point = (ConcentratedSpanLoad)obj;
                sql = "INSERT INTO [Frame Loads - Point] " +
                      "(Frame,LoadCase,CoordSys,Type,Dir,DistType,RelDist,AbsDist,Force) VALUES " +
                      "(" + itemId + ",\"" + loadCase + "\",\"" + dirFrame + "\",\"" + point.Type + "\"," +
                      "\"" + dir + "\",\"RelDist\"," + point.D + ",0," + point.LoadInt + ");";
            }
            else if (obj is DistributedSpanLoad)
            {
                DistributedSpanLoad dist = (DistributedSpanLoad)obj;
                sql = "INSERT INTO [Frame Loads - Distributed] " +
                      "(Frame,LoadCase,CoordSys,Type,Dir,DistType,RelDistA,RelDistB,AbsDistA,AbsDistB,FOverLA,FOverLB) VALUES " +
                      "(" + itemId + ",\"" + loadCase + "\",\"" + dirFrame + "\",\"" + dist.Type + "\"," +
                      "\"" + dir + "\",\"RelDist\"," + dist.Da + "," + dist.Db + ",0,0," + dist.LoadAInt + "," + dist.LoadBInt + ");";
            }
            if (sql.Length > 0)
            {
                new OleDbCommand(sql, cn).ExecuteNonQuery();
            }
        }
Example #3
0
        private float addConcentratedMomentDeflection(ConcentratedSpanLoad load, float x, float lineLength, ref float angle, float a, float b, float RA, float M, float c1, float c3, float c4)
        {
            float flecha = 0.0f;

            if (x < a)
            {
                flecha = -RA * (float)Math.Pow(x, 3) / 6f + c1 * x;
                angle  = -RA * (float)Math.Pow(x, 2) / 2f + c1;
            }
            else
            {
                flecha = -RA * (float)Math.Pow(x, 3) / 6f + M * (float)Math.Pow(x, 2) / 2f + c3 * x + c4;
                angle  = -RA * (float)Math.Pow(x, 2) / 2f + M * x + c3;
            }

            return(flecha);
        }
Example #4
0
        private float addConcentratedForceDeflection(ConcentratedSpanLoad load, float x, float lineLength, ref float angle, float a, float b, float RA, float P, float c1, float c3)
        {
            float flecha = 0.0f;

            if (x < a)
            {
                flecha = RA * (float)Math.Pow(x, 3) / 6f + c1 * x;
                angle  = RA * (float)Math.Pow(x, 2) / 2f + c1;
            }
            else
            {
                flecha = RA * (float)Math.Pow(x, 3) / 6f - P * (float)Math.Pow(x - a, 3) / 6f + c3 * x;
                angle  = RA * (float)Math.Pow(x, 2) / 2f - P * (float)Math.Pow(x - a, 2) / 2f + c3;
            }

            return(flecha);
        }
Example #5
0
        /// <summary>
        /// Executes the command.
        /// Creates, gets parameters and add a Concentrated line load to the selected line elements.
        /// </summary>
        /// <param name="services">CommandServices object to interact with the system</param>
        public override void Run(Canguro.Controller.CommandServices services)
        {
            ConcentratedSpanLoad load = new ConcentratedSpanLoad();

            //services.GetProperties(Title, load, false);

            if (Canguro.Controller.Grid.LoadEditFrm.EditLoad(load) == System.Windows.Forms.DialogResult.OK)
            {
                List <Item> selection = services.GetSelection();

                foreach (Item item in selection)
                {
                    if (item is LineElement)
                    {
                        ((LineElement)item).Loads.Add((ConcentratedSpanLoad)load.Clone());
                    }
                }
            }
        }
Example #6
0
        private void addConcentratedForceDeflection(LineElement line, float lineLength, ConcentratedSpanLoad load, float[,] controlPoints, float dirComponent, float scale, float EI)
        {
            float a, b;
            float RA, P;
            float c1, c3;
            float x = 0.0f, deflection = 0.0f, angle = 0.0f;

            ConcentratedSpanLoad csl = (ConcentratedSpanLoad)load;

            a  = csl.D * lineLength;
            b  = lineLength - a;
            P  = -csl.L;
            RA = P * (1f - a / lineLength);
            c1 = c3 = P * a * (lineLength - a) * (a - 2f * lineLength) / (6f * lineLength);

            // Flechas, angulos
            for (int i = 0; i < controlPoints.GetLength(0); i++)
            {
                x                    = controlPoints[i, 0] * lineLength;
                deflection           = addConcentratedForceDeflection(load, x, lineLength, ref angle, a, b, RA, P, c1, c3) * scale / EI;
                controlPoints[i, 1] += (deflection * dirComponent);
                controlPoints[i, 2] += angle * dirComponent / EI;
            }
        }
Example #7
0
 /// <summary>
 /// Relocates a ConcentratedSpanLoad between the line element where it is and a new adjacent line element.
 /// </summary>
 /// <param name="newLineLoads">The AssignedLoads object of the new Line Element</param>
 /// <param name="lc">The Load Case to which the load belongs.</param>
 /// <param name="x">The dividing point of the two line elements [0, 1]</param>
 /// <param name="load">The Load to distribute in two elements</param>
 /// <returns>true if the load was moved to the new Line Element (so the caller removes it). false otherwise.</returns>
 private static bool RelocateConcentratedLoads(AssignedLoads newLineLoads, LoadCase lc, float x, ConcentratedSpanLoad load)
 {
     if (x > load.D)
     {
         load.D = load.D / x;
         return(false);
     }
     else
     {
         load    = (ConcentratedSpanLoad)load.Clone();
         load.Id = 0;
         load.D  = (load.D - x) / (1f - x);
         newLineLoads.Add(load, lc);
         return(true);
     }
 }