Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
dallan-keylogic committed Dec 13, 2023
1 parent 603a292 commit 2ec19d2
Showing 1 changed file with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -735,26 +735,37 @@ def test_initialization_cell_voltage_drop_custom(model_vdc):
# should be less than that in channel, and concentration at TPB should
# be less than that at the surface
assert pyo.value(cell.fuel_channel.conc_mol_comp_deviation_x1[0, iz, "H2O"]) < 0
assert pyo.value(
cell.fuel_electrode.conc_mol_comp_deviation_x1[0, iz, "H2O"]
- cell.fuel_channel.conc_mol_comp_deviation_x1[0, iz, "H2O"]
) < 0
assert (
pyo.value(
cell.fuel_electrode.conc_mol_comp_deviation_x1[0, iz, "H2O"]
- cell.fuel_channel.conc_mol_comp_deviation_x1[0, iz, "H2O"]
)
< 0
)
# H2 is produced at fuel electrode, concentration at electrode surface
# should be greater than that in channel, and concentration at TPB should
# be greater than that at the surface
assert pyo.value(cell.fuel_channel.conc_mol_comp_deviation_x1[0, iz, "H2"]) > 0
assert pyo.value(
cell.fuel_electrode.conc_mol_comp_deviation_x1[0, iz, "H2"]
- cell.fuel_channel.conc_mol_comp_deviation_x1[0, iz, "H2"]
) > 0
assert (
pyo.value(
cell.fuel_electrode.conc_mol_comp_deviation_x1[0, iz, "H2"]
- cell.fuel_channel.conc_mol_comp_deviation_x1[0, iz, "H2"]
)
> 0
)
# O2 is produced at oxygen electrode, concentration at electrode surface
# should be greater than that in channel, and concentration at TPB should
# be greater than that at the surface
assert pyo.value(cell.oxygen_channel.conc_mol_comp_deviation_x0[0, iz, "O2"]) > 0
assert pyo.value(
cell.oxygen_electrode.conc_mol_comp_deviation_x0[0, iz, "O2"]
- cell.oxygen_channel.conc_mol_comp_deviation_x0[0, iz, "O2"]
) > 0
assert (
pyo.value(cell.oxygen_channel.conc_mol_comp_deviation_x0[0, iz, "O2"]) > 0
)
assert (
pyo.value(
cell.oxygen_electrode.conc_mol_comp_deviation_x0[0, iz, "O2"]
- cell.oxygen_channel.conc_mol_comp_deviation_x0[0, iz, "O2"]
)
> 0
)

# Test whether unfixed degrees of freedom remain unfixed
cell.potential.unfix()
Expand Down Expand Up @@ -816,5 +827,5 @@ def test_model_replication_voltage_drop_custom(model_vdc):
m = model_func()
out = kazempoor_braun_replication(m)
# Uncomment to recreate cached data
# for i, df in enumerate(out):
# df.to_csv(os.sep.join([data_cache, f"case_{i+1}_interconnect.csv"]))
for i, df in enumerate(out):
df.to_csv(os.sep.join([data_cache, f"case_{i+1}_interconnect.csv"]))

0 comments on commit 2ec19d2

Please sign in to comment.