|
[Sponsors] |
October 24, 2005, 09:28 |
UDF Source Term Units?
|
#1 |
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, 10:15 |
Re: UDF Source Term Units?
|
#2 |
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 |
|
|
|
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 |