Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Ansys in batch mode with shell scripts and qsub command

Status
Not open for further replies.

compositeFEA

Mechanical
Jun 26, 2011
9
0
0
CA
Hello all,

I've been doing FEA simulations with Ansys for several years now, and recently I have been allowed to use a cluster running on Linux. Since I am quite newbie to this thing, I have read a lot on the internet to get more familiar with Unix language. I found some example codes which are supposed to launch Ansys and read input files, but it does not work for me. What I want to do is simple:
1- I need to use Ansys 12.1 in batch mode, with the Academic Research license (aa_r);
2- Ansys should read my input file (which is an APDL command file) and save the database and results in my working directory on the server.

I know I have to write a shell script to call Ansys, and then to call this script via the "qsub" command. I think the shell script should look like this, or at least be close to:

Code:
#!/bin/bash 

#PBS -l nodes=1:ppn=1

nohup /ansys_inc/v121/ansys/bin/ansys121 -b nolist -p aa_r -j jobname -i jobname.inp -o jobname.out &

with "jobname.inp" being my APDL command file and "jobname.out" being the output file. Then I should call this script by typing the command "qsub example.sh", with "example.sh" being the shell script.

Obviously there is something wrong with my understanding of shell scripts since it does not work! So any advice would be appreciated!

Thank you in advance!
 
Status
Not open for further replies.
Back
Top