Is there any method to omit portions of my input file and read in others?


Yes, this can be done by enclosing the portion that you want to omit in an if-then statement.
Set the parameter OMIT in the beginning of your input:

OMIT=0

Then use the if-then statement enclosing the commands to be omitted.

*if,OMIT,eq,1,then !If the paramter OMIT equals one then execute the following commands
! ANSYS commands to be omitted
! ANSYS commands to be omitted
! ANSYS commands to be omitted
*endif !Put *ENDIF statement at the end of the ANSYS commands to be omitted, then continue with the rest of the input.

Conversely, if you set OMIT=1, the ANSYS commands enclosed in the if-then statement will be used and not omitted.

In the example input below, if OMIT is set to 0 the last plot shown will be SEQV (VonMises Stress), since the UZ displacement command will be omitted. If OMIT=1, all commands will be read and the last plot shown will be UZ displacement:

/prep7

OMIT=1 !OMIT=0 to omit commands, OMIT=1 to run commands in if-then statement

mp,ex,1,30e6
mp,nuxy,1,0.3
et,1,solid45
blc4,0,0,10,10,10
/view,1,1,1,1
/repl
vmesh,all
sfa,2,1,pres,1000
da,1,all,0
/solu
solve
/post1
plns,s,eqv

*if,OMIT,eq,1,then !****
plns,u,z
*endif





Show Form
No comments yet. Be the first to add a comment!