{ "info": { "author": "Brecht Baeten", "author_email": "brecht.baeten@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2.7" ], "description": "dympy\n=====\n\nA tool to communicate with Dymola from python on Windows\ndympy communicates with dymola through DDE (Dynamic Data Exchange).\nAfter a connection with an open Dymola window is established, commands can be sent as if they were typed in the Dymola command line.\nSeveral usefull commands (opening models, setting model parameters, compiling, writing a dsin.txt file, simulating, and loading results,...) have been predefined for ease of use.\n\nCheck the example below for a quickstart or the docstrings for a more complete guide.\n\nInstallation\n------------\nrequires:\n\n- ``numpy``\n- ``scipy``\n- ``pywin32`` `available here `_.\n\nTo install download the latest `release `_., unpack, cd to the unpacked folder and run::\n\n\tpython setup.py install\n\n\nExample\n-------\n\nFirst initialize the Dymola connection. It is good practice to clear all open models from Dymola after initialization to avoid redefinition conflicts, however this is not necessary::\n\n\tdymola = dympy.Dymola()\n\tdymola.clear()\n\nNext we'll open a model and compile it::\n\n\tdymola.openModel('example.mo')\n\tdymola.compile('example')\n\nParameters can be changed using the ``set_parameters`` method. The method takes a dictionary with name, value pairs as input.\nInputs can be written to a dsu.txt file using the ``write_dsu`` method. The method again takes a dictionary with name, value pairs as input, ``time`` must always be one of the inputs::\n\n\tdymola.set_parameters({'C_in.C':5e6,'C_em.C':10e6,'UA_em_in.G':1600,'UA_in_amb.G':200})\n\tdymola.set_parameters({'C_em.T':300})\n\tdymola.write_dsu({'time':[0,43200,86400],'Q_flow_hp':[1000,5000,2000],'T_amb':[273.15,278.15,273.15]})\n\n\nThe simulation can now be started within a certain time range::\n\n\tdymola.simulate(StopTime=86400)\n\n\nAfter the simulation is finished you can load the results as a dictionary using ``get_result()``.\nThe result is a dictionary with the variable names in dot notation as keys::\n\n\tres = dymola.get_result()\n\tprint(res.keys())\n\nThere is also a ``get_res`` method implemented which will return all result keys which are children of the supplied argument key.\nIf the argument has no children it's value is returned::\n\n\tdymola.get_res('UA_em_in')", "description_content_type": null, "docs_url": "https://pythonhosted.org/dympy/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/BrechtBa/dympy", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "dympy", "package_url": "https://pypi.org/project/dympy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dympy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/BrechtBa/dympy" }, "release_url": "https://pypi.org/project/dympy/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "Python-Dymola communication on windows", "version": "0.0.3" }, "last_serial": 2372896, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "3a7d6f934a220e5321f031b61165322b", "sha256": "5ac36fdfc54607a7dd31eb8fb340e89ddfce468a80adc4c519dd0bb54f035030" }, "downloads": -1, "filename": "dympy-0.0.3.zip", "has_sig": false, "md5_digest": "3a7d6f934a220e5321f031b61165322b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51956, "upload_time": "2016-09-30T09:32:34", "url": "https://files.pythonhosted.org/packages/eb/41/875b7e4db513c5a54c78f6c5c1a191cafe6f9f181c1678be75db01a0a0b2/dympy-0.0.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3a7d6f934a220e5321f031b61165322b", "sha256": "5ac36fdfc54607a7dd31eb8fb340e89ddfce468a80adc4c519dd0bb54f035030" }, "downloads": -1, "filename": "dympy-0.0.3.zip", "has_sig": false, "md5_digest": "3a7d6f934a220e5321f031b61165322b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51956, "upload_time": "2016-09-30T09:32:34", "url": "https://files.pythonhosted.org/packages/eb/41/875b7e4db513c5a54c78f6c5c1a191cafe6f9f181c1678be75db01a0a0b2/dympy-0.0.3.zip" } ] }