Welcome to ask.woodem.org. You may post when you login through your GitHub account.

Be able to shutoff an inlet at a specified time or specified conditions

0 votes
25 views
asked Aug 26, 2016 by andrewDEM (340 points)

Right now the inlet is shutoff during the simulation using the nDo parameter:

  • woo.dem.BoxInlet( stepPeriod=50,nDo=30000)

To specify nDo sometimes requires an iterative process to know at what point of increments I shut off the intlet.

I would like to shut it off using an IF statement if possible. For example, if the rate_inlet is the same as the rate_outlet. That way I know that steady state has been reached and no more rocks can be added to the dumpbody and it is time to shutoff the inlet.

1 Answer

+1 vote
answered Aug 29, 2016 by eudoxos (44,890 points)
selected Oct 21, 2016 by eudoxos
 
Best answer

There are several possibilities for controlling the inlet.

  1. The easiest, if you know mass rate, is to set Inlet.maxMass (https://woodem.org/woo.dem.html#woo.dem.Inlet.maxMass), the inlet will stop by itself once that mass will hav ebeen generated.
  2. Another option: label the inlet BoxInlet(...,label='inlet') and then add an an extra engine PyRunner(virtPeriod=23.4,initRun=False,nDo=1,command='S.lab.inlet.dead=True') which will set the dead flag after 23.4 seconds of simulation.
  3. Full-scale steady state detection: I did this often in pure python, but recently I added woo.dem.DetectSteadyState (which packages the functionality in a single engine, commit 8223678), which compares inlet/outlet mass rates and then runs user-specified hooks for each stage. Read the docs and check out examples/steady-state.py which demonstrates how is this engine to be used. That is by far the most flexible. The rate plot shows stageNum going from 0 (waiting stage) to 1 (transitory, once rates are equal) to steady (after a pre-defined delay from the transitory stage):
commented Sep 1, 2016 by andrewDEM (340 points)

Vaclav,

thanks for implementing DetectSteadyState. It will be a very useful feature for simulations.

Thanks!

Andrew

...