From: hackbard Date: Thu, 13 Dec 2007 10:19:31 +0000 (+0100) Subject: gnuplot script 2 atomic linear chain phonon dispersion relation + added X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=880b12e8055a1450cfeed695d718159e8b5bc100;p=lectures%2Flatex.git gnuplot script 2 atomic linear chain phonon dispersion relation + added figure tex code to 2nd tutorial solutions --- diff --git a/solid_state_physics/tutorial/1_02s.tex b/solid_state_physics/tutorial/1_02s.tex index a3e9b93..6f08cae 100644 --- a/solid_state_physics/tutorial/1_02s.tex +++ b/solid_state_physics/tutorial/1_02s.tex @@ -16,6 +16,7 @@ \usepackage{pstricks} \usepackage{pst-node} \usepackage{rotating} +\usepackage{eepic} \setlength{\headheight}{0mm} \setlength{\headsep}{0mm} \setlength{\topskip}{-10mm} \setlength{\textwidth}{17cm} @@ -143,6 +144,7 @@ $\Rightarrow M_1M_2\omega^4-2C(M_1+M_2)\omega^2+2C^2(1-\cos(ka))=0$ \end{itemize} +\newpage \item \begin{eqnarray} \omega^2&=&C\left(\frac{2C(M_1+M_2)}{2M_1M_2}\right)\pm \sqrt{\frac{4C^2(M_1+M_2)^2}{4M_1^2M_2^2}- @@ -154,6 +156,59 @@ C\sqrt{\left(\frac{1}{M_1}+\frac{1}{M_2}\right)^2- \frac{2(1-\cos(ka))}{M_1M_2}} \nonumber \end{eqnarray} + \begin{figure}[!h] + +% GNUPLOT: LaTeX picture using EEPIC macros +\setlength{\unitlength}{0.120450pt} +\begin{picture}(3000,1800)(0,0) +\footnotesize +\color{black} +\color{black} +\thicklines \path(681,1718)(681,82)(2317,82)(2317,1718)(681,1718) +\color{black} +\put(681,900){\makebox(0,0)[l]{\shortstack{}}} +\color{black} +\color{black} +\put(2398,900){\makebox(0,0)[l]{\shortstack{}}} +\color{black} +\color{black} +\put(1499,41){\makebox(0,0){}} +\color{black} +\color{black} +\put(1499,1677){\makebox(0,0){}} +\color{black} +\put(1499,1676){\makebox(0,0){}} +\color{black} +\put(681,124){\makebox(0,0)[l]{}} +\color{black} +\color{red} +\color{black} +\put(2550,1300){\makebox(0,0)[r]{$\sqrt{\frac{2C}{M_2}}$}} +\put(2550,800){\makebox(0,0)[r]{$\sqrt{\frac{2C}{M_1}}$}} +\put(2350,-10){\makebox(0,0)[r]{$\frac{\pi}{a}$}} +\put(1500,-30){\makebox(0,0)[r]{$k$}} +\put(700,-10){\makebox(0,0)[r]{$0$}} +\put(650,1500){\makebox(0,0)[r]{$\sqrt{2C(\frac{1}{M_1}+\frac{1}{M_2})}$}} +\put(600,800){\makebox(0,0)[r]{$\omega$}} +\put(1800,1000){\makebox(0,0)[r]{$M_1>M_2$}} +\put(1989,1636){\makebox(0,0)[r]{optical branch}} +\color{red} +\thinlines \path(2030,1636)(2235,1636) +\thinlines \path(681,1490)(681,1490)(698,1490)(714,1490)(731,1490)(747,1490)(764,1489)(780,1489)(797,1488)(813,1488)(830,1487)(846,1487)(863,1486)(879,1485)(896,1484)(912,1484)(929,1483)(945,1482)(962,1481)(978,1479)(995,1478)(1012,1477)(1028,1476)(1045,1474)(1061,1473)(1078,1471)(1094,1470)(1111,1468)(1127,1466)(1144,1465)(1160,1463)(1177,1461)(1193,1459)(1210,1457)(1226,1455)(1243,1453)(1259,1451)(1276,1448)(1292,1446)(1309,1444)(1325,1442)(1342,1439)(1359,1437)(1375,1434)(1392,1432)(1408,1429)(1425,1427)(1441,1424)(1458,1421)(1474,1418)(1491,1416) +\thinlines \path(1491,1416)(1507,1413)(1524,1410)(1540,1407)(1557,1404)(1573,1401)(1590,1398)(1606,1395)(1623,1393)(1639,1390)(1656,1387)(1673,1383)(1689,1380)(1706,1377)(1722,1374)(1739,1371)(1755,1368)(1772,1365)(1788,1362)(1805,1359)(1821,1356)(1838,1353)(1854,1351)(1871,1348)(1887,1345)(1904,1342)(1920,1339)(1937,1337)(1953,1334)(1970,1331)(1986,1329)(2003,1326)(2020,1324)(2036,1322)(2053,1320)(2069,1318)(2086,1316)(2102,1314)(2119,1312)(2135,1310)(2152,1309)(2168,1307)(2185,1306)(2201,1305)(2218,1304)(2234,1303)(2251,1303)(2267,1302)(2284,1302)(2300,1301)(2317,1301) +\color{blue} +\color{black} +\put(1989,1553){\makebox(0,0)[r]{acoustic branch}} +\color{blue} +\thinlines \path(2030,1553)(2235,1553) +\thinlines \path(681,82)(681,82)(698,92)(714,101)(731,111)(747,121)(764,130)(780,140)(797,150)(813,159)(830,169)(846,179)(863,188)(879,198)(896,207)(912,217)(929,227)(945,236)(962,246)(978,255)(995,265)(1012,274)(1028,283)(1045,293)(1061,302)(1078,312)(1094,321)(1111,330)(1127,340)(1144,349)(1160,358)(1177,367)(1193,376)(1210,386)(1226,395)(1243,404)(1259,413)(1276,422)(1292,431)(1309,439)(1325,448)(1342,457)(1359,466)(1375,474)(1392,483)(1408,492)(1425,500)(1441,509)(1458,517)(1474,525)(1491,534) +\thinlines \path(1491,534)(1507,542)(1524,550)(1540,558)(1557,566)(1573,574)(1590,582)(1606,589)(1623,597)(1639,604)(1656,612)(1673,619)(1689,627)(1706,634)(1722,641)(1739,648)(1755,655)(1772,661)(1788,668)(1805,674)(1821,681)(1838,687)(1854,693)(1871,699)(1887,705)(1904,710)(1920,716)(1937,721)(1953,726)(1970,731)(1986,736)(2003,741)(2020,745)(2036,749)(2053,753)(2069,757)(2086,761)(2102,764)(2119,767)(2135,770)(2152,773)(2168,775)(2185,778)(2201,780)(2218,781)(2234,783)(2251,784)(2267,785)(2284,785)(2300,786)(2317,786) +\color{black} +\thicklines \path(681,1718)(681,82)(2317,82)(2317,1718)(681,1718) +\color{black} +\end{picture} + + \end{figure} \begin{itemize} \item $ka\ll 1$:\\ $\rightarrow \cos(ka)\approx 1-\frac{1}{2}k^2a^2$ (Taylor)\\ diff --git a/solid_state_physics/tutorial/2alc.gpi b/solid_state_physics/tutorial/2alc.gpi new file mode 100644 index 0000000..e199fd6 --- /dev/null +++ b/solid_state_physics/tutorial/2alc.gpi @@ -0,0 +1,150 @@ +#!/usr/bin/gnuplot -persist +# +# +# G N U P L O T +# Version 4.2 patchlevel 0 +# last modified March 2007 +# System: Linux 2.6.22-2-686 +# +# Copyright (C) 1986 - 1993, 1998, 2004, 2007 +# Thomas Williams, Colin Kelley and many others +# +# Type `help` to access the on-line reference manual. +# The gnuplot FAQ is available from +# http://www.gnuplot.info/faq/ +# +# Send comments and help requests to +# Send bug reports and suggestions to +# +# set terminal latex (document specific font) +# set output '2alc.tex' +unset clip points +set clip one +unset clip two +set bar 1.000000 +set border 31 front linetype -1 linewidth 1.000 +set xdata +set ydata +set zdata +set x2data +set y2data +set timefmt x "%d/%m/%y,%H:%M" +set timefmt y "%d/%m/%y,%H:%M" +set timefmt z "%d/%m/%y,%H:%M" +set timefmt x2 "%d/%m/%y,%H:%M" +set timefmt y2 "%d/%m/%y,%H:%M" +set timefmt cb "%d/%m/%y,%H:%M" +set boxwidth +set style fill empty border +set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 +set dummy x,y +set format x "% g" +set format y "% g" +set format x2 "% g" +set format y2 "% g" +set format z "% g" +set format cb "% g" +set angles radians +unset grid +set key title "" +set key inside right top vertical Right noreverse enhanced autotitles nobox +set key noinvert samplen 4 spacing 1 width 0 height 0 +unset label +unset arrow +set style increment default +unset style line +unset style arrow +set style histogram clustered gap 2 title offset character 0, 0, 0 +unset logscale +set offsets 0, 0, 0, 0 +set pointsize 1 +set encoding default +unset polar +unset parametric +unset decimalsign +set view 60, 30, 1, 1 +set samples 100, 100 +set isosamples 10, 10 +set surface +unset contour +set clabel '%8.3g' +set mapping cartesian +set datafile separator whitespace +unset hidden3d +set cntrparam order 4 +set cntrparam linear +set cntrparam levels auto 5 +set cntrparam points 5 +set size ratio 1 1,1 +set origin 0,0 +set style data points +set style function lines +set xzeroaxis linetype -2 linewidth 1.000 +set yzeroaxis linetype -2 linewidth 1.000 +set zzeroaxis linetype -2 linewidth 1.000 +set x2zeroaxis linetype -2 linewidth 1.000 +set y2zeroaxis linetype -2 linewidth 1.000 +set ticslevel 0.5 +set mxtics default +set mytics default +set mztics default +set mx2tics default +set my2tics default +set mcbtics default +set noxtics +set noytics +set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 autofreq +set nox2tics +set noy2tics +set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 autofreq +set title "" +set title offset character 0, 0, 0 font "" norotate +set timestamp bottom +set timestamp "" +set timestamp offset character 0, 0, 0 font "" norotate +set rrange [ * : * ] noreverse nowriteback # (currently [0.00000:10.0000] ) +set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set urange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set vrange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set xlabel "" +set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set x2label "" +set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate +set xrange [ 0.00000 : 3.14159 ] noreverse nowriteback +set x2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set ylabel "" +set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set y2label "" +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 +set yrange [ 0.00000 : 30.0000 ] noreverse nowriteback +set y2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set zlabel "" +set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set cblabel "" +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set cbrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set zero 1e-08 +set lmargin -1 +set bmargin -1 +set rmargin -1 +set tmargin -1 +set locale "C" +set pm3d explicit at s +set pm3d scansautomatic +set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean +set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB +set palette rgbformulae 7, 5, 15 +set colorbox default +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 bdefault +set loadpath +set fontpath +set fit noerrorvariables +f(x)=sqrt(C*(1/M+1/N)+C*sqrt((1/M+1/N)**2-2*(1-cos(x))/(M*N))) +g(x)=sqrt(C*(1/M+1/N)-C*sqrt((1/M+1/N)**2-2*(1-cos(x))/(M*N))) +GNUTERM = "wxt" +C = 50 +M = 0.2 +N = 0.6 +plot f(x) t "optical branch", g(x) t "acoustic branch" +# EOF