Skip to main content

MCNP-related packages. Cell geometry algebraic manipulation

Project description

MCNP-related packaged: Cell geometry algebraic manipulations

Description of cell geometry can be interpreted as mathematical expression containing addition (union) and multiplication (intersection) operations. This package provides functions to parse the cell geometry description into an algebraic expression and manipulate the latter.

This is a needed part for MCNP -> CAD geometry converter, see https://github.com/travleev/mcnp2spaceclaim. Example MCNp input files that can be processed with mcrp_cgam can be found there.

To generate json file needed for MCNP -> CAD conversion, use the script provided with this package::

    >cgam input [-maxterms 100] [-writeby model]

The first command line argument, input is the name of MCNP input file. The other arguments are optional.

An integer number following the -maxterms keyword specifies the maximal number of pieces that represent the cell's geometry. In current implementation a cell consisting of an intersection of unions is rearranged into a union of intersections. For some cells, the number of terms in the latter representation can be huge therefore cells with the number of terms exceeding the value specified by -maxterms are skipped.

The keyword -writeby can be followed by one of the following strings: model, cell or part, or their combination (written together, e.g. modelcell). When model is given, a single json file containing all cells is generated. When cell is given, a separate json file is generated for every cell. When part is given, a separate json file is generated for every cell's part (the part corresponds to each term in the union representation of the cell geometry, see above).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mcrp-cgam, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size mcrp_cgam-0.2.0-cp27-cp27m-manylinux1_x86_64.whl (2.5 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size mcrp_cgam-0.2.0-cp27-cp27m-manylinux2010_x86_64.whl (2.5 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size mcrp_cgam-0.2.0-cp27-cp27mu-manylinux1_x86_64.whl (2.5 MB) File type Wheel Python version cp27 Upload date Hashes View
Filename, size mcrp_cgam-0.2.0-cp27-cp27mu-manylinux2010_x86_64.whl (2.5 MB) File type Wheel Python version cp27 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page