예제 #1
0
        public Force[] GetGlobalEquivalentNodalLoads(Element element)
        {
            if (element is FrameElement2Node)
            {
                var frElm = element as FrameElement2Node;

                var l = (frElm.EndNode.Location - frElm.StartNode.Location).Length;

                var w = GetLocalDistributedLoad(element as Element1D);

                var localEndForces = new Force[2];


                localEndForces[0] = new Force(w.X * l / 2, w.Y * l / 2, w.Z * l / 2, 0, -w.Z * l * l / 12.0, w.Y * l * l / 12.0);
                localEndForces[1] = new Force(w.X * l / 2, w.Y * l / 2, w.Z * l / 2, 0, w.Z * l * l / 12.0, -w.Y * l * l / 12.0);


                localEndForces = Extensions2.ApplyReleaseMatrixToEndForces(frElm, localEndForces);//applying release matrix to end forces



                for (var i = 0; i < element.Nodes.Length; i++)
                {
                    var frc = localEndForces[i];

                    localEndForces[i] =
                        new Force(
                            frElm.TransformLocalToGlobal(frc.Forces),
                            frElm.TransformLocalToGlobal(frc.Moments));
                }

                return(localEndForces);
            }


            return(element.GetGlobalEquivalentNodalLoads(this));
        }
예제 #2
0
        public Force[] GetGlobalEquivalentNodalLoads(Element element)
        {
            if (element is FrameElement2Node)
            {
                var e = element as FrameElement2Node;

                var localForce = this.force;

                if (this.coordinationSystem == CoordinationSystem.Global)
                {
                    var tmp = e.TransformGlobalToLocal(localForce.Forces, localForce.Moments);

                    localForce.Forces  = tmp[0];
                    localForce.Moments = tmp[1];
                }

                var buf = new Force[2];

                buf[0] = new Force();

                var l = (e.EndNode.Location - e.StartNode.Location).Length;

                var a = distanseFromStartNode;
                var b = l - a;

                var mymy1 = localForce.My * b / (l * l) * (b - 2 * a);
                var mymy2 = localForce.My * a / (l * l) * (a - 2 * b);

                var myfz1 = 6 * localForce.My * a * b / (l * l * l);
                var myfz2 = -myfz1;


                var mzmz1 = localForce.Mz * b / (l * l) * (b - 2 * a);
                var mzmz2 = localForce.Mz * a / (l * l) * (a - 2 * b);

                var mzfy1 = -6 * localForce.Mz * a * b / (l * l * l);
                var mzfy2 = -mzfy1;


                var fzmy1 = -localForce.Fz * a * b * b / (l * l);
                var fzmy2 = localForce.Fz * a * a * b / (l * l);

                var fzfz1 = localForce.Fz * b * b / (l * l * l) * (3 * a + b);
                var fzfz2 = localForce.Fz * a * a / (l * l * l) * (3 * b + a);


                var fymz1 = localForce.Fy * a * b * b / (l * l);
                var fymz2 = -localForce.Fy * a * a * b / (l * l);

                var fyfy1 = localForce.Fy * b * b / (l * l * l) * (3 * a + b);
                var fyfy2 = localForce.Fy * a * a / (l * l * l) * (3 * b + a);


                var fxfx1 = localForce.Fx * b / l;
                var fxfx2 = localForce.Fx * a / l;

                var mxmx1 = localForce.Mx * b / l;
                var mxmx2 = localForce.Mx * a / l;

                var f1 = new Force(
                    fxfx1,
                    mzfy1 + fyfy1,
                    fzfz1 + myfz1,
                    mxmx1,
                    mymy1 + fzmy1,
                    mzmz1 + fymz1
                    );

                var f2 = new Force(
                    fxfx2,
                    mzfy2 + fyfy2,
                    fzfz2 + myfz2,
                    mxmx2,
                    mymy2 + fzmy2,
                    mzmz2 + fymz2
                    );

                var localEndForces = new Force[2];
                localEndForces[0] = f1;
                localEndForces[1] = f2;

                localEndForces = Extensions2.ApplyReleaseMatrixToEndForces(e, localEndForces);//applying release matrix to end forces

                var vecs  = new Vector[] { localEndForces[0].Forces, localEndForces[0].Moments, localEndForces[1].Forces, localEndForces[1].Moments };
                var tvecs = e.TransformLocalToGlobal(vecs);

                buf[0] = new Force(tvecs[0], tvecs[1]);
                buf[1] = new Force(tvecs[2], tvecs[3]);

                return(buf);
            }

            throw new NotImplementedException();
        }