|
[Sponsors] |
November 12, 2005, 12:14 |
UDS problem with wall boundary condition
|
#1 |
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, 05:02 |
Re: UDS problem with wall boundary condition
|
#2 |
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, 06:52 |
Re: UDS problem with wall boundary condition
|
#3 |
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, 10:03 |
Re: UDS problem with wall boundary condition
|
#4 |
Guest
Posts: n/a
|
Is there by any chance u want to code for wall force?? KP
|
|
November 13, 2005, 14:28 |
Re: UDS problem with wall boundary condition
|
#5 |
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, 02:41 |
Re: UDS problem with wall boundary condition
|
#6 |
Guest
Posts: n/a
|
You can use the F_FLUX(f,t) macro for that purpose.
RoM |
|
November 14, 2005, 04:26 |
Re: UDS problem with wall boundary condition
|
#7 |
Guest
Posts: n/a
|
Dear Alex, the problem is that F_ macros, works only with the segregated solver.Luca
|
|
November 14, 2005, 04:30 |
Re: UDS problem with wall boundary condition
|
#8 |
Guest
Posts: n/a
|
F_R(f,t) crashes on segeregated solver when used on walls. I tried it.
RoM |
|
November 14, 2005, 04:40 |
Re: UDS problem with wall boundary condition
|
#9 |
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, 05:11 |
Re: UDS problem with wall boundary condition
|
#10 |
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, 06:16 |
Re: UDS problem with wall boundary condition
|
#11 |
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, 06:23 |
Re: UDS problem with wall boundary condition
|
#12 |
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, 06:31 |
Re: UDS problem with wall boundary condition
|
#13 |
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, 06:39 |
Re: UDS problem with wall boundary condition
|
#14 |
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, 06: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, 10:28 |
|
#16 |
Member
Join Date: Nov 2014
Posts: 42
Rep Power: 12 |
Thanks for all posts.
Last edited by Maryam-A; September 22, 2015 at 04:17. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 11:56 |
problem with boundary condition??? | smn | CFX | 5 | November 24, 2009 07:37 |
UDF hook on the WALL boundary condition | Luke | FLUENT | 0 | June 7, 2006 12:54 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |