CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Please check the following code (https://www.cfd-online.com/Forums/fluent/50545-please-check-following-code.html)

Nagi February 12, 2009 09:18

Please check the following code
 
#include "udf.h" #define f 10.0 /*vibration frequency in Hz*****/ #define A 10.0 /*vibration amplitude in m/s^2*****/ #define pi 3.14 DEFINE_SOURCE (x_mom,c,thread,dS,eqn) { real source,t,xaccel; t=CURRENT_TIME; xaccel=A*sin(2*pi*f*t); source=xaccel*C_R(c,thread); dS[eqn]=xaccel; return source; } I need to know if the above code is correct, which desribes the inertial body force due to translational vibration applied in x-dirction. Thanks every body Nagi


All times are GMT -4. The time now is 01:49.