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:
The “FeResPost” module and the “extendedCLA” extension of the ClaLam class are first required.
A ClaDb object is created and initialized as usual.
Then, the laminate “testLam2” and the load “testFM” are retrieved from the ClaDb.
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”.