Percentage porosity computation of three-dimensional non-convex porous geometries using the direct Monte Carlo simulation


The pursuit of more representative numerical models for open-cell metallic foams requires the computation of volume and percentage porosity of geometries containing randomly distributed interconnected pores, which is one of the main characteristics that determines its mechanical properties. From a mathematical standpoint, the analytical definition of foam geometries forms a three-dimensional non-convex set. It is known that the volume computation of n-dimensional polytopes and sets is a P-hard problem. A common way to approach this problem is using the Monte Carlo techniques; however, efforts are oriented toward the treatment of convex polytopes and polyhedrons. In this article, the Direct Monte Carlo Simulation (DMCS) is used to compute the percentage porosity of three-dimensional non-convex sets. A single-thread Python code was implemented, and tests were run to estimate the percentage porosity of three-dimensional open-cell porous geometries. Measurements of percentage porosity and runtime requirements over cubical and cylindrical geometries containing from 100 to 4000 overlapping spherical pores showed high accuracy and consistency in non-convex three-dimensional sets, while the proposed algorithm achieved a significant reduction in computing time with respect to the currently available method. In the same manner, results from the proposed algorithm were compared with a similar software available, showing a gain in both performance time and accuracy.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8


  1. 1.

    Banhart J (2001) Manufacture, characterisation and application of cellular metals and metal foams. Prog Mater Sci 46(6):559–632.

    Article  Google Scholar 

  2. 2.

    Ashby MF, Evans A, Fleck NA, Gibson LJ, Hutchinson JW, Wadley HNG, Delale F (2001) Metal foams: a design guide. Appl Mech Rev 54:B105.

    Article  Google Scholar 

  3. 3.

    Hasan A (2010) An improved model for FE modeling and simulation of closed cell Al-alloy foams. Adv Mater Sci Eng 1:12.

    Article  Google Scholar 

  4. 4.

    Geers MG, Kouznetsova VG, Brekelmans WA (2010) Multi-scale computational homogenization: trends and challenges. J Comput Appl Math 234(7):2175–2182.

    Article  MATH  Google Scholar 

  5. 5.

    Kanit T, Forest S, Galliet I, Mouroury V, Jeulin D (2003) Determination of the size of the representative volume element for random composites: statistical and numerical approach. Int J Solids Struct 40(13–14):3647–3679.

    Article  MATH  Google Scholar 

  6. 6.

    Kari S, Berger H, Rodriguez-Ramos R, Gabbert U (2007) Computational evaluation of effective material properties of composites reinforced by randomly distributed spherical particles. Compos Struct 77:223–231.

    Article  Google Scholar 

  7. 7.

    Stefanou G, Savvas D, Papadrakakis M (2017) Stochastic finite element analysis of composite structures based on mesoscale random fields of material properties. Comput Methods Appl Mech Eng 326:319–337.

    MathSciNet  Article  Google Scholar 

  8. 8.

    Cadena JH, Alfonso I, Ramírez JH, Rodriguez-Iglesias V, Figueroa IA, Aguilar C (2014) Improvement of FEA estimations for compression behavior of Mg foams based on experimental observations. Comput Mater Sci 91:359–363.

    Article  Google Scholar 

  9. 9.

    Pérez L, Lascano S, Aguilar C, Domancic D, Alfonso I (2015) Simplified fractal FEA model for the estimation of the Young’s modulus of Ti foams obtained by powder metallurgy. Mater Des 83:276–283.

    Article  Google Scholar 

  10. 10.

    Pérez L, Lascano S, Aguilar C, Estay D, Messner U, Figueroa IA, Alfonso I (2015) DEM–FEA estimation of pores arrangement effect on the compressive Young’s modulus for Mg foams. Comput Mater Sci 110:281–286.

    Article  Google Scholar 

  11. 11.

    Pérez L, Mercado R, Alfonso I (2017) Young’s modulus estimation for CNT reinforced metallic foams obtained using different space holder particles. Compos Struct 168:26–32.

    Article  Google Scholar 

  12. 12.

    Pérez L, Cabrera I, Santiago AA, Vargas J, Beltrán A, Alfonso I (2018) Effect of the Al–CNT interlayer on the tensile elastic modulus of Al matrix composites with random dispersion of CNTs. J Braz Soc Mech Sci Eng 40(11):550.

    Article  Google Scholar 

  13. 13.

    Janssen H (2013) Monte-Carlo based uncertainty analysis: sampling efficiency and sampling convergence. Reliab Eng Syst Saf 109:123–132.

    Article  Google Scholar 

  14. 14.

    Till MS, Ullmann GM (2009) McVol—A program for calculating protein volumes and identifying cavities by a Monte Carlo algorithm. J Mol Model 16(3):419–429.

    Article  Google Scholar 

  15. 15.

    Cundall P, Stack O (1979) A discrete numerical model for granular assemblies. Geotechnique 29(1):47–65.

    Article  Google Scholar 

  16. 16.

    Torres Y, Pavón JJ, Nieto I, Rodriguez JA (2011) Conventional powder metallurgy process and characterization of porous titanium for biomedical applications. Metal Mater Trans B 42(4):891–900.

    Article  Google Scholar 

  17. 17.

    Jha N, Mondal DP, Majumdar JD, Badkul A, Khane AK (2013) Highly porous open cell Ti-foam using NaCl as temporary space holder through powder metallurgy route. Mater Des 47:810–819.

    Article  Google Scholar 

  18. 18.

    Li K, Gao XL, Subhash G (2005) Effect of cell shape and cell wall thickness variations on the elastic properties of two-dimensional cellular solids. Int J Solids Struct 42(5–6):1777–1795.

    Article  MATH  Google Scholar 

  19. 19.

    Nitka M, Combe G, Dascalu C, Desrues J (2011) Two-scale modeling of granular materials: a DEM-FEM approach. Granular Matter 13(3):277–281.

    Article  Google Scholar 

  20. 20.

    Soro N, Brassart L, Chen Y, Veidt M, Attar H, Dargusch MS (2018) Finite element analysis of porous commercially pure titanium for biomedical implant application. Mater Sci Eng A 725:43–50.

    Article  Google Scholar 

  21. 21.

    Schröder J, Balzani D, Brands D (2010) Approximation of random microstructures by periodic statistically similar RVE based on linear-path functions. Arch Appl Mech 81(7):975–997.

    Article  MATH  Google Scholar 

  22. 22.

    Smit R, Brekelmans W, Meijer H (1998) Prediction of the mechanical behavior of nonlinear heterogeneous systems by multi-level finite element modeling. Comput Methods Appl Mech Eng 155(1–2):181–192.

    Article  MATH  Google Scholar 

  23. 23.

    Báez-Pimiento S, Hernández-Rojas M, Palomar-Pardavé M (2015) Processing and characterization of open-cell aluminum foams obtained through infiltration process. Proc Mater Sci 9:54–61.

    Article  Google Scholar 

  24. 24.

    Orbulov IN (2013) Metal matrix syntactic foams produced by pressure infiltration—the effect of infiltration parameters. Mater Sci Eng A 583:11–19.

    Article  Google Scholar 

  25. 25.

    Cleary PW (2005) A multiscale method for including fine particle effects in DEM models of grinding mills. Miner Eng 84:88–99.

    Article  Google Scholar 

  26. 26.

    Coetzee C (2017) Review: calibration of the discrete element method. Powder Technol 310:104–142.

    Article  Google Scholar 

  27. 27.

    Boemer D, Ponthot J-P (2016) DEM modeling of ball mills with experimental validation: influence of contact parameters on charge motion and power draw. Comput Part Mech 4(1):53–67.

    Article  Google Scholar 

  28. 28.

    Kloss C, Goniva C, Hager A, Amberger S, Pirker S (2012) Models, algorithms and validation for opensource DEM and CFD-DEM. Prog Comput Fluid Dyn Int J 12(2/3):140–152.

    MathSciNet  Article  Google Scholar 

  29. 29.

    ASTM (2018) Standard testing methods of compression testing of metallic materials in room temperature. ASTM International.

  30. 30.

    Dyer ME, Frieze AM (1988) On the complexity of computing the volume of a polyhedron. SIAM J Comput.

    MathSciNet  Article  MATH  Google Scholar 

  31. 31.

    LG Khachiyan (1988) On the complexity of computing the volume of a polytope. Izvestia Ajad. Nauk SSSR, Engineering Cybertics. 216–217

  32. 32.

    Khachiyan LG (1989) The problem of calculating the volume of a polyhedron is enumerably hard. Russ Math Surv 44(3):199–200.

    Article  MATH  Google Scholar 

  33. 33.

    Chazelle BM (1981) Convex decompositions of polyhedra. In: Proceedings of the thirteenth annual ACM symposium on Theory of computing, Milwaukee.

  34. 34.

    Bueler B, Enge A, Fukuda K (2000) Exact volume computation for polytopes: a practical study. Polytopes—combinatorics and computation. Springer Basel AG, Basel, pp 131–154

    Google Scholar 

  35. 35.

    Ge C, Ma F (2015) A fast and practical method to estimate volumes of convex polytopes. In: International Workshop of Frontiers in Algorithms, 2015.

    Google Scholar 

  36. 36.

    Liu S, Zhang J, Zhu B (2007) Volume computation using a direct Monte Carlo method. Comput Comb Banff.

    Article  MATH  Google Scholar 

  37. 37.

    Emiris I, Fisikopoulos V (2014) Efficient random-walk methods for approximation polytope volume. Proceedings of the thirtieth annual symposium on Computational geometry, Kyoto.

  38. 38.

    Lien JM, Amato N (2007) Approximate convex decomposition of polyhedra. In: Proceedings of the 2007 ACM symposium on Solid and physical modeling, Beijing, China, 2007.

  39. 39.

    Morris C, Stark R (2015) Finite mathematics: models and applications. John Wiley & Sons, Hoboken

    Google Scholar 

  40. 40.

    Suadhakar Y, Wall W (2013) Quadrature schemes for arbitrary convex/concave volumes and integration of weak form in enriched partition of unity methods. Comput Methods Appl Mech Eng 258:39–54.

    MathSciNet  Article  MATH  Google Scholar 

  41. 41.

    Cazals F, Kanhere H, Loriot S (2011) Computing the volume of a union of balls: a certified algorithm. ACM Trans Math Softw 38(1):1–20.

    MathSciNet  Article  MATH  Google Scholar 

  42. 42.

    Kaas R, Buhrman JM (1980) Mean, median and mode in binomial distributions. Stat Neerl 34(1):13–18.

    MathSciNet  Article  MATH  Google Scholar 

  43. 43.

    Canavos GC (1984) Applied probability and statistical methods. Little, Brown

    Google Scholar 

  44. 44.

    Ballio F, Guadagnini A (2004) Convergence assessment of numerical Monte Carlo simulations in groundwater hydrology. Water Resour Res.

    Article  Google Scholar 

  45. 45.

    Gilman M (1968) A brief survey of stopping rules for Monte Carlo. In: Second conference on applications of simulations, New York, NY

Download references

Author information



Corresponding author

Correspondence to Mauricio Campillo.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.


Appendix A

In this appendix, the complete Python code script is presented. This code runs in single core configuration allowing to estimate the porosity of cylindrical- or cubic-shaped foam geometries containing randomly distributed spherical pores when a complete analytical description of it (i.e. overall dimensions and pores location and dimension) is given in a JavaScript script file. The code uses Eq. 15 to average the results obtained by a series of Monte Carlo simulations, based on an LHS strategy, according Eqs. 5, 6, 7, and 8. The code will iterate until two established criteria are met, which are a minimum number of iteration and a maximum standard error, according to Eq. 18. This code requires the user to provide the filename with its extension as system argument (e.g., Cube_100_1.js). The path to the file is assumed to be the current work directory


Appendix B

In this appendix, more detailed information regarding the computed percentage porosity for the data set obtained by means of the proposed algorithm and McVol after 20 independent runs are presented in Table 2.

Table 2 Minimum, maximum, and average percentage porosity and absolute error respect to reference value obtained from ANSYS Design Modeler Module obtained after 20 independent runs using the proposed implementation and McVol

Appendix C

In this appendix, more detailed information regarding the computed runtimes for the data set for the proposed algorithm and McVol after 20 independent runs are presented in Table 3.

Table 3 Minimum, maximum, and average runtime after 20 independent runs using the proposed implementation and McVol

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Campillo, M., Pérez, P., Daher, J. et al. Percentage porosity computation of three-dimensional non-convex porous geometries using the direct Monte Carlo simulation. Engineering with Computers (2019).

Download citation


  • Direct Monte Carlo simulation
  • Percentage porosity
  • Non-convex sets
  • Metallic foams
  • Python