Skip to main content

Transfers meta information from STP to MCNP

Project description

Maintained License PyPI - Python Version PyPI Documentation Status

Description

Problem #1

You are an MCNP model developer. You have created simplified 3D CAD model using SpaceClaim, saved it to STP file, then converted it using SuperMC to an MCNP model. At this moment the MCNP model doesn’t have any information on relation of the MCNP came from cells to the CAD components, there’s no materials and densities in the cell specifications. The SuperMC (for the time of writing this) doesn’t transfer this information on exporting to MCNP model.

Problem #2

You have to provide results of neutron analysis in correspondence with 3D CAD model components. For example, you have to create a table describing activation of every component. To do this, you need some tools to associate CAD component with corresponding MCNP cells. Using this table the results of computation for MCNP cells can be aggregated to values for corresponding CAD component.

Solution

Using SpaceClaim you can add additional properties to components directly in STP file. The properties include: used material, density correction factor, classification tag. The properties are specified as a special label, which you can add to the components names. The properties are propagated over the CAD tree hierarchy from top to down and can be overridden on lower levels with more specific values. Using SpaceClaim for this is rather intuitive.

The using mapstp you can transfer this information from STP to MCNP: The mapstp:

  • sets material numbers and densities in all the cells, where it was specified

  • adds $-comment after each cell denoting its path in STP, with tag “stp:”,this lines can be easily removed later, if not needed

  • adds materials specifications, if they are available for mapstp

  • creates separate accompanying excel file with list of cells, applied materials, densities and correction factors, classification tag, and paths in STP

More details in documentation.

Contributing

Tests https://codecov.io/gh/MC-kit/map-stp/branch/master/graph/badge.svg pre-commit https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json

Some specific: in development environment we use uv, just, ruff.

To setup development environment, run:

just install | reinstall

To build documentation, run:

just docs        # - for local online docs rendering, while editing
just docs-build  # - to build documentation

To release, run:

just bump [major|minor|patch]  # - in `devel` branch

Then merge devel to master (via Pull Request) and if all the checks are passed create Release. Manually.

Project details


Download files

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

Source Distribution

mapstp-1.0.3.tar.gz (212.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapstp-1.0.3-py3-none-any.whl (215.7 kB view details)

Uploaded Python 3

File details

Details for the file mapstp-1.0.3.tar.gz.

File metadata

  • Download URL: mapstp-1.0.3.tar.gz
  • Upload date:
  • Size: 212.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for mapstp-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3e118a4747209ea245cd22fde35688a9439555c86e7f05f2e3254c05b682fb33
MD5 ae17235ca6c758e0b4c687a2f9877823
BLAKE2b-256 021ddcc99dfb745b6508c55a01dd27d39b1f0570e14817bfb44fb79da71e9b96

See more details on using hashes here.

File details

Details for the file mapstp-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mapstp-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 215.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for mapstp-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e2976eaf1d55dd170a29818f69f994f2a62e6222891b8e2f8a82cc6077113b13
MD5 1784f2cddf67a4c36fe3ddb9d02929d9
BLAKE2b-256 e0b466905bac77468a21af428521b98982af5d1f7e864c03dd9f52ba2d1468f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page