FeResPost Web Site                     FeResPost Online User Manual

IV.3.6 Producing composite finite element Results

The examples presented in this section are presented in directory “TESTSAT/RUBY/EX15”.

One presents here an example in which composite classes interact with finite element Result class. One first defines a “bottom” Group containing four elements of the bottom panel, which has a PCOMPG property. A load object, some components of which correspond to finite element Results is defined:

   ld=ClaLoad.new  
   ld.Id="testLoad"  
   ld.setMembrane([0.03,0.0,0.1],"femFM","femSC","femFM")  
   ld.setFlexural([0.0,0.0,0.0],"femFM","femSC","femSC")  
   ld.setOutOfPlane([100.0,200.0],"femFM","femFM")  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Shell Forces",  
                        "ElemCenters",bottom,[])  
   res.modifyRefCoordSys(db,"lamCS")  
   ld.setShellForces(res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Shell Moments",  
                        "ElemCenters",bottom,[])  
   res.modifyRefCoordSys(db,"lamCS")  
   ld.setShellMoments(res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Strain Tensor",  
                        "ElemCenters",bottom,["NONE"])  
   res.modifyRefCoordSys(db,"lamCS")  
   ld.setShellStrains(res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Curvature Tensor",  
                        "ElemCenters",bottom,["NONE"])  
   res.modifyRefCoordSys(db,"lamCS")  
   ld.setShellCurvatures(res)

In the example, no thermal or moisture contribution has been taken into account in the loading. Only mechanical components have been defined. The example, is defined in such a way that all possible mechanical contributions are used: in-plane forces, out-of-plane forces, bending moments, average in-plane strain and curvature. All these components are defined as finite element Results. (This allows us later to compare the Results produced by FeResPost with those directly output by Nastran.) The modification of coordinate system is necessary because one wants the loading components to be expressed in laminate axes. (The Nastran shell forces, moments, curvatures... are given in element axes.)

For later comparison of Results, several Results directly extracted from Nastran “op2” file are directly output in file “Reference.txt”.

   os=File.open("Reference.txt","w")  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Shell Forces",  
                        "ElemCenters",bottom,[])  
   res.modifyRefCoordSys(db,"lamCS")  
   Util::printRes(os,"Shell Forces",res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Shell Moments",  
                        "ElemCenters",bottom,[])  
   res.modifyRefCoordSys(db,"lamCS")  
   Util::printRes(os,"Shell Moments",res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Strain Tensor",  
                        "ElemCenters",bottom,["NONE"])  
   res.modifyRefCoordSys(db,"lamCS")  
   Util::printRes(os,"Strain Tensor",res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Curvature Tensor",  
                        "ElemCenters",bottom,[])  
   res.modifyRefCoordSys(db,"lamCS")  
   Util::printRes(os,"Curvature Tensor",res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Stress Tensor",  
                        "ElemCenters",bottom,[])  
   Util::printRes(os,"Stress Tensor",res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics","Strain Tensor",  
                        "ElemCenters",bottom,[])  
   Util::printRes(os,"Strain Tensor",res)  
 
   res=db.getResultCopy("ORBIT_ONE_MS2_Z","Statics",  
                        "Composite Failure Index, Tsai-Hill",  
                        "ElemCenters",bottom,[])  
   Util::printRes(os,"Composite Failure Index, Tsai-Hill",res)  
 
   os.close()

As laminate allowables are not defined in Nastran, one modifies the laminate corresponding to the unique PCOMPG property by adding laminate allowables to it. Then the modified ClaLam is reinserted in the database, where it replaces the original one:

   lam=compDb.getLaminateCopy(6)  
   allowables={}  
   allowables["sc"]=200.0e6  
   allowables["s1c"]=200.0e6  
   allowables["s2c"]=200.0e6  
   allowables["st"]=300.0e6  
   allowables["s1t"]=300.0e6  
   allowables["s2t"]=300.0e6  
   allowables["ss"]=100.0e6  
   allowables["s12"]=100.0e6  
   allowables["ilss"]=30.0e6  
   lam.insertAllowables(allowables)  
   compDb.insertLaminate(lam)

One also selects the failure indices that shall be calculated. The first one is calculated using ply material allowables, the others with the laminate allowables defined above. For the two last criteria, the most critical layer only is recovered for each element. The definition looks as follows:

   criteria = []  
   criteria << ["TS FI","TsaiHill_c","FI",false,true]  
   criteria << ["TW FI","TsaiWu","FI",true,true]  
   criteria << ["TW FI Critical","TsaiWu","FI",true,false]  
   criteria << ["ILSS FI Critical","Ilss","FI",true,false]

The following call to method “calcFiniteElementResponse” produces Results corresponding to the ClaLam object for which the method is called and writes Results in file “OneLaminate.txt”

   theta=0.0  
   outputs=lam.calcFiniteElementResponse(ClaDb,theta,ld,[true,true,true],  
      ["Shell Forces","Shell Moments", "Shell Curvatures",  
       "Average Strain Tensor"],  
      ["Stress Tensor","Strain Tensor","Mechanical Strain Tensor"],  
      1.0,criteria)  
 
   os=File.open("OneLaminate.txt","w")  
   outputs.each do |id,res|  
      Util::printRes(os,id,res)  
   end  
   os.close

The following sequence does the same operation, but the method “calcFiniteElementResponse” is called for the DataBase object “db”.

   theta=0.0  
   outputs=db.calcFiniteElementResponse(compDb,theta,ld,[true,true,true],  
      ["Shell Forces","Shell Moments", "Shell Curvatures",  
       "Average Strain Tensor"],  
      ["Stress Tensor","Strain Tensor","Mechanical Strain Tensor"],  
      1.0,criteria)  
 
   os=File.open("SeveralLaminates.txt","w")  
   outputs.each do |id,res|  
      Util::printRes(os,id,res)  
   end  
   os.close

For each element, “db” retrieves the property ID and selects in “compDb” the appropriate laminate with which the calculations are done. Of course, in this case, a single laminate is used and the Results should be the same as when the method is called for the “lam” laminate.

A few remarks can be done about the example:

A simplified variant of the example is presented in “testCriteria.rb” file. There the failure indices are calculated using directly layered stresses read from Nastran op2 file. For example, one calculates the failure indices using the ClaLam method as follows:

   outputs=lam.calcFiniteElementCriteria(compDb,stressRes,1.0,criteria)