{ "info": { "author": "\u00c1lvaro Sanz Oriz", "author_email": "alvaro.sanz.oriz@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "*********\nnastranpy\n*********\n\nA library to interact with nastran models.\n\nRequirements\n============\n\n* python 3.3 (or later)\n* numpy\n\nInstallation\n============\n\nRun the following command::\n\n pip install nastranpy\n\n\nUsage example\n=============\n\nImport the model::\n\n import nastranpy\n\n\n model = nastranpy.Model()\n model.read(['/Users/Alvaro/nastran_model_input/nastran_launcher.dat'])\n\nExport the model::\n\n model.path = '/Users/Alvaro/nastran_model_modified'\n model.write()\n\nGet help of a given method::\n\n help(model.cards)\n\nGet help of a given card::\n\n nastranpy.card_help('GRID')\n\nGet a single card by its id::\n\n coord_card = model.coords[45]\n grid_card = model.grids[5462]\n elem_card = model.elems[234232]\n prop_card = model.props[2342]\n mat_card = model.mats[4232]\n mpc_card_set = model.mpcs[325234]\n spc_card_set = model.spcs[234232]\n load_card_set = model.loads[234232]\n\nGet cards by different ways::\n\n # Get grids by ids:\n grids = [grid for grid in model.cards('grid', [34, 543453, 234233])]\n\n # Get elements by an ID pattern:\n elems = [elem for elem in model.cards('elem', ['9', '34', '*', '*', '1-8'])]\n\n # Get all CQUAD4 and CTRIA cards:\n elems = [elem for elem in model.cards(['CQUAD4', 'CTRIA3']]\n\n # Get all shell element cards in a set includes:\n elems = [elem for elem in model.cards('e2D', includes=['Sp1_Hng_outbd_v04.bdf',\n 'Wing-Box_V16.2.bdf'])]\n # Get all element card with a given property:\n elems = [elem for elem in self.props[400021].child_cards('elem')]\n\n # Get all property card with a given material:\n props = [prop for prop in self.mats[10].child_cards('prop')]\n\nGet model info::\n\n model.info()\n\nWrite a model summary to a csv file::\n\n model.print_summary()\n\nWrite card fields to a csv file::\n\n model.print_cards(model.cards('grid', includes=['BulkData/Sp2_Sprdr_v05.bdf']))\n\nGet ID info for a given card type::\n\n print(model.get_id_info('mpc', detailed=True))\n print(model.get_id_slot('grid', 1000))\n\nGet shell geometrical info::\n\n shells_info = {shell.id: (shell.area, shell.normal, shell.centroid) for\n shell in model.cards('e2D')}\n\nRenumber cards by correlation::\n\n correlation = {\n 235437: 4703436,\n 235438: 4703437,\n 235463: 4703462,\n 235464: 4703463,\n 235465: 4703464,\n }\n\n model.renumber('grid', correlation=correlation)\n\nRenumber cards by start id and step::\n\n id_list = [\n 235472,\n 235473,\n 235474,\n 235488,\n 235489,\n 235490,\n ]\n\n model.renumber('grid', model.cards('grid', id_list),\n start=4703465, step=5)\n\n\nRenumber cards by an id pattern::\n\n id_list = [\n 235496,\n 235497,\n 235510,\n 235511,\n 235512,\n 235513,\n 235514,\n 235515,\n ]\n\n model.renumber('grid', model.cards('grid', id_list),\n id_pattern=['9', '34', '*', '*', '*', '*', '1-8'])\n\nExtend elements by steps::\n\n # Extend from an element\n model.elems[3612829].extend(steps=2)\n # Extend from a grid\n model.grids[3815443].extend(steps=2)\n\nExtend elements by filter::\n\n # Extend from an element\n model.elems[8048206].extend('e2D')\n # Extend from a grid\n model.grids[8020333].extend('e2D')\n\nMake include self-contained::\n\n include = model.includes['BulkData/3C0748_Sp2_ob_Sprdr_v05.bdf']\n include.make_self_contained()\n\n\nContact\n=======\n\u00c1lvaro Sanz Oriz \u2013 alvaro.sanz.oriz@gmail.com\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alvarosanz/nastranpy", "keywords": "NASTRAN FEM engineering", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "nastranpy", "package_url": "https://pypi.org/project/nastranpy/", "platform": "", "project_url": "https://pypi.org/project/nastranpy/", "project_urls": { "Homepage": "https://github.com/alvarosanz/nastranpy" }, "release_url": "https://pypi.org/project/nastranpy/0.1.2/", "requires_dist": [ "numpy" ], "requires_python": ">=3.3", "summary": "A library to interact with nastran models", "version": "0.1.2" }, "last_serial": 3595007, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "d76cbcd6722cd3e60894ef4931b54535", "sha256": "a30c9776d8c656d5504c6a85f1ad41000825cd46d4b82f17ef432dce471d3a6f" }, "downloads": -1, "filename": "nastranpy-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d76cbcd6722cd3e60894ef4931b54535", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.3", "size": 36297, "upload_time": "2018-02-19T06:51:58", "url": "https://files.pythonhosted.org/packages/d6/3f/cccf086083fd3a09ba1061e351dfbaad8b6b3664a5928ebf6b6465eadf5e/nastranpy-0.1.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d76cbcd6722cd3e60894ef4931b54535", "sha256": "a30c9776d8c656d5504c6a85f1ad41000825cd46d4b82f17ef432dce471d3a6f" }, "downloads": -1, "filename": "nastranpy-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d76cbcd6722cd3e60894ef4931b54535", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.3", "size": 36297, "upload_time": "2018-02-19T06:51:58", "url": "https://files.pythonhosted.org/packages/d6/3f/cccf086083fd3a09ba1061e351dfbaad8b6b3664a5928ebf6b6465eadf5e/nastranpy-0.1.2-py3-none-any.whl" } ] }