CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   UDF for fuel injection (

djokovic July 1, 2010 15:49

UDF for fuel injection
Hi everyone,
Am new to Fluent and as well as to developing UDF's. Now am required to develop UDF for fuel injection at the inlet. Inlet has been selected as mass flow inlet in boundary types in Gambit. Once the fuel is injected, the inlet should be changed to a solid wall. Additionally, when the fuel is being injected only the fuel orifice is to be selected as mass flow inlet with the remaining part being a solid wall. And I need to develop a UDF for this condition. I've written a UDF and I need to know what needs to be changed and how far it is right.
'D' is the orifice dia and since am considering axisymmetric (with co-ordinates r,Z) its 'D/2'.

/* UDf for fuel injection at the inlet */
#include "udf.h"
DEFINE_PROFILE (mass_flow_rate, thread, position);
real r, D;
real x[ND_ND];
face_t f;
thread *t;
domain *d;
if (r<D/2)
begin_f_loop(f, thread)
F_CENTROID (x, f, thread);
F_PROFILE (f, thread, position) = Rho*volume/time;
end_f_loop(f, thread);
F_PROFILE (f, thread, position) = 0;

Thank u, guys.

All times are GMT -4. The time now is 16:32.