Giter VIP home page Giter VIP logo

gencoef's Introduction

README

Introduction

This is a python script to generate the coefficients($A_2$ and $A_3$ in the following fomular) for calculating the Third-Order Elastic Constants(TOECs) using first principles calculations by strain-energy method or strain-stress method.

Strain-energy method

$\Delta E/V_0 = A_2\eta^2 + A_3\eta^3$

Here, $\Delta E $ is the energy difference between the deformed structure and undeformed structure

$V_0​$ is the volume of undeformed structure

$\eta​$ is the Lagrangeian strain

Strain-stress method

$t = A_2\eta + A_3\eta^2$

Download from GitHub

Usage

Import the script

import numpy as np
import symmetry

Generate all the strain modes and corresponding coefficients for specific crystal type

CrystalType = 'c1'
Ord = 3

(StrainModeCoef, StrainMode) = symmetry.gen_strain_mode(CrystalType, Ord)
#StrainMode is the strain modes, in 3 by 3 matrix
print(StrainMode)
#The StrainModeCoef is a new defined class in the script
#StrainModeCoef.coef3 is the coefficients for TOECs
#StrainModeCoef.coef2 is the coefficients for SOECs
#If the Ord=2, then there is only *.coef2
print(StrainModeCoef.coef3)
print(StrainModeCoef.coef2)

Generate the coefficients for specific strain mode

CrystalType = 'c1'
Ord = 3
Strain = np.array([[1, 0, 0, 2, 2, 0]])

(Cijk, StrainModeCoef, StrainMode) = symmetry.CoefForSingleMode(CrystalType, Ord, Strain)
#The Cijk is the independent TOECs
#Cijk.coef2 and Cijk.coef3
print(StrainMode)

For more usage, please ref. test_symmetry.py and test_optimizesm.py

Reference

If you use this scripts, please ref the following reference

[1] Mingqing Liao, Yong Liu, Fei Zhou, Tianyi Han, et al. Selection of strain and fitting schemes for calculating higher-order elastic constants, submitted to Physical Review Letters

[2] Mingqing Liao, Yong Liu, Fei Zhou, Tianyi Han, et al. Comparison between methods for third-order elastic constants from first-principles, submitted to Physical Review B

In addition, when coding this script, the following reference are ref-ed.

The independent SOECs and TOECs are taken from:

[3] BRUGGER K. Pure Modes for Elastic Waves in Crystals. Journal of Applied Physics, 1965,36(3):759-768.

The method for calculating the TOECs is taken from:

[4] ZHAO J, WINEY J M, GUPTA Y M. First-principles calculations of second- and third-order elastic constants for single crystals of arbitrary symmetry. PHYSICAL REVIEW B, 2007,75(0941059):94105.

This code now has been a part of Elastic3rd, Please ref:

[5] Mingqing Liao, Yong Liu, Shun-Li Shang, Fei Zhou, et al., Elastic3rd: A tool for calculating third-order elastic constants from first-principles calculations, submitted to Computer Physics Communication

Author information

Mingqing Liao

E-mail: [email protected]

FGMS group @ Harbin Institute of Technology(HIT)

gencoef's People

Contributors

hitliaomq avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.