Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wafab112 opened this issue Mar 13, 2025 · 0 comments
Open

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

wafab112 opened this issue Mar 13, 2025 · 0 comments

Comments

@wafab112
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant