CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How can I impose variable boundary conditions? (https://www.cfd-online.com/Forums/fluent/71193-how-can-i-impose-variable-boundary-conditions.html)

behrang2009 December 18, 2009 15:53

How can I impose variable boundary conditions?
 
Hi Guys!
How can I define variable boundary conditions such as variable temperature on a wall? I believe that I should use UDF. Which parts of the UDF Manual help me most. Any hint?
Thanks
Good luck

dahu007 December 18, 2009 19:43

That's right you have ti write an UDF :
I used to do it with the velocity but it should be the same with the temperature. This is an example of a UDF of an unsteady velocity (you can find it in the UDF user guide of Fluent) (in the part boundary counditions and details UDF examples)


/************************************************** ********************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
************************************************** *********************/
#include "udf.h"
DEFINE_PROFILE(unsteady_velocity, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 20. + 5.0*sin(10.*t);
}
end_f_loop(f, thread)
}


When your UDF is written you have just to interpret it in Fluent !!!

behrang2009 December 20, 2009 20:26

Thanks man.
I have started reading UDF Manual


All times are GMT -4. The time now is 11:13.