Skip to content

Commit

Permalink
Cleanup comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvist committed Nov 1, 2024
1 parent fb214a7 commit 45f1007
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions src/TrialPolaron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,17 @@ end

# Hellwarth et al. 1999 PRB - Part IV; T-dep of the Feynman variation parameter

# In Julia we have 'Multiple dispatch', so let's just construct the free
# energies (temperature-dependent) with the same name as before, but with the thermodynamic beta where required.
# In Julia we have 'Multiple dispatch', so we specify both the athermal (original Feynman)
# and thermal (Osaka) versions with the same function name, but with thermodynamic Beta in
# the thermal versions

# Define Osaka's free-energies (Hellwarth1999 version) as Julia functions.

"""
A(v, w, ω, β)
Hellwarth's A expression from Eqn. (62b) in Hellwarth et al. 1999 PRB. Part of the overall free energy expression.
Hellwarth's A expression from Eqn. (62b) in Hellwarth et al. 1999 PRB. Part of the overall
free energy expression.
See Hellwarth et a. 1999: https://doi.org/10.1103/PhysRevB.60.299.
"""
Expand All @@ -114,19 +116,19 @@ A(v, w) = -3 * (v - w) / 2
"""
C(v, w, ω, β)
Hellwarth's C expression from Eqn. (62e) in Hellwarth et al. 1999 PRB. Part of the overall free energy expression.
Hellwarth's C expression from Eqn. (62e) in Hellwarth et al. 1999 PRB. Part of the overall
free energy expression.
See Hellwarth et a. 1999: https://doi.org/10.1103/PhysRevB.60.299.
"""
C(v, w, β) = 3 / 4 * (v^2 - w^2) / v * (coth(v * β / 2) - 2 / (v * β))

C(v, w) = (3 / (4 * v)) * (v^2 - w^2)


# Extending the Feynman theory to multiple phonon branches

# Extending the Feynman theory to multiple variational parameters
# Multiple Parameter Polaron Free Energy
# Calculate the polaron free energy, generalised from Osaka's expression to the case where multiple phonon modes are present in the material.

"""
κ_i(i, v, w)
Expand All @@ -151,11 +153,15 @@ end
"""
h_i(i, v, w)
Calculates the normal-mode (the eigenmodes) frequency of the coupling between the electron and the `ith' fictitious mass that approximates the exact electron-phonon interaction with a harmonic coupling to a massive fictitious particle.
Calculates the normal-mode (the eigenmodes) frequency of the coupling between the electron
and the `ith' fictitious mass that approximates the exact electron-phonon interaction with
a harmonic coupling to a massive fictitious particle.
Required for calculating the polaron free energy.
Note: Not to be confused with the number of physical phonon branches; many phonon branches could be approximated with one or two etc. fictitious masses for example. The number of fictitious mass does not necessarily need to match the number of phonon branches.
Note: Not to be confused with the number of physical phonon branches; many phonon branches
could be approximated with one or two etc. fictitious masses for example. The number of
fictitious mass does not necessarily need to match the number of phonon branches.
# Arguments
- `i::Integer`: enumerates the current fictitious mass.
Expand All @@ -171,11 +177,16 @@ end
"""
C_ij(i, j, v, w)
Calculates the element to the coupling matrix C_ij (a generalisation of Feynman's `C` coupling variational parameter in Feynman 1955) between the electron and the `ith' and `jth' fictitious masses that approximates the exact electron-phonon interaction with a harmonic coupling to a massive fictitious particle.
Calculates the element to the coupling matrix C_ij (a generalisation of Feynman's `C`
coupling variational parameter in Feynman 1955) between the electron and the `ith' and `jth'
fictitious masses that approximates the exact electron-phonon interaction with a harmonic
coupling to a massive fictitious particle.
Required for calculating the polaron free energy.
Note: Not to be confused with the number of physical phonon branches; many phonon branches could be approximated with one or two etc. fictitious masses for example. The number of fictitious mass does not necessarily need to match the number of phonon branches.
Note: Not to be confused with the number of physical phonon branches; many phonon branches
could be approximated with one or two etc. fictitious masses for example. The number of
fictitious mass does not necessarily need to match the number of phonon branches.
# Arguments
- `i::Integer, j::Integer`: enumerate the current fictitious masses under focus (also the index of the element in the coupling matrix C)
Expand All @@ -191,7 +202,8 @@ end
"""
C(v, w, β)
Generalisation of the C function from Eqn. (62e) in Hellwarth et al. 1999. This is the expected value of the trial action <S_0> taken w.r.t trial action.
Generalisation of the C function from Eqn. (62e) in Hellwarth et al. 1999. This is the
expected value of the trial action <S_0> taken w.r.t trial action.
Required for calculating the polaron free energy.
Expand Down Expand Up @@ -294,4 +306,5 @@ function trial_energy(v, w, β...; dims = 3)
Ar = A(v, w, β...) * dims / 3
Cr = C(v, w, β...) * dims / 3
return Ar, Cr
end
end

0 comments on commit 45f1007

Please sign in to comment.