|
|
In the W-SLDA toolkit it is possible to simulate "*strict 2d*" cases without any restriction for the z-direction. This can be done by simply choosing the size of the simulation box as Nx*Ny*1. In oder to do that one needs to modifiy the **predefines.h**:
|
|
|
```c
|
|
|
/**
|
|
|
* Define lattice size and lattice spacing
|
|
|
* */
|
|
|
#define NX 100
|
|
|
#define NY 100
|
|
|
#define NZ 1
|
|
|
```
|
|
|
### Setting the Correct Fermi Momentum
|
|
|
|
|
|
In the toolkit the default Fermi momentum is defined for the 3d case. If you are using strict 2d or 1d cases it is highly suggested to set the value of the Fermi momentum in the input file as **referencekF**.
|
|
|
The Fermi momentum for the 2d case:
|
|
|
* ![k_F = \sqrt{2\pi n}](https://latex.codecogs.com/gif.latex?k_F%20%3D%20%5Csqrt%7B2%5Cpi%20n%7D)
|
|
|
|
|
|
The Fermi momentum for the 1d case:
|
|
|
* ![k_F = \frac{\pi n}{2}](https://latex.codecogs.com/png.latex?k_F%20%3D%20%5Cfrac%7B%5Cpi%20n%7D%7B2%7D)
|
|
|
|
|
|
where n is the total density of the box.
|
|
|
|
|
|
# Choosing the Functional
|
|
|
|
|
|
The SLDA (and consequently ASLDA) functional has a self-energy term which is designed for 3d case. For the strcit 2d case we suggest **to use the BDG functional**. This can be done by choosing the BDG flag in the predefines.h file and requires the scattering length (*aBdG*) to be defined in the input file.
|
|
|
|
|
|
An alternative way to calculate the pairing interaction is to set a fixed coupling constant. This can be done by modifiying the pairing potential:
|
|
|
|
|
|
```c
|
|
|
void modify_potentials(int it, wslda_density h_densities, wslda_potential h_potentials, double *params, size_t extra_data_size, void *extra_data)
|
|
|
{
|
|
|
// DETERMINE LOCAL SIZES OF ARRAYS (CODE DIMENSIONALITY DEPENDENT)
|
|
|
int lNX=h_densities.nx, lNY=h_densities.ny, lNZ=h_densities.nz; // local sizes
|
|
|
int ix, iy, iz, ixyz;
|
|
|
|
|
|
// params0 -> effective coupling strength
|
|
|
|
|
|
ixyz=0;
|
|
|
for(ix=0; ix<lNX; ix++) for(iy=0; iy<lNY; iy++) for(iz=0; iz<lNZ; iz++)
|
|
|
{
|
|
|
h_potentials.delta[ixyz] = -1.0*params[0]*h_densities.nu[ixyz];
|
|
|
...
|
|
|
ixyz++;
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
Here params[0] is the effective coupling constant which has to be set in the input file:
|
|
|
|
|
|
```c
|
|
|
# ------------------- PARAMS -----------------------
|
|
|
params0 -2.30 # g_eff
|
|
|
|
|
|
```
|
|
|
|
|
|
By changing the value of this parameter one can set the magnitude of the pairing field to a desired value. |
|
|
\ No newline at end of file |