[MAP Logo]

Materials Algorithms Project
Program Library



Module MAP_Util_Global_Data F90

  1. Provenance of code.
  2. Purpose of code.
  3. Specification.
  4. Description of subroutine's operation.
  5. References.
  6. Parameter descriptions.
  7. Error indicators.
  8. Accuracy estimate.
  9. Any additional information.
  10. Example of code
  11. Auxiliary subroutines required.
  12. Keywords.
  13. Download source code.
  14. Links.

Provenance of Source Code

H.K.D.H. Bhadeshia,
Phase Transformations Group,
Department of Materials Science and Metallurgy,
University of Cambridge,
Cambridge, U.K.

Conversion to Fortran 90 by S. Cardie
Address as above.

Top | Next

Purpose

This module contains parameter declarations and two public procedures which are used extensively by MAP software.

Top | Next | Prev

Specification

Language:FORTRAN 90
Product form:Source code.


MODULE MAP_Util_Global_Data

SAVE
  INTEGER,PARAMETER :: real_8_30 = SELECTED_REAL_KIND(P=8,R=30)
  REAL(KIND=real_8_30),PARAMETER :: &
           HH   =6.6260755E-34, R =8.31451E+00, &
           BOLTZ=1.380658E-23, AV =6.0221367E+23, &
           T0   =273.15D+00
  REAL(KIND=real_8_30),PARAMETER :: PI=3.141592654D+00

CONTAINS
  FUNCTION H_T(T)
    IMPLICIT NONE
    REAL(KIND=real_8_30),INTENT(IN) :: T
    REAL(KIND=real_8_30)            :: H_T
  END FUNCTION H_T
 
  FUNCTION S_T(T)
    IMPLICIT NONE
    REAL(KIND=real_8_30),INTENT(IN) :: T
    REAL(KIND=real_8_30)            :: S_T
  END FUNCTION S_T

  FUNCTION AJ(T,W)
    IMPLICIT NONE
    REAL(KIND=real_8_30),INTENT(IN) :: T,W
    REAL(KIND=real_8_30) :: AJ
  END FUNCTION AJ

END MODULE MAP_Util_Global_Data

Top | Next | Prev

Description

The integer parameter real_8_30 sets the default KIND type for real variables and constant used in MAP programs and procedures.

The six real parameters represent various fundamental constants as follows:

There are three PUBLIC procedures:

  1. H_T calculates excess partial molar enthalpy of solution of carbon in austenite (J/mol), as a function of absolute temperature.
  2. S_T calculates excess partial molar enthalpy of solution of carbon in ferrite (J/mol), as a function of absolute temperature.
  3. AJ calculates 1-e(W/RT), where R is the gas constant.

Top | Next | Prev

References

None supplied.

Top | Next | Prev

Parameters

Input parameters

  1. H_T, S_T

    T - real
    Absolute temperature
  2. AJ

    T - real
    Absolute temperature
    W - real
    Carbon-carbon interaction energy in austenite or ferrite (J/mol).

Output parameters

  1. H_T

    H_T - real
    Excess partial molar enthalpy of solution of carbon in austenite (J/mol), as a function of absolute temperature.
  2. S_T

    S_T - real
    Excess partial molar enthalpy of solution of carbon in ferrite (J/mol), as a function of absolute temperature.
  3. AJ

    AJ - real
    Value of 1-exp(W/RT).

Top | Next | Prev

Error Indicators

None.

Top | Next | Prev

Accuracy

No information supplied.

Top | Next | Prev

Further Comments

Used by all MAP Fortan 90 software.

Top | Next | Prev

Example

1. Program text

PROGRAM MAP_Util_Global_Data_Test
  USE MAP_Util_Global_Data
  IMPLICIT NONE
  REAL(KIND=real_8_30) :: AJ1, AJ2, T1, T2, H1, H2, S1, S2
  REAL(KIND=real_8_30),PARAMETER :: W = 48570.0E+00
    write(6,1000)
    read(5,*) T1, T2

    H1 = H_T(T1)
    H2 = H_T(T2)

    S1 = S_T(T1)
    S2 = S_T(T2)

    AJ1 = AJ(T1,W)
    AJ2 = AJ(T2,W)

    write(6,1001) T1
    write(6,1002) H1, S1, AJ1
    write(6,*)
    write(6,1001) T2
    write(6,1002) H2, S2, AJ2

  STOP
1000 FORMAT('Temperatures in kelvin: ')
1001 FORMAT('At temperature ', F7.2, ' kelvin: ')
1002 FORMAT('Excess partial molar free enthalpies of solution of carbon in &
    & austenite and ferrite are ',F12.3, ' and ', F12.3, ' respectively and &
    & 1-exp(W/RT) is ',&
    & F12.3)
END PROGRAM MAP_Util_Global_Data_Test

2. Program data

Temperatures in kelvin: 
800  
1200

3. Program results

At temperature  800.00 kelvin: 
Excess partial molar free enthalpies of solution of carbon in austenite and ferrite 
are   111918.000 and       51.440 respectively and 1-exp(W/RT) is        0.999

At temperature 1200.00 kelvin: 
Excess partial molar free enthalpies of solution of carbon in austenite and ferrite 
are   105525.000 and       45.345 respectively and 1-exp(W/RT) is        0.992

Top | Next | Prev

Auxiliary Routines

None.

Top | Next | Prev

Keywords

global, data, KIND type, utilities

Top | Next | Prev

Download

Download source code

Top | Prev


MAP originated from a joint project of the National Physical Laboratory and the University of Cambridge.

MAP Website administration / map@msm.cam.ac.uk

Top | Index | MAP Homepage Valid HTML 3.2!