All Projects → kip-hart → MicroStructPy

kip-hart / MicroStructPy

Licence: MIT license
Microstructure modeling, mesh generation, analysis, and visualization.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to MicroStructPy

neper
Polycrystal generation and meshing
Stars: ✭ 111 (+164.29%)
Mutual labels:  meshing, microstructure, polycrystal
jigsaw-geo-matlab
MATLAB bindings for JIGSAW(GEO): an unstructured mesh generator for geoscientific modelling.
Stars: ✭ 26 (-38.1%)
Mutual labels:  mesh-generation, voronoi-tessellation
PhaceXL 2D
Script for the generation of finite-thickness interface elements for polycrystal modelling
Stars: ✭ 15 (-64.29%)
Mutual labels:  microstructure, polycrystal
naive-surface-nets
Implements a simple, readable naive surface nets algorithm
Stars: ✭ 31 (-26.19%)
Mutual labels:  meshing, mesh-generation
MATBOX Microstructure analysis toolbox
MATBOX is an open-source MATLAB toolbox dedicated to microstructure analsyis of porous/heterogeneous materials
Stars: ✭ 27 (-35.71%)
Mutual labels:  microstructure, microstructure-generator
jigsaw-matlab
MATLAB bindings for JIGSAW: a Delaunay-based unstructured mesh generator.
Stars: ✭ 57 (+35.71%)
Mutual labels:  mesh-generation, voronoi-tessellation
jigsaw-python
Python bindings for JIGSAW: a Delaunay-based unstructured mesh generator.
Stars: ✭ 24 (-42.86%)
Mutual labels:  mesh-generation, voronoi-tessellation
zmesh
Marching Cubes & Mesh Simplification on multi-label 3D images.
Stars: ✭ 37 (-11.9%)
Mutual labels:  meshing, mesh-generation
roadifier
Open Source road mesh generator script for Unity
Stars: ✭ 30 (-28.57%)
Mutual labels:  mesh-generation
loop subdivision
A C++ implementing of Loop subdivision
Stars: ✭ 19 (-54.76%)
Mutual labels:  meshing
2DRoomLOS
2D line-of-sight mesh generator voor room based games
Stars: ✭ 50 (+19.05%)
Mutual labels:  mesh-generation
unity-plumber
A component to procedurally generate pipe-like meshes in Unity
Stars: ✭ 55 (+30.95%)
Mutual labels:  mesh-generation
ConstructiveGeometry.jl
Algorithms and syntax for building CSG objects within Julia.
Stars: ✭ 27 (-35.71%)
Mutual labels:  meshing
Unity-Procedural
Spline based mesh generation
Stars: ✭ 67 (+59.52%)
Mutual labels:  mesh-generation
bichon
Robust Coarse Curved TetMesh Generation
Stars: ✭ 29 (-30.95%)
Mutual labels:  mesh-generation
GEOMetrics
Repo for the paper "GEOMetrics: Exploiting Geometric Structure for Graph-Encoded Objects"
Stars: ✭ 116 (+176.19%)
Mutual labels:  mesh-generation
yak
yak (yet another kinfu) is a library and ROS wrapper for Truncated Signed Distance Fields (TSDFs).
Stars: ✭ 25 (-40.48%)
Mutual labels:  meshing
slice2mesh
From sliced data to volumetric meshes for the simulation of AM processes
Stars: ✭ 26 (-38.1%)
Mutual labels:  mesh-generation
Meshlab
The open source mesh processing system
Stars: ✭ 2,619 (+6135.71%)
Mutual labels:  mesh-generation
2D-Elliptic-Mesh-Generator
2D orthogonal elliptic mesh generator which solves the Winslow partial differential equations
Stars: ✭ 36 (-14.29%)
Mutual labels:  mesh-generation

MicroStructPy - Microstructure Mesh Generation in Python

Continuous Integration License Python Versions

CMAME DOI SoftwareX DOI

GitHub Repository ReadTheDocs Documentation PyPI PyPI

MicroStructPy is a microstructure mesh generator written in Python. Features of MicroStructPy include:

  • 2D and 3D microstructures
  • Grain size, shape, orientation, and position control
  • Polycrystals, amorphous phases, and voids
  • Unstructured and raster meshes
  • Mesh verification
  • Visualizations
  • Output to common file formats
  • Customizable workflow

Banner image showing the three steps for creating microstructure.

The three steps to creating a microstructure are: 1) seed the domain with particles, 2) create a Voronoi power diagram, and 3) convert the diagram into an unstructured mesh.

Download & Installation

To install MicroStructPy, download it from PyPI using:

pip install microstructpy

If there is an error with the install, try pip install pybind11 first, then install MicroStructPy.

MicroStructPy can also be installed from source:

git clone https://github.com/kip-hart/MicroStructPy.git
pip install -e MicroStructPy/

Installing MicroStructPy creates the command line program microstructpy and the Python package microstructpy. The command line program executes a standard workflow on XML input files, while the package exposes classes and functions for a customized workflow.

Run a Demo

MicroStructPy includes several demo and example files to help new users get started with the program. A full list of examples is available online at https://docs.microstructpy.org/examples.html.

Here is minimal example input file:

<?xml version="1.0" encoding="UTF-8"?>
<input>
    <material>
        <shape> circle </shape>
        <size> 0.15 </size>
    </material>

    <domain>
        <shape> square </shape>
    </domain>
</input>

This example can be run from the command line by excuting:

microstructpy --demo=minimal.xml

Alternatively, you can copy the text to a file such as my_input.xml and run microstructpy my_input.xml.

The same output can be obtained from using the package in a script:

import matplotlib.pyplot as plt
import microstructpy as msp


phase = {'shape': 'circle', 'size': 0.15}
domain = msp.geometry.Square()

# Unpositioned list of seeds
seeds = msp.seeding.SeedList.from_info(phase, domain.area)

# Position seeds in domain
seeds.position(domain)

# Create polygonal mesh
polygon_mesh = msp.meshing.PolyMesh.from_seeds(seeds, domain)

# Create triangular mesh
triangle_mesh = msp.meshing.TriMesh.from_polymesh(polygon_mesh)

# Plot outputs
for output in [seeds, polygon_mesh, triangle_mesh]:
    plt.figure()
    output.plot(edgecolor='k')
    plt.axis('image')
    plt.axis([-0.5, 0.5, -0.5, 0.5])
    plt.show()

Documentation

MicroStructPy documentation is available online at https://docs.microstructpy.org.

To build a local copy of the documentation, execute the following from the top-level directory of the MicroStructPy repository:

pip install tox
tox -e docs

Once built, the documentation will be in docs/build/.

Publications

If you use MicroStructPy in you work, please consider including these citations in your bibliography:

K. A. Hart and J. J. Rimoli, Generation of statistically representative microstructures with direct grain geometry control, Computer Methods in Applied Mechanics and Engineering, 370 (2020), 113242. (BibTeX) (DOI)

K. A. Hart and J. J. Rimoli, MicroStructPy: A statistical microstructure mesh generator in Python, SoftwareX, 12 (2020), 100595. (BibTeX) (DOI)

The news article AE Doctoral Student Kenneth A. Hart Presents MicroStructPy to the World, written by the School of Aerospace Engineering at Georgia Tech, describes MicroStructPy for a general audience.

Contributing

Contributions to the project are welcome. Please use the GitHub pull request and issue submission features. See the Contributing Guidelines for more details.

License and Attributions

MicroStructPy is open source and freely available. Copyright for MicroStructPy is held by Georgia Tech Research Corporation. MicroStructPy is a major part of Kenneth (Kip) Hart's doctoral thesis, advised by Prof. Julian Rimoli.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].