Materials Algorithms Project
Program Library
- Provenance of code.
- Purpose of code.
- Specification.
- Description of subroutine's operation.
- References.
- Parameter descriptions.
- Error indicators.
- Accuracy estimate.
- Any additional information.
- Example of code
- Auxiliary subroutines required.
- Keywords.
- Download source code.
- Links.
H.K.D.H. Bhadeshia,
Phase Transformations Group,
Department of Materials Science and Metallurgy,
University of Cambridge,
Cambridge, U.K.
Top |
Next
Calculates the metric tensor for a triclinic crystal.
Top |
Next |
Prev
Language: | FORTRAN
|
Product form: | Source code |
SUBROUTINE MAP_CRYSTAL_MET6(G, AP, BP, CP, ALPH, BETA, GAMM, PI, IFAIL)
REAL G(9), AP, BP, CP, ALPH, BETA, GAMM, PI
INTEGER IFAIL, I
Top |
Next |
Prev
MAP_CRYSTAL_MET6 calculates the metric tensor for a triclinic crystal structure.
- The elements of the tensor are stored in the array G:-
- G(1) holds the value of AP2
- G(2) holds the value of G(4) = AP*BP*COS(2*pi*gamma/360)
- G(3) holds the value of G(7) = AP*CP*COS(2*pi*beta/360)
- G(5) holds the value of BP2
- G(6) holds the value of G(8) = BP*CP*COS(2*pi*alpha/360)
- G(9) holds the value of CP2
Top |
Next |
Prev
- Microstructural Characterisation of High Temperature Materials,
ed. E. Metcalfe, Institute of Metals, London, 1988, (page 33, Table 3).
Top |
Next |
Prev
Input parameters
- AP, BP, CP - reals
- AP, BP and CP are the lattice parameters for the triclinic
crystal.
- ALPH, BETA, GAMM - reals
- ALPH, BETA, GAMM are the angles alpha, beta, gamma. These angles must lie
within the range 0 to 180 degrees.
- PI - real
- PI is pi.
Output parameters
- G - real array of dimension 9
- G contains the metric tensor.
- IFAIL - integer
- IFAIL is set to 1, if any of the angles ALPH, BETA, GAMM fall outside the
permitted range 0 to 180 degrees.
Top |
Next |
Prev
IFAIL is set to 1 if the input value of any of the angles alpha, beta or gamma
falls outside the permitted range of 0 to 180 degrees.
Top |
Next |
Prev
No information supplied.
Top |
Next |
Prev
None.
Top |
Next |
Prev
1. Program text
REAL G(9), AP, BP, CP, ALPH, BETA, GAMM, PI
INTEGER I, IFAIL
INCLUDE 'map_constants_pi.f'
READ (5,*) AP, BP, CP, ALPH, BETA, GAMM
CALL MAP_CRYSTAL_MET6(G, AP, BP, CP, ALPH, BETA, GAMM, PI, IFAIL)
WRITE (6,*) (G(I), I=1,9)
IF (IFAIL.EQ.0) GOTO 20
WRITE(6,40)
40 FORMAT('Invalid value for angle. Must be in range 0 - 180')
20 CONTINUE
STOP
END
2. Program data
1.0 1.5 2.0 30.0 45.0 60.0
3. Program results
1.0 1.29904 1.84776 1.29904 2.25 2.89778 1.84776 2.89778 4.0
Top |
Next |
Prev
None.
Top |
Next |
Prev
triclinic, metric tensor
Top |
Next |
Prev
Download source code
Top |
Prev