OPM / LBPM

Pore scale modelling
https://lbpm-sim.org/
GNU General Public License v3.0
65 stars 31 forks source link

Inquiry Regarding Implementing a New LB Model: Nernst-Planck and Poisson Equations #84

Open pirouzs opened 9 months ago

pirouzs commented 9 months ago

Hi I've been working with your open-access code repository and have found the provided tutorials and documentation very helpful for installing and running simple simulations. I am currently exploring the possibility of implementing a new LB model that involves solving both the Nernst-Planck and Poisson equations simultaneously. Before diving into the code, I wanted to inquire if there is any existing tutorial or documentation that guides users through this specific implementation. Thank you for your time and the fantastic work. I really appreciate it.

Best regards, Pirouz

JamesEMcClure commented 9 months ago

There is an existing solver that does this in the context of cell biology. See below for the paper

https://journals.aps.org/pre/abstract/10.1103/PhysRevE.107.024408

I am still working on getting documentation for this onto the website. However, there is an example (Figure 4 from the paper) that is included in the repository

https://github.com/OPM/LBPM/tree/master/example/SingleCell

To launch you should use

mpirun -np 2 $LBPM_BIN/lbpm_nernst_planck_cell_simulator.cpp Bacterium.db

This should run in a few hours on a CPU-based system. Solving Gauss's law is computationally intensive, but provides significant advantages relative to Poisson-Boltzmann

pirouzs commented 9 months ago

Thank you for your quick response. I will look into them. Hopefully, I can wrap my head around the implementation and run the code without errors.

Best regards, Pirouz

pirouzs commented 8 months ago

Hi James I am encountering an issue with the "lbpm_nernst_planck_cell_simulator" model. When attempting to run it, I encounter a parameter error related to "Permittivity" during the initialization of the LB_Poisson model. The warning message is as follows:

"""Warning: getGlobalCallStacks called without call to globalCallStackInitialize Program abort called in file '/home/pirouz/Documents/LBM/SOURCE/common/Database.cpp' at line 82: Variable PermittivityValues was not found in database"""

Does this ring any bell? Thanks in advance for your time. Pirouz

JamesEMcClure commented 8 months ago

You need to add the following key to the "Poisson " database

PermittivityValues = 78.5