CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF source term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2011, 10:05
Default UDF source term
  #1
New Member
 
jerome
Join Date: May 2011
Posts: 4
Rep Power: 15
jerome_ is on a distinguished road
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.
Attached Files
File Type: doc Udf.doc (84.5 KB, 34 views)
jerome_ is offline   Reply With Quote

Old   July 11, 2011, 04:03
Default
  #2
New Member
 
Kristian Etienne Einarsrud
Join Date: Oct 2010
Location: Trondheim
Posts: 29
Rep Power: 16
KristianEtienne is on a distinguished road
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
KristianEtienne is offline   Reply With Quote

Old   July 11, 2011, 12:55
Default
  #3
New Member
 
jerome
Join Date: May 2011
Posts: 4
Rep Power: 15
jerome_ is on a distinguished road
You have right, that's work.

Thanks a lot
jerome_ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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