
Examples¶
The folder examples holds Jupyter notebooks, showcasing different aspects of the pyLSET functionalities.
| Notebook | Content |
|---|---|
ex01_basic_2d.ipynb |
Basic setup and execution in 2D. A shrinking circle compared with the exact area rate, and grain growth in a Voronoi polycrystal with coloring. |
ex02_triple_junction.ipynb |
A traveling T junction with anisotropic grain boundary energy (Hallberg and Bulatov 2019, Fig. 4 and 5). Formulations of heterogeneous energies are compared with the analytical traveling wave, and the dihedral angle is shown as a function of the energy ratio. |
ex03_advection.ipynb |
Advection by a prescribed velocity field. Zalesak's slotted disc in a rigid rotation and the time reversed single vortex, compared with the results of Enright et al. (2002) for the advection schemes, two sets of WENO weights, different reinitialization intervals and grids up to 400 x 400. |
ex04_temperature.ipynb |
Temperature fields coupled to the level sets. Grain growth with an Arrhenius mobility in a steady temperature gradient gives a graded grain size, and a Gaussian heat source scanned across a deformed polycrystal drives nucleation and growth of new grains along its track, with a transient temperature and heat loss through the faces. |
ex05_hdf5.ipynb |
Saving and loading the pyLSET state in HDF5 files. Checkpoints of a grain growth simulation with orientation dependent energies, post-processing of the checkpoints with load_hdf5() and with h5py alone, and a run continued from a checkpoint with load_hdf5(restore=True) that ends exactly where the uninterrupted run ended. |
ex06_surface_geometry.ipynb |
Geometry from surface files with exact signed distances. Hot pins and an insulated slot read from a Gmsh geometry file give a graded grain size around the pins, and a part from a STEP file, compared with its STL version, radiates the heat of an internal heater from its exact surface. |
The folder examples/paper holds the scripts that reproduce the examples of the pyLSET paper. Its README.md lists the script of each example, with the run times on a GPU. Examples 4 and 7 of the paper are the notebooks ex03_advection.ipynb and ex04_temperature.ipynb.