API to Generate Nastran Decks with Include Files from Groups

Siemens Phenom Siemens Phenom
Siemens Phenom

The attached API script was developed at the request of a customer that routinely uses groups to generate BDF files rather than generating all bulk data in a single file.   One of the test models used to develop this API script is also attached as .neu file.

 

Before running this script, you need to have the lowest ID group with no mesh entities named with the full path name of the and with a postfix of .cc as shown below.  Any other group selected that will be written as .bdf file will need to be titled with a .bdf postfix, again shown below.  If the full path of the include file is not included in the title, the file will be written to the same folder/directory as the control file (..cc.bdf file).

 

All file editing is performed in the local TEMP folder, so in the case of files being written to a network drive, that file is moved after it is edited locally to improve performance.

 

This API script also has the option to add a PARAM,WTMASS card.  You also have the option to write the decks as NX Nastran or MSC Nastran.

 

The customer using this file has used this with up to 160 groups as include files and reports it runs efficiently.

 

Export BDFs.jpg

 

 

INIT MASTER(S)
NASTRAN SYSTEM(442)=-1,SYSTEM(319)=1
ID ExportTest,Femap
SOL SEMODES
CEND
  TITLE = S:\TEMP\Nastran_Deck_Export\Plates.cc
  ECHO = NONE
  METHOD = 1
BEGIN BULK
$ ***************************************************************************
$   Written by : Femap with NX Nastran
$   Version    : 11.4.2
$   Translator : NX Nastran
$   From Model : S:\Femap\api\Chip\Working\Export_dat_Files\ExportTest.modfem
$   From Group : 1..S:\TEMP\Nastran_Deck_Export\Plates.cc
$   Date       : Wed Dec 27 22:16:25 2017
$   Output To  : S:\Scratch\Nastran\
$ ***************************************************************************
$
PARAM,PRGPST,YES
PARAM,POST,-1
PARAM,OGEOM,NO
PARAM,AUTOSPC,YES
PARAM,GRDPNT,0
PARAM,WTMASS,.00259
EIGRL*                 1                                              10
*                      0                                            MASS
*       
*       
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Plate1.bdf'
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Plate2.bdf'
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Plate3.bdf'
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Plate4.bdf'
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Temp\Temp-plate1.bdf'
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Test2\Test2-Plate11.bdf'
INCLUDE 'S:\TEMP\Nastran_Deck_Export\Test2\Test2-Plate19.bdf'
ENDDATA

 

Best Regards,
Chip Fricke
Principal Applications Engineer - Femap Product Development