|
[Sponsors] |
Define length parameter by CFX-Pre Expression |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 1, 2016, 03:53 |
Define length parameter by CFX-Pre Expression
|
#1 |
New Member
Join Date: Feb 2016
Posts: 22
Rep Power: 10 |
Hello, I am trying to define the hydraulic diameter for a channel flow by using an expression in CFX-Pre but cannot figure out how to properly implement it. Tried with
maxVal(y)@inlet - minVal(y)@inlet but it resulted in the following error message: ERROR Attempt to evaluate the CEL callback function 'maxVal'. Although it is valid to create an expression that uses such a function, the preprocessor does not support its evaluation. I want to use a general expression and utilize the domain in CFX-Pre somehow. Any suggestions? |
|
February 1, 2016, 04:19 |
|
#2 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
||
February 1, 2016, 04:42 |
|
#3 | |
New Member
Join Date: Feb 2016
Posts: 22
Rep Power: 10 |
Quote:
The function 'maxVal' referenced by parameter 'Normal Speed' in object '/FLOW:Flow Analysis 1/DOMAIN: Default Domain/BOUNDARY:inlet/BOUNDARY CONDITIONS/MASS AND MOMENTUM' has a disallowed argument, 'y'. The solver does not support the use of this variable in this context. |
||
February 1, 2016, 05:51 |
|
#4 |
Member
Join Date: Jan 2016
Posts: 34
Rep Power: 10 |
I think your problem is that you're requesting the maximum value of a singular scalar. So it's kinda pointless in the sense that y is both its min and max value. You're better off defining a line along the vertical edge and then saying maxValue(velocity u)@line for instance.
|
|
February 1, 2016, 06:58 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,701
Rep Power: 143 |
honcho: I do not think that is correct. The original expression is asking for the max and min values of the y nodal locations on the boundary patch labelled inlet. This sounds valid to me. I am confused about the problems Martin is reporting with his expression as I have used very similar expressions to this (max/min values of xyz nodal values on boundary patches) before and have not had any problems with it.
|
|
February 1, 2016, 07:11 |
|
#6 | |
New Member
Join Date: Feb 2016
Posts: 22
Rep Power: 10 |
Quote:
|
||
February 2, 2016, 04:46 |
|
#7 |
New Member
Michael Shives
Join Date: Sep 2013
Posts: 12
Rep Power: 12 |
I've had a similar, frustrating problem. It's a hack solution... but you could try creating an additional variable called "myY" (set to equal "y" using an expression) then use "myY" in your minVal and maxVal functions. ... sometimes cfx just behaves badly....
Also don't worry about the pre-processor not supporting the function... that's just a warning, the real question is whether the solver supports that function (and I think the answer is yes) |
|
February 2, 2016, 06:57 |
|
#8 | |
New Member
Join Date: Feb 2016
Posts: 22
Rep Power: 10 |
Quote:
I tried a bit with your hack solution, but not sure on how to define the "myY"-expression, any suggestions? Now I tried creating the expression "myY" and defining it as y, and also something like y@inlet, but nothing.. |
||
February 8, 2016, 01:55 |
|
#9 |
New Member
Join Date: Feb 2016
Posts: 22
Rep Power: 10 |
So I tried to solve this problem using parameters. I created an expression "Dh" and assigned a value to it. I ran a simulation and in CFD-post I selected "Use as Workbench Input Parameter". In the Parameter Set I changed the definition of Dh from the value "0.005 [m]" to an expression using two other input parameters, so basically
P1 H 5 P2 W 5 P3 Dh 2*(P1*P2)/(P16+P18) But then there's no unit assigned to P3 and Workbench complains about it. P1 and P2 are parameters from my CAD-file, where I have constructed H and W as expressions in the CAD software, imported the geometry to Workbench and enabled the parameters under CAD-parameters in the Mesh module. When P1 and P2 are enabled and appear in my Parameter Set, there is no unit assigned to them so P3 is dimensionless. When I just try to add [mm] after P1 and P2 in P3: P3 Dh 2*(P1[mm]*P2[mm])/(P16[mm]+P18[mm]) Workbench says "Name 'P1_Q' is not defined." in both the Value and Unit box for P3. Rather frustrating. What am I missing or doing wrong? |
|
February 8, 2016, 05:20 |
|
#10 | |
New Member
Join Date: Feb 2016
Posts: 22
Rep Power: 10 |
Quote:
P3 Dh (2*(P16*P18)/(P16+P18))*1[mm]. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Molar fraction in CFX Pre expression | Niekjuh | CFX | 4 | July 14, 2016 19:11 |
Accessing cell values (CFX Pre and CFX Post) | brahmarishiraj | CFX | 14 | June 24, 2014 19:12 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 08:23 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 12:24 |
UDF FOR UNSTEADY TIME STEP | mayur | FLUENT | 3 | August 9, 2006 10:19 |