
[Sponsors] 
June 3, 2005, 09:12 
UDFs' problem

#1 
Guest
Posts: n/a

Sponsored Links
If I want to get the temperature of cells which are adjacent to the wall, how could I achieve it? Best regards! Benny 

Sponsored Links 
June 3, 2005, 09:51 
Re: UDFs' problem

#2 
Guest
Posts: n/a

For what do you need these temperatures?


June 3, 2005, 10:02 
Re: UDFs' problem

#3 
Guest
Posts: n/a

I need the temperature for I want to calculate the htc.


June 3, 2005, 10:10 
Re: UDFs' problem

#4 
Guest
Posts: n/a

It is available under wall fluxes. You dont't have to compute them with UDF.
Dirk 

June 3, 2005, 10:35 
Re: UDFs' problem

#5 
Guest
Posts: n/a

I found that the result of Surface Heat Transfer Coef. is not right. It's defined by h=q/(T_wallT_ref), where T_ref is the fluid average temperature. But I think if the T_ref is near walltemperature, the result will be better.


June 3, 2005, 12:21 
Re: UDFs' problem

#6 
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 

June 3, 2005, 14:29 
Re: UDFs' problem

#7 
Guest
Posts: n/a

see example in , 4.3.21 section of UDF manual(F6.2)


June 3, 2005, 22:48 
Re: UDFs' problem

#8 
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 

June 4, 2005, 21:56 
Re: UDFs' problem

#9 
Guest
Posts: n/a

I think DEFINE_ADJUST could do that. There should be other ways as well.


June 6, 2005, 10:03 
Re: UDFs' problem

#10 
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); } 

June 6, 2005, 12:04 
Re: UDFs' problem

#11 
Guest
Posts: n/a

Hi us!
Thank you very much! Best regards! Benny 

June 7, 2005, 07:53 
Re: UDFs' problem

#12 
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.


June 7, 2005, 09:47 
Re: UDFs' problem

#13 
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. 

June 13, 2005, 07:28 
Re: UDFs' problem

#14 
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


June 13, 2005, 11:05 
Re: UDFs' problem

#15 
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, 189205. Bottner, C.U. and Sommerfeld, M., 2002, Numerical calculation of electrostatic powder painting using the Euler/Lagrange approach, Powder Technology 125, 206216. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Can I solve this problem by Fluent?  Kai_kc  FLUENT  1  October 27, 2010 05:29 
natural convection problem for a CHT problem  SeHee  CFX  2  June 10, 2007 06:29 
Adiabatic and Rotating wall (Convection problem)  ParodDav  CFX  5  April 29, 2007 19: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 14:52 
Sponsored Links 