CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   CEL expression in CFX-pre (http://www.cfd-online.com/Forums/cfx/120061-cel-expression-cfx-pre.html)

 Anna Tian June 29, 2013 14:17

CEL expression in CFX-pre

Hi

I'd like to define a position dependent variable by:

'
length = 0.0033 [m]
a = 0.1-x/length*(0.1-0.07) [m s^-1]
'
.

But the error message is

'
Units ([m s^-1]) are associated with a term that is not dimensionless.
'

It is quite strange because the unit of 'x' is [m], right? So 'x/length' should be already dimensionless. Why it is still reported as 'not dimensionless'? I'm really confused. Could anyone help?

 cdegroot June 29, 2013 15:02

You need to put dimensions on the first 0.1 as well. I would also put the units on the second 0.1 and the 0.07 separately. I've never tried factoring out the units like you did there but I'm not so sure it is valid. I would write as

a = 0.1 [m s^-1] -x/length*(0.1 [m s^-1]-0.07 [m s^-1])

Or better yet, factor the 0.1 and 0.07 into their own variables.

 All times are GMT -4. The time now is 10:33.