Metadata-Version: 2.1
Name: GreenHEART
Version: 0.1.0a0
Summary: Green Hydrogen Energy and Renewable Technologies
Author-email: NREL <dguittet@nrel.gov>
License: **Note: The ProFAST model is distributed with GreenHEART but operates under a separate license agreement. Users must agree to the license terms of ProFAST located at `ProFAST/InternalUseTermsForDownloadableSoftware-ProFAST.docx`.**
        
        BSD 3-Clause License
        
        Copyright (c) 2020, Alliance for Sustainable Energy, LLC
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of the copyright holder nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: source, https://github.com/NREL/GreenHEART
Project-URL: issues, https://github.com/NREL/GreenHEART/issues
Project-URL: changelog, https://github.com/NREL/GreenHEART/blob/main/CHANGELOG.md
Keywords: python3,hybrid-energy,wind-energy,solar-energy,layout-optimization
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.12,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Cython
Requires-Dist: NREL-PySAM ==4.2.0
Requires-Dist: Pillow
Requires-Dist: Plotly
Requires-Dist: Pyomo >=6.1.2
Requires-Dist: diskcache
Requires-Dist: fastkml
Requires-Dist: floris
Requires-Dist: future
Requires-Dist: global-land-mask
Requires-Dist: humpday
Requires-Dist: hybridbosse
Requires-Dist: lcoe
Requires-Dist: lxml
Requires-Dist: matplotlib
Requires-Dist: multiprocessing-on-dill
Requires-Dist: nevergrad
Requires-Dist: numpy
Requires-Dist: numpy-financial
Requires-Dist: optuna
Requires-Dist: pandas >=2.0.3
Requires-Dist: pint
Requires-Dist: plotly
Requires-Dist: pvmismatch
Requires-Dist: pyDOE2
Requires-Dist: pymoo
Requires-Dist: pyproj
Requires-Dist: pysolar
Requires-Dist: pysot
Requires-Dist: python-dotenv
Requires-Dist: python-rapidjson
Requires-Dist: pytz
Requires-Dist: rainflow
Requires-Dist: requests
Requires-Dist: scikit-learn
Requires-Dist: scikit-optimize
Requires-Dist: scipy
Requires-Dist: shapely <2.0.0,>=1.8.5
Requires-Dist: setuptools
Requires-Dist: timezonefinder
Requires-Dist: urllib3
Requires-Dist: openpyxl
Requires-Dist: CoolProp
Requires-Dist: attrs
Requires-Dist: utm
Requires-Dist: HOPP
Requires-Dist: orbit-nrel >=1.1
Requires-Dist: openmdao[all]
Provides-Extra: all
Requires-Dist: greenheart[develop,examples] ; extra == 'all'
Provides-Extra: develop
Requires-Dist: pytest ; extra == 'develop'
Requires-Dist: pytest-subtests ; extra == 'develop'
Requires-Dist: responses ; extra == 'develop'
Requires-Dist: sphinx ; extra == 'develop'
Requires-Dist: sphinx-rtd-theme ; extra == 'develop'
Requires-Dist: sphinx-copybutton ; extra == 'develop'
Requires-Dist: Plotly ; extra == 'develop'
Provides-Extra: examples
Requires-Dist: jupyterlab ; extra == 'examples'

# GreenHEART: Green Hydrogen Energy and Renewable Technologies

## GreenHEART: Green Hydrogen Energy and Renewable Technologies

[![PyPI version](https://badge.fury.io/py/greeheart.svg)](https://badge.fury.io/py/greenheart)
![CI Tests](https://github.com/NREL/GreenHEART/actions/workflows/ci.yml/badge.svg)
[![image](https://img.shields.io/pypi/pyversions/greeheart.svg)](https://pypi.python.org/pypi/greeheart)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

Hybrid project power-to-x component-level system performance and financial modeling for control and
design optimization. GreenHEART currently includes renewable energy, hydrogen, ammonia, and steel.
Other elements such as desalination systems, pipelines, compressors, and storage systems can also be
included as needed.


## Software requirements

- Python version 3.9, 3.10, 3.11 64-bit
- Other versions may still work, but have not been extensively tested at this time

## Installing from Package Repositories

1. GreenHEART is available as a PyPi package:

    ```bash
    pip install greenheart
    ```

## Installing from Source

1. Using Git, navigate to a local target directory and clone repository:

    ```bash
    git clone https://github.com/NREL/GreenHEART.git
    ```

2. Navigate to `GreenHEART`

    ```bash
    cd GreenHEART
    ```

3. Create a new virtual environment and change to it. Using Conda and naming it 'greenheart':

    ```bash
    conda create --name greenheart python=3.9 -y
    conda activate greenheart
    ```

4. Install GreenHEART and its dependencies:

    ```bash
    conda install -y -c conda-forge coin-or-cbc=2.10.8 glpk
    pip install electrolyzer@git+https://github.com/jaredthomas68/electrolyzer.git@smoothing
    pip install ProFAST@git+https://github.com/NREL/ProFAST.git
    ```

    Note if you are on Windows, you will have to manually install Cbc: https://github.com/coin-or/Cbc.

    - If you want to just use GreenHEART:

       ```bash
       pip install .  
       ```

    - If you want to work with the examples:

       ```bash
       pip install ".[examples]"
       ```

    - If you also want development dependencies for running tests and building docs:  

       ```bash
       pip install -e ".[develop]"
       ```

    - In one step, all dependencies can be installed as:

      ```bash
      pip install -e ".[all]
      ```

5. The functions which download resource data require an NREL API key. Obtain a key from:

    [https://developer.nrel.gov/signup/](https://developer.nrel.gov/signup/)

6. To set up the `NREL_API_KEY` and `NREL_API_EMAIL` required for resource downloads, you can create
   Environment Variables called `NREL_API_KEY` and `NREL_API_EMAIL`. Otherwise, you can keep the key
   in a new file called ".env" in the root directory of this project.

    Create a file ".env" that contains the single line:

    ```bash
    NREL_API_KEY=key
    NREL_API_EMAIL=your.name@email.com
    ```

7. Verify setup by running tests:

    ```bash
    pytest
    ```


2. To set up `NREL_API_KEY` for resource downloads, first refer to section 7 and 8 above. But for
   the `.env` file method, the file should go in the working directory of your Python project, e.g.
   directory from where you run `python`.

## Parallel processing for GreenHEART finite differences and design of experiments

GreenHEART is set up to run in parallel using MPI and PETSc for finite differencing and for design of
experiments runs through OpenMDAO. To use this capability you will need to follow the addtional installation
instruction below:

```bash
conda install -c conda-forge mpi4py petsc4py
```

For more details on implementation and installation, reference the documentation for OpenMDAO.

To to check that your installation is working, do the following:

```bash
cd tests/greenheart/
mpirun -n 2 pytest test_openmdao_mpi.py
```

## Getting Started

The [Examples](./examples/) contain Jupyter notebooks and sample YAML files for common usage
scenarios in GreenHEART. These are actively maintained and updated to demonstrate GreenHEART's
capabilities. For full details on simulation options and other features, documentation is
forthcoming.

## Contributing

Interested in improving GreenHEART? Please see the [Contributing](./CONTRIBUTING.md) section for more information.
