https://github.com/plasmacontrol/faroes
Fusion analysis, research, and optimization for energy systems
https://github.com/plasmacontrol/faroes
Last synced: 6 months ago
JSON representation
Fusion analysis, research, and optimization for energy systems
- Host: GitHub
- URL: https://github.com/plasmacontrol/faroes
- Owner: PlasmaControl
- License: mit
- Created: 2022-08-12T18:18:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-13T16:20:02.000Z (over 3 years ago)
- Last Synced: 2024-11-15T22:18:59.135Z (over 1 year ago)
- Language: Python
- Size: 865 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
******
FAROES
******
FAROES is "Fusion Analysis, Research, and Optimization for Energy Systems". It is a Python package for optimizing fusion power plants, and especially for optimizing properties like their capital cost or levelized cost of energy. It is built in a modular fashion to allow user-developers to modify or add equations or analyses of their own design.
It uses the OpenMDAO framework (openmdao.org) to provide interfaces to third-party nonlinear solvers and optimizers, especially gradient-based optimizers. The framework has advanced logging features to record solution data and metadata.
This framework also allows users to easily specify the design variables, constraints, and optimization targets, or to define their own.
|forthebadge made-with-python|
|pytest| |unittest| |license|
.. |forthebadge made-with-python| image:: http://ForTheBadge.com/images/badges/made-with-python.svg
:target: https://www.python.org/
.. |pytest| image:: https://github.com/cfe316/FAROES/workflows/pytests/badge.svg
:target: https://github.com/cfe316/FAROES/workflows/pytests/badge
:alt: Pytest build status
.. |unittest| image:: https://github.com/cfe316/FAROES/workflows/unittest-installs/badge.svg
:target: https://github.com/cfe316/FAROES/workflows/unittest-installs/badge
:alt: Unittest build status
.. |license| image:: https://img.shields.io/badge/License-MIT-blue.svg
:target: https://opensource.org/licenses/MIT
:alt: MIT licensed
Requirements
------------
* ``numpy>=1.21.0``
* ``scipy``
* ``openmdao == 3.15.0``. Can be installed with ``pip install "openmdao==3.15.0"``.
* ``ruamel >= 0.16``, a yaml parser.
* ``plasmapy`` (https://www.plasmapy.org/).
All these can be installed automatically using the ``setup.py`` file.
Installation
------------
Download the repo, ``cd`` to the folder and run ``pip install -e .``. This will download and install requirements and install FAROES in 'editable' mode.
Recommended Packages
---------------------
The two below can be installed on linux using the script available here: https://github.com/OpenMDAO/build_pyoptsparse/
* ``pyoptsparse`` (https://github.com/mdolab/pyoptsparse) in order to access the ``pyOptSparseDriver`` which allows use of more powerful optimizers like ``IPOPT``.
* ``IPOPT``. This is optimizer seems to perform a bit better than the implemntations of ``COBYLA`` or ``SLSQP`` which are included with ``scipy``.
Note that an environment variable must be set in every terminal instance using ``IPOPT``. We recommend adding a line to ``~/.bashrc`` to do this automatically for every terminal instance: ``export LD_LIBRARY_PATH=$HOME/ipopt/lib:$LD_LIBRARY_PATH``
Documentation Packages
--------------------
* ``docutils<0.17,>=0.15``
* ``nbclient<0.6,>=0.2``
* ``sphinx >= 4.4.0``
* ``jupyter-sphinx==0.3.2``
* ``Jinja2<3.1``
* ``sphinxcontrib-bibtex >= 2.3``
* ``jsonschema < 4``
* ``sphinx_rtd_theme``
The above packages are used to build the documentation for FAROES, and can be downloaded automatically by downloading the repos, ``cd`` to the folder, and running ``pip install -e .[docs]``, which will install FAROES in 'editable' mode alongside with the packages needed to build the documentation.
Funding
-------
This work was supported by the U.S. Department of Energy under contract number DE-AC02-09CH11466.
The developer grants to the Government, and others acting on its behalf,
a nonexclusive, paid-up, irrevocable, world-wide license in such copyrighted data to reproduce,
prepare derivative works, distribute copies to the public, and perform publicly and display publicly,
by or on behalf of the Government.