UDF source term
1 Attachment(s)
Hi everyone,
I’m a beginner fluent udf user, and i’ve a problem with my code. I just want to create a simple force on a blade. That’s my udf : DEFINE_SOURCE(down_x,c,t,dS,eqn) /*create my Xmomentum force*/ { real source, angle; source=9188.84192; dS[eqn]=0; return source; } DEFINE_SOURCE(down_y,c,t,dS,eqn) /*create my Ymomentum force*/ { real source, angle; source=5305.16475; dS[eqn]=0; return source; } I obtain the picure 1. So it’s ok because it’s was i expected. But now, if i put this udf : DEFINE_SOURCE(down_x,c,t,dS,eqn) /*create my Xmomentum force*/ { real source, angle; source=10610.3295*0,866025404; dS[eqn]=0; return source; } DEFINE_SOURCE(down_y,c,t,dS,eqn) /*create my Ymomentum force*/ { real source, angle; source=10610.3295*0.5; dS[eqn]=0; return source; } I obtain the picture 2, which is very different from the picture 1. But I don’t understand why, because the source term in the both udf are the same (10610.3295*0,866025404=9188.84192 and 5305.16475=10610.3295*0.5) Anyone have an idea on this problem ? Thanks you Jerome Nb :I work with the k-epsilon model. |
Hi,
The problem is in your new "down_x" source-macro. Here you have written source = 10610.3295*0,866025404; while it should read source = 10610.3295*0.866025404; Note the difference between "," and "." . Good luck! -KE |
You have right, that's work.
Thanks a lot |
All times are GMT -4. The time now is 15:15. |