CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

BOUNDARY_FACE_GEOMETRY

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2005, 17:28
Default BOUNDARY_FACE_GEOMETRY
  #1
Kyung
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   June 23, 2005, 04:40
Default Re: BOUNDARY_FACE_GEOMETRY
  #2
Giordano Bruno
Guest
 
Posts: n/a
Have you included sg.h file???
  Reply With Quote

Old   June 23, 2005, 06:54
Default Re: BOUNDARY_FACE_GEOMETRY
  #3
Alec Eiffel
Guest
 
Posts: n/a
you havent defined cell thread for C_YI.

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

Old   June 23, 2005, 14:32
Default Re: BOUNDARY_FACE_GEOMETRY
  #4
Kyung Han
Guest
 
Posts: n/a
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
  Reply With Quote

Old   June 23, 2005, 15:02
Default Re: BOUNDARY_FACE_GEOMETRY
  #5
Kyung Han
Guest
 
Posts: n/a
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
  Reply With Quote

Old   June 24, 2005, 12:11
Default Re: BOUNDARY_FACE_GEOMETRY
  #6
Alec Eiffel
Guest
 
Posts: n/a
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) }
  Reply With Quote

Old   June 28, 2005, 15:34
Default Re: BOUNDARY_FACE_GEOMETRY
  #7
Kyung
Guest
 
Posts: n/a
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
  Reply With Quote

Old   June 29, 2005, 09:18
Default Re: BOUNDARY_FACE_GEOMETRY
  #8
Andrea
Guest
 
Posts: n/a
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>
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 18:40.