CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   distance between every two faces (http://www.cfd-online.com/Forums/fluent/111395-distance-between-every-two-faces.html)

 yoollooz January 6, 2013 03:34

distance between every two faces

i want to calculate below formula too.how can i write udf?
s[i][j]=(exp(k*s)*(A[i].r)*(A[j].r))/(4*s)
k=constant
s=NV_MAG(r)
A[i] , A[j] = Area
r= distance between face A[i] and A[j]
how can i calculate this formula for all faces in domain?

It may not be possible. What is the meaning of previous face? You should modify the algorithm.

 yoollooz January 6, 2013 12:15

i want to write exchange factor for radiation by zone method and i have to compute the surface to surface exchange factor between every two surfaces, surface to gas exchange factor between every face and gas cell , and gas to gas exchange factor between every two gas cell.
formula for surface to surface exchange factor between surfaces i and surface j is:
ss[i][j]=(exp(-k*s)*(A[i].r)*(A[j].r))/(4*s)
k=constant
A[i] =surface i area
A[j] = surface j area
r=distance vector between face A[i] and face A[j]
s= magnitude of distance between face A[i] and A[j]

 All times are GMT -4. The time now is 00:23.