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

How to express sin(w*t) in openFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2012, 08:57
Default How to express sin(w*t) in openFoam
  #1
New Member
 
007
Join Date: Oct 2012
Posts: 9
Rep Power: 13
Chandler is on a distinguished road
Hello everyone. I want to add sin(w*t) in my openFoam solver, but I have no idea about using the current time value. Can anyone help? Thank you!
Chandler is offline   Reply With Quote

Old   October 29, 2012, 10:08
Default
  #2
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 15
adhiraj is on a distinguished road
Does this work?
Code:
scalar t=runTime.value();
f=Foam::sin(w*t);
adhiraj is offline   Reply With Quote

Old   October 29, 2012, 23:25
Default
  #3
New Member
 
007
Join Date: Oct 2012
Posts: 9
Rep Power: 13
Chandler is on a distinguished road
It helps, thank you!
Chandler 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
Issues with OpenFoam sanjibdsharma OpenFOAM 0 August 14, 2009 08:41
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 04:48
2009 OpenFOAM Summer School in Zagreb, Croatia hjasak OpenFOAM Announcements from Other Sources 0 March 27, 2009 12:08
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 13:14
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 23:12.