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

How to express sin(w*t) in openFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 29, 2012, 10:57
Default How to express sin(w*t) in openFoam
  #1
New Member
 
Zeng Qingyun
Join Date: Oct 2012
Posts: 8
Rep Power: 4
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, 12:08
Default
  #2
Senior Member
 
Adhiraj
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 101
Rep Power: 6
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 30, 2012, 01:25
Default
  #3
New Member
 
Zeng Qingyun
Join Date: Oct 2012
Posts: 8
Rep Power: 4
Chandler is on a distinguished road
It helps, thank you!
Chandler 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
Issues with OpenFoam sanjibdsharma OpenFOAM 0 August 14, 2009 09:41
Problem installing OpenFOAM 1.5 installation on RHEL 4. vwsj84 OpenFOAM Installation 4 April 23, 2009 05:48
2009 OpenFOAM Summer School in Zagreb, Croatia hjasak OpenFOAM Announcements from Other Sources 0 March 27, 2009 14:08
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 14:14
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


All times are GMT -4. The time now is 16:28.