forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into ocvr_ecm
- Loading branch information
Showing
69 changed files
with
1,958 additions
and
1,608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# | ||
# Compare lithium-ion battery models | ||
# | ||
import pybamm | ||
|
||
pybamm.set_logging_level("INFO") | ||
|
||
# load models | ||
models = [ | ||
pybamm.lithium_ion.SPMe( | ||
{"thermal": "lumped", "surface temperature": "ambient"}, | ||
name="ambient surface temperature", | ||
), | ||
pybamm.lithium_ion.SPMe( | ||
{"thermal": "lumped", "surface temperature": "lumped"}, | ||
name="lumped surface temperature", | ||
), | ||
] | ||
|
||
experiment = pybamm.Experiment( | ||
[ | ||
"Discharge at 1C until 2.5V", | ||
"Rest for 1 hour", | ||
] | ||
) | ||
|
||
parameter_values = pybamm.ParameterValues("Chen2020") | ||
parameter_values.update( | ||
{ | ||
"Casing heat capacity [J.K-1]": 30, | ||
"Environment thermal resistance [K.W-1]": 10, | ||
}, | ||
check_already_exists=False, | ||
) | ||
|
||
# create and run simulations | ||
sols = [] | ||
for model in models: | ||
model.variables["Bulk temperature [°C]"] = ( | ||
model.variables["Volume-averaged cell temperature [K]"] - 273.15 | ||
) | ||
model.variables["Surface temperature [°C]"] = ( | ||
model.variables["Surface temperature [K]"] - 273.15 | ||
) | ||
sim = pybamm.Simulation( | ||
model, parameter_values=parameter_values, experiment=experiment | ||
) | ||
sol = sim.solve([0, 3600]) | ||
sols.append(sol) | ||
|
||
# plot | ||
pybamm.dynamic_plot( | ||
sols, | ||
[ | ||
"Voltage [V]", | ||
"Bulk temperature [°C]", | ||
"Surface temperature [°C]", | ||
"Surface total cooling [W]", | ||
"Environment total cooling [W]", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.