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

Question about expression in CFX-post(need help!)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2012, 17:36
Question Question about expression in CFX-post(need help!)
  #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 defined some expressions in CFX-pre. After running the simulation, I open the result file(.res file) in CFX post, then press the button 'Apply'(like 'figure1' in the attachment) , an error message window jumps out.('figure2' in the attachment).

I look for the solution of this error in the tutorial, but do not find any helpful answer. I try to define some new expressions , but always have this error message no matter how do I change the unit.

May I ask how to solve this problem? How to write correct expression in CFX-post? Is the CFX-Post expression language different from CfX-Pre?

Thank you very much!
Attached Images
File Type: jpg figure1.jpg (12.7 KB, 22 views)
File Type: jpg figure2.jpg (12.2 KB, 19 views)
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   December 4, 2012, 18:15
Default
  #2
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
What is the expression giving the error? It seems pretty clear there is a problem with units. It's saying you are trying to subtract a dimensionless quantity from a quantity with units of metres. It can't be the expression posted in your first image that is giving the error.
cdegroot is offline   Reply With Quote

Old   December 4, 2012, 18:43
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 cdegroot View Post
What is the expression giving the error? It seems pretty clear there is a problem with units. It's saying you are trying to subtract a dimensionless quantity from a quantity with units of metres. It can't be the expression posted in your first image that is giving the error.

Another question

why

'if( -10 [m]< z && z <10 [m], Pressure, 0 [pa] )' gives error message

'ERROR: Error in 'if' statement at position 1. The 'true' and 'false' expressions have inconsistent dimensions.'?

Their units are [pa].
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Old   December 4, 2012, 20:22
Default
  #4
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
The correct syntax for CEL if statements is:

if( cond_expr, true_expr, false_expr )

where:
cond_expr: is the logical expression used as the conditional test
true_expr: is the mathematical expression used to determine the result if the conditional test is true.
false_expr : is the mathematical expression used to determine the result if the conditional test is false.

I think the problem is that Pressure is a variable so it probably doesn't know where to evaluate it at. Just saying Pressure probably returns multiple values whereas 0 [Pa] is just one value.
cdegroot is offline   Reply With Quote

Old   December 4, 2012, 20:31
Default
  #5
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
Actually the inconsistent dimensions may be referring to units. It could be confused if you put [pa] instead of [Pa].
cdegroot 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
question about immersed solid in CFX 12.0 Anny CFX 11 October 4, 2016 04:22
ICEM to CFX (maybe rookie) question TheBearJew ANSYS 4 March 9, 2013 07:00
"do loop" in cfx expression sajad_abasi CFX 5 August 3, 2011 18:39
simple question about ICEM CFX sleepinglily CFX 0 October 27, 2004 13:15
Question about meshing / solution scheme of CFX Coriolius CFX 8 August 1, 2004 18:39


All times are GMT -4. The time now is 08:56.