-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
#1511 add function for initial soc #1512
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1512 +/- ##
===========================================
+ Coverage 98.34% 98.41% +0.06%
===========================================
Files 296 296
Lines 17149 17827 +678
===========================================
+ Hits 16866 17545 +679
+ Misses 283 282 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handy! thanks @tinosulzer
self._built_model = None | ||
self.op_conds_to_built_models = None | ||
|
||
c_n_init = self.parameter_values[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to get the initial concentrations here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks Tino!
The initial stoichiometries that give the desired initial state of charge | ||
""" | ||
if initial_soc < 0 or initial_soc > 1: | ||
raise ValueError("Initial SOC should be between 0 and 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently not tested
Description
Add function to set initial soc in a simulation
Fixes #1511
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.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: