Pulsatile profile at inlet
Hi,
I am trying to superimpose a pulsatile (sinusoidal) profile on an existing parabolic profile, at the inlet of a rectangular microchannel, whose hydraulic diameter is 77.1 micron. I have written a UDF for the same and which is shown below: #include "udf.h" #include "math.h" DEFINE_PROFILE (unsteady_velocity,thread,position) { real x[ND_ND]; real y; real Par; face_t f; real t = CURRENT_TIME; begin_f_loop (f,thread) { y = x[1]; Par = 0.0122*(1-((y*y)/(38.55e-06*38.55e-06))); /* Parabolic profile where r = 38.55e-06*/ F_PROFILE (f,thread,position) = Par+(0.5*sin(2*3.141592654*1.333*t)); /*Parabolic + Pulsatile profile (Asin(2*pi*freq*t))*/ } end_f_loop (f,thread) } After interpreting and hooking the profile to the inlet, I am getting a uniform profile at the inlet instead of a pulsatile profile, even after a very long timestep. Can anyone tell me what could be the problem with the UDF? Thanks. |
Quote:
Sure -- you're not ever assigning a value to the x-array (you should use C_CENTROID), and thus it is always returning its default value. ComputerGuy |
Quote:
Sorry for the late reply. How and where do I incorporate the C_CENTROID macro? |
Try putting it in here, otherwise the you have not set x so y=x[1] will not give the required answer.
begin_f_loop (f,thread) { F_CENTROID(x,f,thread); y=x[1]; ..... |
Quote:
|
All times are GMT -4. The time now is 16:16. |