FeResPost Web Site                     FeResPost Online User Manual

IV.3.4.2 A very simple example of use

The following example illustrates the use of the new methods in ClaLam class:

require "FeResPost"  
require "extendedCLA"  
include FeResPost  
 
   db=ClaDb.new  
   db.Id="testDB"  
   db.readEdf("test.edf")  
 
   lam=db.getLaminateCopy("testLam2")  
   ld=db.getLoadCopy("testFM")  
   theta=10.0  
 
   lam.calcResponse(db,theta,ld,true,false,true)  
   lam.write_loadResponse(STDOUT,theta)  
   lam.write_loadResponse(STDOUT,0.0)  
 
   STDOUT.printf("' n")  
   lam.write_PliesInPlaneStrainsAndStresses(STDOUT)  
   STDOUT.printf("' n")

The main steps of the example are the following:

1.
One first requests the “FeResPost” module and the “extendedCLA” extension of the ClaLam class.
2.
A ClaDb object is created and initialized as usual.
3.
Then, one retrieves the laminate “testLam2” and the load “testFM” from the ClaDb.
4.
The laminate load response is calculated and some results are printed. (Note that the calculation of laminate load response is done first by the call to “calcResponse”.)

The example is contained in the ruby program file “testCla.rb”.