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

What does function step mean?

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

Like Tree3Likes
  • 1 Post By matej
  • 2 Post By Robin

Reply
 
LinkBack Thread Tools Display Modes
Old   June 2, 2003, 05:44
Default What does function step mean?
  #1
Miko
Guest
 
Posts: n/a
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?
  Reply With Quote

Old   June 2, 2003, 06:02
Default Re: What does function step mean?
  #2
matej
Guest
 
Posts: n/a
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
Mazze[ITA] likes this.
  Reply With Quote

Old   June 2, 2003, 06:04
Default Re: What does function step mean?
  #3
Miko
Guest
 
Posts: n/a
Oh, thank you matej!
  Reply With Quote

Old   June 2, 2003, 06:42
Default Re: What does function step mean?
  #4
Miko
Guest
 
Posts: n/a
Hi matej! Another question is how to judge if it's true or not. For instance, step(0.1)=? step(0)=?
  Reply With Quote

Old   June 2, 2003, 07:22
Default Re: What does function step mean?
  #5
matej
Guest
 
Posts: n/a
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
  Reply With Quote

Old   June 2, 2003, 14:42
Default Re: Clarification of STEP function
  #6
Robin
Guest
 
Posts: n/a
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
Mazze[ITA] and lostworlduan like this.
  Reply With Quote

Old   June 2, 2003, 20:31
Default Re: Thank you!
  #7
Miko
Guest
 
Posts: n/a
I think I get the satisfied answer. Thank Matej, Robin and all a lot!

Best regards!

Miko
  Reply With Quote

Old   April 14, 2009, 21:23
Default
  #8
Senior Member
 
Bharath kumar
Join Date: Apr 2009
Posts: 157
Rep Power: 8
bharath is on a distinguished road
Hi miko,
could u explain me where the STEP function used?give me an example plz.
bharath is offline   Reply With Quote

Old   April 15, 2009, 09:45
Default
  #9
Member
 
Pratik Mehta
Join Date: Mar 2009
Posts: 32
Rep Power: 8
pratikmehta is on a distinguished road
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
pratikmehta is offline   Reply With Quote

Old   April 8, 2013, 07:07
Default
  #10
Member
 
Pjotr
Join Date: Mar 2012
Posts: 30
Rep Power: 5
oewnce932c is on a distinguished road
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 is offline   Reply With Quote

Old   April 9, 2013, 05:38
Default
  #11
Member
 
Pjotr
Join Date: Mar 2012
Posts: 30
Rep Power: 5
oewnce932c is on a distinguished road
i have just tested with cfx5solve in Expressions.
step(-0.1)=0
step(0)=0.5
step(0.1)=1
oewnce932c is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to create a CEL expression for Step function anirudster CFX 22 November 3, 2013 01:07
wall function UDFs...step gina Fluent UDF and Scheme Programming 7 June 2, 2009 14:04
Can anybody help me to solve the list errors while compiling Openfoam 15 on Opensuse 103 32bit coompressor OpenFOAM Installation 0 November 12, 2008 20:53
time step size in Custom Field Function Tong FLUENT 0 May 2, 2008 15:51
step function John CFX 4 October 20, 2005 00:39


All times are GMT -4. The time now is 21:17.