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

UDF source term

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 8, 2011, 09:05
Default UDF source term
  #1
New Member
 
jerome
Join Date: May 2011
Posts: 4
Rep Power: 6
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, 31 views)
jerome_ is offline   Reply With Quote

Old   July 11, 2011, 03:03
Default
  #2
New Member
 
Kristian Etienne Einarsrud
Join Date: Oct 2010
Location: Trondheim
Posts: 29
Rep Power: 6
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, 11:55
Default
  #3
New Member
 
jerome
Join Date: May 2011
Posts: 4
Rep Power: 6
jerome_ is on a distinguished road
You have right, that's work.

Thanks a lot
jerome_ is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
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 07:20
UDF Source Term Christian FLUENT 4 August 1, 2009 05:53
The source term of UDF summer FLUENT 0 August 24, 2006 17:44
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 13, 2000 23:03
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 03:43


All times are GMT -4. The time now is 05:06.