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!

CMSEL command doesn't seem to work for me in workbench

Status
Not open for further replies.

GeorgeEllwood

Mechanical
Aug 22, 2006
134
Hello,
I'm trying to run some apdl script in workbench to select and then find the coordinates of the node with the highest stress. This is using an NSORT and then a *GET command. This works for the entire model when it finds the node with the highest stress. The model is made up of 5 different bodies, I'd like to find the node with the highest stress in each of the bodies.
I've tried to do this by selecting a single body and then creating a named selection in this instance called 'FS'.
In the command snippet I've added:
cmsel,s,FS
However this isn't working, it's not returning any results when previously it was when there was no named selection.
Can anyone advise?
Many thanks
George
 
Replies continue below

Recommended for you

Hi George,

Try : nsel,s,node,,FS

If I remember well, named selection don't create a cm.

 
Hi Orel,
Thanks for the tip, I've tried it but it's not working for me. It's still finding the same node and returning the same coordinates from the entire model not the body I want.
I think you're correct in that I haven't created a CM and this is the cause of the problem. Do you know how to create a CM in workbench? I've using the body's name as well as the named selection's name but neither are working for me.
Thanks
George
 
If it's a complete body you want to select, then try one of these :

esel,s,type,,X
esel,s,mat,,X

to get the right X, put a snippet in your body (add the beginning of the tree) with :

*set,X,matid

To get the nodes of your body you then just have to use nsle command.

Then you can manually create your components

Hope I understood what you wanted to do.

 
Hi Orel,
Thanks for the tip. It isn't working for me for some reason. I've been in touch with ANSYS technical support, the initial way I tried selecting the geometry using a named selection and the CMSEL command should have worked. So it might be a bug in my version of ANSYS. They're looking into it and I'll let you know if there is any progress.
Cheers
George
 
Hi George,
Did you create the Named selection before or after solving the model? I think you have to add it before you solve for your first-suggested approach to work. (If you add a Named Selection after solving, I don't think the Component is made available for post-processing )
/Live
 
Hi Live,
Thanks for the suggestion. I've tried it on named selections created both before and after solving and neither are working for me. The model is a static structural that is linked to and uses results from an earlier steady state thermal, I'm wondering if this is part of the problem.
Thanks
George
 
Alright, then I don't have any other suggestions. I'm interested to hear if it works out, though.
/Live
 
I've just heard back form ANSYS. That named selections doesn't get passed through to the solver so that is why the CMSEL command wasn't working. The workaround they suggested used the esel command and with the matid.
 
On this subject, is there a way to find the matid of each body? What I thought was the matid doesn't appear to be so.
Thanks
George
 
As I suggested in my previous answer :

put a snippet in your body (add the beginning of the tree) with :

*set,X,matid


 
Hi Orel, I've tried that but I can't see an option to see the result in the preprocessor. When I try to view the variable in post processor it doesn't seem to be passed through and shows as 0.
 
George,

can you copy your snippet here ? Do you set it in the geometry sub-tree ?

 
Hi Orel,
I've put this snipped in the geometry sub tree:
*set, x, matid
I did this by right clicking on the solid in question then inserting commands.

In the solution I added these commands:
my_x=x

I've pushed the Search Paramaters Button and the 'my_x' result then appears in the results window and is highlighted in red. After I solve the Commands APDL the 'my_x' stops being red but shows as 0.

I get this in an info box:
The solution was executed using only post commands information. Check the Post Output on the Solution Information object for more details


But when I look in the Post Output I can't see anything of note.
 
George,

I've never been sure that Ansys reads the snippets in the geometry sub-tree when the mesh is already done. If your simulation is not too long, try clearing all generated data and re-run the analysis to be sure your geometry snippet is read.

 
Hi Orel,
You're correct, the snippet has to be in the geometry subtree before meshing/solving and you need to request it in the post processing snippet before you solve. It seems that it's only passed through once on the initial solve. If I rerun a postprocessing snippet it can't find the variable. It's possible to output the matid variable on the first run, then write down the number for each body, so subsequent runs can use the number I input and not rely on the variable that it can now no longer see.
Cheers
George
 
George,

It's coherent with the fact that it's in this snippet that you can assign mat, type and real. Thanks for the feedback.

PS: I think Workbench assigns a matid to each and every solid in a descending order. If so, you can manually set your X to the position of the solid in the sub-tree. It can be faster but it is not clean and should be verified :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor