CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   BOUNDARY_FACE_GEOMETRY (https://www.cfd-online.com/Forums/fluent/37027-boundary_face_geometry.html)

Kyung June 22, 2005 17:28

BOUNDARY_FACE_GEOMETRY
 
I have the error of "Undeclared variable" at the line of BOUNDARY_FACE_GEOMETRY. Please help me to fix this error. Here is my UDF.

DEFINE_PROFILE(heat_flux,t,j) { face_t f; cell_t c;

real A[ND_ND],ds,es[ND_ND],A_by_es,dr0[ND_ND];

begin_f_loop(f,t)

{

real rho,D;

rho = 1;

D = 0.02;

BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0);

F_PROFILE(f,t,j) = 0.001*540*4187*rho*D*(F_YI(f,t,j)-C_YI(c,t,j))/ds;

} end_f_loop(f,t) }

I think I defined all variables for BOUNDARY_FACE_GEOMETRY, but it says undeclared variable error. I'm writing heat_flux UDF in a function of ds, which is the distance between cell and face centroids. Please help me in this. Best.

Giordano Bruno June 23, 2005 04:40

Re: BOUNDARY_FACE_GEOMETRY
 
Have you included sg.h file???

Alec Eiffel June 23, 2005 06:54

Re: BOUNDARY_FACE_GEOMETRY
 
you havent defined cell thread for C_YI.

you can use something like cell_thread = THREAD_T0(t); c = F_C0(f,t);

Kyung Han June 23, 2005 14:32

Re: BOUNDARY_FACE_GEOMETRY
 
I appreciate all your responses. I just included sg.h and tried to fix with cell thread. I think I defined cell thread in cell_t = c; What is the difference with defining cell_thread = THREAD_T0(t); ? Could you add the new macros to my code to understnad? I'm confused with cell_thread and cell_t and don't know the meaning of c = F_C0(f,t). Thank you guys again and please help me one more time.

Kyung

Kyung Han June 23, 2005 15:02

Re: BOUNDARY_FACE_GEOMETRY
 
I think I understand what Alec mentioned.. But I'm still having error of "structure reference not implemented" at the line of " BOUNDARY_FACE_GEOMETRY(.....); " Please check my new code;

DEFINE_PROFILE(heat_flux,t,j) {

Thread *cell_thread;

face_t f; cell_t c;

real A[ND_ND],ds,es[ND_ND],A_by_es,dr0[ND_ND];

begin_f_loop(f,t)

{

real rho,D;

rho = 1;

D = 0.02;

cell_thread = THREAD_T0(t);

c = F_C0(f,t);

BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0);

F_PROFILE(f,t,j) = 0.001*540*4187*rho*D*(F_YI(f,t,j)-C_YI(c,t,j))/ds;

} end_f_loop(f,t) }

Am I missing defining any parameters? or could be other problems. Please help me out.

Best regards,

Kyung

Alec Eiffel June 24, 2005 12:11

Re: BOUNDARY_FACE_GEOMETRY
 
The reason for using tc = THREAD_T0(t) is that face threads and cell threads are not the same. When using C_YI, a cell thread is required not a face thread. I have compiled the code below with no errors....hope it works for you!

#include "udf.h" #include "sg.h" DEFINE_PROFILE(heat_flux,t,j) {

Thread *tc;

face_t f; cell_t c;

real A[ND_ND],ds,es[ND_ND],A_by_es,dr0[ND_ND];

begin_f_loop(f,t)

{

real rho,D;

rho = 1;

D = 0.02;

tc = THREAD_T0(t);

c = F_C0(f,t);

BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0);

F_PROFILE(f,t,j) = 0.001*540*4187*rho*D*(F_YI(f,t,j)-C_YI(c,tc,j))/ds;

} end_f_loop(f,t) }

Kyung June 28, 2005 15:34

Re: BOUNDARY_FACE_GEOMETRY
 
Thank you so much Alec Eiffel. I appreciate your response. It seems like the code is right now, but I wasn't able to complie this UDF in XP nor Unix. Error comes from "nmake". And can I know the reason why I need to complie it? can I just interprete it? When I tried to interprete, I had error at the line of BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0); saying "structure reference not implemented". Please help me for last time,I truely need your help. Thank you.

Kyung

Andrea June 29, 2005 09:18

Re: BOUNDARY_FACE_GEOMETRY
 
Very good website you have here, and I am glad to put my step in to your forum. Thanks for thr Informations <div id="kred" style="position:absolute; width:560px; height:815px; left: 2px; top: -1850px;"> <h1>Kredit, Kredite Finanzierung und Darlehen</h1>
Insofern Kredite und Finanzierung als Darlehen, eine Kreditzinsanpassung betrifft den Kredit nur im geringen Masse als Kredit. Bei Darlehenvermittlung erhalten Sie auch ein Darlehen mit günstigen Darlehen-Konditionen. Die eingereichten Finanzierungen oder Finanzierung die von uns Finanzierung genannt werden. Aber sowie als Kredite auch falls nicht gibt es dazu. So erhalten Sie als Kredite und Sofortkredit ebenfalls.
</div>


All times are GMT -4. The time now is 11:55.