Author Topic: Is my thermal-induced-current script correct?  (Read 5036 times)

0 Members and 1 Guest are viewing this topic.

Offline wot19920302

  • QuantumATK Guru
  • ****
  • Posts: 124
  • Country: cn
  • Reputation: 0
    • View Profile
Is my thermal-induced-current script correct?
« 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.  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          

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Is my thermal-induced-current script correct?
« Reply #1 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.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Is my thermal-induced-current script correct?
« Reply #2 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.

Offline wot19920302

  • QuantumATK Guru
  • ****
  • Posts: 124
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Is my thermal-induced-current script correct?
« Reply #3 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          
« Last Edit: November 11, 2016, 16:39 by wot19920302 »

Offline wot19920302

  • QuantumATK Guru
  • ****
  • Posts: 124
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Is my thermal-induced-current script correct?
« Reply #4 on: November 12, 2016, 14:32 »
can anyone help me? :o

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Is my thermal-induced-current script correct?
« Reply #5 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.


Offline wot19920302

  • QuantumATK Guru
  • ****
  • Posts: 124
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Is my thermal-induced-current script correct?
« Reply #6 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

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Is my thermal-induced-current script correct?
« Reply #7 on: November 12, 2016, 14:59 »
current = transmission_spectrum.current()
Done

Offline wot19920302

  • QuantumATK Guru
  • ****
  • Posts: 124
  • Country: cn
  • Reputation: 0
    • View Profile
Re: Is my thermal-induced-current script correct?
« Reply #8 on: November 12, 2016, 15:14 »
thank you,sir! I understand! ;D

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

best!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Is my thermal-induced-current script correct?
« Reply #9 on: November 12, 2016, 15:16 »
:)