Plots
plot_dynamic_response
Create a line plot of dynamic response for multiple designs.
This function generates a Plotly figure that visualizes the dynamic response given the variable name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
A dictionary where keys are design names and values are dictionaries containing 'Time' and 'voltModel' data for each design. The structure should be: {design_name: {'Time': [...], 'voltModel': [...]}, ...} |
required |
variable_name
|
str
|
The name of the variable to plot. variable_name can be one of the following: Time, voltModel, voltAnode, voltCathode, ocvModel, ocvAnode, ocvCathode, tempSurfaceModel, socModel, socAnode, socCathode, currModel, heatFluxModel. |
'voltModel'
|
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the line plot of dynamic KPI performance, which can be displayed or further modified. |
plot_kpis
Create a horizontal bar plot comparing KPI values of different designs to a baseline.
This function generates a plotly figure that visualizes the performance of various design alternatives compared to a baseline design for different Key Performance Indicators (KPIs).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
DataFrame
|
A DataFrame containing KPI values for different designs. It should have columns for 'KPI', 'Baseline', and other design alternatives. |
required |
plot_type
|
str
|
A string indicating the type of plot to generate. It can be either "relative" or "delta". |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the horizontal bar chart of KPI values, which can be displayed or further modified. |
plot_ocv
Create a scatter plot of OCV data for a battery. This function generates a plotly figure that visualizes the OCV data for a battery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
battery
|
dict
|
A dictionary containing OCV data for a battery. The structure should be: { "SoC": [...], "ChargeVoltage_V_": [...], "DischargeVoltage_V_": [...], "AnodeChargeVoltage_V_": [...] |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the scatter plot of OCV data, which can be displayed or further modified. |
plot_sensitivities
Create a heatmap plot of sensitivities for different KPIs and parameters.
This function generates a heatmap visualization of the sensitivity values for various Key Performance Indicators (KPIs) with respect to different parameters. The heatmap is normalized for each KPI to enhance visual comparison.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kpi_names
|
list
|
A list of strings representing the names of the KPIs. |
required |
sensitivities
|
dict
|
A dictionary where keys are parameter names and values are lists of sensitivity values corresponding to each KPI. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the sensitivity heatmap, which can be displayed or further modified. |
plot_voltage_response
Create a line plot of voltage response for multiple designs.
This function generates a Plotly figure that visualizes the voltage response of various designs over time, specifically focusing on voltage models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
A dictionary where keys are design names and values are dictionaries containing 'Time' and 'voltModel' data for each design. The structure should be: {design_name: {'Time': [...], 'voltModel': [...]}, ...} |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the line plot of dynamic KPI performance, which can be displayed or further modified. |
radar_plot
Create a radar plot to visualize the performance of various designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
DataFrame
|
A DataFrame containing the performance metrics of various designs. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A radar plot representing the performance of various designs. |