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

CEL expression

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2009, 13:49
Default CEL expression
  #1
jai
Member
 
jaikrishna
Join Date: Mar 2009
Location: chennai
Posts: 56
Rep Power: 17
jai is on a distinguished road
below is my expression:
0.5 [kg s^-1]*step (1-t/1[s])*step (t/1[s]-2)

from 0 to 1 sec mass flow rate is 0.5kg/s and then 1-2sec mass flow rate is 0kg/s and then it is 0.5kg/s

i want to create expression for this condition:
0-1 sec = 0.5kg/s
1-2 sec = 0kg/s
2-3sec = 0.5kg/s
and so on....
jai is offline   Reply With Quote

Old   June 29, 2009, 19:13
Default
  #2
Rui
Member
 
Rui's Avatar
 
Rui Igreja
Join Date: Mar 2009
Location: Aveiro
Posts: 68
Blog Entries: 1
Rep Power: 17
Rui is on a distinguished road
0.5 [kg s^-1]*step (sin(pi*t/1 [s]))

I haven't used CFX12, so don't know if it's also possible to define this with the 'conditional functions' in CEL.


By the way, with your above expression, the flow is always zero
__________________
Rui
Rui is offline   Reply With Quote

Old   June 30, 2009, 10:36
Default
  #3
Member
 
Join Date: Mar 2009
Posts: 49
Rep Power: 17
John is on a distinguished road
Quote:
Originally Posted by jai View Post
below is my expression:
0.5 [kg s^-1]*step (1-t/1[s])*step (t/1[s]-2)

from 0 to 1 sec mass flow rate is 0.5kg/s and then 1-2sec mass flow rate is 0kg/s and then it is 0.5kg/s

i want to create expression for this condition:
0-1 sec = 0.5kg/s
1-2 sec = 0kg/s
2-3sec = 0.5kg/s
and so on....
Try the following formula...

If x<a, then V1
If a<=x<b, V2
If b<=x<c, V3
If x>c, V4

Celfunction=V1*step(0.5-step( x/a ))+V2*step(step( x/a )-0.4)*step(0.5-step( x/b ))+V3*step(step( x/b )-0.4)*step(0.5-step( x/c ))+V4*step(step( x/c )-0.6)
John 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
Help to create a CEL Expression Juan Maria Campos CFX 2 December 3, 2007 08:52
Casson CEL expression CC CFX 1 October 3, 2007 10:06
CEL expression Selim CFX 6 June 14, 2007 11:51
Lift, Drag Vs time chart,calculations Jamesd69climber CFX 8 February 17, 2005 18:23
CEL expression Henry CFX 2 August 7, 2004 13:16


All times are GMT -4. The time now is 07:26.