FeResPost Web Site                     FeResPost Online User Manual

IV.2.4.2 Calculations with Results

One shows here how calculations can be performed with Result objects. One first initializes the DataBase and imports Results with function “readOp2”. In this example, one works with the thermo-elastic version of the model, but its initialization is vey similar to the initialization in other examples. One also add addition Groups corresponding to skins and honeycomb of the sandwich panels, like in the example of section IV.2.2.4. Those parts are not described here.

One first describes the manipulation of results that lead to the calculation of maximum equivalent Von Mises stress in the skins of upper panel. The corresponding ruby lines look like this:

   targetGrp = db.getGroupCopy("pan_PZ_Al_2024")  
   stress =  db.getResultCopy("ORBIT_ONE_MS2_Z","Statics",'  
      "Stress Tensor","ElemCorners",targetGrp,[])  
   scalar = stress.deriveTensorToOneScal("VonMises")  
 
   maxScalar = scalar.extractResultMax  
   maxRkl = maxScalar.extractRkl  
   maxStress = stress.extractResultOnRkl(maxRkl)  
   maxScalarData = maxScalar.getData()[0]  
   maxStressData = maxStress.getData()[0]  
 
   puts  
   puts "Maximum Von Mises stress in panel +Z skins :"  
   puts  
   printf("   %.2f Pa on element %d (layer=' "%s' ").' n",  
      maxScalarData[5],maxScalarData[0],maxScalarData[2])  
   printf("      Sxx = %.2f, Syy = %.2f, Szz = %.2f,' n",maxStressData[5],'  
             maxStressData[6],maxStressData[7])  
   printf("      Sxy = %.2f, Syz = %.2f, Szx = %.2f' n",maxStressData[8],'  
             maxStressData[9],maxStressData[10])

Basically, the process can be divided into three parts:

1.
Actual calculation of Von Mises stress. One recovers the Cauchy stress tensor corresponding to the selected load case and selected Group. Then one derives a scalar equivalent Von Mises stress.
2.
Selection of the data corresponding to the maximum Von Mises stress. This is done as follows:
3.
Printing of the Results. The reader will understand by himself how it works.

In the same file, one also calculates a maximum out of plane shear stress in the honeycomb of the +Z panel. The calculation of this stress is done as follows:

   targetGrp = db.getGroupCopy("pan_PZ_Honey_72")  
   stress = db.getResultCopy("ORBIT_ONE_MS2_Z","Statics",'  
      "Stress Tensor","ElemCorners",targetGrp,[])  
   sXZ = stress.deriveTensorToOneScal("Component XZ")  
   sYZ = stress.deriveTensorToOneScal("Component YZ")  
   scalar = Post.sqrt(sXZ*sXZ+sYZ*sYZ)

Similarly, one calculates the “MaxShear” stress (obtained from the eigen values of the Cauchy stress tensor):

   targetGrp = db.getGroupCopy("pan_PZ_Honey_72")  
   stress =  db.getResultCopy("ORBIT_ONE_MS2_Z","Statics",'  
      "Stress Tensor","ElemCorners",targetGrp,[])  
   scalar = stress.deriveTensorToOneScal("MaxShear")

In the same data file, one shows how the bar stresses are recovered:

   targetGrp = db.getGroupCopy("strut_A")  
   stress =  db.getResultCopy("ORBIT_ONE_MS2_X","Statics",'  
      "Beam Axial Stress for Bending Loads","ElemCorners",targetGrp,[])  
   scalar = Post.abs(stress)  
 
   maxScalar = scalar.extractResultMax  
   maxRkl = maxScalar.extractRkl  
   maxStress = stress.extractResultOnRkl(maxRkl)  
   maxScalarData = maxScalar.getData()[0]  
   maxStressData = maxStress.getData()[0]  
 
   puts  
   puts "Maximum bar stress in strut A :"  
   puts  
   printf("   %.2f Pa on element %d (layer=' "%s' ").' n",  
      maxScalarData[5],maxScalarData[0],maxScalarData[2])  
   printf("      Sxx = %.2f' n",maxStressData[5])  
   puts  
   puts

Note that the way maximum stress is recovered from FE Results is different because Nastran calculates only the longitudinal component of the stress tensor at four locations in the cross-section. The shear stress is not taken into account in this calculation. More complicated calculations have to be performed to take into account all the components of the stress tensor for bar and beam elements.

These examples are provided in file “RUBY/EX05/printStressMax.rb”. Another example illustrating the calculation of tensorial results eigen-values and eigen-vectors is presented in file “RUBY/EX05/eigenQR.rb”.