Dear espressomd developers,
I'm still heaving some issues with the Coulomb energy using ELC with the pot_diff parameter as well as using MMM2D with pot_diff.
The used system is a 2d plate capacitor (periodic boundary conditions along x&y) with charged hard spheres (Weeks-Chandler-Andersen) and with an external potential of 1V.
I simulated this system using three different setups:
1) ELC and the pot_diff argument
2) MMM2D and the pot_diff argument
3) ELC and a linear electric potential (corresponding to a constant surface charge density at the electrodes and hence neglecting the effect of image charges)
Concerning the Coulomb energy, I cannot make any sense from the numbers i get via MMM2D or ELC with pot_diff. However, they are more or less consistent with each other. From what I see I would guess that there is possibly a sign error. But maybe I should first explain where this impression comes from:
As stated above I also simulated the system using ELC without the pot_diff argument but using a linear electric potential instead. The density profiles obtained via this method fit the ones from ELC with ext_pot parameter quite good. However, the energy contributions using ELC and the linear electric potential are:
coulomb: ~ +10650
external_fields: ~ -23000
Using ELC with ext_pot i get:
coulomb: ~ +14400
I guess this explains part of my confusion. Further, if the change in the coulomb energy during charging is monitored another unexpected behavior can be seen using the pot_diff argument. A smaller Coulomb energy is obtained at pot_diff=0V than at pot_diff=1V. However, if the decrease in Coulomb energy due to the external charge (implicitly handled via pot_diff) was not bigger than the increase of the Coulomb energy due to the ion-ion contributions in the system, the system should not change its density profile at all.
I wrote a little example script to show these effects. To keep it as simple as possible it contains some hard coded numbers etc... Via the index in line 8 the used method can be chosen (ELC, MMM2D or ELC + External Field). In line 10 it can be set if the density profile is written to a file. The other stuff should be self-explanatory.
The example script can be downloaded via:
I look forward to hearing from you.
Also, let me thank you in advance since i know it can consume quite a bit of time...