Fluids

Fluids

Calculate the area of a boundary zone by UDF

    • admin
      Ansys Employee

      The Face Area Vector is FAREA(A, f, t) by UDF. Each component (A[0], A[1] and A[2]) represents the projected area on each axis. The function NVMAG(A) allows to calculate the total area of a boundary zone. Here is an example to calculate the total area of the boundary condition with the ID equal to 16 #include "udf.h" DEFINEONDEMAND(Areacalculation) { Domain *d=GetDomain(1); int ID=16; Thread *t=LookupThread(d, ID); facet f; real A[NDND]; real area = 0.; beginfloop(f,t) { FAREA(A,f,t); area += NVMAG(A); } endf_loop(f,t) Message0("Area of face with ID=%d: %f n", ID, area); }

    • admin
      Ansys Employee

      How to calculate the area of a boundary zone by UDF?

Viewing 1 reply thread
  • You must be logged in to reply to this topic.