CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   What does function step mean? (

Miko June 2, 2003 05:44

What does function step mean?
Hi all! In CFX tutorial 7(Free Surface Flow Over a Bump), before the boundary conditions are created, some values and expressions are needed to be created. I don't know what the function, "step" mean? Can somebody tell me?

matej June 2, 2003 06:02

Re: What does function step mean?
Hi MIko,

It will give you a step profile. If the argument is true, the returned value is 1.0, otwerwise it returns 0.0. Nice for setting for example sharp profiles for the inital conditions, without the need of extra block for it.


Miko June 2, 2003 06:04

Re: What does function step mean?
Oh, thank you matej!

Miko June 2, 2003 06:42

Re: What does function step mean?
Hi matej! Another question is how to judge if it's true or not. For instance, step(0.1)=? step(0)=?

matej June 2, 2003 07:22

Re: What does function step mean?

Let's say You want to have Water.vf. at x=<0,1> as 1.0 and the rest of domain 0.0 so you define:


and you will have the waterVfIni 1 where it should be. just make sure the argument of the step function is dimesionless.


Robin June 2, 2003 14:42

Re: Clarification of STEP function
Hi Miko,

It is not whether it is true or false, rather whether the result is positive or negative. If the expression within the step function is negative, the step function evaluates to 0, if it is postitive, the result is 1. If it is exactly zero, the result is 0.5.


for x < 0, y = 0.0 for x = 0, y =-0.5 for x > 0, y = 1.0

Note that the expression to be evaluated must be dimensionless. To do this, simply divide the argument by it's unit to make it dimensionless.

Regards, Robin

Miko June 2, 2003 20:31

Re: Thank you!
I think I get the satisfied answer. Thank Matej, Robin and all a lot!

Best regards!


bharath April 14, 2009 21:23

Hi miko,
could u explain me where the STEP function used?give me an example plz.

pratikmehta April 15, 2009 09:45

hi ,

First of all step function is nothing but a user defined region of interest. Consider an example, say we are observing a flow in a annulus pipe ( imagine a donut kind of shape ) . In such a case when you want to calculate some quautity of interest like say turbulent kinectic energy on some specified volume region.

so to obtain this necesary volume , step function plays a vital role . For example u specify a expression as userstep= step (Y/1 [mm]) ,then you will get volume region of all that lies in the positive Y axis . You can plot a contour of your step function to see whether the region is the one you wanted or not .

Hence then you could say

(VolInt(turbulent kinectic energy) @ domain1 )*userstep

this will give you the turbulent kinectic energy only in that particular region .

I hope now have got my explanation !!!

best of luck

oewnce932c April 8, 2013 07:07

is also useful for a timestep.
For example i want a timestep until 100 iteration of 0.01sek and after 0.05sek.
it will look like:
timestep=0.01[s] + step(ctstep-100)*0.04[s]

oewnce932c April 9, 2013 05:38

i have just tested with cfx5solve in Expressions.

friend May 27, 2016 13:19

torque in CFX
How can an object around a particular axis torque is achieved?:confused:

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