Skip to content

Commit

Permalink
Clarify dt heuristics
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros committed Jan 1, 2024
1 parent 21ab357 commit 6ffaac6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions examples/03_LLD_CoRh2O4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ sys = resize_supercell(sys, (10, 10, 10))

# Use the stochastic Landau-Lifshitz dynamics to thermalize system into
# equilibrium at finite temperature via the [`Langevin`](@ref) dynamics. The
# timestep ``Δt`` controls integration accuracy. It should be inversely
# proportional to the largest effective field in the system. For CoRh₂O₄, this
# is the antiferromagnetic exchange ``J`` times the spin magnitude. The
# dimensionless parameter ``λ`` determines the magnitude of Langevin noise and
# damping terms. A reasonable choice is `λ = 0.2`. The temperature `kT` is
# linked to the magnitude of the Langevin noise term via a
# timestep ``Δt`` controls integration accuracy. In `:dipole` mode, it should be
# inversely proportional to the largest effective field in the system. For
# CoRh₂O₄, this is the antiferromagnetic exchange ``J`` times the spin magnitude
# ``S=3/2``. The dimensionless parameter ``λ`` determines the magnitude of
# Langevin noise and damping terms. A reasonable choice is `λ = 0.2`. The
# temperature `kT` is linked to the magnitude of the Langevin noise term via a
# fluctuation-dissipation theorem.

Δt = 0.05/abs(J*S) # Integration timestep
Expand Down
20 changes: 10 additions & 10 deletions examples/04_GSD_FeI2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ sys
# configurations from the thermal equlibrium.
#
# The [`Langevin`](@ref) integrator requires several parameters. The timestep
# ``Δt`` controls integration accuracy. It should be inversely proportional to
# the largest effective field in the system. For FeI₂, this is the easy-axis
# anisotropy ``D`` times the spin magnitude ``S = 1``. The dimensionless
# parameter ``λ`` determines the magnitude of Langevin noise and damping terms.
# A reasonable choice is `λ = 0.2`. The temperature `kT` is linked to the
# magnitude of the noise via a fluctuation-dissipation theorem.

Δt = 0.05/abs(D*1) # Integration timestep
λ = 0.2 # Dimensionless damping time-scale
kT = 0.2 # Temperature in meV
# ``Δt`` controls integration accuracy. In `:SUN` mode, it should be inversely
# proportional to the largest energy scale in the system. For FeI₂, this is the
# easy-axis anisotropy ``D`` times the spin magnitude squared, ``S^2 = 1``. The
# dimensionless parameter ``λ`` determines the magnitude of Langevin noise and
# damping terms. A reasonable choice is `λ = 0.2`. The temperature `kT` is
# linked to the magnitude of the noise via a fluctuation-dissipation theorem.

Δt = 0.05/abs(D) # Integration timestep
λ = 0.2 # Dimensionless damping time-scale
kT = 0.2 # Temperature in meV
langevin = Langevin(Δt; kT, λ);

# Langevin dynamics can be used to search for a magnetically ordered state. For
Expand Down

0 comments on commit 6ffaac6

Please sign in to comment.