-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Issue 692 external temperature matrix #728
Conversation
…er with plotting remain
…temperature-matrix
Codecov Report
@@ Coverage Diff @@
## master #728 +/- ##
==========================================
+ Coverage 98.27% 98.35% +0.07%
==========================================
Files 175 175
Lines 9351 9599 +248
==========================================
+ Hits 9190 9441 +251
+ Misses 161 158 -3
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.
Thanks Scott, looks great. I wonder if it might be a bit neater to set external models by doing e.g. options = {"thermal": "external"}
instead of the extra list, but not a very strongly held opinion.
Could you also edit the set_temperature_spm_1plus1D
results file with this new format, and add a corresponding example for 1D?
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.
thanks @Scottmar93 looks great! like how you retain all the features/derived variables of the submodel that you set externally. can the script results/2plus1D/set_temperature_spm_1plus1D.py
be updated to use this functionality? then i think the submodel x_lumped_1D_set_temperature
can be removed. Need to keep the set potential model for now until we have implemented potentiostatic.
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 @Scottmar93 !
Description
Added a more general method for interfacing with external variables. Can choose any submodel to be external and then one needs to just pass the variable that would have been solved for by the submodel if it wasn't made external to the solver at each time step. This only works for stepping.
Works for solvers except Casadi (tino knows how to get this working though).
I have also added a couple of helper methods to Simulation that make it easy to pass and extract arrays corresponding to variables to/from pybamm.
Fixes #692
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.
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: