5.10. MATERIAL, Local Material Data

Contains all data for each defined material. The material data is stored in the structure

      TYPE (MAT), DIMENSION (:), POINTER             :: MATERIALS, MATERIALS_TMP
      TYPE (MAT), POINTER                            :: MTL, MTL_TMP

The array MATERIALS is allocated when a new model is loaded into the application.

The data for each material is stored in a type MAT contained in MODULE material. This contains the following data:

TYPE MAT
        ! **************************************************************
        ! DESCRIBES A SET OF EQUATIONS/FLAGS FOR ONE MATERIAL
        !   NAME            - MATERIAL NAME
        !   REFERENCE       - A REFERENCE FOR THE MATERIAL
        !   NOTES           - ADDITIONAL NOTES ON THE MATERIAL
        !   TYP             - TYPE CLASSIFICATION OF MATERIAL (ISOTROPIC, ORTH, GAS ETC)
        !   RHOREF          - SOLID REFERENCE DENSITY FOR MATERIAL
        !   STIFFMAT        - THE MATERIAL STIFFNESS MATRIX (ISOTROPIC MATERIALS ONLY)
        !   FLAGS           - LIST OF POSSIBLE FLAGS (MATERIAL MODELLIGN OPTIONS) ASSOCIATED 
        !                     WITH A MATERIAL
        !   MAIN            - PROPERTIES FOR MAIN MODELING OPTIONS, USED TO ASSIST IN UI 
        !                     GENERATION
        !   IFSOLVER        - FLAG TO INDICATE WHICH SOLVERS A MATERIAL CAN BE USED WITH
        !                     THIS IS GENERATED AS A SUPERSET OF ALL THE SELECTED MATERIAL 
        !                     MODELING OPTION FLAGS
        ! **************************************************************

        CHARACTER(LEN=30)         :: NAME
        CHARACTER(LEN=256)        :: REFERENCE, NOTES
        INTEGER(INT4)             :: TYP
        REAL(REAL8)               :: RHOREF
        REAL(REAL8), DIMENSION(3) :: STIFFMAT
        TYPE(PARAMLIST), DIMENSION(NUMFLAGS) :: FLAGS
        TYPE(MAINFLAG), DIMENSION(NFLAGS_MAIN) :: MAIN
        INTEGER (INT4), DIMENSION(LIMSOL)               :: IFSOLVER
END TYPE MAT

Within each material definition, the array FLAGS contains data for all material modeling options available, NUMFLAGS. The index of all material modeling options (flags) is specified in matdef. Each option (flag) has a module associated with it which defines/provides

  • input parameters

  • variables

  • checks

  • equation solution

for that option. For example, IMF_EOS_LINEAR is the flag (index in the FLAGS array) for a linear equation of state. The input parameters , variables, checks and equation solution for the linear equation of state are contained within the module mdeos_linear.

The data for each flag is stored in TYPE PARAMLIST:

TYPE PARAMLIST
        ! TYPE DEFINITION FOR A LIST OF PARAMETERS
        ! NAME - NAME ASSOCIETD WITH LIST
        ! IACTIVE - INDICTES IF LIST (FLAG) IS ACTIVE
        ! VISIBLE - INDICATES IF LIST IS VISIBLE IN UI
        ! IFSOLVER - INDICATES SOLVER TYPES FOR WHICH FLAG IS AVAILABLE
        ! EQTYPE - FLAG INDEX
        ! NPAR - NUMBER OF REAL PARAMETERS IN LIST
        ! NUMOPT - NUMBER OF OPTIONS IN LIST
        ! NDEPFLG - NUMBER OF DEPENDANT FLAGS THAT ARE ALWAYS USED WITH THIS FLAG (CHILDREN)
        ! IPOS - ARRAY INDICATING POSITION OF REAL PARAMETERS TO BE DISPLAYED IN UI
        ! DEPFLG - LIST OF DEPENDANT (CHILD) OPTIONS (FLAGS)
        ! PAR - REAL PARAMETER DEFINITIONS
        ! OPTION - OPTION LIST(S) DEFINITIONS

        CHARACTER (LEN=30)                         :: NAME
        INTEGER (INT4)                             :: IACTIVE
        INTEGER (INT4)                             :: VISIBLE
        INTEGER (INT4), DIMENSION(LIMSOL)          :: IFSOLVER
        INTEGER (INT4)                             :: EQTYPE  !(FLAG)
        INTEGER (INT4)                             :: NPAR, NUMOPT, NDEPFLG
        INTEGER (INT4), DIMENSION(:), POINTER      :: IPOS
        INTEGER (INT4), DIMENSION(:), POINTER      :: DEPFLG
        TYPE (PRMT), DIMENSION(:), POINTER         :: PAR
        TYPE (OPTION_LIST), DIMENSION(:), POINTER  :: OPTION
 END TYPE PARAMLIST

Within a PARAMLIST, the real parameters and options are defined through the types given below:

TYPE PRMT
        ! TYPE DEFINITION FOR A SINGLE MATERIAL INPUT PARAMETER
        ! NAME - NAME OF PARAMETER AS DISPLAYED IN UI
        ! D_L - POWER OF LENGTH UNIT
        ! D_T - POWER OF TIME UNIT
        ! D_M - POWER OF MASS UNIT
        ! D_H - POWER OF TEMEPRATURE UNIT
        ! VAL - CURRENT VALUE
        ! MIN - MINIMUM ALLOWABLE VALUE
        ! MAX - MAXIMUM ALLOWABLE VALUE
        ! DEFAULT - DEFAULT VALUE
        ! VISIBLE - VISIBILITY OF PARAMETER SWITCH
        ! REQUIRED - REQUIRED PARAMETER SWITCH

        CHARACTER (LEN=50)   :: NAME
        INTEGER (INT4)       :: D_L
        INTEGER (INT4)       :: D_T
        INTEGER (INT4)       :: D_M
        INTEGER (INT4)       :: D_H
        REAL (REAL8)         :: VAL
        REAL (REAL8)         :: MIN
        REAL (REAL8)         :: MAX
        REAL (REAL8)         :: DEFAULT
        INTEGER (INT4)       :: VISIBLE
        INTEGER (INT4)       :: REQUIRED
END TYPE PRMT

 TYPE OPTION
        ! TYPE DEFINITION FOR A SINGLE MATERIAL INPUT OPTION
        !   NAME - OPTIONS NAME
        !   AUTH - AUTHORIZATION CODE
        !   REF  - NAME  OF THE REFERENCE FILE ABOUT THIS OPTION
        !   ID   - INTEGER ID (USED FOR DIFFERENT PURPOSES, FOR EXAMPLE,
        !          IT CAN BE THE ID NUMBER FOR A DEPENDANT (CHILD) FLAG
        CHARACTER(LEN=80) :: NAME
        CHARACTER(LEN=10) :: AUTH
        CHARACTER(LEN=10) :: REF
        INTEGER(INT4) :: ID
END TYPE OPTION

TYPE OPTION_LIST
        ! TYPE DEFINITION FOR AN OPTION LIST
        ! NAME - OPTION LIST NAME
        ! NUMOPT - NUMBER OF OPTIONS IN THE LIST
        ! OPTS - DETAILS OF EACH OPTION
        ! DEFAULT - DEFAULT OPTION IN THE LIST
        ! SELETCED - CURRENT SELECTED OPTION
        ! IPOS - POSITION OF OPTION LIST WITHIN PARAMLIST
        ! REQUIRED - INDICATES WHETHER AN OPTION MUST BE SPECIFIED OR NOT
        CHARACTER (LEN=30)                         :: NAME
        INTEGER (INT4)                             :: NUMOPT
        TYPE (OPTION), DIMENSION(:), POINTER       :: OPTS
        INTEGER (INT4)                             :: DEFAULT, SELECTED
        INTEGER (INT4)                             :: IPOS, VISIBLE, REQUIRED
END TYPE

Local pointers used extensively throughout the code to create temporary shortcuts to the material data. The most common are

MTL => MATERIALS(MATNO)
POINTER TO CURRENT MATERIAL
EQ => MTL%FLAGS(IMF_****) 
POINTER TO PARAMETER LIST (FLAG) *** OF MATERIAL MATNO

Both these pointers are referenced in module material.

Subroutine GETMAT sets up the pointer MTL to the current material MATNO. The name of a material would subsequently be available as MTL%NAME.