Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Use the output of a command as input of another one (unix's pipe style)

Status
Not open for further replies.

P.Cotte

Electrical
Oct 17, 2017
2
Hello everyone, here is my problem :
I have an ANSYS simulation in which I define lots of volumes, some must be subtracted from other. To keep track of who is who I use components. But when I use VSBV, compo1, compo2, it creates a new volume that is not in a component. Since I really do not like referring to volumes by their ID number (which seem to be unpredictable), I would like to do something like :
CM,COMP3,(VSBV, compo1, compo2)
to define the output of the VSBV command as the volume to define comp3 with. Now the line written above is obviously wrong. Does anyone if there is a way to achieve that?

Thanks in advance,
Philippe

EDIT: I should add that I never followed any kind of ANSYS course, I learned it with a script I have been given in order to achieve a precise kind of simulation. So I surely lack basic knowledge.
 
Replies continue below

Recommended for you

Try the following. Lets say you want the new volume to part of compo2. Then:

cmsel,s,compo1
cmsel,a,compo2
vsbv,compo1,compo2
cmsel,u,compo1
cm,compo2,volu

Also, take a look at the _return function. It will return the number of newly created geometric entities. It is a little limited in that it only works for some geometry creation commands ( not VSBV unfortunately), but is very useful.

Rick Fischer
Principal Engineer
Argonne National Laboratory
 
Thanks for the answer! I did not think of that, it should work fine indeed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor