A Python
script that reads Nastran BDF file
Purpose of the script
The script illustrates the reading of a Nastran model
from a BDF file with the FeResPost Python extension.
Script
Python
import FeResPost
from FeResPost import *
# Creates and initializes the DataBase :
db=NastranDb()
db.Name="tmpDB2"
try:
db.readBdf("unit_xyz_V1.bdf",["../../MODEL/MESH/"],"bdf",{},True)
except:
print("\n\nMaybe you should modify the two first include statements in main file!")
print("**********************************************************************\n")
raise StandardError
Explanation
The different steps of the script are:
- The access to the FeResPost
compiled library.
- The creation of a NastranDb
object by a call to "NastranDb()".
- The importation of the model
from a BDF file by a call to the "readBdf" method.
References
More information on this example, and on the functions it uses, is given in the FeResPost User Manual.