Skip to content

Latest commit

 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. What is the Common_Tangent program ?
  2. Why is Common_Tangent useful ?
  3. Files needed for running Common_Tangent
  4. How to run Common_Tangent
  5. Test
  6. How to cite
  7. Contributing

What is the Common_Tangent program ?

  • Common_Tangent is a program for computational chemistry and physics.

  • Extracts all the frequencies within all the k points in the supercell for a given volume.

  • Calculates the Helmholtz free energy.

Why is Common_Tangent useful ?

  • This program is useful becasue it outputs the pressure-temperature phase diagram for the thermodynamic phase stability of both solid phases:

  • The underlying criteria for producing this phase boundary is by evaluating common tangent between two Hemholtz free energy curves and

Statement of the problem

Please have a look at the pdf in this repository, where you can dind a detailed explanation.

In the code, Eqn (6) and Eqn (7) in the pdf are solved in python, as E1 and E2 respectively:

def BM(x, a, b, c, d):
         return  a + b*x + c*x**2 + d*x**3

def devBM(x, b, c, d):
         return  b + 2*c*x + 3*d*x**2

from scipy.optimize import fsolve
def equations(p):
    x1, x2 = p
    E1 = devBM(x1, popt_C_I[1], popt_C_I[2], popt_C_I[3]) - devBM(x2, popt_14[1], popt_14[2], popt_14[3])
    E2 = ((BM(x1, popt_C_I[0], popt_C_I[1], popt_C_I[2], popt_C_I[3]) - BM(x2, popt_14[0], popt_14[1], popt_14[2], popt_14[3])) / (x1 - x2)) - devBM(x1, popt_C_I[1], popt_C_I[2], popt_C_I[3])
    return (E1, E2)

x1, x2 =  fsolve(equations, (50, 60))
print 'x1 = ', x1
print 'x2 = ', x2

and the following solution is found for the case of zero Kelvin:

x1 =  61.445411835
x2 =  59.9942936344

Now, the slope of the common tangent can be obtained going to Eqn 1:

slope_common_tangent = devBM(x1, popt_C_I[1], popt_C_I[2], popt_C_I[3])
print 'slope_common_tangent = ', slope_common_tangent
slope_common_tangent_GPa = abs(slope_common_tangent * 4.3597482E+3)
print ' slope_common_tangent_GPa = ', slope_common_tangent_GPa

Which yields:

slope_common_tangent = -0.000438955769096

slope_common_tangent_GPa = 1.91373662419

We know that the common tangent passes through the x1 point, and we know its slope. Thus, we can use Eq. (8) in the pdf:

y - y1 = m * (x -x1) # Eqn. 8 in the pdf 

to sort out the common tangent equation (where m is the slope).

Since:

y1 = f(x1)
m = f'(x1) =  slope_common_tangent

then the common tangent equation is:

def comm_tangent(x, x1, slope_common_tangent):
   return BM(x1, popt_C_I[0], popt_C_I[1], popt_C_I[2], popt_C_I[3]) - slope_common_tangent * x1 + slope_common_tangent * x
x = var('x')
print comm_tangent(x, x1, slope_common_tangent)

Common tangent equation: -0.000438955769095521 x - 941.227540709767

Files needed for running Common_Tangent

  • Say you want to compute the pressure-temperature phase diagram of two solid phases I and II. common_tangent requires the frequency calculation outputs at each volume, for each of the two phases. These frequencies calculations can be either in the Gamma point or at finite k points.

  • The name of all these frequency outputs have to end as *.out

How to run Common_Tangent

  • Get the code: git clone https://github.com/DavidCdeB/common_tangent
  • Create the Files_Outputs folder inside the Common_Tangent folder that has just been cloned: cd ./Common_Tangent && mkdir Files_Outputs
  • Create the folders that will contain the constant-volume frequency outputs for each phase: mkdir Calcite_I && mkdir Calcite II
  • Copy all the frequencies outputs for each volume, for each phase, to the folders Calcite_I and Calcite_II. For example, Calcite_I folder will contain the frequency output for each j-th volume for the Calcite I phase.
  • Remember that name of all these frequency outputs have to end as *.out
  • The file system at this point looks like the following:

  • Run ./boundary_1_node.sh

  • commonTangentF_allTemperatures.m and commonTangent.m contain the same algorithm in Mathematica.

Test

Under the TEST folder, you will find all the programs needed, together with a Files_Outputs folder with the frequency outputs of two phases: calcite I and calcite II. If you run the program, you will obtain the main.pdf with all the plots needed.

How to cite

Please cite the following reference when using this code:

D. Carrasco-Busturia, "The temperature - pressure phase diagram of the calcite I - calcite II phase transition: A first-principles investigation", Journal of Physics and Chemistry of Solids, vol. 154, p. 110 045, 2021. DOI: https://doi.org/10.1016/j.jpcs.2021.110045.

Here the bibtex:

@article{CARRASCOBUSTURIA2021110045,                                                                        
title = {The temperature - pressure phase diagram of the calcite {I} - calcite {II} phase transition: A first-principles investigation},
journal = {Journal of Physics and Chemistry of Solids},
volume = {154},
pages = {110045},
year = {2021},
issn = {0022-3697},
doi = {https://doi.org/10.1016/j.jpcs.2021.110045},
url = {https://www.sciencedirect.com/science/article/pii/S0022369721001116},
author = {David Carrasco-Busturia}
}

Contributing

Common_Tangent is free software released under the Gnu Public Licence version 3. All contributions to improve this code are more than welcome.

  • Have a look at GitHub's "How to contribute".

  • If you are familiar with git: fork this repository and submit a pull request.

  • If you are not familiar with git:

    • If something should be improved, open an issue here on GitHub
    • If you think a new feature would be interesting, open an issue
    • If you need a particular feature for your project contact me directly.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages