I'm trying to simulate an impulse heating in OpenFOAM, for which I need to be able to modify time stepping parameter deltaT from the option class object (I'm using scalarCodedSource as impulse heat source).
I can access Time object instance from option object via call
auto time = mesh_.time()
But access is read-only due to the const qualifier.
Using const_cast on the Time object makes program compile but solver does not pick up the new values of deltaT.
Is there a way to modify deltaT value using OpenFOAM framework tools only (modify its value or edit controlDict using OpenFOAM IO facilities)?
The full C++ code is located here