-
Notifications
You must be signed in to change notification settings - Fork 0
Chemical potentials control
Gabriel Wlazłowski edited this page Dec 29, 2023
·
5 revisions
Static codes adjust chemical potentials automatically in such a way as to provide a solution with the requested particle number. The following parameters control the adjusting process:
muchange 0.5 # coefficient for changing chemical potential, default=0.5, for both components
# muchange_a 0.5 # or you can control muchange for each component separately using tags with `a` ...
# muchange_b 0.5 # ... and `b` suffixes.
mumaxchange 0.05 # maximal amount that chemical potential can change between iterations, in units of Fermi energy
# mumaxchange_a 0.05 # or you can control mumaxchange for each component separately using tags with `a` ...
# mumaxchange_b 0.05 # ... and `b` suffixes. Chemical potentials are adjusted according to the rule:
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 criteriaIn 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
// ...
}