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

Prescribing Fully Developed Flow as an Inlet in the Aorta

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2016, 08:44
Default Prescribing Fully Developed Flow as an Inlet in the Aorta
  #1
New Member
 
Thiran Dhinakaran
Join Date: Apr 2016
Location: London
Posts: 4
Rep Power: 10
T_Dinky is on a distinguished road
Dear users,

I am using Fluent V16.2 to carry out blood flow simulations in a model of the thoracic aorta with two inlets, one is the aortic valve and the other is an inflow cannula from a left ventricle assist device (LVAD).

At the moment I am trying to prescribe a fully developed velocity profile across both of these inlets, but I'm having quite a bit of trouble.

From what I understand the only way to achieve this in Fluent it by using a compiled user defined function (UDF). I've read up on how to do this but I still don't have a clue on how to proceed.

Any help or advice would be much appreciated!
T_Dinky is offline   Reply With Quote

Old   April 4, 2016, 18:06
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Use the DEFINE_PROFILE macro and you can either use an equation (if one exists for your inlet velocity, probably some sinusoidal time-dependent function of Poiseuille flow) or read values from a data file.
`e` is offline   Reply With Quote

Old   April 5, 2016, 10:50
Default
  #3
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Well first you need to have a velocity profile, use a profile from some paper or generate your own. Then, assuming you already know the velocity profile.

Look into prescribing a velocity profile using a PROFILE. There's a Fluent tutorial on how to do this if you need step by step instructions. I think it's much simpler than UDF and does exactly what you're trying to do.
LuckyTran is offline   Reply With Quote

Old   April 6, 2016, 09:03
Default
  #4
New Member
 
Thiran Dhinakaran
Join Date: Apr 2016
Location: London
Posts: 4
Rep Power: 10
T_Dinky is on a distinguished road
Dear Lucky and e,

I have looked up how to define a profile and I think I have two options:

1. Create a simple 3D pipe with the same geometry and boundary conditions as my inlets. Then extract the velocity profile where it becomes fully developed using a plane surface and the "write profile" function.

2. Define the inlet profile using the equation Ux=UMax[1-(y^2+z^2)^0.5/r^2], which defines a 3D parabolic velocity profile using a UDF.

Option 1 seems easier, but would it work?
T_Dinky is offline   Reply With Quote

Old   April 6, 2016, 09:41
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by T_Dinky View Post
Dear Lucky and e,

I have looked up how to define a profile and I think I have two options:

1. Create a simple 3D pipe with the same geometry and boundary conditions as my inlets. Then extract the velocity profile where it becomes fully developed using a plane surface and the "write profile" function.

2. Define the inlet profile using the equation Ux=UMax[1-(y^2+z^2)^0.5/r^2], which defines a 3D parabolic velocity profile using a UDF.

Option 1 seems easier, but would it work?
2 is actually not as good an idea as it would seem because the analytical solution is not discretized and will be inconsistent with your grid. Also, this solution is for the canonical fully developed flow in a pipe with constant properties. Is that appropriate for your blood flow problem?

1 normally works and is much better. The problem is you need to make sure that you get the right profile with 1. For example, periodic BC's can only be used for constant property flows. To get fully developed flow without using periodic BC's requires very long lengths. This computational expense might not be something you want to waste, considering you're only doing this to get an inlet profile. And, this method is best when your grids are the same so that the profile is perfectly mapping the solution without any interpolation. If the grids are the same then the solution that you map over will be consistent with your discretization schemes and satisfy the mass & momentum balances. If the grids are not the same, then the solution will be inconsistent when it is mapped over, and then this method has the same problem as method 2.
LuckyTran is offline   Reply With Quote

Old   April 6, 2016, 10:10
Default
  #6
New Member
 
Thiran Dhinakaran
Join Date: Apr 2016
Location: London
Posts: 4
Rep Power: 10
T_Dinky is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
2 is actually not as good an idea as it would seem because the analytical solution is not discretized and will be inconsistent with your grid. Also, this solution is for the canonical fully developed flow in a pipe with constant properties. Is that appropriate for your blood flow problem?

1 normally works and is much better. The problem is you need to make sure that you get the right profile with 1. For example, periodic BC's can only be used for constant property flows. To get fully developed flow without using periodic BC's requires very long lengths. This computational expense might not be something you want to waste, considering you're only doing this to get an inlet profile. And, this method is best when your grids are the same so that the profile is perfectly mapping the solution without any interpolation. If the grids are the same then the solution that you map over will be consistent with your discretization schemes and satisfy the mass & momentum balances. If the grids are not the same, then the solution will be inconsistent when it is mapped over, and then this method has the same problem as method 2.
Lucky,

Thank you for your feedback. Per your recommendation I'll most likely go with option 2.

Thank you and 'e' for your help with this. It's greatly appreciated
T_Dinky is offline   Reply With Quote

Old   April 6, 2016, 12:47
Default
  #7
New Member
 
Thiran Dhinakaran
Join Date: Apr 2016
Location: London
Posts: 4
Rep Power: 10
T_Dinky is on a distinguished road
As it turns out you were right Lucky, option 2 requires incredibly long pipes in order for the velocity profile to fully develop.

So I've tried my hand at a UDF based on the equation:

Ux=UMax[1-(y^2+z^2)^0.5/r^2]

This is the code I've written up, I'd greatly appreciate anyone checking over it (I'm no expert). The code was originally from another Thread in the Forums, but I've changed things round to suit my needs (I think).

#include "udf.h"

#define PIPE_DIAMETER 12.e-3 //Defining the pipe diameter in meters

#define VELOCITY ??. //Defining the maximum velocity in m/s

DEFINE_PROFILE(paraboloid_velocity, thread, position) { real x[ND_ND];

real r,v_max;

face_t f;

r=PIPE_DIAMETER/2.; //Calculating Pipe radius

v_max=VELOCITY; //Defining the maximum velocity

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

F_PROFILE(F, thread, position)=v_max(1.-(pow(pow(x[0],2.)+pow(x[1],2.)),0.5)/pow(r,2.));

} end_F_loop(f, thread) }

I've not defined a initial velocity yet. Additionally, for some background info my inlet lies in the Z axis at the origin of both X and Y.

Thanks again!
T_Dinky is offline   Reply With Quote

Old   April 15, 2016, 07:37
Default
  #8
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Have you tried using this UDF and compared it against a fully developed pipe flow profile? I also use this approach for generating inlet velocity profiles for fully developed flows where an analytical solution exists. As LuckyTran has said, this analytical equation is not discretised for your mesh (consider a coarse mesh; the defined profile is either over- or under-predicting the true flow). Ensure you have performed a mesh independence study (as normal) to mitigate this problem.
`e` is offline   Reply With Quote

Reply

Tags
aorta, fluent, udf, velocity profile


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
initial condition for fully developed flow kmgraju CFX 3 August 6, 2010 06:57
Fully developed flow ,CEL expression kmgraju CFX 0 August 6, 2010 05:15
How to specify an inlet boundary conditions for a fully developed gas flow in a duct. legendyxg FLUENT 2 May 11, 2010 08:32
BC for fully developed turbulent flow in a pipe mmd014 FLUENT 2 May 22, 2009 07:50
Writing an expression for fully developed flow! Usman CFX 12 December 20, 2007 12:26


All times are GMT -4. The time now is 00:35.