|
[Sponsors] |
January 27, 2015, 09:25 |
Question about CEL-problem
|
#1 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
Hello guys,
i'm trying to simulate the current around a cylinder with a one phase fluid model. After that i want to simulate entrainment with a mesh deformation model. First i want to integrate a velocity-profil for the z-coordinate. Therefore i looked for some equations, which i wrote down in a ccl-file: # Expressions for Velocity Profile LIBRARY : CEL : EXPRESSIONS : dsand = 0.0005 [m] constkarman = 0.41 usurface = 1.0 [m s^-1] waterdepth = maxVal(z)@Einlass zzero = dsand/12 ustarlet = constkarman*usurface/(log10(waterdepth/zzero)) uz = (ustarlet/constkarman)*log10(z/zzero) END END END The elementary problem for me is to get the maximum value for the z-coordinate, which represents the waterdepth or the height of geometry. I tried to use the function maxVal as you can see above and got following error: The function 'maxVal' referenced in parameter 'U' in object '/FLOW:Flow Analysis 1/DOMAIN:Steady Flow Water/BOUNDARY:Einlass/BOUNDARY CONDITIONS/MASS AND MOMENTUM' has a disallowed argument, 'z'. The solver does not support the use of this variable in this context. Is there a correct method to get a value, a min or max value for a coordinate (x,y,z) from a boundary, surface, curve or face??? Thanks, hope you can help me for my work. best regards flashi |
|
January 27, 2015, 09:41 |
zglobal
|
#2 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
I found out that waterdepth = zGlobal could work for my issue.
|
|
January 27, 2015, 10:20 |
Length of a Polyline
|
#3 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
The next problem for me has appeared
I want to calculate the velocity which depends on the z-coordinate -> u(z) so for my equation uz = (ustarlet/constkarman)*log10(z/zzero) i have to find a expression in cfx to get my z-value, for example 0 to 10 m. Can anyone help here? I would suggest an areaAve(Mesh Z Coordinate)@inlet code, but it doesnt work. thanks flashi |
|
January 27, 2015, 12:26 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,869
Rep Power: 33 |
I am not sure how you find out what the variable names are, but you can either read the documentation for the proper variable names, or right click when you are typing an expression and pop-up will display what is available to use for CEL expressions, i.e. function names, variable names, constant names, etc.
As you noticed before, x/y/z cannot be used within the argument of the CEL expression calculator functions when using ANSYS CFX Solver. They seem to work when using CFD-Post though. You can use either x/y/zGlobal, or create an additional variable and copy the spatial coordinate you need into it, i.e. MyZ = z, then use areaAve(MyZ)@inlet. For profiles, you should be able to say uz = 2 * z to create a linear profile without any issues. |
|
January 28, 2015, 02:45 |
|
#5 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
Thanks alot, that makes sense.
I'll tried it that way and get an error: MyZ = z constkarman = 0.41 dsand = 0.0005 [m] ustarlet = constkarman*usurface/(log10(waterdepth/zzero)) usurface = 1.0 [m s^-1] waterdepth = zGlobal zzero = dsand/12 znormal = areaAve(MyZ)@inlet uz = (ustarlet/constkarman)*log10(znormal/zzero) so i defined MyZ = z without a calculator function. If i understand you correctly, i have to determine MyZ with the areaAve function in an equation or separately as i did it with my variable znormal. Following error appears now: The function 'areaAve' referenced in parameter 'U' in object '/FLOW:Flow Analysis 1/DOMAIN:Steady Flow Water/BOUNDARY:INLET/BOUNDARY CONDITIONS/MASS AND MOMENTUM' has an invalid argument, 'MyZ'. Only arguments that consist of a single recognised variable name are supported by the solver. so the areaAve function can only handle the variables which i can integrate per right click? Thought it could be the name MyZ, which has 2 variables y and z, but it doesnt help to change the name. uz = (ustarlet/constkarman)*log10(MyZ/zzero) and the definition of z and zglobal gave me a plot with the speed u(z) in the expression window. this seems to work then. I hope ansys will take the velocity profile data for my simulation then and not only for my plot. I wonder because it gave me that plot, but when i want to see the boundary velocity contour in the presentation window, it doesnt work for it. when i use a linear function, i.e. uz = 2*z it is displayed as a contour. I would appreciate your help or others help again Thanks Flashi |
|
January 28, 2015, 10:21 |
|
#6 |
Senior Member
Join Date: Jun 2009
Posts: 1,869
Rep Power: 33 |
You added another expression, not an "ADDITIONAL VARIABLE" in CFX speak. Look in the toolbar for the "x" button in italics. For details, read the documentation on how additional variables work.
|
|
January 29, 2015, 03:57 |
|
#7 |
New Member
Andreas
Join Date: Dec 2014
Posts: 16
Rep Power: 11 |
thanks for that.
solved the problem and got the specific velocity profil worked for pre and solver. Flashi |
|
Tags |
ansys, cel, cfx, coordinate, scour |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
Question regarding Fluent's Turbulent Pipe Flow Problem | clueless | Main CFD Forum | 0 | May 15, 2009 04:59 |
Question for B.C of 1-D piston problem | Yoo | Main CFD Forum | 0 | February 19, 2006 10:49 |
question on bounday layer modeling | Wen Long | Main CFD Forum | 2 | November 12, 2005 18:29 |
Question concerning about unsteady problem.... | ghlee | Main CFD Forum | 6 | October 2, 1998 06:36 |