microstructpy


Namemicrostructpy JSON
Version 1.5.9 PyPI version JSON
download
home_pagehttps://github.com/kip-hart/MicroStructPy
SummaryMicrostructure modeling, mesh generation, analysis, and visualization.
upload_time2023-10-05 17:56:28
maintainer
docs_urlNone
authorKenneth (Kip) Hart
requires_python
licenseMIT License
keywords microstructure micromechanics finite element fem fea mesh polycrystal tessellation laguerre tessellation multi-sphere
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            MicroStructPy - Microstructure Mesh Generation in Python
========================================================

|s-ci|
|s-license|
|s-versions|

|s-doi1|
|s-doi2|

|l-github| `Repository <https://github.com/kip-hart/MicroStructPy>`_
|l-rtd| `Documentation <https://docs.microstructpy.org>`_
|l-pypi| `PyPI <https://pypi.org/project/microstructpy/>`_

.. end-badges

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


.. image:: https://docs.microstructpy.org/en/latest/_images/banner.png
    :alt: 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:

.. code-block:: XML

    <?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:

.. code-block:: python

    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/``.

.. begin-publications

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 <https://github.com/kip-hart/MicroStructPy/raw/master/docs/publications/cmame2020.bib>`__)
(`DOI <https://doi.org/10.1016/j.cma.2020.113242>`__)

K. A. Hart and J. J. Rimoli, MicroStructPy: A statistical microstructure mesh
generator in Python, *SoftwareX*, 12 (2020), 100595.
(`BibTeX <https://github.com/kip-hart/MicroStructPy/raw/master/docs/publications/swx2020.bib>`__)
(`DOI <https://doi.org/10.1016/j.softx.2020.100595>`__)

The news article `AE Doctoral Student Kenneth A. Hart Presents MicroStructPy to the World <https://www.ae.gatech.edu/news/2020/07/kip-hart>`__,
written by the School of Aerospace Engineering at Georgia Tech,
describes MicroStructPy for a general audience.

.. end-publications

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.


.. LINKS

.. _`Contributing Guidelines`: https://github.com/kip-hart/MicroStructPy/blob/master/.github/CONTRIBUTING.md

.. external-images

.. |l-github| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/github.svg
    :alt: GitHub

.. |l-rtd| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/rtd.svg
    :alt: ReadTheDocs

.. |l-pypi| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/pypi.svg
    :alt: PyPI


.. SHIELDS

.. |s-ci| image:: https://github.com/kip-hart/MicroStructPy/workflows/CI/badge.svg
    :target: https://github.com/kip-hart/MicroStructPy/actions
    :alt: Continuous Integration

.. |s-license| image:: https://img.shields.io/github/license/kip-hart/MicroStructPy
    :target: https://github.com/kip-hart/MicroStructPy/blob/master/LICENSE.rst
    :alt: License

.. |s-versions| image:: https://img.shields.io/pypi/pyversions/microstructpy
    :target: https://pypi.org/project/microstructpy/
    :alt: Python Versions

.. |s-doi1| image:: https://img.shields.io/badge/DOI-10.1016%2Fj.cma.2020.113242-blue
   :target: https://doi.org/10.1016/j.cma.2020.113242
   :alt: CMAME DOI

.. |s-doi2| image:: https://img.shields.io/badge/DOI-10.1016%2Fj.softx.2020.100595-blue
   :target: https://doi.org/10.1016/j.softx.2020.100595
   :alt: SoftwareX DOI

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kip-hart/MicroStructPy",
    "name": "microstructpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "microstructure,micromechanics,finite element,FEM,FEA,mesh,polycrystal,tessellation,Laguerre tessellation,multi-sphere",
    "author": "Kenneth (Kip) Hart",
    "author_email": "kiphart91@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/72/8d229e355b96f30d1400d96f566a0c15ac7ce4d84f68c75a7cc52b1c311d/microstructpy-1.5.9.tar.gz",
    "platform": null,
    "description": "MicroStructPy - Microstructure Mesh Generation in Python\n========================================================\n\n|s-ci|\n|s-license|\n|s-versions|\n\n|s-doi1|\n|s-doi2|\n\n|l-github| `Repository <https://github.com/kip-hart/MicroStructPy>`_\n|l-rtd| `Documentation <https://docs.microstructpy.org>`_\n|l-pypi| `PyPI <https://pypi.org/project/microstructpy/>`_\n\n.. end-badges\n\nMicroStructPy is a microstructure mesh generator written in Python.\nFeatures of MicroStructPy include:\n\n* 2D and 3D microstructures\n* Grain size, shape, orientation, and position control\n* Polycrystals, amorphous phases, and voids\n* Unstructured and raster meshes\n* Mesh verification\n* Visualizations\n* Output to common file formats\n* Customizable workflow\n\n\n.. image:: https://docs.microstructpy.org/en/latest/_images/banner.png\n    :alt: Banner image showing the three steps for creating microstructure.\n\n*The three steps to creating a microstructure are:\n1) seed the domain with particles,\n2) create a Voronoi power diagram, and\n3) convert the diagram into an unstructured mesh.*\n\nDownload & Installation\n-----------------------\n\nTo install MicroStructPy, download it from PyPI using::\n\n    pip install microstructpy\n\nIf there is an error with the install, try ``pip install pybind11`` first,\nthen install MicroStructPy.\n\n\nMicroStructPy can also be installed from source::\n\n    git clone https://github.com/kip-hart/MicroStructPy.git\n    pip install -e MicroStructPy/\n\nInstalling MicroStructPy creates the command line program ``microstructpy`` and\nthe Python package ``microstructpy``.\nThe command line program executes a standard workflow on XML input files,\nwhile the package exposes classes and functions for a customized workflow.\n\n\nRun a Demo\n----------\n\nMicroStructPy includes several demo and example files to help new users get\nstarted with the program.\nA full list of examples is available online at\nhttps://docs.microstructpy.org/examples.html.\n\nHere is minimal example input file:\n\n.. code-block:: XML\n\n    <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    <input>\n        <material>\n            <shape> circle </shape>\n            <size> 0.15 </size>\n        </material>\n\n        <domain>\n            <shape> square </shape>\n        </domain>\n    </input>\n\nThis example can be run from the command line by excuting::\n\n    microstructpy --demo=minimal.xml\n\nAlternatively, you can copy the text to a file such as\n``my_input.xml`` and run ``microstructpy my_input.xml``.\n\nThe same output can be obtained from using the package in a script:\n\n.. code-block:: python\n\n    import matplotlib.pyplot as plt\n    import microstructpy as msp\n\n\n    phase = {'shape': 'circle', 'size': 0.15}\n    domain = msp.geometry.Square()\n\n    # Unpositioned list of seeds\n    seeds = msp.seeding.SeedList.from_info(phase, domain.area)\n\n    # Position seeds in domain\n    seeds.position(domain)\n\n    # Create polygonal mesh\n    polygon_mesh = msp.meshing.PolyMesh.from_seeds(seeds, domain)\n\n    # Create triangular mesh\n    triangle_mesh = msp.meshing.TriMesh.from_polymesh(polygon_mesh)\n\n    # Plot outputs\n    for output in [seeds, polygon_mesh, triangle_mesh]:\n        plt.figure()\n        output.plot(edgecolor='k')\n        plt.axis('image')\n        plt.axis([-0.5, 0.5, -0.5, 0.5])\n        plt.show()\n\nDocumentation\n-------------\n\nMicroStructPy documentation is available online at\nhttps://docs.microstructpy.org.\n\nTo build a local copy of the documentation, execute the following from the\ntop-level directory of the MicroStructPy repository::\n\n    pip install tox\n    tox -e docs\n\nOnce built, the documentation will be in ``docs/build/``.\n\n.. begin-publications\n\nPublications\n------------\n\nIf you use MicroStructPy in you work, please consider including these citations\nin your bibliography:\n\nK. A. Hart and J. J. Rimoli, Generation of statistically representative\nmicrostructures with direct grain geometry control,\n*Computer Methods in Applied Mechanics and Engineering*, 370 (2020), 113242.\n(`BibTeX <https://github.com/kip-hart/MicroStructPy/raw/master/docs/publications/cmame2020.bib>`__)\n(`DOI <https://doi.org/10.1016/j.cma.2020.113242>`__)\n\nK. A. Hart and J. J. Rimoli, MicroStructPy: A statistical microstructure mesh\ngenerator in Python, *SoftwareX*, 12 (2020), 100595.\n(`BibTeX <https://github.com/kip-hart/MicroStructPy/raw/master/docs/publications/swx2020.bib>`__)\n(`DOI <https://doi.org/10.1016/j.softx.2020.100595>`__)\n\nThe news article `AE Doctoral Student Kenneth A. Hart Presents MicroStructPy to the World <https://www.ae.gatech.edu/news/2020/07/kip-hart>`__,\nwritten by the School of Aerospace Engineering at Georgia Tech,\ndescribes MicroStructPy for a general audience.\n\n.. end-publications\n\nContributing\n------------\n\nContributions to the project are welcome.\nPlease use the GitHub pull request and issue submission features.\nSee the `Contributing Guidelines`_ for more details.\n\n\nLicense and Attributions\n------------------------\n\nMicroStructPy is open source and freely available.\nCopyright for MicroStructPy is held by Georgia Tech Research Corporation.\nMicroStructPy is a major part of Kenneth (Kip) Hart's doctoral thesis,\nadvised by Prof. Julian Rimoli.\n\n\n.. LINKS\n\n.. _`Contributing Guidelines`: https://github.com/kip-hart/MicroStructPy/blob/master/.github/CONTRIBUTING.md\n\n.. external-images\n\n.. |l-github| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/github.svg\n    :alt: GitHub\n\n.. |l-rtd| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/rtd.svg\n    :alt: ReadTheDocs\n\n.. |l-pypi| image:: https://github.com/kip-hart/MicroStructPy/raw/master/docs/source/_static/pypi.svg\n    :alt: PyPI\n\n\n.. SHIELDS\n\n.. |s-ci| image:: https://github.com/kip-hart/MicroStructPy/workflows/CI/badge.svg\n    :target: https://github.com/kip-hart/MicroStructPy/actions\n    :alt: Continuous Integration\n\n.. |s-license| image:: https://img.shields.io/github/license/kip-hart/MicroStructPy\n    :target: https://github.com/kip-hart/MicroStructPy/blob/master/LICENSE.rst\n    :alt: License\n\n.. |s-versions| image:: https://img.shields.io/pypi/pyversions/microstructpy\n    :target: https://pypi.org/project/microstructpy/\n    :alt: Python Versions\n\n.. |s-doi1| image:: https://img.shields.io/badge/DOI-10.1016%2Fj.cma.2020.113242-blue\n   :target: https://doi.org/10.1016/j.cma.2020.113242\n   :alt: CMAME DOI\n\n.. |s-doi2| image:: https://img.shields.io/badge/DOI-10.1016%2Fj.softx.2020.100595-blue\n   :target: https://doi.org/10.1016/j.softx.2020.100595\n   :alt: SoftwareX DOI\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Microstructure modeling, mesh generation, analysis, and visualization.",
    "version": "1.5.9",
    "project_urls": {
        "Documentation": "https://docs.microstructpy.org",
        "Homepage": "https://github.com/kip-hart/MicroStructPy"
    },
    "split_keywords": [
        "microstructure",
        "micromechanics",
        "finite element",
        "fem",
        "fea",
        "mesh",
        "polycrystal",
        "tessellation",
        "laguerre tessellation",
        "multi-sphere"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3183cd35e61d13b1e09c1848b1142f849ac0efdb2a594e2884b8fcdc0541d060",
                "md5": "785f025e889dd10c1c53872051e10b84",
                "sha256": "f07096c581ad6c12e3d1b4ab48382abfe920d14e03935de595ce6dea7dfd621b"
            },
            "downloads": -1,
            "filename": "microstructpy-1.5.9-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "785f025e889dd10c1c53872051e10b84",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 129900,
            "upload_time": "2023-10-05T17:56:27",
            "upload_time_iso_8601": "2023-10-05T17:56:27.311948Z",
            "url": "https://files.pythonhosted.org/packages/31/83/cd35e61d13b1e09c1848b1142f849ac0efdb2a594e2884b8fcdc0541d060/microstructpy-1.5.9-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb728d229e355b96f30d1400d96f566a0c15ac7ce4d84f68c75a7cc52b1c311d",
                "md5": "916a06f1d00d01e4a52cee5f571d010b",
                "sha256": "a1bafda7fa99bb6071f7d5af8ac4bc0ec215c6c5f7b22cb48b51af0f06b28058"
            },
            "downloads": -1,
            "filename": "microstructpy-1.5.9.tar.gz",
            "has_sig": false,
            "md5_digest": "916a06f1d00d01e4a52cee5f571d010b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1196949,
            "upload_time": "2023-10-05T17:56:28",
            "upload_time_iso_8601": "2023-10-05T17:56:28.939499Z",
            "url": "https://files.pythonhosted.org/packages/bb/72/8d229e355b96f30d1400d96f566a0c15ac7ce4d84f68c75a7cc52b1c311d/microstructpy-1.5.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-05 17:56:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kip-hart",
    "github_project": "MicroStructPy",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "microstructpy"
}
        
Elapsed time: 0.13667s