CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

simple CEL expression debuging

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2013, 05:29
Question simple CEL expression debuging
  #1
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Hi

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

'
length = 0.0033 [m]
heat transfer coefficient = 0.1-x*(0.1-0.07)/length [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? I'm really confused. Could anyone help?
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   June 29, 2013, 07:11
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The error message is quite clear. You assigne dthe variable "length" units of [m], but then try to re-assign it units [m s^-1] in the next line. You need to fix this by putting the units against the constants in both equations, do not put units against variables.
ghorrocks is online now   Reply With Quote

Old   June 29, 2013, 08:45
Question
  #3
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
The error message is quite clear. You assigne dthe variable "length" units of [m], but then try to re-assign it units [m s^-1] in the next line. You need to fix this by putting the units against the constants in both equations, do not put units against variables.
I think it means x/length is not dimensionless. x is the coordinate X. Why x/length is not dimensionless?

If it's written in this way:

'
length = 0.0033 [m]
ratio = x/length []
heat transfer coefficient = 0.1-(0.1-0.07)/ratio [m s^-1]
'
,
then the error message will be

'
Error at position 10. Units ([]) are associated with a term that is not dimensionless.
'
.
__________________
Best regards,
Meimei

Last edited by Anna Tian; June 29, 2013 at 11:08.
Anna Tian is offline   Reply With Quote

Old   June 29, 2013, 08:54
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice


You cannot just assign x/length (which is dimensionless) a dimension. Instead multiply it by 1[m/s] to convert it to a velocity. But then you will have to make the 0.1 a velocity as adding a dimensionless number with a velocity is not meaningful either. And finally you appear to be setting a variable which looks like a heat transfer coefficient with a velocity and that does not make sense either.

It's late. I'm going to bed.
ghorrocks is online now   Reply With Quote

Old   June 29, 2013, 08:58
Question
  #5
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 15
Anna Tian is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post


You cannot just assign x/length (which is dimensionless) a dimension. Instead multiply it by 1[m/s] to convert it to a velocity. But then you will have to make the 0.1 a velocity as adding a dimensionless number with a velocity is not meaningful either. And finally you appear to be setting a variable which looks like a heat transfer coefficient with a velocity and that does not make sense either.

It's late. I'm going to bed.
The problem is: x/length is not dimensionless which is quite strange.

If it's written in this way:

'
length = 0.0033 [m]
ratio = x/length []
heat transfer coefficient = 0.1-x*(0.1-0.07)/ratio [m s^-1]
'
,
then the error message will be

'
Error at position 10. Units ([]) are associated with a term that is not dimensionless.
'

Btw, sorry that it does not mean heat transfer coefficient. It is wall function transfer coefficient. I just name it as 'heat transfer coefficient'. You can ignore the name 'heat transfer coefficient'.
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with CEL (guess it's simple to solve) Felggv CFX 22 March 26, 2019 16:42
CFX CEL Expression for Cavitation Modeling kimotbwb CFX 2 March 28, 2018 03:26
CEL simple error naishadh CFX 2 February 22, 2013 02:45
Difference between Junction BOX routine & CEL expression in a 1 way FSI vmlxb6 CFX 1 March 1, 2011 08:50
Creating, loop or iteration using expression edito Jan CFX 3 July 28, 2003 11:01


All times are GMT -4. The time now is 04:54.