Can not to interpret UDF
Hallo,
I have a problem with interpreting my UDF. The UDF defunes unsteady boundary conditions and looks as #include "udf.h" DEFINE_PROFILE(unsteady_mass_flow, thread, position) { double fact=1.E-06; double S=1.5E-03; double t, mass_flow; face_t f; t=RP_Get_Real("flow-time"); mass_flow=fact*57.6975*sin(6.2832*t); begin_f_loop(f, thread) { F_PROFILE(f, thread, position)=mass_flow; } end_f_loop(f, thread) } Fluent reports the following error: cpp -I"C:\Fluent.Inc\fluent6.3.26/src" -I"C:\Fluent.Inc\fluent6.3.26/cortex/src" -I"C:\Fluent.Inc\fluent6.3.26/client/src" -I"C:\Fluent.Inc\fluent6.3.26/multiport/src" -I. -DUDFCONFIG_H="<udfconfig.h>" "D:\Fluent data\Mask_test\Simulation\mfsin.c" Error: D:\Fluent data\Mask_test\Simulation\mfsin.c: line 1: parse error. What can it be?? Thank you. |
Quote:
i have interpreted it in my computer,no error。。。。。。。。。 |
First thing, it is better to compile it.
Second thing, use real in place of float and double. There is no error with your UDF. Just use compiled one and it will work |
What is an advantage to use real instead of double?
The problem with the UDF was that FLUENT could not read file from WordPad. After I had used Notepad++ everything was ok. Thank you for your replies. |
Quote:
Hope this helps you! |
All times are GMT -4. The time now is 02:48. |