QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: wot19920302 on November 11, 2016, 11:41

Title: Is my thermal-induced-current script correct?
Post by: wot19920302 on November 11, 2016, 11:41
Dear Quantumwise Staffs:
          I wanna to calculate  thermal-induced-current, so I make a new script by modifying the script from this topic: http://quantumwise.com/forum/index.php?topic=3411.msg20255#msg20255 (http://quantumwise.com/forum/index.php?topic=3411.msg20255#msg20255).  But I have a questions:
           what are units of  elementary charge e, plank constant h and energes  in the script, respectively?  I find that I have to add "eV" in this sytanx to calculate current successfully :
           
Code
   k1 =1.0/planck_constant*Units.e*1*[b]eV[/b]*sum(f*T1*dE)
. But  If so. it means that there is no unit for energes.
            Attachments I   is the script for calculating spin seebeck from the topic
            Attachments II  is what I modified using  Attachments one
            Could any one help me to inspect if there is mistakes in my script ?
            Thanks
         
Title: Re: Is my thermal-induced-current script correct?
Post by: Jess Wellendorff on November 11, 2016, 14:18
You are making quite a few changes when going from
Code
k1 = -1.0/planck_constant*(boltzmann_constant*temperature)*sum(E*T1*df)*dE
to
Code
k1 =1.0/planck_constant*Units.e*sum(f*T1*dE)
. For example,
Code
boltzmann_constant*temperature
has units of eV, but you remove it, so you may easily be missing the unit charge.
Title: Re: Is my thermal-induced-current script correct?
Post by: Anders Blom on November 11, 2016, 14:32
It's very important to note that as a strict and general rule, ATK always uses real units. So the Planck constant has the unit of action (energy*time),  energies are energies (unless removed by "inUnitsOf", which some scripts do for simplicity), the elementary charge has the unit of charge, and so on.
Title: Re: Is my thermal-induced-current script correct?
Post by: wot19920302 on November 11, 2016, 15:16
thank you, Sir, but I am confused :o
          acccording to the formula in fig1, I write this code:
                   
Code
  k1 =1.0/planck_constant*Units.e*sum(f*T1*dE)

planck_constant has the unit of eV*s, Units.e  is elementary charge so in unit of Coulomb(C), f is Fr-Fl so is dimensionless, T1 is electron spectrum so is also  dimensionless, dE is the infinitesimal energy so have the unit of eV.   If I multiply these dimensions  I will get Coulomb/s, which is just the current. Why should I have to add "eV" ?
     
   what's more, E in attachment II is :
               
Code
 E = numpy.array(energies+energy_zero-average_fermi_level-energy_shift)
   instead of E in attachment I :
             
Code
 E = numpy.array((energies+energy_zero-average_fermi_level-energy_shift)/(temperature * boltzmann_constant))
    I don't know whether I am wrong
    If possible, could you please provide a standard script for calculating thermal-induced current?
   best
         
Title: Re: Is my thermal-induced-current script correct?
Post by: wot19920302 on November 12, 2016, 14:32
can anyone help me? :o
Title: Re: Is my thermal-induced-current script correct?
Post by: Anders Blom on November 12, 2016, 14:46
A general script is provided in http://quantumwise.com/forum/index.php?topic=3411 that you already referenced. I don't see any reason to modify it. The formula you write gives the current, but for the thermoelectric coefficients you need the conductance.

I suggest you just use the Thermoelectric Coefficient plugin if you are unsure about Python and the formalism.

Title: Re: Is my thermal-induced-current script correct?
Post by: wot19920302 on November 12, 2016, 14:56
thank you sir, I want to calculate current instead of cnductance. I just want to consult you whether my script (attachment II) is correct or wrong.? could you please answser me? :-*
yours
Title: Re: Is my thermal-induced-current script correct?
Post by: Anders Blom on November 12, 2016, 14:59
current = transmission_spectrum.current()
Done
Title: Re: Is my thermal-induced-current script correct?
Post by: wot19920302 on November 12, 2016, 15:14
thank you,sir! I understand! ;D

well....I make a simple thing complex :-[ :-[

best!
Title: Re: Is my thermal-induced-current script correct?
Post by: Anders Blom on November 12, 2016, 15:16
:)