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

Issue 1115 surface area #1120

Merged
merged 11 commits into from
Aug 4, 2020
Merged

Issue 1115 surface area #1120

merged 11 commits into from
Aug 4, 2020

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Jul 31, 2020

Description

Computes surface area per unit volume a as a function of particle shape. A major change is that the modules that contained the standard parameters are now classes (so they can take options, such as particle shape).

Also fixes some bugs in the models when R=R(x). For now we don't allow active material volume fraction to be a function of x (see #1119), so we only have a(x) when we have R(x).

Fixes #1115

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

@codecov
Copy link

codecov bot commented Aug 4, 2020

Codecov Report

Merging #1120 into develop will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1120      +/-   ##
===========================================
+ Coverage    97.82%   97.87%   +0.05%     
===========================================
  Files          245      245              
  Lines        13281    13382     +101     
===========================================
+ Hits         12992    13098     +106     
+ Misses         289      284       -5     
Impacted Files Coverage Δ
pybamm/parameters/parameter_values.py 99.29% <ø> (ø)
pybamm/expression_tree/unary_operators.py 100.00% <100.00%> (ø)
pybamm/geometry/battery_geometry.py 100.00% <100.00%> (+6.25%) ⬆️
...er2019/lead_exchange_current_density_Sulzer2019.py 100.00% <100.00%> (ø)
...ead_dioxide_exchange_current_density_Sulzer2019.py 100.00% <100.00%> (ø)
...2019/oxygen_exchange_current_density_Sulzer2019.py 100.00% <100.00%> (ø)
...0_electrolyte_exchange_current_density_Chen2020.py 100.00% <100.00%> (ø)
..._electrolyte_exchange_current_density_Ecker2015.py 100.00% <100.00%> (ø)
...te_electrolyte_exchange_current_density_Kim2011.py 100.00% <100.00%> (ø)
..._electrolyte_exchange_current_density_PeymanMPM.py 100.00% <100.00%> (ø)
... and 33 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 4e4e1ab...5f3c713. Read the comment docs.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @rtimms ! I might have missed it, but is there an example for setting particle shape to "user"?

}
)

return a_n, a_p
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this return variables? Otherwise it is just quietly updating them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, good point, thanks.

@rtimms
Copy link
Contributor Author

rtimms commented Aug 4, 2020

thanks @tinosulzer will add an example for "user" then merge

@rtimms rtimms merged commit dd37a7f into develop Aug 4, 2020
@rtimms rtimms deleted the issue-1115-surface-area branch August 4, 2020 18:25
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.

automatically compute parameters based on geometry
2 participants