-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove parallelization over points in test script; add crosstest for …
…user defined field
- Loading branch information
Showing
9 changed files
with
101 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-13.4 KB
(98%)
tests/18_Semiconductor_Nk1_50_Nk2_length_user_efield/CUED_summary.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+653 KB
tests/36_crosstest_user_defined_E_field_against_test_03/CUED_summary.pdf
Binary file not shown.
40 changes: 40 additions & 0 deletions
40
tests/36_crosstest_user_defined_E_field_against_test_03/params.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Input parameters for SBE.py | ||
import numpy as np | ||
|
||
|
||
class params: | ||
# System parameters | ||
######################################################################### | ||
e_fermi = 0.0 # Fermi energy in eV | ||
temperature = 0.0 # Temperature in eV | ||
|
||
# Model Hamiltonian parameters | ||
# Brillouin zone parameters | ||
########################################################################## | ||
BZ_type = 'rectangle' # rectangle or hexagon | ||
Nk1 = 50 # Number of kpoints in each of the paths | ||
Nk2 = 4 # Number of paths | ||
length_BZ_E_dir = 5.0 # length of BZ in E-field direction | ||
length_BZ_ortho = 0.2 # length of BZ orthogonal to E-field direction | ||
angle_inc_E_field = 0 # incoming angle of the E-field in degree | ||
dk_order = 8 # order for numerical derivative of density matrix | ||
|
||
# Driving field parameters | ||
########################################################################## | ||
f = 25.0 # Pulse frequency (THz) | ||
|
||
# Time scales (all units in femtoseconds) | ||
########################################################################## | ||
T1 = 1000 # Phenomenological diagonal damping time | ||
T2 = 1 # Phenomenological polarization damping time | ||
t0 = -1000 # Start time *pulse centered @ t=0, use t0 << 0 | ||
dt = 0.05 # Time step | ||
|
||
# Flags for testing and features | ||
########################################################################## | ||
gauge = 'length' # Gauge of the system | ||
solver = '2band' | ||
fourier_window_function = 'gaussian' | ||
gaussian_window_width = 50 | ||
user_out = False | ||
save_latex_pdf = False |
50 changes: 50 additions & 0 deletions
50
tests/36_crosstest_user_defined_E_field_against_test_03/runscript.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from params import params | ||
|
||
from numba import njit | ||
import numpy as np | ||
import cued.hamiltonian | ||
from cued.main import sbe_solver | ||
from cued.utility import ConversionFactors as CoFa | ||
|
||
def make_electric_field_in_path(E0, f, sigma, chirp, phase): | ||
""" | ||
Creates a jitted version of the electric field for fast use inside a solver | ||
""" | ||
@njit | ||
def electric_field(t): | ||
''' | ||
Returns the instantaneous driving pulse field | ||
''' | ||
# Non-pulse | ||
# return E0*np.sin(2.0*np.pi*w*t) | ||
# Chirped Gaussian pulse | ||
return E0*np.exp(-t**2/sigma**2) \ | ||
* np.sin(2.0*np.pi*f*t*(1 + chirp*t) + phase) | ||
|
||
return electric_field | ||
|
||
|
||
def dirac(): | ||
A = 0.1974 # Fermi velocity | ||
|
||
dirac_system = cued.hamiltonian.BiTe(C0=0, C2=0, A=A, R=0, mz=0) | ||
|
||
return dirac_system | ||
|
||
def run(system): | ||
|
||
E0 = 5.00*CoFa.MVpcm_to_au # Pulse amplitude (MV/cm) | ||
f = 25.0*CoFa.THz_to_au # Pulse frequency (THz) | ||
chirp = 0.00 # Pulse chirp ratio (chirp = c/w) (THz) | ||
sigma = 50.0*CoFa.fs_to_au # Gaussian pulse width (femtoseconds) | ||
phase = 0.0 | ||
|
||
params.electric_field_function_in_path = make_electric_field_in_path(E0, f, sigma, chirp, phase) | ||
params.electric_field_function_ortho = make_electric_field_in_path(0, f, sigma, chirp, phase) # orthogonal field is zero | ||
|
||
sbe_solver(system, params) | ||
|
||
return 0 | ||
|
||
if __name__ == "__main__": | ||
run(dirac()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters