The script illustrates the extraction of information
from Nastran XDB file.
import sys
sys.stdout=open(__file__+".log", 'w')
from FeResPost import *
import sys
sys.path.insert(0, '../UTIL')
import Util
# Creates and initializes the DataBase :
db=NastranDb()
db.Name="tmpDB"
db.readBdf("../../MODEL/MAINS/unit_xyz.bdf")
db.readGroupsFromPatranSession("../../MODEL/PATRAN/groups.ses")
# Accessing Results :
xdbFileName="../../MODEL/EXEC_XDB/sol111_ri_xyz.xdb"
db.attachXdb(xdbFileName)
infos=db.getAttachmentLcInfos(xdbFileName)
for tab in infos:
sys.stdout.write("%-20s %-25s %-6d %-6d %-15g
%-15g\n"%(tab[0],tab[1],tab[3],tab[4],tab[5],tab[6]))
resNames=db.getAttachmentResNames(xdbFileName)
for resName in resNames:
sys.stdout.write("%-20s\n"%(resName))
The different steps of the Nastran FEM importation
are:
More information on this example, and the manual
explaining the functions used in this example are given in FeResPost
Reference Manual.