Home Blog Using the STEP Function in CFD-ACE+
|
|
Using the STEP Function in CFD-ACE+ |
|
|
|
| The Parametric Input
feature in CFD-ACE-GUI is an excellent way to gain advanced control over
boundary conditions. This feature can be found under the Tools -> Parametric
Input choice on the menu bar. This note focuses on the STEP function and
its use in controlling time dependent boundary conditions.
The principle of the STEP function
is simple. It returns a value of 1 if the argument of the function is
greater or equal to zero and it returns 0 if the argument is less than
zero. Using STEP in combination with the built in variable "T"
(for time) allows you to build advanced functions for time dependent boundary
conditions.
|
 |
 |
Let's say you want
the inlet pressure to be 10000 for 4 seconds and then be set to 0 after
4 seconds. To do this you would select Tools -> Parametric Input and
add a parameter variable called P with a value of 10000 * STEP(4-T). Then
to use the "P" parameter, go to the BC section of the GUI and
select the desired inlet to set the pressure evaluation method to be Parametric
with a value of "P". When the transient simulation is made the
solver will evaluate your parameter every timestep and thus will set the
inlet pressure to 10000 for time less than or equal to 4 seconds and 0 for
time greater than 4 seconds. |
 |
The STEP function can also be
used to create parametric values that increase or decrease over a period
of time. An example of this would be setting the parameter P to 1000*T*STEP(4-T).
In this case the velocity would increase from 0.0 at time equal 0 seconds
to 4000 at time equal 4 seconds, after which the value would revert back
to 0. |
|
A more complex example is shown
with the following set of parameters. Note how the previously defined
parameters (P, A, B, and C in this case) can be used in any parametric
expression (PRESS in this case).
| Variable |
Value |
| P |
1000 |
| A |
1 |
| B |
3 |
| C |
10 |
|
 |
| PRESS |
(P/A*T-STEP(T-A)*P/A*(T-A)-STEP(T-B)*P/(C-B)*(T-B))*STEP(C-T) |
In the above example the pressure
will increase from 0.0 to 1000.0 in 1 second, stay at 1000 until 3 seconds,
and then ramp back to 0.0 by 10 seconds.
Please keep the parametric
input feature in mind the next time you have a need for advanced time
dependent boundary conditions. It could help you avoid writing a user
subroutine. Additional information about all of the parametric input features
can be found in the on-line help system by selecting the "Help"
button on the Parametric Input dialog box.
If you have any questions about
this feature or would like us to discuss some other topic in the future,
please let us know.
Perry Daley
Group Leader
CFDRC Customer Support
|
|
|