conditional CEL function

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 9, 2011, 07:54 conditional CEL function #1 Member   anonymous Join Date: Jan 2011 Posts: 42 Rep Power: 7 Hi all ; How can I set a cel function in CfX PRE to make this expression : sigma = 0.5 for z > 1 end sigma = 0 for z<=1 sigma is constant value. thanks.

 March 9, 2011, 08:12 #2 New Member   Join Date: Oct 2010 Posts: 14 Rep Power: 8 CEL supports the conditional if statement using the following syntax: 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. Then for your case, CEL expression is if(z > 1,0.5, 0) amin_gls and mrkmrk like this.

 March 9, 2011, 09:20 #3 Member   anonymous Join Date: Jan 2011 Posts: 42 Rep Power: 7 thanks oktavyo ; but is the condition if(z > 1,0.5, 0) return the true value 0.5? how can I write it sigma = if(z > 1,0.5, 0) ?

 March 9, 2011, 09:23 #4 New Member   Join Date: Oct 2010 Posts: 14 Rep Power: 8 Just set the name of the expression as sigma and use it where you need

 March 9, 2011, 09:28 #5 Member   anonymous Join Date: Jan 2011 Posts: 42 Rep Power: 7 thanks octavyo

 March 10, 2011, 07:40 #6 Member   anonymous Join Date: Jan 2011 Posts: 42 Rep Power: 7 Hi oktavyo ; need a doc about CEL Function if possible .

 March 10, 2011, 08:25 #7 New Member   Join Date: Oct 2010 Posts: 14 Rep Power: 8 I think CFX Help menu is good enough to solve most of problems. Just read the user manuel about CEL. You can also download training document from ansys costumer portal. or search on google.

 March 11, 2011, 12:38 #8 Member   anonymous Join Date: Jan 2011 Posts: 42 Rep Power: 7 Hi octavyo ; I used the conditional expression but it seems not working !

 March 11, 2011, 13:32 #9 Member   anonymous Join Date: Jan 2011 Posts: 42 Rep Power: 7 the if function don't found in cfx 11 !

 March 12, 2011, 08:36 #10 New Member   Join Date: Oct 2010 Posts: 14 Rep Power: 8 If possible, try to use CFX 12

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31 Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42 phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37 skabilan OpenFOAM Installation 3 July 28, 2009 00:35 Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00

All times are GMT -4. The time now is 14:18.