Just hit a revelation on the C0 term. I missed this the first time I read through the SBM paper, but the C0 term should be instantiated so that (μ1-μ2)+C0 = 0 for a closed system (which we have). Rereading the literature is very helpful.
So far, with this fix, I’ve managed to control the flux using an explicit conditional (rather than altering the mobility as Chal initially listed on his ‘to do’ list) and maintain steady concentration by controlling the C0 term. I also did some testing to see how the model behaves at initial angles < eq. angle (no deviation from what is expected). Model currently seems to hold. Going to test with different thermodynamic parameters to see if it is robust.
Tested at a different set of parameters, and there is something occurring at the domain boundaries, It seems as if there’s flux to the vapor phase anyways?
I checked the code again, and it turns out that the controlling if statement doesn’t quite account for the smooth boundary too well. I’m going to test whether accounting for the smoothed boundary would be beneficial for the model. (It’s approximately 5 grid points wide right now). Also, now with the revelation I made on the C0 term, there’s no longer anything controlling flux to the vapor phase. This needs to be fixed…
Also, the current model only considers diffusion due to concentration and the double well chemical potential. The paper that this model is based on mentions that diffusion is also dependent on the cation size, temperature, oxygen partial pressure, and applied electrochemical potential. I’m not sure how to implement these additional parameters. Pretty much, I’m realizing that there’s still a ton of work to be done on this model.