Skip to content

Commit

Permalink
Merge pull request #135 from mrm24/nano
Browse files Browse the repository at this point in the history
Nanostructure stuff from Marti Raya-Moreno
  • Loading branch information
nakib authored Mar 21, 2024
2 parents bc7c507 + f59441f commit ef7fb48
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 22 deletions.
24 changes: 23 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Using /ab initio/ electron-phonon and 3- and 4-phonon interactions and a fully w
- phonon and electronic thermal conductivities;
- electronic conductivity;
- phonon and electronic contributions to the thermopower; and
- effect of the mutual electron-phonon drag on the transport coefficients listed above.
- effect of the mutual electron-phonon drag on the transport coefficients listed above;
- effective thermoelectric transport coefficients for nanostructures (nanowires, nanoribbons, and thin-films).

Using /ab initio/ electron-phonon and a fully wave vector and electron band/phonon branch resolved, Eliashberg formulation of superconductivity, the ~superconda~ app gives you the

Expand Down Expand Up @@ -195,6 +196,8 @@ 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 @@ -274,6 +277,15 @@ For the ~elphbolt~ app, there are 5 Namelists in the ~input.nml~ file: ~allocati
| ~dT~ | Real | 0.0 K | Temperature difference used in temperature sweep. |
| ~print_aniso_gap_FS~ | Logical | .False. | Print out the anisotropic gap function at the Fermi surface? |

*** ~nano~
| key | Type | Default | Description |
|--------------------+-----------------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------|
| ~nsys~ | Integer | -1 | Number of nanostructures to tackle |
| ~tag~ | Character(nsys) | 'xx' | Tags to choose the kind of nanostructures we are dealing with in each case ('nw': nanowire; 'nr': nanoribbon; 'tf': thin-film) |
| ~limit~ | Real(nsys) | -1 | Limit length of the nanostructures in nm (radius for nw, width for nr, and thickness for tf) |
| ~taxis~ | Real(nsys,3) | 0 0 0 | Direction in which transport will be computed (for tf and nr it must be perpendicular to the normal vector) |
| ~naxis~ | Real(nsys,3) | 0 0 0 | Vector defining the normal of the system for tf and nr (only fill for those cases) |

** Description of output files

The code produces a large amount of data. Here, we provide a description of the various types output files.
Expand Down Expand Up @@ -330,6 +342,16 @@ 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,:) |


*** Postprocessing (runlevel 2)

| File name | Directory | Units | Description |
Expand Down
1 change: 1 addition & 0 deletions src/bte.f90
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module bte_module
interpolate_using_precomputed, Jacobian, cross_product
use numerics_module, only: numerics
use crystal_module, only: crystal
use nano_module, only: nanostructure
use symmetry_module, only: symmetry
use phonon_module, only: phonon
use electron_module, only: electron
Expand Down
69 changes: 48 additions & 21 deletions src/nano.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module nano_module
!! particles at reference equilibrium of the absorbing wall).
!! See the subroutine compute_suppression for more information
!!
!!
use params, only: r64, i64, pi
use misc, only: print_message, exit_with_message
use symmetry_module, only: symmetry
Expand Down Expand Up @@ -55,20 +54,46 @@ module nano_module
!! the suppression factors for phonons and electrons
logical, allocatable :: conv_ph(:), conv_el(:)
!! convergence for each distribution for all system
real(r64), allocatable :: vg_ph(:,:,:)
!! phonon group velocities (iq,ib, isystem)
real(r64), allocatable :: vg_el(:,:,:)
!! phonon group velocities (ik,ib, isystem)

contains

procedure, public :: initialize=>read_nanostructure, compute_suppression, &
compute_transport_vg, print_nanogeominfo
compute_transport_vg, print_nanogeominfo, clean

end type nanostructure

contains

subroutine clean(self)
!! Subroutine to clean up the object
!!
!! self nansotructure object

class(nanostructure), intent(inout) :: self

if (allocated(self%tag)) deallocate(self%tag)
if (allocated(self%limit)) deallocate(self%limit)
if (allocated(self%taxis)) deallocate(self%taxis)
if (allocated(self%tnorm)) deallocate(self%tnorm)
if (allocated(self%naxis)) deallocate(self%naxis)
if (allocated(self%nnorm)) deallocate(self%nnorm)
if (allocated(self%Sph)) deallocate(self%Sph)
if (allocated(self%Sel)) deallocate(self%Sel)
if (allocated(self%conv_ph)) deallocate(self%conv_ph)
if (allocated(self%conv_el)) deallocate(self%conv_el)
if (allocated(self%vg_ph)) deallocate(self%vg_ph)
if (allocated(self%vg_el)) deallocate(self%vg_el)

end subroutine clean

subroutine read_nanostructure(self)
!! Subroutine to read nanostructure information
!!
!! self Nanostructuration object
!! self nanostructure object

class(nanostructure), intent(inout) :: self

Expand Down Expand Up @@ -197,47 +222,48 @@ subroutine compute_transport_vg(self, species_prefix, ph, el)
!! ph phonon information
!! el electron information
!!
class(nanostructure) , intent(inout) :: self
character(len = 2), intent(in) :: species_prefix
type(phonon), intent(inout) :: ph
type(electron), intent(inout), optional :: el
class(nanostructure) , intent(inout) :: self
character(len = 2), intent(in) :: species_prefix
type(phonon), intent(in), optional :: ph
type(electron), intent(in), optional :: el

!! Local
integer(i64) :: i, j, k
real(r64), allocatable :: v(:,:,:)

if (species_prefix == 'ph') then

if (.not. present(ph)) then
call exit_with_message("Error asked for ph vg in nanostructures but no ph object is provided")
end if

call move_alloc(ph%vels,v)
allocate(ph%vels(size(v,1),size(v,2),self%nsys))
allocate(self%vg_ph(size(ph%vels,1),size(ph%vels,2),self%nsys))

do i = 1, size(ph%vels,1)
do j = 1, size(ph%vels,2)
do k = 1, self%nsys
ph%vels(i,j,k) = dot_product(v(i,j,:), &
self%vg_ph(i,j,k) = dot_product(ph%vels(i,j,:), &
self%taxis(k,:)/self%tnorm(k))
end do
end do
end do

deallocate(v)

else if (species_prefix == 'el') then

if (.not. present(el)) then
call exit_with_message("Error asked for el vg in nansotructures but no el object is provided")
end if

call move_alloc(el%vels,v)
allocate(el%vels(size(v,1),size(v,2),self%nsys))
allocate(self%vg_el(size(el%vels,1),size(el%vels,2),self%nsys))

do i = 1, size(el%vels,1)
do j = 1, size(el%vels,2)
do k = 1, self%nsys
el%vels(i,j,k) = dot_product(v(i,j,:), &
self%vg_el(i,j,k) = dot_product(el%vels(i,j,:), &
self%taxis(k,:)/self%tnorm(k))
end do
end do
end do

deallocate(v)


else
call exit_with_message("Unknown particle in compute_suppression. Exiting.")
end if
Expand All @@ -254,7 +280,8 @@ subroutine compute_suppression(self, species_prefix, sym, rta_rates_ibz, ph, el)
!! averaged non-homogeneous electron phonon Boltzmann transport
!! Equation. It is averaged in the sense that RTA-deviations are
!! averaged over the cross section normal to the transport direction
!! See XXX for more information regarding the methodology.
!! See 10.1016/j.ijheatmasstransfer.2024.125385 for more information regarding the methodology
!! for the coupled electron-phonon BTE
!!
!! self Nanostructuration object
!! species_prefix kind of particle
Expand Down Expand Up @@ -436,7 +463,7 @@ subroutine compute_suppression(self, species_prefix, sym, rta_rates_ibz, ph, el)

!We implement as it is need for computation the trapezoidal rule
!an analytical formula using Bessel and Struve modified functions exists
!but has to much numerical noise so trapezoidal is better.
!but has too much numerical noise. So numerical integration is the way to go.
pure function supress_nw(R,mfp) result(sf)
implicit none
real(r64), intent(in) :: R, mfp
Expand Down

0 comments on commit ef7fb48

Please sign in to comment.