CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF : Neumann boundary condition (https://www.cfd-online.com/Forums/fluent/49862-udf-neumann-boundary-condition.html)

PierreM November 22, 2008 07:01

UDF : Neumann boundary condition
 
Hi,

I'm trying to write an UDF to set Neumann condtion ( dv/dy = 0 ). So, i tried this ---------- #include "udf.h"

DEFINE_PROFILE(inlet_y_velocity,thread,position) {

face_t f; cell_t c0,c=-1; Thread *t0 = NULL;

begin_f_loop(f, thread)

{ t0 = THREAD_T0(thread); c0 = F_C0(f,thread); F_PROFILE(f,thread,position) = C_V(c0,t0);

end_f_loop(c, thread) } ------- I just set velocity equal to the velocity of the adjacent cell. but that doesnt seem to work. What should i do? The udf compiles, but the derivative is not 0 on the boundary.

Thanks !

mange December 5, 2008 07:06

Re: UDF : Neumann boundary condition
 
You need to look into how Fluent calculates derivatives (green -gaus divergence center based ) and then set the face value on your boundary so that you make sure it will be zero in the cell. You can find that in any CFD text book or the UDF usermanual.


All times are GMT -4. The time now is 21:39.