You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been on our todo list since OpenPNM v1! (see our wish list for v2). Anyway, here's how I think it should be done for let's say a 3 component mixture:
Define your mixture (mixtures are natively supported in v3)
If I remember correctly, you should be able to calculate the diffusion coefficent for each component using the Mixture class and built-in models. Take a look at this tutorial.
Create 2 transport algorithms, one for each component (for now, you can use FickianDiffusion) except the last one, which you can solve using mass balance.
Set your boundary conditions, etc.
In a while loop, solve these 2 transport algorithms in serial; the transport properties should be automatically updated, but double check. If not, you need to manually update the properties.
Define a stopping criterion, e.g., change in $C_1$ and $C_2$ in consecutive iterations must be smaller than 1e-5, or something to this effect.
This should get you started. Of course, since I haven't done this myself yet, you'll likely run into problems. You can start prototyping what I just described in an IPython notebook, make a PR, and I'll guide you along the way. Once completed, we can add it to the contrib folder of OpenPNM, and later we (or hopefully you can do it) can refactor it as a standalone transport algorithm.
How to implement multicomponent transport in the current version.
The text was updated successfully, but these errors were encountered: