Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • Chemical potentials control

Last edited by Gabriel Wlazłowski Dec 29, 2023
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Chemical potentials control

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, 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 rule:

\begin{aligned}
\Delta\mu_{\sigma}^{(i)} &= \textrm{muchange}_{\sigma}\,\frac{N_{\sigma}^{(\textrm{req.})}-N_{\sigma}^{(i)}}{N_{\sigma}^{(\textrm{req.})}}\\
\textrm{if}\,|\Delta\mu_{\sigma}^{(i)}/\varepsilon_F|&>\textrm{mumaxchange}_{\sigma}:\,\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

   // ...
}
Clone repository
  • API version
  • Automatic interpolations
  • Auxiliary tools
  • Browsing the code
  • Broyden algorithm
  • C and CUDA
  • Campaign of calculations
  • Checking correctness of settings
  • Chemical potentials control
  • Code & Results quality
  • Common failures of static codes
  • Common failures of time dependent codes
  • Computation domain
  • Configuring GPU machine
  • Constraining densities and potentials
View All Pages