espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Coulomb Energy


From: Fabian Glatzel
Subject: Re: Problem with Coulomb Energy
Date: Thu, 14 Nov 2019 09:38:32 +0100

First, thanks for the quick response!
However, I guess it has a different reason:
Typically the Coulomb energy is calculated by determining the potential due to a charge distribution q(r), let's say phi(r). Then, the Coulomb energy of the charge distribution is given by 1/2 integral dr phi(r) * q(r). Here, the factor of 1/2 comes in due to double counting. If, however, a potential phi_ext(r) due to some external charge distribution is given the Coulomb energy should be integral dr phi_ext(r) q(r) without the factor of 1/2.
Now comes the part I'm only guessing:
Probably espresso determines one potential due to the internal charge distribution and the boundary condition set with "pot_diff" and hence has this prefactor of 1/2 for both terms.
Why is this such a problem for me? Well, I try to simulate a simple model of a super capacitor (ions between electrodes). Here, I'm interested in calculating the heat flow or the change in entropy. The only way to do this at the moment is calculating the electric work dW needed to charge the capacitor and then calculating the heat dQ from the change in internal energy dU via dQ = dU - dW. Using the energy observable (which includes the Coulomb term that yields the strange energies) I get utterly ridiculous results (dQ >> dW). Unfortunately, I cannot calculate the missing Coulomb term from the quantities offered by the energy variable ("coulomb", ("coulomb", 0)...). Maybe you have some thoughts?

Thanks for bearing with me and I'm looking forward to hearing from you.

Best wishes,

Fabian Glatzel

Am Mi., 13. Nov. 2019 um 20:59 Uhr schrieb Georg Rempfer <address@hidden>:
I am not sure whether that is relevant in this situation, but periodic boundary conditions can have the effect of reducing potential differences by a factor of two.

On Wed, Nov 13, 2019 at 4:16 PM Fabian Glatzel <address@hidden> wrote:
Dear developers,

using your package I encountered some problem I could not resolve by myself. I'd be deeply grateful if you could offer some advice.

The problem is the following:
Using P3M and ELC with an external potential (via the "pot_diff" argument), I get Coulomb energies that make no sense. The energy contribution of charges in the "external" potential defined by "pot_diff" seems to be off by a factor of 2.
Let's say the system has a length of 10 and pot_diff=1V is set. Further, only two particles are placed in the system at z=0 (charge q=+1e) and at z=9 (charge q=-1e) and the prefactor for the P3M is set such that the interactions among the particles are negligible. For this case, I would expect a Coulomb energy of approx. 0.8eV. However, espresso seems to have a different opinion, namely that it should be 0.4eV.

Please find a minimal example code attached to this email.

I'm looking forward to hearing from you,

Fabian Glatzel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]