Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is the integral for current correct?

  1. Jul 7, 2017 #1
    Hi,
    I am using Mathematica to calculate density of states and current of the Green's function times self energy in most simple form. I am not sure if I am getting current integral over energy implemented correctly. Shouldnt first current plot be a line with a slope? Below is my code:
    Code (Text):

    Remove["Global`*"];//Quiet
    ClearAll
    inputEta=0.6;inputHop=0.6;inputStep=0.1;inputAngle=1;inputCoup=0.5;inputDrange={0,2.5};inputCrange={0,0.1};range=10;\[Chi]range=4*Pi;

    (* plotting density of states *)
    greenF[\[Eta]_,t_,\[Theta]_]:=1/(e+I*\[Eta]-2*t*Cos[\[Theta]])
    integral[eta_,hopping_,steps_,plotrange_]:=Module[{},ListPlot[Table[{e,-1/Pi*Im[NIntegrate[greenF[eta,hopping,angle],{angle,-Pi,Pi}]]},{e,-range,range,steps}],Joined->True,AxesLabel->{"E","DOS"},PlotRange->Automatic]]//Timing
    integral[inputEta,inputHop,inputStep,inputDrange]

    (* plotting current *)
    (*selfEnergy1=1 ,   greenF1=greenF*selfEnergy1 *)
    greenF1[\[Eta]_,t_,\[Theta]_,v_,e_]:=v/(e+I*\[Eta]-2*t*Cos[\[Theta]]);
    integral[eta_,hopping_,angle_,coupling_,steps_,plotrange_]:=Module[{},ListPlot[Table[{\[Chi],1/(2*Pi)*Re[NIntegrate[greenF1[eta,hopping,angle,coupling,energy],{energy,-range,range}]]},{\[Chi],-\[Chi]range,\[Chi]range,steps}],Joined->True,AxesLabel->{"\[Chi]","I"},PlotRange->Automatic]]//Timing
    integral[inputEta,inputHop,inputStep,inputAngle,inputCoup,inputCrange]

    (*selfEnergy2=v*Cos[\[Chi]] ,   greenF1=greenF*selfEnergy1 *)
    greenF2[\[Eta]_,t_,\[Theta]_,v_,e_]:=v*Cos[\[Chi]]/(e+I*\[Eta]-2*t*Cos[\[Theta]]);
    integral[eta_,hopping_,angle_,coupling_,steps_,plotrange_]:=Module[{},ListPlot[Table[{\[Chi],1/(2*Pi)*Re[NIntegrate[greenF2[eta,hopping,angle,coupling,energy],{energy,-range,range}]]},{\[Chi],-\[Chi]range,\[Chi]range,steps}],Joined->True,AxesLabel->{"\[Chi]","I"},PlotRange->Automatic]]//Timing
    integral[inputEta,inputHop,inputStep,inputAngle,inputCoup,inputCrange]
     
     
    Last edited by a moderator: Jul 7, 2017
  2. jcsd
  3. Jul 12, 2017 #2
    Thanks for the thread! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post? The more details the better.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted