Skip to content

Instantly share code, notes, and snippets.

@tonosaman
Last active March 9, 2017 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonosaman/cd8857486d452972f2c4c6887b4239a7 to your computer and use it in GitHub Desktop.
Save tonosaman/cd8857486d452972f2c4c6887b4239a7 to your computer and use it in GitHub Desktop.
Howto pick max VON MISES from NASTRAN output(.f06)
$ cat q20170302-solid-shear.f06 | awk '
NR == 1, /S T R E S S E S   I N   H E X A H E D R O N   S O L I D   E L E M E N T S   \( H E X A \)/ { next }
BEGIN { print "VON MISES,GRID-ID,ELEMENT-ID" }
{ _eid = substr($0, 4, 8); _vm = substr($0, 114, 16) }
_eid ~ /^ *[0-9]+$/ { eid = _eid }
_vm ~ /^ *[0-9.E+-]+$/ { nid = substr($0, 16, 8); printf "%f,%d,%d\n", _vm, nid, eid }' | sort -nr | head -20
  • GRID-ID=0 means CENTER of ELEMENT
VON MISES GRID-ID ELEMENT-ID
70.363380 990 1613
70.363380 990 1612
70.363380 972 1309
70.363380 972 1308
70.363380 970 1293
70.363380 970 1292
70.363380 952 989
70.363380 952 988
70.363380 252 1605
70.363380 252 1604
70.363380 234 1301
70.363380 234 1300
70.363380 232 1285
70.363380 232 1284
70.363380 214 981
70.363380 214 980
69.985110 991 990
69.985110 951 1611
69.985110 933 1307
69.985110 931 1291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment