Hi,
I can give you a log file I use to start several jobs exactly in the manner you are describing.
I have no time to comment it for you though, so if there are some points that are unclear please refer to the help file.
Please also note that this strategy is useful for some particular applications, it is not the best way to run several loadcases / loadsteps.
It is also worth having a look on Ansys Batch, without calling for the Classical interface.
Regards
! LOADCASES LAUNCHER ("independent" method)
!**************************************************************************
! 1) Operations relative to loadcase 1:
salta1=1 ! 1=skip this loadcase, 0=operate
*IF,salta1,EQ,1,THEN !doesn't do anything with loadcase 1
*GO,:salto1
*ELSE
! has to deal with lc01, so it changes to the correct workspace:
/cwd,C:\wdir\V2\lc01\ ! changes working
! directory
/filname,csup_lc01,1 ! changes filename
resume,csup_lc01,db,,0, ! resumes the
! database #1
crea1=0 ! 1=create loadstep anew, 0=reuse
esegui1=1 ! 1=solve loadcase, 0=don't solve
*IF,crea1,EQ,1,THEN ! has to create the loadstep anew
/prep7 ! recalls the pre-processor
allsel ! ensures that everything is selected
csys,12
esys,12
! no bearing loads in this case
! recalls routine for applying pressure loads
/input,bc_pg01,log
allsel
lsdele,1 ! deletes any pre-existing file for this loadstep
lswrite,1 ! writes this loadstep file anew
finish ! exits any processor
*ENDIF
*IF,esegui1,EQ,1,THEN ! has to solve the loadcase
/solu ! enters the solver
/nerr,,10000000, ! sets max # of errors to very high
allsel ! ensures that everything is selected
lsclear,all ! clears all pre-existing loads and options
lsread,1 ! reads loadstep file #1
eqslv,pcg,1e-6 ! selects specified solver and options
solve ! runs the solution
finish ! exits any processor
*ENDIF
*ENDIF
:salto1
! 2) Operations relative to loadcase 2:
salta2=0 ! 1=skip this loadcase, 0=operate
*IF,salta2,EQ,1,THEN !doesn't do anything with loadcase 2
*GO,:salto2
*ELSE
! has to deal with lc02, so it changes to the correct workspace:
/cwd,C:\Dir\V2\lc02\ ! changes working
! directory
/filname,csup_lc02,1 ! changes filename
resume,csup_lc02,db,,0, ! resumes the
! database #2
crea2=0 ! 1=create loadstep anew, 0=reuse
esegui2=1 ! 1=solve loadcase, 0=don't solve
*IF,crea2,EQ,1,THEN ! has to create the loadstep anew
/prep7 ! recalls the pre-processor
allsel ! ensures that everything is selected
csys,12
esys,12
! no bearing loads in this case
! recalls routine for applying pressure loads
/input,bc_pg02,log
allsel
lsdele,2 ! deletes any pre-existing file for this loadstep
lswrite,2 ! writes this loadstep file anew
finish ! exits any processor
*ENDIF
*IF,esegui2,EQ,1,THEN ! has to solve the loadcase
/solu ! enters the solver
/nerr,,10000000, ! sets max # of errors to very high
allsel ! ensures that everything is selected
lsclear,all ! clears all pre-existing loads and options
lsread,2 ! reads loadstep file #2
eqslv,pcg,1e-6 ! selects specified solver and options
neqit,25
solve ! runs the solution
finish ! exits any processor
*ENDIF
*ENDIF
:salto2
! 3) Operations relative to loadcase 3:
salta3=0 ! 1=skip this loadcase, 0=operate
*IF,salta3,EQ,1,THEN !doesn't do anything with loadcase 3
*GO,:salto3
*ELSE
! has to deal with lc03, so it changes to the correct workspace:
/cwd,C:\Dir\V2\lc03\ ! changes working
! directory
/filname,csup_lc03,1 ! changes filename
resume,csup_lc03,db,,0, ! resumes the
! database #3
crea3=0 ! 1=create loadstep anew, 0=reuse
esegui3=1 ! 1=solve loadcase, 0=don't solve
*IF,crea3,EQ,1,THEN ! has to create the loadstep anew
/prep7 ! recalls the pre-processor
allsel ! ensures that everything is selected
csys,12
esys,12
! bearing loads already applied by Workbench.
!/input,bc_bp03,log !routine not executed
! recalls routine for applying pressure gradients
/input,bc_pg03,log
allsel
lsdele,3 ! deletes any pre-existing file for this loadstep
lswrite,3 ! writes this loadstep file anew
finish ! exits any processor
*ENDIF
*IF,esegui3,EQ,1,THEN ! has to solve the loadcase
/solu ! enters the solver
/nerr,,10000000, ! sets max # of errors to very high
allsel ! ensures that everything is selected
lsclear,all ! clears all pre-existing loads and options
lsread,3 ! reads loadstep file #3
eqslv,pcg,1e-6 ! selects specified solver and options
neqit,25
solve ! runs the solution
finish ! exits any processor
*ENDIF
*ENDIF
:salto3
! 4) Operations relative to loadcase 4:
salta4=0 ! 1=skip this loadcase, 0=operate
*IF,salta4,EQ,1,THEN !doesn't do anything with loadcase 4
*GO,:salto4
*ELSE
! has to deal with lc04, so it changes to the correct workspace:
/cwd,C:\Dir\V2\lc04\ ! changes working
! directory
/filname,csup_lc04,1 ! changes filename
resume,csup_lc04,db,,0, ! resumes the
! database #4
crea4=0 ! 1=create loadstep anew, 0=reuse
esegui4=1 ! 1=solve loadcase, 0=don't solve
*IF,crea4,EQ,1,THEN ! has to create the loadstep anew
/prep7 ! recalls the pre-processor
allsel ! ensures that everything is selected
csys,12
esys,12
! bearing loads already applied by Workbench.
!/input,bc_bp04,log !routine not executed
! recalls routine for applying pressure loads
/input,bc_pg04,log
allsel
lsdele,4 ! deletes any pre-existing file for this loadstep
lswrite,4 ! writes this loadstep file anew
finish ! exits any processor
*ENDIF
*IF,esegui4,EQ,1,THEN ! has to solve the loadcase
/solu ! enters the solver
/nerr,,10000000, ! sets max # of errors to very high
allsel ! ensures that everything is selected
lsclear,all ! clears all pre-existing loads and options
lsread,4 ! reads loadstep file #4
eqslv,pcg,1e-6 ! selects specified solver and options
neqit,25
solve ! runs the solution
finish ! exits any processor
*ENDIF
*ENDIF
:salto4 ! end of routine