Giter Site home page Giter Site logo

mc-kit / map-stp Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 2.6 MB

Transfer meta information on cells from an STP file to MCNP model. Set materials and densities according to tags specified in STP model tree.

License: MIT License

Assembly 13.92% Shell 7.86% Python 75.75% Batchfile 1.89% PowerShell 0.59%
mcnp stp

map-stp's Introduction

mapstp: link STP and MCNP models

Maintained License PyPI - Python Version PyPI Documentation Status

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.

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.

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
Tests https://codecov.io/gh/MC-kit/map-stp/branch/master/graph/badge.svg?token=wlqoa368k8 https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 pre-commit try/except style: tryceratops

map-stp's People

Contributors

dependabot[bot] avatar dvp2015 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

1qqd stepnexus

map-stp's Issues

restore testing STP related code

The mapstp now uses sqlite database with information about 3D model obtained from SpaceClaim script.
Probably, we don't need STP parsing anymore. Probably, we still need this code to check if a given MCNP model correspondes to given STP.
Decide, and either remove this code or restore testing (now it's 'skipped').

update pip

We have to use older version of pip on github actions to avoid pip error (fails on some packages not providing metainformation).

The pip issue is closed, but the error still happens occussionaly on github actions running Python 3.11. Everything is fine on local machines.

Update the version when either pip is fixed or all the packages have good meta information. Current version of pip 22.3.1, this is restricted on github actions with constraints.txt to 21.3.1.

switch to polars

... and remove pandas and pyarrow (will be required by pandas in future versions)

Motivation: polars is more efficient and feasible, polars is used in other our packages mckit-nuclides, xpypact.

add command to export SpaceClaim script

SpaceClaim script data/extract-info-0.3.4.py is now stored in the mapstp package as data resource.

Add command 'export extract-info' to export the code from installed mapstp package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.