Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

*vmask and /noerase problem

Status
Not open for further replies.

skjoex

Structural
Jul 17, 2007
82
Hi,

I need to plot 7 curves per one graph in ansys and in the same time to use a *vmask command for each curve. So I wrote:

*DO,R1,1,P_1
*DO,R2,1,P_2
*DO,R3,1,P_3

...

*DO,T0,1,10001
/GOPR
TAB_4(T0,R1)=TAB_3((T0-1)*0.01,1)
*IF,TAB_4((T0-1)*0.01,R1),LE,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3)),THEN
MASK(T0,R1)=1.0
*ELSEIF,TAB_4((T0-1)*0.01,R1),GT,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3))
MASK(T0,R1)=-1.0
*ENDIF
*ENDDO
*ENDDO

...

*VMASK,MASK(1,1)
*VPLOT,TAB_4(1,0),TAB_4(1,1),2,3,4,5,6,7

...

it works OK, but I realized that only the first column of MASK was used. I decided to try a trick which was adviced me on this forum some time ago a I rewrote my code to:

*DO,R1,1,P_1
*DO,R2,1,P_2
*DO,R3,1,P_3

...

*DO,T0,1,10001
/GOPR
TAB_4(T0,R1)=TAB_3((T0-1)*0.01,1)
*IF,TAB_4((T0-1)*0.01,R1),LE,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3)),THEN
MASK(T0,R1)=1.0
*ELSEIF,TAB_4((T0-1)*0.01,R1),GT,PO_3(R1,R2,R3,1,PO_2(R1,R2,R3))
MASK(T0,R1)=-1.0
*ENDIF
*ENDDO
*ENDDO

...

/ERASE
/REPLOT
/NOERASE
/REPLOT
*DO,T0,1,7
*VMASK,MASK(1,T0)
*VPLOT,TAB_4(1,0),TAB_4(1,T0)
*ENDDO

...

... but then obtained an error message like this:

TAB_4 is dimensioned as 10001x7 but the second subscript requested is 10001 ...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor