Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

launch several analysis sequentially using *.bat

I would like to know if it possible to run several analysis sequentially. That is. After one finishes it starts the next one. .I have done the *.bat file and tried several things like MS dos command start/wait.... but nothing works. I did not find anything in nastran keywords. Until now once I launch the *.bat both analyses start at the same time

 

"C:\Archivos de programa\FEMAP_11_2_2\nastran\bin\nastran64w.exe" C:\Users\Jon\oceantec\FEM\prueba_lanzar_nastran\model_ballast_detail_size_25-000.dat 
"C:\Archivos de programa\FEMAP_11_2_2\nastran\bin\nastran64w.exe" C:\Users\Jon\oceantec\FEM\prueba_lanzar_nastran\model_floater_detail_size_80-003.dat

 

Thanks in advance

4 REPLIES

Re: launch several analysis sequentially using *.bat

Dear Jon,

If you are working on Windows, you have to generate a *.bat file like run-jon.bat (on Unix/Linux a Shell Script) with the following content:

 

CD \your-working-directory

nastran caso1.dat bat=no

nastran caso2.dat bat=no

nastran caso3.dat bat=no

 

Of course, you can add additional nastran keywords (mem=4gb, parallel=8, etc..). Also make sure that nastran.exe is in your PATH, if not add the PATH in the BATCH file.

 

On Windows, the batch keyword is ignored and Nastran always runs in the foreground. A BATCH file containing the following lines will run each of the 3 jobs sequentially:

 

CD \your-working-directory

nastran caso1.dat

nastran caso2.dat

nastran caso3.dat

 

On Linux, the default is to run the process in the background (i.e., batch=yes), so the above commands would result in all 3 jobs running simultaneously. If you add bat=no, then they will run sequentially.

 

I understand you are running FEMAP, then remember that in your nastxx.rcf results file under <Femap-dir>\nastran\conf directory you have a lot of nastran keywords already defined, like prog=FEMAP, this tells to the nastran solver that the model was created in FEMAP, then no need to issue it again in the command line.

 

 

To learn more take a look to my blog in the following address: https://iberisa.wordpress.com/2014/01/03/requisitos-hardware-de-nx-nastran/

 

Best regards,

Blas.

Blas Molero Hidalgo, Ingeniero Industrial, Director
IBERISA • 48004 BILBAO (SPAIN)
WEB: http://www.iberisa.com
Blog Femap-NX Nastran: http://iberisa.wordpress.com/

Re: launch several analysis sequentially using *.bat

Hello, 

 

I am working with windows. I already did the *.bat file like you said Blas . (see attached file). But when I launch the *.bat the analyses run at the same time both. with or without bat=no. As you said in windows it seems to be that this is ignored

 

Maybe I misdunderstood something

Solution
Solution
Accepted by topic author jon_morga
‎11-27-2015 05:13 AM

Re: launch several analysis sequentially using *.bat

Dear Jon,

You are using a bad nastran executable, "nastran64w.exe" is for launching the solver from a window in the deskop of Windows OS, simply use nastran.exe and you are done!!. Here you are the correct BATCH file edited (to make things short include C:\Archivos de programa\FEMAP_11_2_2\nastran in the PATH of you Windows OS):

 

C:

cd C:\Users\Jon\oceantec\FEM\prueba_lanzar_nastran
"C:\Archivos de programa\FEMAP_11_2_2\nastran\bin\nastran.exe" model_ballast_detail_size_25-000.dat
"C:\Archivos de programa\FEMAP_11_2_2\nastran\bin\nastran64w.exe" model_floater_detail_size_80-003.dat

 

Best regards,

Blas.

Blas Molero Hidalgo, Ingeniero Industrial, Director
IBERISA • 48004 BILBAO (SPAIN)
WEB: http://www.iberisa.com
Blog Femap-NX Nastran: http://iberisa.wordpress.com/

Re: launch several analysis sequentially using *.bat

Thanks a lot

 

It works. The problem was this nastran64.exe as you mentioned