Return to examples


A Ruby script that reads Nastran BDF file

 

 

Purpose of the script

 

The script illustrate the reading of Nastran model from BDF file with FeResPost ruby extension.

 

Script

 

require "FeResPost"

include FeResPost

 

# Creates  and initializes the DataBase :

 

db=NastranDb.new()

db.Name="tmpDB1"

db.readBdf("../../MODEL/MAINS/unit_xyz.bdf")

 

db=NastranDb.new()

db.Name="tmpDB2"

begin

    db.readBdf("unit_xyz_V1.bdf",["../../MODEL/MESH/"],"bdf",{},true)

rescue Exception => x then

    printf("\n\nMaybe you should modify the two first include statements in main file!\n")

    printf("**********************************************************************\n\n")

    raise x

end

 

Explanation

 

The different steps of the Nastran FEM importation are:

Note that in te example above, the model is read twice. The second reading illustrates several optional argument of the “readBdf” method.

 

References

 

More information on this example, and the manual explaining the functions used in this example are given in FeResPost Reference Manual.

 


 

FeResPost Home Page

 

ferespost_gg.gif