
[Sponsors] 
December 4, 2012, 18:36 
Question about expression in CFXpost(need help!)

#1 
Senior Member
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 7 
Hi,
I defined some expressions in CFXpre. 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 CFXpost? Is the CFXPost expression language different from CfXPre? Thank you very much!
__________________
Best regards, Meimei 

December 4, 2012, 19:15 

#2 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 388
Rep Power: 7 
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.


December 4, 2012, 19:43 

#3  
Senior Member
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 7 
Quote:
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 

December 4, 2012, 21:22 

#4 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 388
Rep Power: 7 
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. 

December 4, 2012, 21:31 

#5 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 388
Rep Power: 7 
Actually the inconsistent dimensions may be referring to units. It could be confused if you put [pa] instead of [Pa].


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
question about immersed solid in CFX 12.0  Anny  CFX  10  April 6, 2013 21:57 
ICEM to CFX (maybe rookie) question  TheBearJew  ANSYS  4  March 9, 2013 08: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 