• Title/Summary/Keyword: Particle-in-cell method(PIC)

Search Result 11, Processing Time 0.019 seconds

Boosting the Performance of Python-based Geodynamic Code using the Just-In-Time Compiler (Just-In-Time 컴파일러를 이용한 파이썬 기반 지구동역학 코드 가속화 연구)

  • Park, Sangjin;An, Soojung;So, Byung-Dal
    • Geophysics and Geophysical Exploration
    • /
    • v.24 no.2
    • /
    • pp.35-44
    • /
    • 2021
  • As the execution speed of Python is slower than those of other programming languages (e.g., C, C++, and FORTRAN), Python is not considered to be efficient for writing numerical geodynamic code that requires numerous iterations. Recently, many computational techniques, such as the Just-In-Time (JIT) compiler, have been developed to enhance the calculation speed of Python. Here, we developed two-dimensional (2D) numerical geodynamic code that was optimized for the JIT compiler, based on Python. Our code simulates mantle convection by combining the Particle-In-Cell (PIC) scheme and the finite element method (FEM), which are both commonly used in geodynamic modeling. We benchmarked well-known mantle convection problems to evaluate the reliability of our code, which confirmed that the root mean square velocity and Nusselt number obtained from our numerical modeling were consistent with those of the mantle convection problems. The matrix assembly and PIC processes in our code, when run with the JIT compiler, successfully achieved a speed-up 30× and 258× faster than without the JIT compiler, respectively. Our Python-based FEM-PIC code shows the high potential of Python for geodynamic modeling cases that require complex computations.