Velocity gradient on edge
Hi
I need to define constant velocity gradient on the edge. I though to define the value of shear stress but it will mislead due to the eddy viscosity. Hence i thought to define it through UDF. I have gone through the UDF literature in which i found DEFINE_ADJUST and C_T_G(c,t)[0] macro, but could not understand how to implement for my condition. Can anyone shed focus on this UDF or any other way to define it? Thank you Mvee 
1 Attachment(s)
You can discretize the gradient manually so as to set the velocity at the edge. For example, if the gradient is 2 and we use the firstorder discretization.
Attachment 15002 Uc is the velocity of neighbor cell, Uf is the velocity at the edge, Xc is the x coordinate of neighbor cell, Xf is the x coordinate of the edge. DEFINE_PROFILE(edge_velocity,t,i) { real xf[ND_ND],xc[ND_ND]; face_t f; cell_t c0 ; Thread*t0 ; begin_f_loop(f,t) { F_CENTROID(xf,f,t); c0=F_C0(f,t) ; t0=THREAD_T0(t) ; C_ CENTROID(xc,c0,t0); F_PROFILE(f,t,i) =C_U(c0,t0) 2*(xc[0]xf[0]); } end_f_loop(f,t) } Quote:

Velocity gradient on edge
Hi Gearboy
If i consider du/dx = 0 and then if i replace line "F_PROFILE(f,t,i) =C_U(c0,t0) 2*(xc[0]xf[0]);" by "F_PROFILE(f,t,i) =C_U(c0,t0);", will it work? This is to define zero velocity gradient on edge/surface. I think this is exactly equivalent to assign the neighboring cell velocity to the edge, right? Thank you Mvee 
You should only define boundary edge's velocity same as the neighbor cell. Never specify cell's velocity same as the edge.
In face, if you specify the cell's velocity, it will not work. Because you can't change a cell's value in the domain. Cell's value is decided by boundary conditions and governing equation, not decided by user's specification. You can only specify boundary conditions. Quote:

Yes, you are correct. The cell values are decided by the imposed boundary condition. I would like to define zero velocity gradient as boundary condition only in one direction not in the other direction. It is like one component of shear stress as zero.

Quote:

I need to define only DVDX as zero while other component will be obtained through the solver. If i define this through the specified shear then the solver will assume all component as zero.
Thank you 
Quote:

@MVEE.... hope you solved the problem....can u let me know I to make the gradient in one direction as zero for boundary where rest is calculated by the solver.
Thanks 
Quote:
I am having the same problem, i have to specify du/dx=0 at the outlet. Could you please tell me if u have got it. Many thanks for replying 
Zero Gradient Boundary Condition
Hello everybody
I have a UDS which has a zero gradient normal to the wall boundary condition but I don't know how to impose that in FLUENT udf. I am not sure if zero flux boundary is the same, if so please let me know. I tried to use the F_AREA macro dotted by the gradient vector but I dont know how to set its value to zero so it would work. Thanks 
Quote:

All times are GMT 4. The time now is 08:56. 