Skip to content

Commit

Permalink
electrolyzer ageing function single module - complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Alematiale committed Apr 8, 2024
1 parent f49ddde commit 7e4528a
Show file tree
Hide file tree
Showing 2 changed files with 304 additions and 283 deletions.
10 changes: 5 additions & 5 deletions core/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def loc_power_simulation(self,step,weather):
self.power_balance['hydrogen']['electrolyzer'][step], \
self.power_balance['electricity']['electrolyzer'][step],\
self.power_balance['oxygen']['electrolyzer'][step], \
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,p=pb['electricity']) # [:2] # hydrogen supplied by electrolyzer(+) # electricity absorbed by the electorlyzer(-)
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,p=pb['electricity'],Text=weather['temp_air'][step]) # [:2] # hydrogen supplied by electrolyzer(+) # electricity absorbed by the electorlyzer(-)

pb['hydrogen'] += self.power_balance['hydrogen']['electrolyzer'][step]
pb['electricity'] += self.power_balance['electricity']['electrolyzer'][step]
Expand All @@ -416,7 +416,7 @@ def loc_power_simulation(self,step,weather):
self.power_balance['hydrogen']['electrolyzer'][step], \
self.power_balance['electricity']['electrolyzer'][step],\
self.power_balance['oxygen']['electrolyzer'][step], \
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,p=pb['electricity']) # hydrogen [kg/s] and oxygen [kg/s] produced by the electrolyzer (+) electricity [kW] and water absorbed [m^3/s] (-)
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,p=pb['electricity'],Text=weather['temp_air'][step]) # hydrogen [kg/s] and oxygen [kg/s] produced by the electrolyzer (+) electricity [kW] and water absorbed [m^3/s] (-)

# avaliable hydrogen calculation
available_hyd = self.technologies['H tank'].LOC[step] + self.technologies['H tank'].max_capacity - self.technologies['H tank'].used_capacity # [kg] hydrogen amount available in the storage system at the considered timestep.
Expand All @@ -427,7 +427,7 @@ def loc_power_simulation(self,step,weather):
self.power_balance['hydrogen']['electrolyzer'][step], \
self.power_balance['electricity']['electrolyzer'][step],\
self.power_balance['oxygen']['electrolyzer'][step], \
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,hydrog=hyd_from_ele) # hydrogen [kg/s] and oxygen [kg/s] produced by the electrolyzer (+) electricity [kW] and water absorbed [m^3/s] (-)
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,hydrog=hyd_from_ele,Text=weather['temp_air'][step]) # hydrogen [kg/s] and oxygen [kg/s] produced by the electrolyzer (+) electricity [kW] and water absorbed [m^3/s] (-)

# pb['hydrogen'] += self.power_balance['hydrogen']['electrolyzer'][step]
# pb['electricity'] += self.power_balance['electricity']['electrolyzer'][step]
Expand All @@ -439,7 +439,7 @@ def loc_power_simulation(self,step,weather):
self.power_balance['hydrogen']['electrolyzer'][step], \
self.power_balance['electricity']['electrolyzer'][step],\
self.power_balance['oxygen']['electrolyzer'][step], \
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,p=self.technologies['electrolyzer'].min_partial_load) # [:2] # hydrogen supplied by electrolyzer(+) # electricity absorbed by the electorlyzer(-)
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,p=self.technologies['electrolyzer'].min_partial_load,Text=weather['temp_air'][step]) # [:2] # hydrogen supplied by electrolyzer(+) # electricity absorbed by the electorlyzer(-)

# pb['hydrogen'] += self.power_balance['hydrogen']['electrolyzer'][step]
# pb['electricity'] += self.power_balance['electricity']['electrolyzer'][step]
Expand All @@ -463,7 +463,7 @@ def loc_power_simulation(self,step,weather):
self.power_balance['hydrogen']['electrolyzer'][step], \
self.power_balance['electricity']['electrolyzer'][step], \
self.power_balance['oxygen']['electrolyzer'][step], \
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd) # [:2] # hydrogen supplied by electrolyzer(+) # electricity absorbed by the electorlyzer(-)
self.power_balance['water']['electrolyzer'][step] = self.technologies['electrolyzer'].use(step,storable_hydrogen=producible_hyd,Text=weather['temp_air'][step]) # [:2] # hydrogen supplied by electrolyzer(+) # electricity absorbed by the electorlyzer(-)

pb['hydrogen'] += self.power_balance['hydrogen']['electrolyzer'][step]
pb['electricity'] += self.power_balance['electricity']['electrolyzer'][step]
Expand Down
Loading

0 comments on commit 7e4528a

Please sign in to comment.