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

urgent: velocity inlet profile when pipe is 40% fill

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2009, 05:07
Default urgent: velocity inlet profile when pipe is 40% fill
  #1
Member
 
shubham
Join Date: Mar 2009
Posts: 48
Rep Power: 17
shubham208011 is on a distinguished road
hi all...
is there any mistake in my udf...
#include "udf.h"
#define ufull 0.3000000 /* full flow velocity*/
DEFINE_PROFILE(inlet_z_velocity,thread,index)
{
face_t f;
real z[ND_ND];
begin_f_loop(f,thread)
{
F_CENTROID(z,f,thread);
if(z[1] > 0.0248) /* upper half of he domain (0.0248 <= y <= .062)*/
{
F_PROFILE(f,thread,index) = 0;
}
else /* lower half of the domain ( 0 <= y <= 0.0248)*/
{
F_PROFILE(f,thread,index) = 2.166290476*ufull*(pow((z[1]/.0248),(1/7)));
}
}
end_f_loop(f,thread)
}

please help me out....
shubham208011 is offline   Reply With Quote

Old   March 24, 2009, 07:33
Default
  #2
Member
 
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17
HenrikS is on a distinguished road
What problems do you have? Compiling? Running? Any error messages? :-)

In general, I think you should use real variables to avoid casting into integer. That is, change "(1/7)" to "(1.0/7.0)" and " = 0;" to "= 0.0;", although I don't know if that is the problem here.

/Henrik
HenrikS is offline   Reply With Quote

Old   March 24, 2009, 07:56
Default
  #3
Member
 
shubham
Join Date: Mar 2009
Posts: 48
Rep Power: 17
shubham208011 is on a distinguished road
Thanks hanrik..
I am using the vof model and at the inlet the the pipe is just 40% full (something like open channel flow). so, for defining the velocity proflie for this i wrote this udf and assume "above 0.4 time of pipe dia velocity of the mixture is zero and below it is function of y" and assume "in mixture vof of water is 1".
when i hook this udf and start the iteration the continuty eq. didn't converge and then i see the velocity at the inlet what i found is zero velocity at every section of inlet means from this udf fluent just read zero velocity at the inlet...
I dont know where i am wrong...
please help me if i am doing or assuming anything wrong..
shubham208011 is offline   Reply With Quote

Old   March 24, 2009, 08:33
Default
  #4
Member
 
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17
HenrikS is on a distinguished road
Have you made the changes I suggested? (Making all numbers real instead of integers)

I tried your code and this makes a difference (as it is written in your first post, it does not calculate things correctly).

Try this and see if the problem persists.

/Henrik
HenrikS is offline   Reply With Quote

Old   March 24, 2009, 09:48
Default
  #5
Member
 
shubham
Join Date: Mar 2009
Posts: 48
Rep Power: 17
shubham208011 is on a distinguished road
hi hanriks..
it still shows no value for velocity...
one more thing my model is a 3d one with hight in y direction and z is perpendicular to the plane in xy palne and the fluid enters from the z direction towards the palne...
plz help me out..where i m making the mistake
shubham208011 is offline   Reply With Quote

Old   March 24, 2009, 11:33
Default
  #6
Member
 
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17
HenrikS is on a distinguished road
Given the change I suggested, there is no mistake in the UDF. I tested it and it works.

Maybe your mesh is different from what you think? Make sure you have no negative Y-coordinates, for example (that Y is really bound by 0.0 and 0.062 at the inlet). Also make sure you are hooking it to the Z-component of velocity and not the velocity magnitude etc...
HenrikS is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 13:14
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 12:21
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31


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