Example #1
0
        /// <summary>
        /// 计算节点相交处相应单元的轴力向量
        /// </summary>
        /// <param name="node">节点号</param>
        /// <param name="ele">单元号(必须为FrameElement)</param>
        /// <param name="com">荷载组合</param>
        /// <returns>轴力向量</returns>
        public Vector3 GetNodeForceVec(int node, int ele, BLoadComb com)
        {
            Vector3      Res = new Vector3();
            FrameElement fme = MM.elements[ele] as FrameElement;

            //如果节点不在单元上则返回0向量
            if (fme.iNs.Contains(node) == false)
            {
                return(new Vector3());
            }
            ElemForce Force = MM.CalElemForceComb(com, ele);

            if (fme.I == node)
            {
                Res = MM.getFrameVec(ele);
                Res.Normalize();//归一化
                Res = Res * Force.Force_i.N;
            }
            else
            {
                Res = -MM.getFrameVec(ele);
                Res.Normalize();//归一化
                Res = Res * Force.Force_j.N;
            }
            return(Res);
        }