powerbalance

A tokamak power balance model with Python API and CLI

https://github.com/ukaea/powerbalance

Science Score: 67.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
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.5%) to scientific vocabulary

Keywords

fusion nuclear-fusion powerbalance research tokamak ukaea
Last synced: 6 months ago · JSON representation ·

Repository

A tokamak power balance model with Python API and CLI

Basic Info
Statistics
  • Stars: 11
  • Watchers: 1
  • Forks: 3
  • Open Issues: 1
  • Releases: 6
Topics
fusion nuclear-fusion powerbalance research tokamak ukaea
Created about 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

Power Balance Models logo

Power Balance Models

DOI Power Balance Models Ubuntu security: bandit Python Versions Code style: ruff

A power balance model which combines power consumption and power generation data to assess the net power production of different designs for a tokamak power plant.

This code implements the PyDelica module to interface with Open Modelica models neatly summing together and displaying key results in a web browser. It implements a power balance model to bring together power consumption and power generation data for assessing the net power produced by fusion power plant designs.

DISCLAIMER: Parameter values (particularly the ones in the input toml files) do not represent a suitable design point, and may or may not make physical sense. It is up to the user to verify that all parameters are correct.

Quick Start

It is recommended that Power Balance Models (PBM) be run within a Python virtual environment, you can create one using the pre-installed venv python module:

sh python -m venv my_venv source venv/bin/activate

then install PBM using pip over git:

sh pip install git+https://github.com/ukaea/powerbalance.git

By default the parameters contained within the models have no physical significance, it is recommended that these be modified to match the scenario for analysis. To do this create a new project folder:

sh powerbalance new my_project

and modify the parameter files within the directory. You can then execute a run using this directory:

sh powerbalance run --param-dir my_project

Updating

Note, if updating your version of powerbalance it is strongly recommended that you re-generate the model profiles in case changes have been made which affect them:

sh powerbalance generate-profiles

Acknowledgements

NINI model - This model is based on the in-house UKAEA work of D B King and E Surrey, referred to in the following publication:

Negative ion research at the Culham Centre for Fusion Energy (CCFE), R McAdams, A J T Holmes, D B King, E Surrey, I Turner and J Zacks, New Journal of Physics, Volume 18, December 2016, doi: https://doi.org/10.1088/1367-2630/aa4fa1 (R McAdams et al 2016 New J. Phys. 18 125013)

RF (ECCD) model - This model is based on the Masters Thesis of Samuel Stewart:

Modelling of Radio Frequency Heating and Current Drive Systems for Nuclear Fusion, Samuel Stewart, Integrated Engineering BEng Thesis, University of Cardiff, April 2021

Power generation model - the efficiency values used in the power generation model are derived from a separate Excel model produced by UKAEA. This Excel model built on a body of work produced by the Nuclear Advanced Manufacturing Research Centre and EGB Engineering for UKAEA:

"UKAEA STEP WP11: FEASIBILITY STUDY OF MODULAR REACTOR DESIGNS (LOT 2): FEASIBILITY OF ADVANCED NUCLEAR TECHNOLOGIES BALANCE OF PLANT (BOP)"

Owner

  • Name: UK Atomic Energy Authority
  • Login: ukaea
  • Kind: organization

Citation (CITATION.cff)

abstract: "A power balance model framework which combines power consumption and generation to assesss the net power production of different tokamak fusion reactor designs"
authors: 
  -
    affiliation: UKAEA
    family-names: Petrov
    given-names: Alexander
    orcid: "https://orcid.org/0000-0003-4820-5227"
  -
    affiliation: UKAEA
    family-names: Zarebski
    given-names: Kristian
    orcid: "https://orcid.org/0000-0002-6773-1049"
  -
    affiliation: UKAEA
    family-names: Griffiths
    given-names: Rhys
  -
    affiliation: UKAEA
    family-names: Wray
    given-names: Steven
    orcid: "https://orcid.org/0000-0001-7535-7125"
  -
    affiliation: UKAEA
    family-names: Stroud
    given-names: Tom
  -
    affiliation: UKAEA
    family-names: Abdallah
    given-names: Mohamad
  -
    affiliation: UKAEA
    family-names: Clements
    given-names: Chris
  -
    affiliation: UKAEA
    family-names: Owoeye
    given-names: Taiwo
  -
    affiliation: UKAEA
    family-names: Cannon
    given-names: Marius
  - 
    affiliation: UKAEA
    family-names: Brewer
    given-names: Nicholas
  -
    affiliation: UKAEA
    family-names: Acres
    given-names: Jack
  -
    affiliation: UKAEA
    family-names: Laksharam
    given-names: Vignesh
  -
    family-names: Stewart
    given-names: Samuel
  -
    family-names: Rochford
    given-names: Katherine
  -
    family-names: Gribben
    given-names: Sophie
  -
    family-names: Finlay
    given-names: Christie
  -
    family-names: Jackson
    given-names: Timothy

cff-version: "1.2.0"
date-released: "2024-07-27"
keywords: 
  - "power balance"
  - fusion
  - research
  - "reactor physics"
license: LGPL-2.1+
message: "If you use this software, please cite it using these metadata."
title: "Power Balance Models"
commit: "e840b4711bcdfaad4b5ba5651ad91c126d8bbf5f"
version: "1.4.0"
repository-code: "https://github.com/ukaea/powerbalance"
url: "https://ukaea.github.io/powerbalance/"
references:
  - authors:
    - family-names: McAdams
      given-names: Roy
    title: "Negative ion research at the Culham Centre for Fusion Energy (CCFE)"
    type: article
    doi: 10.1088/1367-2630/aa4fa1
    date-published: "2016-12-23"
  - authors:
    - family-names: Stewart
      given-names: Samuel
      affiliation: University of Cardiff
    title: Modelling of Radio Frequency Heating and Current Drive Systems for Nuclear Fusion
    type: thesis
  - type: software
    repository-code: https://gitlab.com/krizar/pydelica
    authors:
    - given-names: Kristian
      family-names: Zarebski
      orcid: 'https://orcid.org/0000-0002-6773-1049'
    - given-names: Alexander
      family-names: Petrov
      orcid: 'https://orcid.org/0000-0003-4820-5227'
    title: PyDelica
  - title: OpenModelica
    authors:
      - name: Open Source Modelica Consortium (OSMC)
    repository-code: https://github.com/OpenModelica/OpenModelica
    type: software
    url: https://openmodelica.org
  - title: NumPy
    repository-code: https://github.com/numpy/numpy
    type: software
    url: https://numpy.org/
    authors:
      - name: NumPy Developers
  - title: Pandas
    repository-code: https://github.com/pandas-dev/pandas
    type: software
    url: https://pandas.pydata.org/
    authors:
      - name: AQR Capital Management, LLC, Lambda Foundry, Inc.
      - name: PyData Development Team
      - name: Open source contributors
  - title: Bokeh
    repository-code: https://github.com/bokeh/bokeh
    type: software
    url: https://bokeh.org/
    authors:
      - name: Anaconda, Inc.
      - name: Bokeh Contributors
  - title: Click
    repository-code: https://github.com/pallets/click
    type: software
    url: https://click.palletsprojects.com/
    authors:
      - name: Pallets
  - title: Pydantic
    repository-code: https://github.com/samuelcolvin/pydantic
    type: software
    url: https://pydantic-docs.helpmanual.io/
    authors:
      - family-names: Colvin
        given-names: Samuel
  - title: Jinja
    repository-code: https://github.com/pallets/jinja/
    type: software
    url: https://jinja.palletsprojects.com/
    authors:
      - name: Pallets
  - title: SciPy
    repository-code: https://github.com/scipy/scipy
    type: software
    url: https://scipy.org/
    authors:
      - name: SciPy Developers
  - title: Matplotlib
    repository-code: https://github.com/matplotlib/matplotlib
    type: software
    url: https://matplotlib.org/stable
    authors:
     - given-names: "John D."
       family-names: "Hunter"

GitHub Events

Total
  • Create event: 35
  • Release event: 1
  • Issues event: 2
  • Watch event: 1
  • Delete event: 28
  • Issue comment event: 31
  • Push event: 31
  • Pull request event: 66
Last Year
  • Create event: 35
  • Release event: 1
  • Issues event: 2
  • Watch event: 1
  • Delete event: 28
  • Issue comment event: 31
  • Push event: 31
  • Pull request event: 66

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 28
  • Average time to close issues: 10 months
  • Average time to close pull requests: 28 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.68
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 26
Past Year
  • Issues: 1
  • Pull requests: 28
  • Average time to close issues: N/A
  • Average time to close pull requests: 28 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.68
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 26
Top Authors
Issue Authors
  • kzscisoft (3)
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (171)
  • kzscisoft (5)
Top Labels
Issue Labels
enhancement (1) dependencies (1) bug (1)
Pull Request Labels
dependencies (171) python (11) enhancement (2) bug (1) quality (1)

Dependencies

poetry.lock pypi
  • 110 dependencies
pyproject.toml pypi
  • PyYAML ^6.0 develop
  • anybadge ^1.9.0 develop
  • asv ^0.5.1 develop
  • bandit ^1.7.4 develop
  • coverage ^6.4 develop
  • deepdiff ^5.8.1 develop
  • flake8 ^4.0.1 develop
  • mkdocs ^1.3.0 develop
  • mkdocs-click ^0.7.0 develop
  • mkdocs-coverage ^0.2.5 develop
  • mkdocs-git-revision-date-localized-plugin ^1.0.1 develop
  • mkdocs-material ^8.3.2 develop
  • mkdocs-mermaid2-plugin ^0.6.0 develop
  • mypy ^0.960 develop
  • pre-commit ^2.19.0 develop
  • pyinstrument ^4.1.1 develop
  • pylint ^2.13.9 develop
  • pymdown-extensions ^9.4 develop
  • pytest ^7.1.2 develop
  • readability-lxml ^0.8.1 develop
  • typed-ast ^1.5.4 develop
  • types-Jinja2 ^2.11.9 develop
  • types-PyYAML ^6.0.7 develop
  • types-pkg-resources ^0.1.3 develop
  • types-toml ^0.10.6 develop
  • unimport ^0.9.6 develop
  • virtualenv ^20.14.1 develop
  • Jinja2 ^3.0.3
  • bokeh ^2.4.2
  • click ^8.1.3
  • html2text ^2020.1.16
  • matplotlib ^3.5.2
  • numpy ^1.22.4
  • pandas ^1.4.2
  • prettytable ^3.3.0
  • pydantic ^1.9.0
  • pydelica ^0.4.3
  • python ^3.8,<3.11
  • scipy ^1.8.1
  • tables ^3.7.0
  • toml ^0.10.2
.github/workflows/artifact_clearout.yml actions
  • c-hive/gha-remove-artifacts v1 composite
.github/workflows/build_run_linux.yml actions
  • Gr1N/setup-poetry v8 composite
  • actions/checkout v3 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
  • codecov/codecov-action v2 composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite
.github/workflows/pr_benchmarks.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
.github/workflows/quality_control.yml actions
  • Gr1N/setup-poetry v8 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • isort/isort-action master composite
  • jpetrucciani/bandit-check master composite
  • psf/black stable composite
.github/workflows/release.yml actions
  • Gr1N/setup-poetry v8 composite
  • WyriHaximus/github-action-get-previous-tag v1 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • softprops/action-gh-release v1 composite
docker/Dockerfile docker
  • openmodelica/openmodelica v1.18.0-ompython build