multiple UDFs
Hi,
I want to have an "initialization" and an "adjust" udf. when I interpret both, the first one is removed from the list. For example my udfs are "my_init" and "my_adjust". First I interpret "my_init". Then I interpret "my_adjust", at this time "my_init" is removed from the list when I want to hook udfs. Any ideas? Thank you |
Are both UDF's embodied in one single c-file? If not put them together.
cheers |
Quote:
Hi! I have a question. You said that both codes should be in the same file. I am using UDF for transient velocity inlet (Y axis) and it is working, so I tried to add second UDF for parabolic velocity profile (steady flow along X axis) but still there is a problem... "Error: udfconfig.h: line 22: parse error." Could somebody tell me how to "put them together" because it is my first time with UDF... This is the code: /************************************************** ********************* vprofile.c UDF for specifying steady-state velocity profile boundary condition ************************************************** **********************/ #include "udf.h" DEFINE_PROFILE(inlet_y_velocity, thread, position) { float x; float y[3]; face_t f; begin_f_loop(f, thread) { F_CENTROID(y,f,thread); x = y[1]; F_PROFILE(f, thread, position) = 0.028 + x*x; } end_f_loop(f, thread) } /************************************************** ******************** unsteady.c UDF for specifying a transient velocity profile boundary condition ************************************************** *********************/ #include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = 1.0*sin(10.*t); } end_f_loop(f, thread) } Thanks a lot. Marcin p.s. Separated codes work normally but together - error :| |
remove the second #include udf.h
mmdmov |
Thank you very much!
It was so simple... Now it works :D Thank you one more time. Marcin |
All times are GMT -4. The time now is 00:06. |