CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   What does function step mean? (https://www.cfd-online.com/Forums/cfx/19663-what-does-function-step-mean.html)

Miko June 2, 2003 06: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 07: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.

matej

Miko June 2, 2003 07:04

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

Miko June 2, 2003 07: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 08:22

Re: What does function step mean?
 
OK,

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:

waterVfIni=step(1-x/1[m])

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

matej

Robin June 2, 2003 15: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.

step(x)=y

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 21:31

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

Best regards!

Miko

bharath April 14, 2009 22:23

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

pratikmehta April 15, 2009 10: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 08: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 06:38

i have just tested with cfx5solve in Expressions.
step(-0.1)=0
step(0)=0.5
step(0.1)=1

friend May 27, 2016 14: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 10:01.