Defining diffusivity as a function of lithiation / SOC #3926
-
I have been trying to figure out how to define diffusivity as a function of lithiation/SOC. As a rudimentary example, consider I am using a predefined parameter set:
where I have a previously defined function as follows:
In this case, even if diff_param = 1 and the ratio is higher than 0.1 (so the return statement with the maximum should return the first argument instead of 5e-15), the value for the diffusivity that gets returned is 5e-15. I think this has to do with the fact that the "ratio" term isn't getting treated like a number. When I print ratio, this is the output:
How can I get this working so that the ratio time some number gets returned? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I am adding more details here because I did not want to obscure the original post with too much extraneous information: Notably, when I have a function where it's just returning ratio*3e-13, then it does return numbers near 3e-13. However, my ratio at this time should have been around 0.5, as I had defined So the returned diffusivity should have been 1.5e-13, not around 3e-13 (the initial part of my experiment is just a rest for 30 seconds). This is how I am checking my returned diffusivity values -
` |
Beta Was this translation helpful? Give feedback.
-
The input for the diffusivity function is the stoichiometry (already divided by |
Beta Was this translation helpful? Give feedback.
The input for the diffusivity function is the stoichiometry (already divided by
max_val
), not the concentration.