|
[Sponsors] |
April 1, 2009, 16:36 |
multiple UDFs
|
#1 |
New Member
mmdmov
Join Date: Apr 2009
Posts: 4
Rep Power: 17 |
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 |
|
April 2, 2009, 04:21 |
|
#2 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
Are both UDF's embodied in one single c-file? If not put them together.
cheers |
|
April 21, 2009, 06:58 |
|
#3 | |
New Member
Marcin
Join Date: Apr 2009
Posts: 6
Rep Power: 17 |
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 :| |
||
April 21, 2009, 08:35 |
|
#4 |
New Member
mmdmov
Join Date: Apr 2009
Posts: 4
Rep Power: 17 |
remove the second #include udf.h
mmdmov |
|
April 21, 2009, 08:42 |
|
#5 |
New Member
Marcin
Join Date: Apr 2009
Posts: 6
Rep Power: 17 |
Thank you very much!
It was so simple... Now it works Thank you one more time. Marcin |
|
Tags |
multiple udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unsteady and Flux UDFs for UDSs | tom | FLUENT | 0 | February 13, 2009 11:27 |
multiple UDFs at the same time | bharti | FLUENT | 0 | November 2, 2006 11:45 |
Multiple udfs? | David Harris | FLUENT | 1 | April 23, 2006 03:34 |
Multiple UDFs | Graeme | FLUENT | 4 | August 28, 2004 16:47 |
Experimental Repository for UDFs, Journal Files and Scheme Scripts | Jonas Larsson | FLUENT | 0 | March 5, 2000 16:36 |