🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Script for computing the temporal evolution of the Lacey mixing index for a binary mixture of particles in EDEM

Overview

This python script computes the temporal evolution of the Lacey mixing index [1] for a binary mixture of particles in EDEM from the mixture component mass fractions in a dense grid of rectilinear sampling bins as described below.

An example result from the script is shown in Figure 1. A value of zero corresponds to the perfectly segregated state and a value of one to the randomly mixed state. In addition to the graphs shown in Figure 1 the script outputs the results in a comma delimited text file.

Figure 1 a) Dense grid of rectilinear bins for the calculation of the Lacey mixing index and b) the temopral evolution of the Lacey mixing index.

[1] Gu, Z. and Chen, J. J. J. (2015) ‘A probabilistic analysis of some selected mixing indices’, Chemical Engineering Research and Design. Institution of Chemical Engineers, 93(April), pp. 293–303. doi: 10.1016/j.cherd.2014.04.014.

Pre-Requisite

EDEM 2022.3 and EDEMpy 1.2.0

Usage/Installation Instructions

The settings of the script are contained in the Lacey_settings.txt file and defined in Figure 2.

Figure 2 Inputs for the Lacey mixing index script

The python file can be executed directly from the EDEM Analyst using the Run EDEMpy script feature (File->Run EDEMpy script). The EDEM deck files, Lacey.py file and Lacey_settings.txt file should all be in the same folder. The script will find and post-process all EDEM decks in the folder that it is in and output the results in the same location.

Comments

Sort by:
1 - 13 of 131
    AKASH_22404User: "AKASH_22404"
    Altair Community Member
    Updated by AKASH_22404

    Good afternoon.

    Can you please extend the above code (which calculates the lacey mixing index) for n species and n timesteps.
    I tried but couldn't do it,

    Thanking you in anticipation.

    Thanks & Regard

    Akash Pal

     

    Alice SunUser: "Alice Sun"
    Altair Community Member
    Updated by Alice Sun

    May I ask why several mixing index values are negative?

    May I ask why several mixing index values are negative?

    Hi Yurui,

    The Lacey index is between 0 and 1 only if the mass or number fractions of the two materials are equal (50:50). Otherwise it is normal to get negative values but not values above 1.

    Best regards,

    Stefan

     

    Good afternoon.

    Can you please extend the above code (which calculates the lacey mixing index) for n species and n timesteps.
    I tried but couldn't do it,

    Thanking you in anticipation.

    Thanks & Regard

    Akash Pal

     

    Hi Pal,

    The Lacey mixing index cannot be generalised to higher order mixtures. Other indices have been proposed for this. For example:

    Cho, M., Dutta, P. and Shim, J. (2017) ‘A non-sampling mixing index for multicomponent mixtures’, Powder Technology. Elsevier B.V., 319, pp. 434–444. doi: 10.1016/j.powtec.2017.07.011.

    Best regards,

    Stefan

    Alice SunUser: "Alice Sun"
    Altair Community Member
    Updated by Alice Sun

    Hi Yurui,

    The Lacey index is between 0 and 1 only if the mass or number fractions of the two materials are equal (50:50). Otherwise it is normal to get negative values but not values above 1.

    Best regards,

    Stefan

     

    image

    Thanks very much for your reply.

    I use the EDEM 2023 and run this case. Why is the result different from the attached picture? There are several negative values. 

    Also, Can I run this script using EDEM 2023? 

    image

    Thanks very much for your reply.

    I use the EDEM 2023 and run this case. Why is the result different from the attached picture? There are several negative values. 

    Also, Can I run this script using EDEM 2023? 

    Hi Yurui,

    It is also possible to get some negative values or values above 1 if the number if bins or number of particles are low. We updated the script since the images were generated so you may get a different result to the image with the default values. The script should run ok in EDEM 2023.0 but let us know if you get any errors and we can update it.

    Best regards,

    Stefan

    Alice SunUser: "Alice Sun"
    Altair Community Member
    Updated by Alice Sun

    Hi Yurui,

    It is also possible to get some negative values or values above 1 if the number if bins or number of particles are low. We updated the script since the images were generated so you may get a different result to the image with the default values. The script should run ok in EDEM 2023.0 but let us know if you get any errors and we can update it.

    Best regards,

    Stefan

    Thank you for your kindness.

    Can I use this script directly for other binary mixture case (different mixer)? And where should I revise?

    Thank you for your kindness.

    Can I use this script directly for other binary mixture case (different mixer)? And where should I revise?

    You can use it for any geometry and any binary mixture. You only need to change the grid dimensions and might need to change the number of bins.

    Best regards,

    Stefan

    Alice SunUser: "Alice Sun"
    Altair Community Member
    Updated by Alice Sun

    You can use it for any geometry and any binary mixture. You only need to change the grid dimensions and might need to change the number of bins.

    Best regards,

    Stefan

    Great! Thanks again

    Hi, Stefan 

    I am also confused  as to what N refers to in this script?

    I saw the picture you uploaded about the principle of calculating the Lacey mixing index. I also checked some literature, N should refer to the average number of particles in each bin. 

    Maybe you can explain why take N is the average number of particles of type 1 in each bin?

     

     

    Hi, Stefan 

    I am also confused  as to what N refers to in this script?

    I saw the picture you uploaded about the principle of calculating the Lacey mixing index. I also checked some literature, N should refer to the average number of particles in each bin. 

    Maybe you can explain why take N is the average number of particles of type 1 in each bin?

     

     

    Hi .,

    Thank you for bringing this up. There is a typo in the above description. Is should say N is the average number of particles per bin. We will correct this. The calculation in the script is using the correct definition of N.

    Best regards,

    Stefan

    Hi, can this script be usable for the continuous mixer? Thank you.

    User: "Renan"
    Altair Employee

    Hi,

    Yes, this script can be used with a continuous mixer

    Best regards,

    Renan

    Thank you, Renan, for response. Since I am working on a continuous paddle mixer with the binary mixing with the ratio of 30:70. I am aiming to assess mixing efficiency using metrics such as Residence Time Distribution (RTD), Relative Standard Deviation (RSD), and possibly the Lacey Mixing Index.

    I would greatly appreciate your guidance on:

    1. Whether the current Lacey Index and RSD scripts can be adapted to account for unequal mixing ratios.
    2. How to correctly define bins or regions of interest for analysis in a continuous system.
    3. Any recommended method or script setup to extract meaningful RTD data for one of the materials used as a tracer particle.

    Thank you very much for your time and support. I look forward to your advice on how to best proceed with post-processing for my case.

Share projects with the Community

Share your models, scripts, workspaces, and more with the Altair Community.
New Exchange Project