-
-
September 27, 2017 at 11:19 amadminAnsys Employee
How can I find the coordinates of the center of a face?
-
October 17, 2017 at 6:21 amadminAnsys Employee
The 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
- Non-Intersected faces found for matching interface periodic-walls
- Script error Code: 800a000d
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
Top Contributors
-
1301
-
591
-
544
-
524
-
366
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.