gmshModel


NamegmshModel JSON
Version 1.0.18 PyPI version JSON
download
home_pagehttps://github.com/NEFM-TUDresden/GmshModel
SummaryA mesh modeling interface to the Gmsh-Python-API
upload_time2024-03-28 16:37:55
maintainerNone
docs_urlNone
authorPhilipp Metsch
requires_python>=3.5
licenseNone
keywords gmsh mesh preprocessing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            gmshModel
=========

.. |pypi| image:: https://img.shields.io/pypi/v/gmshModel?color=blue
   :target: https://pypi.org/project/gmshModel

.. |conda| image:: https://img.shields.io/conda/v/conda-forge/gmshModel?color=blue
   :target: https://anaconda.org/conda-forge/gmshmodel

.. |pyver| image:: https://img.shields.io/pypi/pyversions/gmshModel.svg?color=green3
   :target: https://www.python.org/

.. |GPL| image:: https://img.shields.io/pypi/l/gmshModel?color=orange
   :target: https://opensource.org/licenses/gpl-3.0.html

.. |pypiStats| image:: https://img.shields.io/pypi/dm/gmshModel?color=yellow
   :target: https://pypistats.org/packages/gmshmodel

|pypi| |conda| |pyver| |GPL| |pypiStats|

`Gmsh <https://gmsh.info/>`_ is a powerful tool for the generation of meshes for
numerical simulations but the built-in scripting language makes the meshing
procedure and especially an automatization really hard. Luckily, Gmsh provides
a Python-API with which all the capabilites of Gmsh can be used within Python.

GmshModel is intended to be an extendable tool that facilitates the mesh generation
by interfacing the Gmsh-Python-API: it provides a basic framework for an automated
mesh generation for self-defined model types and, with that, allows to automate the
generation of complex models as, e.g., representative volume elements. To this
end, gmshModel divides the mesh modeling procedure into basic steps:

1. Setting up a geometry using basic geometric entities and boolean operations.
2. Adding the geometric objects to Gmsh, performing boolean operations and defining physical groups.
3. Creating a mesh with user-defined refinement fields.
4. Saving the mesh to various output formats.
5. Visualizing the resulting mesh.

So far, gmshModel is especially designed to automate the generation of representative
volume elements that contain multiple inclusion objects and well-known unit cells
with different types of inclusions. An extension of gmshModel is, however, possible by
adding new geometric objects and model types to the framework.

It is not the purpose of gmshModel to replace the Gmsh scripting language or other
great tools such as `pygmsh <https://github.com/nschloe/pygmsh>`_  for the generation
of meshes. GmshModel rather tries to function as an interface to Gmsh to facilitate
the automation of recurring, complex meshing tasks that require the full functionality
of Gmsh within a nice and easy to use environment such as Python.


Installation
************
GmshModel is available from the `Python Package Index <https://pypi.org/project/gmshModel/>`_ and
can be installed using the following command: ::

   $ python3 -m pip install gmshModel

The integration of gmshModel into the `conda-forge <https://anaconda.org/conda-forge/gmshmodel>`_
channel allows to use a similar procedure for Conda users: ::

   $ conda install -c conda-forge gmshModel

It is also possible to download the source code from `GitHub <https://github.com/NEFM-TUDresden/GmshModel/>`_
or `PyPi <https://pypi.org/project/gmshModel/>`_ and install gmshModel manually. For more details, check
the `installation page <https://gmshmodel.readthedocs.io/en/latest/gettingStarted/installation.html>`_ of 
the documentation.


Dependencies
************
GmshModel is an interface tool and makes use of many great contributions of other
people. To experience the full functionality of Gmsh model, the following (non-standard)
software packages are required:

1. a `dynamically built Gmsh <https://gitlab.onelab.info/gmsh/gmsh/-/wikis/Gmsh-compilation/>`_  to use the Gmsh-Python-API
2. `meshio <https://github.com/nschloe/meshio/>`_  for the conversion of meshes to various output formats
3. `pyvista <https://www.pyvista.org/>`_ for the visualization of meshes
4. `pythonocc <https://github.com/tpaviot/pythonocc-core/>`_ for the visualization of the model geometry


Getting Started
***************

.. image:: https://github.com/NEFM-TUDresden/gmshModel/raw/master/docs/images/GettingStarted.png
   :alt: Sample Geometry and Mesh

To generate the above periodic box in a ``[20x20x20]`` domain which contains ``200`` spherical
inclusions of radius ``1``, simply type:

.. code-block:: python

   # import required model type
   from gmshModel.Model import RandomInclusionRVE as RVE

   # initialize new RVE
   myRVE=RVE(size=[20,20,20], inclusionType="Sphere", inclusionSets=[1, 200])

   # create Gmsh model
   myRVE.createGmshModel()

   # generate mesh
   myRVE.createMesh()

   # save resulting mesh to vtk
   myRVE.saveMesh("myRVE.vtk")

   # visualize result
   myRVE.visualizeMesh()

   # finalize Gmsh-Python-API
   myRVE.close()


Documentation
*************

The gmshModel documentation is available `here <https://gmshmodel.readthedocs.io/en/latest/>`_.


License
*******
GmshModel is published under the `GPLv3 license <https://www.gnu.org/licenses/gpl-3.0.en.html>`_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NEFM-TUDresden/GmshModel",
    "name": "gmshModel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": null,
    "keywords": "Gmsh mesh preprocessing",
    "author": "Philipp Metsch",
    "author_email": "philipp.metsch@tu-dresden.de",
    "download_url": "https://files.pythonhosted.org/packages/da/aa/0449acca4dcbc6797c4639274980c10cfbac0c680d8c34d81cc5a8bff6cf/gmshModel-1.0.18.tar.gz",
    "platform": null,
    "description": "gmshModel\r\n=========\r\n\r\n.. |pypi| image:: https://img.shields.io/pypi/v/gmshModel?color=blue\r\n   :target: https://pypi.org/project/gmshModel\r\n\r\n.. |conda| image:: https://img.shields.io/conda/v/conda-forge/gmshModel?color=blue\r\n   :target: https://anaconda.org/conda-forge/gmshmodel\r\n\r\n.. |pyver| image:: https://img.shields.io/pypi/pyversions/gmshModel.svg?color=green3\r\n   :target: https://www.python.org/\r\n\r\n.. |GPL| image:: https://img.shields.io/pypi/l/gmshModel?color=orange\r\n   :target: https://opensource.org/licenses/gpl-3.0.html\r\n\r\n.. |pypiStats| image:: https://img.shields.io/pypi/dm/gmshModel?color=yellow\r\n   :target: https://pypistats.org/packages/gmshmodel\r\n\r\n|pypi| |conda| |pyver| |GPL| |pypiStats|\r\n\r\n`Gmsh <https://gmsh.info/>`_ is a powerful tool for the generation of meshes for\r\nnumerical simulations but the built-in scripting language makes the meshing\r\nprocedure and especially an automatization really hard. Luckily, Gmsh provides\r\na Python-API with which all the capabilites of Gmsh can be used within Python.\r\n\r\nGmshModel is intended to be an extendable tool that facilitates the mesh generation\r\nby interfacing the Gmsh-Python-API: it provides a basic framework for an automated\r\nmesh generation for self-defined model types and, with that, allows to automate the\r\ngeneration of complex models as, e.g., representative volume elements. To this\r\nend, gmshModel divides the mesh modeling procedure into basic steps:\r\n\r\n1. Setting up a geometry using basic geometric entities and boolean operations.\r\n2. Adding the geometric objects to Gmsh, performing boolean operations and defining physical groups.\r\n3. Creating a mesh with user-defined refinement fields.\r\n4. Saving the mesh to various output formats.\r\n5. Visualizing the resulting mesh.\r\n\r\nSo far, gmshModel is especially designed to automate the generation of representative\r\nvolume elements that contain multiple inclusion objects and well-known unit cells\r\nwith different types of inclusions. An extension of gmshModel is, however, possible by\r\nadding new geometric objects and model types to the framework.\r\n\r\nIt is not the purpose of gmshModel to replace the Gmsh scripting language or other\r\ngreat tools such as `pygmsh <https://github.com/nschloe/pygmsh>`_  for the generation\r\nof meshes. GmshModel rather tries to function as an interface to Gmsh to facilitate\r\nthe automation of recurring, complex meshing tasks that require the full functionality\r\nof Gmsh within a nice and easy to use environment such as Python.\r\n\r\n\r\nInstallation\r\n************\r\nGmshModel is available from the `Python Package Index <https://pypi.org/project/gmshModel/>`_ and\r\ncan be installed using the following command: ::\r\n\r\n   $ python3 -m pip install gmshModel\r\n\r\nThe integration of gmshModel into the `conda-forge <https://anaconda.org/conda-forge/gmshmodel>`_\r\nchannel allows to use a similar procedure for Conda users: ::\r\n\r\n   $ conda install -c conda-forge gmshModel\r\n\r\nIt is also possible to download the source code from `GitHub <https://github.com/NEFM-TUDresden/GmshModel/>`_\r\nor `PyPi <https://pypi.org/project/gmshModel/>`_ and install gmshModel manually. For more details, check\r\nthe `installation page <https://gmshmodel.readthedocs.io/en/latest/gettingStarted/installation.html>`_ of \r\nthe documentation.\r\n\r\n\r\nDependencies\r\n************\r\nGmshModel is an interface tool and makes use of many great contributions of other\r\npeople. To experience the full functionality of Gmsh model, the following (non-standard)\r\nsoftware packages are required:\r\n\r\n1. a `dynamically built Gmsh <https://gitlab.onelab.info/gmsh/gmsh/-/wikis/Gmsh-compilation/>`_  to use the Gmsh-Python-API\r\n2. `meshio <https://github.com/nschloe/meshio/>`_  for the conversion of meshes to various output formats\r\n3. `pyvista <https://www.pyvista.org/>`_ for the visualization of meshes\r\n4. `pythonocc <https://github.com/tpaviot/pythonocc-core/>`_ for the visualization of the model geometry\r\n\r\n\r\nGetting Started\r\n***************\r\n\r\n.. image:: https://github.com/NEFM-TUDresden/gmshModel/raw/master/docs/images/GettingStarted.png\r\n   :alt: Sample Geometry and Mesh\r\n\r\nTo generate the above periodic box in a ``[20x20x20]`` domain which contains ``200`` spherical\r\ninclusions of radius ``1``, simply type:\r\n\r\n.. code-block:: python\r\n\r\n   # import required model type\r\n   from gmshModel.Model import RandomInclusionRVE as RVE\r\n\r\n   # initialize new RVE\r\n   myRVE=RVE(size=[20,20,20], inclusionType=\"Sphere\", inclusionSets=[1, 200])\r\n\r\n   # create Gmsh model\r\n   myRVE.createGmshModel()\r\n\r\n   # generate mesh\r\n   myRVE.createMesh()\r\n\r\n   # save resulting mesh to vtk\r\n   myRVE.saveMesh(\"myRVE.vtk\")\r\n\r\n   # visualize result\r\n   myRVE.visualizeMesh()\r\n\r\n   # finalize Gmsh-Python-API\r\n   myRVE.close()\r\n\r\n\r\nDocumentation\r\n*************\r\n\r\nThe gmshModel documentation is available `here <https://gmshmodel.readthedocs.io/en/latest/>`_.\r\n\r\n\r\nLicense\r\n*******\r\nGmshModel is published under the `GPLv3 license <https://www.gnu.org/licenses/gpl-3.0.en.html>`_\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A mesh modeling interface to the Gmsh-Python-API",
    "version": "1.0.18",
    "project_urls": {
        "Code": "https://github.com/NEFM-TUDresden/GmshModel",
        "Documentation": "https://gmshmodel.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/NEFM-TUDresden/GmshModel",
        "Issues": "https://github.com/NEFM-TUDresden/GmshModel/issues"
    },
    "split_keywords": [
        "gmsh",
        "mesh",
        "preprocessing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffe9165777b7be8357f53f432069ef45e8bd3601720eef754c38b3a85b8f5efc",
                "md5": "61f026e662c7ff9ba38c1ebf09bd52ba",
                "sha256": "4caf7e0b1065a0a178779142c46dd41bc14624c2f3a637572aa80bfe1b010c6b"
            },
            "downloads": -1,
            "filename": "gmshModel-1.0.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "61f026e662c7ff9ba38c1ebf09bd52ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 80326,
            "upload_time": "2024-03-28T16:25:33",
            "upload_time_iso_8601": "2024-03-28T16:25:33.973744Z",
            "url": "https://files.pythonhosted.org/packages/ff/e9/165777b7be8357f53f432069ef45e8bd3601720eef754c38b3a85b8f5efc/gmshModel-1.0.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "daaa0449acca4dcbc6797c4639274980c10cfbac0c680d8c34d81cc5a8bff6cf",
                "md5": "76f5993d145865658e947e665fd95145",
                "sha256": "730556a16999490e42b97777ac355c4b61f26dee984ff4901f4b05288f6ed292"
            },
            "downloads": -1,
            "filename": "gmshModel-1.0.18.tar.gz",
            "has_sig": false,
            "md5_digest": "76f5993d145865658e947e665fd95145",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 87498,
            "upload_time": "2024-03-28T16:37:55",
            "upload_time_iso_8601": "2024-03-28T16:37:55.217433Z",
            "url": "https://files.pythonhosted.org/packages/da/aa/0449acca4dcbc6797c4639274980c10cfbac0c680d8c34d81cc5a8bff6cf/gmshModel-1.0.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-28 16:37:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NEFM-TUDresden",
    "github_project": "GmshModel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "gmshmodel"
}
        
Elapsed time: 0.23219s