- **CFX**
(*http://www.cfd-online.com/Forums/cfx/*)

- - **inlet velocity profiles
**
(*http://www.cfd-online.com/Forums/cfx/19120-inlet-velocity-profiles.html*)

inlet velocity profiles
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 x-axis 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 |

Re: inlet velocity profiles
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! |

Re: inlet velocity profiles
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 (..) |

Re: inlet velocity profiles
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 |

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