CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   How to set up transient BC? (https://www.cfd-online.com/Forums/cfx/21087-how-set-up-transient-bc.html)

 Sam March 17, 2005 06:11

How to set up transient BC?

Hi,

I've a problem setting up the transient BC.

What I wish to get is:

1-2 sec, function1(t)

2-4 sec, function2(t)

4-6 sec, function1(t)

6-8 sec, function2(t)

......

Anyone know how to implement this expression in CFX-Pre?

Thanks, Sam

 Robin March 17, 2005 10:10

Re: How to set up transient BC?

Hi Sam,

Create expressions for each of your functions:function1 = ...
function2 = ...
...Then create an expression that includes all the functions and multiplies each by a corresponding step function:allFunctions = function1*step((2 [s]-t)/1[s]) +
function2*step((t-2 [s])/1[s])*step((4 [s]-t)/1[s]) +
function3*step((t-4 [s])/1[s])*step((6 [s]-t)/1[s]) +
function2*step((t-6 [s])/1[s])*step((8 [s]-t)/1[s]) +
...A step function takes a dimensionless argument (hence dividing by 1 [s]). If the argument is negative, it returns zero, positive returns 1 and if it is equal to zero, it returns 1/2. By combining your functions this way, you can turn them on and off as needed.

Regards,
Robin

 Sam March 17, 2005 22:09

Thank you.

Thanks, robin.

It works eventhough it's lengthy. I've to simulate over 40 sec & allfunction becomes a giant equation.

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