-
-
June 21, 2022 at 11:18 am
ofo
SubscriberHi,
How do I get the centroid of a named selection in APDL? It needs to be done in post processing, as is needs to be found for the deformed shape (at least when large deflection is turned on). I tried to use ASUM/GSUM, but they don't seem to be appliable in POST. Is it possible to find the centroid of an arbitrary area with APDL?
My very simple code:
cmsel,s,NamedSelection
asum
*get,CentroidX,area,0,cent,x
*get,CentroidY,area,0,cent,y
*get,CentroidZ,area,0,cent,zUnfortunately it doesn't work, as post.out states that: "ASUM is not a recognized POST1 command, abbreviation, or macro..."
Thanks in advance. Your help is much appreciated.
-
June 28, 2022 at 3:39 pm
wrbulat
Ansys EmployeeASUM returns the inertial properties of an area (a "surface body" created with MAPDL). There are no MAPDL "solid model" entities in models created by Mechanical, so if your model was created in Mechanical I would not expect ASUM to work.
Â
This is old code but I think it might still work.Â
finishsave/file,scrap/soluÂcmsel,s,named_selectionesln,s,1Âirlf,-1psolve,elformpsolve,elprepirlist*get,mtot,elem,,mtot,xÂ*get,mcx,elem,,mc,x*get,mcy,elem,,mc,y*get,mcz,elem,,mc,zÂ*get,imcx,elem,,imc,x*get,imcy,elem,,imc,y*get,imcz,elem,,imc,zÂ*get,ipx,elem,,iprin,x*get,ipy,elem,,iprin,y*get,ipz,elem,,iprin,zÂ*get,ang_xy,elem,,iang,xy*get,ang_yz,elem,,iang,yz*get,ang_zx,elem,,iang,zxÂfinish/file,fileresume/soluÂÂÂThe parameters returned by the *GET command in the code above are described in the MAPDL Help:I hope this helps!
Bill
-
- The topic ‘Centroid of named selection (face) with APDL’ is closed to new replies.
-
6625
-
1906
-
1469
-
1311
-
1022
© 2026 Copyright ANSYS, Inc. All rights reserved.
