udf fluent
dear all
I have written a program and compile it in fluent but getting the errors while building in fluent. the program looks like this. please help me. /* UDF for determination of inlet and outlet */ #include "udf.h" #include "sg.h" DEFINE_EXECUTE_AT_END(determination_boun) { Domain *d; face_t f; Thread *t; real velocity_vector[2], mag_velocity, normal_vec, mag_normal_vec; real A[ND_ND], ds, es[ND_ND], A_by_es, dr0[ND_ND]; real X_component,Y_component, Guage_Pressure; d=Get_Domain(1); int ID=12; /*Zone ID for farfield zone from boundary condition task page*/ t=Lookup_Thread(d,ID); begin_f_loop(f,t) { /* find velocities*/ velocity_vector[0]=F_U(f,t); velocity_vector[1]=F_V(f,t); /* magnitude of velocity vector*/ mag_velocity=NV_MAG(velocity_vector); /* magnitude of normal vector*/ BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0); mag_normal_vec=NV_MAG(A); /* attack angle*/ double teta=0; if((mag_velocity* mag_normal_vec*cos(teta))<0) { /*inlet boundary*/ X_component=F_U(f,t); Y_component=F_V(f,t); } else Guage_Pressure=F_P(f,t); /*outlet boundary*/ } end_f_loop(f,t) } 1 file(s) copied. 1 file(s) copied. (system "copy "c:\PROGRA~1\ANSYSI~1\v121\fluent"\fluent12.1.2\sr c\makefile_nt.udf libudf\win64\2ddp\makefile") 1 file(s) copied. (chdir "libudf")() (chdir "win64\2ddp")() # Generating ud_io1.h determination_boun.c c:\program files\ansys inc\v121\fluent\fluent12.1.2\src\config.h(110) : error C2143: syntax error : missing '{' before ':' c:\program files\ansys inc\v121\fluent\fluent12.1.2\src\config.h(110) : error C2059: syntax error : ':' Done. |
can you highlight which lines belongs these errors?
|
there isn't this number line in my code
|
Quote:
|
The compiler complains about line 110 of a different file, not the file that gzamiri is showing.
In my copy of Fluent 12.1.4, lines 109-111 of config.h are: Code:
#if !(RP_2D || RP_3D) The problem is probably not in your UDF code, but in your system settings. Are you able to compile other UDFs? (From the manual?) |
dear pakk
do you think that this error is for version of fluent? |
I want to do my udf in 2D dimention.how can i specify it in my udf.
|
1.add the path of “config.h” to the system environment “include”.
2.you need declare the variable before you use it. Code:
/* UDF for determination of inlet and outlet */ |
dear sola
shoud I add config.h in my udf as follow? #include "config.h" |
Quote:
|
dear sola
I don't know how can i add the path to the system environment "include" please help me |
Quote:
|
All times are GMT -4. The time now is 17:14. |