WIP: Simplifying
using maxval gives inherently correct values and a consistency check is not needed any more using config_phase capabilities to read in lattice related data
This commit is contained in:
parent
fd39c9a73c
commit
e7fd445816
468
src/lattice.f90
468
src/lattice.f90
|
@ -88,11 +88,11 @@ module lattice
|
|||
LATTICE_fcc_NcleavageSystem = int([3, 4, 0],pInt) !< # of cleavage systems per family for fcc
|
||||
|
||||
integer(pInt), parameter, private :: &
|
||||
LATTICE_fcc_Nslip = 12_pInt, & !sum(lattice_fcc_NslipSystem), & !< total # of slip systems for fcc
|
||||
LATTICE_fcc_Ntwin = 12_pInt, & !sum(lattice_fcc_NtwinSystem), & !< total # of twin systems for fcc
|
||||
LATTICE_fcc_Nslip = sum(lattice_fcc_NslipSystem), & !< total # of slip systems for fcc
|
||||
LATTICE_fcc_Ntwin = sum(lattice_fcc_NtwinSystem), & !< total # of twin systems for fcc
|
||||
LATTICE_fcc_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for fcc
|
||||
LATTICE_fcc_Ntrans = 12_pInt, & !sum(lattice_fcc_NtransSystem), & !< total # of transformation systems for fcc
|
||||
LATTICE_fcc_Ncleavage = 7_pInt !sum(lattice_fcc_NcleavageSystem) !< total # of cleavage systems for fcc
|
||||
LATTICE_fcc_Ntrans = sum(lattice_fcc_NtransSystem), & !< total # of transformation systems for fcc
|
||||
LATTICE_fcc_Ncleavage = sum(lattice_fcc_NcleavageSystem) !< total # of cleavage systems for fcc
|
||||
|
||||
real(pReal), dimension(3+3,LATTICE_fcc_Nslip), parameter, private :: &
|
||||
LATTICE_fcc_systemSlip = reshape(real([&
|
||||
|
@ -371,11 +371,11 @@ module lattice
|
|||
LATTICE_bcc_NcleavageSystem = int([3,6,0],pInt) !< # of cleavage systems per family for bcc
|
||||
|
||||
integer(pInt), parameter, private :: &
|
||||
LATTICE_bcc_Nslip = 24_pInt, & !sum(lattice_bcc_NslipSystem), & !< total # of slip systems for bcc
|
||||
LATTICE_bcc_Ntwin = 12_pInt, & !sum(lattice_bcc_NtwinSystem), & !< total # of twin systems for bcc
|
||||
LATTICE_bcc_Nslip = sum(lattice_bcc_NslipSystem), & !< total # of slip systems for bcc
|
||||
LATTICE_bcc_Ntwin = sum(lattice_bcc_NtwinSystem), & !< total # of twin systems for bcc
|
||||
LATTICE_bcc_NnonSchmid = 6_pInt, & !< total # of non-Schmid contributions for bcc (A. Koester, A. Ma, A. Hartmaier 2012)
|
||||
LATTICE_bcc_Ntrans = 0_pInt, & !sum(lattice_bcc_NtransSystem), & !< total # of transformation systems for bcc
|
||||
LATTICE_bcc_Ncleavage = 9_pInt !sum(lattice_bcc_NcleavageSystem) !< total # of cleavage systems for bcc
|
||||
LATTICE_bcc_Ntrans = sum(lattice_bcc_NtransSystem), & !< total # of transformation systems for bcc
|
||||
LATTICE_bcc_Ncleavage = sum(lattice_bcc_NcleavageSystem) !< total # of cleavage systems for bcc
|
||||
|
||||
real(pReal), dimension(3+3,LATTICE_bcc_Nslip), parameter, private :: &
|
||||
LATTICE_bcc_systemSlip = reshape(real([&
|
||||
|
@ -556,7 +556,7 @@ module lattice
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
! hexagonal
|
||||
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
|
||||
lattice_hex_NslipSystem = int([ 3, 3, 3, 6, 12, 6, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for hex
|
||||
lattice_hex_NslipSystem = int([ 3, 3, 3, 6, 12, 6, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for hex
|
||||
|
||||
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
|
||||
lattice_hex_NtwinSystem = int([ 6, 6, 6, 6],pInt) !< # of slip systems per family for hex
|
||||
|
@ -568,11 +568,11 @@ module lattice
|
|||
LATTICE_hex_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for hex
|
||||
|
||||
integer(pInt), parameter, private :: &
|
||||
LATTICE_hex_Nslip = 33_pInt, & !sum(lattice_hex_NslipSystem), & !< total # of slip systems for hex
|
||||
LATTICE_hex_Ntwin = 24_pInt, & !sum(lattice_hex_NtwinSystem), & !< total # of twin systems for hex
|
||||
LATTICE_hex_Nslip = sum(lattice_hex_NslipSystem), & !< total # of slip systems for hex
|
||||
LATTICE_hex_Ntwin = sum(lattice_hex_NtwinSystem), & !< total # of twin systems for hex
|
||||
LATTICE_hex_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for hex
|
||||
LATTICE_hex_Ntrans = 0_pInt, & !sum(lattice_hex_NtransSystem), & !< total # of transformation systems for hex
|
||||
LATTICE_hex_Ncleavage = 3_pInt !sum(lattice_hex_NcleavageSystem) !< total # of cleavage systems for hex
|
||||
LATTICE_hex_Ntrans = sum(lattice_hex_NtransSystem), & !< total # of transformation systems for hex
|
||||
LATTICE_hex_Ncleavage = sum(lattice_hex_NcleavageSystem) !< total # of cleavage systems for hex
|
||||
|
||||
real(pReal), dimension(4+4,LATTICE_hex_Nslip), parameter, private :: &
|
||||
LATTICE_hex_systemSlip = reshape(real([&
|
||||
|
@ -850,11 +850,11 @@ module lattice
|
|||
LATTICE_bct_NcleavageSystem = int([0,0,0],pInt) !< # of cleavage systems per family for bct
|
||||
|
||||
integer(pInt), parameter, private :: &
|
||||
LATTICE_bct_Nslip = 52_pInt, & !sum(lattice_bct_NslipSystem), & !< total # of slip systems for bct
|
||||
LATTICE_bct_Ntwin = 0_pInt, & !sum(lattice_bct_NtwinSystem), & !< total # of twin systems for bct
|
||||
LATTICE_bct_Nslip = sum(lattice_bct_NslipSystem), & !< total # of slip systems for bct
|
||||
LATTICE_bct_Ntwin = sum(lattice_bct_NtwinSystem), & !< total # of twin systems for bct
|
||||
LATTICE_bct_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for bct
|
||||
LATTICE_bct_Ntrans = 0_pInt, & !sum(lattice_bct_NtransSystem), & !< total # of transformation systems for bct
|
||||
LATTICE_bct_Ncleavage = 0_pInt !sum(lattice_bct_NcleavageSystem) !< total # of cleavage systems for bct
|
||||
LATTICE_bct_Ntrans = sum(lattice_bct_NtransSystem), & !< total # of transformation systems for bct
|
||||
LATTICE_bct_Ncleavage = sum(lattice_bct_NcleavageSystem) !< total # of cleavage systems for bct
|
||||
|
||||
real(pReal), dimension(3+3,LATTICE_bct_Nslip), parameter, private :: &
|
||||
LATTICE_bct_systemSlip = reshape(real([&
|
||||
|
@ -1039,11 +1039,11 @@ module lattice
|
|||
LATTICE_ortho_NcleavageSystem = int([1,1,1],pInt) !< # of cleavage systems per family for ortho
|
||||
|
||||
integer(pInt), parameter, private :: &
|
||||
LATTICE_ortho_Nslip = 0_pInt, & !sum(lattice_ortho_NslipSystem), & !< total # of slip systems for ortho
|
||||
LATTICE_ortho_Ntwin = 0_pInt, & !sum(lattice_ortho_NtwinSystem), & !< total # of twin systems for ortho
|
||||
LATTICE_ortho_Nslip = sum(lattice_ortho_NslipSystem), & !< total # of slip systems for ortho
|
||||
LATTICE_ortho_Ntwin = sum(lattice_ortho_NtwinSystem), & !< total # of twin systems for ortho
|
||||
LATTICE_ortho_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for ortho
|
||||
LATTICE_ortho_Ntrans = 0_pInt, & !sum(lattice_ortho_NtransSystem), & !< total # of transformation systems for ortho
|
||||
LATTICE_ortho_Ncleavage = 3_pInt !sum(lattice_ortho_NcleavageSystem) !< total # of cleavage systems for ortho
|
||||
LATTICE_ortho_Ntrans = sum(lattice_ortho_NtransSystem), & !< total # of transformation systems for ortho
|
||||
LATTICE_ortho_Ncleavage = sum(lattice_ortho_NcleavageSystem) !< total # of cleavage systems for ortho
|
||||
|
||||
real(pReal), dimension(3+3,LATTICE_ortho_Ncleavage), parameter, private :: &
|
||||
LATTICE_ortho_systemCleavage = reshape(real([&
|
||||
|
@ -1054,23 +1054,18 @@ module lattice
|
|||
],pReal),[ 3_pInt + 3_pInt,LATTICE_ortho_Ncleavage])
|
||||
|
||||
integer(pInt), parameter, public :: &
|
||||
LATTICE_maxNslip = 52_pInt, &
|
||||
!LATTICE_maxNslip = maxval([LATTICE_fcc_Nslip,LATTICE_bcc_Nslip,LATTICE_hex_Nslip,\
|
||||
! LATTICE_bct_Nslip,LATTICE_iso_Nslip,LATTICE_ortho_Nslip]), & !< max # of slip systems over lattice structures
|
||||
LATTICE_maxNtwin = 24_pInt, &
|
||||
!LATTICE_maxNtwin = maxval([LATTICE_fcc_Ntwin,LATTICE_bcc_Ntwin,LATTICE_hex_Ntwin,\
|
||||
! LATTICE_bct_Ntwin,LATTICE_iso_Ntwin,LATTICE_ortho_Ntwin]), & !< max # of twin systems over lattice structures
|
||||
LATTICE_maxNnonSchmid = 6_pInt, &
|
||||
!LATTICE_maxNtwin = maxval([LATTICE_fcc_NnonSchmid,LATTICE_bcc_NnonSchmid,\
|
||||
! LATTICE_hex_NnonSchmid,LATTICE_bct_NnonSchmid,\
|
||||
! LATTICE_iso_NnonSchmid,LATTICE_ortho_NnonSchmid]), & !< max # of non-Schmid contributions over lattice structures
|
||||
LATTICE_maxNtrans = 12_pInt, &
|
||||
!LATTICE_maxNtrans = maxval([LATTICE_fcc_Ntrans,LATTICE_bcc_Ntrans,LATTICE_hex_Ntrans,\
|
||||
! LATTICE_bct_Ntrans,LATTICE_iso_Ntrans,LATTICE_ortho_Ntrans]),&!< max # of transformation systems over lattice structures
|
||||
LATTICE_maxNcleavage = 9_pInt, &
|
||||
!LATTICE_maxNcleavage = maxval([LATTICE_fcc_Ncleavage,LATTICE_bcc_Ncleavage,\
|
||||
! LATTICE_hex_Ncleavage,LATTICE_bct_Ncleavage,\
|
||||
! LATTICE_iso_Ncleavage,LATTICE_ortho_Ncleavage]) !< max # of cleavage systems over lattice structures
|
||||
LATTICE_maxNslip = maxval([LATTICE_fcc_Nslip,LATTICE_bcc_Nslip,LATTICE_hex_Nslip, &
|
||||
LATTICE_bct_Nslip,LATTICE_iso_Nslip,LATTICE_ortho_Nslip]), & !< max # of slip systems over lattice structures
|
||||
LATTICE_maxNtwin = maxval([LATTICE_fcc_Ntwin,LATTICE_bcc_Ntwin,LATTICE_hex_Ntwin, &
|
||||
LATTICE_bct_Ntwin,LATTICE_iso_Ntwin,LATTICE_ortho_Ntwin]), & !< max # of twin systems over lattice structures
|
||||
LATTICE_maxNnonSchmid = maxval([LATTICE_fcc_NnonSchmid,LATTICE_bcc_NnonSchmid, &
|
||||
LATTICE_hex_NnonSchmid,LATTICE_bct_NnonSchmid, &
|
||||
LATTICE_iso_NnonSchmid,LATTICE_ortho_NnonSchmid]), & !< max # of non-Schmid contributions over lattice structures
|
||||
LATTICE_maxNtrans = maxval([LATTICE_fcc_Ntrans,LATTICE_bcc_Ntrans,LATTICE_hex_Ntrans, &
|
||||
LATTICE_bct_Ntrans,LATTICE_iso_Ntrans,LATTICE_ortho_Ntrans]), & !< max # of transformation systems over lattice structures
|
||||
LATTICE_maxNcleavage = maxval([LATTICE_fcc_Ncleavage,LATTICE_bcc_Ncleavage, &
|
||||
LATTICE_hex_Ncleavage,LATTICE_bct_Ncleavage, &
|
||||
LATTICE_iso_Ncleavage,LATTICE_ortho_Ncleavage]) , & !< max # of cleavage systems over lattice structures
|
||||
LATTICE_maxNinteraction = 182_pInt !< max # of interaction types (in hardening matrix part)
|
||||
|
||||
real(pReal), dimension(:,:,:), allocatable, public, protected :: &
|
||||
|
@ -1250,36 +1245,20 @@ subroutine lattice_init
|
|||
compiler_options
|
||||
#endif
|
||||
use IO, only: &
|
||||
IO_open_file,&
|
||||
IO_open_jobFile_stat, &
|
||||
IO_countSections, &
|
||||
IO_error, &
|
||||
IO_timeStamp, &
|
||||
IO_EOF, &
|
||||
IO_read, &
|
||||
IO_lc, &
|
||||
IO_getTag, &
|
||||
IO_isBlank, &
|
||||
IO_stringPos, &
|
||||
IO_stringValue, &
|
||||
IO_floatValue
|
||||
IO_timeStamp
|
||||
use config, only: &
|
||||
material_configfile, &
|
||||
material_localFileExt, &
|
||||
material_partPhase
|
||||
config_phase
|
||||
use debug, only: &
|
||||
debug_level, &
|
||||
debug_lattice, &
|
||||
debug_levelBasic
|
||||
|
||||
implicit none
|
||||
integer(pInt), parameter :: FILEUNIT = 200_pInt
|
||||
integer(pInt) :: Nphases
|
||||
character(len=65536) :: &
|
||||
tag = '', &
|
||||
line = ''
|
||||
integer(pInt), allocatable, dimension(:) :: chunkPos
|
||||
integer(pInt) :: section = 0_pInt,i
|
||||
tag = ''
|
||||
integer(pInt) :: section = 0_pInt,i,p
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
CoverA, & !!!!!!< c/a ratio for low symmetry type lattice
|
||||
CoverA_trans, & !< c/a ratio for transformed hex type lattice
|
||||
|
@ -1290,56 +1269,6 @@ subroutine lattice_init
|
|||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! consistency checks (required since ifort 15.0 does not support sum/maxval in parameter definition)
|
||||
|
||||
if (LATTICE_maxNslip /= maxval([LATTICE_fcc_Nslip,LATTICE_bcc_Nslip,LATTICE_hex_Nslip,LATTICE_bct_Nslip])) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_maxNslip')
|
||||
if (LATTICE_maxNtwin /= maxval([LATTICE_fcc_Ntwin,LATTICE_bcc_Ntwin,LATTICE_hex_Ntwin])) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_maxNtwin')
|
||||
if (LATTICE_maxNtrans /= maxval([LATTICE_fcc_Ntrans,LATTICE_bcc_Ntrans,LATTICE_hex_Ntrans])) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_maxNtrans')
|
||||
if (LATTICE_maxNnonSchmid /= maxval([lattice_fcc_NnonSchmid,lattice_bcc_NnonSchmid,&
|
||||
lattice_hex_NnonSchmid])) call IO_error(0_pInt,ext_msg = 'LATTICE_maxNnonSchmid')
|
||||
|
||||
if (LATTICE_fcc_Nslip /= sum(lattice_fcc_NslipSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_fcc_Nslip')
|
||||
if (LATTICE_bcc_Nslip /= sum(lattice_bcc_NslipSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bcc_Nslip')
|
||||
if (LATTICE_hex_Nslip /= sum(lattice_hex_NslipSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_hex_Nslip')
|
||||
if (LATTICE_bct_Nslip /= sum(lattice_bct_NslipSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bct_Nslip')
|
||||
|
||||
if (LATTICE_fcc_Ntwin /= sum(lattice_fcc_NtwinSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_fcc_Ntwin')
|
||||
if (LATTICE_bcc_Ntwin /= sum(lattice_bcc_NtwinSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bcc_Ntwin')
|
||||
if (LATTICE_hex_Ntwin /= sum(lattice_hex_NtwinSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_hex_Ntwin')
|
||||
if (LATTICE_bct_Ntwin /= sum(lattice_bct_NtwinSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bct_Ntwin')
|
||||
|
||||
if (LATTICE_fcc_Ntrans /= sum(lattice_fcc_NtransSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_fcc_Ntrans')
|
||||
if (LATTICE_bcc_Ntrans /= sum(lattice_bcc_NtransSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bcc_Ntrans')
|
||||
if (LATTICE_hex_Ntrans /= sum(lattice_hex_NtransSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_hex_Ntrans')
|
||||
if (LATTICE_bct_Ntrans /= sum(lattice_bct_NtransSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bct_Ntrans')
|
||||
|
||||
if (LATTICE_fcc_Ncleavage /= sum(lattice_fcc_NcleavageSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_fcc_Ncleavage')
|
||||
if (LATTICE_bcc_Ncleavage /= sum(lattice_bcc_NcleavageSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bcc_Ncleavage')
|
||||
if (LATTICE_hex_Ncleavage /= sum(lattice_hex_NcleavageSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_hex_Ncleavage')
|
||||
if (LATTICE_bct_Ncleavage /= sum(lattice_bct_NcleavageSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_bct_Ncleavage')
|
||||
if (LATTICE_iso_Ncleavage /= sum(lattice_iso_NcleavageSystem)) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_iso_Ncleavage')
|
||||
|
||||
if (LATTICE_maxNinteraction /= max(&
|
||||
maxval(lattice_fcc_interactionSlipSlip), &
|
||||
maxval(lattice_bcc_interactionSlipSlip), &
|
||||
|
@ -1362,18 +1291,7 @@ subroutine lattice_init
|
|||
! maxval(lattice_bct_interactionTwinTwin))) &
|
||||
call IO_error(0_pInt,ext_msg = 'LATTICE_maxNinteraction')
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! read from material configuration file
|
||||
if (.not. IO_open_jobFile_stat(FILEUNIT,material_localFileExt)) & ! no local material configuration present...
|
||||
call IO_open_file(FILEUNIT,material_configFile) ! ... open material.config file
|
||||
Nphases = IO_countSections(FILEUNIT,material_partPhase)
|
||||
|
||||
if(Nphases<1_pInt) &
|
||||
call IO_error(160_pInt,Nphases, ext_msg='No phases found')
|
||||
|
||||
if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then
|
||||
write(6,'(a16,1x,i5)') ' # phases:',Nphases
|
||||
endif
|
||||
Nphases = size(config_phase)
|
||||
|
||||
allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID)
|
||||
allocate(trans_lattice_structure(Nphases),source = LATTICE_undefined_ID)
|
||||
|
@ -1450,179 +1368,155 @@ subroutine lattice_init
|
|||
allocate(a_fcc(Nphases),source=0.0_pReal)
|
||||
allocate(a_bcc(Nphases),source=0.0_pReal)
|
||||
|
||||
rewind(fileUnit)
|
||||
line = '' ! to have it initialized
|
||||
section = 0_pInt ! - " -
|
||||
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= material_partPhase) ! wind forward to <Phase>
|
||||
line = IO_read(fileUnit)
|
||||
enddo
|
||||
|
||||
do while (trim(line) /= IO_EOF) ! read through sections of material part
|
||||
line = IO_read(fileUnit)
|
||||
if (IO_isBlank(line)) cycle ! skip empty lines
|
||||
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
||||
line = IO_read(fileUnit, .true.) ! reset IO_read
|
||||
exit
|
||||
endif
|
||||
if (IO_getTag(line,'[',']') /= '') then ! next section
|
||||
section = section + 1_pInt
|
||||
endif
|
||||
if (section > 0_pInt) then
|
||||
chunkPos = IO_stringPos(line)
|
||||
tag = IO_lc(IO_stringValue(line,chunkPos,1_pInt)) ! extract key
|
||||
select case(tag)
|
||||
case ('lattice_structure')
|
||||
select case(trim(IO_lc(IO_stringValue(line,chunkPos,2_pInt))))
|
||||
do section = 1, size(config_phase)
|
||||
p = section
|
||||
tag = config_phase(p)%getString('lattice_structure')
|
||||
select case(trim(tag))
|
||||
case('iso','isotropic')
|
||||
lattice_structure(section) = LATTICE_iso_ID
|
||||
lattice_structure(p) = LATTICE_iso_ID
|
||||
case('fcc')
|
||||
lattice_structure(section) = LATTICE_fcc_ID
|
||||
lattice_structure(p) = LATTICE_fcc_ID
|
||||
case('bcc')
|
||||
lattice_structure(section) = LATTICE_bcc_ID
|
||||
lattice_structure(p) = LATTICE_bcc_ID
|
||||
case('hex','hexagonal')
|
||||
lattice_structure(section) = LATTICE_hex_ID
|
||||
lattice_structure(p) = LATTICE_hex_ID
|
||||
case('bct')
|
||||
lattice_structure(section) = LATTICE_bct_ID
|
||||
lattice_structure(p) = LATTICE_bct_ID
|
||||
case('ort','orthorhombic')
|
||||
lattice_structure(section) = LATTICE_ort_ID
|
||||
case default
|
||||
call IO_error(130_pInt,ext_msg=trim(IO_lc(IO_stringValue(line,chunkPos,2_pInt))))
|
||||
end select
|
||||
case('trans_lattice_structure')
|
||||
select case(trim(IO_lc(IO_stringValue(line,chunkPos,2_pInt))))
|
||||
case('bcc')
|
||||
trans_lattice_structure(section) = LATTICE_bcc_ID
|
||||
case('hex','hexagonal','hcp')
|
||||
trans_lattice_structure(section) = LATTICE_hex_ID
|
||||
end select
|
||||
case ('c11')
|
||||
lattice_C66(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c12')
|
||||
lattice_C66(1,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c13')
|
||||
lattice_C66(1,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c22')
|
||||
lattice_C66(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c23')
|
||||
lattice_C66(2,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c33')
|
||||
lattice_C66(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c44')
|
||||
lattice_C66(4,4,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c55')
|
||||
lattice_C66(5,5,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c66')
|
||||
lattice_C66(6,6,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c11_trans')
|
||||
lattice_trans_C66(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c12_trans')
|
||||
lattice_trans_C66(1,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c13_trans')
|
||||
lattice_trans_C66(1,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c22_trans')
|
||||
lattice_trans_C66(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c23_trans')
|
||||
lattice_trans_C66(2,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c33_trans')
|
||||
lattice_trans_C66(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c44_trans')
|
||||
lattice_trans_C66(4,4,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c55_trans')
|
||||
lattice_trans_C66(5,5,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c66_trans')
|
||||
lattice_trans_C66(6,6,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('covera_ratio','c/a_ratio','c/a')
|
||||
CoverA(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('c/a_trans','c/a_martensite','c/a_mart')
|
||||
CoverA_trans(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('a_fcc')
|
||||
a_fcc(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('a_bcc')
|
||||
a_bcc(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('thermal_conductivity11')
|
||||
lattice_thermalConductivity33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('thermal_conductivity22')
|
||||
lattice_thermalConductivity33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('thermal_conductivity33')
|
||||
lattice_thermalConductivity33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('thermal_expansion11')
|
||||
do i = 2_pInt, min(4,chunkPos(1)) ! read up to three parameters (constant, linear, quadratic with T)
|
||||
lattice_thermalExpansion33(1,1,i-1_pInt,section) = IO_floatValue(line,chunkPos,i)
|
||||
enddo
|
||||
case ('thermal_expansion22')
|
||||
do i = 2_pInt, min(4,chunkPos(1)) ! read up to three parameters (constant, linear, quadratic with T)
|
||||
lattice_thermalExpansion33(2,2,i-1_pInt,section) = IO_floatValue(line,chunkPos,i)
|
||||
enddo
|
||||
case ('thermal_expansion33')
|
||||
do i = 2_pInt, min(4,chunkPos(1)) ! read up to three parameters (constant, linear, quadratic with T)
|
||||
lattice_thermalExpansion33(3,3,i-1_pInt,section) = IO_floatValue(line,chunkPos,i)
|
||||
enddo
|
||||
case ('specific_heat')
|
||||
lattice_specificHeat(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyformationenergy')
|
||||
lattice_vacancyFormationEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancysurfaceenergy')
|
||||
lattice_vacancySurfaceEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyvolume')
|
||||
lattice_vacancyVol(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenformationenergy')
|
||||
lattice_hydrogenFormationEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogensurfaceenergy')
|
||||
lattice_hydrogenSurfaceEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenvolume')
|
||||
lattice_hydrogenVol(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('mass_density')
|
||||
lattice_massDensity(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('reference_temperature')
|
||||
lattice_referenceTemperature(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('damage_diffusion11')
|
||||
lattice_DamageDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('damage_diffusion22')
|
||||
lattice_DamageDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('damage_diffusion33')
|
||||
lattice_DamageDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('damage_mobility')
|
||||
lattice_DamageMobility(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyflux_diffusion11')
|
||||
lattice_vacancyfluxDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyflux_diffusion22')
|
||||
lattice_vacancyfluxDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyflux_diffusion33')
|
||||
lattice_vacancyfluxDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyflux_mobility11')
|
||||
lattice_vacancyfluxMobility33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyflux_mobility22')
|
||||
lattice_vacancyfluxMobility33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancyflux_mobility33')
|
||||
lattice_vacancyfluxMobility33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('porosity_diffusion11')
|
||||
lattice_PorosityDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('porosity_diffusion22')
|
||||
lattice_PorosityDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('porosity_diffusion33')
|
||||
lattice_PorosityDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('porosity_mobility')
|
||||
lattice_PorosityMobility(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenflux_diffusion11')
|
||||
lattice_hydrogenfluxDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenflux_diffusion22')
|
||||
lattice_hydrogenfluxDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenflux_diffusion33')
|
||||
lattice_hydrogenfluxDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenflux_mobility11')
|
||||
lattice_hydrogenfluxMobility33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenflux_mobility22')
|
||||
lattice_hydrogenfluxMobility33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogenflux_mobility33')
|
||||
lattice_hydrogenfluxMobility33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('vacancy_eqcv')
|
||||
lattice_equilibriumVacancyConcentration(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
case ('hydrogen_eqch')
|
||||
lattice_equilibriumHydrogenConcentration(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
end select
|
||||
endif
|
||||
enddo
|
||||
lattice_structure(p) = LATTICE_ort_ID
|
||||
end select
|
||||
|
||||
! case('trans_lattice_structure')
|
||||
! select case(trim(IO_lc(IO_stringValue(line,chunkPos,2_pInt))))
|
||||
! case('bcc')
|
||||
! trans_lattice_structure(section) = LATTICE_bcc_ID
|
||||
! case('hex','hexagonal')
|
||||
! trans_lattice_structure(section) = LATTICE_hex_ID
|
||||
! end select
|
||||
|
||||
|
||||
lattice_C66(1,1,section) = config_phase(p)%getFloat('c11',defaultVal=0.0_pReal)
|
||||
lattice_C66(1,2,section) = config_phase(p)%getFloat('c12',defaultVal=0.0_pReal)
|
||||
lattice_C66(1,3,section) = config_phase(p)%getFloat('c13',defaultVal=0.0_pReal)
|
||||
lattice_C66(2,3,section) = config_phase(p)%getFloat('c23',defaultVal=0.0_pReal)
|
||||
lattice_C66(3,3,section) = config_phase(p)%getFloat('c33',defaultVal=0.0_pReal)
|
||||
lattice_C66(4,4,section) = config_phase(p)%getFloat('c44',defaultVal=0.0_pReal)
|
||||
lattice_C66(5,5,section) = config_phase(p)%getFloat('c55',defaultVal=0.0_pReal)
|
||||
lattice_C66(6,6,section) = config_phase(p)%getFloat('c66',defaultVal=0.0_pReal)
|
||||
|
||||
! case ('c11_trans')
|
||||
! lattice_trans_C66(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c12_trans')
|
||||
! lattice_trans_C66(1,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c13_trans')
|
||||
! lattice_trans_C66(1,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c22_trans')
|
||||
! lattice_trans_C66(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c23_trans')
|
||||
! lattice_trans_C66(2,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c33_trans')
|
||||
! lattice_trans_C66(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c44_trans')
|
||||
! lattice_trans_C66(4,4,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c55_trans')
|
||||
! lattice_trans_C66(5,5,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c66_trans')
|
||||
! lattice_trans_C66(6,6,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
!
|
||||
! case ('covera_ratio','c/a_ratio','c/a')
|
||||
! CoverA(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('c/a_trans','c/a_martensite','c/a_mart')
|
||||
! CoverA_trans(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('a_fcc')
|
||||
! a_fcc(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('a_bcc')
|
||||
! a_bcc(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
!
|
||||
! case ('thermal_conductivity11')
|
||||
! lattice_thermalConductivity33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('thermal_conductivity22')
|
||||
! lattice_thermalConductivity33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('thermal_conductivity33')
|
||||
! lattice_thermalConductivity33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('thermal_expansion11')
|
||||
! do i = 2_pInt, min(4,chunkPos(1)) ! read up to three parameters (constant, linear, quadratic with T)
|
||||
! lattice_thermalExpansion33(1,1,i-1_pInt,section) = IO_floatValue(line,chunkPos,i)
|
||||
! enddo
|
||||
! case ('thermal_expansion22')
|
||||
! do i = 2_pInt, min(4,chunkPos(1)) ! read up to three parameters (constant, linear, quadratic with T)
|
||||
! lattice_thermalExpansion33(2,2,i-1_pInt,section) = IO_floatValue(line,chunkPos,i)
|
||||
! enddo
|
||||
! case ('thermal_expansion33')
|
||||
! do i = 2_pInt, min(4,chunkPos(1)) ! read up to three parameters (constant, linear, quadratic with T)
|
||||
! lattice_thermalExpansion33(3,3,i-1_pInt,section) = IO_floatValue(line,chunkPos,i)
|
||||
! enddo
|
||||
! case ('specific_heat')
|
||||
! lattice_specificHeat(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyformationenergy')
|
||||
! lattice_vacancyFormationEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancysurfaceenergy')
|
||||
! lattice_vacancySurfaceEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyvolume')
|
||||
! lattice_vacancyVol(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenformationenergy')
|
||||
! lattice_hydrogenFormationEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogensurfaceenergy')
|
||||
! lattice_hydrogenSurfaceEnergy(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenvolume')
|
||||
! lattice_hydrogenVol(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('mass_density')
|
||||
! lattice_massDensity(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('reference_temperature')
|
||||
! lattice_referenceTemperature(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('damage_diffusion11')
|
||||
! lattice_DamageDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('damage_diffusion22')
|
||||
! lattice_DamageDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('damage_diffusion33')
|
||||
! lattice_DamageDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('damage_mobility')
|
||||
! lattice_DamageMobility(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyflux_diffusion11')
|
||||
! lattice_vacancyfluxDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyflux_diffusion22')
|
||||
! lattice_vacancyfluxDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyflux_diffusion33')
|
||||
! lattice_vacancyfluxDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyflux_mobility11')
|
||||
! lattice_vacancyfluxMobility33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyflux_mobility22')
|
||||
! lattice_vacancyfluxMobility33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancyflux_mobility33')
|
||||
! lattice_vacancyfluxMobility33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('porosity_diffusion11')
|
||||
! lattice_PorosityDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('porosity_diffusion22')
|
||||
! lattice_PorosityDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('porosity_diffusion33')
|
||||
! lattice_PorosityDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('porosity_mobility')
|
||||
! lattice_PorosityMobility(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenflux_diffusion11')
|
||||
! lattice_hydrogenfluxDiffusion33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenflux_diffusion22')
|
||||
! lattice_hydrogenfluxDiffusion33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenflux_diffusion33')
|
||||
! lattice_hydrogenfluxDiffusion33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenflux_mobility11')
|
||||
! lattice_hydrogenfluxMobility33(1,1,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenflux_mobility22')
|
||||
! lattice_hydrogenfluxMobility33(2,2,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogenflux_mobility33')
|
||||
! lattice_hydrogenfluxMobility33(3,3,section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('vacancy_eqcv')
|
||||
! lattice_equilibriumVacancyConcentration(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! case ('hydrogen_eqch')
|
||||
! lattice_equilibriumHydrogenConcentration(section) = IO_floatValue(line,chunkPos,2_pInt)
|
||||
! end select
|
||||
! endif
|
||||
! enddo
|
||||
|
||||
enddo
|
||||
do i = 1_pInt,Nphases
|
||||
if ((CoverA(i) < 1.0_pReal .or. CoverA(i) > 2.0_pReal) &
|
||||
.and. lattice_structure(i) == LATTICE_hex_ID) call IO_error(131_pInt,el=i) ! checking physical significance of c/a
|
||||
|
@ -1631,8 +1525,6 @@ subroutine lattice_init
|
|||
call lattice_initializeStructure(i, CoverA(i), CoverA_trans(i), a_fcc(i), a_bcc(i))
|
||||
enddo
|
||||
|
||||
deallocate(CoverA,CoverA_trans,a_fcc,a_bcc)
|
||||
|
||||
end subroutine lattice_init
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue