
[Sponsors] 
August 13, 2002, 14:50 
inlet velocity profiles

#1 
Guest
Posts: n/a

hi,
I want to calculate a swirling pipe flow with a specified inlet velocity profile of the type U_ax=f(r) W_tan=f(r) The profile is not an expression but stored in a file in cylindrical coordinates: r_1 u_1 w_1 r_2 u_2 w_2 etc. The geometry is set up so that that the xaxis is the axis of rotation. So the radius would be calculated as r=sqrt(y^2 + z^2). Now my problem is: Is it sufficient to define a new variable "rad" with CEL so that the solver "knows" that the tabulated values are cylindrical ? Thanks for your comments 

August 14, 2002, 17:07 
Re: inlet velocity profiles

#2 
Guest
Posts: n/a

You will need to define u, v and w velocity components from your radial and axial components. This requires transforming your cylindrical components into Cartesian in CEL. You could do this with 1D interpolation functions and the following:
CEL: EXPRESSIONS: r = sqrt(x^2+y^2) theta = atan(y,x) Vrad = Vradf(r) Vaxial = Vaxialf(r) Vtheta = Vthetaf(r) Ucomp = Vaxial Vcomp = Vradial*cos(theta) + r*Vtheta*sin(theta) Wcomp = Vradial*sin(theta)  r*Vtheta*cos(theta) END END where Vradf, Vaxialf, and Vthetaf are 1D interpolation functions for each of your velocity components. Looks like you might need to split your text files up. Hopefully I got my sin() and cos() correct! 

August 17, 2002, 06:18 
Re: inlet velocity profiles

#3 
Guest
Posts: n/a

Neale,
thanks a lot for your help! Unfortunately I still get the following error message: Error processing expression: U = Ucomp Obviously something is wrong with the boundary condition definition. As you suggested I defined the CEL expressions, declared the functions and defined the junction box routines (which I derived from the CFX documentation for user subroutines). Maybe you can see the mistake in the CCL file below ... ? Best regards and many thanks in advance. 1. EXPRESSIONS: (..) rad = sqrt(z^2+y^2) phi = atan(y,z) Vrad = Vradf(rad) Vaxial = Vaxialf(rad) Vtang = Vtangf(rad) Ucomp = Vaxial Vcomp = Vrad*cos(phi) + rad*Vtang*sin(phi) Wcomp = Vrad*sin(phi)  rad*Vtang*cos(phi) (..) 2. FUNCTIONS: (..) FUNCTION : Vaxial Option = User Function Argument List = [m] Result Units = [m s^1] (..) FUNCTION : Ucomp Option = User Function Argument List = [m s^1] Result Units = [m s^1] (..) 3. USER ROUTINE DEFINITIONS (..) USER ROUTINE : Load Inlet Profiles Option = Junction Box Routine Junction Box Location = User Input Calling Name = user_input_rad Library Name = user_input_rad Library Path = /home/cfxuser/Testcase (..) USER ROUTINE : Vaxial Option = Junction Box Routine Junction Box Location = User Input Calling Name = vaxialf Library Name = user_input_rad Library Path = /home/cfxuser/Testcase (..) 3. BOUNDARY CONDITIONS : (..) MASS AND MOMENTUM : Option = Cartesian Velocity Components U = Ucomp V = Vcomp W = Wcomp END (..) 

August 26, 2002, 14:13 
Re: inlet velocity profiles

#4 
Guest
Posts: n/a

From this I can't tell. Is there any more output in the output file which is more descriptive than what you have?
One thing you should be able to do is set Ucomp = Vaxiaf(rad) directly, rather than through another expression variable. I'm also not sure why you have created a user function called "Ucomp". This should not be necessary. All you should need is to define three user functions: Vradialf, Vaxialf and Vthetaf and set Ucomp, Vcomp and Wcomp accordingly. Maybe this is/was the problem? Neale 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Problem with assigned inlet velocity profile as a boundary condition  Ozgur_  FLUENT  5  August 25, 2015 04:58 
Steady pipe flow mean velocity higher than inlet velocity  anita  OpenFOAM Running, Solving & CFD  7  September 25, 2012 05:35 
FSI Pipe uniform velocity profile inlet  Absy  Main CFD Forum  0  April 6, 2010 03:01 
commit velocity outlet to velocity inlet  chelvistero  OpenFOAM  0  March 27, 2010 04:46 
inlet velocity profiles?  khelila  FLUENT  0  February 6, 2006 11:28 