openmc-tally-unit-converter

A Python package that finds and converts OpenMC tally units.

https://github.com/fusion-energy/openmc_tally_unit_converter

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary

Keywords

conversion convert normalization openmc units

Keywords from Contributors

neutronics photon dagmc fispact mcnp serpent
Last synced: 6 months ago · JSON representation ·

Repository

A Python package that finds and converts OpenMC tally units.

Basic Info
  • Host: GitHub
  • Owner: fusion-energy
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 342 KB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • Open Issues: 3
  • Releases: 11
Topics
conversion convert normalization openmc units
Created over 4 years ago · Last pushed almost 4 years ago
Metadata Files
Readme License Citation

README.md

N|Python

CI with install

PyPI

This Python package aims to help convert OpenMC tallies to user specified units.

Installation

bash pip install openmc_tally_unit_converter

Usage

OpenMC tally results are save into a statepoint h5 file without units.

This package ascertains the base units of common tallies by inspecting their tally filters and scores.

The following worked example is for a heating tally. Other supported tallies are heating-local, flux, effective dose and damage-energy (used to find DPA) tallies are also supported.

```python import openmctallyunit_converter as otuc import openmc

loads up tally from an openmc statepoint output file

statepoint = openmc.StatePoint(filepath="statepoint.2.h5") mytally = statepoint.gettally(name="mycellheating_tally")

gets the base units of the tally

tally = otuc.processtally(tally=mytally) print(tally)

218559.22320927 electronvolt / sourceparticle ```

The package then allows users to scale the base tally units to different units. For example the package can easily convert cm to meters or electron volts to joules.

```python convertedtally = otuc.processtally( tally=mytally, requiredunits = "joules / source_particle" )

print(converted_tally)

3.50170481e-14 Joules / source_particle ```

Additional inputs can be applied to normalize the the tallies and convert the units further:

  • The source strength of the source in particles per second can be specified with the strength_strength argument. This allows the tally results to be converted from the units of score per simulated particle to score per unit time (e.g seconds, hours, days etc).

```python convertedtally = otuc.processtally( tally=mytally, sourcestrength=1e20, # input units for this argument are particles per second required_units = "joules / minute" )

print(converted_tally)

2.10102288e+08 joules / source_particle ```

  • The volume of the cell in cm3 can also be specified with the volume argument. This allows the tally result to be converted from the base units to base units per unit volume.

```python convertedtally = otuc.processtally( tally=mytally, sourcestrength=13458.3, # input units for this argument are particles per second volume=12, # input units are in cm3 required_units = "joules / second / meter **3" )

print(converted_tally)

3.92724948e-05 Joules / meter ** 3 / second ```

:point_right: Further examples

Owner

  • Name: Fusion Energy
  • Login: fusion-energy
  • Kind: organization

A collection of software projects related to fusion energy

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Shimwell"
  given-names: "Jonathan"
  orcid: "https://orcid.org/0000-0001-6909-0946"
- family-names: "McLaughlin"
  given-names: "Kevin"
  orcid: "https://orcid.org/0000-0002-6622-3835"
title: "openmc-tally-unit-converter. A Python package that converts the OpenMC tally units."
version: 0.3.1
date-released: 2022-1-25
url: "https://github.com/fusion-energy/openmc_tally_unit_converter"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 124
  • Total Committers: 4
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.145
Top Committers
Name Email Commits
Jonathan Shimwell m****l@j****m 106
shimwell s****l@u****m 16
kevinm387 6****7@u****m 1
Jonathan Shimwell d****l@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 4
  • Total pull requests: 45
  • Average time to close issues: 12 days
  • Average time to close pull requests: about 22 hours
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.31
  • Merged pull requests: 43
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • shimwell (4)
Pull Request Authors
  • shimwell (44)
  • kevinm387 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 127 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 2
  • Total versions: 3
  • Total maintainers: 2
pypi.org: openmc-tally-unit-converter

Convert OpenMC tallies into user friendly units

  • Versions: 3
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 127 Last month
Rankings
Dependent packages count: 4.8%
Dependent repos count: 11.6%
Average: 17.0%
Forks count: 22.6%
Stargazers count: 23.1%
Downloads: 23.1%
Maintainers (2)
Last synced: 6 months ago

Dependencies

requirements-test.txt pypi
  • openmc_dagmc_wrapper * test
  • openmc_data_downloader * test
  • openmc_plasma_source * test
  • pytest-cov >=2.12.1 test
  • spectrum_plotter * test
setup.py pypi
  • pint *