Chemical potential question (free energy method)

Dear all,

I am trying to implement the basic multiphase D2Q9 free energy method (Swift, Orlandini, Yeomans). I am finding this one a lot tougher to implement than Shan-Chen and the color model, in particular I have run into a snag with the chemical potential, usually written \Delta \mu.

According to several papers, including the original Orlandini, Swift and Yeomans, this involves a term of the type


where “rho” is the total density, and “phi” is the difference in density between fluids 1 and 2.

Now, I tried implementing starting with two pure phases, and found that there is a problem for pure phases, that is rho=phi or rho=-phi. In these cases the logarithm turns to plus or minus infinity, and the program well inevitably crash and burn producing "not a number"s galore over my matrices.

Does anyone know what Swift, Orlandini, and Yeomans had in mind when dealing with the pure phases?

I am not sure what you are trying to do, but if you go back to the original paper as you suggest, the equation is fine. Mathematically this paper will give you a chemical potential of 0 for a pure phase.

If you are using a pure form it is better to write the equation in terms of the density of the fluid. rho1 (density of fluid 1) and rho2 (density of fluid 2). The log term becomes log(rho1/rho2), and hence when rho1=rho2, log(1)=0. I would suggest that you do not have a fluid of density 0 in your simulation, read a good book on thermal physics/statistical physics to see why.

Two books that may be helpful:

Statistical Physics, F. Mandl, ISBN:0-471-91533-5
Thermal Physics, R. Baierlein, ISBN:0-521-65838-1

I hope this helps.

Thanks for the help. I may have been confused over what rho and phi stood for.