Change battery form factor¶
In this example we will redesign a battery form factor. Thereafter compare our virtual cells to the baseline
In [1]:
Copied!
from breathe_simulate import api_interface as api
from breathe_simulate import enable_notebook_plotly
enable_notebook_plotly()
from breathe_simulate import api_interface as api
from breathe_simulate import enable_notebook_plotly
enable_notebook_plotly()
In [2]:
Copied!
cell = "Molicel P45B"
cell = "Molicel P45B"
We will begin with load the format of the Molicel P45B
In [3]:
Copied!
base_format = api.get_battery_format(cell)
base_format
base_format = api.get_battery_format(cell)
base_format
Out[3]:
{'shape': 'cylinder',
'format_type': 'Cylinder',
'material': 'steel',
'housingThickness_mm': 0.18,
'repeating_stack_thickness_mm': 0.23976666666666674,
'anode_cc_thickness_um': 11.2,
'cathode_cc_thickness_um': 22.2,
'anode_cc_conductivity_sm': 59600000,
'cathode_cc_conductivity_sm': 37700000,
'nr_layers': [1, 2, 2, 2, 1],
'nr_windings': [0, 0, 0, 0, 0],
'component_thicknesses_um': [11.2,
48.90000000000002,
16.8,
37.48333333333334,
22.2],
'component_widths_mm': [64.0, 63.0, 65.0, 63.0, 63.0],
'clearance_height_mm': 4.640000000000001,
'clearance_diameter_mm': 0.39328340279907403,
'clearance_length_mm': 0,
'clearance_width_mm': 0,
'clearance_thickness_mm': 0,
'diameter_mm': 21.21,
'height_mm': 70,
'innerDiameter_mm': 2.3,
'inner_diameter_mm': 2.3,
'accessible_diameter_mm': 20.456716597200927,
'accessible_height_mm': 65.0}
We will now apply changes to the format we do this with get_updated_format method. We will generate 10% shorter cell compared to baseline
In [4]:
Copied!
smaller_format = api.get_updated_format(
base_battery=cell,
name="smaller_format",
height_mm=0.9 * base_format["height_mm"],
)
smaller_format
smaller_format = api.get_updated_format(
base_battery=cell,
name="smaller_format",
height_mm=0.9 * base_format["height_mm"],
)
smaller_format
Out[4]:
{'shape': 'cylinder',
'format_type': 'Cylinder',
'material': 'steel',
'housingThickness_mm': 0.18,
'repeating_stack_thickness_mm': 0.23976666666666674,
'anode_cc_thickness_um': 11.2,
'cathode_cc_thickness_um': 22.2,
'anode_cc_conductivity_sm': 59600000,
'cathode_cc_conductivity_sm': 37700000,
'nr_layers': [1, 2, 2, 2, 1],
'nr_windings': [0, 0, 0, 0, 0],
'component_thicknesses_um': [11.2,
48.90000000000002,
16.8,
37.48333333333334,
22.2],
'component_widths_mm': [64.0, 63.0, 65.0, 63.0, 63.0],
'clearance_height_mm': 4.640000000000001,
'clearance_diameter_mm': 0.39328340279907403,
'clearance_length_mm': 0,
'clearance_width_mm': 0,
'clearance_thickness_mm': 0,
'diameter_mm': 21.21,
'height_mm': 63.0,
'innerDiameter_mm': 2.3,
'inner_diameter_mm': 2.3,
'accessible_diameter_mm': 20.456716597200927,
'accessible_height_mm': 65.0,
'name': 'smaller_format'}
We will also create a cell with 10% smaller diameter
In [5]:
Copied!
thinner_format = api.get_updated_format(
base_battery=cell,
name="thinner_format",
diameter_mm=0.9 * base_format["diameter_mm"],
)
thinner_format
thinner_format = api.get_updated_format(
base_battery=cell,
name="thinner_format",
diameter_mm=0.9 * base_format["diameter_mm"],
)
thinner_format
Out[5]:
{'shape': 'cylinder',
'format_type': 'Cylinder',
'material': 'steel',
'housingThickness_mm': 0.18,
'repeating_stack_thickness_mm': 0.23976666666666674,
'anode_cc_thickness_um': 11.2,
'cathode_cc_thickness_um': 22.2,
'anode_cc_conductivity_sm': 59600000,
'cathode_cc_conductivity_sm': 37700000,
'nr_layers': [1, 2, 2, 2, 1],
'nr_windings': [0, 0, 0, 0, 0],
'component_thicknesses_um': [11.2,
48.90000000000002,
16.8,
37.48333333333334,
22.2],
'component_widths_mm': [64.0, 63.0, 65.0, 63.0, 63.0],
'clearance_height_mm': 4.640000000000001,
'clearance_diameter_mm': 0.39328340279907403,
'clearance_length_mm': 0,
'clearance_width_mm': 0,
'clearance_thickness_mm': 0,
'diameter_mm': 19.089000000000002,
'height_mm': 70,
'innerDiameter_mm': 2.3,
'inner_diameter_mm': 2.3,
'accessible_diameter_mm': 20.456716597200927,
'accessible_height_mm': 65.0,
'name': 'thinner_format'}
In [6]:
Copied!
formats = [smaller_format, thinner_format]
formats = [smaller_format, thinner_format]
Now we can calculate all the equilibrium KPIs for each format using the get_eqm_kpis function. Instead of passing multiple designs as in previous examples, we now pass multiple formats.
In [7]:
Copied!
results = api.get_eqm_kpis(cell, designs=[], formats=formats)
results = api.get_eqm_kpis(cell, designs=[], formats=formats)
In [8]:
Copied!
results.get_kpis()
results.get_kpis()
Out[8]:
| Baseline | smaller_format | thinner_format | |
|---|---|---|---|
| KPI | |||
| Capacity [Ah] | 4.500000 | 3.961879 | 3.478236 |
| Nominal Voltage [V] | 3.656630 | 3.656630 | 3.656630 |
| Energy [Wh] | 16.454834 | 14.487124 | 12.718622 |
| Gravimetric Energy Density [Wh/kg] | 241.196572 | 237.492392 | 228.904574 |
| Volumetric Energy Density [Wh/l] | 665.310310 | 650.834256 | 634.871421 |
| Minimum Anode Voltage [mV] | 80.487709 | 80.487709 | 80.487709 |
| Weight [g] | 68.221675 | 61.000370 | 55.562987 |
| Volume [l] | 0.024733 | 0.022259 | 0.020033 |
| heat_capacity_kjkgk | 1.200000 | 1.247571 | 1.289552 |
| price_usd | NaN | NaN | NaN |
| price_usdkwh | NaN | NaN | NaN |
| price_usdkg | NaN | NaN | NaN |
These can be plotted using the compare_designs method in two different ways: one for a relative change in the KPIs and one for a delta change in the KPIs.
In [9]:
Copied!
results.compare_designs("relative")
results.compare_designs("relative")
In [10]:
Copied!
results.compare_designs("delta")
results.compare_designs("delta")
In [11]:
Copied!
results.plot_radar()
results.plot_radar()
Version 8e4a326f