UDFs' problem
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 |
Re: UDFs' problem
For what do you need these temperatures?
|
Re: UDFs' problem
I need the temperature for I want to calculate the htc.
|
Re: UDFs' problem
It is available under wall fluxes. You dont't have to compute them with UDF.
Dirk |
Re: UDFs' problem
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.
|
Re: UDFs' problem
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 |
Re: UDFs' problem
see example in , 4.3.21 section of UDF manual(F6.2)
|
Re: UDFs' problem
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 |
Re: UDFs' problem
I think DEFINE_ADJUST could do that. There should be other ways as well.
|
Re: UDFs' problem
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); } |
Re: UDFs' problem
Hi us!
Thank you very much! Best regards! Benny |
Re: UDFs' problem
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.
|
Re: UDFs' problem
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. |
Re: UDFs' problem
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
|
Re: UDFs' problem
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. |
All times are GMT -4. The time now is 23:34. |