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

UDF Source Term Units?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2005, 09:28
Default UDF Source Term Units?
  #1
Brian
Guest
 
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, 10:15
Default Re: UDF Source Term Units?
  #2
RoM
Guest
 
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

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