CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Sinusoidal Expression (https://www.cfd-online.com/Forums/cfx/132554-sinusoidal-expression.html)

LukeOsb April 2, 2014 15:17

Sinusoidal Expression
 
Hi,
I'm modelling a tank rotating using Cfx. the tank rotates with a mixture of water and air. A model is shown here http://i.imgur.com/wxdm3O6.png (the front and back faces are symmetry and the sides are free slip walls)

The expression I am using to rotate the tank in alternate directions is

if((t-tOn)>=0 [s], 0.3[rad s^-1]*sin((t-tOn)*2*pi/(4 [s])),0 [rad s^-1])

where tOn is a timestep of 0.075 [s]

which results in a change of angular velocity as shown http://i.imgur.com/gjYPjCy.png

However I would like to pause the sinusoidal wave at its positive and negative peaks for a period (lets say 1 [s]) how can i modify my expression to do this? If there is a way to make a plus or minus sign I can modify my expression to do this, is this possible? or what other ways could I do this?

Thanks in advance,
Luke

brunoc April 2, 2014 18:46

There are two ways to do that:

1) Generate the equation that does what you want, that is, use a sinusoidal wave for a period, then switch, to constant, then back to sinusoidal.

or

2) Create a table of your expression in Excel as a function of time and use that table as a 1D function in Pre. This might be an easier way to do it.


All times are GMT -4. The time now is 04:07.