Appendix A. The Simulation of the Distribution

Let's suppose the flow to be 3D, steady-state, in a closed domain.

To perform the analysis of the distribution, the following steps are necessary.

  1. We calculate the flow (velocity and pressure).

  2. We calculate in the mixing task 1 the real distribution:

    We suppose the material points to be initially concentrated in a small volume. We have to calculate their trajectory for a given time interval. We store these trajectories in files named real_0001 to real_000X (for example).

  3. We calculate in the mixing task 2 the optimal distribution:

    We suppose the material points to be initially distributed in all the flow domain. We have to calculate their trajectory for a very short time interval (infinitesimal amount of time). We store these trajectories in files named opti_0001 to opti_000X.

  4. In Polystat, we read the files real_0001 to real_000X, and the files opti_0001 to opti_000X.

  5. We define two sets of trajectories: the first one, named "real_set" contains all the trajectories from the real_* files; the second one, named "opti_set" contains all the trajectories from the opti_* files.

  6. We define two sets of slices: the first one, named "real_slicing", is a slicing on the time (N slices, every Δ seconds), for the "real_set" set of trajectories. The second one, named "opti_slicing", is one slice defined for time t=0 and on the "opti_set" set.

  7. We define two Distance Distribution functions: the first one, named "real_distribution", is based on the "real_slicing" set of slices. The second one, named "opti_distribution", is based on the "opti_slicing" set of slices.

  8. We define one Deviation function, to calculate the deviation of the real distribution ("real_distribution" function) from the perfect distribution ("opti_distribution" function).