{ "info": { "author": "Takaaki AOKI", "author_email": "aoki.takaaki@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Other Environment", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering :: Physics" ], "description": "=============================\nofblockmeshdicthelper\n=============================\n\nHelper utilities for OpenFOAM blockMeshDict generation. \n\nFor what?\n===========\n\nThe aim of ofblocmeshdicthekper is to provide name-based access to the elements of \nblockDictMesh file, such as vertex, block, face, etc.\n\nInstallation\n===============\n\nFrom PyPI simply, \n\n.. code-block:: shell\n\n pip install ofblockmeshdicthelper\n\nOr, it is allowed to install directory from github repository (this or your own forked one).\n\nExample\n========\n\nHere is an example which generate wedged model shown at \nhttps://openfoamwiki.net/index.php/Main_ContribExamples/AxiSymmetric\n\n.. code-block:: python\n\n \"\"\" example of ofblockmeshdicthelper\n try to generate wedged pype object shown at\n https://openfoamwiki.net/index.php/Main_ContribExamples/AxiSymmetric\n \"\"\"\n \n from __future__ import unicode_literals, print_function\n \n import math\n \n from ofblockmeshdicthelper import BlockMeshDict, Vertex, SimpleGrading\n \n wedgedegree = 5.0\n \n # geometries\n radius_x = 0.19\n length_z = 1.1\n \n # prepare ofblockmeshdicthelper.BlockMeshDict instance to\n # gather vertices, blocks, faces and boundaries.\n bmd = BlockMeshDict()\n \n # set metrics\n bmd.set_metric('m')\n \n # base vertices which are rotated +- 2.5 degrees\n basevs = [\n Vertex(0, 0, 0, 'v0'),\n Vertex(radius_x, 0, 0, 'v1'),\n Vertex(radius_x, 0, length_z, 'v2'),\n Vertex(0, 0, length_z, 'v3')]\n \n # rotate wedgedegree/2 around z axis\n # rotated vertices are named with '-y' or '+y' suffix.\n # these verteces are added to BlockMeshDict instence to be referred\n # by following blocks and faces...\n cosd = math.cos(math.radians(wedgedegree/2.0))\n sind = math.sin(math.radians(wedgedegree/2.0))\n for v in basevs:\n bmd.add_vertex(v.x*cosd, -v.x*sind, v.z, v.name+'-y')\n bmd.add_vertex(v.x*cosd, v.x*sind, v.z, v.name+'+y')\n \n # v0+y and v3+y have same coordinate as v0-y and v3-y, respectively.\n bmd.reduce_vertex('v0-y', 'v0+y')\n bmd.reduce_vertex('v3-y', 'v3+y')\n \n \n # utility to to generate vertex names\n def vnamegen(x0z0, x1z0, x1z1, x0z1):\n return (x0z0+'-y', x1z0+'-y', x1z0+'+y', x0z0+'+y',\n x0z1+'-y', x1z1+'-y', x1z1+'+y', x0z1+'+y')\n \n # Noted that 'v0+y' and 'v3+y' are still valid.\n # you may define simplegrading and multigrading (for OF>=2.4) optionally.\n b0 = bmd.add_hexblock(vnamegen('v0', 'v1', 'v2', 'v3'),\n (19, 1, 300),\n 'b0',\n grading=SimpleGrading(0.1,\n ((0.2, 0.3, 4), \n (0.6, 0.4, 1),\n (0.2, 0.3, 1.0/4.0)),\n 1))\n \n # face element of block can be generated by Block.face method\n bmd.add_boundary('wedge', 'front', [b0.face('s')])\n bmd.add_boundary('wedge', 'back', [b0.face('n')])\n bmd.add_boundary('wall', 'tankWall', [b0.face('e')])\n bmd.add_boundary('patch', 'inlet', [b0.face('b')])\n bmd.add_boundary('patch', 'outlet', [b0.face('t')])\n bmd.add_boundary('empty', 'axis', [b0.face('w')])\n \n # prepare for output\n bmd.assign_vertexid()\n # output\n print(bmd.format())", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/takaakiaoki/ofblockmeshdicthelper", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ofblockmeshdicthelper", "package_url": "https://pypi.org/project/ofblockmeshdicthelper/", "platform": "", "project_url": "https://pypi.org/project/ofblockmeshdicthelper/", "project_urls": { "Homepage": "https://github.com/takaakiaoki/ofblockmeshdicthelper" }, "release_url": "https://pypi.org/project/ofblockmeshdicthelper/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Helper utilities for OpenFOAM blockMeshDict generation.", "version": "0.2.0" }, "last_serial": 3934680, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "343661d6da04ab7819863ec57fd27949", "sha256": "a35d5de6d889950789b002ee34785eedfd16006d6bc6054153902906b1b749c3" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.0.tar.gz", "has_sig": false, "md5_digest": "343661d6da04ab7819863ec57fd27949", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4084, "upload_time": "2015-02-23T09:47:56", "url": "https://files.pythonhosted.org/packages/e2/df/2fb42eee03d26d10638768cc229343c85dff38022fcdb63de8148a2442f0/ofblockmeshdicthelper-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c2704cb6c4c0e907e5f3521d9a713215", "sha256": "8084a3c8d37bce675ba282cb971a44a39446d507c5b9ed6176dfe0e52ad59302" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c2704cb6c4c0e907e5f3521d9a713215", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5089, "upload_time": "2015-02-23T09:54:44", "url": "https://files.pythonhosted.org/packages/4a/77/1a82be625956765dc2eb035654a9b59f9534bfd64e7b520d3928d493581f/ofblockmeshdicthelper-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a1dead1299d6c1ca82aa0c492ab471f4", "sha256": "7614ebd12454eb82888e4e920bf3d9eeb2fd2647143cf45773b3dc8ccf74d6d7" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a1dead1299d6c1ca82aa0c492ab471f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5199, "upload_time": "2015-02-23T10:01:56", "url": "https://files.pythonhosted.org/packages/d9/28/840acf13c7af0769d87057f0a3b0d5041a219a2313467b2ed89d656a62d4/ofblockmeshdicthelper-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "cb115bb809d025d66b2ee64bab835bc1", "sha256": "397e11b371993915b5cfd406a1eac633d0aa2e643fbbbe82d3e9a119df281d98" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.3.tar.gz", "has_sig": false, "md5_digest": "cb115bb809d025d66b2ee64bab835bc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6233, "upload_time": "2015-02-24T05:36:56", "url": "https://files.pythonhosted.org/packages/00/a8/c46b82e3232e5d174e1352dac90ab4fe7511eac0b5ff44150ccdfd667679/ofblockmeshdicthelper-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "95461235b7004febbe76ce1c23227f3c", "sha256": "22a8f53e4635648ba52e28069115252fc6a4db0cdf16c06e1df2dfbace0fcc63" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.4.tar.gz", "has_sig": false, "md5_digest": "95461235b7004febbe76ce1c23227f3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6275, "upload_time": "2015-04-16T03:45:30", "url": "https://files.pythonhosted.org/packages/76/3b/054c89ba08b6e50e25cfc6c04f3180d7b151e9428b6353972253b1666211/ofblockmeshdicthelper-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a3f39ec38906ca307873eb144b652466", "sha256": "5dc409349c492c7c2ed80604d0d2b4281397ab4e70a807318f7c3641ae76d1d3" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a3f39ec38906ca307873eb144b652466", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6275, "upload_time": "2015-04-16T03:54:54", "url": "https://files.pythonhosted.org/packages/e4/95/6efa44735abb698fbdcdbea654e73e015f23a8e85ff1c070ca6385b61527/ofblockmeshdicthelper-0.1.5.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "bce0fc73bd5368a0f36e9395adf66b5a", "sha256": "d5cca0e8da7f5b266b52982c6e6040d2ede1bba325cc69d36e2954477cef22da" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.7.tar.gz", "has_sig": false, "md5_digest": "bce0fc73bd5368a0f36e9395adf66b5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6864, "upload_time": "2015-07-09T04:43:29", "url": "https://files.pythonhosted.org/packages/d4/17/2f592b829928c07bd83b895f4c34590a0604af8d50b41ecaf4fa2a1b66c8/ofblockmeshdicthelper-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "fe8292a46bab4dc041e0090611f570d2", "sha256": "7fbef76bf4e5064ea1b5bdbdec3c366501beb36df1d20e2b7d9988c1726e59e3" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.8.tar.gz", "has_sig": false, "md5_digest": "fe8292a46bab4dc041e0090611f570d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6870, "upload_time": "2015-07-09T04:50:23", "url": "https://files.pythonhosted.org/packages/7f/87/a6160a9d1b99c89fd41076d75197feb5f96457554a2a3c1cd1c8b849208d/ofblockmeshdicthelper-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "6e2c8123d05ace7b484c05fddff42871", "sha256": "f57a8716caaa21646b33bc9ccc3dd0e23b78a388788977e15cc9f01531249042" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.1.9.tar.gz", "has_sig": false, "md5_digest": "6e2c8123d05ace7b484c05fddff42871", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6916, "upload_time": "2015-07-09T05:25:08", "url": "https://files.pythonhosted.org/packages/40/fb/a305bc2b2eaf43e3af8009de81ad260ac410e756c10076700d2e98f810a1/ofblockmeshdicthelper-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "eec680dfccc556340ae1a2afa9aa7502", "sha256": "3f845516cd29f15ab300c117d6c22e757d59d586468b69fb6b73e8adce877126" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eec680dfccc556340ae1a2afa9aa7502", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7146, "upload_time": "2018-06-06T04:10:21", "url": "https://files.pythonhosted.org/packages/86/0e/74b1296c1f2c1da012bf13bbcebe4af1ee2cf8a898587a030c7bac281db7/ofblockmeshdicthelper-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eec680dfccc556340ae1a2afa9aa7502", "sha256": "3f845516cd29f15ab300c117d6c22e757d59d586468b69fb6b73e8adce877126" }, "downloads": -1, "filename": "ofblockmeshdicthelper-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eec680dfccc556340ae1a2afa9aa7502", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7146, "upload_time": "2018-06-06T04:10:21", "url": "https://files.pythonhosted.org/packages/86/0e/74b1296c1f2c1da012bf13bbcebe4af1ee2cf8a898587a030c7bac281db7/ofblockmeshdicthelper-0.2.0.tar.gz" } ] }