Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
lectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Solid state physics
lectures
Commits
18981daf
Commit
18981daf
authored
6 years ago
by
Anton Akhmerov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into local
parents
832d50b7
0d69e269
Branches
Branches containing commit
No related tags found
2 merge requests
!65
Crystal structure changes
,
!16
WIP: exercises lecture 7 (Tight-Binding)
Pipeline
#14766
passed
6 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/2_debye_model.md
+27
-19
27 additions, 19 deletions
src/2_debye_model.md
with
27 additions
and
19 deletions
src/2_debye_model.md
+
27
−
19
View file @
18981daf
...
...
@@ -101,34 +101,42 @@ $$
where $x=
\f
rac{
\h
bar
\o
mega}{k_{
\r
m B}T}$ and $
\T
heta_{
\r
m D}
\e
quiv
\f
rac{
\h
bar
\o
mega_{
\r
m D}}{k_{
\r
m B}}$, the _Debye temperature_.
```
python
def
integrand
(
y
):
return
y
**
4
*
np
.
exp
(
y
)
/
(
np
.
exp
(
y
)
-
1
)
**
2
pyplot
.
rcParams
[
'
axes.titlepad
'
]
=
20
T
=
np
.
array
([
1.35
,
2.
,
3.
,
4.
,
5.
,
6.
,
7.
,
8.
,
10.
,
12.
,
14.
,
16.
,
20.
,
28.56
,
36.16
,
47.09
,
55.88
,
65.19
,
74.56
,
83.91
,
103.14
,
124.2
,
144.38
,
166.78
,
190.17
,
205.3
])
c
=
np
.
array
([
0.
,
0.
,
0.
,
0.
,
0.
,
0.
,
0.0719648
,
0.1075288
,
0.2100368
,
0.364008
,
0.573208
,
0.866088
,
1.648496
,
4.242576
,
7.07096
,
10.8784
,
13.47248
,
15.60632
,
17.27992
,
18.6188
,
20.33424
,
21.63128
,
22.46808
,
23.05384
,
23.47224
,
23.68144
])
c
*=
3
/
24.945
#24.954 is 3Nk_B
def
c_einstein
(
T
,
T_E
=
1
):
def
c_einstein
(
T
,
T_E
):
x
=
T_E
/
T
return
3
*
x
**
2
*
np
.
exp
(
x
)
/
(
np
.
exp
(
x
)
-
1
)
**
2
def
integrand
(
y
):
return
y
**
4
*
np
.
exp
(
y
)
/
(
np
.
exp
(
y
)
-
1
)
**
2
@np.vectorize
def
c_debye
(
T
,
T_D
=
1
):
def
c_debye
(
T
,
T_D
):
x
=
T
/
T_D
return
9
*
x
**
3
*
quad
(
integrand
,
0
,
1
/
x
)[
0
]
T
=
np
.
linspace
(
0.01
,
1.5
,
500
)
fig
,
ax
=
pyplot
.
subplots
()
temp
=
np
.
linspace
(
1
,
215
,
100
)
fit
=
curve_fit
(
c_einstein
,
T
,
c
,
500
)
T_E
=
fit
[
0
][
0
]
ax
.
plot
(
T
,
c_einstein
(
T
),
label
=
"
Einstein model
"
)
ax
.
plot
(
T
,
c_debye
(
T
),
label
=
"
Debye model
"
)
ax
.
set_ylim
(
bottom
=
0
,
top
=
3.4
)
ax
.
s
et_xlabel
(
'
$T$
'
)
ax
.
set_
ylabel
(
r
'
$\omega$
'
)
ax
.
set_xticks
([
1
]
)
ax
.
set_xticklabels
([
r
'
$\Theta_D
$
'
]
)
ax
.
set_y
ticks
([
3
]
)
ax
.
set_
yticklabels
([
'
$3Nk_B$
'
]
)
ax
.
legend
(
loc
=
'
lower right
'
)
pyplot
.
hlines
([
3
],
0
,
1.5
,
linestyles
=
'
dashed
'
)
draw_classic_axes
(
ax
,
xlabeloffset
=
0.3
)
fit
=
curve_fit
(
c_debye
,
T
,
c
,
500
)
T_D
=
fit
[
0
][
0
]
fig
,
ax
=
pyplot
.
subplots
(
)
ax
.
s
catter
(
T
,
c
)
ax
.
set_
title
(
'
Heat capacity of silver compared to the Debye and Einstein models
'
)
ax
.
plot
(
temp
,
c_debye
(
temp
,
T_D
),
label
=
f
'
Debye model, $T_D=
{
T_D
:
.
5
}
K$
'
)
ax
.
plot
(
temp
,
c_einstein
(
temp
,
T_E
),
label
=
f
'
Einstein model, $T_E=
{
T_E
:
.
5
}
K
$
'
)
ax
.
set_y
lim
(
bottom
=
0
,
top
=
3
)
ax
.
set_
xlim
(
0
,
215
)
ax
.
set_xlabel
(
'
$T(K)$
'
)
ax
.
set_ylabel
(
r
'
$C/k_B$
'
)
ax
.
legend
(
loc
=
'
lower right
'
);
```
## Exercises
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment