吉布斯自由能、化学势与扩散势
从偏摩尔量的定义出发,推导独立成分与约束成分变量下化学势的两种公式,并阐明化学势与相场模拟中扩散势的关系。
Jing Zhong
The partial Gibbs energy and the Gibbs energy
The partial Gibbs energy, or the chemical potential, is the partial quantity of the Gibbs energy, which means that it is independent of the amount of substance. Generally speaking, the Gibbs energy can be described as a function of temperature, pressure and compositions of components, and thus the chemical potential can be derived from such a mathematical formula. Sometimes, one might feel confused that there exist several different formulas of chemical potential with respect to the Gibbs energy. In this post, two different formulas are to be discussed, respectively.
In the following derivation, the temperature and pressure are assumed as constant.
For Gibbs energy with independent composition
In this context, the Gibbs energy is a function of the solute components, denoted as to , while the -th component is regarded as the solvent.
,
or
,
where is the total amount of all the substances, is the mole Gibbs energy, is the amount of the -th component and is the mole fraction of the -th component.
The chemical potential of the -th component, is the partial quantity of the Gibbs energy and that is
In CALPHAD method and other physical models, the mole fraction or the composition is the most common state variable for the fraction of the components. And thus, we have a motivation to substitute the amount, i.e., into fraction, i.e., , where chain rule of derivatives should be adopted.
As
, we can obtain
Take the last part from the equation above and we have
Note One should keep in mind that we should not substitute as , as there is no way to calculate the derivative with respect to fraction number.
Furthermore,
Put this result back into the original equation,
Simplify the equation above,
For Gibbs energy with dependent composition
In this context, the Gibbs energy is a function of the solute components, denoted as to , while the -th component is regarded as the solvent.
or
with a constraint that
The chemical potential of the -th component, is the partial quantity of the Gibbs energy and that is
In the spirit of the CALPHAD method and other physical models, the mole fraction or the composition is the most common state variable for the fraction of the components. And thus, we have a motivation to substitute the amount, i.e., into fraction, i.e., , where chain rule of derivatives should be adopted.
As
with the previous constraint, and we can obtain
Note It is worthy of noticing that the superscript of the summation has been changed from to .
Take the last part from the equation above and we have
Note One should keep in mind that we should not substitute as , as there is no way to calculate the derivative with respect to fraction number.
Furthermore,
Put this result back into the original equation,
Simplify the equation above,
Difference between the two formulas of the chemical potential
- For Gibbs energy with independent composition
- For Gibbs energy with dependent composition
Relation between the chemical potential and the diffusion potential
Diffusion potential is one of the most important variables in phase-field modeling. Mathematically, it should be defined as the partial derivative of the mole Gibbs energy.
Note partial derivative of the mole Gibbs energy and the partial quantity of the Gibbs energy are two completely different things.
Considering that the mole Gibbs energy is described with those independent composition variables,
the diffusion potential of the -th component with respect to -th component is
Note I am writing this to tell that, diffusion potential, is state variable of the solute, which means that a solvent component always exists in this context.
The equation above is really convenient when you have a description of the mole Gibbs energy related to compositions of the solute components. However, CALPHAD technique has adopted the second strategy to demonstrate the relationship between the mole Gibbs energy and composition, which is
with a constraint that
Obviously, there is no straight-forward way to compute the derivative of such a formula of the Gibbs energy, as a constraint has been imposed on the function.
Fortunately, we have another definition of the mole Gibbs energy,
Apply the rule of total derivative to the equation above
According to Gibbs-Duhem equation, we have
and thus
Supposing that the -th is the solvent component, the composition of the solvent can be substituted with those of the solutes,
because
Consequently, all the composition variables in the equation above become independent, and we know
according to the properties of the total derivative.
计算理想固溶体的吉布斯自由能、化学势和扩散势
void func_compenstate_multicomponent(const double *x, double *f, int cnum)
{
double T = x[cnum-1]; // the last element is temperature
double vars[cnum];
double v = 0;
for (int i = 0; i < cnum-1; i++)
{
vars[i] = x[i] < 1.0e-6 ? 1.0e-6 : (x[i] > 1.0 - 1.0e-6 ? 1.0 - 1.0e-6 : x[i]);
v += vars[i];
}
vars[cnum-1] = 1.0 - v;
double gm = 0;
for (int ci=0; ci<cnum; ci++)
{
gm += vars[ci] * log(vars[ci]);
}
gm = 8.31451 * T * gm;
f[0] = gm;
double partial_gm[cnum];
for (int ci=0; ci<cnum; ci++)
{
partial_gm[ci] = 8.31451 * T * (log(vars[ci]) + 1);
}
double sum_partial_gm = 0;
for (int ci=0; ci<cnum; ci++)
{
sum_partial_gm += partial_gm[ci] * vars[ci];
}
double mus[cnum];
for (int ci=0; ci<cnum; ci++)
{
mus[ci] = gm + partial_gm[ci] - sum_partial_gm;
}
for (int ci=0; ci<cnum-1; ci++)
{
f[ci+1] = mus[ci] - mus[cnum-1];
}
}
void func_compenstate_quaternary(const double *x, double *f)
{
func_compenstate_multicomponent(x, f, 4);
}