Conversion water - energy, hydropower system

143 views
Skip to first unread message

albin cintas

unread,
Dec 11, 2023, 10:53:52 AM12/11/23
to pypsa
Hello, 

I'm interested in modelling an hydropower grid with pumped storage systems and I have got some issues concerning the conversion between water and energy. 
My goal would be to create 3 reservoirs, reservoir1 would be linked to reservoir2 which would be linked to reservoir3. They have decreasing altitudes (h1>h2>h3). 
Between those reservoirs, there are turbines with a certain efficiency that generate power from the water going downstream and pumps from the water going upstream. 

Now, based on Two chained reservoirs — PyPSA: Python for Power System Analysis, I built such a model, but in this example the stores are defined with energy features. However, a reservoir has a volume of water. So I could define that the reservoir1 has a potential energy given by the difference of altitude between it and the reservoir2. However the reservoir2 can send water to reservoir1 by pump system and to reservoir3 by turbine system. So the same amount of water in reservoir2 would have different energy, and I think that it's becoming confusing. 

So I was wondering if someone has already thought about this problem and have found a smarter way to model it with PyPSA or to understand the energy representation? 

Thanks in advance,
Albin Cintas 

albin cintas

unread,
Dec 13, 2023, 2:28:32 AM12/13/23
to pypsa
Hello everyone, 

Here is the solution found so far of the problem described above: 

############ CASCADE OF TURBINES/PUMPS

altitude1 = 1000
altitude2 = 500
altitude3 = 200
rho = 1000
g = 9.81
eff_turbine1 = 0.8
eff_turbine2 = 0.85
J2MWh = 2.77778e-10

n.add("Bus", "bus 1")
n.add("Bus", "bus 2")
n.add("Bus", "bus 3")
n.add("Bus", "bus pump 1")
n.add("Bus", "bus pump 2")
n.add("Bus", "bus load 1")
n.add("Bus", "bus load 2")

n.add("Store", "store1", bus="bus 1", e_nom=1e4, e_initial=5e3, marginal_cost=1)
n.add("Store", "store2", bus="bus 2", e_nom=1e4, e_initial=5e3, marginal_cost=1)
n.add("Store", "store3", bus="bus 3", e_nom=1e4, e_initial=5e3, marginal_cost=1)

n.add("Generator", "pump 1", bus="bus pump 1", p_nom=1e4, marginal_cost=2)
n.add("Generator", "pump 2", bus="bus pump 2", p_nom=1e4, marginal_cost=2)

n.add("Load", "load 1", bus="bus load 1", p_set=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
n.add("Load", "load 2", bus="bus load 2", p_set=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1])

n.add("Link", "Turbine 1", bus0="bus 1", bus1="bus load 1", bus2="bus 2", efficiency=rho*g*(altitude1-altitude2)*eff_turbine1*J2MWh, efficiency2=1, p_nom=1e4, marginal_cost=1)
n.add("Link", "Turbine 2", bus0="bus 2", bus1="bus load 2", bus2="bus 3", efficiency=rho*g*(altitude2-altitude3)*eff_turbine2*J2MWh, efficiency2=1, p_nom=1e4, marginal_cost=1)
n.add("Link", "Pump 1", bus0="bus pump 1", bus1="bus 2", bus2="bus 1", efficiency=-1/(J2MWh*rho*g*(altitude1-altitude2)), efficiency2=1/(J2MWh*rho*g*(altitude1-altitude2)), p_nom=1e5, marginal_cost=1)
n.add("Link", "Pump 2", bus0="bus pump 2", bus1="bus 3", bus2="bus 2", efficiency=-1/(J2MWh*rho*g*(altitude2-altitude3)), efficiency2=1/(J2MWh*rho*g*(altitude2-altitude3)), p_nom=1e5, marginal_cost=1)


# optimize :
n.optimize(solver_name='highs', solver_options={})

In this code, I consider that the energy from the stores is the volume of the reservoirs and I use the efficiencies to convert this volume to energy using the potential energy of each store. The pump is modelled as a generator and the turbines are simple links. Feel free to ask me for further details. 


Albin Cintas. 
Reply all
Reply to author
Forward
0 new messages