time step ramp
Hey guys,
I'm trying to implement a ramped time step for a pimpleDYMfoam simulation, because I have a feeling that my solution is very time step sensitive. I successfully built some if-statements in the controlDict file via runtime code-compilation (marking a coded part with #{ #} brackets), but that results in huge jumps in the force output even if the time step is only reduced by its half. My desired way of doing this would be to keep using the runtime code compilation and not building some wild libraries... My code part in the controlDict file looks like this: Code:
#{ Error output for a pisoFOAM trial case lokk like this: Code:
/home.local/janwi/OpenFOAM/janwi-2.3.x/run/incompressible/pisoFoam/ras/cavity/system/controlDict.functions.changeTimeStep:59:79: note: candidates are: I think the multiplication of 0.1*runTime is causing this. How can I best solve this issue? |
solution:
okay, I found the solution myself: :cool:
I didn't set the variable for the time step in a proper way. It's working now, even if the results for the time step look a bit weird. Maybe someone has another (better) function to work as a kind of smoothed ramp. I use a squared sine function: Code:
delta_t_start + (delta_t_end - delta_t_start) * (sin^2(min(t*PI/(2* t_end) , PI/2) ) My working code is: Code:
#{ |
All times are GMT -4. The time now is 08:23. |