# FAQ

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Questions on DEM and (or) YADE simulation

### I have a problem with "peak results". What is wrong?

Has anybody the problem with "peak results"? I mean, when you record the data from anything, for example force affecting on facet or sphere, sometimes you get "pick results" which are twice or more larger than normal result. It happens just for a short period, like a noise.

Eh, probably everybody has had that problem.

Taking force on 1 particle makes no sense, you have to average it somehow. DEM doesn't solve for equilibrium, therefore you can either let the simulation stabilize somehow (dissipate all the kinetic energy), or average somehow what you see over larger area (or both). You can compute forces on a specimen cross-section or some meaningfully defined set of particles; if you have a facet that touches many spheres, that could be a good candidate as well, as long as the sphere move independently.

You can try taking force from 1 single particle and smooth it using moving average or similar techniques (they are available in the numpy package), but that is just "graph aesthetics".

e.g. examples/concrete/uniaxial sums forces (in UniaxialStrainer) on all particles that are considered supports and lower and higher supports are then averaged. There are still some osciallations (as there are waves going back and forth in the specimen), but that is not so marked unless you go to very high loading rates. The same example also plots cross-section forces (i.e. forces in interactions that cross that plane) and you can see that they differ.

Vaclav

### What is "Young" and "Poisson" in ElastMat material?

Be careful, the parameters does not always represent what you think they could be representing.

The same ElastMat is used for different contact models, and its parameters can play different roles in each model. For instance: - In CundallStrack, ElastMat::Young will be proportional to Young's modulus of the packing (with the proportionality factor usually close to one). - In HertzMindlin, it is the real Young's modulus of the solid phase. - In ConcretePM, it is the directional Young modulus of the contact bonds.

It is similar for Poisson: 1- Correlated with packing's Poisson, 2- Poisson of the solid phase, 3- not used

Read the documentation for each specific interaction physics (Ip2_***) functor, to see how to define the material properties consistently.

Bruno

## Common questions

### What should I know to start YADE using/programming

Actually, YADE is a framework for simulations. To use it completely, you should have some programming knowledges.

• C++ (classes, templates, inheritance, pointers, boost)
• Python
• Matplotlib

### I would like to add a new page to YADE wiki. How can I do it?

If you want to add a page to wiki, you need to put its name in address panel of your browser, for example:

Then you can create the normal wiki-page. After that you need to define to what category belongs your page. And add this name, pushing "Add category" at the end. Save page.

Also it is necessary to add your page to Structurized_content to allow others to find your page quickly.

### I want to get 2 plots, how can I do it?

I want 2 diagrams to appear:

```yade.plot.plots={'t':('Z_pr',),'F':('t')}
```

It works,

but when I change F and t:

```yade.plot.plots={'t':('Z_pr',),'t':('F')}
```

I receive only 't':('F') diagram, first one does not appear...

That's normal, python dicts have only one value per key; try this:

```a={'a':1,'a':2}
print a # {'a': 2}
```

since 'a':1 was overwritten. What you have to do is to create differently-named t axis:

```yade.plot.plots={'t':('Z_pr',),'t_':('F',)}
```

(you can name it as you want, I just appended the "_" (and do not forget the comma after 'F' again)) and in addPlotData, you will have

```'t':O.time,'t_':O.time,...
```

Vaclav

### Is it possible to make different y-values from right side of the diagram?

You should use:

```  yade.plot.plots={'t':('F','|||',('F2', 'go-'))}
```

note 1: F and Z_pr will be plotted on y1, F2 on y2; '|||' separates those
note 2: ('go-') is marker specifier as in matlab, see http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.plot (and scripts/simple-scene-graph.py).

### How to run the simulation in 1 thread?

```  OMP_NUM_THREADS=1 yade-trunk ...
```

or to apply it also to next invocations in the same shell (terminal)

```  export OMP_NUM_THREADS=1
```

If you use yade-batch, columns prefixed with bang are passed as env vars to the process automatically:

```!OMP_NUM_THREADS some
1 3.4
2 3.4
3 3.4
```

See examples/collider-perf/perf.table

Vaclav.

### Is it possible to make another color of the background from python script?

```from yade import qt
r=qt.Renderer()
r['Background_color']=0,0,0
```

Other parameters to change:

```r.keys() # get just the keys
r.dict() # get both keys and values;
```

Vaclav.

### Can I start YADE in background like a daemon?

Yes, definitely. Command screen is great for background calculations. Look for some screen tutorial on the web.

inside screen command Ctrl-A-? gives a list of all keybindings.

most often used are

```Ctrl-A-C create new shell
Ctrl-A-N next shell
Ctrl-A-P previous shell
Ctrl-A-0 shell no. 0
Ctrl-A-1 shell no. 1
Ctrl-A-2 shell no. 2
Ctrl-A-Ctrl-Esc  allows to scroll up
```

Janek