ok, I am having a real problem here .. i have been spending the entire week waiting for results, tuning then trying again, .... ok, so as a last resort i though i would make the simplest structure possible, to see how long it takes ...
I made a graphene type FET device with two electrodes, and a gate ... i just want some IV curves, so i am doing a transmission spectrum calc .. attached is the nc file .. "cfg" is the device configuration ... there are other objects in there but ignore those i am not using those now ...
here are my parameters:
gate_voltage_list = numpy.linspace(-0.2,0.2,11)*Volt
bias_voltage_list = [0.1]*Volt
transSpecEnergies = numpy.linspace(-3,3,31)*eV
kPntsX = 1
kPntsY = 1 # don't need unless periodic here
kPntsZ = 101 # always use odd so gamma point is included
iteration_control_parameters = IterationControlParameters(number_of_history_steps=18, tolerance=1e-4)
numerical_accuracy_parameters = NumericalAccuracyParameters(k_point_sampling=(kPntsX, kPntsY, kPntsZ))
SCF = 1
These two functions perform the task:
def my_DeviceHuckelCalculator():
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = [
CerdaHuckelParameters.Carbon_graphite_Basis,
HoffmannHuckelParameters.Boron_Basis,
HoffmannHuckelParameters.Hydrogen_Basis,
HoffmannHuckelParameters.Nitrogen_Basis,
]
if SCF == 1:
#----------------------------------------
# Electrode Calculators
#----------------------------------------
left_electrode_calculator = HuckelCalculator(
basis_set=basis_set,
numerical_accuracy_parameters=numerical_accuracy_parameters,
# set these for SCF
iteration_control_parameters=iteration_control_parameters,
)
right_electrode_calculator = HuckelCalculator(
basis_set=basis_set,
numerical_accuracy_parameters=numerical_accuracy_parameters,
# set these for SCF
iteration_control_parameters=iteration_control_parameters,
)
#----------------------------------------
# Device Calculator
#----------------------------------------
calculator = DeviceHuckelCalculator(
basis_set=basis_set,
# set these for SCF
numerical_accuracy_parameters=numerical_accuracy_parameters,
iteration_control_parameters=iteration_control_parameters,
electrode_calculators=[left_electrode_calculator, right_electrode_calculator],
)
return calculator
def doTransmission():
# http://www.quantumwise.com/documents/tutorials/latest/GrapheneDevice/index.html/chap.further.html#chap.further.sect1.both
nlprint(str(gate_voltage_list));
nlprint(str(bias_voltage_list));
#read in the old configuration
device_configuration = nlread(nc_files + outFileName, object_id="cfg")[0]
calculator = my_DeviceHuckelCalculator()
metallic_region0 = device_configuration.metallicRegions()[0]
device_configuration.setCalculator(calculator)
device_configuration.update()
# Define gate_voltages
for gate_voltage in gate_voltage_list:
for bias in bias_voltage_list:
device_configuration.setMetallicRegions(
[metallic_region0(value = gate_voltage)] )
# Set calculator with applied bias on the configuration
# use the old selfconsistent state as starting input.
device_configuration.setCalculator(
calculator(electrode_voltages=(bias,0.0*Volt)),
initial_state=device_configuration)
gate_voltage_str = str(gate_voltage)
gate_voltage_str = gate_voltage_str.replace("_", "")
gate_voltage_str = gate_voltage_str.replace(" ", "")
bias_str = str(bias)
bias_str = bias_str.replace("_", "")
bias_str = bias_str.replace(" ", "")
voltageStr = "[vg" + gate_voltage_str + "][vds" + bias_str + "]"
#Analysis
#electron_density = ElectronDifferenceDensity(device_configuration)
#nlsave(nc_files + outFileName2, electron_density,object_id='dens'+voltageStr)
#electrostatic_potential = ElectrostaticDifferencePotential(device_configuration)
#nlsave(nc_files + outFileName2, electrostatic_potential, object_id='pot'+voltageStr)
# -------------------------------------------------------------
# Transmission spectrum
# -------------------------------------------------------------
transmission_spectrum = TransmissionSpectrum(
configuration = device_configuration,
energies = transSpecEnergies,
kpoints = MonkhorstPackGrid(1,1),
energy_zero_parameter = AverageFermiLevel,
infinitesimal = 1e-06*eV,
self_energy_calculator = KrylovSelfEnergy(),
)
nlsave(nc_files + outFileName2, transmission_spectrum,object_id='trans'+voltageStr)
now = date.today()
nlprint("doTransmission " + voltageStr + " " + str(now.strftime("%m-%d-%y %I:%M %p")))
And the result is .... it is taking many hours and sometimes giving non convergence errors ... why? I removed doping and other more complex things to make the simplest GNR FET type device but i still see more than 60 steps and continuing .. i think it is not converging ... why can it not converge and why does it take sometimes 2 hours for each IV point .. is this normal ? please help...i must be doing something wrong ... if it is nomal then fine, but i just dont want to wait another 24 hours to find out it did not converge .. sorry frustrated here