FeResPost Web Site                     FeResPost Online User Manual

IV.2.5.1 Definition of acceleration fields

When sizing a satellite’s structure, one is often asked to define load cases corresponding to quasi-static accelerations on sub-parts of the structure. For example, at system level, dynamic analyses have shown that the upper part of the structure may be submitted to more severe accelerations than the rest of the satellite.

Unfortunately, Nastran does not allow the definition of quasi-static accelerations on sub-parts of the structure. The “GRAV” card, only allows the definition of accelerations globally on the whole structure.

It is possible to solve the problem in two steps:

1.
One calculates with Nastran three elementary load cases corresponding to unit accelerations of 1 ms2 applied on the entire structure oriented on the three structural axes respectively. The definition of these loads is done with Nastran “GRAV” cards.
2.
Then one recovers the finite element Results of the Nastran “op2” file, and after performing some operations on the Results, one performs an appropriate printing of the Results to produce “FORCE” Nastran Bulk cards. Two different results can be used to perform this operation: the applied loads provided by “OLOAD” output, or the applied loads obtained from “GPFORCE” output.

This method is equivalent to the production of a force field.

In this examples, one defines several functions. Therefore, a module “Grav” has also be created, and all functions are placed in the module. A first utility function is used to add to a DataBase a new Group created by performing a union of elementary Groups:

   def Grav.AddNewGroupsByUnions(db,totalGroupName,elemGroupNames)  
      totalGroup=Group.new()  
      for i in 0...elemGroupNames.size  
         elemGroup=db.getGroupCopy(elemGroupNames[i])  
         totalGroup+=elemGroup  
      end  
      totalGroup.Name=totalGroupName  
      db.addGroupCopy(totalGroup)  
   end

The first argument is the DataBase from which the elementary Groups are Retrieved and to which the new Group is created. The second argument is a String object the value of which is the new Group name. The last argument is an Array of Strings containing the names of the elementary Groups.

Another function is devoted to the printing of the “FORCE” Nastran Bulk Data Cards in a file. The function is defined as follows:

def Grav.writeForce(fileName,lcId,coordSysId,forces)  
    print "creating file "  
    puts fileName  
 
    table=forces.getData()  
    cards=[]  
    for oneRes in table  
        values=[]  
        values << lcId;  
        values << oneRes[1]  
        values << coordSysId  
        x=oneRes[5]  
        y=oneRes[6]  
        z=oneRes[7]  
        norm=Math.sqrt(x*x+y*y+z*z)  
        if (norm>1.0e-10) then  
            values << norm  
            values << x/norm  
            values << y/norm  
            values << z/norm  
        end  
        cards << values  
    end  
    NastranDb.writeNastranCards(fileName,"w","left","short","FORCE",cards);  
end

This function has four arguments:

1.
A String corresponding to the name of the file in which the cards are printed.
2.
An integer corresponding to the load case identifier.
3.
An integer corresponding to the coordinate system in which the components of the “FORCE” vectors are given.
4.
A Result object containing the nodal forces. The Result must be vectorial and defined at nodes. Also the forces should be expressed in the coordinate system identified by the third argument.

The function works as follows:

This version of the method is proposed in “RUBY/EX06/makeGravForces.rb”file.

Another version of the function, provided in “RUBY/EX06/makeGravForcesB.rb” reads as follows:

def Grav.writeForce(fileName,lcId,coordSysId,forces)  
    print "creating file "  
    puts fileName  
 
    table=forces.getData()  
    cards=[]  
    for oneRes in table  
        values=[]  
        values << "FORCE"  
        values << lcId;  
        values << oneRes[1]  
        values << coordSysId  
        x=oneRes[5]  
        y=oneRes[6]  
        z=oneRes[7]  
        norm=Math.sqrt(x*x+y*y+z*z)  
        if (norm>1.0e-10) then  
            values << norm  
            values << x/norm  
            values << y/norm  
            values << z/norm  
        end  
        cards << values  
    end  
    NastranDb.writeNastranCards(fileName,"w","left","short",cards);  
end

Remark that one uses the “5 arguments” version of “writeNastranCards” method. (The “cardName” argument is omitted.) On the other hand, each “values” Array has one additional element. The first element of the Array is the “FORCE” card name.

The function “Grav.genAllGravFields” is the function that performs the extraction of force fields from the Results stored in the DataBase:

   def Grav.genAllGravFields(db,data)  
      nbr=data.size  
      for i in 0...data.size  
         groupName=data[i][0]  
         extName=data[i][1]  
         baseLID=data[i][2]  
         csId=1001  
 
         target=db.getGroupCopy(groupName)  
 
         forces1=db.getResultCopy("LAUNCH_ONE_MS2_X","Statics",'  
            "Applied Loads, Forces","Nodes",target,[])  
         forces1.modifyRefCoordSys(db,csId)  
         forces2=db.getResultCopy("LAUNCH_ONE_MS2_Y","Statics",'  
            "Applied Loads, Forces","Nodes",target,[])  
         forces2.modifyRefCoordSys(db,csId)  
         forces3=db.getResultCopy("LAUNCH_ONE_MS2_Z","Statics",'  
            "Applied Loads, Forces","Nodes",target,[])  
         forces3.modifyRefCoordSys(db,csId)  
 
         Grav.writeForce("force1_"+extName+".bdf",baseLID+1,csId,forces1)  
         Grav.writeForce("force2_"+extName+".bdf",baseLID+2,csId,forces2)  
         Grav.writeForce("force3_"+extName+".bdf",baseLID+3,csId,forces3)  
 
         GC.start()  
      end  
   end

This function receives two arguments:

1.
The DataBase from which the Results are extracted.
2.
An Array of Arrays containing the information necessary for the production of the different force fields. Each element Array contains three elements:
(a)
A String object containing the name of the Group on which the Result forces are retrieved.
(b)
A String containing the name of the extension to be added to the output file name.
(c)
An integer corresponding to the base of the load identifier by which the force field shall be referred in the bulk data file. (Actually, three force fields are produced for each Group in the directions X, Y and Z respectively. The corresponding identifiers are produced by adding 1, 2 or 3 respectively to the base identifier of the load.

The function performs a loop on all the elements of the “data” Array argument. For each element

Finally The “main” function looks like this:

   def Grav.main()  
 
   # Creation of the dataBase :  
 
      db=NastranDb.new()  
      db.Name="tmpDB"  
      db.readBdf("../../MODEL/MAINS/unit_xyz.bdf")  
      db.readGroupsFromPatranSession("../../MODEL/PATRAN/groups.ses")  
 
      Grav.AddNewGroupsByUnions(db,"upper_set",'  
         ["pan_SUP", "struts_ALL", "fittings_ALL"])  
 
   # Reading of results :  
 
      db.readOp2("../../MODEL/EXEC_OP2/unit_xyz.op2","Results")  
 
   # Production of force fields :  
 
      data=Array.new()  
      data.push(["pan_MX",    "PAN_MX", 611000])  
      data.push(["pan_MY",    "PAN_MY", 612000])  
      data.push(["pan_MZ",    "PAN_MZ", 613000])  
      data.push(["pan_PX",    "PAN_PX", 614000])  
      data.push(["pan_PY",    "PAN_PY", 615000])  
      data.push(["pan_PZ",    "PAN_PZ", 616000])  
      data.push(["upper_set", "UPPER",  617000])  
 
      Grav.genAllGravFields(db,data)  
 
   end

It works as follows:

The program is executed by a call to main function:

   Grav.main()

Note that some of the output files produced by this example are used in the definition of loads for Nastran calculations in Chapter IV.1.

These examples are provided in files "RUBY/EX06/makeGravForces.rb" and "RUBY/EX06/makeGravForcesB.rb".