CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   step function (http://www.cfd-online.com/Forums/cfx/21560-step-function.html)

John August 27, 2005 23:17

step function
 
Hi,all

Here is an application of step fuction:

C=a*step(-x)

So c=0 when x>0; and c=a when x<0.

However, when x=0, I will get c=0.5a

I want to let c=0 when x=0, how can I do that?

Thanks!

John

Jeff August 28, 2005 00:29

Re: step function
 
The CFX step(x) function gives:

0 when X < 0 0.5 when X = 0 1.0 when X > 0

step(step(x)-0.6) should give

0 when x < 0 {step(-0.6) = 0} 0 when x=0 {step(-0.1) = 0} 1 when x > 0 {step( 0.4) = 1}

Jeff

John August 28, 2005 01:01

Re: step function
 
Great idea, Jeff

Thanks!

John

Graeme October 20, 2005 00:37

Re: Ignore, just a test
 
testing [/b] bold

Graeme October 20, 2005 00:39

Re: Ignore, just a test
 
testing bold not bold [i] italics?


All times are GMT -4. The time now is 09:27.