Hi Wolfgang,
Thank you for the suggestion. I did not think about it, but testing 
statistical properties (center of mass, average velocity, total kinetic 
energy) seems like a very sound idea!

If you want to see an animation of DEM done using the deal.II particle 
library, you can find one on the following youtube link:
https://www.youtube.com/watch?v=jPrxQ3KqNcI&feature=youtu.be

This is just an illustration, but it actually scales to millions of 
particles at the moment.

On Tuesday, December 29, 2020 at 12:13:20 a.m. UTC-5 Wolfgang Bangerth 
wrote:

>
> Hi Bruno,
>
> > We are currently working on our DEM simulation engine using deal.II 
> particles 
> > features. DEM lead to very chaotic systems (with positive Lyapunov 
> exponents, 
> > like in MD), which means that slight discrepancies in floating point 
> numbers 
> > can lead to exponentially different results. You can imagine for example 
> that 
> > if a particle is to fall exactly on top of another, a slight difference 
> in 
> > round-off error can lead to the particle sliding to the right or to the 
> left 
> > of the other particle. Consequently, very small differences accumulate 
> and 
> > lead to drastically different results.
> > 
> > Right now, we are testing everything using numdiff within a ctest 
> framework 
> > identical to deal.II. However, since we are comparing text files with 
> > particles positions and velocities, the tests end up being extremely 
> fragile 
> > because they depend on the compiler version and MPI library being used 
> (I guess?).
> > 
> > I was wondering if any of you had experience on what would be the best 
> way to 
> > write functional tests that test the full code in the context of systems 
> which 
> > show highly chaotic behavior like this? Right now we try to test for 
> very 
> > small time, thus ensuring that differences don't have the time to 
> propagate, 
> > but this is becoming more and more fragile and sometimes tests will 
> crash on a 
> > peculiar machine, yet work on 95% of the other ones (such as our github 
> actions).
>
> Interesting :-)
>
> I think that conceptually, you probably do want to test certain aspects of 
> your code in this deterministic way. For example, if you want to check the 
> correctness of the particle trajectory integrator, you can do that with a 
> small number of particles whose trajectories stay well away from chaotic 
> points.
>
> But there are of course also other aspects that really are chaotic and 
> that 
> you also want to test. In those cases, you need to identify the 
> statistical 
> properties that *do* behave deterministically. For example, the motion of 
> individual stars in globular star clusters is likely chaotic, but the 
> motion 
> of the center of mass, or the evolution of the angular momentum and total 
> energy is not. These are things you can compute and output and they should 
> be 
> comparable among compilers and platforms. If you have enough particles, 
> you 
> could also consider things such as kernel density estimates of particle 
> densities, momentum densities, etc.
>
> Best
> W.
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/160fbc79-32e5-4179-b9de-b9ea7a290ac0n%40googlegroups.com.

Reply via email to