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

Sin function generation with some modifications

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2013, 01:00
Smile Sin function generation with some modifications
  #1
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
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, 16:12
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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 9, 2013, 23:59
Default
  #3
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
sunilpatil is on a distinguished road
i got it
Thanks..
sunilpatil is offline   Reply With Quote

Reply


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 Off
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 06: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 00:48
Latest news in mesh generation Robert Schneiders Main CFD Forum 0 March 2, 1999 04:07


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