Nastran run in batch mode

Sometimes is necessary to perform several Nastran runs, and by running one by one could be necessary a lot of time. Hereafter are illustrated two methods to speed up these operations. There is an effective method to perform this operation just creating a *.bat file, by means is possible to run all Nastran files (contained in the same folder) just clicking double time on it. First put the files (*.bdf or *.dat) to run all in one folder, then search locally the path of file *.exe contained in „bin“ folder of Nastran (for this exemple the path is C:\MSC.Software\MD_Nastran\20101\bin\mdnastran.exe). Second step, create a text file and write the follow command row:

for %%i in (*.bdf) do call C:\MSC.Software\MD_Nastran\20101\bin\mdnastran.exe scr=y old=n news=n %%i

It is an iterative cycle by means is performed the run of files *.bdf contained in the same folder. Save it with extension *.bat, then click on it double time to execute the runs.

Note: for the meaning of Nastran instructions „scr=y old=n news=n“ see link.

The second method is useful when for each file to run is requested a different Nastran command setting. It consists in n files (with extension *.bat) how many are the Nastran files to run; for example for two run we can create two .bat files with following command lines (save it as LunchingNastran-1.bat):

C:\MSC.Software\MD_Nastran\20101\bin\mdnastran.exe Nastran_File_1.bdf app=no scr=y old=n news=n post=LunchingNastran-2.bat

The command post=LunchingNastran-2.bat calls the execution of second .bat file. For the second *.bat file (named LunchingNastran-2.bat) put the following comand line:

C:\MSC.Software\MD_Nastran\20101\bin\mdnastran.exe Nastran_File_2.bdf app=no scr=y old=n news=n

Keep LunchingNastran-1.bat and LunchingNastran-2.bat in the same folder with the nastran files Nastran_File_1.bdf and Nastran_File_2.bdf. Then double click on LunchingNastran-1.bat to run the files.

This entry was posted in FEM - Analysis and tagged , , , , , . Bookmark the permalink.

Leave a Reply