Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
brosaplanella committed May 4, 2020
2 parents 7084b61 + 1bdbdaf commit 8433b53
Show file tree
Hide file tree
Showing 149 changed files with 2,136 additions and 1,371 deletions.
22 changes: 15 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,42 @@

## Features

- Added tab, edge, and surface cooling ([#965](https://github.com/pybamm-team/PyBaMM/pull/965))
- Added functionality to solver to automatically discretise a 0D model ([#947](https://github.com/pybamm-team/PyBaMM/pull/947))
- Added sensitivity to `CasadiAlgebraicSolver` ([#940](https://github.com/pybamm-team/PyBaMM/pull/940))
- Added `ProcessedSymbolicVariable` class, which can handle symbolic variables (i.e. variables for which the inputs are symbolic) ([#940](https://github.com/pybamm-team/PyBaMM/pull/940))
- Made `QuickPlot` compatible with Google Colab ([#935](https://github.com/pybamm-team/PyBaMM/pull/935))
- Added `BasicFull` model for lead-acid ([#932](https://github.com/pybamm-team/PyBaMM/pull/932))
- Added 'arctan' function ([#973]https://github.com/pybamm-team/PyBaMM/pull/973)

## Optimizations

- Changed default solver for DAE models to `CasadiSolver` ([#978](https://github.com/pybamm-team/PyBaMM/pull/978))
- Added some extra simplifications to the expression tree ([#971](https://github.com/pybamm-team/PyBaMM/pull/971))
- Changed the behaviour of "safe" mode in `CasadiSolver` ([#956](https://github.com/pybamm-team/PyBaMM/pull/956))
- Sped up model building ([#927](https://github.com/pybamm-team/PyBaMM/pull/927))
- Changed default solver for lead-acid to `CasadiSolver` ([#927](https://github.com/pybamm-team/PyBaMM/pull/927))

## Bug fixes

- Fixed `Interpolant` ids to allow processing ([#962](https://github.com/pybamm-team/PyBaMM/pull/962)
- Added extra checks when creating a model, for clearer errors ([#971](https://github.com/pybamm-team/PyBaMM/pull/971))
- Fixed `Interpolant` ids to allow processing ([#962](https://github.com/pybamm-team/PyBaMM/pull/962))
- Fixed a bug in the initial conditions of the potential pair model ([#954](https://github.com/pybamm-team/PyBaMM/pull/954))
- Changed simulation attributes to assign copies rather than the objects themselves ([#952](https://github.com/pybamm-team/PyBaMM/pull/952)
- Added default values to base model so that it works with the `Simulation` class ([#952](https://github.com/pybamm-team/PyBaMM/pull/952)
- Fixed solver to recompute initial conditions when inputs are changed ([#951](https://github.com/pybamm-team/PyBaMM/pull/951)
- Reformatted thermal submodels ([#938](https://github.com/pybamm-team/PyBaMM/pull/938)
- Changed simulation attributes to assign copies rather than the objects themselves ([#952](https://github.com/pybamm-team/PyBaMM/pull/952))
- Added default values to base model so that it works with the `Simulation` class ([#952](https://github.com/pybamm-team/PyBaMM/pull/952))
- Fixed solver to recompute initial conditions when inputs are changed ([#951](https://github.com/pybamm-team/PyBaMM/pull/951))
- Reformatted thermal submodels ([#938](https://github.com/pybamm-team/PyBaMM/pull/938))
- Reformatted electrolyte submodels ([#927](https://github.com/pybamm-team/PyBaMM/pull/927))
- Reformatted convection submodels ([#635](https://github.com/pybamm-team/PyBaMM/pull/635))

## Breaking changes

- Renamed "surface area density" to "surface area to volume ratio" ([#975](https://github.com/pybamm-team/PyBaMM/pull/975))
- Replaced "reaction rate" with "exchange-current density" ([#975](https://github.com/pybamm-team/PyBaMM/pull/975))
- Changed the implementation of reactions in submodels ([#948](https://github.com/pybamm-team/PyBaMM/pull/948))
- Removed some inputs like `T_inf`, `R_g` and activation energies to some of the standard function parameters. This is because each of those inputs is specific to a particular function (e.g. the reference temperature at which the function was measured). To change a property such as the activation energy, users should create a new function, specifying the relevant property as a `Parameter` or `InputParameter` ([#942](https://github.com/pybamm-team/PyBaMM/pull/942))
- The thermal option 'xyz-lumped' has been removed. The option 'thermal current collector' has also been removed ([#938](https://github.com/pybamm-team/PyBaMM/pull/938)
- The 'C-rate' parameter has been deprecated. Use 'Current function [A]' instead. The cell capacity can be accessed as 'Cell capacity [A.h]', and used to calculate current from C-rate ([#952](https://github.com/pybamm-team/PyBaMM/pull/952)
- The thermal option 'xyz-lumped' has been removed. The option 'thermal current collector' has also been removed ([#938](https://github.com/pybamm-team/PyBaMM/pull/938))
- The 'C-rate' parameter has been deprecated. Use 'Current function [A]' instead. The cell capacity can be accessed as 'Cell capacity [A.h]', and used to calculate current from C-rate ([#952](https://github.com/pybamm-team/PyBaMM/pull/952))

# [v0.2.1](https://github.com/pybamm-team/PyBaMM/tree/v0.2.1) - 2020-03-31

Expand Down
6 changes: 5 additions & 1 deletion INSTALL-LINUX-MAC.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ On Ubuntu/debian
```
sudo apt install libopenblas-dev
```
and on Mac OS
```
brew install openblas
```
After installing PyBaMM, the following command can be used to automatically install `scikits.odes`
and its dependencies
```
Expand Down Expand Up @@ -155,5 +159,5 @@ might say:
```

If this is the case, on a Debian or Ubuntu system you can install OpenBLAS using `sudo
apt-get install libopenblas-dev` and then re-install sundials using the instructions
apt-get install libopenblas-dev` (or `brew install openblas` for Mac OS) and then re-install sundials using the instructions
above.
12 changes: 6 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/
include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/darken_thermodynamic_factor_Chapman1968.py
include pybamm/input/parameters/lead-acid/electrolytes/sulfuric_acid_Sulzer2019/viscosity_Chapman1968.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_diffusivity_Chen2020.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_reaction_rate_Chen2020.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Chen2020/graphite_LGM50_electrolyte_exchange_current_density_Chen2020.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_ocp_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_reaction_rate_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_electrolyte_exchange_current_density_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_entropic_change_Moura2016.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_mcmb2528_Marquis2019/graphite_mcmb2528_diffusivity_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_reaction_rate_Kim2011.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_electrolyte_exchange_current_density_Kim2011.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_ocp_Kim2011.py
include pybamm/input/parameters/lithium-ion/anodes/graphite_Kim2011/graphite_diffusivity_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_ocp_Kim2011_function.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_diffusivity_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_reaction_rate_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nca_Kim2011/nca_electrolyte_exchange_current_density_Kim2011.py
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_diffusivity_Chen2020.py
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_reaction_rate_Chen2020.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_reaction_rate_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/cathodes/nmc_Chen2020/nmc_LGM50_electrolyte_exchange_current_density_Chen2020.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_electrolyte_exchange_current_density_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_ocp_Dualfoil1998.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_entropic_change_Moura2016.py
include pybamm/input/parameters/lithium-ion/cathodes/lico2_Marquis2019/lico2_diffusivity_Dualfoil1998.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@
" 'Negative electrode double-layer capacity [F.m-2]': 0.2,\n",
" 'Negative electrode electrons in reaction': 1.0,\n",
" 'Negative electrode porosity': 0.3,\n",
" 'Negative electrode reaction rate': <function graphite_electrolyte_reaction_rate_Dualfoil1998 at 0x7f42bfb4a7a0>,\n",
" 'Negative electrode exchange-current density [A.m-2]': <function graphite_electrolyte_exchange_current_density_Dualfoil1998 at 0x7f42bfb4a7a0>,\n",
" 'Negative electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n",
" 'Negative electrode surface area density [m-1]': 180000.0,\n",
" 'Negative electrode surface area to volume ratio [m-1]': 180000.0,\n",
" 'Negative electrode thermal conductivity [W.m-1.K-1]': 1.7,\n",
" 'Negative electrode thickness [m]': 0.0001,\n",
" 'Negative particle distribution in x': 1.0,\n",
Expand Down Expand Up @@ -328,9 +328,9 @@
" 'Positive electrode double-layer capacity [F.m-2]': 0.2,\n",
" 'Positive electrode electrons in reaction': 1.0,\n",
" 'Positive electrode porosity': 0.3,\n",
" 'Positive electrode reaction rate': <function lico2_electrolyte_reaction_rate_Dualfoil1998 at 0x7f42bfb36710>,\n",
" 'Positive electrode exchange-current density [A.m-2]': <function lico2_electrolyte_exchange_current_density_Dualfoil1998 at 0x7f42bfb36710>,\n",
" 'Positive electrode specific heat capacity [J.kg-1.K-1]': 700.0,\n",
" 'Positive electrode surface area density [m-1]': 150000.0,\n",
" 'Positive electrode surface area to volume ratio [m-1]': 150000.0,\n",
" 'Positive electrode thermal conductivity [W.m-1.K-1]': 2.1,\n",
" 'Positive electrode thickness [m]': 0.0001,\n",
" 'Positive particle distribution in x': 1.0,\n",
Expand Down
8 changes: 4 additions & 4 deletions examples/notebooks/change-settings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"Negative electrode active material volume fraction 0.7\n",
"Negative particle radius [m] 1e-05\n",
"Negative particle distribution in x 1.0\n",
"Negative electrode surface area density [m-1] 180000.0\n",
"Negative electrode surface area to volume ratio [m-1] 180000.0\n",
"Negative electrode Bruggeman coefficient (electrolyte) 1.5\n",
"Negative electrode Bruggeman coefficient (electrode) 1.5\n",
"Negative electrode cation signed stoichiometry -1.0\n",
Expand All @@ -183,7 +183,7 @@
"Negative electrode thermal conductivity [W.m-1.K-1] 1.7\n",
"Negative electrode OCP entropic change [V.K-1] <function graphite_entropic_change_Moura2016 at 0x13020a0d0>\n",
"Reference temperature [K] 298.15\n",
"Negative electrode reaction rate <function graphite_electrolyte_reaction_rate_Dualfoil1998 at 0x13020a158>\n",
"Negative electrode exchange-current density [A.m-2] <function graphite_electrolyte_exchange_current_density_Dualfoil1998 at 0x13020a158>\n",
"Negative reaction rate activation energy [J.mol-1] 37480.0\n",
"Negative solid diffusion activation energy [J.mol-1] 42770.0\n",
"Positive electrode conductivity [S.m-1] 10.0\n",
Expand All @@ -194,7 +194,7 @@
"Positive electrode active material volume fraction 0.7\n",
"Positive particle radius [m] 1e-05\n",
"Positive particle distribution in x 1.0\n",
"Positive electrode surface area density [m-1] 150000.0\n",
"Positive electrode surface area to volume ratio [m-1] 150000.0\n",
"Positive electrode Bruggeman coefficient (electrolyte) 1.5\n",
"Positive electrode Bruggeman coefficient (electrode) 1.5\n",
"Positive electrode cation signed stoichiometry -1.0\n",
Expand All @@ -206,7 +206,7 @@
"Positive electrode specific heat capacity [J.kg-1.K-1] 700.0\n",
"Positive electrode thermal conductivity [W.m-1.K-1] 2.1\n",
"Positive electrode OCP entropic change [V.K-1] <function lico2_entropic_change_Moura2016 at 0x13020a2f0>\n",
"Positive electrode reaction rate <function lico2_electrolyte_reaction_rate_Dualfoil1998 at 0x13020a378>\n",
"Positive electrode exchange-current density [A.m-2] <function lico2_electrolyte_exchange_current_density_Dualfoil1998 at 0x13020a378>\n",
"Positive reaction rate activation energy [J.mol-1] 39570.0\n",
"Positive solid diffusion activation energy [J.mol-1] 18550.0\n",
"Separator porosity 1.0\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/models/DFN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
"|$\\mathcal{C}_{\\text{e}}$ |$\\tau_{\\text{e}}^*/\\tau_{\\text{d}}^*$ |Ratio of electrolyte transport and discharge timescales|\n",
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|\n",
"|$\\gamma_{\\text{e}}$ |$c_{\\text{e,typ}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentration in the negative electrode solid and typical electrolyte concentration|\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/models/SPM.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@
"| $L_{\\text{k}}$ | $L_{\\text{k}}^*/L^*$ | Ratio of region thickness to cell thickness|\n",
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/models/SPMe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"|$\\mathcal{C}_{\\text{k}}$ | $\\tau_{\\text{k}}^*/\\tau_{\\text{d}}^*$ | Ratio of solid diffusion and discharge timescales |\n",
"|$\\mathcal{C}_{\\text{e}}$ |$\\tau_{\\text{e}}^*/\\tau_{\\text{d}}^*$ |Ratio of electrolyte transport and discharge timescales|\n",
"|$\\mathcal{C}_{\\text{r,k}}$ |$\\tau_{\\text{r,k}}^*/\\tau_{\\text{d}}^*$ |Ratio of reaction and discharge timescales|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area density|\n",
"|$a_{\\text{k}}$ |$a_{\\text{k}}^* R_{\\text{k}}^*$ | Product of particle radius and surface area to volume ratio|\n",
"|$\\gamma_{\\text{k}}$ |$c_{\\text{k,max}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentrations in solid|\n",
"|$\\gamma_{\\text{e}}$ |$c_{\\text{e,typ}}^*/c_{\\text{n,max}}^*$ |Ratio of maximum lithium concentration in the negative electrode solid and typical electrolyte concentration|\n",
"\n",
Expand Down
24 changes: 17 additions & 7 deletions examples/notebooks/using-model-options_thermal-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We choose to use the parameters from [1]. We then update the heat transfer coefficient to be 0.1 [W/m^2/K] (see the [Parameter Values notebook](./parameter-values.ipynb) for more details)"
"We choose to use the parameters from [1]. We then update the heat transfer coefficients (see the [Parameter Values notebook](./parameter-values.ipynb) for more details)"
]
},
{
Expand All @@ -75,7 +75,17 @@
"outputs": [],
"source": [
"param = pybamm.ParameterValues(chemistry=pybamm.parameter_sets.Marquis2019)\n",
"param.update({\"Heat transfer coefficient [W.m-2.K-1]\": 0.1})"
"param.update(\n",
" {\n",
" \"Negative current collector\"\n",
" + \" surface heat transfer coefficient [W.m-2.K-1]\": 5,\n",
" \"Positive current collector\"\n",
" + \" surface heat transfer coefficient [W.m-2.K-1]\": 5,\n",
" \"Negative tab heat transfer coefficient [W.m-2.K-1]\": 0,\n",
" \"Positive tab heat transfer coefficient [W.m-2.K-1]\": 0,\n",
" \"Edge heat transfer coefficient [W.m-2.K-1]\": 0,\n",
" }\n",
")"
]
},
{
Expand Down Expand Up @@ -121,7 +131,7 @@
"source": [
"# solve model\n",
"solver = model.default_solver\n",
"t_eval = np.linspace(0, 1, 250)\n",
"t_eval = np.linspace(0, 3600, 250)\n",
"solution = solver.solve(model, t_eval)"
]
},
Expand All @@ -140,12 +150,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c3d04dd597c24caf83c370bd01fe6131",
"model_id": "115696cc7c7e4297bb6d85a9f8220a82",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"interactive(children=(FloatSlider(value=0.0, description='t', max=1.0, step=0.01), Output()), _dom_classes=('w"
"interactive(children=(FloatSlider(value=0.0, description='t', max=3599.9999999999995, step=35.99999999999999),"
]
},
"metadata": {},
Expand Down Expand Up @@ -202,9 +212,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.7.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Loading

0 comments on commit 8433b53

Please sign in to comment.