CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   How to express sin(w*t) in openFoam (http://www.cfd-online.com/Forums/openfoam/108639-how-express-sin-w-t-openfoam.html)

Chandler October 29, 2012 09:57

How to express sin(w*t) in openFoam
 
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!

adhiraj October 29, 2012 11:08

Does this work?
Code:

scalar t=runTime.value();
f=Foam::sin(w*t);


Chandler October 30, 2012 00:25

It helps, thank you!


All times are GMT -4. The time now is 20:37.