Decimal precision with EDEM

jc_794
jc_794 Altair Community Member

Hi,

I am currently using Altair EDEM 2022.3, coupled with HyperStudy, for model calibration purposes. During the process, I encountered an issue related to decimal precision when inputting optimized parameters.

After running the HyperStudy optimization, I obtained a set of optimized parameter values. However, when I attempt to reproduce the simulation using these optimized values, EDEM seems to round the input values to fewer decimal places. For example, the optimized value I input is 0.3015505, but the EDEM round it into 0.302, as shown in the attached figures.

This rounding significantly impacts the accuracy of my model calibration. Is there a way to configure EDEM to accept and retain higher precision decimal values during input?

Sincerely,

Jipei


Best Answer

  • Stephen Cole
    Stephen Cole
    Altair Employee
    Answer ✓

    Hi, its good to look at the accuracy and repeatability of the results in any simulation (or experimental case as I don't expect this outcome is just related to simulation results). Just to confirm you fixed the particle positions and the size distribution with the 0.3,0.3,0.8 input and saw the same results in HyperStudy and EDEM, did you also do the same with 0.302,0.302,0.8 case?

    It's worth highlighting that all HyperStudy is doing is calling the same EDEM executable so any difference in results is just due to running EDEM twice, independent really of how it's called. The variation in angle output seems reasonable for me given the test. The Inclined Plane test and also the Angle of Repose test are good tests but are not that accurate, especially at lower particle numbers. The are accessible tests and commonly used, they give good practical results but it's always good to look at the repeatability of the test.

    If you have the same material properties and same size distribution but randomise the starting position (default EDEM factories have random positions) of the particles I would expect you to get a range of output angles for the same material properties, at a guess this would be around 1 degree accuracy but could see a greater variation than that.

    Aside from the test if all the inputs to the simulation are identical (properties, size distribution, particle starting positions) you should expect repeatable results. Assuming we are discussing Double precision (GPU has different precision modes, link below) then the results should be the same within 16 significant figures, but this is only if the simulation is always run on the same hardware. A Intel CPU, AMD CPU, Nvidia GPU all may use different mathematical libraries which influence precision, also A+B does not always = B+A when considering the results to 16 significant figures and then a small variation in results at this level can result in 'larger' differences for a discrete system that is doing the same calculation millions of times for thousands or millions of particles. This doesn't mean the calculation lacks precision but may lack repeatability in some cases.


    However I don't think it is a case of precision but the inclined plate test is only accurate or repeatable within a specific error bound, and running a few tests with random starting positions of the particles should help find what this error bound is.

Answers

  • Stephen Cole
    Stephen Cole
    Altair Employee

    Hi Jipei,

    Currently there isn't way to modify the precision beyond the current input. 3 decimal places however should be more than enough accuracy for an input such as restitution, I don't believe you would see any significant differences in results or any increased accuracy with more decimal places.

    The Restitution calculation is an approximation of a real world input as is the particle shape, there are a wide range of variables which do influence the motion of the material (shape, elasticity, impact velocity) so I would expect experimentally if you measured the restitution of any given material it would give you a range of results rather than a fixed value, and that range would unlikely to be accurate to 3 or more decimal places.

    Regards

    Stephen

  • jc_794
    jc_794 Altair Community Member

    Hi Stephen,

    Thank you so much for your swift response and patient explanation regarding the restitution calculation.

    I realize my previous statement, "This rounding significantly impacts the accuracy of my model calibration," might have caused some confusion. Please let me clarify by providing additional context, as this issue is central to my earlier question about decimal precision.

    The concern stems from my HyperStudy optimization results related to the inclined plate test model calibration. I used the official model provided in the calibration toolkit, and here are some examples to illustrate the issue:

    For the first evaluation, the three inputs are 0.3, 0.3, 0.8, and the output initial angle is 34.68 and final angle is 39.11

    For the 46 th evaluation, the three inputs are around 0.302, 0.302, 0.8, and the output initial angle is 34.8 and final angle is 38.16.

    Although the inputs are nearly identical, the outputs—particularly the final angle—differ significantly.

    To further investigate, I just ran the inclined plate model in EDEM using the rounded/unprecise optimized inputs (0.302, 0.302, 0.8) and postprocessed the results with EDEMpy. The outputs from EDEM (Initial angle = 36.42, Final angle = 38.52) also show notable discrepancies compared to the HyperStudy results (Initial angle = 34.8, Final angle = 38.16).

    To eliminate the possibility of simulation randomness, I ensured consistent conditions in EDEM by using a fixed particle size distribution and the BCC position generation method. This alignment is evident when the inputs are precisely 0.3, 0.3, 0.8 (the outputs from EDEM and Hyperstudy are the same), as shown in the first and last figures.

    These observations may suggest that even slight difference or precision differences in the input values can cause significant deviations in the results. Could you provide insights into how to address or mitigate this issue effectively? Any advice on maintaining consistency between HyperStudy and EDEM results would be greatly appreciated.

  • jc_794
    jc_794 Altair Community Member

    Hi Stephen,

    I just wanted to kindly draw your attention to my previous question about the calibration issue. I realized I might not have quoted your response directly and instead replied within the same post, which might have caused it to go unnoticed. Thank you in advance for taking a look. I appreciate your time and support.

    Sincerely,

    Jipei

  • Garima_Singh
    Garima_Singh
    Altair Employee

    Hi @jc_794,

    Although the query is related to the precision values settings in EDEM, it would be worthwhile to understand the precision settings in HyperStudy as well.

    Under the 'File>Preferences' option, one can set the 'Display precision' (as shown below) in HyperStudy.

    It might be helpful for your requirement. You can let us know if it was helpful.

    Many thanks.

    Kind Regards

    Garima Singh

  • Stephen Cole
    Stephen Cole
    Altair Employee
    Answer ✓

    Hi, its good to look at the accuracy and repeatability of the results in any simulation (or experimental case as I don't expect this outcome is just related to simulation results). Just to confirm you fixed the particle positions and the size distribution with the 0.3,0.3,0.8 input and saw the same results in HyperStudy and EDEM, did you also do the same with 0.302,0.302,0.8 case?

    It's worth highlighting that all HyperStudy is doing is calling the same EDEM executable so any difference in results is just due to running EDEM twice, independent really of how it's called. The variation in angle output seems reasonable for me given the test. The Inclined Plane test and also the Angle of Repose test are good tests but are not that accurate, especially at lower particle numbers. The are accessible tests and commonly used, they give good practical results but it's always good to look at the repeatability of the test.

    If you have the same material properties and same size distribution but randomise the starting position (default EDEM factories have random positions) of the particles I would expect you to get a range of output angles for the same material properties, at a guess this would be around 1 degree accuracy but could see a greater variation than that.

    Aside from the test if all the inputs to the simulation are identical (properties, size distribution, particle starting positions) you should expect repeatable results. Assuming we are discussing Double precision (GPU has different precision modes, link below) then the results should be the same within 16 significant figures, but this is only if the simulation is always run on the same hardware. A Intel CPU, AMD CPU, Nvidia GPU all may use different mathematical libraries which influence precision, also A+B does not always = B+A when considering the results to 16 significant figures and then a small variation in results at this level can result in 'larger' differences for a discrete system that is doing the same calculation millions of times for thousands or millions of particles. This doesn't mean the calculation lacks precision but may lack repeatability in some cases.


    However I don't think it is a case of precision but the inclined plate test is only accurate or repeatable within a specific error bound, and running a few tests with random starting positions of the particles should help find what this error bound is.

  • jc_794
    jc_794 Altair Community Member

    Hi Garima,

    Thanks a lot for your answer.

    It indeed very helpful because I could let HyperStudy use the same precision as EDEM!

    Btw, honestly, I didn't find the same place to adjust the decimal precision as you shown in the image. However, I found another plcae to adjust the "display precision" as shown in the attached image

    Does this because we are using different version of HyperStudy? I am currently using 2022.3.

    Sincerely,

    Jipei

  • jc_794
    jc_794 Altair Community Member

    Hi Stephen,

    Thanks a lot for your detailed answer! The experiments indeed have some inherent randomness and I should do some error analysis as well.

    Sincerely,

    Jipei

  • Garima_Singh
    Garima_Singh
    Altair Employee

    Hi @jc_794,

    Thank you for providing an update that the suggestion was useful.

    It would be great if you can mark the specific answer as 'useful/helpful'.

    The 'File>Preferences' option to set the 'Display precision' is applicable for HyperStudy 2024.1 version. Since, you are using HyperStudy 2022.3, the same option is under the 'View' tab.

    Kind Regards

    Garima Singh