ansys-mapdl-core


Nameansys-mapdl-core JSON
Version 0.57.5 PyPI version JSON
download
home_pagehttps://github.com/pyansys/pymapdl
SummaryPython interface to MAPDL Service
upload_time2021-01-27 05:23:46
maintainer
docs_urlNone
author
requires_python>=3.6.*
licenseMIT
keywords ansys mapdl grpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PyMAPDL
=======
.. image:: https://badge.fury.io/py/ansys-mapdl-core.svg
    :target: https://badge.fury.io/py/ansys-mapdl-core

.. image:: https://dev.azure.com/pyansys/pyansys/_apis/build/status/pyansys.pymapdl?branchName=master
    :target: https://dev.azure.com/pyansys/pyansys/_build/latest?definitionId=5&branchName=master

.. image:: https://zenodo.org/badge/70696039.svg
   :target: https://zenodo.org/badge/latestdoi/70696039


See the `Documentation <https://mapdldocs.pyansys.com>`_ page for more
details, and the `Examples gallery
<https://mapdldocs.pyansys.com/pyansys/examples/index.html>`_ for some
examples.

Please feel free to post issues and other questions at `PyMAPDL Issues
<https://github.com/pyansys/pymapdl/issues>`_.  This is the best place
to post questions and code.


Project Transition - Legacy Support
-----------------------------------
This project was formerly known as ``pyansys``, and we'd like to thank
all the early adopters, contributors, and users who submitted issues,
gave feedback, and contributed code through the years.  The
``pyansys`` project has been taken up Ansys and will be leveraged in
creating new Pythonic, cross-platform, and multi-language service
based interfaces for Ansys's products.  Your contributions to
``pyansys`` has shaped it into a better solution.

The ``pyansys`` project is expanding beyond just MAPDL, and while
there are many new features and changes to the original Python module,
many steps have been taken to ensure compatibility with legacy code
while supporting new features.  The original python module has been
split up into the following projects and modules:

 - `ansys.mapdl.core <https://github.com/pyansys/pymapdl>`_
 - `ansys.mapdl.reader <https://github.com/pyansys/pymapdl-reader>`_
 - `ansys.mapdl.corba <https://github.com/pyansys/pymapdl-corba>`_

Please visit the GitHub pages for further details regarding each project.


Installation
------------
The ``ansys.mapdl.core`` package currently supports Python 3.6 through
Python 3.8 on Windows, Mac OS, and Linux.

Install the latest release from `PyPi
<https://pypi.org/project/ansys-mapdl-core/>`_ with:

.. code::

   pip install ansys.mapdl-core

Alternatively, install the latest from `PyMAPDL GitHub
<https://github.com/pyansys/pymapdl/issues>`_ via:

.. code::

   pip install git+https://github.com/pyansys/pymapdl.git


For a local "development" version, install with:

.. code::

   git clone https://github.com/pyansys/pymapdl.git
   cd mapdl
   pip install -e .


Dependencies
------------
You will need a local licenced copy of ANSYS to run MAPDL prior and
including 2021R1.  If you have the latest version of 2021R1, you can
connect to a remote instance of MAPDL and do not need MAPDL installed
locally and can connect to a remote instance via gRPC.


Getting Started
---------------

Launch MAPDL Locally
~~~~~~~~~~~~~~~~~~~~
You can launch MAPDL locally directly from Python using ``launch_mapdl``:

.. code:: python

    from ansys.mapdl.core import launch_mapdl
    mapdl = launch_mapdl()

This automatically searches for the latest local version of MAPDL,
launches it as a background process, and immediately connects to it.
You can then start sending python commands to MAPDL.


Launching Manually or Connecting to a Remote Instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you wish to connect to a session of MAPDL on a remote computer
(either locally the LAN or through the internet), first ensure you
have MAPDL started in gRPC server mode.  This example assumes you will
be launching an instance locally from Windows, but can be easily
adapted to run from Linux, or the LAN provided the necessary ports are
open.  This example specifies the port with ``-port 50052``, but this
option can be left out if you plan on using the default port 50052.

.. code::

    start "MAPDL" "%ANSYS211_DIR%\bin\winx64\ANSYS211.exe" -port 50052 -grpc

Next, connect to the instance of MAPDL from python with:

.. code:: python

    >>> from ansys.mapdl import Mapdl
    >>> ip = '127.0.0.1'
    >>> mapdl = Mapdl(ip=ip, port=50052, request_instance=False)
    >>> print(mapdl)


A successful connection returns:

.. code::

    Product:             ANSYS Mechanical Enterprise
    MAPDL Version:       RELEASE  2020 R2           BUILD 20.2TEST  UPDATE 20200601
    ansys.mapdl.core Version: 0.57.0


Should you wish to connect to this instance of MAPDL from a remote
computer, you substitute ``ip=`` with the LAN or WAN address of the
computer you wish to connect to.  Depending on your network settings,
you may have to open local ports or enable port redirection across the
WAN.


Basic Usage
~~~~~~~~~~~
You run MAPDL commands via:

.. code:: python

    mapdl.run('/PREP7')


Nearly all the built-in MAPDL commands have an associated pythonic
method mapped to it.  For example, `/PREP7` is:

.. code:: python

    mapdl.prep7()


There are also non-mapdl commands such as ``mapdl.eplot`` which plot
elements using ``vtk`` and ``pyvista`` rather than relying on MAPDL's
graphics server.  Another is ``mapdl.vget``, which leverages gRPC to
rapidly exchange binary arrays from MAPDL to Python rather than
relying on file IO to exchange data.

Additionally, there are the ``post_processing``, ``geometry``, and
``mesh`` properties, which you can use to perform remote (or local)
post processing without result file exchange, display geometry
properties, or view mesh statistics.  Additionally, there's the
``parameters`` property which shows the active MAPDL parameters, and
you can use to send or receive arrays between MAPDL and Python.

See the full documentation at `PyMAPDL Documentation
<https://mapdldocs.pyansys.com>`_ for more details.


Run on Docker
~~~~~~~~~~~~~
Run MAPDL within a container on any OS with ``docker``!

See `MAPDL on Docker README
<https://github.com/pyansys/pymapdl/blob/master/docker/README.md>`_
for details regarding using MAPDL within a container.


Citing this Module
-------------------
If you use ``PyMAPDL`` for research and would like to cite the module
and source, you can visit `pyansys Zenodo
<https://zenodo.org/badge/latestdoi/70696039>`_ and generate the
correct citation.  For example, the BibTex citation is:

.. code::

    @software{alexander_kaszynski_2020_4009467,
      author       = {Alexander Kaszynski},
      title        = {{pyansys: Python Interface to MAPDL and Associated 
                       Binary and ASCII Files}},
      month        = aug,
      year         = 2020,
      publisher    = {Zenodo},
      version      = {0.43.2},
      doi          = {10.5281/zenodo.4009467},
      url          = {https://doi.org/10.5281/zenodo.4009467}
    }

Please visit the link above for the most recent citation as the
citation here may not be current.


License and Acknowledgments
---------------------------
``PyMAPDL`` is licensed under the MIT license.

This module, ``ansys-mapdl-core`` makes no commercial claim over ANSYS
whatsoever.  This tool extends the functionality of ``MAPDL`` by
adding a Python interface to the MAPDL service without changing the
core behavior or license of the original software.  The use of the
interactive APDL control of ``PyMAPDL`` requires a legally licensed
local copy of ANSYS.

To get a copy of ANSYS, please visit `ANSYS <https://www.ansys.com/>`_.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pyansys/pymapdl",
    "name": "ansys-mapdl-core",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6.*",
    "maintainer_email": "",
    "keywords": "ANSYS MAPDL gRPC",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/03/10/64dac89d60496ab1f11909f89ab01575d8e98dd5c5a2fd22067299f92751/ansys-mapdl-core-0.57.5.tar.gz",
    "platform": "",
    "description": "PyMAPDL\n=======\n.. image:: https://badge.fury.io/py/ansys-mapdl-core.svg\n    :target: https://badge.fury.io/py/ansys-mapdl-core\n\n.. image:: https://dev.azure.com/pyansys/pyansys/_apis/build/status/pyansys.pymapdl?branchName=master\n    :target: https://dev.azure.com/pyansys/pyansys/_build/latest?definitionId=5&branchName=master\n\n.. image:: https://zenodo.org/badge/70696039.svg\n   :target: https://zenodo.org/badge/latestdoi/70696039\n\n\nSee the `Documentation <https://mapdldocs.pyansys.com>`_ page for more\ndetails, and the `Examples gallery\n<https://mapdldocs.pyansys.com/pyansys/examples/index.html>`_ for some\nexamples.\n\nPlease feel free to post issues and other questions at `PyMAPDL Issues\n<https://github.com/pyansys/pymapdl/issues>`_.  This is the best place\nto post questions and code.\n\n\nProject Transition - Legacy Support\n-----------------------------------\nThis project was formerly known as ``pyansys``, and we'd like to thank\nall the early adopters, contributors, and users who submitted issues,\ngave feedback, and contributed code through the years.  The\n``pyansys`` project has been taken up Ansys and will be leveraged in\ncreating new Pythonic, cross-platform, and multi-language service\nbased interfaces for Ansys's products.  Your contributions to\n``pyansys`` has shaped it into a better solution.\n\nThe ``pyansys`` project is expanding beyond just MAPDL, and while\nthere are many new features and changes to the original Python module,\nmany steps have been taken to ensure compatibility with legacy code\nwhile supporting new features.  The original python module has been\nsplit up into the following projects and modules:\n\n - `ansys.mapdl.core <https://github.com/pyansys/pymapdl>`_\n - `ansys.mapdl.reader <https://github.com/pyansys/pymapdl-reader>`_\n - `ansys.mapdl.corba <https://github.com/pyansys/pymapdl-corba>`_\n\nPlease visit the GitHub pages for further details regarding each project.\n\n\nInstallation\n------------\nThe ``ansys.mapdl.core`` package currently supports Python 3.6 through\nPython 3.8 on Windows, Mac OS, and Linux.\n\nInstall the latest release from `PyPi\n<https://pypi.org/project/ansys-mapdl-core/>`_ with:\n\n.. code::\n\n   pip install ansys.mapdl-core\n\nAlternatively, install the latest from `PyMAPDL GitHub\n<https://github.com/pyansys/pymapdl/issues>`_ via:\n\n.. code::\n\n   pip install git+https://github.com/pyansys/pymapdl.git\n\n\nFor a local \"development\" version, install with:\n\n.. code::\n\n   git clone https://github.com/pyansys/pymapdl.git\n   cd mapdl\n   pip install -e .\n\n\nDependencies\n------------\nYou will need a local licenced copy of ANSYS to run MAPDL prior and\nincluding 2021R1.  If you have the latest version of 2021R1, you can\nconnect to a remote instance of MAPDL and do not need MAPDL installed\nlocally and can connect to a remote instance via gRPC.\n\n\nGetting Started\n---------------\n\nLaunch MAPDL Locally\n~~~~~~~~~~~~~~~~~~~~\nYou can launch MAPDL locally directly from Python using ``launch_mapdl``:\n\n.. code:: python\n\n    from ansys.mapdl.core import launch_mapdl\n    mapdl = launch_mapdl()\n\nThis automatically searches for the latest local version of MAPDL,\nlaunches it as a background process, and immediately connects to it.\nYou can then start sending python commands to MAPDL.\n\n\nLaunching Manually or Connecting to a Remote Instance\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you wish to connect to a session of MAPDL on a remote computer\n(either locally the LAN or through the internet), first ensure you\nhave MAPDL started in gRPC server mode.  This example assumes you will\nbe launching an instance locally from Windows, but can be easily\nadapted to run from Linux, or the LAN provided the necessary ports are\nopen.  This example specifies the port with ``-port 50052``, but this\noption can be left out if you plan on using the default port 50052.\n\n.. code::\n\n    start \"MAPDL\" \"%ANSYS211_DIR%\\bin\\winx64\\ANSYS211.exe\" -port 50052 -grpc\n\nNext, connect to the instance of MAPDL from python with:\n\n.. code:: python\n\n    >>> from ansys.mapdl import Mapdl\n    >>> ip = '127.0.0.1'\n    >>> mapdl = Mapdl(ip=ip, port=50052, request_instance=False)\n    >>> print(mapdl)\n\n\nA successful connection returns:\n\n.. code::\n\n    Product:             ANSYS Mechanical Enterprise\n    MAPDL Version:       RELEASE  2020 R2           BUILD 20.2TEST  UPDATE 20200601\n    ansys.mapdl.core Version: 0.57.0\n\n\nShould you wish to connect to this instance of MAPDL from a remote\ncomputer, you substitute ``ip=`` with the LAN or WAN address of the\ncomputer you wish to connect to.  Depending on your network settings,\nyou may have to open local ports or enable port redirection across the\nWAN.\n\n\nBasic Usage\n~~~~~~~~~~~\nYou run MAPDL commands via:\n\n.. code:: python\n\n    mapdl.run('/PREP7')\n\n\nNearly all the built-in MAPDL commands have an associated pythonic\nmethod mapped to it.  For example, `/PREP7` is:\n\n.. code:: python\n\n    mapdl.prep7()\n\n\nThere are also non-mapdl commands such as ``mapdl.eplot`` which plot\nelements using ``vtk`` and ``pyvista`` rather than relying on MAPDL's\ngraphics server.  Another is ``mapdl.vget``, which leverages gRPC to\nrapidly exchange binary arrays from MAPDL to Python rather than\nrelying on file IO to exchange data.\n\nAdditionally, there are the ``post_processing``, ``geometry``, and\n``mesh`` properties, which you can use to perform remote (or local)\npost processing without result file exchange, display geometry\nproperties, or view mesh statistics.  Additionally, there's the\n``parameters`` property which shows the active MAPDL parameters, and\nyou can use to send or receive arrays between MAPDL and Python.\n\nSee the full documentation at `PyMAPDL Documentation\n<https://mapdldocs.pyansys.com>`_ for more details.\n\n\nRun on Docker\n~~~~~~~~~~~~~\nRun MAPDL within a container on any OS with ``docker``!\n\nSee `MAPDL on Docker README\n<https://github.com/pyansys/pymapdl/blob/master/docker/README.md>`_\nfor details regarding using MAPDL within a container.\n\n\nCiting this Module\n-------------------\nIf you use ``PyMAPDL`` for research and would like to cite the module\nand source, you can visit `pyansys Zenodo\n<https://zenodo.org/badge/latestdoi/70696039>`_ and generate the\ncorrect citation.  For example, the BibTex citation is:\n\n.. code::\n\n    @software{alexander_kaszynski_2020_4009467,\n      author       = {Alexander Kaszynski},\n      title        = {{pyansys: Python Interface to MAPDL and Associated \n                       Binary and ASCII Files}},\n      month        = aug,\n      year         = 2020,\n      publisher    = {Zenodo},\n      version      = {0.43.2},\n      doi          = {10.5281/zenodo.4009467},\n      url          = {https://doi.org/10.5281/zenodo.4009467}\n    }\n\nPlease visit the link above for the most recent citation as the\ncitation here may not be current.\n\n\nLicense and Acknowledgments\n---------------------------\n``PyMAPDL`` is licensed under the MIT license.\n\nThis module, ``ansys-mapdl-core`` makes no commercial claim over ANSYS\nwhatsoever.  This tool extends the functionality of ``MAPDL`` by\nadding a Python interface to the MAPDL service without changing the\ncore behavior or license of the original software.  The use of the\ninteractive APDL control of ``PyMAPDL`` requires a legally licensed\nlocal copy of ANSYS.\n\nTo get a copy of ANSYS, please visit `ANSYS <https://www.ansys.com/>`_.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python interface to MAPDL Service",
    "version": "0.57.5",
    "split_keywords": [
        "ansys",
        "mapdl",
        "grpc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "7b07331158a03119734d1ac9247233d0",
                "sha256": "4df7389e76c976dbd7c21f948ca27d32a70d634dce7e9c8919ed1bb7087b3156"
            },
            "downloads": -1,
            "filename": "ansys_mapdl_core-0.57.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7b07331158a03119734d1ac9247233d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6.*",
            "size": 1338025,
            "upload_time": "2021-01-27T05:23:44",
            "upload_time_iso_8601": "2021-01-27T05:23:44.809296Z",
            "url": "https://files.pythonhosted.org/packages/7b/09/67e437c763e8414add92aa7ff6f00c99983c3da307f5c208c93ca527db76/ansys_mapdl_core-0.57.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "fbd34aff784fd8e06b8b20308fddb752",
                "sha256": "bf1cda06bc03bce998035f22f92852ed5b1c1da34458762da020c92f49807d56"
            },
            "downloads": -1,
            "filename": "ansys-mapdl-core-0.57.5.tar.gz",
            "has_sig": false,
            "md5_digest": "fbd34aff784fd8e06b8b20308fddb752",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6.*",
            "size": 1143019,
            "upload_time": "2021-01-27T05:23:46",
            "upload_time_iso_8601": "2021-01-27T05:23:46.558511Z",
            "url": "https://files.pythonhosted.org/packages/03/10/64dac89d60496ab1f11909f89ab01575d8e98dd5c5a2fd22067299f92751/ansys-mapdl-core-0.57.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-01-27 05:23:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "pyansys",
    "error": "Could not fetch GitHub repository",
    "lcname": "ansys-mapdl-core"
}
        
Elapsed time: 0.20987s