lammps-USER-CONP2 icon indicating copy to clipboard operation
lammps-USER-CONP2 copied to clipboard

New feature: Update the A matrix at some interval/frequency

Open gullbrekken opened this issue 3 years ago • 4 comments

Hello

If I understand correctly, the A matrix is computed at the start and then not updated afterwards. This means that the electrode particles cannot move during the simulation. Is it possible to change the code so the A matrix can optionally be updated at some interval/frequency? This could be interesting to enable simulation of a changing electrode/moveable electrode atoms.

Kind regards, Øystein Gullbrekken

gullbrekken avatar Sep 07 '22 09:09 gullbrekken

Hi! This is not a feature I am currently working on for USER-CONP2, but something like this is currently in the works for the ELECTRODE package which is included in LAMMPS.

For most systems I don't think it will be computationally feasible -- the A-matrix would change so quickly that it would be too slow to constantly regenerate. Remember its cost scales (at least) as N^2 so for any decent sized system we would have to go to a conjugate gradient method, similar to what packages like reaxff do.

srtee avatar Sep 08 '22 11:09 srtee

Thanks for quick reply!

Ok, that makes sense.

The idea was to try to simulate electrodeposition of cations onto an electrode. In this scenario, the electrode will change over time even though every electrode atom is fixed. Of course, such a deposition is an extremely crude approximation not really possible to simulate correctly using classical MD, but it could be interesting to try it anyway to see if the results make sense. In this scenario, it would be necessary to update the A matrix whenever an ion is deposited onto the electrode and becomes part of it, causing the electrode to change slightly.

gullbrekken avatar Sep 09 '22 13:09 gullbrekken

You could try triggering the run to stop whenever a particle has been detected as deposited, then unfix and "re-fix" the constant potential fix.

You may be interested in reading what Anne Brant has done -- https://scholar.google.com/citations?user=jn9IV4MAAAAJ&hl=en I'm not sure if she's still doing this work but you could reach out to her department. She also gave a talk at the LAMMPS Symposium last year: https://www.lammps.org/workshops/Aug21/talk/anne-brant/

srtee avatar Sep 09 '22 21:09 srtee

That could work! Thanks for advice and tips on reading!

gullbrekken avatar Sep 12 '22 13:09 gullbrekken