The cij calculator cij.core.calculator
module
- class cij.core.calculator.Calculator(config_fname)
Bases:
object
The main entrance for QHA calculator
- Parameters
config_fname (
str
) – the location of the configuration file
- property dims: Tuple[int, int]
The dimension of the temperature-volume \((T, V)\) grid
- property modulus_keys
Elastic coefficient keys
- property pressure_base: CijPressureBaseInterface
- property volume_base: CijVolumeBaseInterface
- write_output()
- class cij.core.calculator.CijPressureBaseInterface(calculator)
Bases:
object
Elastic and accoustic properties calculated at the temperature-pressure \((T, P)\) grid.
- property bulk_modulus_reuss: ndarray
Reuss average of bulk modulus \(K_\text{R}(T, P)\) as a function of temperature and pressure.
\[K_\text{R} = [(s_{11}+s_{22}+s_{33})+2(s_{12}+s_{23}+s_{31})]^{-1}\]
- property bulk_modulus_voigt: ndarray
Voigt average of bulk modulus \(K_\text{V}(T, P)\) as a function of temperature and pressure.
\[K_\text{V} = [(c_{11}+c_{22}+c_{33}) + 2(c_{12}+c_{23}+c_{31})]/9\]
- property bulk_modulus_voigt_reuss_hill: ndarray
Voigt-Reuss-Hill average of bulk modulus \(K_\text{VRH}(T, P)\) as a function of temperature and pressure.
\[K_\text{VRH} = (K_\text{V} + K_\text{R}) / 2\]
- property mass: float
The mass per cell \(m\) in kilogram.
- property modulus_adiabatic: CijPressureBaseModulusInterface
Adiabatic elastic modulus \(c^S_{ij}(T, P)\) as a function of temperature and pressure.
- property modulus_isothermal: CijPressureBaseModulusInterface
Isothermal elastic modulus \(c^T_{ij}(T, P)\) as a function of temperature and pressure.
- property p_array: ndarray
The array of pressure points \(P\) of the pressure-temperature \((T, P)\) grid
- property primary_velocities: ndarray
Primary accoustic wave velocity \(v_\text{p}(T, P)\) as a function of temperature and pressure.
\[v_\text{p} = \sqrt{\frac{K_\text{VRH} + 4/3 \, G_\text{VRH} }{\rho}}\]
- property secondary_velocities: ndarray
Secondary accoustic wave velocity \(v_\text{s}(T, P)\) as a function of temperature and pressure.
\[v_\text{s} = \sqrt{\frac{G_\text{VRH}}{\rho}}\]
- property shear_modulus_reuss: ndarray
Reuss average of shear modulus \(G_\text{R}(T, P)\) as a function of temperature and pressure.
\[G_\text{R} = 15 / [ 4 (s_{11} + s_{22} + s_{33}) - 4 (s_{12} + s_{23} + s_{31}) + 3 (s_{44} + s_{55} + s_{66}) ] \]
- property shear_modulus_voigt: ndarray
Voigt average of shear modulus \(G_\text{V}(T, P)\) as a function of temperature and pressure.
\[G_\text{V} = [ (c_{11} + c_{22} + c_{33}) - (c_{12} + c_{23} + c_{31}) + 3 (c_{44} + c_{55} + c_{66}) ] / 15\]
- property shear_modulus_voigt_reuss_hill: ndarray
Voigt-Reuss-Hill average of shear modulus \(G_\text{VRH}(T, P)\) as a function of temperature and pressure.
\[G_\text{VRH} = (G_\text{V} + G_\text{R}) / 2\]
- property t_array: ndarray
The array of temperature points \(T\) of the pressure-temperature \((T, P)\) grid
- v2p(func_of_t_v)
The conversion function from \((T, V)\) to \((T, P)\) grid
\[f(T, V) \rightarrow f(T, P)\]- Parameters
func_of_t_v (
ndarray
) – the input function \(f(T, V)\) under the \((T, V)\) grid- Return type
ndarray
- Returns
the output function \(f(T, P)\) under the \((T, P)\) grid
- property volumes: ndarray
- write_table(fname, value)
Write variable as functions of temperature and volume in QHA output format, intended to be called by
ResultsWriter
only.- Return type
None
- write_variables(variables)
Write variables to files
- Parameters
variables (
Iterable
[Union
[str
,dict
]]) – List of varables to be written to file, see output file description for a detailed description
- class cij.core.calculator.CijVolumeBaseInterface(calculator)
Bases:
object
Elastic and accoustic properties calculated at the volume-temperature \((T, V)\) grid.
- property bulk_modulus_reuss: ndarray
Reuss average of bulk modulus \(K_\text{R}(T, V)\) as a function of temperature and volume.
\[K_\text{R} = [(s_{11}+s_{22}+s_{33})+2(s_{12}+s_{23}+s_{31})]^{-1}\]
- property bulk_modulus_voigt: ndarray
Voigt average of bulk modulus \(K_\text{V}(T, V)\) as a function of temperature and volume.
\[K_\text{V} = [(c_{11}+c_{22}+c_{33}) + 2(c_{12}+c_{23}+c_{31})]/9\]
- property bulk_modulus_voigt_reuss_hill: ndarray
Voigt-Reuss-Hill average of bulk modulus \(K_\text{VRH}(T, V)\) as a function of temperature and volume.
\[K_\text{VRH} = (K_\text{V} + K_\text{R}) / 2\]
- property mass: float
The mass per cell \(m\) in kilogram.
- property modulus_adiabatic: dict
- property modulus_isothermal: dict
- property pressures: ndarray
- property primary_velocities: ndarray
Primary accoustic wave velocity \(v_\text{p}(T, V)\) as a function of temperature and volume.
\[v_\text{p} = \sqrt{\frac{K_\text{VRH} + 4/3 \, G_\text{VRH} }{\rho}}\]
- property secondary_velocities: ndarray
Secondary accoustic wave velocity \(v_\text{s}(T, V)\) as a function of temperature and volume.
\[v_\text{s} = \sqrt{\frac{G_\text{VRH}}{\rho}}\]
- property shear_modulus_reuss: ndarray
Reuss average of shear modulus \(K_\text{R}(T, V)\) as a function of temperature and volume.
\[G_\text{R} = 15 / [ 4 (s_{11} + s_{22} + s_{33}) - 4 (s_{12} + s_{23} + s_{31}) + 3 (s_{44} + s_{55} + s_{66}) ]\]
- property shear_modulus_voigt: ndarray
Voigt average of shear modulus \(G_\text{V}(T, V)\) as a function of temperature and volume.
\[G_\text{V} = [ (c_{11} + c_{22} + c_{33}) - (c_{12} + c_{23} + c_{31}) + 3 (c_{44} + c_{55} + c_{66}) ] / 15\]
- property shear_modulus_voigt_reuss_hill: ndarray
Voigt-Reuss-Hill average of shear modulus \(G_\text{VRH}(T, V)\) as a function of temperature and volume.
\[G_\text{VRH} = (G_\text{V} + G_\text{R}) / 2\]
- property t_array: ndarray
The array of temperature points \(T\) of the temperature-volume \((T, V)\) grid
- property v_array: ndarray
The array of volume points \(V\) of the temperature-volume \((T, V)\) grid
- write_table(fname, value)
Write variable as functions of temperature and volume in QHA output format, intended to be called by
ResultsWriter
only.- Return type
None
- write_variables(variables)
Write variables to files
- Parameters
variables (
Iterable
[Union
[str
,dict
]]) – List of varables to be written to file, see output file description for a detailed description