Skip to content

Commit

Permalink
Make the conversion battery module useful for multivalent cations (m…
Browse files Browse the repository at this point in the history
…aterialsproject#985)

* Make the conversion battery module useful for multivalent cations

Applied the same treatment as we did for insertion electrodes. When the ion oxidation state is 2+, the voltage reduced to half, and the capacity multiplied by 2.

* Add unittest for multivalent working ion

Using Mg-MnO2 as the testing case.

* updated the Conversion battery

* testing file for the unittest of multivalent conversion battery module

Mg-Mn-O system
  • Loading branch information
miaoliu authored and shyuep committed Jan 6, 2018
1 parent f947f70 commit 0d82915
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pymatgen/apps/battery/conversion_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,10 @@ def from_steps(step1, step2, normalization_els):
"""
working_ion_entry = step1["element_reference"]
working_ion = working_ion_entry.composition.elements[0].symbol
voltage = -step1["chempot"] + working_ion_entry.energy_per_atom
working_ion_valence = max(Element(working_ion).oxidation_states)
voltage = (-step1["chempot"] + working_ion_entry.energy_per_atom)/working_ion_valence
mAh = (step2["evolution"] - step1["evolution"]) \
* Charge(1, "e").to("C") * Time(1, "s").to("h") * N_A * 1000
* Charge(1, "e").to("C") * Time(1, "s").to("h") * N_A * 1000*working_ion_valence
licomp = Composition(working_ion)
prev_rxn = step1["reaction"]
reactants = {comp: abs(prev_rxn.get_coeff(comp))
Expand Down
16 changes: 12 additions & 4 deletions pymatgen/apps/battery/tests/test_conversion_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def setUp(self):
pass

def test_init(self):
formulas = ['LiCoO2', "FeF3"]
# both 'LiCoO2' and "FeF3" are using Li+ as working ion; MnO2 is for the multivalent Mg2+ ion
formulas = ['LiCoO2', "FeF3", "MnO2"]
expected_properties = {}
expected_properties['LiCoO2'] = {'average_voltage': 2.26940307125,
'capacity_grav': 903.19752911225669,
Expand All @@ -48,7 +49,11 @@ def test_init(self):
'capacity_vol': 2132.2069115142394,
'specific_energy': 1841.8103016131706,
'energy_density': 6528.38954147}

expected_properties['MnO2'] = {'average_voltage': 1.7127027687901726,
'capacity_grav': 790.9142070034802,
'capacity_vol': 3543.202003526853,
'specific_energy': 1354.6009522103434,
'energy_density': 6068.451881823329}
for f in formulas:

with open(os.path.join(test_dir, f + "_batt.json"), 'r') as fid:
Expand All @@ -58,9 +63,12 @@ def test_init(self):

# with open(os.path.join(test_dir, f + "_batt.json"), 'w') as fid:
#json.dump(entries, fid, cls=MontyEncoder)

if f in ['LiCoO2', "FeF3"]:
working_ion = "Li"
elif f in ["MnO2"]:
working_ion = "Mg"
c = ConversionElectrode.from_composition_and_entries(
Composition(f), entries)
Composition(f), entries,working_ion_symbol=working_ion)
self.assertEqual(len(c.get_sub_electrodes(True)), c.num_steps)
self.assertEqual(len(c.get_sub_electrodes(False)),
sum(range(1, c.num_steps + 1)))
Expand Down
1 change: 1 addition & 0 deletions test_files/MnO2_batt.json

Large diffs are not rendered by default.

0 comments on commit 0d82915

Please sign in to comment.