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

UDFs' problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2005, 10:12
Default UDFs' problem
  #1
Benny
Guest
 
Posts: n/a
Hi all,

If I want to get the temperature of cells which are adjacent to the wall, how could I achieve it?

Best regards!

Benny
  Reply With Quote

Old   June 3, 2005, 10:51
Default Re: UDFs' problem
  #2
dirk
Guest
 
Posts: n/a
For what do you need these temperatures?
  Reply With Quote

Old   June 3, 2005, 11:02
Default Re: UDFs' problem
  #3
Benny
Guest
 
Posts: n/a
I need the temperature for I want to calculate the htc.
  Reply With Quote

Old   June 3, 2005, 11:10
Default Re: UDFs' problem
  #4
dirk
Guest
 
Posts: n/a
It is available under wall fluxes. You dont't have to compute them with UDF.

Dirk
  Reply With Quote

Old   June 3, 2005, 11:35
Default Re: UDFs' problem
  #5
Benny
Guest
 
Posts: n/a
I found that the result of Surface Heat Transfer Coef. is not right. It's defined by h=q/(T_wall-T_ref), where T_ref is the fluid average temperature. But I think if the T_ref is near walltemperature, the result will be better.
  Reply With Quote

Old   June 3, 2005, 13:21
Default Re: UDFs' problem
  #6
DH
Guest
 
Posts: n/a
There is a routine which allows you to get the c0 and c1 cells for any given face. You would need to loop through all the faces on the given cell and get the c0,c1 temperature for each adjoining cell. Note, the looping order for cells interior to you domain and those at the boundarys will have different looping orders. This type of looping and calling the adjacent cells to a face is in the fluent udf manual.

cheers,

DH
  Reply With Quote

Old   June 3, 2005, 15:29
Default Re: UDFs' problem
  #7
us
Guest
 
Posts: n/a
see example in , 4.3.21 section of UDF manual(F6.2)
  Reply With Quote

Old   June 3, 2005, 23:48
Default Re: UDFs' problem
  #8
Benny
Guest
 
Posts: n/a
Hi,

Thank you all for your help! could you show me what DEFINE Macros I should use to get the value? I need more info in details.

Dear us, could you post the example here, for the version I use is 6.1.22. Thank you again1

Best regards!

Benny
  Reply With Quote

Old   June 4, 2005, 22:56
Default Re: UDFs' problem
  #9
forest
Guest
 
Posts: n/a
I think DEFINE_ADJUST could do that. There should be other ways as well.
  Reply With Quote

Old   June 6, 2005, 11:03
Default Re: UDFs' problem
  #10
us
Guest
 
Posts: n/a
You can find the information on the macro in 6.1 UDF manual too. Pl. refer 5.2.2 for all the necessary information. The example i was talking about, there is the same example in 6.1 udf manual too. Refer 4.3.19. Just in case, i hv copy pasted the example here. --------------

/************************************************** ********************

UDF that implements a simplified advective term in the

scalar transport equation ************************************************** *********************/

#include "udf.h"

DEFINE_UDS_FLUX(my_uds_flux, f, t, i) { Thread *t0, *t1 = NULL; cell_t c0, c1 = -1;

real NV_VEC(psi_vec), NV_VEC(A);

/* neighboring cells of face f, and their (corresponding) threads */

t0 = THREAD_T0(f,t); c0 = F_C0(f,t);

if (NULL != THREAD_T1(f,t)) /* Alternative: if (! BOUNDARY_FACE_THREAD_P(t)) */

{

t1 = THREAD_T1(f,t);

c1 = F_C1(f,t);

} else

{

t1 = NULL;

c1 = -1;

}

/* If Face lies at domain boundary, use face values; */ /* If Face lies IN the domain, use average of adjacent cells. */

if (NULL == t1) /* Alternative: if (BOUNDARY_FACE_THREAD_P(t)) */

{

NV_D(psi_vec, =, F_U(f,t), F_V(f,t), F_W(f,t));

NV_S(psi_vec, *=, F_R(f,t));

} else

{

NV_D(psi_vec, =, C_U(c0,t0), C_V(c0,t0), C_W(c0,t0));

NV_D(psi_vec, +=, C_U(c1,t1), C_V(c1,t1), C_W(c1,t1));

NV_S(psi_vec, /=, 2.); /* averaging. */

NV_S(psi_vec, *=, (((C_R(c0,t0) + C_R(c1,t1)) / 2.)));

}

/* Now psi_vec contains our "psi" from above. */ /* Next, get the face normal vector: */

F_AREA(A, f, t);

/* Finally, return the dot product of both. */ /* Fluent will multiply the returned value */ /* by phi_f (the scalar's value at the face) */ /* to get the "complete" advective term... */

return NV_DOT(psi_vec, A); }

  Reply With Quote

Old   June 6, 2005, 13:04
Default Re: UDFs' problem
  #11
Benny
Guest
 
Posts: n/a
Hi us!

Thank you very much!

Best regards!

Benny
  Reply With Quote

Old   June 7, 2005, 08:53
Default Re: UDFs' problem
  #12
Mahesh
Guest
 
Posts: n/a
If U know the temperature of the wall, give it in Reference panel and then u can get htc. Otherwise, U can write one custom field function for the same.
  Reply With Quote

Old   June 7, 2005, 10:47
Default Re: UDFs' problem
  #13
Benny
Guest
 
Posts: n/a
dear Mahesh,

I think the most difficult thing is to get the temperature of the nodes adjacent the wall. I think the reference temperature should be the temperature of the nodes adjacent the wall, not the one of fluid.
  Reply With Quote

Old   June 13, 2005, 08:28
Default Re: UDFs' problem
  #14
zubier
Guest
 
Posts: n/a
would you please show me how to use the user defined scalar to model electrical field inside the heating cell ontaining fluid means that how to use c language to write this subroutne program with my best regard
  Reply With Quote

Old   June 13, 2005, 12:05
Default Re: UDFs' problem
  #15
us
Guest
 
Posts: n/a
I can give you some literature reference where electrostatic field was modelled using User defined scalar. But it was for the application of electrostatic powder coating process. However, atleast you'll get some idea.

Ye, Q., Steigleder, T., Scheibe, A., and Domnick, J., 2002, Numerical simulations of the electrostatic powder coating process with a corona spray gun, J. of Electrostatics 54, 189-205.

Bottner, C.U. and Sommerfeld, M., 2002, Numerical calculation of electrostatic powder painting using the Euler/Lagrange approach, Powder Technology 125, 206-216.
  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
Can I solve this problem by Fluent? Kai_kc FLUENT 1 October 27, 2010 06:29
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
problem in UDF's sangamnath FLUENT 3 December 7, 2005 10:17
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 15:52


All times are GMT -4. The time now is 20:50.