CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   how to calculate the area of a boundary in UDF? (http://www.cfd-online.com/Forums/fluent/38883-how-calculate-area-boundary-udf.html)

peter December 9, 2005 01:42

how to calculate the area of a boundary in UDF?
 
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"?


All times are GMT -4. The time now is 05:53.