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

UDF for source term in momentum equation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Enrico
  • 1 Post By Bowling

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2004, 05:50
Default UDF for source term in momentum equation
  #1
Enrico
Guest
 
Posts: n/a
Hi all I write a UDF for source term in momentum equation this source term is : A.( du/dx) , where u is the x-component of the velocity ...

please can somebody tell me what is the mistacke I have do in this UDF

DEFINE_SOURCE(xmom_source, c, t, dS, eqn) {

real source;

source = A*C_DUDX(c,t);

return source; }

Chakra likes this.
  Reply With Quote

Old   November 4, 2004, 06:50
Default Re: UDF for source term in momentum equation
  #2
Andrew Garrard
Guest
 
Posts: n/a
you haven't defined A?
  Reply With Quote

Old   November 5, 2004, 04:26
Default Re: UDF for source term in momentum equation
  #3
Sun
Guest
 
Posts: n/a
Not only that you have not defined A, but also you have to add one more statement namely:

dS[eqn]=0;

Good Luck to you. Sun

  Reply With Quote

Old   November 6, 2004, 05:26
Default Re: UDF for source term in momentum equation
  #4
enrico
Guest
 
Posts: n/a
A is a constant
  Reply With Quote

Old   November 9, 2004, 05:27
Default Re: UDF for source term in momentum equation
  #5
Bowling
Guest
 
Posts: n/a
Yes, A is a constant but you must define it. for example; DEFINE_SOURCE(xmom_source, c, t, dS, eqn) { real source; int A; A=22; source = A*C_DUDX(c,t); dS[eqn]=0;

return source; }

"A" can be real or integer. It is up to you.

Hope I can help you. Bowling
  Reply With Quote

Old   November 10, 2004, 07:06
Default Re: UDF for source term in momentum equation
  #6
enrico
Guest
 
Posts: n/a
Hi ,Bowling , but why dS[eqn]=0 ? dS[eqn]=dS/dU
  Reply With Quote

Old   November 12, 2004, 01:58
Default Re: UDF for source term in momentum equation
  #7
Bowling
Guest
 
Posts: n/a
You are misunderstand. dS[eqn] in here means d(source)/d(your parameter) eg. x-momentum, your parameter is U your source is A*(dU/dX), so dS[eqn] is second derivative of dU/dX equal d^2U/dX^2. Diff your source by your parameter.

dS[eqn] is the way to define your source solving. I don't know how to explain. You can read more infomation in fluent document.

Bowling
  Reply With Quote

Old   November 13, 2004, 04:33
Default Re: UDF for source term in momentum equation
  #8
enrico
Guest
 
Posts: n/a
Hi Bowling , should i use UDS for calculating dS[eqn] ?
  Reply With Quote

Old   November 15, 2004, 01:20
Default Re: UDF for source term in momentum equation
  #9
Bowling
Guest
 
Posts: n/a
I don't think so. It is the condition in DEFINE_SOURCE. It is the way to solve in the finite volume method not a scalar.

Bowling
Rashed likes this.
  Reply With Quote

Old   May 30, 2014, 12:34
Default
  #10
Senior Member
 
Join Date: Jan 2012
Posts: 197
Rep Power: 14
itsme_kit is on a distinguished road
how do we know this formula: source = A*C_DUDX(c,t);

I have a equation for velocity gradient: dudz=const

However, I have no idea how to transfer my equation into this kind of form: source = A*C_DUDX(c,t);

Thanks
itsme_kit 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
add source term to energy equation by udf tomas Fluent UDF and Scheme Programming 7 September 10, 2013 03:08
Derivation of Momentum Equation in Integral Form Demonwolf Main CFD Forum 2 October 29, 2009 20:53
UDF Time-dependent term in source Ronnfors FLUENT 0 October 16, 2009 12:25
UDF Source Term Units? Brian FLUENT 1 October 24, 2005 10:15
bouyancy term in epsilon equation Michael Main CFD Forum 1 June 25, 1999 11:20


All times are GMT -4. The time now is 04:08.