CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Pulsatile profile at inlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2012, 00:37
Default Pulsatile profile at inlet
  #1
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 17
Josyula is on a distinguished road
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.
Josyula is offline   Reply With Quote

Old   March 17, 2012, 11:16
Default
  #2
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
Quote:
Originally Posted by Josyula View Post
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.

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
ComputerGuy is offline   Reply With Quote

Old   April 30, 2012, 09:47
Default
  #3
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 17
Josyula is on a distinguished road
Quote:
Originally Posted by ComputerGuy View Post
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
Hi,

Sorry for the late reply.

How and where do I incorporate the C_CENTROID macro?
Josyula is offline   Reply With Quote

Old   May 1, 2012, 04:54
Default
  #4
Member
 
Daniel Tanner
Join Date: Apr 2009
Posts: 54
Rep Power: 18
Daniel Tanner is on a distinguished road
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];
.....
Daniel Tanner is offline   Reply With Quote

Old   May 6, 2012, 11:09
Default
  #5
New Member
 
Josy
Join Date: Mar 2009
Location: India
Posts: 29
Rep Power: 17
Josyula is on a distinguished road
Quote:
Originally Posted by Daniel Tanner View Post
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];
.....
Thank you Daniel!
Josyula is offline   Reply With Quote

Reply

Tags
parabolic, pulsatile, uniform


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to apply velocity profile at inlet Sam CFX 12 April 1, 2012 07:52
patching velocity profile to the inlet face of domain vasuaero1988 Fluent UDF and Scheme Programming 1 September 29, 2010 04:49
translational periodic BC vs Fully Developed Profile at Inlet Prakash.Paudel FLUENT 1 August 20, 2010 12:01
create logarithmic wind profile for inlet Murat Main CFD Forum 0 December 30, 2003 01:45
inlet velocity profile in Polyflow srinu FLUENT 0 January 16, 2003 21:25


All times are GMT -4. The time now is 03:52.