How to calculate gibbs energy from emc2?

Hi all,

I am new in thermodynamics, and the question might be stupid. Any help will be appreciated.

I have difficulties in calculating Gibbs energy. For a binary A-B system, if I understand correctly, the output file of emc2 gives the concentration x=(xB-xA) and chemical potential m=(mA-mB). The problem is that how can I convert it to Gibbs energy? In manual it tells that the Gibbs energy is Semi-grand canonical potential plus product of chemical potential and concentration, but I think the chemical potential terms should be xAmA+xBmB. Obviously it is not equal to xm in general cases. This makes me very confused.

And my final target is to compared the chemical potential of one element in two phases with fixed concentration, showing that the element will migrate from one to another. Can I obtain chemical potential of each element form emc2?

Can anyone give some suggestions?

Thank you very much!

In a MC simulation where the total number of all atoms is fixed, the is no way to separately determine the chemical potential of each species (because create one atom of one type mean remove an atom of another).
This is why the "semi grand canonical potential" used is just phi=G-xdeltam where deltam=mB-mA .
To convert back to Gibb free energies G, we then just need to add x
deltam.

Now, if you do thermodynamic integration to get the full phi(deltam) curve and, from it, the G(x) curve, you can recover the chemical potentials of each species separately using the usual tangent construction on G(x). Note that emc2 can do the thermo integration automatically. You just need to make sure you start where there is either little disorder (if gs>0) or where is almost full disorder (if gs=-1), so that the code can compute the starting phi analytically.

See https://dx.doi.org/10.1088/0965-0393/10/5/304 for more details.