File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
examples/notebooks/models
pybamm/models/submodels/interface/open_circuit_potential Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 88
99## Bug fixes
1010
11+ - Fixed current_sigmoid_ocp to be valid for both electrodes ([ #2719 ] ( https://github.com/pybamm-team/PyBaMM/pull/2719 ) ).
1112- Fixed the length scaling for the first dimension of r-R plots ([ #2663 ] ( https://github.com/pybamm-team/PyBaMM/pull/2663 ) ).
1213
1314# [ v23.1] ( https://github.com/pybamm-team/PyBaMM/tree/v23.1 ) - 2023-01-31
Original file line number Diff line number Diff line change 9191 ]
9292 },
9393 {
94- "attachments": {},
9594 "cell_type": "markdown",
9695 "id": "10339d40",
9796 "metadata": {},
594593 ]
595594 },
596595 {
597- "attachments": {},
598596 "cell_type": "markdown",
599597 "id": "dbc0edb2",
600598 "metadata": {},
639637 ]
640638 },
641639 {
642- "attachments": {},
643640 "cell_type": "markdown",
644641 "id": "40467b70",
645642 "metadata": {},
849846 ]
850847 },
851848 {
852- "attachments": {},
853849 "cell_type": "markdown",
854850 "id": "977b4c09",
855851 "metadata": {},
935931 ],
936932 "metadata": {
937933 "kernelspec": {
938- "display_name": "dev ",
934+ "display_name": "Python 3 (ipykernel) ",
939935 "language": "python",
940936 "name": "python3"
941937 },
949945 "name": "python",
950946 "nbconvert_exporter": "python",
951947 "pygments_lexer": "ipython3",
952- "version": "3.9.6 "
948+ "version": "3.8.10 "
953949 },
954950 "toc": {
955951 "base_numbering": 1,
Original file line number Diff line number Diff line change 77
88class CurrentSigmoidOpenCircuitPotential (BaseOpenCircuitPotential ):
99 def get_coupled_variables (self , variables ):
10+ domain , Domain = self .domain_Domain
1011 current = variables ["Total current density" ]
1112 k = 100
12- m_lith = pybamm .sigmoid (current , 0 , k ) # for lithation (current < 0)
13- m_delith = 1 - m_lith # for delithiation (current > 0)
1413
15- domain , Domain = self .domain_Domain
14+ if Domain == "Positive" :
15+ lithiation_current = current
16+ elif Domain == "Negative" :
17+ lithiation_current = - current
18+
19+ m_lith = pybamm .sigmoid (0 , lithiation_current , k ) # lithiation_current > 0
20+ m_delith = 1 - m_lith # lithiation_current < 0
21+
1622 phase_name = self .phase_name
1723
1824 if self .reaction == "lithium-ion main" :
You can’t perform that action at this time.
0 commit comments