Differences
This shows you the differences between two versions of the page.
| documentation:tutorials:nio_crystal_field:temperature [2016/10/08 19:12] – created Maurits W. Haverkort | documentation:tutorials:nio_crystal_field:temperature [2025/11/20 03:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{indexmenu_n> | ||
| + | ====== Temperature ====== | ||
| + | ### | ||
| + | The effect of temperature can be added by calculating excited states and expectation values of excited states. The temperature dependent expectation value is then created using Boltzmann statistics. | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | A small example: | ||
| + | <code Quanty Temperature.Quanty> | ||
| + | -- Sofar we calculated eigenstates and expectation values (or spectra) of these | ||
| + | -- eigenstates. At 0 K one would measure the expectation value of the lowest eigenstate | ||
| + | -- at finite temperature one would measure an average over several states weighted by | ||
| + | -- Boltzmann statistics. In this example we calculate the temperature dependent | ||
| + | -- x-ray absorption spectra of NiO. (Ni L23 edge 2p to 3d) | ||
| + | |||
| + | -- we set the verbosity to 0 in order to minimize the output | ||
| + | Verbosity(0) | ||
| + | |||
| + | -- the beginning of this file is the same as example 21 where x-ray absorption is calculated | ||
| + | |||
| + | -- In order to do crystal-field theory for NiO we need to define a Ni d-shell. | ||
| + | -- A d-shell has 10 elements and we label again the even spin-orbitals to be spin down | ||
| + | -- and the odd spin-orbitals to be spin up. In order to calculate 2p to 3d excitations we | ||
| + | -- also need a Ni 2p shell. We thus have a total of 10+6=16 fermions, 6 Ni-2p and 10 Ni-3d | ||
| + | -- spin-orbitals | ||
| + | NF=16 | ||
| + | NB=0 | ||
| + | IndexDn_2p={0, | ||
| + | IndexUp_2p={1, | ||
| + | IndexDn_3d={6, | ||
| + | IndexUp_3d={7, | ||
| + | |||
| + | -- just like in the previous example we define several operators acting on the Ni -3d shell | ||
| + | |||
| + | OppSx | ||
| + | OppSy | ||
| + | OppSz | ||
| + | OppSsqr =NewOperator(" | ||
| + | OppSplus=NewOperator(" | ||
| + | OppSmin =NewOperator(" | ||
| + | |||
| + | OppLx | ||
| + | OppLy | ||
| + | OppLz | ||
| + | OppLsqr =NewOperator(" | ||
| + | OppLplus=NewOperator(" | ||
| + | OppLmin =NewOperator(" | ||
| + | |||
| + | OppJx | ||
| + | OppJy | ||
| + | OppJz | ||
| + | OppJsqr =NewOperator(" | ||
| + | OppJplus=NewOperator(" | ||
| + | OppJmin =NewOperator(" | ||
| + | |||
| + | Oppldots=NewOperator(" | ||
| + | |||
| + | -- as in the previous example we define the Coulomb interaction | ||
| + | |||
| + | OppF0 =NewOperator(" | ||
| + | OppF2 =NewOperator(" | ||
| + | OppF4 =NewOperator(" | ||
| + | |||
| + | -- as in the previous example we define the crystal-field operator | ||
| + | |||
| + | Akm = PotentialExpandedOnClm(" | ||
| + | OpptenDq = NewOperator(" | ||
| + | |||
| + | -- and as in the previous example we define operators that count the number of eg and t2g | ||
| + | -- electrons | ||
| + | |||
| + | Akm = PotentialExpandedOnClm(" | ||
| + | OppNeg = NewOperator(" | ||
| + | Akm = PotentialExpandedOnClm(" | ||
| + | OppNt2g = NewOperator(" | ||
| + | |||
| + | -- new for core level spectroscopy are operators that define the interaction acting on the | ||
| + | -- Ni-2p shell. There is actually only one of these interactions, | ||
| + | -- spin-orbit interaction | ||
| + | |||
| + | Oppcldots= NewOperator(" | ||
| + | |||
| + | -- we also need to define the Coulomb interaction between the Ni 2p- and Ni 3d-shell | ||
| + | -- Again the interaction (e^2/ | ||
| + | -- between two shells we need to consider two cases. For the direct interaction a 2p electron | ||
| + | -- scatters of a 3d electron into a 2p and 3d electron. The radial integrals involve | ||
| + | -- the square of a 2p radial wave function at coordinate 1 and the square of a 3d radial | ||
| + | -- wave function at coordinate 2. The transfer of angular momentum can either be 0 or 2. | ||
| + | -- These processes are called direct and the resulting Slater integrals are F[0] and F[2]. | ||
| + | -- The second proces involves a 2p electron scattering of a 3d electron into the 3d shell | ||
| + | -- and at the same time the 3d electron scattering into a 2p shell. These exchange processes | ||
| + | -- involve radial integrals over the product of a 2p and 3d radial wave function. The transfer | ||
| + | -- of angular momentum in this case can be 1 or 3 and the Slater integrals are called G1 and G3. | ||
| + | |||
| + | -- In Quanty you can enter these processes by labeling 4 indices for the orbitals, once | ||
| + | -- the 2p shell with spin up, 2p shell with spin down, 3d shell with spin up and 3d shell with | ||
| + | -- spin down. Followed by the direct Slater integrals (F0 and F2) and the exchange Slater | ||
| + | -- integrals (G1 and G3) | ||
| + | |||
| + | -- Here we define the operators separately and later sum them with appropriate prefactors | ||
| + | |||
| + | OppUpdF0 = NewOperator(" | ||
| + | OppUpdF2 = NewOperator(" | ||
| + | OppUpdG1 = NewOperator(" | ||
| + | OppUpdG3 = NewOperator(" | ||
| + | |||
| + | -- next we define the dipole operator. The dipole operator is given as epsilon.r | ||
| + | -- with epsilon the polarization vector of the light and r the unit position vector | ||
| + | -- We can expand the position vector on (renormalized) spherical harmonics and use | ||
| + | -- the crystal-field operator to create the dipole operator. | ||
| + | |||
| + | -- x polarized light is defined as x = Cos[phi]Sin[theta] = sqrt(1/2) ( C_1^{(-1)} - C_1^{(1)}) | ||
| + | Akm = {{1, | ||
| + | TXASx = NewOperator(" | ||
| + | -- x polarized light is defined as y = Sin[phi]Sin[theta] = sqrt(1/2) I ( C_1^{(-1)} + C_1^{(1)}) | ||
| + | Akm = {{1, | ||
| + | TXASy = NewOperator(" | ||
| + | -- z polarized light is defined as z = Cos[theta] = C_1^{(0)} | ||
| + | Akm = {{1,0,1}} | ||
| + | TXASz = NewOperator(" | ||
| + | |||
| + | -- besides linear polarized light one can define circular polarized light as the sum of | ||
| + | -- x and y polarizations with complex prefactors | ||
| + | TXASr = sqrt(1/ | ||
| + | TXASl =-sqrt(1/ | ||
| + | |||
| + | -- once all operators are defined we can set some parameter values. | ||
| + | |||
| + | -- the value of U drops out of a crystal-field calculation as the total number of electrons | ||
| + | -- is always the same | ||
| + | U | ||
| + | -- F2 and F4 are often referred to in the literature as J_{Hund}. They represent the energy | ||
| + | -- differences between different multiplets. Numerical values can be found in the back of | ||
| + | -- my PhD. thesis for example. http:// | ||
| + | F2dd = 11.142 | ||
| + | F4dd = 6.874 | ||
| + | -- F0 is not the same as U, although they are related. Unimportant in crystal-field theory | ||
| + | -- the difference between U and F0 is so important that I do include it here. (U=0 so F0 is not) | ||
| + | F0dd = U+(F2dd+F4dd)*2/ | ||
| + | -- in crystal field theory U drops out of the equation, also true for the interaction between the | ||
| + | -- Ni 2p and Ni 3d electrons | ||
| + | Upd | ||
| + | -- The Slater integrals between the 2p and 3d shell, again the numerical values can be found | ||
| + | -- in the back of my PhD. thesis. (http:// | ||
| + | F2pd = 6.667 | ||
| + | G1pd = 4.922 | ||
| + | G3pd = 2.796 | ||
| + | -- F0 is not the same as U, although they are related. Unimportant in crystal-field theory | ||
| + | -- the difference between U and F0 is so important that I do include it here. (U=0 so F0 is not) | ||
| + | F0pd = Upd + G1pd*1/15 + G3pd*3/70 | ||
| + | -- tenDq in NiO is 1.1 eV as can be seen in optics or using IXS to measure d-d excitations | ||
| + | tenDq | ||
| + | -- the Ni 3d spin-orbit is small but finite | ||
| + | zeta_3d = 0.081 | ||
| + | -- the Ni 2p spin-orbit is very large and should not be scaled as theory is quite accurate here | ||
| + | zeta_2p = 11.498 | ||
| + | -- we can add a small magnetic field, just to get nice expectation values. (units in eV... ) | ||
| + | |||
| + | -- we define a magnetic field in units of tesla EnergyUnits.Tesla.value is a constant | ||
| + | -- expressing Tesla in units of eV | ||
| + | B = 10*EnergyUnits.Tesla.value | ||
| + | |||
| + | -- once all parameters are set we can define the Hamiltonian for both the ground-state | ||
| + | -- and the excited state as a sum of operators multiplied with the numerical interaction strength | ||
| + | Hamiltonian = F0dd*OppF0 + F2dd*OppF2 + F4dd*OppF4 + tenDq*OpptenDq + zeta_3d*Oppldots + B*(2*OppSz + OppLz) | ||
| + | XASHamiltonian = Hamiltonian + zeta_2p * Oppcldots + F2pd * OppUpdF2 + G1pd * OppUpdG1 + G3pd * OppUpdG3 | ||
| + | |||
| + | -- we set restrictions to have 6 electrons in the p-shell and 8 electrons in the d-shell | ||
| + | StartRestrictions = {NF, NB, {" | ||
| + | -- and we calculate all 45 eigenstates | ||
| + | Npsi=45 | ||
| + | psiList = Eigensystem(Hamiltonian, | ||
| + | |||
| + | -- Boltzmann statistics contains the exponent of the eigen energy. In order to prevent | ||
| + | -- number overflow we set later the ground-state energy to zero. Here we calculate | ||
| + | -- the ground state energy | ||
| + | Egrd = psiList[1] * Hamiltonian * psiList[1] | ||
| + | |||
| + | -- In order to get some information on these eigenstates it is good to plot expectation values | ||
| + | -- We first define a list of all the operators we would like to calculate the expectation value of | ||
| + | oppList={Hamiltonian, | ||
| + | |||
| + | -- next we loop over all operators and all states and print the expectation value | ||
| + | print(" | ||
| + | for i = 1,#psiList do | ||
| + | for j = 1,#oppList do | ||
| + | expectationvalue = Chop(psiList[i]*oppList[j]*psiList[i]) | ||
| + | io.write(string.format(" | ||
| + | end | ||
| + | io.write(" | ||
| + | end | ||
| + | |||
| + | -- now we can calculate temperature averaged expectation values | ||
| + | -- The temperature we will take here is 10 Kelvin (again we enter it in units of eV) | ||
| + | T = 10 * EnergyUnits.Kelvin.value | ||
| + | |||
| + | -- we will calculate the partition function Z | ||
| + | Z=0 | ||
| + | -- the total magnetic moment M | ||
| + | M=0 | ||
| + | -- the total spin moment MS | ||
| + | MS=0 | ||
| + | -- the total angular moment ML | ||
| + | ML=0 | ||
| + | -- and temperature averaged spectra for z, r and l polarized light. | ||
| + | Spectra_z=0 | ||
| + | Spectra_r=0 | ||
| + | Spectra_l=0 | ||
| + | -- the temperature averaged spectra are calculated as sums over the different states | ||
| + | -- weighted by the Boltzmann occupation. In order to make these sums we set them first to | ||
| + | -- zero (done above) | ||
| + | |||
| + | -- and now we can make the sums | ||
| + | for j=1, 3 do | ||
| + | Z = Z + exp(-(psiList[j] * Hamiltonian * psiList[j] - Egrd)/T) | ||
| + | M = M + psiList[j] * (2 * OppSz + OppLz) * psiList[j] * exp(-(psiList[j] * Hamiltonian * psiList[j] - Egrd)/T) | ||
| + | MS = MS + psiList[j] * (OppSz) | ||
| + | ML = ML + psiList[j] * (OppLz) | ||
| + | Spectra_z = Spectra_z + CreateSpectra(XASHamiltonian, | ||
| + | Spectra_r = Spectra_r + CreateSpectra(XASHamiltonian, | ||
| + | Spectra_l = Spectra_l + CreateSpectra(XASHamiltonian, | ||
| + | end | ||
| + | -- In order to normalize we should device by the partition function Z | ||
| + | M = M / Z | ||
| + | MS = MS / Z | ||
| + | ML = ML / Z | ||
| + | Spectra_z = Spectra_z/Z | ||
| + | Spectra_r = Spectra_r/Z | ||
| + | Spectra_l = Spectra_l/Z | ||
| + | |||
| + | -- and we can print the results to the screen | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | print(" | ||
| + | |||
| + | -- we can calculate the isotropic spectra and the magnetic circular dichroism | ||
| + | Spectra_iso | ||
| + | Spectra_XMCD = (Spectra_r - Spectra_l) | ||
| + | |||
| + | -- and print them to file | ||
| + | Spectra_iso.Print({{" | ||
| + | Spectra_XMCD.Print({{" | ||
| + | |||
| + | -- from here on you can use your favorite program to plot these spectra | ||
| + | -- I include a gnuplot script to make these plots | ||
| + | |||
| + | -- a gnuplot script to make the plots | ||
| + | gnuplotInput = [[ | ||
| + | set autoscale | ||
| + | set xtic auto | ||
| + | set ytic auto | ||
| + | set style line 1 lt 1 lw 1 lc rgb "# | ||
| + | set style line 2 lt 1 lw 1 lc rgb "# | ||
| + | |||
| + | set xlabel "E (eV)" font " | ||
| + | set ylabel " | ||
| + | |||
| + | set out ' | ||
| + | set size 1.0, 1.0 | ||
| + | set terminal postscript portrait enhanced color " | ||
| + | |||
| + | plot " | ||
| + | " | ||
| + | |||
| + | ]] | ||
| + | |||
| + | -- write the gnuplot script to a file | ||
| + | file = io.open(" | ||
| + | file: | ||
| + | file: | ||
| + | |||
| + | -- call gnuplot to execute the script | ||
| + | os.execute(" | ||
| + | -- change the postscript file to pdf or eps | ||
| + | os.execute(" | ||
| + | </ | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | The output is: | ||
| + | <file Quanty_Output Temperature.out> | ||
| + | < | ||
| + | -2.722 | ||
| + | -2.721 | ||
| + | -2.720 | ||
| + | -1.655 | ||
| + | -1.655 | ||
| + | -1.637 | ||
| + | -1.637 | ||
| + | -1.636 | ||
| + | -1.587 | ||
| + | -1.587 | ||
| + | -1.586 | ||
| + | -1.567 | ||
| + | -0.956 | ||
| + | -0.890 | ||
| + | -0.890 | ||
| + | -0.890 | ||
| + | -0.809 | ||
| + | -0.809 | ||
| + | -0.782 | ||
| + | -0.782 | ||
| + | -0.782 | ||
| + | -0.490 | ||
| + | -0.490 | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | For a magnetic field of 10 Tesla | ||
| + | At temperature 10 Kelvin the magnetic moment is -1.7185713390306 | ||
| + | The spin contribution is -0.74960257265827 | ||
| + | The angular contribution is -0.21936619371406 | ||
| + | </ | ||
| + | ### | ||
| + | |||
| + | |||
| + | ===== Table of contents ===== | ||
| + | {{indexmenu> | ||