HyVeOpt
This is the documentation of hyveopt, a Python package for the design and techno-economical analysis of green hydrogen plants.
Installation
Requirements: Before installing hyveopt, ensure that you have Python 3.12.5 (or later) installed on your system. You can download and install the latest version of Python from the official Python website:
https://www.python.org/downloads/
Once Python 3 is installed, you can install hyveopt by running the following command:
pip install hyveopt --find-links=https://hyve.cl/pypi/
Quick Example
import hyveopt as h2
# **************************************************************************** #
# Create system components templates
# **************************************************************************** #
plant_template = h2.PlantTemplate(
name="myplant",
location=("22°10'17.66\"S", "70° 5'23.50\"W") # ~ Tocopilla, Chile.
)
electrolizer_efficiency = h2.Gain(
breakpoints = [0.0, 0.1, 0.4, 0.7, 1],
slopes = [0.,2., 0.5, 0.2],
intercepts = [0.0, -0.1, 0.5, 0.8]
)
plant_template.add(h2.TemplateElectrolizer(
name="electrolizer",
pnom_kW=h2.Range(0., 200.),
gain=electrolizer_efficiency,
inv_cost_per_kw=1300.
)
)
plant_template.add(h2.TemplateESS(
name="battery",
pnom_kW=h2.Range(0., 200.),
soc_nom_kWh=h2.Range(0., 100.),
inv_cost_per_kw=200.,
bat_kw_to_kwh=3.
))
plant_template.add(h2.TemplatePVSystem(
name="pv_system",
snom_KVA=h2.Range(0., 200.),
solar_irradiance=h2.TSParameter(tsname="si_pv_system", default=0.0),
inv_cost_per_kw=1100.
))
# **************************************************************************** #
# Planning horizon definition and time series data generation
# **************************************************************************** #
time_config = h2.PlanningTimeConfig(
planning_horizon_start='2025-01-01',
planning_horizon_end='2065-12-31',
scenarios_per_year=2,
scenario_resolution='1D',
scenario_subsampling='1h' # Sampling frequency for simulation purposes.
)
tsdata = h2.SingleBusDesignData.generate_tsdata(plant_template, time_config)
# **************************************************************************** #
# Create and solve sizing model
# **************************************************************************** #
pdata = h2.SingleBusDesignData(
budget_inv_M=100.,
plant_template=plant_template,
time_config=time_config,
tsdata=tsdata
)
model = h2.SingleBusDesignModel(pdata)
model.solve()
# **************************************************************************** #
# Print solution report
# **************************************************************************** #
model.report()