Hostname: page-component-74656f9884-npj9w Total loading time: 0 Render date: 2026-11-07T09:54:42.943Z Has data issue: false hasContentIssue false

PyCAC: The concurrent atomistic-continuum simulation environment

Published online by Cambridge University Press:  30 January 2018

Shuozhi Xu*
Affiliation:
California NanoSystems Institute, University of California, Santa Barbara, Santa Barbara, California 93106-6105, USA
Thomas G. Payne
Affiliation:
School of Materials Science and Engineering, Georgia Institute of Technology, Atlanta, Georgia 30332-0245, USA
Hao Chen
Affiliation:
Department of Aerospace Engineering, Iowa State University, Ames, Iowa 50011, USA
Yongchao Liu
Affiliation:
School of Computational Science and Engineering, Georgia Institute of Technology, Atlanta, Georgia 30332, USA
Liming Xiong
Affiliation:
Department of Aerospace Engineering, Iowa State University, Ames, Iowa 50011, USA
Youping Chen
Affiliation:
Department of Mechanical and Aerospace Engineering, University of Florida, Gainesville, Florida 32611-6250, USA
David L. McDowell
Affiliation:
School of Materials Science and Engineering, Georgia Institute of Technology, Atlanta, Georgia 30332-0245, USA; and GWW School of Mechanical Engineering, Georgia Institute of Technology, Atlanta, Georgia 30332-0405, USA
*
a)Address all correspondence to this author. e-mail: shuozhixu@ucsb.edu

Abstract

We present a novel distributed-memory parallel implementation of the concurrent atomistic-continuum (CAC) method. Written mostly in Fortran 2008 and wrapped with a Python scripting interface, the CAC simulator in PyCAC runs in parallel using Message Passing Interface with a spatial decomposition algorithm. Built upon the underlying Fortran code, the Python interface provides a robust and versatile way for users to build system configurations, run CAC simulations, and analyze results. In this paper, following a brief introduction to the theoretical background of the CAC method, we discuss the serial algorithms of dynamic, quasistatic, and hybrid CAC, along with some programming techniques used in the code. We then illustrate the parallel algorithm, quantify the parallel scalability, and discuss some software specifications of PyCAC; more information can be found in the PyCAC user’s manual that is hosted on www.pycac.org.

Information

Type
Article
Copyright
Copyright © Materials Research Society 2018 
Figure 0

FIG. 1. Serial CAC simulation scheme.

Figure 1

FIG. 2. Serial hybrid CAC simulation scheme. The quasistatic CAC procedures are highlighted in yellow, while the remaining procedures belong to the dynamic CAC simulation scheme. At the diamond box with “Quasistatic?”, the code decides, based on some user-defined input parameters, whether it switches from dynamic run to quasistatic run.

Figure 2

FIG. 3. (a, b) A 2D CAC simulation domain consisting of an atomistic domain (right) and a continuum domain (left).8 In (a), an edge dislocation (red ⊥) is located in the atomistic domain. Upon applying a shear stress on the simulation cell, the dislocation migrates into the continuum domain in (b), where the Burgers vector spreads out between discontinuous finite elements. (c, d) In 3D, elements have faces on {111} planes and on {110} planes in an FCC and a BCC lattice, respectively. The positions of atoms (open circles) within each element are interpolated from the nodal positions (filled circles).

Figure 3

FIG. 4. A 2D schematic of the grains and subdomains in a CAC simulation cell. Squares are finite elements and circles are atoms. In grain I, there are two subdomains; subdomain i contains elements of the same size while subdomain ii is fully atomistically resolved. In grain II, there are three subdomains; subdomains i and iii have full atomistic resolution, while subdomain ii contains elements of the same size. In grain III, there is only one subdomain containing elements of the same size. The elements are rotated differently in three grains following their respective crystallographic orientations. Note that the dark red and dark green atoms at the leftmost and rightmost boundaries are added after all grains/subdomains are defined, to fill in the otherwise jagged interstices at the periodic boundaries because PBCs are applied along the y direction but not the x direction. Also note that the planar interface between grains and subdomains are not necessarily normal to the Cartesian axes but can have a user-defined orientation angle θ.

Figure 4

FIG. 5. Parallel CAC simulation scheme. Procedures that do not exist in the serial scheme (Fig. 1) are highlighted in yellow. Note that (i) in the serial scheme, the root processor does everything and (ii) the two procedures in the dashed box are conducted back and forth until the output begins.

Figure 5

FIG. 6. (a–d) Runtime breakdown of all components as well as (e) speed-up and (f) normalized memory usage with respect to the serial CAC simulation for different simulations cell sizes in strong scaling.

Figure 6

FIG. 7. (a) Runtime breakdown of all components and parallel efficiency and (b) normalized average workload with respect to the serial CAC simulation in weak scaling, with 492 elements per processor. In (b), the shaded error region represents the standard deviation of the workload of all processors.

Figure 7

FIG. 8. Python scripting interface scheme. First, input.py() creates CAC simulation cells via a graphical user interface on a local computer and submits jobs via job schedulers on high performance computing clusters; then CAC simulations compiled from the underlying Fortran code are run following Figs. 1 or 5; once the simulations finish, output.py() downloads the output data from clusters before processing them locally using the data analyzer; in the end, visualization.py() employs some visualization software to render CAC simulation results.

Supplementary material: PDF

Xu et al. supplementary material

Figures S1-S2

Download Xu et al. supplementary material(PDF)
PDF 1.4 MB