Ajusting of chemical potentials
Static codes adjust chemical potentials automatically in such a way to provide a solution with requested particle number. Following parameters control adjusting process:
muchange 0.5 # coefficient for changing chemical potential, default=0.5
mumaxchange 0.05 # maximal allowed changed of chemical potential per iteration,
# in units of Fermi energy
Chemical potentials are adjusted according to rule:
\begin{aligned}
\Delta\mu_{\sigma}^{(i)} &= \textrm{muchange}\,\frac{N_{\sigma}^{(\textrm{req.})}-N_{\sigma}^{(i)}}{N_{\sigma}^{(\textrm{req.})}}\\
\textrm{if}\,|\Delta\mu_{\sigma}^{(i)}/\varepsilon_F|&>\textrm{mumaxchange}:\,\textrm{decrease}\,\textrm{magnitude}\,\textrm{of}\,\Delta\mu_{\sigma}^{(i)}\\
\mu_{\sigma}^{(i+1)} &= \mu_{\sigma}^{(i+1)} + \Delta\mu_{\sigma}^{(i)}
\end{aligned}
Fixed chemical potential mode
In order to execute calculations for fixed chemical potential you need to set in input file:
muchange 0.0 # do not change chemical potential
npartconveps 1.0e+9 # ignore checking of particle number convergence criteria
In addition, you need to set the value of chemical potentials. For this use process_params
function in problem-definition.h
void process_params(double *params, double *kF, double *mu, size_t extra_data_size, void *extra_data)
{
// hard set of chemical potentials
mu[SPINA] = YOUR_VALUE; // <-- you can promote it as user-defined parameter
mu[SPINB] = YOUR_VALUE; // <-- you can promote it as user-defined parameter
// ...
}