CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF Source Term Units?

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

LinkBack Thread Tools Display Modes
Old   October 24, 2005, 08:28
Default UDF Source Term Units?
Posts: n/a
I am trying to add a source term through a UDF to the x-momentum equations. I have a simple box with water on bottom/air on top. The source term is just an acceleration term to sway the fluid left/right in the x-direction. My units on the source term are m/s^2 (acceleration): -amplitude * frequency^2 * sin(frequency * time). Do I need to add in the density of the fluids as well? Here is my UDF:

#include "udf.h"

#define period 2.61799

#define amplitude 0.02

DEFINE_SOURCE(cell_x_source, cell, thread, dS, eqn) {

real source;

/* source term */

source =(-1.0*amplitude)*pow((2.0*M_PI/period),2.0)*C_R(cell,thread)*sin((2.0*M_PI/period)*CURRENT_TIME);

/* derivative of source term w.r.t. x-velocity. */

dS[eqn] = 0.0;

return source;

  Reply With Quote

Old   October 24, 2005, 09:15
Default Re: UDF Source Term Units?
Posts: n/a
The source term is correct. It will return a force by volume (N/m^3) which is the unit fluent wants.

Happy swaying

  Reply With Quote


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
source term units - poission equation johnwinter Fluent UDF and Scheme Programming 0 June 6, 2011 00:53
UDF to define source term at every grid point Ralf Schmidt FLUENT 0 September 21, 2006 11:32
The source term of UDF summer FLUENT 0 August 24, 2006 17:44
PDE in udf for defining momentum source term shekhar FLUENT 0 April 12, 2004 01:43
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 02:44.