Equation of State (EOS) Analysis¶
Provided pressure/energy and volume data, MechElastic can perform EOS analysis using the following models:
Vinet
Birch
Murnaghan
Birch-Murnaghan
Please find examples for EOS analysis in the examples/EOS/
directory.
plot_eos()¶
INPUT:
Text file with two columns containing volume (eostype='energy'
) or volume and pressure (GPa) (eostype='pressure'
), respectively, should be passed into the MechElastic package.
With this, an initial second order parabolic polyfit is performed to obtain the initial fitting parameters, natoms
. If the output units are to be in atomic units, set au=True
.
In addition to the fitting, MechElastic also performs a regression analysis for fitting using the Mean-Squared Error (MSE) of the residuals. This allows users to decide the best EOS model to use for their dataset.
Usage:
To set a initial and final value to the volume range use the flag vlim=[v_initial, v_final]
. If not set, the minimum and maximum values of the provided dataset would be used.
If model
is not set it will plot all the models on the same plot along with the raw data points. If raw_data=False
the plot will omit the raw data points and will only plot the fitted model. The options for model are Vinet
, Birch
, Murnaghan
and Birch-Murnaghan
.
plot_enthalpy_curves()¶
This function plots Enthalpy vs. Pressure curves for multiple datasets of different phases and calculates the phase transition pressures. The pressure is calculated through a central difference scheme similar to plot_eos()
.
INPUT:
Multiple input files containing two columns of volume (
Usage:
The flags vlim
and au
work similar to the plot_eos()
section.
If the volume ranges are to be set individually to each phase, one can use the vlim_list
option. This is a list that contains elements of the minimum and maximum value of volume for each phase.
For instance, to define the volume ranges to each of the five phases here set, vlim_list = [ [180,260], [25,41], [50,75], [270,372], [110,160] ]
.
This outputs enthalpy curves and if phase transitions are detected, it will calculate the phase transition pressures and the possible transition paths.
Additionally, one may plot the Enthalpy differences with respect to a certain phase by setting deltaH_index=<phase index>
where <phase index> is the index of the phase in the infiles list starting from 0.
For example, in the above list of phases, to plot the Enthalpy with respect to Im-3m, one should set deltaH_index=2
.
If the data is required in a .json and .xml format, set export=True
in either of these two functions.