-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Implement Integrated electrolyte conductivity #1188
Changes from 1 commit
92de548
e5d7c14
fb667b3
7899fdd
7b3df30
573db34
eec8354
5d7ca5d
334dd17
3eb9c68
4a3ebf7
5c5b7fa
00bfd7c
a8496db
34b94f3
e439182
3ebae0b
5548930
4c10748
7e3c823
3f76b27
577f5fc
a39ac10
9d30d37
e7897be
428e4aa
e30ddf9
f5bef85
7ebf86a
f0aa087
57c856b
320804b
bf92330
44bdd41
a0d17b5
90eb3ee
bef6b8c
80dc52d
3866e20
a5c51cd
7b55d57
06674fa
a923ca7
593ddd4
764fcec
96eb696
183a765
c0448ca
d790866
c135494
1cee889
a92fcf8
8dc661f
40b12c3
fb4f6d9
9e0d807
71d7a03
d8108e8
4e47666
6ec5ce6
4a6874f
b6626c0
93eefae
679ffbe
0a6dfd9
51f71c4
02ee792
2b77066
a91053d
7e6de9d
466e502
d11e266
a15c8d5
1521a3f
73a5bfa
85c77e7
3904114
1ae86bb
62c52ea
9999775
b55ede7
dd8e174
f4ba84e
cf39650
756e093
9d08f5e
0d19dbc
48ca85c
5eee5be
e615e4a
08d191c
6a89b7d
3f04c15
86051b9
a019e6b
8341306
4890bab
f35dd26
30ab27c
6aa1bb3
0308466
ddb5ac5
006dc25
480765f
9818f21
3afea4e
8672eff
e286ce0
c301814
f67357b
5d4bd51
49fa413
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- v25.1.1
- v25.1.0
- v24.11.2
- v24.11.1
- v24.11.0
- v24.9.0
- v24.5
- v24.5rc2
- v24.5rc1
- v24.5rc0
- v24.1
- v24.1rc2
- v24.1rc1
- v24.1rc0
- v23.9
- v23.9rc1
- v23.9rc0
- v23.5
- v23.5rc0
- v23.4.1
- v23.4
- v23.3
- v23.2
- v23.1
- v22.12
- v22.11.1
- v22.11
- v22.10
- v22.9
- v22.8
- v22.7
- v22.6
- v22.5
- v22.4
- v22.3
- v22.2
- v22.1
- v21.12
- v21.11
- v21.10
- v21.9
- v21.08
- v0.4.0
- v0.3.0
- v0.3.0-beta
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ def get_coupled_variables(self, variables): | |
|
||
tor_n = variables["Negative electrolyte tortuosity"] | ||
tor_s = variables["Separator tortuosity"] | ||
tor_p = variables["Positive electrolyte tortuosity"] | ||
tor_p = variables["Positive electrolyte tortuosity"] | ||
|
||
T_av = variables["X-averaged cell temperature"] | ||
T_av_n = pybamm.PrimaryBroadcast(T_av, "negative electrode") | ||
|
@@ -77,23 +77,37 @@ def get_coupled_variables(self, variables): | |
# i_e_edge = pybamm.Concatenation(i_e_n_edge, i_e_s_edge, i_e_p_edge) | ||
|
||
# electrolyte potential | ||
indef_integral_n = pybamm.IndefiniteIntegral( | ||
i_e_n_edge / (param.kappa_e(c_e_n, T_av_n) * tor_n), x_n | ||
) * param.C_e / param.gamma_e | ||
indef_integral_s = pybamm.IndefiniteIntegral( | ||
i_e_s_edge / (param.kappa_e(c_e_s, T_av_s) * tor_s), x_s | ||
) * param.C_e / param.gamma_e | ||
indef_integral_p = pybamm.IndefiniteIntegral( | ||
i_e_p_edge / (param.kappa_e(c_e_p, T_av_p) * tor_p), x_p | ||
) * param.C_e / param.gamma_e | ||
|
||
indef_integral_n = ( | ||
pybamm.IndefiniteIntegral( | ||
i_e_n_edge / (param.kappa_e(c_e_n, T_av_n) * tor_n), x_n | ||
) | ||
* param.C_e | ||
/ param.gamma_e | ||
) | ||
indef_integral_s = ( | ||
pybamm.IndefiniteIntegral( | ||
i_e_s_edge / (param.kappa_e(c_e_s, T_av_s) * tor_s), x_s | ||
) | ||
* param.C_e | ||
/ param.gamma_e | ||
) | ||
indef_integral_p = ( | ||
pybamm.IndefiniteIntegral( | ||
i_e_p_edge / (param.kappa_e(c_e_p, T_av_p) * tor_p), x_p | ||
) | ||
* param.C_e | ||
/ param.gamma_e | ||
) | ||
|
||
integral_n = indef_integral_n - pybamm.boundary_value(indef_integral_n, "left") | ||
integral_s = ( | ||
indef_integral_s - pybamm.boundary_value(indef_integral_s, "left") | ||
indef_integral_s | ||
- pybamm.boundary_value(indef_integral_s, "left") | ||
+ pybamm.boundary_value(integral_n, "right") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but maybe it automatically gets simplified down to the same tree anyway There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can I check if they reduce to the same tree? In any case, I think that if they are equivalent, using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just tried replacing the boundary value at the "right" by
|
||
) | ||
integral_p = ( | ||
indef_integral_p - pybamm.boundary_value(indef_integral_p, "left") | ||
indef_integral_p | ||
- pybamm.boundary_value(indef_integral_p, "left") | ||
+ pybamm.boundary_value(integral_s, "right") | ||
) | ||
|
||
|
@@ -153,9 +167,7 @@ def get_coupled_variables(self, variables): | |
) | ||
|
||
# average electrolyte ohmic losses | ||
delta_phi_e_av = - ( | ||
pybamm.x_average(integral_p) - pybamm.x_average(integral_n) | ||
) | ||
delta_phi_e_av = -(pybamm.x_average(integral_p) - pybamm.x_average(integral_n)) | ||
|
||
variables.update( | ||
self._get_standard_potential_variables(phi_e_n, phi_e_s, phi_e_p) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left boundary value of an indefinite integral should always be zero by definition (and implementation) but worth checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked, and maybe it evaluates to zero (actually it should), but is not zero by definition. The definition is