For those starting out, here's a few commands I find pretty neat. If you're not familiar with them, it's worth checking out.
NDNEXT & ELNEXT
When looping through a bunch of nodes or elements, this provide some convenience.
/post1
cmsel, s, NodesOfInterest
*get, ncount, node, 0, count
*dim, uxsave,, ncount, 2
nnow = 0
*do,ct,1,ncount
nnow = ndnext(nnow)
uxsave(ct, 1) = nnow
*get, uxsave(ct, 2), node, nnow, u, x
*enddo
*stat, uxsave
Alternately, one could instead use fancier commands: *VGET with *VMASK
cmsel, s, NodesOfInterest
*get, nmx, node,, num, max
*get, ncount, node,, count
*dim, ndata,, nmx, 3
*dim, nkeep,, ncount, 2
*vget, ndata(1,1), node, 1, nsel
*vfill,ndata(1,2),ramp,1,1
*vmask, ndata(1,1)
*vget, ndata(1,3), node, 1, u, x
*vmask, ndata(1,1)
*vfun, nkeep(1,1), comp, ndata(1,2)
*vmask, ndata(1,1)
*vfun, nkeep(1,2), comp, ndata(1,3)
*stat, nkeep
q=UX(N)
This is equivalent to the above *get, q, node, N, u, x
Other succinct functions can be found here.
/PLOPTS, DATE, 0
This turns off the time and date display. It makes the screen more neat.
*VWRITE
When needing to export data for nicer plots in another software, it took me a while to figure out I can't run the following in the GUI. It has to be in a separate ASCII file called via \INPUT or as a macro. There should also not be any spaces in front of the *vwrite and formatting commands.
*cfopen, rboltf1.txt
*vwrite, rbolt1(1,1), rbolt1(1,2), rbolt1(1,3)
(E,' ',E,' ',E)
*cfclos
%aVar%
The percentage symbol enclosing a variable will create a forced substitution. This is advantageous in loops, file names etc.
NDNEXT & ELNEXT
When looping through a bunch of nodes or elements, this provide some convenience.
/post1
cmsel, s, NodesOfInterest
*get, ncount, node, 0, count
*dim, uxsave,, ncount, 2
nnow = 0
*do,ct,1,ncount
nnow = ndnext(nnow)
uxsave(ct, 1) = nnow
*get, uxsave(ct, 2), node, nnow, u, x
*enddo
*stat, uxsave
Alternately, one could instead use fancier commands: *VGET with *VMASK
cmsel, s, NodesOfInterest
*get, nmx, node,, num, max
*get, ncount, node,, count
*dim, ndata,, nmx, 3
*dim, nkeep,, ncount, 2
*vget, ndata(1,1), node, 1, nsel
*vfill,ndata(1,2),ramp,1,1
*vmask, ndata(1,1)
*vget, ndata(1,3), node, 1, u, x
*vmask, ndata(1,1)
*vfun, nkeep(1,1), comp, ndata(1,2)
*vmask, ndata(1,1)
*vfun, nkeep(1,2), comp, ndata(1,3)
*stat, nkeep
q=UX(N)
This is equivalent to the above *get, q, node, N, u, x
Other succinct functions can be found here.
/PLOPTS, DATE, 0
This turns off the time and date display. It makes the screen more neat.
*VWRITE
When needing to export data for nicer plots in another software, it took me a while to figure out I can't run the following in the GUI. It has to be in a separate ASCII file called via \INPUT or as a macro. There should also not be any spaces in front of the *vwrite and formatting commands.
*cfopen, rboltf1.txt
*vwrite, rbolt1(1,1), rbolt1(1,2), rbolt1(1,3)
(E,' ',E,' ',E)
*cfclos
%aVar%
The percentage symbol enclosing a variable will create a forced substitution. This is advantageous in loops, file names etc.
Dear all,
ReplyDelete1) When one models a porous structure in "ANSYS APDL" using Gurson model, some GTN parameters including the volumetric porosity fraction (i.e. initial porosity) are entered using the TBDATA command.
In these models, are we still supposed to draw the voids physically through the solid matrix after entering the initial porosity? or Does ANSYS automatically assume "virtual microvoids" through a solid matrix after entering the initial porosity?
2) If we must incorporate the voids into the matrix physically, how can we impose spherical voids in a "2D axisymmetric" model?
Many Thanks
Hi Runo,
DeleteUnfortunately this website is quite old and not well trafficked. I would suggest posting your questions to the Ansys forums for better exposure to get the answers you seek.