CEL expression

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

 June 29, 2009, 12:49 CEL expression #1 Member   jaikrishna Join Date: Mar 2009 Location: chennai Posts: 56 Rep Power: 8 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....

 June 29, 2009, 18:13 #2 Member     Rui Igreja Join Date: Mar 2009 Location: Aveiro Posts: 68 Blog Entries: 1 Rep Power: 8 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

June 30, 2009, 09:36
#3
Member

Join Date: Mar 2009
Posts: 48
Rep Power: 8
Quote:
 Originally Posted by jai 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)

 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 Juan Maria Campos CFX 2 December 3, 2007 08:52 CC CFX 1 October 3, 2007 09:06 Selim CFX 6 June 14, 2007 10:51 Jamesd69climber CFX 8 February 17, 2005 18:23 Henry CFX 2 August 7, 2004 12:16

All times are GMT -4. The time now is 19:51.