Solution LAB1 diamond bulk modulus

From Wiki Max
Revision as of 14:10, 16 December 2020 by Andrea Ferretti (talk | contribs) (→‎Bulk modulus of diamond)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Bulk modulus of diamond

Using the data produced in the previous exercise (total energy as a function of the lattice parameter for a range of ecutwfc values), one can do the following:

  • extract etot vs volume for each wfcutfc value into different files;
  • fit the data and extract the second derivative in the minimum;
  • this can be done using a second (or better higher) order polynomial or other fitting functions (cubic splines, Murnaghan equation of state, ...)
  • Evaluate the bulk modulus taking care of unit conversion to international system (B modulus is given in GPa)
  • The above steps are coded in the script ./LabQSM/tools/ for convenience

Results as a function of the kinetic energy cutoff are reported below:

  1. ecut [Ry] B modulus [GPa]
  20         4222.035362534261
  30          545.8276696265291
  40          577.6525328096515
  50          678.313290451693
  60          526.4841165649044
  80          463.3508978235948
 100          471.6781060558174
 120          468.6260793219729
 140          467.798081344509
 160          467.04233495671605

Once again, a cutoff of 60-80 Ry (80 better) seems to be sufficient.

A script to automate the calculation can be put together as follows:

 list=`ls results_*_vol.dat`
 echo "#  ecut [Ry]     B modulus [GPa]" > $fileout
 for file in $list
    ecut=`echo $file | cut -d "_" -f2 | sed 's/Ry//'`
    bmod=`./ $file | tail -1 | awk '{print $(NF-1)}'`
    echo $ecut $bmod >> $fileout