|
[Sponsors] |
Sin function generation with some modifications |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 7, 2013, 02:00 |
Sin function generation with some modifications
|
#1 |
Senior Member
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 14 |
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=0 |
|
January 7, 2013, 17:12 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
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. |
|
January 10, 2013, 00:59 |
|
#3 |
Senior Member
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 14 |
i got it
Thanks.. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |
Latest News in Mesh Generation | Robert Schneiders | Main CFD Forum | 1 | February 18, 2000 01:48 |
Latest news in mesh generation | Robert Schneiders | Main CFD Forum | 0 | March 2, 1999 05:07 |