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 : velocity, k and epsilon (radial profile) (https://www.cfd-online.com/Forums/fluent-udf/121010-udf-velocity-k-epsilon-radial-profile.html)

cdiako July 23, 2013 06:02

It's really strange, I have compiled the udf and the compiler tells me this :

udf_final_velocity_check.c: In function ‘some_func’: udf_final_velocity_check.c:6: warning: excess elements in array initializer udf_final_velocity_check.c:6: warning: (near initialization for ‘r0’) udf_final_velocity_check.c:7: warning: excess elements in array initializer udf_final_velocity_check.c:7: warning: (near initialization for ‘v0’) udf_final_velocity_check.c:5: warning: unused variable ‘vel’ udf_final_velocity_check.c: In function ‘inlet_axial_velocity’: udf_final_velocity_check.c:23: warning: unused variable ‘v’ # Linking libudf.so because of makefile user.udf udf_names.c udf_names.o udf_final_velocity_check.o ld -shared -lm udf_names.o udf_final_velocity_check.o -o libudf.so make[3]: warning: Clock skew detected. Your build may be incomplete. make[3]: Leaving directory `/home/cdiakodi/Desktop/Fluent_fran_fran/maillage_pr_fluent/new_2/lnamd64/3d' make[2]: warning: Clock skew detected. Your build may be incomplete. make[2]: Leaving directory `/home/cdiakodi/Desktop/Fluent_fran_fran/maillage_pr_fluent/new_2/lnamd64/3d' make[1]: warning: Clock skew detected. Your build may be incomplete. make[1]: Leaving directory `/home/cdiakodi/Desktop/Fluent_fran_fran/maillage_pr_fluent/new_2/lnamd64/3d'

an idea ?

blackmask July 26, 2013 20:42

It happens if you the array initializer has more elements than the array declared
Code:

int r0[3] = {0, 1, 2, 3};
In the above example "r0" is an integer array of length three while the initializer has four elements. In my post I wrote it as
Code:

int r0[] = {0, 1, 2, 3};
There should be no warning.

cdiako July 29, 2013 04:44

You were right, the UDF works now.

Thank you!

cdiako July 30, 2013 08:29

Just one last question: how can I change the UDF that we have created to add a velocity profile of particles (using DPM)?


All times are GMT -4. The time now is 21:36.