| |
- jcpds
- jcpds_reflection
class jcpds |
|
|
|
Methods defined here:
- __init__(self)
- bm3_inverse(self, v0_v)
- Returns the value of the third order Birch-Murnaghan equation minus
pressure. It is used to solve for V0/V for a given
P, K0 and K0'.
Inputs:
v0_v: The ratio of the zero pressure volume to the high pressure
volume
Outputs:
This function returns the value of the third order Birch-Murnaghan
equation minus pressure.
Procedure:
This procedure simply computes the pressure using V0/V, K0 and K0',
and then subtracts the input pressure.
Example:
Compute the difference of the calculated pressure and 100 GPa for
V0/V=1.3 for alumina
jcpds = obj_new('JCPDS')
jcpds->read_file, 'alumina.jcpds'
common bm3_common mod_pressure, k0, k0p
mod_pressure=100
k0 = 100
k0p = 4.
diff = jcpds_bm3_inverse(1.3)
- compute_d(self, pressure=0.0, temperature=0.0)
- Computes the D spacings of the material.
It can compute D spacings at different pressures and temperatures.
Keywords:
pressure:
The pressure in GPa. If not present then the pressure is
assumed to be 0.
temperature:
The temperature in K. If not present or zero, then the
temperature is assumed to be 298K, i.e. room temperature.
Outputs:
None. The D spacing information in the JCPDS object is calculated.
Procedure:
This procedure first calls jcpds.compute_volue().
It then assumes that each lattice dimension fractionally changes by
the cube root of the fractional change in the volume.
Using the equations for the each symmetry class it then computes the
change in D spacing of each reflection.
Example:
Compute the D spacings of alumina at 100 GPa and 2500 K.
j=jcpds()
j.read_file('alumina.jcpds')
j.compute_d(100, 2500)
refl = j.get_reflections()
for r in refl:
# Print out the D spacings at ambient conditions
print, r.d0
# Print out the D spacings at high pressure and temperature
print, r.d
- compute_v0(self)
- Computes the unit cell volume of the material at zero pressure and
temperature from the unit cell parameters.
Procedure:
This procedure computes the unit cell volume from the unit cell
parameters.
Example:
Compute the zero pressure and temperature unit cell volume of alumina
j = jcpds()
j.read_file('alumina.jcpds')
j.compute_v0()
- compute_volume(self, pressure=0.0, temperature=0.0)
- Computes the unit cell volume of the material.
It can compute volumes at different pressures and temperatures.
Keywords:
pressure:
The pressure in GPa. If not present then the pressure is
assumed to be 0.
temperature:
The temperature in K. If not present or zero, then the
temperature is assumed to be 298K, i.e. room temperature.
Procedure:
This procedure computes the unit cell volume. It starts with the
volume read from the JCPDS file or computed from the zero-pressure,
room temperature lattice constants. It does the following:
1) Corrects K0 for temperature if DK0DT is non-zero.
2) Computes volume at zero-pressure and the specified temperature
if ALPHAT0 is non-zero.
3) Computes the volume at the specified pressure if K0 is non-zero.
The routine uses the IDL function FX_ROOT to solve the third
order Birch-Murnaghan equation of state.
Example:
Compute the unit cell volume of alumina at 100 GPa and 2500 K.
j = jcpds()
j.read_file('alumina.jcpds')
j.compute_volume(100, 2500)
- get_reflections(self)
- Returns the information for each reflection for the material.
This information is an array of elements of class jcpds_reflection
- read_file(self, file)
- Reads a JCPDS file into the JCPDS object.
Inputs:
file: The name of the file to read.
Procedure:
This procedure read the JCPDS file. There are several versions of the
formats used for JCPDS files. Versions 1, 2 and 3 used a fixed
format, where a particular entry had to be in a specific location on
a specific line. Versions 2 and 3 were used only by Dan Shim.
This routine can read these old files, but no new files should be
created in this format, they should be converted to Version 4.
Version 4 is a "keyword" driven format. Each line in the file is of
the form:
KEYWORD: value
The order of the lines is not important, except that the first line of
the file must be "VERSION: 4".
The following keywords are currently supported:
COMMENT: Any information describing the material, literature
references, etc. There can be multiple comment lines
per file.
K0: The bulk modulus in GPa.
K0P: The change in K0 with pressure, for Birch-Murnaghan
equation of state. Dimensionless.
DK0DT: The temperature derivative of K0, GPa/K.
DK0PDT: The temperature derivative of K0P, 1/K.
SYMMETRY: One of CUBIC, TETRAGONAL, HEXAGONAL, RHOMBOHEDRAL,
ORTHORHOMBIC, MONOCLINIC or TRICLINIC
A: The unit cell dimension A
B: The unit cell dimension B
C: The unit cell dimension C
ALPHA: The unit cell angle ALPHA
BETA: The unit cell angle BETA
GAMMA: The unit cell angle GAMMA
VOLUME: The unit cell volume
ALPHAT: The thermal expansion coefficient, 1/K
DALPHADT: The temperature derivative of the thermal expansion
coefficient, 1/K^2
DIHKL: For each reflection, the D spacing in Angstrom, the
relative intensity (0-100), and the H, K, L indices.
This procedure calculates the D spacing of each relfection, using the
symmetry and unit cell parameters from the file. It compares the
calculated D spacing with the input D spacing for each line. If they
disagree by more than 0.1% then a warning message is printed.
The following is an example JCPDS file in the Version 4 format:
VERSION: 4
COMMENT: Alumina (JCPDS 0-173, EOS n/a)
K0: 194.000
K0P: 5.000
SYMMETRY: HEXAGONAL
A: 4.758
C: 12.99
VOLUME: 22.0640
ALPHAT: 2.000e-6
DIHKL: 3.4790 75.0 0 1 2
DIHKL: 2.5520 90.0 1 0 4
DIHKL: 2.3790 40.0 1 1 0
DIHKL: 2.0850 100.0 1 1 3
DIHKL: 1.7400 45.0 0 2 4
DIHKL: 1.6010 80.0 1 1 6
DIHKL: 1.4040 30.0 2 1 4
DIHKL: 1.3740 50.0 3 0 0
DIHKL: 1.2390 16.0 1 0 10
Note that B and ALPHA, BETA and GAMMA are not present, since they are
not needed for a hexagonal material, and will be simple ignorred if
they are present.
- write_file(self, file)
- Writes a JCPDS object to a file.
Inputs:
file: The name of the file to written.
Procedure:
This procedure writes a JCPDS file. It always writes files in the
current, keyword-driven format (Version 4). See the documentation for
read_file() for information on the file format.
Example:
This reads an old format file, writes a new format file.
j = jcpds.jcpds()
j.read_file('alumina_old.jcpds')
j.write_file('alumina_new.jcpds')
Data and non-method functions defined here:
- __doc__ = None
- __module__ = 'jcpds'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
|
class jcpds_reflection |
|
Class that defines a reflection.
Attributes:
d0: Zero-pressure lattice spacing
d: Lattice spacing at P and T
inten: Relative intensity to most intense reflection for this material
h: H index for this reflection
k: K index for this reflection
l: L index for this reflection |
|
Methods defined here:
- __init__(self)
Data and non-method functions defined here:
- __doc__ = '\n Class that defines a reflection.\n Attribut...on\n l: L index for this reflection\n\n '
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
- __module__ = 'jcpds'
- str(object) -> string
Return a nice string representation of the object.
If the argument is a string, the return value is the same object.
| |