CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Please Help! Temperature profile UDF for 3D geometry (https://www.cfd-online.com/Forums/fluent/79197-please-help-temperature-profile-udf-3d-geometry.html)

subhankar_bhandari August 16, 2010 08:40

Please Help! Temperature profile UDF for 3D geometry
 
Hi all,
I am using UDF to define temperature field in 2D fluid flow problem. If I would like to put 3D temperature profile , what modification of UDF for 2D temperature profile is required.

My UDF for 2D temperature profile is :

DEFINE_PROFILE(inlet_temp, thread, index)
{
real x[ND_ND];
real temp, y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
temp = (12285-333)*(1-(pow((y/0.0035),4)))+(333);
F_PROFILE(f, thread, index) = temp;
printf("Temperature calculated by UDF is %f\n",temp);
}
end_f_loop(f, thread)
}

what would be for 3D?

Thanks in advance.


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