# UDF Source Term Units?

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

 October 24, 2005, 08:28 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; }

 October 24, 2005, 09:15 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post johnwinter Fluent UDF and Scheme Programming 0 June 6, 2011 00:53 Ralf Schmidt FLUENT 0 September 21, 2006 11:32 summer FLUENT 0 August 24, 2006 17:44 shekhar FLUENT 0 April 12, 2004 01:43 Greg Perkins FLUENT 0 October 11, 2000 03:43

All times are GMT -4. The time now is 12:42.