@@ -58,6 +58,17 @@ def get_coupled_variables(self, variables):
58
58
if self .domain == "Positive" :
59
59
variables .update (self ._get_standard_whole_cell_current_variables (variables ))
60
60
61
+ if (
62
+ self .domain == "Positive"
63
+ and self .options ["problem type" ] == "potentiostatic"
64
+ ):
65
+ variables .update (self ._get_current_collector_current_density (i_s ))
66
+
67
+ return variables
68
+
69
+ def _get_current_collector_current_density (self , i_s ):
70
+ i_boundary_cc = pybamm .BoundaryValue (i_s , "right" )
71
+ variables = {"Current collector current density" : i_boundary_cc }
61
72
return variables
62
73
63
74
def set_algebraic (self , variables ):
@@ -107,15 +118,15 @@ def _set_galvanostatic_boundary_conditions(self, variables):
107
118
def _set_potentiostatic_boundary_conditions (self , variables ):
108
119
109
120
phi_s = variables [self .domain + " electrode potential" ]
110
- v = variables ["Applied voltage " ]
121
+ v_cc = variables ["Local current collector potential difference " ]
111
122
112
123
if self .domain == "Negative" :
113
124
lbc = (pybamm .Scalar (0 ), "Dirichlet" )
114
125
rbc = (pybamm .Scalar (0 ), "Neumann" )
115
126
116
127
elif self .domain == "Positive" :
117
128
lbc = (pybamm .Scalar (0 ), "Neumann" )
118
- rbc = (v , "Dirichlet" )
129
+ rbc = (v_cc , "Dirichlet" )
119
130
120
131
self .boundary_conditions [phi_s ] = {"left" : lbc , "right" : rbc }
121
132
0 commit comments