CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Sin function generation with some modifications (http://www.cfd-online.com/Forums/cfx/111424-sin-function-generation-some-modifications.html)

sunilpatil January 7, 2013 02:00

Sin function generation with some modifications
 
Hello sir,
I want to generate sin function for giving variable heat flux as input in Ansys CFX i created an expression as follows
Qmax = 10 [W m^-2]
wg = 7.272205217*10^-5 i.e w=(2*pi*f)
Qrate = Qmax*sin(wg [rad s^-1]*t)

when i plot for Qrate i will get sin wave but i want some modifications (please see attached figure) what would be the expression for that
the conditions are if t<=21600 Qmax=0 and
if t>=64800 Qmax=0https://lh5.googleusercontent.com/-V...ine%2Bwave.JPG

ghorrocks January 7, 2013 17:12

You can use the step of if functions to turn the sine wave into the thing you have plotted.

Also note your CEL expressions are not well expressed - you do not specify units for wg, but when you use it in Qrate you define the units there. I do not know what the unit interpreter will do here, it is not recommended. You should define the units of wg when you first define it, and then there is no need to define units for it when you use it later on. So:
wg = 7.272205217*10^-5 [rad s^-1]
Qrate = Qmax*sin(wg *t)

Is a better way of expressing it.

sunilpatil January 10, 2013 00:59

i got it
Thanks..


All times are GMT -4. The time now is 08:01.