|
[Sponsors] |
November 18, 2014, 00:38 |
error correction
|
#1 |
New Member
reza
Join Date: Nov 2014
Posts: 1
Rep Power: 0 |
Hello
I got some problems with my UDF file when I compiled it in Fluent. I hope someone could help me ,the error text is written below: cpp -I"D:\Fluent.Inc\fluent6.3.26/src" -I"D:\Fluent.Inc\fluent6.3.26/cortex/src" -I"D:\Fluent.Inc\fluent6.3.26/client/src" -I"D:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "C:\Users\reza\Desktop\1234.c" Error: udfconfig.h: line 22: parse error. the udf is written below: /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_radiation, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = 0.0552*pow(((2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474),1.5); } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_freestreamtemp, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =(2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474; } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_convection, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =12.1*(-0.0004*pow((t*3600),5)+0.0091*pow((t*3600),4)-0.0906*pow((t*3600),3)+0.4774*pow((t*3600),2)-1.0279*pow((t*3600),1)+1.0073); } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_solarflux, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =0.0085*pow((t*3600),6)+0.3306*pow((t*3600),5)+5.2 103*pow((t*3600),4)-43.001*pow((t*3600),3)+162.66*pow((t*3600),2)-23.449*pow((t*3600),1)+17.905; } end_f_loop(f, thread) } |
|
November 18, 2014, 04:16 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
It works for me. Note that you have omitted something when you go the the next line in the code you have attached. I have corrected it but I don't know what you meant. Check it.
/************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_radiation, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = 0.0552*pow(((2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474),1.5); } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_freestreamtemp, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =(2e-6)*pow((t*3600),6)-0.0001*pow((t*3600),5)+0.0046*pow((t*3600),4)-0.0765*pow((t*3600),3)+0.4478*pow((t*3600),2)+1.03 64*pow((t*3600),1)+7.9474; } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_convection, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =12.1*(-0.0004*pow((t*3600),5)+0.0091*pow((t*3600),4)-0.0906*pow((t*3600),3)+0.4774*pow((t*3600),2)-1.0279*pow((t*3600),1)+1.0073); } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_solarflux, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) =0.0085*pow((t*3600),6)+0.3306*pow((t*3600),5)+5.2 103*pow((t*3600),4)-43.001*pow((t*3600),3)+162.66*pow((t*3600),2)-23.449*pow((t*3600),1)+17.905; } end_f_loop(f, thread) } |
|
|
|