{ "info": { "author": "Davide Mancusi, Martin Maurey", "author_email": "davide.mancusi@cea.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Physics" ], "description": "t4_geom_convert\n===============\n\n[![PyPI version](https://badge.fury.io/py/t4-geom-convert.svg)](https://badge.fury.io/py/t4-geom-convert)\n\nThis repository contains the development version of `t4_geom_convert`, a Python\ntool to convert [MCNP] geometries into the [TRIPOLI-4\u00ae] format.\n\nFeatures\n--------\n\nHere is a list of features of the MCNP modelling engine that are\nat least partially supported and converted by `t4_geom_convert`:\n\n* All surface types (except SQ)\n* Boolean cell operators\n* Affine transformations on surfaces and on cells (see the [Current\n limitations](#current-limitations) section though)\n* Boundary conditions (reflection, white surfaces)\n* Isotopic compositions and cell densities\n* Universes and fills, even nested, possibly with affine transformations\n* [Lattices](#lattice-conversion) (see the [Current\n limitations](#current-limitations) section though)\n\n\nInstallation\n------------\n\nIf you want to install the latest stable version, just type the following\ncommand in a terminal:\n\n```\n$ pip install t4_geom_convert\n```\n\nYou can also install the latest development version with\n\n```\n$ pip install git+https://github.com/arekfu/t4_geom_convert.git@next\n```\n\nYou might want to pass the `--user` option to `pip` for a local install. Even\nbetter, you can create a virtual environment and install `t4_geom_convert`\nthere with\n\n```\n$ python3 -m venv /path/to/some/folder\n$ source /path/to/some/folder/bin/activate\n$ pip install -U pip setuptools\n$ pip install t4_geom_convert\n```\n\n### Dependencies\n\nThe MCNP input file is parsed by [MIP]. We use a slightly modified version of\nMIP, which is shipped along with `t4_geom_convert`. MIP depends on [TatSu]\n4.3.0.\n\n`t4_geom_convert` also depends on `numpy`.\n\n\nUsage\n-----\n\nThe basic usage is simply\n\n```\n$ t4_geom_convert \n```\n\nThis will create a TRIPOLI-4 output file called `.t4` containing\nthe converted geometry. You can also choose a different name for the output\nfile using the `-o` option.\n\nUse the `-h` option for a list of all available options.\n\n### Lattice conversion\n\n`t4_geom_convert` is capable of handling the conversion of repeated structures\n(lattices). Only hexaedral lattices (`LAT=1`) are supported for the moment.\n\nA hexaedral cell declared as `LAT=1` represents the unit cell of the lattice,\nwhich is assumed to repeat in all directions up to the boundaries of the\nenclosing cell. Due to limitations of the TRIPOLI-4 representation of lattices,\nwe have chosen to represent lattices using a purely surface-based approach.\nThis means that `t4_geom_convert` will actually emit separate cell definitions\nfor each cell of the lattice that is visible through the enclosing cell. The\nranges of cell definitions to be emitted must be specified by the user via the\n`--lattice` command-line option. For instance, consider the following MCNP\ninput:\n\n```\nA lattice example\n1 0 1 -2 3 -4 IMP:N=1 U=2 LAT=1\n10 1 -1. -10 IMP:N=1 FILL=2\n1000 0 10 IMP:N=0\n\n1 PX -1.5\n2 PX 1.5\n3 PY -0.5\n4 PY 0.5\n10 SO 4\n\nm1 13027 1.\n```\n\nHere the unit cell is two-dimensional. The lattice fills a sphere of radius\n4. Assuming the unit cell is indexed as (0,0), the visible lattice cells are\n* (-1, -4) to (-1, 4)\n* (0, -4) to (0, 4)\n* (1, -4) to (1, 4)\n\nThis can be confirmed by visual inspection of the MCNP geometry or by\ngeometrical considerations. Once the index bounds are determined, the\n`--lattice` option must be specified as\n\n```\n$ t4_geom_convert --lattice 1,-1:1,-4:4 \n \u2191 \u2191 \u2191 \u2191 \u2191\n cell number \u2500\u2500\u2500\u2518 \u2502 \u2502 \u2502 \u2514 j-range upper bound\n i-range lower bound \u2500\u2500\u2500\u2518 \u2502 \u2514\u2500\u2500\u2500 j-range lower bound\n i-range upper bound \u2500\u2500\u2500\u2518\n```\n\nThis result in the following TRIPOLI-4 geometry (X-Y cut), where a few cell\nindices have been annotated:\n![example of converted geometry with lattices][lattice_example]\n\nThe syntax for one-dimensional lattices is\n\n```\n--lattice ,:\n```\n\nand for three-dimensional lattices it is\n\n```\n--lattice ,:,:,:\n```\n\nNote that the `ijk` axes are not necessarily the same as the coordinate axes.\n\nA lattice unit cell may appear as a fill pattern in several enclosing cells. It\nis currently not possible to specify different fill ranges for each of them.\n\n\nCurrent limitations\n-------------------\n\nHere is a list of some things that `t4_geom_convert` cannot currently do, but\nmay be able to do in the future (in roughly decreasing order of likelihood):\n\n- [ ] Convert SQ surfaces\n- [ ] Handle affine transformations with `m=-1` (the last parameter of the\n affine transformation)\n- [ ] Optimize fills with negative universes (do not intersect with the\n enclosing cell)\n- [ ] Warn about isotopes that are missing from the TRIPOLI-4 dictionary\n (currently you need to edit the converted file by hand and remove the\n occurrences of the missing isotopes)\n- [ ] Convert MCNP macrobodies\n- [ ] Convert cell temperatures\n- [ ] Convert hexagonal lattices\n- [ ] Provide a way to specify lattice fill ranges per enclosing cell(s) (this\n needs to be specified in such a way that it works with nested lattices,\n too)\n- [ ] Deduplicate repeated surface definitions, i.e. remove duplicate surface\n definitions in favour of one of the replicas (this is especially an issue\n for lattices, that tend to generate lots of identical surfaces)\n- [ ] Deduplicate repeated cell definitions (this is a bit harder than\n deduplicating surfaces)\n- [ ] Produce a TRIPOLI-4 connectivity map for as many cells as possible\n (mostly lattices)\n- [ ] Recognize and automatically suppress empty cells (they may be generated\n by lattice development or fill development)\n - Use a linear programming solver for cells bounded by planes?\n - Use a SAT solver in the general case?\n- [ ] Convert (some) MCNP source definitions\n- [ ] Convert (some) MCNP tally definitions\n\nA couple of limitations are due to MIP/TatSu:\n\n- [ ] MIP does not support TatSu>4.3.0 (something breaks, but I'm not sure what\n exactly yet)\n- [ ] Input files cannot contain unusual or non-ASCII characters such as `&` or\n `\u00e9`; you need to remove these characters from your input file before\n attempting the conversion\n- [ ] Spaces are not permitted in a cell definition between a complement\n operator `#` and its argument:\n - good: `#42`\n - good: `#(123 -124)`\n - bad: `# 42`\n - bad: `# (123 -124)`\n\nYour help is welcome! Feel free to open an issue if you would like to implement\na new feature or contribute to the project in any way.\n\n\nReporting bugs\n--------------\n\nPlease report any bug/feature request on [the GitHub issues page][bugs].\n\n\nLicence and acknowledgments\n---------------------------\n\nThe development of `t4_geom_convert` was partially financed by the [EUROfusion]\nconsortium. `t4_geom_convert` is released under the terms of the [GNU Public\nLicence, version 3](COPYING).\n\n\n[MCNP]: https://mcnp.lanl.gov/\n[TRIPOLI-4\u00ae]: http://www.cea.fr/nucleaire/tripoli-4\n[MIP]: https://github.com/travleev/mip\n[TatSu]: https://tatsu.readthedocs.io/en/stable/\n[bugs]: https://github.com/arekfu/t4_geom_convert/issues\n[EUROfusion]: https://www.euro-fusion.org/\n[lattice_example]: pics/lattice_example.png\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/arekfu/t4_geom_convert/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "t4-geom-convert", "package_url": "https://pypi.org/project/t4-geom-convert/", "platform": "", "project_url": "https://pypi.org/project/t4-geom-convert/", "project_urls": { "Homepage": "https://github.com/arekfu/t4_geom_convert/" }, "release_url": "https://pypi.org/project/t4-geom-convert/0.1.4/", "requires_dist": [ "TatSu (==4.3.0)", "numpy", "pytest ; extra == 'dev'", "pytest-cov ; extra == 'dev'", "pytest-xdist ; extra == 'dev'", "pytest-timeout ; extra == 'dev'", "flake8 ; extra == 'dev'", "pylint ; extra == 'dev'", "sphinx ; extra == 'dev'", "sphinx-rtd-theme ; extra == 'dev'" ], "requires_python": ">=3.5, <4", "summary": "A tool to convert MCNP geometries into the TRIPOLI-4\u00ae format", "version": "0.1.4" }, "last_serial": 5572504, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "96a044c4244df7a30f5bc9c17d5200ad", "sha256": "5fb8a477d875a7d27a06333812af90bb9bcf56e0c4f6e287b7afa713ba153ff2" }, "downloads": -1, "filename": "t4_geom_convert-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "96a044c4244df7a30f5bc9c17d5200ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5, <4", "size": 102245, "upload_time": "2019-07-23T13:25:38", "url": "https://files.pythonhosted.org/packages/5f/47/bc0f95efd9850f9dbdc526d9f41e5c972d58463b70857516744fd3d6c085/t4_geom_convert-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "015d176882967db58a68f953fb9fc7f6", "sha256": "e5c4e6dd61e122bf290478358d33a7a1a668b3f3da515f677dab76642da074a2" }, "downloads": -1, "filename": "t4_geom_convert-0.1.3.tar.gz", "has_sig": false, "md5_digest": "015d176882967db58a68f953fb9fc7f6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5, <4", "size": 94591, "upload_time": "2019-07-23T13:25:41", "url": "https://files.pythonhosted.org/packages/a4/25/992703d101cdf51c14c12680e77f01ed4a39b509f67aa5353ed3cc3eba26/t4_geom_convert-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "1567f31b3c226b11ed9f76111ab4e3cc", "sha256": "9b727e5b23893e5a9899e5c82695caf8cf28879631bd7080130cf285d2efae41" }, "downloads": -1, "filename": "t4_geom_convert-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1567f31b3c226b11ed9f76111ab4e3cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5, <4", "size": 102247, "upload_time": "2019-07-23T13:40:27", "url": "https://files.pythonhosted.org/packages/40/8d/d6bd266405b53688ae06b5dff22377ee83209ca6268a0fc6220ab6710f85/t4_geom_convert-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f3ab3acc92f80da511a221c634f31909", "sha256": "72e89d3ca064f03d1e1ae0476b92eb592e243826c86f2d16716f170f7e077d40" }, "downloads": -1, "filename": "t4_geom_convert-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f3ab3acc92f80da511a221c634f31909", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5, <4", "size": 92771, "upload_time": "2019-07-23T13:40:29", "url": "https://files.pythonhosted.org/packages/d7/f9/99f9344ce75097c0d4a417844da2602fee37f9005dea514a25f2b0f3e527/t4_geom_convert-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1567f31b3c226b11ed9f76111ab4e3cc", "sha256": "9b727e5b23893e5a9899e5c82695caf8cf28879631bd7080130cf285d2efae41" }, "downloads": -1, "filename": "t4_geom_convert-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1567f31b3c226b11ed9f76111ab4e3cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5, <4", "size": 102247, "upload_time": "2019-07-23T13:40:27", "url": "https://files.pythonhosted.org/packages/40/8d/d6bd266405b53688ae06b5dff22377ee83209ca6268a0fc6220ab6710f85/t4_geom_convert-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f3ab3acc92f80da511a221c634f31909", "sha256": "72e89d3ca064f03d1e1ae0476b92eb592e243826c86f2d16716f170f7e077d40" }, "downloads": -1, "filename": "t4_geom_convert-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f3ab3acc92f80da511a221c634f31909", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5, <4", "size": 92771, "upload_time": "2019-07-23T13:40:29", "url": "https://files.pythonhosted.org/packages/d7/f9/99f9344ce75097c0d4a417844da2602fee37f9005dea514a25f2b0f3e527/t4_geom_convert-0.1.4.tar.gz" } ] }