CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Profile temperature (https://www.cfd-online.com/Forums/fluent-udf/87175-profile-temperature.html)

chany April 13, 2011 05:39

Profile temperature
 
Hi everybody,

I have a square geometry with imposed heat flux (1000 w/mē) at north and south faces and velocity inlet (25m/s, 300K) and outflow at est and west. I want to use UDFs to define periodic phenomenon. Actually, for every iteration, I want to take velocity and temperature profiles at outflow and imposed them to velocity inlet. But i don't know how to read velocity and temperature profiles for being able to manipulated them.

Thanks

argeus April 13, 2011 06:06

I usually use this: /cell variables accessing for instance/

UDF for data access:

DEFINE_PROFILE(my_profile, thread, index)
{
real x[ND_ND];
real y;
cell_t c;
int ID = ?; //outflow ID
Thread *tf;

Domain *domain;
domain = Get_Domain(1);
tf = Lookup_Thread(domain,ID);

if (! Data_Valid_P())
return;

begin_c_loop(c, thread)
{
F_CENTROID(x, c, thread);
y = x[1];

C_U = C_T(c,tf); // example for "u" direction, check UDF manual

F_PROFILE(c, thread, index) = ?; //setting outflow
}
end_c_loop(c,thread)
}

DEFINE_PROFILE(my_velocity, thread, index) //profile for velocity inlet
{
.
.
.

chany April 13, 2011 07:35

Thanks a lot argeus, I'll try this method, hope that it will solve my problem!

chany April 13, 2011 09:39

Please, I want to let fluent do calculations without UDF, and after some iterations (100 iterations for example), fluent begins to use my UDF.
The program of "argeux" has wored very good for field velocity, but for temperature, I have some problems.

argeus April 14, 2011 04:14

You can run the simulation without UDF, and the after a few iterations interpret UDF anyway, I guess. What kind of problems do you have with temperature? Using heat transfer you need to have a fine mesh on the walls. Use boundary layers.


All times are GMT -4. The time now is 04:56.