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

conditional CEL function

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

Like Tree1Likes
  • 1 Post By octavyo

Reply
 
LinkBack Thread Tools Display Modes
Old   March 9, 2011, 07:54
Default conditional CEL function
  #1
Member
 
anonymous
Join Date: Jan 2011
Posts: 42
Rep Power: 6
fek66 is on a distinguished road
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.
fek66 is offline   Reply With Quote

Old   March 9, 2011, 08:12
Default
  #2
New Member
 
Join Date: Oct 2010
Posts: 14
Rep Power: 6
octavyo is on a distinguished road
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 likes this.
octavyo is offline   Reply With Quote

Old   March 9, 2011, 09:20
Default
  #3
Member
 
anonymous
Join Date: Jan 2011
Posts: 42
Rep Power: 6
fek66 is on a distinguished road
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) ?
fek66 is offline   Reply With Quote

Old   March 9, 2011, 09:23
Default
  #4
New Member
 
Join Date: Oct 2010
Posts: 14
Rep Power: 6
octavyo is on a distinguished road
Just set the name of the expression as sigma and use it where you need
octavyo is offline   Reply With Quote

Old   March 9, 2011, 09:28
Default
  #5
Member
 
anonymous
Join Date: Jan 2011
Posts: 42
Rep Power: 6
fek66 is on a distinguished road
thanks octavyo
fek66 is offline   Reply With Quote

Old   March 10, 2011, 07:40
Default
  #6
Member
 
anonymous
Join Date: Jan 2011
Posts: 42
Rep Power: 6
fek66 is on a distinguished road
Hi oktavyo ;
need a doc about CEL Function if possible .
fek66 is offline   Reply With Quote

Old   March 10, 2011, 08:25
Default
  #7
New Member
 
Join Date: Oct 2010
Posts: 14
Rep Power: 6
octavyo is on a distinguished road
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.
octavyo is offline   Reply With Quote

Old   March 11, 2011, 12:38
Default
  #8
Member
 
anonymous
Join Date: Jan 2011
Posts: 42
Rep Power: 6
fek66 is on a distinguished road
Hi octavyo ;
I used the conditional expression but it seems not working !
fek66 is offline   Reply With Quote

Old   March 11, 2011, 13:32
Default
  #9
Member
 
anonymous
Join Date: Jan 2011
Posts: 42
Rep Power: 6
fek66 is on a distinguished road
the if function don't found in cfx 11 !
fek66 is offline   Reply With Quote

Old   March 12, 2011, 08:36
Default
  #10
New Member
 
Join Date: Oct 2010
Posts: 14
Rep Power: 6
octavyo is on a distinguished road
If possible, try to use CFX 12
octavyo is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 05:48.