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/)
-   -   UDF for time based variable to calculate velocity (http://www.cfd-online.com/Forums/fluent-udf/111940-udf-time-based-variable-calculate-velocity.html)

longhuandu January 18, 2013 07:40

UDF for time based variable to calculate velocity
 
Hello

I am currently doing a very simple simulation in Fluent by using UDF (CG MOTION)
I define my velocity like:
A=2;
w=2;
V=A*sin(w*time);

But what I plan to do next stage is to change the amplitude (A) from known value to time based value like A=2*time;
But if I write
w=2;
A=2*time;
V=A*sin(w*time);
the UDF can not be compiled by Fluent

can anybody help me

thanks a million

shuai_manlou January 21, 2013 07:38

real t = RP_Get_Real(''flow-time");
have a try ~


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