Issue 2334 reformat parameters#2342
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportBase: 99.65% // Head: 99.65% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #2342 +/- ##
=========================================
Coverage 99.65% 99.65%
=========================================
Files 361 269 -92
Lines 19948 20079 +131
=========================================
+ Hits 19879 20010 +131
Misses 69 69
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
rtimms
left a comment
There was a problem hiding this comment.
thanks, this is much simpler!
| """ | ||
| m_ref = ( | ||
| 1 * 10 ** (-11) * pybamm.constants.F | ||
| ) # (A/m2)(mol/m3)**1.5 - includes ref concentrations |
There was a problem hiding this comment.
I think this comment is wrong everywhere and has been forever haha. Shouldn't the units be (A/m2)(m3/mol)**1.5 or equivalent?
There was a problem hiding this comment.
I agree with Rob. I think it makes sense to leave the units, corrected though, as a quick sanity check.
| output = preamble + "\n\n" + output | ||
|
|
||
| # Add pybamm. to functions that didn't have it in function body before | ||
| for funcname in [ |
There was a problem hiding this comment.
should we add a broader set of "standard" functions here or wait and add them until people need them?
There was a problem hiding this comment.
not sure ... also not sure whether we really need this function at all tbh?
brosaplanella
left a comment
There was a problem hiding this comment.
Amazing! Thanks @tinosulzer :)
| """ | ||
| m_ref = ( | ||
| 1 * 10 ** (-11) * pybamm.constants.F | ||
| ) # (A/m2)(mol/m3)**1.5 - includes ref concentrations |
There was a problem hiding this comment.
I agree with Rob. I think it makes sense to leave the units, corrected though, as a quick sanity check.
| parameter_values = pybamm.ParameterValues( | ||
| { | ||
| "chemistry": "lithium_ion", | ||
| "cell": "Enertech_Ai2020", | ||
| "negative electrode": "graphite_Ai2020", | ||
| "separator": "separator_Ai2020", | ||
| "positive electrode": "lico2_Ai2020", | ||
| "electrolyte": "lipf6_Enertech_Ai2020", | ||
| "experiment": "1C_discharge_from_full_Ai2020", | ||
| "sei": "example", | ||
| "citation": "Ai2019", | ||
| } | ||
| ) |
| @@ -35,7 +35,7 @@ def test_load_params(self): | |||
| for solvent in ["EC_DMC_1_1", "EC_EMC_3_7", "EMC_FEC_19_1"]: | |||
| root = pybamm.root_dir() | |||
| p = ( | |||
| "pybamm/input/parameters/lithium_ion/electrolytes/lipf6_" | |||
| "pybamm/input/parameters/lithium_ion/testing_only/electrolytes/lipf6_" | |||
There was a problem hiding this comment.
Maybe related to the previous comment, but why is testing_only needed?
|
@brosaplanella I kept the |
| # Load data in the appropriate format | ||
| path, _ = os.path.split(os.path.abspath(__file__)) | ||
| graphite_ocp_Enertech_Ai2020 = pybamm.parameters.process_1D_data( | ||
| "graphite_ocp_Enertech_Ai2020.csv", path=path | ||
| ) | ||
| lico2_ocp_Ai2020 = pybamm.parameters.process_1D_data("lico2_ocp_Ai2020.csv", path=path) | ||
|
|
There was a problem hiding this comment.
@martinjrobins what do you think of this approach?
Makes sense, I agree we should keep it at least for a while. |
|
Merging since all tests pass. We can refactor where we put the "data" parameters if needed |
Description
Change parameters to python files (+ some csv files). Breaking change.
Fixes #2334
Fixes #2077
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 docsand then$ make clean; make htmlYou can run all three at once, using
$ python run-tests.py --quick.Further checks: