CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Sin function generation with some modifications

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 7, 2013, 02:00
Smile Sin function generation with some modifications
  #1
Member
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 89
Rep Power: 5
sunilpatil is on a distinguished road
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
sunilpatil is offline   Reply With Quote

Old   January 7, 2013, 17:12
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,832
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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.
ghorrocks is offline   Reply With Quote

Old   January 10, 2013, 00:59
Default
  #3
Member
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 89
Rep Power: 5
sunilpatil is on a distinguished road
i got it
Thanks..
sunilpatil is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 00:35
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17: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


All times are GMT -4. The time now is 06:52.