-
-
September 27, 2017 at 11:19 am
admin
Ansys EmployeeHow can I find the coordinates of the center of a face?
-
October 17, 2017 at 6:21 am
admin
Ansys EmployeeThe coordinates of center of a face can be obtained by using the FCENTROID macro. The following udf is an example of accessing the coordinates of the face center using DEFINEONDEMAND. Note: When define on demand is executed, the coordinates and the ID of the face center are printed in the Fluent console. #include "udf.h" DEFINEONDEMAND(ondemand) { Domain *d = GetDomain(1); int ID = 2; Thread *t =LookupThread(d, ID); facet f; real x[NDND],x1,y1,z1; beginfloop(f,t) { FCENTROID(x,f,t); x1 = x [0]; y1 = x [1]; z1 = x [2]; Message("face : %d,%f,%f,%f,%dn",f,x1,y1,z1,ID); } endf_loop(f,t) }
-
Viewing 1 reply thread
- The topic ‘Find the coordinates of the center of a face’ is closed to new replies.
Ansys Innovation Space
Trending discussions
Top Contributors
-
3407
-
1057
-
1051
-
896
-
887
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.