Restart and .stl position

Submitted by RobertG on Thu, 02/23/2017 - 15:53

Hello everyone,
I have a problem, which I could not solve on my own.
I have a complex rotating .stl-geometry.

When I'm doing a restart of my program, the geometry is lost (so I think).
Therefore, I initialize it newly but the former position of the geometry is lost.

The geometry is rotating with a constant velocity.
It should be possible to move the geometry during initialisation, using the the "fix mesh/surface rotate ..." command.
But it is neccesery give the command the accurate angle.
Which is also mathematicaly no problem.
But I don't know how I can get the actual time and how I can calculate modulo ...

I hope some one can help me.

Best Regards
RobertG

j-kerbl's picture

j-kerbl | Thu, 02/23/2017 - 18:43

Hi Robert,

the variable command supports thermo keywords, as "step" or "time". So
variable time equal time
gives you the current time accessible via variable. Alternatively you can
variable step equal step
variable dt equal dt
variable time equal ${step}*${dt}
Also variable supports a lot of math functions, I'm sure you can build a module similar asin(sin(x)) which works for you.
http://www.cfdem.com/media/DEM/docu/variable.html

Happy simulating,
Josef