Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add degradation models benchmarks #2132

Merged

Conversation

Vaibhav-Chopra-GT
Copy link
Contributor

Description

Added benchmarks for degradation models for SPM and DFN (build, simulate, solve) for each model option by adding model values and model as params.
Also, what should I name them?

Fixes # (issue)

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@valentinsulzer
Copy link
Member

You should name them based on the option e.g. TimeBuildModelLossActiveMaterial

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #2132 (5a91418) into develop (4ec415d) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #2132      +/-   ##
===========================================
- Coverage    99.38%   99.35%   -0.03%     
===========================================
  Files          352      356       +4     
  Lines        19289    19357      +68     
===========================================
+ Hits         19170    19233      +63     
- Misses         119      124       +5     
Impacted Files Coverage Δ
pybamm/parameters/parameter_sets.py 100.00% <ø> (ø)
pybamm/models/base_model.py 98.53% <0.00%> (-0.73%) ⬇️
...tential_form/explicit_surface_form_conductivity.py 95.00% <0.00%> (-0.24%) ⬇️
.../submodels/interface/kinetics/diffusion_limited.py 98.21% <0.00%> (-0.04%) ⬇️
...m/models/full_battery_models/base_battery_model.py 99.75% <0.00%> (-0.02%) ⬇️
pybamm/__init__.py 100.00% <0.00%> (ø)
pybamm/settings.py 100.00% <0.00%> (ø)
pybamm/solvers/solution.py 100.00% <0.00%> (ø)
pybamm/parameters/lithium_ion_parameters.py 100.00% <0.00%> (ø)
... and 54 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ded5a57...5a91418. Read the comment docs.

pybamm.standard_spatial_vars.x_n: 20,
pybamm.standard_spatial_vars.x_s: 20,
pybamm.standard_spatial_vars.x_p: 20,
pybamm.standard_spatial_vars.r_n: 30,
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using 30 in the particles for some reason (e.g. convergence)? Otherwise might be better to keep the default (20).

@@ -0,0 +1,549 @@
import pybamm
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo in the filename (degredation instead of degradation).

param.process_model(self.model)
param.process_geometry(geometry)

# set mesh
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these lines be replaced by compute_discretisation? (It appears multiple times below, so not repeating the comment)

@valentinsulzer
Copy link
Member

how long does it take to run now?

@Vaibhav-Chopra-GT
Copy link
Contributor Author

how long does it take to run now?

15 minutes

@valentinsulzer valentinsulzer merged commit 3fb5877 into pybamm-team:develop Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants