Package: hes-off
HES-OFFDescriptionDespite the efforts to move towards a carbon-neutral future, the global demand of fossil fuels continues to grow.  As a result, the oil and gas (O&G) industry if facing a double challenge: meet the increased need for energy while simultaneously reducing its overall emissions. One way to achieve these goals is through the use of hybrid energy systems that combine renewable energies with conventional power generation.In this context,HES-OFFPython package offers a platform-independent environment for the simulation of hybrid energy systems for stable heat and power supply in off-shore oil and gas installations. The code was developed aiming at ease of use and computational speed. Some notable features of the package are listed below:Supports the simulation of off-shore energy systems that integrate offshore wind power with gas turbines and an energy storage solution based on proton exchange membrane fuel cells and electrolysers.Contains commercial and user-defined numerical models to simulate the performance of the different system components.Includes an intuitive, web-based graphical user interface to perform the simulations and visualize the results.The backend of the interface was developed using the Flask frameworkThe frontend of the interface was developed using the Bootstrap frameworkThe web-based app is currently hosted in the Heroku platformUses the Numba JIT compiler to achieve execution times comparable with those of compiled languages such as C++ or FORTRAN.Getting startedRunning the all onlineThere is not need to install anything to start using the online web application! Justopen the appand start playing around with the different parameters and settings. The user interface has many tooltips and warnings to guide the users and help them understand what inputs are expected.Running the app locallyIf you want to have access to the core functionality of the HES-OFF package, you can install it withpip:pipinstallhes_offOnce the package is installed, you can run the web application locally typing the following command in your terminal:python3-c"import hes_off; hes_off.launch_app()"DocumentationTo be completedAdd link to Read the Docs documentationAdd the links to related publicationsLicenseThehes_offpackage is licensed under the terms of the MIT license. See thelicense filefor more information.Contact informationTo be completedTo-do listAdd option to export Excel files with results (Roberto)Add option to add a user-defined model for the electrolyzer and fuel cell systems (Roberto)Prepare some test cases and compare results with MATLAB (Luca)Prepare a documentation page usingRead the Docs(Erick)Implement the electric grid surrogate model (Erick)Implement a gradient-free optimization for designPrepare a paper for an open-software journalJournal of open-source softwareElsevier's SoftwareX journalDeploymentThis section is intended for developersIn order to deploy the app you must create aHeroku accountand install theHeroku command line interface. Once you are set, open a terminal in the project's root directory and type the following commands:Create a Conda virtual environment with all the dependencies using theenvironment.ymlfile:condaenvcreateenvironment.ymlCheck that the app works locally typing this one-liner in your terminal:python3-c"import hes_off; hes_off.launch_app()"If the app works locally, then create arequirements.txtfile with the list of dependencies:piplist--format=freeze>requirements.txtCreate theProcfilefile in case it does not exists already:echo"web: gunicorn app:app">ProcfileDeploy the app to Heroku with a Git push;gitpushherokumainThat's it! The app might take some moments to go online.Known caveatsIn some cases therequirements.txtfile might include some unnecessary packages that cause the Heroku deployment to fail. If this is the case,remove the problematic packagesand try to re-deploy.python setup.py sdist bdist_wheel