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/)
-   -   UDF-file for transient analysis (https://www.cfd-online.com/Forums/fluent-udf/116799-udf-file-transient-analysis.html)

ahvz April 25, 2013 07:11

UDF-file for transient analysis
 
1 Attachment(s)
Hi,

I am trying to do transient analysis. the attached file shows what I want to write at UDF file which is temperature versus time. for now I prepared the below C program:

first, I am not sure the program is true.

second, if its true why after interrupting its attached to program but its not work ( I know because the default value considered automatically by the Fluent during the analysis process).

start the UDF file :


#include "udf.h"

DEFINE_PROFILE(Temp_Profile, thread, position) /* Temp_profile is alternative, thread is boundary,
{
face_t f;
real x[ND_ND]; /* this will hold the position vector */
real y;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, position) = (-9e-27*y*y*y*y*y*y)+(2e-21*y*y*y*y*y)-(2e-16*y*y*y*y)+(1e-11*y*y*y)-(2e-7*y*y)+0.0009*y+9.4751;

}
end_f_loop(f,thread)
}


any helps?


thanks,


All times are GMT -4. The time now is 19:42.