Commit2 JT 111919

- renaming validation directory
This commit is contained in:
julient31
2019-11-19 12:54:30 -07:00
parent b109fd1687
commit a0c51b40b9
14 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#!/usr/bin/env python3
#Program fitting the exchange interaction
#Model curve: Bethe-Slater function
import numpy as np, pylab, tkinter
import matplotlib.pyplot as plt
import mpmath as mp
# from scipy.optimize import curve_fit
# from decimal import *
mub=5.78901e-5 # Bohr magneton (eV/T)
kb=8.617333262145e-5 # Boltzman constant (eV/K)
g=2.0 # Lande factor (adim)
Hz=10.0 # mag. field (T)
#Definition of the Langevin function
def func(t):
return mp.coth(g*mub*Hz/(kb*t))-1.0/(g*mub*Hz/(kb*t))
npoints=200
ti=0.01
tf=20.0
for i in range (0,npoints):
temp=ti+i*(tf-ti)/npoints
print('%lf %lf %lf' % (temp,func(temp),-g*mub*Hz*func(temp)))