The cij calculator cij.core.modulus_worker module

class cij.core.modulus_worker.ElasticModulusWorker(calculator)

Bases: object

find_or_create_elastic_modulus_phonon_contribution(cls, e)
fit_modulus(moduli, order=2)

Interpolate static elastic constants \(c^\text{st}_{ij}(V)\) as a function of volume with polynomial least square fitting

Parameters
  • moduli (ndarray) – The static elastic moduli \(c^\text{st}_{ij}(V)\) to be fitted

  • order (int) – The order for least square fitting

Return type

ndarray

Returns

The interpolated modulus \(c^\text{st}_{ij}(V)\)

get_modulus_adiabatic(key)
get_modulus_isothermal(key)
get_phonon_modulus_adiabatic(key)
get_phonon_modulus_isothermal(key)
get_shear_phonon_modulus(key, flag)
get_static_modulus(key)

Get interpolated static elastic modulus \(c^\text{st}_{ij}(V)\) as a function of volume.

Parameters

key (ModulusRepresentation) – the subscript symbol for static modulus

property v_array: ndarray

The array of interpolated volume points \(V\).

property volumes: ndarray

The array of original volume points \(V\) from input.

class cij.core.modulus_worker.ShearPhononCalculator(key, e)

Bases: object

property fictitious_strain

The fictitious strain

property fictitious_strain_energy: ndarray

The strain energy for the fictitious strain under the original coordinate system except for the unknown

property fictitious_strain_energy_rotated: ndarray

The strain energy for the fictitious strain under the rotated coordinate system

property fictitious_strain_rotated

The fictitious strain in the rotated coordinate system

get_elastic_modulus(key)
Return type

ndarray

get_elastic_modulus_rotated(key)
Return type

ndarray

get_target_elastic_modulus()

The elastic modulus need to be calculated from the difference in fictitious strain energy of the rotated coordinate system and the known terms in the original coordinate.

Return type

ndarray

property transformation_matrix

The transformation matrix

cij.core.modulus_worker.calculate_fictitious_strain_energy(fictitious_strain, resolve_elastic_modulus, target=None)

Calculate the strain energy for under given coordinate system, ignore the unknown.

Parameters
  • fictitious_strain (ndarray) – the fictitious strain where strain energy is calculated

  • resolve_elastic_modulus (callable) – the function used to get elastic modulus

  • target (Optional[ModulusRepresentation]) – the key for the elastic modulus

Return type

ndarray