示例#1
0
        public void ApplyLineLoadsByPattern(string patternName)
        {
            foreach (StatBeam stb in this.FEsystem.Beams)
            {
                sFrame sb = stb.ExtraData as sFrame;
                if (sb != null)
                {
                    if (sb.lineLoads != null && sb.lineLoads.Count > 0)
                    {
                        sXYZ load = sXYZ.Zero();
                        //sXYZ moment = sXYZ.Zero();
                        //double scalar = 0.0;
                        foreach (sLineLoad ll in sb.lineLoads)
                        {
                            if (ll.loadPatternName == patternName)
                            {
                                load += ll.load_Force;
                                //moment += ll.load_Moment;
                                //scalar += ll.load_Scalar;
                            }
                        }

                        if (load.GetLength() > 0.0)
                        {
                            stb.AppliedLinearLoad = new C_vector(load.X, load.Y, load.Z);
                        }
                    }
                }
            }
        }
示例#2
0
 public void ApplyPointLoadsByPattern(string patternName)
 {
     foreach (sNode sn in this.nodes)
     {
         StatNode stn = sn.extraData as StatNode;
         if (stn != null)
         {
             if (sn.pointLoads != null && sn.pointLoads.Count > 0)
             {
                 sXYZ load = sXYZ.Zero();
                 //sXYZ moment = sXYZ.Zero();
                 foreach (sPointLoad pl in sn.pointLoads)
                 {
                     if (pl.loadPatternName == patternName)
                     {
                         load += pl.forceVector;
                         //moment += pl.momentVector;
                         //currently StatSystem cannot do moment load
                     }
                 }
                 if (load.GetLength() > 0.0)
                 {
                     stn.AddLoad(load.X, load.Y, load.Z);
                 }
             }
         }
     }
 }