CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to get the value of deltaT in OpenFOAM? (http://www.cfd-online.com/Forums/openfoam-programming-development/113968-how-get-value-deltat-openfoam.html)

shchao March 2, 2013 02:31

How to get the value of deltaT in OpenFOAM?
 
Dear FOAMers:
I want to use the value of deltaT, known as time steppness ,while calculation in fvMotionSolver lib.Does OpenFOAM define this varible?Or How can I calculate the time stepness, esspecially in interFoam?Thank you!:)

fumiya March 2, 2013 03:44

You can use runTime.deltaTValue().

shchao March 2, 2013 04:57

Thank you for your reply but it seems there's a little problem
 
Hi,Fumiya!
Thank you for your reply!
I'm using a piston-type wavemaker derived from oscillatingDisplacement in fvMotionSolver.When i add runTime.deltaTValue() into the code and excute the wmake libso command.It returns an error --'runTime' doesn't declare in this scope.I have include the setDeltaT.H in the file.:confused:

fumiya March 2, 2013 05:56

Hi shchao,

How about this->db().time().deltaTValue()?

Fumiya

shchao March 2, 2013 06:40

It works!Thank you!
 
Hi,Fumiya
I've modified the code as you said. And it works.Thank you sincerely!:)

nbyjn November 5, 2013 08:59

Quote:

Originally Posted by shchao (Post 410985)
Hi,Fumiya!
Thank you for your reply!
I'm using a piston-type wavemaker derived from oscillatingDisplacement in fvMotionSolver.When i add runTime.deltaTValue() into the code and excute the wmake libso command.It returns an error --'runTime' doesn't declare in this scope.I have include the setDeltaT.H in the file.:confused:

Hi shchao,
Glad to meet you! I'm also using a piston-type wavemaker by interDyMFoam.
But I have two questions:
1.At the starttime, the piston(left boundary) moves rightward, so the water level should rise. But in fact, the water goes down! Do you have the same question?
2.interDyMFoam change the timestep automaticly, so the slover runs slower and slower. It's so slow that it can't calculate for 0.1s in a whole night! Can you give me some advice?
Thank you very much!

Ed R October 12, 2014 08:04

Hi all,

I'm trying to use deltaT in a restraint on sixDoFRigidBodyMotion solver. I've tried both the runTime.deltaTValue() and db().time().deltaTValue() and neither runTime nor db are define in the scope.

Which .H files do I need to include in order to use runTime or is it significantly more difficult than that?

Thanks,

Ed


All times are GMT -4. The time now is 01:50.