-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Composite model for particle mechanics #4516
Changes from 35 commits
0e70d3e
b8dd013
e8fc8f4
b2825de
b76a2ca
6b87041
cd4aa54
4758ab8
adcb652
1985fb1
9352297
709d634
96d960d
f0a5a79
3937c54
7e87880
47949e7
b1b225a
04d0d7a
029cdee
b9a02bb
1056b7c
fd177eb
35df164
69b366d
a218f06
c781d00
dce8d03
3996799
7576847
ee73d55
7b18328
07ac6fa
460d2ef
375570a
3a2dda5
d8d2b6c
0aefd43
3adba7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,3 +138,5 @@ results/ | |
|
||
# tests | ||
test_callback.log | ||
PublicPyBaMM_Composite/ | ||
PyBaMM/ | ||
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,9 @@ def __init__(self, param, options, x_average): | |
def get_coupled_variables(self, variables): | ||
eps_dict = {} | ||
for domain in self.options.whole_cell_domains: | ||
delta_eps_k = 0 | ||
if domain == "separator": | ||
delta_eps_k = 0 # separator porosity does not change | ||
pass # separator porosity does not change | ||
else: | ||
Domain = domain.split()[0].capitalize() | ||
L_sei_k = variables[f"{Domain} total SEI thickness [m]"] | ||
|
@@ -37,7 +38,9 @@ def get_coupled_variables(self, variables): | |
L_pl_k = variables[f"{Domain} lithium plating thickness [m]"] | ||
L_dead_k = variables[f"{Domain} dead lithium thickness [m]"] | ||
L_sei_cr_k = variables[f"{Domain} total SEI on cracks thickness [m]"] | ||
roughness_k = variables[f"{Domain} electrode roughness ratio"] | ||
roughness_k = variables[ | ||
f"{Domain} electrode {self.phase_name}roughness ratio" | ||
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. The issue with the 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. @DrSOKane could you please advise on how I can go about with introducing phases in the reaction-driven-porosity model? Most of the remaining errors are stemming from this file. Thank you. 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. Hi @mohammedasher, you need to move the roughness ratio inside the loop
Then, delete the reference to 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. Hi @DrSOKane....I will define a new 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. @mohammedasher the code you need is here. Uncomment lines 63-65 and deleted line 36, and it should work. |
||
] | ||
|
||
L_tot = ( | ||
(L_sei_k - L_sei_0) | ||
|
@@ -47,14 +50,15 @@ def get_coupled_variables(self, variables): | |
) | ||
|
||
a_k = variables[ | ||
f"{Domain} electrode surface area to volume ratio [m-1]" | ||
f"{Domain} electrode {self.phase_name}" | ||
"surface area to volume ratio [m-1]" | ||
] | ||
|
||
# This assumes a thin film so curvature effects are neglected. | ||
# They could be included (e.g. for a sphere it is | ||
# a_n * (L_tot + L_tot ** 2 / R_n + L_tot ** # 3 / (3 * R_n ** 2))) | ||
# but it is not clear if it is relevant or not. | ||
delta_eps_k = -a_k * L_tot | ||
delta_eps_k += -a_k * L_tot | ||
|
||
domain_param = self.param.domain_params[domain.split()[0]] | ||
eps_k = domain_param.epsilon_init + delta_eps_k | ||
|
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.
These two are repository specific, I would suggest to remove them