Breathe Design
A class for interacting with the Breathe Design API.
download_designs
Send the design parameters for a given battery to the API, and get the resulting design, to be used with the Simulink blocks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery to use to generate the design |
required |
designs
|
list[str]
|
The designs for the simulation. |
[]
|
formats
|
list[str]
|
The formats for the simulation. |
[]
|
output_tag
|
str
|
A tag to be included in the metadata description. |
''
|
folder
|
str
|
The folder where design files will be saved. Defaults to current directory. |
'.'
|
Raises: BreatheException: description
ensure_logged_in
Checks if a valid token is available and refreshes it if necessary.
get_active_materials
Gets a list of all acive materials.
Returns:
| Type | Description |
|---|---|
Dataframe
|
containing the battery active materials. |
get_aged_ocv
Gets the OCV summary table for a base battery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery model for the design parameters. |
required |
LAMPE
|
float
|
The electrolyte loss at positive electrode (PE) side. |
0.0
|
LAMNE
|
float
|
The electrolyte loss at negative electrode (NE) side. |
0.0
|
LLI
|
float
|
The loss of lithium inventory. |
0.0
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
containing the OCV summary table. |
get_batteries
Gets a list of all batteries in your library.
Returns:
| Type | Description |
|---|---|
list[str]
|
list of the available battery models. Use these strings in subsequent functions for the "base_battery" argument. |
get_battery_format
Gets the battery format for a base battery. These are the form factor and cell casing parameters available for change in the api.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery model for the battery format. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
containing the battery format. |
get_design_parameters
Gets the design parameters for a base battery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery model for the design parameters. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
containing the design parameters. |
get_eqm_kpis
Gets the equilibrium kpis for a given base battery, designs, and initial conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery model for the simulation. |
required |
designs
|
list[dict]
|
The designs for the simulation. |
[]
|
formats
|
list[dict]
|
The battery formats for the simulation. |
[]
|
Returns:
| Type | Description |
|---|---|
SingleSimulationResults
|
A results handler object containing the equilibrium KPIs. Use the plot_sensitivities() method to generate sensitivity plots. |
get_ocv
Gets the OCV summary table for a base battery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery model for the design parameters. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
containing the OCV summary table. |
get_service_version
Get the version number of the API
Returns:
| Name | Type | Description |
|---|---|---|
_type_ |
Version
|
description |
get_updated_format
Gets the battery format for a base battery and updates it with the additional keywords. These are the form factor and cell casing parameters available for change in the api. Args: base_battery (str): The base battery model for the battery format.
Returns:
| Type | Description |
|---|---|
dict
|
containing the battery format. |
run_sim
run_sim(
base_battery,
cycler,
designs=[],
formats=[],
initialSoC=0.5,
initialTemperature_degC=25.0,
ambientTemperature_degC=25.0,
)
Runs a simulation for a given base battery, cycler, designs, and initial conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_battery
|
str
|
The base battery model for the simulation. |
required |
cycler
|
dict
|
The cycler parameters for the simulation. |
required |
designs
|
list[dict]
|
The design parameters for the simulation. |
[]
|
formats
|
list[dict]
|
The battery formats for the simulation. |
[]
|
initialSoC
|
int | float | list[int | float]
|
The initial state of charge for the simulation. If a single value is provided, it will be used for all simulations. If a list of values is provided, multiple simulations will be run with each value. |
0.5
|
initialTemperature_degC
|
int | float | list[int | float]
|
The initial temperature for the simulation in degC. If a single value is provided, it will be used for all simulations. If a list of values is provided, multiple simulations will be run with each value. |
25.0
|
ambientTemperature_degC
|
int | float | list[int | float]
|
The ambient temperature for the simulation in degC. If a single value is provided, it will be used for all simulations. If a list of values is provided, multiple simulations will be run with each value. |
25.0
|
Returns:
| Type | Description |
|---|---|
SimulationResults
|
A results handler object containing the simulation results. This automatically handles both single and batch simulations. |