|
[Sponsors] |
March 8, 2015, 08:05 |
Error in expression unit
|
#1 |
New Member
Join Date: Mar 2015
Posts: 6
Rep Power: 11 |
Hi,
To create velocity profile at inlet I have used the following expression 15[m/s]*(z/0.3)^(1/7) where 15 is my reference velocity, 0.3 is my reference height and 0.143 is power law exponent and z is height at any point in z direction after plotting I am getting the exact values which I require but with invalid units. the error is as follows: Expression resolves to invalid units ('m^0.143 s^-1') in value set for parameter 'Normal Speed' in object '/FLOW:Flow Analysis 1/DOMAINomain 1/BOUNDARY:inlet/BOUNDARY CONDITIONS/MASS AND MOMENTUM'. Expected units: 'm s^-1'. I am unable to resolve this error. Please shed some light as to what needs to be added or rectified. CCl for reference: # State file created: 2015/03/08 17:16:04 # CFX-14.5 build 2012.09.19-21.47 FLOW: Flow Analysis 1 DOMAIN: Domain 1 BOUNDARY: inlet Boundary Type = INLET Location = INLET BOUNDARY CONDITIONS: FLOW REGIME: Option = Subsonic END MASS AND MOMENTUM: Normal Speed = 15[m/s]*(z/0.3)^(1/7) Option = Normal Speed END TURBULENCE: Option = Medium Intensity and Eddy Viscosity Ratio END END END END END COMMAND FILE: Version = 14.5 END |
|
March 8, 2015, 17:21 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,706
Rep Power: 143 |
You just cancel out the length dimension before you do the exponent:
15[m/s]*(z/0.3[m])^(1/7) This happened because you forgot that your reference length has the units of length (presumably metres). If you included the dimension in your expression it works fine. |
|
March 10, 2015, 05:16 |
|
#3 |
New Member
Join Date: Mar 2015
Posts: 6
Rep Power: 11 |
Hello,
Thank you for responding to my query. I tried the correction you suggested and the expression works fine. However in solver I am getting an error because of the expression. The error is as follows: PROBLEM ENCOUNTERED WHEN EXECUTING CFX EXPRESSION LANGUAGE | | | | The CFX expression language was evaluating: | | Normal Speed | | | | The problem was: | | INVALID-EXPONENTIATION | | | | FURTHER INFORMATION | | | | The problem was encountered in executing the expression for: | | $SCALAR_0 | | The complete expression is: | | 15[m/s]*(z/0.3[m])^0.143 | | The error occurs on sub-expression: | | (z/0.3[m])^0.143 | | | | BACKGROUND INFORMATION | | | | The error was detected at one location. The same problem may be | | present at other locations - that has not been investigated. | | The following values are for the first location which has the | | problem. | | | | In this expression, these sub-expressions have been calculated: | | | | Sub-expression = Value | | | | 15[m/s] = 15.0000 | | These values were set before reaching the current expression: | | | | Name = Expression = Value | | | | z = $LOCAL_z = -6.245005E-17 | | | | END OF DIAGNOSTIC OUTPUT FOR CFX EXPRESSION LANGUAGE I am unable to interpret what exactly is wrong in the subexpression. |
|
March 10, 2015, 05:24 |
|
#4 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
when z is negative the result of your expression (z/0.3[m])^0.143 becomes imaginary, which CFX cannot handle. If you only have positive Z values in your domain I would add an abs() to z.
|
|
March 11, 2015, 04:25 |
|
#5 |
New Member
Join Date: Mar 2015
Posts: 6
Rep Power: 11 |
Hello,
Thank you for explaining about the reasoning behind the error. I tried the expression by including abs(z) and now i am not getting any errors in solver. Thanks and Regards Banu |
|
July 14, 2016, 05:37 |
|
#6 |
Senior Member
Brett
Join Date: May 2013
Posts: 212
Rep Power: 13 |
Hey guys,
I had a similar error: ERROR PROBLEM ENCOUNTERED WHEN EXECUTING CFX EXPRESSION LANGUAGE The CFX expression language was evaluating: Input from CFX-5 The problem was: INVALID-EXPONENTIATION FURTHER INFORMATION The problem was encountered in executing the expression for: HSOut The complete expression is: HIn+cpRef*tIn*((pOut/pIn)^((gamma-1)/gamma)-1) The error occurs on sub-expression: (pOut/pIn)^((gamma-1)/gamma) BACKGROUND INFORMATION In this expression, these sub-expressions have been calculated: Sub-expression = Value cpRef*tIn = 165221. These values were set before reaching the current expression: Name = Expression = Value tIn = massFlowAveAbs(Temperature)= 164.497 pOut = 1 [atm] + massFlowAveAbs(Pr= -50895.4 pIn = 1 [atm] + massFlowAveAbs(Pr= 117734. gamma = 1.40000 cpRef = massFlowAveAbs(Specific Hea= 1004.40 HIn = massFlowAveAbs(Static Entha= -134241. END OF DIAGNOSTIC OUTPUT FOR CFX EXPRESSION LANGUAGE Any thoughts? Brett |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 06:16 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 18:44 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 06:25 |
Lift, Drag Vs time chart,calculations | Jamesd69climber | CFX | 8 | February 17, 2005 17:23 |
Unit of Expression | Fing | CFX | 2 | May 27, 2004 10:17 |