# how to calculate the area of a boundary in UDF?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 9, 2005, 00:42 how to calculate the area of a boundary in UDF? #1 peter Guest   Posts: n/a I wanna write a UDF which is applied to a boundary, say, UDF like the following: #include "udf.h" DEFINE_PROFILE(x_velocity, thread, index) { float t, x_velocity; float Area; real x[ND_ND]; real y; face_t f; begin_f_loop(f, thread) { t = RP_Get_Real("flow-time"); Area = x_velocity = Q/Area;/*Q is the flow rate*/ F_PROFILE(f, thread, index) = x_velocity; } end_f_loop(f, thread) } how to calculate the area "Area"?

May 31, 2021, 15:22
#2
New Member

Santu
Join Date: Mar 2019
Posts: 1
Rep Power: 0
Quote:
 Originally Posted by peter ;126893 I wanna write a UDF which is applied to a boundary, say, UDF like the following: #include "udf.h" DEFINE_PROFILE(x_velocity, thread, index) { float t, x_velocity; float Area; real x[ND_ND]; real y; face_t f; begin_f_loop(f, thread) { t = RP_Get_Real("flow-time"); Area = x_velocity = Q/Area;/*Q is the flow rate*/ F_PROFILE(f, thread, index) = x_velocity; } end_f_loop(f, thread) } how to calculate the area "Area"?

 May 31, 2021, 20:54 #3 Senior Member   Alexander Join Date: Apr 2013 Posts: 2,259 Rep Power: 33 __________________ best regards ****************************** press LIKE if this message was helpful