-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/temperature effects #71
base: development
Are you sure you want to change the base?
Conversation
…etween boundary conditions
@d-cogswell can we take a look at these changes some time too? I'm going to start implementing the heat generation part after this is merged in. |
13fab0d
to
63cea5a
Compare
63cea5a
to
bfb693f
Compare
5b51f8d
to
553979e
Compare
…t-dev into feature/temperature_effects
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 added some code comments.
@@ -87,6 +87,66 @@ def get_asc_vec(var, Nvol, dt=False): | |||
return out | |||
|
|||
|
|||
def central_diff_bulk(array, Nvol, dx): |
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.
Why use a central difference? What happens at the electrode/separator interface if the computational cell size changes?
|
||
k_h = utils.weighted_linear_mean(disc["khvec"], wt) |
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.
Transport properties are usually the weighted harmonic mean of the neighboring cells?
mpet/geometry.py
Outdated
out["dxd1"] = utils.mean_linear(dxtmp) | ||
out["dxd2"] = utils.mean_linear(out["dxd1"]) # for thermal finite differences |
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.
'dxd1' is the distance between neighboring cell centers, but what is 'dxd2'?
for sectn in ["a", "c", "s"]: | ||
# If we have information within this battery section | ||
if sectn in ["a", "c"]: | ||
if sectn in array.keys(): |
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.
Is it possible to write this with fewer ifs and loops?
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 attempted to do this previously but I think it's pretty difficult because we need to consider cases where there is no separator, where the separator information should be set to 0 for every point on the separator, or where the electrode for the anode doesn't exist, which actually means that we should have no data at the anode.
bba9729
to
f76687a
Compare
@d-cogswell @loostrum , just wondering, does the Fuller test pass on your computers? on my local environment it passes. |
It's passing for me as well. The ValueError is not very insightful, it just means the error is in one of these lines:
Which is just selecting the right data so it's strange that it's failing there. I'll add a line to print more info when things fail. |
…h reference output
Apparently there is a shape mismatch, |
@loostrum I've had this problem happen before, but sometimes the solutions just print an extra time point. It was quite odd and I never pinpointed down the reason it happened. Do you think it is related to the tolerances? |
I'm hunting for the commit that first broke that test. Maybe that will give us some clues. |
This would work... I think the only change is from removing the ghost points and reducing the number of equations. From what I recall, the solution plots were exactly the same, with an extra time point. Maybe the ghost point method just adds another point or the tolerance is just really close? Let me try and revert this commit to see if it passes (though to test if it passes on Github I'm going to have to push it) |
c3e2c30
to
7f4f8ba
Compare
7f4f8ba
to
3880d4d
Compare
@loostrum I think I broke something in the DAEtools tests in python 3.9... 🙃 So I reran it and then it was fine... I have no idea what is going on. Race condition? |
@d-cogswell all tests passing now! yay! |
0bf3fc3
to
3880d4d
Compare
Hi @Ombrini , we're using this branch for implementing non-constant temperature. Please keep your own work in a separate branch or fork. Thanks! |
-added in non constant temperature diffusion/thermal diffusion effects in electrolyte only
-added in heat generation from reactions, ohmic heat, and entropy