Skip to content

[Question / Bug?] in fuel_cell.use for PEM-cell #68

Description

@wafab112

In the use-function of the fuel_cell I saw that when using up a partial load, the residual_power is set to 0 when it is lower than the MinOutputPower:

MESSpy/techs/fuelcell.py

Lines 898 to 911 in 9db6970

if residual_power >= self.MinOutputPower:
hyd_singlemodule,power_singlemodule,FC_Heat_singlemodule,etaFC_singlemodule,water_singlemodule = fuel_cell.use1(self,step,-residual_power,residual_hydrogen)
if hyd_singlemodule != 0: # single module operating in partial load
self.n_modules_used[step] = full_modules + 1
self.EFF[step] = ((full_modules*etaFC_full) + (etaFC_singlemodule))/self.n_modules_used[step] # weighted average
self.EFF_last_module[step] = etaFC_singlemodule
else:
self.n_modules_used[step] = full_modules
self.EFF[step] = etaFC_full
else:
residual_power = 0
hyd_singlemodule,power_singlemodule,FC_Heat_singlemodule,water_singlemodule = [0]*4
self.n_modules_used[step] = full_modules
self.EFF[step] = etaFC_full

But I thought in this case the MinOutputPower should be used by the fuel cell, as it was done in the case of just one module being used:

MESSpy/techs/fuelcell.py

Lines 855 to 873 in 9db6970

if (abs(p) <= self.Npower) or (available_hydrogen/self.max_h2_module < 1): # if required power or available hydrogen in system are lower than nominal fuel cell parameters
if abs(p) >= self.MinOutputPower:
hyd,power,FC_Heat,etaFC,water = fuel_cell.use1(self,step,p,available_hydrogen)
if abs(hyd) > 0:
self.n_modules_used[step] = 1
else:
self.n_modules_used[step] = 0
self.EFF[step] = etaFC
else:
p = self.MinOutputPower
hyd,power,FC_Heat,etaFC,water = fuel_cell.use1(self,step,-p,available_hydrogen)
if abs(hyd) > 0:
self.n_modules_used[step] = 1
else:
self.n_modules_used[step] = 0
self.EFF[step] = etaFC

Is that the case or is there a mistake in my thought-process

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions