CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   User defined functions (http://www.cfd-online.com/Forums/fluent-udf/113998-user-defined-functions.html)

Sudarshan D Pangavhane March 3, 2013 06:36

User defined functions
 
Kindly help me building a user defined function for following inlet velocity conditions....

"The velocity inlet has a time varying velocity imposed at the start of the solution in the form of a full period sinusoid with an amplitude of 0.05m/s and frequency of 3200Hz. After the sinusoid is complete the velocity remains zero at the inlet for remainder of solution."

evcelica March 7, 2013 09:35

Depends on what software and language you have to use are using:

CFX CEL:
0[m/s] + step((1/3200)-t/1[s])*0.05[m/s]*sin(2*3.14159265*3200*t)

C++:
IF
t <= (1/3200)s
Velocity:=0.05*sin(2*3.14159265*3200*t);
ELSE
Velocity:=0;


All times are GMT -4. The time now is 21:04.