Run-time Code Compilation in controlDict
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 |
May I ask if you have solved this problem? I have also encountered this problem.
|
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 |
Thank you very much for your help. I will try this method.
|
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(); |
2 Attachment(s)
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 |
2 Attachment(s)
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 |
All times are GMT -4. The time now is 18:00. |