|February 23, 2015, 03:07||
Join Date: Feb 2015
Posts: 1Rep Power: 0
i want to give some velocity(which is non zero at t=0,t=10,t=20..likewise other wise it's zero ) as a input in inlet boundary condition . Would you guys please have a look on my code ...one more doubt can we use int function in "udf.h"
DEFINE_PROFILE(inlet_z_velocity, thread, position)
/*float X; */
t= RP_Get_Real("flow time");
/*t_step = RP_Get_Real("Physical-time-step"); */
/*tup =((t-(t%X))/X); */
t1 = (t/100);
t2 = (t/100.0)-t1;
t3 = t2*10;
if((t3==2) || (t3==4) || (t3==6) || (t3==8)|| (t3==0))
F_PROFILE(f, thread, position) = 0.0007967;
F_PROFILE(f, thread, position)= 0;
|February 23, 2015, 10:04||
Join Date: Nov 2013
Posts: 891Rep Power: 12
Before you can make your code, your problem definition should be clear. Right now, it contains a mistake.
"i want to give some velocity(which is non zero at t=0,t=10,t=20..likewise other wise it's zero )"
If I read this literally, the velocity should be non-zero only when the time is exactly a multiple of 10 seconds. So for example:
t=9 seconds: v=0
t=9.9 seconds: v=0
t=9.99 seconds: v=0
t=9.99999 seconds: v=0
t=9.999999999999 seconds: v=0
t=9.9999999999999999999999 seconds: v=0
t=10 seconds: v=100
t=10.000000000000000000001 seconds: v=0
and so on.
Although there is nothing wrong mathematically with this, physically it makes no sense to define it in this way. The velocity is non-zero for an infinitesimally small time, so effectively it will have the same effect as saying v=0 always. That is probably not what you want, otherwise you would have said that. What do you want?
|Thread||Thread Starter||Forum||Replies||Last Post|
|WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF||acasas||CFD Freelancers||1||January 23, 2015 08:26|
|Source Term UDF VS Porous Media Model||pchoopanya||Fluent UDF and Scheme Programming||1||August 28, 2013 06:12|
|UDF parallel error: chip-exec: function not found?????||shankara.2||Fluent UDF and Scheme Programming||1||January 16, 2012 23:14|
|How to add a UDF to a compiled UDF library||kim||FLUENT||3||October 26, 2011 21:38|
|Dynamic Mesh UDF||Qureshi||FLUENT||1||December 2, 2009 01:27|