Aceleração eficiente na resolução da equação de difusão de nêutrons 2D com CUDA: explorando a praticidade colaborativa do Colab

Autores

  • Paulo Igor de Oliveira Pessoa Eletronuclear
  • Edson Henrice Eletronuclear

DOI:

https://doi.org/10.15392/2319-0612.2024.2498

Palavras-chave:

Equação de difusão de nêutrons, NumPy, CuPy, Colab

Resumo

Este artigo explora uma abordagem para acelerar o método de diferenças finitas aplicado à resolução da equação de difusão de nêutrons bidimensional (2D) para dois grupos de energia (2G) independentes do tempo. A principal inovação está na implementação de um método de otimização de desempenho, enfatizando a praticidade do desenvolvimento em Python utilizando a colaboração direta do navegador através do Google Colaboratory (Colab). Utilizando CUDA (Compute Unified Device Architecture) para aceleração de GPU, alcançamos melhorias significativas de desempenho computacional. O estudo compara implementações Python usando bibliotecas CuPy e NumPy com implementações tradicionais de FORTRAN utilizando a biblioteca LAPACK, destacando a eficiência e precisão dos cálculos acelerados por GPU. Os resultados mostram que Python com CuPy supera significativamente o NumPy, tanto em um ambiente Colab quanto em um computador desktop pessoal. Isso demonstra a praticidade das soluções baseadas em nuvem para cálculos intensivos, já que a capacidade de executar código diretamente no navegador por meio do Colab elimina a necessidade de extensos recursos de hardware locais. Os resultados enfatizam a conveniência de executar simulações complexas sem depender de computadores físicos, promovendo maior flexibilidade e acessibilidade na pesquisa computacional. Todos os códigos computacionais estão disponíveis no GitHub para transparência e reprodutibilidade.

Downloads

Os dados de download ainda não estão disponíveis.

Referências

[1] Derstine, K.L. DIF3D: a code to solve one-, two-, and three-dimensional finite-difference diffusion theory problems. ANL- Technical Report-82-64. United States, 1984.

[2] Fletcher, J.K. “The solution of the time-independent multi-group neutron transport equation using spherical harmonics”. Annals of Nuclear Energy, vol. 4, pp. 401–405, 1977.

[3] Araujo, L.M.; Carmo, E.G.D.; Silva, F.C. Galerkin partial least-square SN (GpLS - SN) method for fixed source problems in the neutrons transport theory. Annals of Nuclear Energy. vol. 90, pp. 175-190, 2016.

[4] Finnemann, H.; Bennewitz, F.; Wagner, M.R. Interface current techniques for multidimensional reactor calculations. Atomkernenergie. vol. 30, pp. 123-128, 1977.

[5] Silva, A.; Pessoa, P.O.; Silva, F.C.; Martinez, A.S. Two-dimensional analytical solution for nodal calculation of nuclear reactors. Annals of Nuclear Energy, vol. 100, pp. 76-81, 2016.

[6] Pessoa, P.O.; Silva, F.C.; Martinez, A.S. Analytical method of pin-by-pin reconstruction of the nuclear power density distribution. In: INTERNATIONAL NUCLEAR ATLANTIC CONFERENCE – INAC. PE, Brazil, 2013.

[7] Pessoa, P.O.; Silva, F.C.; Martinez, A.S. Methods for reconstruction of the density distribution of nuclear power. Annals of Nuclear Energy, vol. 83, pp. 76–86, 2015.

[8] Pessoa, P.O.; Silva, F.C.; Martinez, A.S. Finite difference applied to the reconstruction method of the nuclear power density distribution. Annals of Nuclear Energy, vol. 92, pp. 378–390, 2016.

[9] Pessoa, P.O.; Araujo, L.M.; Silva, F.C. A strategy for pin power reconstruction based on classic Galerkin variational formulation. Progress in Nuclear Energy, vol. 104, pp. 251–263. 2018.

[10] Pessoa, P.O.; Araujo, L.M.; Silva, F.C. Numerical methods applied to pin power reconstruction based on coarse-mesh nodal calculation. Annals of Nuclear Energy, vol. 118, pp. 291–312, 2018.

[11] Pessoa, P.O. and Henrice, E. J. Efficient Acceleration in Solving the 2D Neutron Diffusion Equation with CUDA: Exploring the Collaborative Practicality of Colab. In: INTERNATIONAL NUCLEAR ATLANTIC CONFERENCE – INAC. RJ, Brazil, 2024.

[12] Okuta, R.; Unno, Y.; Nishino, D.; Hido, S.; Loomis, C. CuPy: A NumPy-Compatible Library for NVIDIA GPU Calculations. In: 31ST CONFERENCE ON NEURAL INFORMATION PROCESSING SYSTEMS (NIPS 2017), Long Beach, CA, USA, 2017.

[13] Harris, C.R.; Millman, K.J.; van der Walt, S.J.; Gommers, R.; Virtanen, P.; Cournapeau, D.; Wieser, E.; Taylor, J.; Berg, S.; Smith, N.J.; Kern, R.; Picus, M.; Hoyer, S.; van Kerkwijk, M.H.; Wieser, E.; Brett, M.; Haldane, A.; Del Rio, J.F.; Wiebe, M.; Peterson, P.; Sheppard, K.; Reddy, T.; Weckesser, W.; Abbasi, H.; Gohlke, C.; Oliphant, T.E. Array programming with NumPy. Nature, vol. 585, pp. 357-362, 2020.

[14] Anderson, E.; Bai, Z.; Bischof, C.; Demmel, J.; Dongarra, J.; Du Croz, J.; Greenbaum, A.; Hammarling, S.; McKenney, A.; Sorensen, D. LAPACK Users’ Guide. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 1999.

[15] Henrice, E.; Palma, D.A.P.; Gonçalves, A.C. Online identification of trips caused by the external proton source in an ADS reactor. Nuclear Engineering and Design, vol. 383, pp. 111-419, 2021.

[16] Henrice, E.; Palma, D.A.P.; Gonçalves, A.C.; Mesquita, A.Z. Support to the identification of anomalies in an external neutron source using Hurst Exponents. Progress in Nuclear Energy, vol. 99, pp. 119-126, 2017.

Downloads

Publicado

18-06-2025

Como Citar

Aceleração eficiente na resolução da equação de difusão de nêutrons 2D com CUDA: explorando a praticidade colaborativa do Colab. Brazilian Journal of Radiation Sciences, Rio de Janeiro, Brazil, v. 12, n. 4B (Suppl.), p. e2498, 2025. DOI: 10.15392/2319-0612.2024.2498. Disponível em: https://bjrs.org.br/revista/index.php/REVISTA/article/view/2498. Acesso em: 17 jul. 2025.