Skip to content

Commit

Permalink
Merge pull request #141 from mrm24/nano
Browse files Browse the repository at this point in the history
Solver for the BTE in highly symmetric nanostructures
  • Loading branch information
nakib authored May 25, 2024
2 parents af4043d + 526fdaf commit e898838
Show file tree
Hide file tree
Showing 6 changed files with 1,668 additions and 37 deletions.
32 changes: 22 additions & 10 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ For the ~elphbolt~ app, there are 5 Namelists in the ~input.nml~ file: ~allocati
| ~subs_masses~ | Real array of size ~numelements~ | 0.0 | Masses of substitution atoms in amu. This is needed if ~phsubs~ is .True. See table of keys for Namelist ~numerics~. |
| ~subs_conc~ | Real array of size ~numelements~ | 0.0 | Concentration of the substitutional atoms in cm^{-3} (or cm^{-2} if ~twod~ is .True.). This is needed if ~phsubs~ is .True. See table of keys for Namelist ~numerics~. |
| ~bound_length~ | Real | 1e12 mm | Characteristic sample length for boundary scattering. This is needed if ~phbound~ or ~elbound~ is .True. See table of keys for Namelist ~numerics~. |
| ~nano~ | Logical | .False. | Do you want to compute effective thermoelectric properties for highly symmetric nanostructure? See description of ~nano~ block.
|

*** ~electrons~
| key | Type | Default | Description |
|--------------------+------------------------------+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down Expand Up @@ -247,7 +246,9 @@ For the ~elphbolt~ app, there are 5 Namelists in the ~input.nml~ file: ~allocati
| ~el_en_num~ | Integer | 100 | Number of equidistant electron energy mesh points. Only needed for ~runlevel~ 2. |
| ~ph_mfp_npts~ | Integer | 100 | Number of equidistant mean-free-path points for cumulative transport coefficients. |
| ~ph_abs_q_npts~ | Integer | 100 | Number of equidistant absolute wave vector points for cumulative transport coefficients. |
| ~use_Wannier_ifc2s~ | Logical | .False. | Use 2nd order force constants from the Wannierized data? |
| ~use_Wannier_ifc2s~ | Logical | .False. | Use 2nd order force constants from the Wannierized data?
| ~solve_bulk~ | Logical | .True. | Do you want to solve the BTE for the bulk-system, i.e. not using nanostructures algorithm.
| ~solve_nano~ | Logical | .False. | Do you want to compute effective thermoelectric properties for highly symmetric nanostructure? See description of ~nano~ block. |


*** ~wannier~
Expand Down Expand Up @@ -336,15 +337,26 @@ Below I(F)BZ = irreducible (full) Brillouin zone; RTA = relaxation time approxim
| ~iso_quasiparticle_Delta.T*~ | ~./~ | eV | Isotropic superconducting gap on the equidistant electronic quasiparticle energy mesh. |
| ~aniso_quasiparticle_Delta_FS.T~ | ~./~ | eV | Anisotropic superconducting gap on the Fermi surface for each IBZ electronic state within the Fermi window. The first column gives the number of FBZ images of the IBZ point. |

Note: When computing the effective properties for the nanostructures, the tensors are reshaped so that each columnn refers to the respective nanostructure from input.


*** Nanostructure data
| File name | Directory | Units | Description |
|----------------------------------+-------------------+----------------------+------------------------------------------------------------------------------------------------------------------------------------------------|
| ~nano_info~ | ~./~ | -/nm/-/-/-/-/-/- | Nanostructure information tag(i)/limit(i)/taxis(i,:)/naxis(i,:) |
| ~Sph~ | ~./~ | eV/Kms^{-1}/Kms^{-1}/Kms^{-1}/- | Nanostructure suppression factor for phonons in FBZ energy(i,ib)/vg(i,ib,:)/Sph(i,ib,:) |
| ~Sel~ | ~./~ | eV/Kms^{-1}/Kms^{-1}/Kms^{-1}/- | Nanostructure suppression factor for electrons in FBZ energy(i,ib)/vg(i,ib,:)/Sel(i,ib,:) |

| File name | Directory | Units | Description |
|-----------------------------------------+-------------------+---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ~nano_info~ | ~./~ | -/nm/-/-/-/-/-/- | Nanostructure information tag(i)/limit(i)/taxis(i,:)/naxis(i,:) |
| ~Sph~ | ~./~ | eV/Kms^{-1}/Kms^{-1}/Kms^{-1}/- | Nanostructure suppression factor for phonons in FBZ energy(i,ib)/vg(i,ib,:)/Sph(i,ib,:) |
| ~Sel~ | ~./~ | eV/Kms^{-1}/Kms^{-1}/Kms^{-1}/- | Nanostructure suppression factor for electrons in FBZ energy(i,ib)/vg(i,ib,:)/Sel(i,ib,:) |
| ~nano_drag[nodrag]_el_sigma_*~ | ~./T*/~ | \Omega^{-1}m^{-1} | Band resolved (~_<integer>~) and total (~_tot~) charge conductivity tensor at every iteration step. |
| ~nano_drag[nodrag]_el_alphabyT_*~ | ~./T*/~ | Am^{-1}K^{-1} | Band resolved (~_<integer>~) and total (~_tot~) electronic Peltier(-ish) coefficient tensor at every iteration step. |
| ~nano_drag[nodrag]_el_kappa0_*~ | ~./T*/~ | Wm^{-1}K^{-1} | Band resolved (~_<integer>~) and total (~_tot~) electronic thermal conductivity (zero E-field) tensor at every iteration step. |
| ~nano_drag[nodrag]_el_sigmaS_*~ | ~./T*/~ | Am^{-1}K^{-1} | Band resolved (~_<integer>~) and total (~_tot~) electronic thermopower times conductivity tensor at every iteration step. |
| ~nano_drag_ph_alphabyT_*~ | ~./T*/~ | Am^{-1}K^{-1} | Branch resolved (~_<integer>~) and total (~_tot~) phonon Peltier(-ish) coefficient tensor at every iteration step. |
| ~nano_drag[nodrag]_ph_kappa_*~ | ~./T*/~ | Wm^{-1}K^{-1} | Branch resolved (~_<integer>~) and total (~_tot~) phonon thermal conductivity tensor at every iteration step. |
| ~nano_RTA{nodrag}(partdcpl)[drag]_I0_*~ | ~./T*/~ | nmeVK^{-1} | Band resolved (~_<integer>~) and total (~_tot~) electronic response function to \nabla T-field in the RTA {dragless} (partially decoupled) [drag] theory. |
| ~nano_RTA{nodrag}(partdcpl)[drag]_J0_*~ | ~./T*/~ | nmC | Band resolved (~_<integer>~) and total (~_tot~) electronic response function to E-field in the RTA {dragless} (partially decoupled) [drag] theory. |
| ~nano_RTA{nodrag}[drag]_F0_*~ | ~./T*/~ | nmeVK^{-1} | Branch resolved (~_<integer>~) and total (~_tot~) phononic response function to \nabla T-field in the RTA {dragless} [fully coupled] theory. |
| ~nano_drag_G0_*~ | ~./T*/~ | nmC | Branch resolved (~_<integer>~) and total (~_tot~) phononic response function to E-field in fully coupled theory. |

Note: For the temperature dependent quantites each columnn refers to the respective nanostructure from input.

*** Postprocessing (runlevel 2)

Expand Down
44 changes: 39 additions & 5 deletions app/elphbolt.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ program elphbolt
calculate_W_fromcgV2
use phonon_defect_module, only: phonon_defect
use Green_function, only: calculate_retarded_phonon_D0
use nano_module, only: nanostructure
use bte_nano_module, only: bte_nano

implicit none

Expand All @@ -48,8 +50,10 @@ program elphbolt
type(electron) :: el
type(phonon) :: ph
type(bte) :: bt
type(bte_nano) :: bt_nano
type(phonon_defect) :: ph_def
type(timer) :: t_all, t_event
type(nanostructure) :: nano

!Print banner and other information
call welcome
Expand Down Expand Up @@ -99,7 +103,14 @@ program elphbolt

!Create phonon defect
if(num%phdef_Tmat) call ph_def%initialize(ph, crys)


! Initialize nanostructures
if (num%solve_nano) then
call nano%initialize()
! Print geometrical information into a file
call nano%print_nanogeominfo()
end if

select case(num%runlevel)
case(1) !BTE workflow
call t_event%start_timer('Density of states and one-particle scattering rates')
Expand All @@ -123,6 +134,10 @@ program elphbolt
!they belong -- interactions.f90 -- soon.
call calculate_dos(ph, crys, num%tetrahedra, bt%ph_rta_rates_iso_ibz, bt%ph_rta_rates_subs_ibz, &
num%phiso, num%phiso_1B_theory, num%phsubs, num%phiso_Tmat)
if(num%solve_nano) then
allocate(bt_nano%ph_rta_rates_iso_ibz, source=bt%ph_rta_rates_iso_ibz)
allocate(bt_nano%ph_rta_rates_subs_ibz, source=bt%ph_rta_rates_subs_ibz)
end if

call t_event%end_timer('Density of states and one-particle scattering rates')

Expand Down Expand Up @@ -269,11 +284,30 @@ program elphbolt
end if

!Solve BTEs
if(num%onlyphbte .and. .not. num%phe) then
call bt%solve_bte(num, crys, sym, ph)
else
call bt%solve_bte(num, crys, sym, ph, el)
if(num%solve_bulk) then
if(num%onlyphbte .and. .not. num%phe) then
call bt%solve_bte(num, crys, sym, ph)
else
call bt%solve_bte(num, crys, sym, ph, el)
end if
end if

! Solve BTE for nanostructures
if(num%solve_nano) then

! Initialize the group velocities in the unbounded (selected) direction for each nanostructure
if (.not. num%onlyebte) call nano%compute_transport_vg('ph', ph=ph)
if (.not. num%onlyphbte) call nano%compute_transport_vg('el', el=el)

! Solve the BTE for the nanostructures
if(num%onlyphbte .and. .not. num%phe) then
call bt_nano%solve_bte(num, crys, sym, nano, ph)
else
call bt_nano%solve_bte(num, crys, sym, nano, ph, el)
end if

end if

case(2) !BTE Post-processing case
call subtitle("Post-processing...")

Expand Down
15 changes: 13 additions & 2 deletions src/bte.f90
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ subroutine bte_driver(self, num, crys, sym, ph, el)
!Local variables
character(1024) :: tag, Tdir

call subtitle("Calculating transport...")
call subtitle("Calculating transport (bulk)...")

call print_message("Only the trace-averaged transport coefficients are printed below:")

Expand Down Expand Up @@ -688,7 +688,18 @@ subroutine dragfull_ephbtes(Tdir, self, num, crys, sym, ph, el)
KO_dev = 100.0_r64*abs(&
(el_sigmaS_scalar - tot_alphabyT_scalar)/tot_alphabyT_scalar)

!Append RTA coefficients in drag files
! We need to compute the RTA values again (that is relatively cheap)
call calculate_transport_coeff('ph', 'T', crys%T, 1_i64, 0.0_r64, ph%ens, ph%vels, &
crys%volume, ph%wvmesh, self%ph_response_T, sym, trans%ph_kappa, trans%dummy)
call calculate_transport_coeff('ph', 'E', crys%T, 1_i64, 0.0_r64, ph%ens, ph%vels, &
crys%volume, ph%wvmesh, self%ph_response_E, sym, trans%ph_alphabyT, trans%dummy)
call calculate_transport_coeff('el', 'T', crys%T, el%spindeg, el%chempot, el%ens, &
el%vels, crys%volume, el%wvmesh, self%el_response_T, sym, trans%el_kappa0, trans%el_sigmaS)
call calculate_transport_coeff('el', 'E', crys%T, el%spindeg, el%chempot, el%ens, el%vels, &
crys%volume, el%wvmesh, self%el_response_E, sym, trans%el_alphabyT, trans%el_sigma)
trans%el_alphabyT = trans%el_alphabyT/crys%T
trans%ph_alphabyT = trans%ph_alphabyT/crys%T

! Change to data output directory
call chdir(trim(adjustl(Tdir)))
call append2file_transport_tensor('drag_ph_kappa_', 0, trans%ph_kappa)
Expand Down
Loading

0 comments on commit e898838

Please sign in to comment.