{ "info": { "author": "Patrick Daniel Gre\u00df", "author_email": "patrick.daniel.gress@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3.5", "Topic :: Education", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Physics" ], "description": "CubeFlow\n========\n\n:abstract: CubeFlow is a Python framework to easily build and analyse grid based simulation such as heat transportation\n or fluid dynamics. CubeFlow aims to provide an easy implementation without the need of writing code other than\n the one needed for the actual simulation. CubeFlow is not a super fast simulator but focuses primarily on\n educational purposes.\n\nCode Sample\n-----------\n\nThe following code generates a simple heat flow simulator of a homogeneous cube.\n\n.. code-block:: python\n\n from typing import Dict, Sequence\n from cubeflow.cell import MetaCell, Scalar\n from cubeflow.cube import CubeGrid\n from cubeflow.simulator import BaseSimulator, add_derivations, border_handler\n from cubeflow.report.csv import CSVReport\n from cubeflow.predicates.counter import Counter\n\n\n class HeatCell(metaclass=MetaCell):\n temperature = Scalar()\n diffusivity = Scalar()\n flow = 0.0\n\n @add_derivations\n class HeatSimulator(BaseSimulator[HeatCell]):\n Type = HeatCell\n\n @border_handler(1)\n def no_flow_border(self, cells: Dict[Sequence[int], HeatCell]) -> HeatCell:\n cell = cells[(0, 0)]\n adjacent = self._get_adjacent_inner(cells)\n if adjacent:\n # cell is not a corner\n cell.temperature = self._get_only_cell(adjacent)[1].temperature\n return cell\n else:\n return self._handle_corner(cells)\n\n def _prepare(self, cells: Dict[Sequence[int], HeatCell]) -> HeatCell:\n cell = cells[(0, 0)]\n cell.flow = cell.diffusivity * self.laplace_temperature(cells)\n return cell\n\n def _simulate(self, cells: Dict[Sequence[int], HeatCell]) -> HeatCell:\n cell = cells[(0, 0)]\n cell.temperature += self.dt * cell.flow\n return cell\n\n\n if __name__ == '__main__':\n from sys import argv\n simulator = HeatSimulator(CubeGrid.from_file(argv[1], HeatCell), [CSVReport('heat')])\n simulator.simulate_while(Counter(1000))\n\nChanges\n-------\n\n- 0.17 Added grid specification support via toml like textfile.\n\nRoadmap\n-------\n\n- 0.18 Improved examples and documentation. Adding flow based simulation in contrast to the existing \"computational\"\n approach, meaning defining the simulation in terms of data flows between cells.\n\n- 0.19 Improved output format, browser application to create grids in a graphical and interactive way.\n\n- 0.20 Translation support for CubeFlow projects to either Stackless Python or Rust.\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/voidpointercast/cubeflow", "keywords": "education simulation mathematics physics", "license": "GPLv3 or later", "maintainer": "", "maintainer_email": "", "name": "CubeFlow", "package_url": "https://pypi.org/project/CubeFlow/", "platform": "", "project_url": "https://pypi.org/project/CubeFlow/", "project_urls": { "Homepage": "https://bitbucket.org/voidpointercast/cubeflow" }, "release_url": "https://pypi.org/project/CubeFlow/0.1.7/", "requires_dist": [ "grako", "matplotlib" ], "requires_python": "", "summary": "Framework for creating grid based simulations.", "version": "0.1.7" }, "last_serial": 2957456, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "560d4d0cf70ef55734b734df1a0734ac", "sha256": "b77b255767babad8f8cc6f46d53bb80de0e80dae9ec97e1d9878cc7f609e7d57" }, "downloads": -1, "filename": "CubeFlow-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "560d4d0cf70ef55734b734df1a0734ac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8592, "upload_time": "2017-04-15T18:47:31", "url": "https://files.pythonhosted.org/packages/ff/fe/46a2af7fd791c5e4afa8f6b41cb88cccfd444f4a4a3dd10bc168d69cecb6/CubeFlow-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e0db032cecf394470fa81b9c721e345b", "sha256": "59da12f6142302de2c6ace08f2ef2229593ec2f815f59285e429ae2a6e3e938c" }, "downloads": -1, "filename": "CubeFlow-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e0db032cecf394470fa81b9c721e345b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8593, "upload_time": "2017-04-15T18:57:29", "url": "https://files.pythonhosted.org/packages/b5/7b/7bff65143305aeed5f5fbbe3e25ceaeb88db995f724aaf70e2623d2b28a1/CubeFlow-0.1.1-py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "be0c36dfcd799fd4911de22ad16ef423", "sha256": "abda79e4c1262d6e460b288082441da297a34d8be826e47f7b41064c1b1bd401" }, "downloads": -1, "filename": "CubeFlow-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "be0c36dfcd799fd4911de22ad16ef423", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10962, "upload_time": "2017-04-15T19:07:37", "url": "https://files.pythonhosted.org/packages/92/f7/1690900d91dacdb9dd28dec0083f0737ce56bedf2290e30bcba49dd16f08/CubeFlow-0.1.2-py3-none-any.whl" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f0f93eed4a96fbb25a7cba5a1a51b1a8", "sha256": "2fd60ab3880fa0c0a6de585ed5775d4fe3ec1a573e687634fee43b917e796a6f" }, "downloads": -1, "filename": "CubeFlow-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f0f93eed4a96fbb25a7cba5a1a51b1a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21380, "upload_time": "2017-04-25T11:43:04", "url": "https://files.pythonhosted.org/packages/5e/02/1bea57e2d078818446713050b054ec69ee6594f08ed6b210a1b537117af1/CubeFlow-0.1.4-py3-none-any.whl" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "014e544e34ce0df80bc12d95720ecd88", "sha256": "5ae3771f7c2986d2b617fc0a203205b70e7a5f0f9035bbd1abd739d49856e0ed" }, "downloads": -1, "filename": "CubeFlow-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "014e544e34ce0df80bc12d95720ecd88", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21387, "upload_time": "2017-04-25T12:01:39", "url": "https://files.pythonhosted.org/packages/1a/9b/ad27217c4e451a732d009e051016595c6772a0a8ac92ba1b74439d53925c/CubeFlow-0.1.5-py3-none-any.whl" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "4bb4ac64b3e789ebdc658b92857e5271", "sha256": "0c187840e263d28413cd93bb9a064d4508ff652c15eecf740256f7833af64a23" }, "downloads": -1, "filename": "CubeFlow-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "4bb4ac64b3e789ebdc658b92857e5271", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15265, "upload_time": "2017-04-25T12:42:06", "url": "https://files.pythonhosted.org/packages/30/f1/a1745cda48fbc79f453d5cb984fd16f589693c2cdd57134622a33cbace1a/CubeFlow-0.1.6-py3-none-any.whl" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "fda66e416718ffba43a35f17a8871f0c", "sha256": "287afce87e5330281fd1ed3d07de4652a886effc188be99026586106d2f2faf5" }, "downloads": -1, "filename": "CubeFlow-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "fda66e416718ffba43a35f17a8871f0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18001, "upload_time": "2017-06-18T12:15:54", "url": "https://files.pythonhosted.org/packages/74/90/bc35c2412420cbfd0f10251904032609e6637064435051de7991c22e1a0d/CubeFlow-0.1.7-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fda66e416718ffba43a35f17a8871f0c", "sha256": "287afce87e5330281fd1ed3d07de4652a886effc188be99026586106d2f2faf5" }, "downloads": -1, "filename": "CubeFlow-0.1.7-py3-none-any.whl", "has_sig": false, "md5_digest": "fda66e416718ffba43a35f17a8871f0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18001, "upload_time": "2017-06-18T12:15:54", "url": "https://files.pythonhosted.org/packages/74/90/bc35c2412420cbfd0f10251904032609e6637064435051de7991c22e1a0d/CubeFlow-0.1.7-py3-none-any.whl" } ] }