|
[Sponsors] |
July 8, 2011, 10:05 |
UDF source term
|
#1 |
New Member
jerome
Join Date: May 2011
Posts: 4
Rep Power: 15 |
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. |
|
July 11, 2011, 04:03 |
|
#2 |
New Member
Kristian Etienne Einarsrud
Join Date: Oct 2010
Location: Trondheim
Posts: 29
Rep Power: 16 |
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 |
|
July 11, 2011, 12:55 |
|
#3 |
New Member
jerome
Join Date: May 2011
Posts: 4
Rep Power: 15 |
You have right, that's work.
Thanks a lot |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Injection of the source term UDF | stage81 | FLUENT | 0 | September 27, 2010 08:20 |
UDF Source Term | Christian | FLUENT | 4 | August 1, 2009 06:53 |
The source term of UDF | summer | FLUENT | 0 | August 24, 2006 18:44 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 14, 2000 00:03 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 04:43 |