Skip to content
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

How to implement multicomponent transport #2691

Open
JiayanJI opened this issue Feb 12, 2023 · 2 comments
Open

How to implement multicomponent transport #2691

JiayanJI opened this issue Feb 12, 2023 · 2 comments

Comments

@JiayanJI
Copy link

How to implement multicomponent transport in the current version.

@ma-sadeghi ma-sadeghi changed the title How to implement multicomponent transport in the current version How to implement multicomponent transport Feb 12, 2023
@ma-sadeghi
Copy link
Member

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:

  1. Define your mixture (mixtures are natively supported in v3)
  2. 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.
  3. 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.
  4. Set your boundary conditions, etc.
  5. 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.
  6. 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.

@JiayanJI
Copy link
Author

OK, Thanks for your help, I will have a try for this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants