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:

References

More information on this example, and on the functions it uses, is given in the FeResPost User Manual.

← Back to the examples