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 base parameter class #4378

Open
wants to merge 33 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9447f76
Break up Chen2020
kratman Aug 20, 2024
5d7bac4
Add new base class
kratman Aug 20, 2024
3ac6988
Working on base parameter class
kratman Aug 20, 2024
137be6a
Split thermal and converted lead-acid
kratman Aug 20, 2024
ab756f8
Style
kratman Aug 20, 2024
97699ed
Added base class to all Li-ion models
kratman Aug 20, 2024
9559363
Update Xu2019
kratman Aug 20, 2024
98e536f
Update Ramadass2004
kratman Aug 21, 2024
36980b6
Merge branch 'develop' of github.com:kratman/PyBaMM into feat/refacto…
kratman Aug 21, 2024
f248715
Update prada2013
kratman Aug 21, 2024
9b60f84
Partial update to ORegan
kratman Aug 21, 2024
56b1588
Prada cleanup
kratman Aug 21, 2024
7ef8588
Update ORegan2022
kratman Aug 21, 2024
242a34d
Finish Ai2020
kratman Aug 21, 2024
7597c2b
Fixes
kratman Aug 21, 2024
2020e91
Update chen composite
kratman Aug 21, 2024
54d0e3f
Finish Ecker2015
kratman Aug 21, 2024
0a6b506
Update Ecker2015Graphite
kratman Aug 21, 2024
e5bb634
Update Marquis2019
kratman Aug 21, 2024
9107e27
Fix docstring test
kratman Aug 21, 2024
96bd4dc
Finish Mohtat2020
kratman Aug 21, 2024
ce28934
Update Kim2011
kratman Aug 21, 2024
df6f53a
Update OKane2022
kratman Aug 21, 2024
73d72f7
Update OKane2022 graphite siox halfcell
kratman Aug 21, 2024
587ed57
Merge branch 'develop' of github.com:kratman/PyBaMM into feat/refacto…
kratman Aug 26, 2024
82fcaaa
Minor docs updates
kratman Aug 26, 2024
12f8e1f
Merge branch 'develop' of github.com:kratman/PyBaMM into feat/refacto…
kratman Aug 27, 2024
02bbe32
Doc fixes
kratman Aug 27, 2024
d165a0e
Add tests
kratman Aug 27, 2024
5fbfd8f
Remove redundant init
kratman Aug 27, 2024
421ac28
Merge branch 'develop' into feat/refactorParameters
kratman Sep 2, 2024
51c4978
Merge branch 'develop' into feat/refactorParameters
kratman Sep 2, 2024
3848c7c
Merge branch 'develop' into feat/refactorParameters
kratman Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/pybamm/input/parameters/base_parameter_set.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class AbstractBaseParameters:
Copy link
Member

Choose a reason for hiding this comment

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

Why is it AbstractBaseParameters and not just BaseParameters? If anything, these would be battery parameters (rather than abstract parameters). Also, might be worth to use BaseParameterSet or BaseParameterValues instead. I think we are not 100% consistent with this, but in theory parameters are the concept (e.g. diffusion coefficient) while parameter values/sets are the value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Abstract as in an abstract class where implementation details are not fully defined. The idea was that this provides an interface that we can extend for the various parameter sets.

Copy link
Member

Choose a reason for hiding this comment

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

+1 for changing to AbstractBaseParameterSets

"""
Base class for grouping and processing parameter sets.
"""

_details = {}
_plating = {}
_sei = {}
_thermal = {}
_cell = {}
_negative_electrode = {}
_positive_electrode = {}
_separator = {}
_electrolyte = {}

def degradation_available(self):
return True if self._sei else False

def thermal_available(self):
return True if self._thermal else False

def plating_available(self):
return True if self._plating else False

def get_param_set(self):
full_set = {}
for sub_set in [
self._details,
self._plating,
self._sei,
self._thermal,
self._cell,
self._negative_electrode,
self._positive_electrode,
self._separator,
self._electrolyte,
]:
full_set.update(sub_set)
return full_set
Loading
Loading