# UDS problem with wall boundary condition

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

 November 12, 2005, 11:14 UDS problem with wall boundary condition #1 Alex F. Guest   Posts: n/a As we know, face values of quantities in FLUENT are allocated in memory only for boundary faces (e.g., wall zones). I wrote a UDF which adds a UDS equation to the system of equations. I have a problem with WALL boundary condition. The problem is that FLUENT does not have access to face values of WALL boundary condition (e.g., F_R, F_U) and when calling these face values ACCESS_VIOLATION occured. I did not see this problem for other kinds of boundary condition like OUTFLOW, VELOCITY INLET. Thanks in advance.

 November 13, 2005, 04:02 Re: UDS problem with wall boundary condition #2 RoM Guest   Posts: n/a F_U should be zero at walls (no slip) if not statet otherwise. Other face values can be calculated from cell gradient and vector cell_center->face_center (dr0). For density: face_density=NV_DOT(C_R_G(c0,t0),dr0). RoM

 November 13, 2005, 05:52 Re: UDS problem with wall boundary condition #3 Alex F. Guest   Posts: n/a Dear RoM, Thanks for your prompt response. FLUENT should automatically return F_U=0 at WALL boundary. But when F_U is called in the UDF for WALL boundary, ACCESS_VIOLATION occured. There is a sample for DEFINE_UDS_FLUX in UDF manual in which F_R, F_U and F_V has been used. But when these functions want to return the value of WALL boundary ACCESS_VIOLATION occured.

 November 13, 2005, 09:03 Re: UDS problem with wall boundary condition #4 KP Guest   Posts: n/a Is there by any chance u want to code for wall force?? KP

 November 13, 2005, 13:28 Re: UDS problem with wall boundary condition #5 Alex F. Guest   Posts: n/a No, I want to calculate flux through wall. I used a face loop: thread_loop_f(t,d) { begin_f_loop(f,t) { flux=F_R(f,t)*F_U(f,t); }end_f_loop(f,t) } this will cause ACCESS_VIOLATION when "f" belongs to WALL boundary. Other type of boundary such as "Inlet", "Outflow" does not cause ACCESS_VIOLATION.

 November 14, 2005, 01:41 Re: UDS problem with wall boundary condition #6 RoM Guest   Posts: n/a You can use the F_FLUX(f,t) macro for that purpose. RoM

 November 14, 2005, 03:26 Re: UDS problem with wall boundary condition #7 Luca Guest   Posts: n/a Dear Alex, the problem is that F_ macros, works only with the segregated solver.Luca

 November 14, 2005, 03:30 Re: UDS problem with wall boundary condition #8 RoM Guest   Posts: n/a F_R(f,t) crashes on segeregated solver when used on walls. I tried it. RoM

 November 14, 2005, 03:40 Re: UDS problem with wall boundary condition #9 Luca Guest   Posts: n/a Yes I had the same problem. In the fluent users guide, it's written clearly that F_ are only for the segregated. So if you use the coupled 2nd order you can use the gradient to build wall variables. Luca

 November 14, 2005, 04:11 Re: UDS problem with wall boundary condition #10 RoM Guest   Posts: n/a @Luca, Do you have some experience with calculation of face data from cell data? I had some problems with it and started a thread one week ago, but nobody had an answer. Maybe you can help. Thats what i wrote: I have got a problem with the calculation of face vaules from cell center values. For an interior face i could caculate the face value either from the c0 cell side or the c1 cell side, using the cell values and the gradient. For a species it looks like this from c0 face_value0=C_YI(c0,c0thread,i)+NV_DOT(C_YI_G(c0,c 0thread,i),dr0) and from c1 face_value1=C_YI(c1,c1thread,i)+NV_DOT(C_YI_G(c1,c 1thread,i),dr1) dr is the vector from cell center to the face center. Both face values should be identical but unfortunatly they are not. I tried it on a sturcured meshe with full converged soultion. Is there any other way to get consistent values for the faces? Thanks for any suggestions RoM

 November 14, 2005, 05:16 Re: UDS problem with wall boundary condition #11 Luca Guest   Posts: n/a Dear RoM, I used only c0 to build wall pressure, so I haven't tested my routine on interior faces. Sorry. I hope the difference you found is not so large beetween using c0 or c1.It should depend on the gradient. Try using node based gradient and let me know how it works. Luca

 November 14, 2005, 05:23 Re: UDS problem with wall boundary condition #12 RoM Guest   Posts: n/a I will give it try. Thanks for the suggestion. The manual stated one should use reconstruction gradients (RG) to build face values from cell values but i never got this to work. Everytime i try to access a RG fluent gives a nice access violation. I wonder if RG are available at all. RoM

 November 14, 2005, 05:31 Re: UDS problem with wall boundary condition #13 Luca Guest   Posts: n/a I found out that sometimes instead of using reconstructed gradient, you should use the default one. It depends on the solver you're using (segregated or coupled).Luca

 November 14, 2005, 05:39 Re: UDS problem with wall boundary condition #14 RoM Guest   Posts: n/a I only use the segragated solver so i think i am stuck with the default gradients. Thanks, RoM

 August 6, 2014, 05:08 Reconstruction Gradient #15 New Member   hanSolo Join Date: Aug 2014 Posts: 1 Rep Power: 0 Hi, did you find a way to store cell values at faces by using the reconstruction Gradient? Thanks a lot

 September 21, 2015, 09:28 #16 Member   Join Date: Nov 2014 Posts: 42 Rep Power: 11 Thanks for all posts. Last edited by Maryam-A; September 22, 2015 at 03:17.