Guest User

Untitled

a guest
Nov 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. Enerf[[Rho]f_, [Zeta]f1_, [Zeta]f2_, angf1_, angf2_,
  2. zf_, [Gamma]f_, mf_] := Module[{},
  3. [Zeta]f = {[Zeta]f1, [Zeta]f2};
  4. mf1 = mf;
  5. Angf[dona_] := If[dona == 1, angf1*Pi/180., angf2*Pi/180., 0];
  6. d[Phi]f = Angf[2] - Angf[1];
  7. [Xi]ff =
  8. Sqrt[[Zeta]f1^2 + [Zeta]f2^2 -
  9. 2*[Zeta]f2*[Zeta]f1*Cos[d[Phi]f]];
  10. ConstanteDiagonalf = !(
  11. *UnderoverscriptBox[([Sum]), (j = 1), (2)](NIntegrate[
  12. *FractionBox[(-2), (2*Pi*
  13. *SqrtBox[(
  14. *SuperscriptBox[([Rho]f), (2)] +
  15. *SuperscriptBox[(([Zeta]f[([j])])), (2)] -
  16. 2 [Rho]f*[Zeta]f[([j])] Cos[[CurlyPhi] - Angf[j]] +
  17. *SuperscriptBox[((zf)), (2)])])], {[CurlyPhi], 0, 2 Pi}]));
  18.  
  19. akf = ParallelTable[If[k - kp == 0,
  20. k^2/[Rho]f^2 + [Gamma]f* k + ( ([Gamma]f)^2 [Rho]f^2)/4 +
  21. ConstanteDiagonalf + 2/[Xi]ff,
  22.  
  23. NIntegrate[(-2 Exp[I (k - kp)*[CurlyPhi]])/(
  24. 2*Pi*Sqrt[[Rho]f^2 + [Zeta]f1^2 -
  25.  
  26. 2*[Rho]f*[Zeta]f1 Cos[[CurlyPhi] -
  27. Angf[1]] + (zf)^2]), {[CurlyPhi], 0, 2 Pi}] -
  28. NIntegrate[(-2 Exp[I (k - kp)*[CurlyPhi]])/(
  29. 2*Pi*Sqrt[[Rho]f^2 + [Zeta]f2^2 -
  30. 2*[Rho]f*[Zeta]f2*
  31. Cos[[CurlyPhi] - Angf[2]] + (zf)^2]), {[CurlyPhi], 0,
  32. 2 Pi}]
  33.  
  34. ], {k, -mf1, mf1, 1}, {kp, -mf1, mf1, 1}];
  35. valoresf = Eigensystem[akf];
  36. ValoresTf = Transpose[SortBy[Transpose[valoresf], #1 &]];
  37.  
  38. {ValoresTf[[1]], 5.8*ValoresTf[[1]]} // MatrixForm
  39. ];
  40.  
  41. Enerf[1, 0.9, 0.9, -120, 90, 0, 0, 4]
Add Comment
Please, Sign In to add comment