Download a design file¶
In this example we will demonstrate how to download a parameter set from the Breathe Simulate API to be used in the Matlab version of Breathe Simulate.
In [1]:
Copied!
from breathe_simulate import api_interface as api
from breathe_simulate import api_interface as api
In [2]:
Copied!
base_params = api.get_design_parameters("Molicel P45B")
base_params = api.get_design_parameters("Molicel P45B")
In [3]:
Copied!
designs = [
{"designName": "Lower NP", "NPratio": base_params["NPratio"] * 0.95},
{"designName": "Higher NP", "NPratio": base_params["NPratio"] * 1.05},
]
designs = [
{"designName": "Lower NP", "NPratio": base_params["NPratio"] * 0.95},
{"designName": "Higher NP", "NPratio": base_params["NPratio"] * 1.05},
]
In [4]:
Copied!
base_format = api.get_battery_format("Molicel P45B")
base_format = api.get_battery_format("Molicel P45B")
In [5]:
Copied!
smaller_format = api.get_updated_format(
base_battery="Molicel P45B",
name="smaller_format",
height_mm=0.9 * base_format["height_mm"],
)
smaller_format = api.get_updated_format(
base_battery="Molicel P45B",
name="smaller_format",
height_mm=0.9 * base_format["height_mm"],
)
You can save both cells with design as well as format changes. You can now use your virtual designs to run battery or pack simulations with Breathe Simulate in SimScape. You can request access Breathe Simulate by going to our website: https://www.breathebatteries.com/
In [6]:
Copied!
api.download_designs(
base_battery="Molicel P45B",
designs=designs,
formats=[smaller_format],
output_tag="design",
)
api.download_designs(
base_battery="Molicel P45B",
designs=designs,
formats=[smaller_format],
output_tag="design",
)
Running...: 100%|�-^�-^�-^�-^�-^�-^�-^�-^�-^�-^| 2/2 [00:01<00:00, 1.33 designs/s]
Out[6]:
['.\\BMJN_0.json', '.\\BMJN_1.json', '.\\BMJN_2.json', '.\\BMJN_3.json']
Version 73723266