CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)

 Daniel Tanner May 6, 2009 14:10

UDF to Access Wall Normal Concentration Gradient

I want to calculate and store the wall normal concentration gradient at my wall boundary. I have compiled my udf and it works correctly. However, I have some questions, below is a section of my udf for reference.

*******************************************
/* Get Connectivity Data */
BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0);

/* Calculate Wall Normal Inter-centroid distance (dn)*/
dn = NV_DOT(A, (es*ds))/NV_MAG(A);

/* Calculate Wall Normal Concentration Gradient*/
C_UDMI(c0, t0, 1) = ((F_YI(f,j,0)*F_R(f,j))-(C_YI(c0, t0,0)*C_R(c0,t0)))/dn;
*******************************************

1) I am unsure (though the difference is probably quite small) if it is better to use the inter-centroid distance in the wall normal direction ("dn" - as defined above) or "ds" as returned by the BOUNDARY_FACE_GEOMETRY macro to calculate the wall normal gradient (i.e., dpsi/dn or dpsi/ds).

2) To establish the concentration gradient is mass_fraction*density the correct term to use:
F_YI(f,j,0)*F_R(f,j) - C_YI(c0, t0,0)*C_R(c0,t0)

3) I store these values at the centres of the cells (using C_UDMI) adjacent to the wall. Will this cause an error when contours of concentration at the wall are displayed in fluent, i.e., this would require the interpolation of the cell-centred values onto the wall and hence they would be different.

Thanks...

 moun139 May 18, 2012 10:35

thx

 Daniel Tanner May 21, 2012 04:23

What questions do you have?
If you have a UDF you are trying to create post it and I'll have a look.

 moun139 May 21, 2012 11:14

Yes Mr daniel , may you send me this udf please .
thank you a lot

 nandish777desai February 18, 2015 15:35

Help with the same problem