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

Can C_VOLUME return value correctly?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2007, 06:16
Default Can C_VOLUME return value correctly?
  #1
blueberry
Guest
 
Posts: n/a
Hello all, I desperately need your help with the UDF. 1) Can C_VOLUME return value correctly? To calculate the sum of cell volume adjoin to one certain boundary surface, I use the following program. ID=8 is the no. found in the BC panel. However the reported results is 6.6e-5, which is far from the data (1.5521334e-06) obtained through the "report/surface integral/ sum". Could somebody tell me the reason? Domain *d; Thread *t,*ct; face_t f; cell_t c; int ID=8; d=Get_Domain(1); t=Lookup_Thread(d, ID); ct=THREAD_T0(t); begin_c_loop(c, ct)

{sumvolume+= C_VOLUME(c,ct);} end_c_loop(c, ct) 2) May I know whether the Lookup_Thread(domain,zone_ID)can return cell thread? I try to use it as cell thread for looping all the cells in one certain boundary surface. But it fails. 3) I also want to do something for one type of boundary surfaces, so I use if (THREAD_TYPE(ft) == THREAD_F_WALL) to judge whether the face thread is pointed to the right type of boundary faces. But it fails. 4) Can I retrieve Thread associated with an interior surface at specific location and how to do it? Your kindly help will be greatly appreciated!

  Reply With Quote

Old   May 4, 2007, 09:23
Default Re: Can C_VOLUME return value correctly?
  #2
saghir
Guest
 
Posts: n/a
ID=8; t=Lookup_Thread(d, ID);

begin_f_loop(f,t) { sumvolume+= C_VOLUME(F_C0(f,t),t->t0); } end_f_loop(f,t)

Message(" volume %e\n ",sumvolume);
  Reply With Quote

Old   May 6, 2007, 21:24
Default Re: Can C_VOLUME return value correctly?
  #3
blueberry
Guest
 
Posts: n/a
Hi, saghir, Thank you very much for your advice. I try to use your code, but the compiler of FLuent shows the following information: structure reference not implemented for line 21, where it is the code of sumvolume+= C_VOLUME(F_C0(f,t),t->t0); If convenient, could you give me further advice on it? Thanks a lot! By the way, may I know the meaning of F_C0(f,t) and t->t0? I check the help documents, but could not find it. Thank you very much for your time and efforts!

  Reply With Quote

Old   May 7, 2007, 04:05
Default Re: Can C_VOLUME return value correctly?
  #4
saghir
Guest
 
Posts: n/a
I tested the first program, it works very well if not use that there:

ID=8; t=Lookup_Thread(d, ID); Thread *t0 = THREAD_T0(t);

begin_f_loop(f,t) {

cell c0 = F_C0(f,t); sumvolume+= C_VOLUME(c0,t0); } end_f_loop(f,t)

Message(" volume %e\n ",sumvolume);

  Reply With Quote

Old   May 7, 2007, 05:04
Default Re: Can C_VOLUME return value correctly?
  #5
blueberry
Guest
 
Posts: n/a
Hi, Saghir, Thank you very much for your effort! May I know the meaning of cell c0=F_C0(f,t)? I try to run it in FLUENT. Although it can be compiled sucessfully, there is an error message as following. Error: Chip: internal error: invalid builtin -1: pc=136. Thanks a lot!

  Reply With Quote

Old   May 7, 2007, 05:09
Default Re: Can C_VOLUME return value correctly?
  #6
saghir
Guest
 
Posts: n/a
c0=F_C0(f,t) adjacent cell for the face f
  Reply With Quote

Old   May 8, 2007, 01:30
Default Re: Can C_VOLUME return value correctly?
  #7
blueberry
Guest
 
Posts: n/a
Thanks a lot for your kindly help! Your advice is really useful. By the way, do you know whether we can initialize the arrays in UDF as zero? I try to initilize the array PA[3][60] using the following senternse: for (i=0;i<3;i++) {for (j=0;j<60;j++)

{PA[i][j]=0.0;}} But it fails. Would you please give me some advices on it? Thanks a million!
  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


Similar Threads
Thread Thread Starter Forum Replies Last Post
return in udf wlt_1985 FLUENT 5 September 21, 2011 04:35
Error in CFX Solver Leuchte CFX 5 November 6, 2010 06:12
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23
Boundary Condition for Return Air Keng FLUENT 1 January 17, 2003 04:38


All times are GMT -4. The time now is 15:49.