|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 145
Rep Power: 20 ![]() |
Hi Foamers,
I try to implement a variable time Step in the controlDict with the #codeStream directive based on the actual time. Something like Code:
this->db().time().value() Thanks and best regards, Jan |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
xinyu
Join Date: Apr 2022
Posts: 24
Rep Power: 5 ![]() |
May I ask if you have solved this problem? I have also encountered this problem.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 145
Rep Power: 20 ![]() |
sorry, but It's has been to long, can't remember. But as far as I know, there is now a functionObject available to control the time step. May this is helpful for your requirements.
Best, Jan |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
xinyu
Join Date: Apr 2022
Posts: 24
Rep Power: 5 ![]() |
Thank you very much for your help. I will try this method.
|
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Member
Tatsuya Shimizu
Join Date: Jul 2012
Posts: 42
Rep Power: 14 ![]() |
Quote:
Hi Can't you access time() of db() with the following code? const IOdictionary& d = static_cast<const IOdictionary&>(dict); scalar t = d.db().time().value();
__________________
Our Work: https://www.idaj.co.jp/product/ennovacfd/openfoam_gui/ Powered by Ennova : https://ennova-cfd.com/ Ennova's Channel Partners : http://www.wolfdynamics.com/ |
||
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
xinyu
Join Date: Apr 2022
Posts: 24
Rep Power: 5 ![]() |
Thank you very much for your help. I'm a novice. I've tried this method. It works. Why?
I can use scalar t=this ->db(). time(). value() in the u file; However, it is not allowed in the coalcloudproperties file. In addition, vectorField&field=* this; The same problem will arise. Thanks and best regards, liyuu |
|
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
xinyu
Join Date: Apr 2022
Posts: 24
Rep Power: 5 ![]() |
Quote:
I can use scalar t=this ->db(). time(). value() in the u file; However, it is not allowed in the coalcloudproperties file. In addition, vectorField&field=* this; The same problem will arise. Thanks and best regards, liyuu |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 11:08 |
Run time Selection Mechanism - Some help required to understand | jaswi | OpenFOAM Programming & Development | 3 | October 29, 2015 13:42 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
Full pipe 3D using icoFoam | cyberbrain | OpenFOAM | 4 | March 16, 2011 09:20 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |