2007-03-28 23:18:59 +05:30
|
|
|
! QUESTION fileunit 1 may run into trouble?
|
|
|
|
|
|
|
|
|
2007-03-21 19:19:47 +05:30
|
|
|
!************************************
|
|
|
|
!* Module: CONSTITUTIVE *
|
|
|
|
!************************************
|
|
|
|
!* contains: *
|
|
|
|
!* - constitutive equations *
|
|
|
|
!* - Schmid matrices calculation *
|
|
|
|
!* - Hardening matrices definition *
|
|
|
|
!* - Parameters definition *
|
|
|
|
!* - orientations? *
|
|
|
|
!************************************
|
|
|
|
|
|
|
|
MODULE constitutive
|
|
|
|
|
|
|
|
!*** Include other modules ***
|
|
|
|
use prec, only: pReal,pInt
|
|
|
|
implicit none
|
|
|
|
|
2007-03-28 00:21:11 +05:30
|
|
|
! MISSING consistency check after reading 'mattex.mpie'
|
2007-04-10 17:59:11 +05:30
|
|
|
character(len=300), parameter :: mattexFile = 'mattex.mpie'
|
|
|
|
|
|
|
|
!*************************************
|
|
|
|
!* Definition of material properties *
|
|
|
|
!*************************************
|
|
|
|
!* Number of materials
|
|
|
|
integer(pInt) material_maxN
|
|
|
|
!* Crystal structure and number of selected slip systems per material
|
|
|
|
integer(pInt), dimension(:) , allocatable :: material_CrystalStructure
|
|
|
|
integer(pInt), dimension(:) , allocatable :: material_Nslip
|
|
|
|
!* Maximum number of selected slip systems over materials
|
|
|
|
integer(pInt) material_maxNslip
|
|
|
|
!* Elastic constants and matrices
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_C11
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_C12
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_C13
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_C33
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_C44
|
|
|
|
real(pReal), dimension(:,:,:), allocatable :: material_Cslip_66
|
|
|
|
!* Visco-plastic material parameters
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_s0_slip
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_gdot0_slip
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_n_slip
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_h0
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_s_sat
|
|
|
|
real(pReal), dimension(:) , allocatable :: material_w0
|
|
|
|
|
|
|
|
!************************************
|
|
|
|
!* Definition of texture properties *
|
|
|
|
!************************************
|
|
|
|
!* Number of textures, maximum number of Gauss and Fiber components
|
|
|
|
integer(pInt) texture_maxN
|
|
|
|
integer(pInt) texture_maxNGauss
|
|
|
|
integer(pInt) texture_maxNFiber
|
|
|
|
!* Textures definition
|
|
|
|
character(len=80), dimension(:), allocatable :: texture_ODFfile
|
|
|
|
character(len=80), dimension(:), allocatable :: texture_symmetry
|
|
|
|
integer(pInt), dimension(:) , allocatable :: texture_Ngrains
|
|
|
|
integer(pInt), dimension(:) , allocatable :: texture_NGauss
|
|
|
|
integer(pInt),dimension(:) , allocatable :: texture_NFiber
|
|
|
|
integer(pInt),dimension(:) , allocatable :: texture_NRandom
|
|
|
|
integer(pInt),dimension(:) , allocatable :: texture_totalNgrains
|
|
|
|
real(pReal), dimension(:,:,:) , allocatable :: texture_Gauss
|
|
|
|
real(pReal), dimension(:,:,:) , allocatable :: texture_Fiber
|
|
|
|
real(pReal), dimension(:,:,:,:), allocatable :: constitutive_EulerAngles
|
|
|
|
|
|
|
|
!************************************
|
|
|
|
!* Grains *
|
|
|
|
!************************************
|
|
|
|
integer(pInt) constitutive_maxNgrains
|
|
|
|
integer(pInt), dimension(:,:) , allocatable :: constitutive_Ngrains
|
|
|
|
integer(pInt), dimension(:,:,:) , allocatable :: constitutive_matID
|
|
|
|
real(pReal), dimension(:,:,:) , allocatable :: constitutive_matVolFrac
|
|
|
|
integer(pInt), dimension(:,:,:) , allocatable :: constitutive_texID
|
|
|
|
real(pReal), dimension(:,:,:) , allocatable :: constitutive_texVolFrac
|
|
|
|
|
|
|
|
!************************************
|
|
|
|
!* State variables *
|
|
|
|
!************************************
|
|
|
|
integer(pInt) constitutive_maxNstatevars
|
|
|
|
integer(pInt), dimension(:,:,:), allocatable :: constitutive_Nstatevars
|
|
|
|
real(pReal), dimension(:,:,:,:), allocatable :: constitutive_state_old
|
|
|
|
real(pReal), dimension(:,:,:,:), allocatable :: constitutive_state_new
|
|
|
|
|
|
|
|
!************************************
|
|
|
|
!* Results *
|
|
|
|
!************************************
|
|
|
|
integer(pInt) constitutive_maxNresults
|
|
|
|
integer(pInt), dimension(:,:,:), allocatable :: constitutive_Nresults
|
|
|
|
real(pReal), dimension(:,:,:,:), allocatable :: constitutive_results
|
|
|
|
!* MISSING : allocation
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
|
|
|
|
!***********************************************
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Crystal structures *
|
2007-03-24 01:07:18 +05:30
|
|
|
!***********************************************
|
|
|
|
!* Number of crystal structures (1-FCC,2-BCC,3-HCP)
|
|
|
|
integer(pInt), parameter :: constitutive_MaxCrystalStructure = 3
|
|
|
|
!* Total number of slip systems per crystal structure
|
|
|
|
!* (as to be changed according the definition of slip systems)
|
|
|
|
integer(pInt), dimension(constitutive_MaxCrystalStructure), parameter :: constitutive_MaxNslipOfStructure = &
|
|
|
|
reshape((/12,48,12/),(/constitutive_MaxCrystalStructure/))
|
|
|
|
!* Maximum number of slip systems over crystal structures
|
2007-04-10 17:59:11 +05:30
|
|
|
integer(pInt), parameter :: constitutive_MaxMaxNslipOfStructure = 48
|
2007-03-24 01:07:18 +05:30
|
|
|
!* Slip direction, slip normales and Schmid matrices
|
|
|
|
real(pReal), dimension(3,3,constitutive_MaxMaxNslipOfStructure,constitutive_MaxCrystalStructure) :: constitutive_Sslip
|
|
|
|
real(pReal), dimension(6,constitutive_MaxMaxNslipOfStructure,constitutive_MaxCrystalStructure) :: constitutive_Sslip_v
|
|
|
|
real(pReal), dimension(3,constitutive_MaxMaxNslipOfStructure,constitutive_MaxCrystalStructure) :: constitutive_sn
|
|
|
|
real(pReal), dimension(3,constitutive_MaxMaxNslipOfStructure,constitutive_MaxCrystalStructure) :: constitutive_sd
|
2007-03-21 19:19:47 +05:30
|
|
|
|
|
|
|
!*** Slip systems for FCC structures (1) ***
|
|
|
|
!* System {111}<110> Sort according Eisenlohr&Hantcherli
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:, 1,1)/ 0, 1,-1/ ; data constitutive_sn(:, 1,1)/ 1, 1, 1/
|
|
|
|
data constitutive_sd(:, 2,1)/-1, 0, 1/ ; data constitutive_sn(:, 2,1)/ 1, 1, 1/
|
|
|
|
data constitutive_sd(:, 3,1)/ 1,-1, 0/ ; data constitutive_sn(:, 3,1)/ 1, 1, 1/
|
|
|
|
data constitutive_sd(:, 4,1)/ 0,-1,-1/ ; data constitutive_sn(:, 4,1)/-1,-1, 1/
|
|
|
|
data constitutive_sd(:, 5,1)/ 1, 0, 1/ ; data constitutive_sn(:, 5,1)/-1,-1, 1/
|
|
|
|
data constitutive_sd(:, 6,1)/-1, 1, 0/ ; data constitutive_sn(:, 6,1)/-1,-1, 1/
|
|
|
|
data constitutive_sd(:, 7,1)/ 0,-1, 1/ ; data constitutive_sn(:, 7,1)/ 1,-1,-1/
|
|
|
|
data constitutive_sd(:, 8,1)/-1, 0,-1/ ; data constitutive_sn(:, 8,1)/ 1,-1,-1/
|
|
|
|
data constitutive_sd(:, 9,1)/ 1, 1, 0/ ; data constitutive_sn(:, 9,1)/ 1,-1,-1/
|
|
|
|
data constitutive_sd(:,10,1)/ 0, 1, 1/ ; data constitutive_sn(:,10,1)/-1, 1,-1/
|
|
|
|
data constitutive_sd(:,11,1)/ 1, 0,-1/ ; data constitutive_sn(:,11,1)/-1, 1,-1/
|
|
|
|
data constitutive_sd(:,12,1)/-1,-1, 0/ ; data constitutive_sn(:,12,1)/-1, 1,-1/
|
2007-03-21 19:19:47 +05:30
|
|
|
|
|
|
|
!*** Slip systems for BCC structures (2) ***
|
|
|
|
!* System {110}<111>
|
|
|
|
!* Sort?
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:, 1,2)/ 1,-1, 1/ ; data constitutive_sn(:, 1,2)/ 0, 1, 1/
|
|
|
|
data constitutive_sd(:, 2,2)/-1,-1, 1/ ; data constitutive_sn(:, 2,2)/ 0, 1, 1/
|
|
|
|
data constitutive_sd(:, 3,2)/ 1, 1, 1/ ; data constitutive_sn(:, 3,2)/ 0,-1, 1/
|
|
|
|
data constitutive_sd(:, 4,2)/-1, 1, 1/ ; data constitutive_sn(:, 4,2)/ 0,-1, 1/
|
|
|
|
data constitutive_sd(:, 5,2)/-1, 1, 1/ ; data constitutive_sn(:, 5,2)/ 1, 0, 1/
|
|
|
|
data constitutive_sd(:, 6,2)/-1,-1, 1/ ; data constitutive_sn(:, 6,2)/ 1, 0, 1/
|
|
|
|
data constitutive_sd(:, 7,2)/ 1, 1, 1/ ; data constitutive_sn(:, 7,2)/-1, 0, 1/
|
|
|
|
data constitutive_sd(:, 8,2)/ 1,-1, 1/ ; data constitutive_sn(:, 8,2)/-1, 0, 1/
|
|
|
|
data constitutive_sd(:, 9,2)/-1, 1, 1/ ; data constitutive_sn(:, 9,2)/ 1, 1, 0/
|
|
|
|
data constitutive_sd(:,10,2)/-1, 1,-1/ ; data constitutive_sn(:,10,2)/ 1, 1, 0/
|
|
|
|
data constitutive_sd(:,11,2)/ 1, 1, 1/ ; data constitutive_sn(:,11,2)/-1, 1, 0/
|
|
|
|
data constitutive_sd(:,12,2)/ 1, 1,-1/ ; data constitutive_sn(:,12,2)/-1, 1, 0/
|
2007-03-21 19:19:47 +05:30
|
|
|
!* System {112}<111>
|
|
|
|
!* Sort?
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:,13,2)/-1, 1, 1/ ; data constitutive_sn(:,13,2)/ 2, 1, 1/
|
|
|
|
data constitutive_sd(:,14,2)/ 1, 1, 1/ ; data constitutive_sn(:,14,2)/-2, 1, 1/
|
|
|
|
data constitutive_sd(:,15,2)/ 1, 1,-1/ ; data constitutive_sn(:,15,2)/ 2,-1, 1/
|
|
|
|
data constitutive_sd(:,16,2)/ 1,-1, 1/ ; data constitutive_sn(:,16,2)/ 2, 1,-1/
|
|
|
|
data constitutive_sd(:,17,2)/ 1,-1, 1/ ; data constitutive_sn(:,17,2)/ 1, 2, 1/
|
|
|
|
data constitutive_sd(:,18,2)/ 1, 1,-1/ ; data constitutive_sn(:,18,2)/-1, 2, 1/
|
|
|
|
data constitutive_sd(:,19,2)/ 1, 1, 1/ ; data constitutive_sn(:,19,2)/ 1,-2, 1/
|
|
|
|
data constitutive_sd(:,20,2)/-1, 1, 1/ ; data constitutive_sn(:,20,2)/ 1, 2,-1/
|
|
|
|
data constitutive_sd(:,21,2)/ 1, 1,-1/ ; data constitutive_sn(:,21,2)/ 1, 1, 2/
|
|
|
|
data constitutive_sd(:,22,2)/ 1,-1, 1/ ; data constitutive_sn(:,22,2)/-1, 1, 2/
|
|
|
|
data constitutive_sd(:,23,2)/-1, 1, 1/ ; data constitutive_sn(:,23,2)/ 1,-1, 2/
|
|
|
|
data constitutive_sd(:,24,2)/ 1, 1, 1/ ; data constitutive_sn(:,24,2)/ 1, 1,-2/
|
2007-03-21 19:19:47 +05:30
|
|
|
!* System {123}<111>
|
|
|
|
!* Sort?
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:,25,2)/ 1, 1,-1/ ; data constitutive_sn(:,25,2)/ 1, 2, 3/
|
|
|
|
data constitutive_sd(:,26,2)/ 1,-1, 1/ ; data constitutive_sn(:,26,2)/-1, 2, 3/
|
|
|
|
data constitutive_sd(:,27,2)/-1, 1, 1/ ; data constitutive_sn(:,27,2)/ 1,-2, 3/
|
|
|
|
data constitutive_sd(:,28,2)/ 1, 1, 1/ ; data constitutive_sn(:,28,2)/ 1, 2,-3/
|
|
|
|
data constitutive_sd(:,29,2)/ 1,-1, 1/ ; data constitutive_sn(:,29,2)/ 1, 3, 2/
|
|
|
|
data constitutive_sd(:,30,2)/ 1, 1,-1/ ; data constitutive_sn(:,30,2)/-1, 3, 2/
|
|
|
|
data constitutive_sd(:,31,2)/ 1, 1, 1/ ; data constitutive_sn(:,31,2)/ 1,-3, 2/
|
|
|
|
data constitutive_sd(:,32,2)/-1, 1, 1/ ; data constitutive_sn(:,32,2)/ 1, 3,-2/
|
|
|
|
data constitutive_sd(:,33,2)/ 1, 1,-1/ ; data constitutive_sn(:,33,2)/ 2, 1, 3/
|
|
|
|
data constitutive_sd(:,34,2)/ 1,-1, 1/ ; data constitutive_sn(:,34,2)/-2, 1, 3/
|
|
|
|
data constitutive_sd(:,35,2)/-1, 1, 1/ ; data constitutive_sn(:,35,2)/ 2,-1, 3/
|
|
|
|
data constitutive_sd(:,36,2)/ 1, 1, 1/ ; data constitutive_sn(:,36,2)/ 2, 1,-3/
|
|
|
|
data constitutive_sd(:,37,2)/ 1,-1, 1/ ; data constitutive_sn(:,37,2)/ 2, 3, 1/
|
|
|
|
data constitutive_sd(:,38,2)/ 1, 1,-1/ ; data constitutive_sn(:,38,2)/-2, 3, 1/
|
|
|
|
data constitutive_sd(:,39,2)/ 1, 1, 1/ ; data constitutive_sn(:,39,2)/ 2,-3, 1/
|
|
|
|
data constitutive_sd(:,40,2)/-1, 1, 1/ ; data constitutive_sn(:,40,2)/ 2, 3,-1/
|
|
|
|
data constitutive_sd(:,41,2)/-1, 1, 1/ ; data constitutive_sn(:,41,2)/ 3, 1, 2/
|
|
|
|
data constitutive_sd(:,42,2)/ 1, 1, 1/ ; data constitutive_sn(:,42,2)/-3, 1, 2/
|
|
|
|
data constitutive_sd(:,43,2)/ 1, 1,-1/ ; data constitutive_sn(:,43,2)/ 3,-1, 2/
|
|
|
|
data constitutive_sd(:,44,2)/ 1,-1, 1/ ; data constitutive_sn(:,44,2)/ 3, 1,-2/
|
|
|
|
data constitutive_sd(:,45,2)/-1, 1, 1/ ; data constitutive_sn(:,45,2)/ 3, 2, 1/
|
|
|
|
data constitutive_sd(:,46,2)/ 1, 1, 1/ ; data constitutive_sn(:,46,2)/-3, 2, 1/
|
|
|
|
data constitutive_sd(:,47,2)/ 1, 1,-1/ ; data constitutive_sn(:,47,2)/ 3,-2, 1/
|
|
|
|
data constitutive_sd(:,48,2)/ 1,-1, 1/ ; data constitutive_sn(:,48,2)/ 3, 2,-1/
|
2007-03-21 19:19:47 +05:30
|
|
|
|
|
|
|
!*** Slip systems for HCP structures (3) ***
|
2007-03-22 02:40:22 +05:30
|
|
|
!* Basal systems {0001}<1120> (independent of c/a-ratio)
|
2007-03-21 19:19:47 +05:30
|
|
|
!* 1- (0 0 0 1)[-2 1 1 0]
|
|
|
|
!* 2- (0 0 0 1)[ 1 -2 1 0]
|
|
|
|
!* 3- (0 0 0 1)[ 1 1 -2 0]
|
|
|
|
!* Plane (hkil)->(hkl)
|
|
|
|
!* Direction [uvtw]->[(u-t) (v-t) w]
|
|
|
|
!* Automatical transformation from Bravais to Miller
|
|
|
|
!* not done for the moment
|
|
|
|
!* Sort?
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:, 1,3)/-1, 0, 0/ ; data constitutive_sn(:, 1,3)/ 0, 0, 1/
|
|
|
|
data constitutive_sd(:, 2,3)/ 0,-1, 0/ ; data constitutive_sn(:, 2,3)/ 0, 0, 1/
|
|
|
|
data constitutive_sd(:, 3,3)/ 1, 1, 0/ ; data constitutive_sn(:, 3,3)/ 0, 0, 1/
|
2007-03-22 02:40:22 +05:30
|
|
|
!* 1st type prismatic systems {1010}<1120> (independent of c/a-ratio)
|
2007-03-21 19:19:47 +05:30
|
|
|
!* 1- ( 0 1 -1 0)[-2 1 1 0]
|
|
|
|
!* 2- ( 1 0 -1 0)[ 1 -2 1 0]
|
|
|
|
!* 3- (-1 1 0 0)[ 1 1 -2 0]
|
|
|
|
!* Sort?
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:, 4,3)/-1, 0, 0/ ; data constitutive_sn(:, 4,3)/ 0, 1, 0/
|
|
|
|
data constitutive_sd(:, 5,3)/ 0,-1, 0/ ; data constitutive_sn(:, 5,3)/ 1, 0, 0/
|
|
|
|
data constitutive_sd(:, 6,3)/ 1, 1, 0/ ; data constitutive_sn(:, 6,3)/-1, 1, 0/
|
2007-03-22 02:40:22 +05:30
|
|
|
!* 1st type 1st order pyramidal systems {1011}<1120>
|
|
|
|
!* plane normales depend on the c/a-ratio
|
2007-03-21 19:19:47 +05:30
|
|
|
!* 1- ( 0 -1 1 1)[-2 1 1 0]
|
|
|
|
!* 2- ( 0 1 -1 1)[-2 1 1 0]
|
|
|
|
!* 3- (-1 0 1 1)[ 1 -2 1 0]
|
|
|
|
!* 4- ( 1 0 -1 1)[ 1 -2 1 0]
|
|
|
|
!* 5- (-1 1 0 1)[ 1 1 -2 0]
|
|
|
|
!* 6- ( 1 -1 0 1)[ 1 1 -2 0]
|
|
|
|
!* Sort?
|
2007-03-21 22:27:32 +05:30
|
|
|
data constitutive_sd(:, 7,3)/-1, 0, 0/ ; data constitutive_sn(:, 7,3)/ 0,-1, 1/
|
|
|
|
data constitutive_sd(:, 8,3)/ 0,-1, 0/ ; data constitutive_sn(:, 8,3)/ 0, 1, 1/
|
|
|
|
data constitutive_sd(:, 9,3)/ 1, 1, 0/ ; data constitutive_sn(:, 9,3)/-1, 0, 1/
|
|
|
|
data constitutive_sd(:,10,3)/-1, 0, 0/ ; data constitutive_sn(:,10,3)/ 1, 0, 1/
|
|
|
|
data constitutive_sd(:,11,3)/ 0,-1, 0/ ; data constitutive_sn(:,11,3)/-1, 1, 1/
|
|
|
|
data constitutive_sd(:,12,3)/ 1, 1, 0/ ; data constitutive_sn(:,12,3)/ 1,-1, 1/
|
2007-03-21 19:19:47 +05:30
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
!***********************************************
|
|
|
|
!* slip-slip interaction *
|
|
|
|
!***********************************************
|
2007-03-24 01:07:18 +05:30
|
|
|
!* (defined for the moment as crystal structure property and not as material property)
|
|
|
|
!* (may be changed in the future)
|
2007-03-29 16:43:40 +05:30
|
|
|
real(pReal), dimension(constitutive_MaxMaxNslipOfStructure,constitutive_MaxMaxNslipOfStructure,&
|
|
|
|
constitutive_MaxCrystalStructure) :: constitutive_HardeningMatrix
|
2007-03-28 15:34:59 +05:30
|
|
|
real(pReal), parameter :: constitutive_LatentHardening=1.4_pReal
|
2007-03-24 01:07:18 +05:30
|
|
|
|
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
CONTAINS
|
2007-03-21 19:19:47 +05:30
|
|
|
!****************************************
|
2007-03-27 00:25:54 +05:30
|
|
|
!* - constitutive_Init
|
2007-03-24 01:07:18 +05:30
|
|
|
!* - constitutive_SchmidMatrices
|
|
|
|
!* - constitutive_HardeningMatrices
|
|
|
|
!* - constitutive_CountSections
|
|
|
|
!* - constitutive_Parse_UnknownPart
|
|
|
|
!* - constitutive_Parse_MaterialPart
|
|
|
|
!* - constitutive_Parse_TexturePart
|
2007-03-27 18:21:56 +05:30
|
|
|
!* - constitutive_Parse_MatTexDat
|
2007-03-28 19:21:28 +05:30
|
|
|
!* - constitutive_Assignment
|
2007-03-28 00:21:11 +05:30
|
|
|
!* - constitutive_HomogenizedC
|
2007-03-27 00:25:54 +05:30
|
|
|
!* - constitutive_LpAndItsTangent
|
2007-03-24 01:07:18 +05:30
|
|
|
!* - consistutive_DotState
|
2007-03-21 19:19:47 +05:30
|
|
|
!****************************************
|
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
|
|
|
|
subroutine constitutive_Init()
|
2007-03-21 19:19:47 +05:30
|
|
|
!**************************************
|
2007-03-22 02:40:22 +05:30
|
|
|
!* Module initialization *
|
2007-04-10 17:59:11 +05:30
|
|
|
!**************************************
|
|
|
|
call constitutive_SchmidMatrices()
|
|
|
|
call constitutive_HardeningMatrices()
|
|
|
|
call constitutive_Parse_MatTexDat(mattexFile)
|
|
|
|
call constitutive_Assignment()
|
|
|
|
end subroutine
|
2007-03-21 19:19:47 +05:30
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
|
|
|
|
subroutine constitutive_SchmidMatrices()
|
2007-03-21 19:19:47 +05:30
|
|
|
!**************************************
|
2007-03-22 02:40:22 +05:30
|
|
|
!* Calculation of Schmid matrices *
|
2007-04-10 17:59:11 +05:30
|
|
|
!**************************************
|
|
|
|
use prec, only: pReal,pInt
|
|
|
|
implicit none
|
2007-03-21 19:19:47 +05:30
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Definition of variables
|
|
|
|
integer(pInt) i,j,k,l
|
|
|
|
real(pReal) invNorm
|
2007-03-21 19:19:47 +05:30
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Iteration over the crystal structures
|
2007-03-21 19:19:47 +05:30
|
|
|
do l=1,3
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Iteration over the systems
|
2007-03-24 01:07:18 +05:30
|
|
|
do k=1,constitutive_MaxNslipOfStructure(l)
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Defintion of Schmid matrix
|
2007-03-21 19:19:47 +05:30
|
|
|
forall (i=1:3,j=1:3)
|
2007-04-10 17:59:11 +05:30
|
|
|
constitutive_Sslip(i,j,k,l)=constitutive_sd(i,k,l)*constitutive_sn(j,k,l)
|
2007-03-21 19:19:47 +05:30
|
|
|
endforall
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Normalization of Schmid matrix
|
2007-03-29 16:43:40 +05:30
|
|
|
invNorm=dsqrt(1.0_pReal/((constitutive_sn(1,k,l)**2+constitutive_sn(2,k,l)**2+constitutive_sn(3,k,l)**2)*&
|
2007-04-10 17:59:11 +05:30
|
|
|
(constitutive_sd(1,k,l)**2+constitutive_sd(2,k,l)**2+constitutive_sd(3,k,l)**2)))
|
2007-03-21 22:27:32 +05:30
|
|
|
constitutive_Sslip(:,:,k,l)=constitutive_Sslip(:,:,k,l)*invNorm
|
2007-03-21 19:19:47 +05:30
|
|
|
!* Vectorization of normalized Schmid matrix
|
2007-04-10 17:59:11 +05:30
|
|
|
constitutive_Sslip_v(1,k,l)=constitutive_Sslip(1,1,k,l)
|
|
|
|
constitutive_Sslip_v(2,k,l)=constitutive_Sslip(2,2,k,l)
|
2007-04-10 16:50:05 +05:30
|
|
|
constitutive_Sslip_v(3,k,l)=constitutive_Sslip(3,3,k,l)
|
2007-04-10 17:59:11 +05:30
|
|
|
!* be compatible with Mandel notation of Tstar
|
|
|
|
constitutive_Sslip_v(4,k,l)=(constitutive_Sslip(1,2,k,l)+constitutive_Sslip(2,1,k,l))/dsqrt(2.0_pReal)
|
|
|
|
constitutive_Sslip_v(5,k,l)=(constitutive_Sslip(2,3,k,l)+constitutive_Sslip(3,3,k,l))/dsqrt(2.0_pReal)
|
|
|
|
constitutive_Sslip_v(6,k,l)=(constitutive_Sslip(1,3,k,l)+constitutive_Sslip(3,1,k,l))/dsqrt(2.0_pReal)
|
|
|
|
enddo
|
2007-03-21 19:19:47 +05:30
|
|
|
enddo
|
2007-04-10 17:59:11 +05:30
|
|
|
|
2007-03-21 19:19:47 +05:30
|
|
|
end subroutine
|
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
|
|
|
|
subroutine constitutive_HardeningMatrices()
|
2007-03-21 19:19:47 +05:30
|
|
|
!****************************************
|
2007-03-22 02:40:22 +05:30
|
|
|
!* Hardening matrix (see Kalidindi) *
|
2007-04-10 17:59:11 +05:30
|
|
|
!****************************************
|
|
|
|
use prec, only: pReal,pInt
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
!* Definition of variables
|
|
|
|
integer(pInt) i,j,k,l
|
2007-03-21 19:19:47 +05:30
|
|
|
|
|
|
|
!* Initialization of the hardening matrix
|
2007-03-28 15:34:59 +05:30
|
|
|
constitutive_HardeningMatrix=constitutive_LatentHardening
|
2007-03-21 19:19:47 +05:30
|
|
|
!* Iteration over the crystal structures
|
|
|
|
do l=1,3
|
|
|
|
select case(l)
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Hardening matrix for FCC structures
|
2007-03-21 19:19:47 +05:30
|
|
|
case (1)
|
2007-04-10 17:59:11 +05:30
|
|
|
forall (k=1:10:3,i=0:2,j=0:2)
|
|
|
|
constitutive_HardeningMatrix(k+i,k+j,l)=1.0_pReal
|
2007-03-21 19:19:47 +05:30
|
|
|
endforall
|
|
|
|
!* Hardening matrix for BCC structures
|
|
|
|
case (2)
|
2007-04-10 17:59:11 +05:30
|
|
|
forall (k=1:11:2,i=0:1,j=0:1)
|
|
|
|
constitutive_HardeningMatrix(k+i,k+j,l)=1.0_pReal
|
|
|
|
endforall
|
|
|
|
forall (k=13:48)
|
|
|
|
constitutive_HardeningMatrix(k,k,l)=1.0_pReal
|
2007-03-21 19:19:47 +05:30
|
|
|
endforall
|
|
|
|
!* Hardening matrix for HCP structures
|
|
|
|
case (3)
|
2007-04-10 17:59:11 +05:30
|
|
|
forall (i=1:3,j=1:3)
|
2007-03-28 15:34:59 +05:30
|
|
|
constitutive_HardeningMatrix(i,j,l)=1.0_pReal
|
2007-04-10 17:59:11 +05:30
|
|
|
endforall
|
|
|
|
forall (k=4:12)
|
|
|
|
constitutive_HardeningMatrix(k,k,l)=1.0_pReal
|
|
|
|
endforall
|
|
|
|
end select
|
2007-03-21 19:19:47 +05:30
|
|
|
enddo
|
|
|
|
|
|
|
|
end subroutine
|
|
|
|
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
subroutine constitutive_CountSections(file,count,part)
|
|
|
|
!*********************************************************************
|
|
|
|
!* This subroutine reads a "part" from the input file until the next *
|
|
|
|
!* part is reached and counts the number of "sections" in the part *
|
|
|
|
!* INPUT: *
|
|
|
|
!* - file : file ID *
|
|
|
|
!* OUTPUT: *
|
|
|
|
!* - part : name of the next "part" *
|
|
|
|
!* - count : number of sections inside the current "part" *
|
|
|
|
!*********************************************************************
|
2007-03-22 21:59:06 +05:30
|
|
|
use prec, only: pInt
|
2007-03-24 01:07:18 +05:30
|
|
|
use IO, only: IO_stringPos,IO_stringValue,IO_lc
|
2007-03-22 17:35:24 +05:30
|
|
|
implicit none
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
!* Definition of variables
|
|
|
|
character(len=80) part,line,tag
|
2007-03-22 21:59:06 +05:30
|
|
|
integer(pInt) file,count,pos
|
|
|
|
integer(pInt), dimension(3) :: positions
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
count=0
|
|
|
|
part=''
|
2007-03-27 00:25:54 +05:30
|
|
|
|
2007-03-28 23:18:59 +05:30
|
|
|
do
|
2007-03-27 00:25:54 +05:30
|
|
|
read(file,'(a80)',END=100) line
|
2007-03-24 01:07:18 +05:30
|
|
|
positions=IO_stringPos(line,1)
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,1))
|
2007-03-27 01:46:37 +05:30
|
|
|
if (tag(1:1)=='<'.AND.tag(len_trim(tag):len_trim(tag))=='>') then
|
|
|
|
part=tag(2:len_trim(tag)-1)
|
2007-03-24 01:07:18 +05:30
|
|
|
exit
|
2007-03-27 00:25:54 +05:30
|
|
|
elseif (tag(1:1)=='[') then
|
2007-03-24 01:07:18 +05:30
|
|
|
count=count+1
|
|
|
|
endif
|
|
|
|
enddo
|
2007-03-22 21:59:06 +05:30
|
|
|
100 return
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
end subroutine
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-22 21:59:06 +05:30
|
|
|
|
2007-03-28 23:18:59 +05:30
|
|
|
character(len=80) function constitutive_assignNGaussAndFiber(file)
|
2007-03-27 21:42:14 +05:30
|
|
|
!*********************************************************************
|
|
|
|
!*********************************************************************
|
|
|
|
use prec, only: pInt
|
|
|
|
use IO, only: IO_stringPos,IO_stringValue,IO_lc
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
!* Definition of variables
|
2007-03-28 23:18:59 +05:30
|
|
|
character(len=80) line,tag
|
|
|
|
integer(pInt) file,section,pos
|
2007-03-27 21:42:14 +05:30
|
|
|
integer(pInt), dimension(3) :: positions
|
|
|
|
|
2007-03-28 23:18:59 +05:30
|
|
|
constitutive_assignNGaussAndFiber=''
|
|
|
|
section = 0_pInt
|
2007-03-27 21:42:14 +05:30
|
|
|
|
2007-03-28 23:18:59 +05:30
|
|
|
do
|
2007-03-27 21:42:14 +05:30
|
|
|
read(file,'(a80)',END=100) line
|
|
|
|
positions=IO_stringPos(line,1)
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,1))
|
|
|
|
if (tag(1:1)=='<'.AND.tag(len_trim(tag):len_trim(tag))=='>') then
|
2007-03-28 23:18:59 +05:30
|
|
|
constitutive_assignNGaussAndFiber=tag(2:len_trim(tag)-1)
|
2007-03-27 21:42:14 +05:30
|
|
|
exit
|
|
|
|
elseif (tag(1:1)=='[') then
|
2007-03-28 23:18:59 +05:30
|
|
|
section=section+1
|
|
|
|
texture_NGauss(section) = 0_pInt
|
|
|
|
texture_NFiber(section) = 0_pInt
|
|
|
|
elseif (tag=='(gauss)') then
|
|
|
|
texture_NGauss(section)=texture_NGauss(section)+1
|
|
|
|
elseif (tag=='(fiber)') then
|
|
|
|
texture_NFiber(section)=texture_NFiber(section)+1
|
2007-03-27 21:42:14 +05:30
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
100 return
|
|
|
|
|
2007-03-28 23:18:59 +05:30
|
|
|
end function
|
2007-03-27 21:42:14 +05:30
|
|
|
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
character(len=80) function constitutive_Parse_UnknownPart(file)
|
|
|
|
!*********************************************************************
|
2007-03-27 01:46:37 +05:30
|
|
|
!* read an unknown "part" from the input file until *
|
2007-03-24 01:07:18 +05:30
|
|
|
!* the next part is reached *
|
|
|
|
!* INPUT: *
|
|
|
|
!* - file : file ID *
|
|
|
|
!*********************************************************************
|
2007-03-22 21:59:06 +05:30
|
|
|
use prec, only: pInt
|
|
|
|
use IO, only: IO_stringPos,IO_stringValue,IO_lc
|
2007-03-22 17:35:24 +05:30
|
|
|
implicit none
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
!* Definition of variables
|
|
|
|
character(len=80) line,tag
|
2007-03-22 21:59:06 +05:30
|
|
|
integer(pInt), parameter :: maxNchunks = 1
|
|
|
|
integer(pInt) file
|
|
|
|
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
|
|
|
|
2007-03-27 00:25:54 +05:30
|
|
|
constitutive_parse_unknownPart=''
|
|
|
|
|
2007-03-28 23:18:59 +05:30
|
|
|
do
|
2007-03-27 00:25:54 +05:30
|
|
|
read(file,'(a80)',END=100) line
|
|
|
|
positions=IO_stringPos(line,maxNchunks)
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,1))
|
2007-03-27 01:46:37 +05:30
|
|
|
if (tag(1:1)=='<'.AND.tag(len_trim(tag):len_trim(tag))=='>') then
|
|
|
|
constitutive_Parse_UnknownPart=tag(2:len_trim(tag)-1)
|
2007-03-24 01:07:18 +05:30
|
|
|
exit
|
|
|
|
endif
|
|
|
|
enddo
|
2007-03-22 21:59:06 +05:30
|
|
|
100 return
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
end function
|
2007-03-22 17:35:24 +05:30
|
|
|
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
character(len=80) function constitutive_Parse_MaterialPart(file)
|
|
|
|
!*********************************************************************
|
|
|
|
!* This function reads a material "part" from the input file until *
|
|
|
|
!* the next part is reached *
|
|
|
|
!* INPUT: *
|
|
|
|
!* - file : file ID *
|
|
|
|
!*********************************************************************
|
2007-03-22 21:59:06 +05:30
|
|
|
use prec, only: pInt
|
2007-03-27 00:25:54 +05:30
|
|
|
use IO
|
2007-03-22 21:59:06 +05:30
|
|
|
implicit none
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
!* Definition of variables
|
|
|
|
character(len=80) line,tag
|
2007-03-28 15:04:38 +05:30
|
|
|
integer(pInt), parameter :: maxNchunks = 2
|
2007-03-22 21:59:06 +05:30
|
|
|
integer(pInt) file,section
|
|
|
|
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
|
|
|
|
|
|
|
section = 0
|
|
|
|
constitutive_parse_materialPart = ''
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
do while(.true.)
|
2007-03-27 00:25:54 +05:30
|
|
|
read(file,'(a80)',END=100) line
|
|
|
|
positions=IO_stringPos(line,maxNchunks) ! parse leading chunks
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,1))
|
2007-03-24 01:07:18 +05:30
|
|
|
if (tag(1:1)=='#') then ! skip comment line
|
|
|
|
cycle
|
2007-03-27 01:46:37 +05:30
|
|
|
elseif (tag(1:1)=='<'.AND.tag(len_trim(tag):len_trim(tag))=='>') then
|
|
|
|
constitutive_parse_materialPart=tag(2:len_trim(tag)-1)
|
2007-03-24 01:07:18 +05:30
|
|
|
exit
|
2007-03-27 00:25:54 +05:30
|
|
|
elseif (tag(1:1)=='[') then
|
|
|
|
section=section+1
|
2007-03-24 01:07:18 +05:30
|
|
|
else
|
|
|
|
if (section>0) then
|
|
|
|
select case(tag)
|
|
|
|
case ('crystal_structure')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_CrystalStructure(section)=IO_intValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('nslip')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_Nslip(section)=IO_intValue(line,positions,2)
|
2007-03-27 00:25:54 +05:30
|
|
|
case ('c11')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_C11(section)=IO_floatValue(line,positions,2)
|
2007-03-27 00:25:54 +05:30
|
|
|
case ('c12')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_C12(section)=IO_floatValue(line,positions,2)
|
2007-03-27 00:25:54 +05:30
|
|
|
case ('c13')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_C13(section)=IO_floatValue(line,positions,2)
|
2007-03-27 00:25:54 +05:30
|
|
|
case ('c33')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_C33(section)=IO_floatValue(line,positions,2)
|
2007-03-27 00:25:54 +05:30
|
|
|
case ('c44')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_C44(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('s0_slip')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_s0_slip(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('gdot0_slip')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_gdot0_slip(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('n_slip')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_n_slip(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('h0')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_h0(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('s_sat')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_s_sat(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('w0')
|
2007-03-27 01:46:37 +05:30
|
|
|
material_w0(section)=IO_floatValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
end select
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
enddo
|
2007-03-22 21:59:06 +05:30
|
|
|
100 return
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
end function
|
2007-03-22 17:35:24 +05:30
|
|
|
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
character(len=80) function constitutive_Parse_TexturePart(file)
|
|
|
|
!*********************************************************************
|
|
|
|
!* This function reads a texture "part" from the input file until *
|
|
|
|
!* the next part is reached *
|
|
|
|
!* INPUT: *
|
|
|
|
!* - file : file ID *
|
|
|
|
!*********************************************************************
|
2007-03-22 21:59:06 +05:30
|
|
|
use prec, only: pInt
|
2007-03-27 00:25:54 +05:30
|
|
|
use IO
|
2007-03-28 19:02:54 +05:30
|
|
|
use math, only: inRad
|
2007-03-22 21:59:06 +05:30
|
|
|
implicit none
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
!* Definition of variables
|
|
|
|
character(len=80) line,tag
|
2007-03-27 21:42:14 +05:30
|
|
|
integer(pInt), parameter :: maxNchunks = 13 ! may be more than 10 chunks ..?
|
|
|
|
integer(pInt) file,pos,section,gaussCount,fiberCount,i
|
2007-03-22 21:59:06 +05:30
|
|
|
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
|
|
|
|
|
|
|
section = 0
|
2007-03-27 21:42:14 +05:30
|
|
|
gaussCount = 0
|
|
|
|
fiberCount = 0
|
2007-03-22 21:59:06 +05:30
|
|
|
constitutive_parse_texturePart = ''
|
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
do while(.true.)
|
2007-03-27 00:25:54 +05:30
|
|
|
read(file,'(a80)',END=100) line
|
|
|
|
positions=IO_stringPos(line,maxNchunks) ! parse leading chunks
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,1))
|
2007-03-24 01:07:18 +05:30
|
|
|
if (tag(1:1)=='#') then ! skip comment line
|
|
|
|
cycle
|
2007-03-27 01:46:37 +05:30
|
|
|
elseif (tag(1:1)=='<'.AND.tag(len_trim(tag):len_trim(tag))=='>') then
|
|
|
|
constitutive_parse_texturePart=tag(2:len_trim(tag)-1)
|
2007-03-24 01:07:18 +05:30
|
|
|
exit
|
2007-03-27 00:25:54 +05:30
|
|
|
elseif (tag(1:1)=='[') then
|
|
|
|
section=section+1
|
2007-03-27 21:42:14 +05:30
|
|
|
gaussCount=0
|
|
|
|
fiberCount=0
|
2007-03-24 01:07:18 +05:30
|
|
|
else
|
|
|
|
if (section>0) then
|
|
|
|
select case(tag)
|
|
|
|
case ('hybridIA')
|
2007-03-27 01:46:37 +05:30
|
|
|
texture_ODFfile(section)=IO_stringValue(line,positions,2)
|
2007-03-27 21:42:14 +05:30
|
|
|
case ('(gauss)')
|
|
|
|
gaussCount=gaussCount+1
|
|
|
|
do i=2,10,2
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,i))
|
|
|
|
select case (tag)
|
|
|
|
case('phi1')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_Gauss(1,gaussCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('phi')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_Gauss(2,gaussCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('phi2')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_Gauss(3,gaussCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('scatter')
|
2007-03-28 23:18:59 +05:30
|
|
|
texture_Gauss(4,gaussCount,section)=IO_floatValue(line,positions,i+1)
|
2007-03-27 21:42:14 +05:30
|
|
|
case('fraction')
|
2007-03-28 23:18:59 +05:30
|
|
|
texture_Gauss(5,gaussCount,section)=IO_floatValue(line,positions,i+1)
|
2007-03-27 21:42:14 +05:30
|
|
|
end select
|
|
|
|
enddo
|
|
|
|
case ('(fiber)')
|
|
|
|
fiberCount=fiberCount+1
|
|
|
|
do i=2,12,2
|
|
|
|
tag=IO_lc(IO_stringValue(line,positions,i))
|
|
|
|
select case (tag)
|
|
|
|
case('alpha1')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_fiber(1,fiberCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('alpha2')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_fiber(2,fiberCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('beta1')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_fiber(3,fiberCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('beta2')
|
2007-03-28 19:02:54 +05:30
|
|
|
texture_fiber(4,fiberCount,section)=IO_floatValue(line,positions,i+1)*inRad
|
2007-03-27 21:42:14 +05:30
|
|
|
case('scatter')
|
|
|
|
texture_fiber(5,fiberCount,section)=IO_floatValue(line,positions,i+1)
|
|
|
|
case('fraction')
|
|
|
|
texture_fiber(6,fiberCount,section)=IO_floatValue(line,positions,i+1)
|
|
|
|
end select
|
|
|
|
enddo
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('ngrains')
|
2007-03-27 01:46:37 +05:30
|
|
|
texture_Ngrains(section)=IO_intValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
case ('symmetry')
|
2007-03-27 01:46:37 +05:30
|
|
|
texture_symmetry(section)=IO_stringValue(line,positions,2)
|
2007-03-24 01:07:18 +05:30
|
|
|
end select
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
enddo
|
2007-03-22 21:59:06 +05:30
|
|
|
100 return
|
2007-03-22 17:35:24 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
end function
|
2007-03-22 17:35:24 +05:30
|
|
|
|
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
subroutine constitutive_Parse_MatTexDat(filename)
|
2007-03-24 01:07:18 +05:30
|
|
|
!*********************************************************************
|
|
|
|
!* This function reads the material and texture input file *
|
|
|
|
!* INPUT: *
|
|
|
|
!* - filename : name of input file *
|
2007-04-10 17:59:11 +05:30
|
|
|
!*********************************************************************
|
2007-03-22 02:40:22 +05:30
|
|
|
use prec, only: pReal,pInt
|
2007-03-28 23:18:59 +05:30
|
|
|
use IO, only: IO_error
|
2007-04-04 19:27:32 +05:30
|
|
|
use math, only: math_Mandel3333to66, math_Voigt66to3333
|
2007-03-22 21:59:06 +05:30
|
|
|
implicit none
|
2007-03-21 19:19:47 +05:30
|
|
|
|
2007-03-24 01:07:18 +05:30
|
|
|
!* Definition of variables
|
2007-03-22 21:59:06 +05:30
|
|
|
character(len=*) filename
|
|
|
|
character(len=80) part,formerPart
|
2007-03-28 23:18:59 +05:30
|
|
|
integer(pInt) sectionCount,i,j,k
|
2007-03-21 22:27:32 +05:30
|
|
|
|
2007-04-04 19:27:32 +05:30
|
|
|
!-----------------------------
|
2007-03-24 01:07:18 +05:30
|
|
|
!* First reading: number of materials and textures
|
2007-04-04 19:27:32 +05:30
|
|
|
!-----------------------------
|
2007-03-28 23:18:59 +05:30
|
|
|
!* determine material_maxN and texture_maxN from last respective parts
|
2007-03-27 00:25:54 +05:30
|
|
|
open(1,FILE=filename,ACTION='READ',STATUS='OLD',ERR=100)
|
2007-03-22 21:59:06 +05:30
|
|
|
part = '_dummy_'
|
|
|
|
do while (part/='')
|
2007-03-24 01:07:18 +05:30
|
|
|
formerPart = part
|
2007-03-27 00:25:54 +05:30
|
|
|
call constitutive_CountSections(1,sectionCount,part)
|
2007-03-24 01:07:18 +05:30
|
|
|
select case (formerPart)
|
2007-03-27 01:46:37 +05:30
|
|
|
case ('materials')
|
|
|
|
material_maxN = sectionCount
|
|
|
|
case ('textures')
|
|
|
|
texture_maxN = sectionCount
|
2007-03-24 01:07:18 +05:30
|
|
|
end select
|
2007-03-27 00:25:54 +05:30
|
|
|
enddo
|
2007-04-04 19:27:32 +05:30
|
|
|
!* Array allocation
|
2007-03-27 21:42:14 +05:30
|
|
|
allocate(material_CrystalStructure(material_maxN)) ; material_CrystalStructure=0_pInt
|
|
|
|
allocate(material_Nslip(material_maxN)) ; material_Nslip=0_pInt
|
|
|
|
allocate(material_C11(material_maxN)) ; material_C11=0.0_pReal
|
|
|
|
allocate(material_C12(material_maxN)) ; material_C12=0.0_pReal
|
|
|
|
allocate(material_C13(material_maxN)) ; material_C13=0.0_pReal
|
|
|
|
allocate(material_C33(material_maxN)) ; material_C33=0.0_pReal
|
|
|
|
allocate(material_C44(material_maxN)) ; material_C44=0.0_pReal
|
2007-03-28 15:04:38 +05:30
|
|
|
allocate(material_Cslip_66(6,6,material_maxN)) ; material_Cslip_66=0.0_pReal
|
2007-03-27 21:42:14 +05:30
|
|
|
allocate(material_s0_slip(material_maxN)) ; material_s0_slip=0.0_pReal
|
|
|
|
allocate(material_gdot0_slip(material_maxN)) ; material_gdot0_slip=0.0_pReal
|
|
|
|
allocate(material_n_slip(material_maxN)) ; material_n_slip=0.0_pReal
|
|
|
|
allocate(material_h0(material_maxN)) ; material_h0=0.0_pReal
|
|
|
|
allocate(material_s_sat(material_maxN)) ; material_s_sat=0.0_pReal
|
|
|
|
allocate(material_w0(material_maxN)) ; material_w0=0.0_pReal
|
|
|
|
allocate(texture_ODFfile(texture_maxN)) ; texture_ODFfile=''
|
|
|
|
allocate(texture_Ngrains(texture_maxN)) ; texture_Ngrains=0_pInt
|
|
|
|
allocate(texture_symmetry(texture_maxN)) ; texture_symmetry=''
|
2007-03-28 23:18:59 +05:30
|
|
|
allocate(texture_NGauss(texture_maxN)) ; texture_NGauss=0_pInt
|
|
|
|
allocate(texture_NFiber(texture_maxN)) ; texture_NFiber=0_pInt
|
|
|
|
allocate(texture_NRandom(texture_maxN)) ; texture_NRandom=0_pInt
|
|
|
|
|
2007-04-04 19:27:32 +05:30
|
|
|
!-----------------------------
|
2007-03-28 23:18:59 +05:30
|
|
|
!* Second reading: number of Gauss and Fiber
|
2007-04-04 19:27:32 +05:30
|
|
|
!-----------------------------
|
2007-03-28 23:18:59 +05:30
|
|
|
rewind(1)
|
|
|
|
part = '_dummy_'
|
|
|
|
do while (part/='')
|
|
|
|
select case (part)
|
|
|
|
case ('textures')
|
|
|
|
part = constitutive_assignNGaussAndFiber(1)
|
|
|
|
case default
|
|
|
|
part = constitutive_Parse_UnknownPart(1)
|
|
|
|
end select
|
|
|
|
enddo
|
2007-04-04 19:27:32 +05:30
|
|
|
!* Array allocation
|
2007-03-28 23:18:59 +05:30
|
|
|
texture_maxNGauss=maxval(texture_NGauss)
|
|
|
|
texture_maxNFiber=maxval(texture_NFiber)
|
|
|
|
allocate(texture_Gauss(5,texture_maxNGauss,texture_maxN)) ; texture_Gauss=0.0_pReal
|
|
|
|
allocate(texture_Fiber(6,texture_maxNFiber,texture_maxN)) ; texture_Fiber=0.0_pReal
|
2007-03-27 21:42:14 +05:30
|
|
|
|
2007-04-04 19:27:32 +05:30
|
|
|
!-----------------------------
|
2007-03-27 21:42:14 +05:30
|
|
|
!* Third reading: materials and textures are stored
|
2007-04-04 19:27:32 +05:30
|
|
|
!-----------------------------
|
2007-03-28 23:18:59 +05:30
|
|
|
rewind(1)
|
2007-03-27 00:25:54 +05:30
|
|
|
part='_dummy_'
|
2007-03-22 21:59:06 +05:30
|
|
|
do while (part/='')
|
2007-03-27 00:25:54 +05:30
|
|
|
select case (part)
|
2007-03-27 01:46:37 +05:30
|
|
|
case ('materials')
|
2007-03-27 00:25:54 +05:30
|
|
|
part=constitutive_Parse_MaterialPart(1)
|
2007-03-27 01:46:37 +05:30
|
|
|
case ('textures')
|
2007-03-27 00:25:54 +05:30
|
|
|
part=constitutive_Parse_TexturePart(1)
|
|
|
|
case default
|
|
|
|
part=constitutive_Parse_UnknownPart(1)
|
|
|
|
end select
|
|
|
|
enddo
|
2007-03-28 15:04:38 +05:30
|
|
|
close(1)
|
2007-04-10 17:59:11 +05:30
|
|
|
|
2007-03-27 00:25:54 +05:30
|
|
|
|
2007-03-28 00:21:11 +05:30
|
|
|
!* Construction of the elasticity matrices
|
|
|
|
do i=1,material_maxN
|
|
|
|
select case (material_CrystalStructure(i))
|
2007-03-28 23:18:59 +05:30
|
|
|
case(1:2) ! cubic(s)
|
2007-03-28 00:21:11 +05:30
|
|
|
do k=1,3
|
|
|
|
do j=1,3
|
|
|
|
material_Cslip_66(k,j,i)=material_C12(i)
|
|
|
|
enddo
|
|
|
|
material_Cslip_66(k,k,i)=material_C11(i)
|
|
|
|
material_Cslip_66(k+3,k+3,i)=material_C44(i)
|
|
|
|
enddo
|
2007-03-28 23:18:59 +05:30
|
|
|
case(3) ! hcp
|
2007-03-28 00:21:11 +05:30
|
|
|
material_Cslip_66(1,1,i)=material_C11(i)
|
|
|
|
material_Cslip_66(2,2,i)=material_C11(i)
|
|
|
|
material_Cslip_66(3,3,i)=material_C33(i)
|
|
|
|
material_Cslip_66(1,2,i)=material_C12(i)
|
|
|
|
material_Cslip_66(2,1,i)=material_C12(i)
|
|
|
|
material_Cslip_66(1,3,i)=material_C13(i)
|
|
|
|
material_Cslip_66(3,1,i)=material_C13(i)
|
|
|
|
material_Cslip_66(2,3,i)=material_C13(i)
|
|
|
|
material_Cslip_66(3,2,i)=material_C13(i)
|
|
|
|
material_Cslip_66(4,4,i)=material_C44(i)
|
|
|
|
material_Cslip_66(5,5,i)=material_C44(i)
|
|
|
|
material_Cslip_66(6,6,i)=0.5_pReal*(material_C11(i)-material_C12(i))
|
|
|
|
end select
|
2007-04-04 19:27:32 +05:30
|
|
|
material_Cslip_66(:,:,i) = math_Mandel3333to66(math_Voigt66to3333(material_Cslip_66(:,:,i)))
|
2007-03-28 00:21:11 +05:30
|
|
|
enddo
|
2007-04-10 17:59:11 +05:30
|
|
|
|
2007-03-22 21:59:06 +05:30
|
|
|
|
|
|
|
! MISSING some consistency checks may be..?
|
2007-04-10 17:59:11 +05:30
|
|
|
! if ODFfile present then set NGauss NFiber =0
|
|
|
|
return
|
|
|
|
100 call IO_error(110) ! corrupt materials_textures file
|
2007-03-27 00:25:54 +05:30
|
|
|
end subroutine
|
|
|
|
|
|
|
|
|
2007-03-28 19:21:28 +05:30
|
|
|
subroutine constitutive_Assignment()
|
2007-03-27 18:21:56 +05:30
|
|
|
!*********************************************************************
|
|
|
|
!* This subroutine assign material parameters according to ipc,ip,el *
|
|
|
|
!*********************************************************************
|
|
|
|
use prec, only: pReal,pInt
|
2007-04-04 19:27:32 +05:30
|
|
|
use math, only: math_sampleGaussOri,math_sampleFiberOri,math_sampleRandomOri,math_symmetricEulers,math_EulerToR
|
2007-03-30 01:03:12 +05:30
|
|
|
use mesh, only: mesh_NcpElems,FE_Nips,FE_mapElemtype,mesh_maxNips,mesh_element
|
2007-04-04 19:27:32 +05:30
|
|
|
use IO, only: IO_hybridIA
|
2007-04-10 17:59:11 +05:30
|
|
|
use CPFEM,only: CPFEM_Fp_old
|
2007-03-27 18:21:56 +05:30
|
|
|
implicit none
|
|
|
|
|
|
|
|
!* Definition of variables
|
2007-04-04 19:27:32 +05:30
|
|
|
integer(pInt) e,i,j,k,l,m,o,g,s,Ngrains
|
2007-03-30 01:03:12 +05:30
|
|
|
integer(pInt) matID,texID
|
2007-04-04 19:27:32 +05:30
|
|
|
integer(pInt), dimension(:,:,:), allocatable :: hybridIA_population
|
|
|
|
integer(pInt), dimension(texture_maxN) :: Ncomponents,Nsym,multiplicity,sumVolfrac,ODFmap,sampleCount
|
|
|
|
real(pReal), dimension(3,4*(1+texture_maxNGauss+texture_maxNfiber)) :: Euler
|
|
|
|
real(pReal), dimension(4*(1+texture_maxNGauss+texture_maxNfiber)) :: texVolfrac
|
|
|
|
|
|
|
|
! process textures
|
|
|
|
o = 0_pInt ! ODF counter
|
|
|
|
ODFmap = 0_pInt ! blank mapping
|
|
|
|
sampleCount = 0_pInt ! count orientations assigned per texture
|
2007-03-28 23:18:59 +05:30
|
|
|
|
2007-03-30 01:03:12 +05:30
|
|
|
do texID=1,texture_maxN
|
|
|
|
if (texture_ODFfile(texID)=='') then
|
|
|
|
sumVolfrac(texID) = sum(texture_gauss(5,:,texID))+sum(texture_fiber(6,:,texID))
|
2007-04-04 19:27:32 +05:30
|
|
|
if (sumVolfrac(texID)<1.0_pReal) texture_NRandom(texID) = 1_pInt ! check whether random component missing
|
|
|
|
select case (texture_symmetry(texID)) ! set symmetry factor
|
2007-03-30 01:03:12 +05:30
|
|
|
case ('orthotropic')
|
2007-04-04 19:27:32 +05:30
|
|
|
Nsym(texID) = 4_pInt
|
2007-03-30 01:03:12 +05:30
|
|
|
case ('monoclinic')
|
2007-04-04 19:27:32 +05:30
|
|
|
Nsym(texID) = 2_pInt
|
2007-03-30 01:03:12 +05:30
|
|
|
case default
|
2007-04-04 19:27:32 +05:30
|
|
|
Nsym(texID) = 1_pInt
|
2007-03-30 01:03:12 +05:30
|
|
|
end select
|
|
|
|
Ncomponents(texID) = texture_NGauss(texID)+texture_NFiber(texID)+texture_NRandom(texID)
|
2007-04-04 19:27:32 +05:30
|
|
|
else ! hybrid IA
|
|
|
|
o = o+1
|
|
|
|
ODFmap(texID) = o ! remember mapping
|
|
|
|
Ncomponents(texID) = 1_pInt ! single "component"
|
|
|
|
Nsym(texID) = 1_pInt ! no symmetry (use full ODF instead)
|
|
|
|
endif
|
|
|
|
! adjust multiplicity and number of grains per IP of components
|
|
|
|
multiplicity(texID) = max(1_pInt,texture_Ngrains(texID)/Ncomponents(texID)/Nsym(texID))
|
|
|
|
if (mod(texture_Ngrains(texID),Ncomponents(texID)*Nsym(texID)) /= 0_pInt) then
|
|
|
|
texture_Ngrains(texID) = multiplicity(texID)*Ncomponents(texID)*Nsym(texID)
|
|
|
|
write (6,*) 'changed Ngrains to',texture_Ngrains(texID),' for texture',texID
|
2007-03-28 23:18:59 +05:30
|
|
|
endif
|
|
|
|
enddo
|
2007-03-27 18:21:56 +05:30
|
|
|
|
2007-04-04 19:27:32 +05:30
|
|
|
!* publish globals
|
|
|
|
constitutive_maxNgrains = maxval(texture_Ngrains)
|
|
|
|
constitutive_maxNstatevars = material_maxNslip
|
|
|
|
|
|
|
|
!* calc texture_totalNgrains
|
2007-03-30 01:03:12 +05:30
|
|
|
allocate(texture_totalNgrains(texture_maxN)) ; texture_totalNgrains=0_pInt
|
2007-03-28 19:02:54 +05:30
|
|
|
do i=1,mesh_NcpElems
|
2007-04-04 19:27:32 +05:30
|
|
|
texID = mesh_element(4,i)
|
2007-03-30 01:03:12 +05:30
|
|
|
texture_totalNgrains(texID) = texture_totalNgrains(texID) + FE_Nips(FE_mapElemtype(mesh_element(2,i)))*texture_Ngrains(texID)
|
2007-03-28 19:02:54 +05:30
|
|
|
enddo
|
2007-03-30 01:03:12 +05:30
|
|
|
|
|
|
|
! generate hybridIA samplings for ODFfile textures to later draw from these populations
|
2007-04-04 19:27:32 +05:30
|
|
|
allocate(hybridIA_population(3,maxval(texture_totalNgrains,ODFmap /= 0),o))
|
|
|
|
do texID = 1,texture_maxN
|
|
|
|
if (ODFmap(texID) > 0) &
|
|
|
|
hybridIA_population(:,:,ODFmap(texID)) = IO_hybridIA(texture_totalNgrains(texID),texture_ODFfile(texID))
|
|
|
|
enddo
|
2007-03-30 01:03:12 +05:30
|
|
|
|
2007-04-04 19:27:32 +05:30
|
|
|
!* Array allocation
|
2007-03-30 01:03:12 +05:30
|
|
|
allocate(constitutive_Ngrains(mesh_maxNips,mesh_NcpElems)) ; constitutive_Ngrains=0_pInt
|
|
|
|
allocate(constitutive_matID(constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; constitutive_matID=0_pInt
|
|
|
|
allocate(constitutive_texID(constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; constitutive_texID=0_pInt
|
|
|
|
allocate(constitutive_MatVolFrac(constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; constitutive_MatVolFrac=0.0_pReal
|
|
|
|
allocate(constitutive_TexVolFrac(constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; constitutive_TexVolFrac=0.0_pReal
|
|
|
|
allocate(constitutive_Nstatevars(constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; constitutive_Nstatevars=0_pInt
|
2007-03-28 15:04:38 +05:30
|
|
|
allocate(constitutive_state_old(constitutive_maxNstatevars,constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems))
|
2007-03-27 18:21:56 +05:30
|
|
|
constitutive_state_old=0.0_pReal
|
2007-03-28 15:04:38 +05:30
|
|
|
allocate(constitutive_state_new(constitutive_maxNstatevars,constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems))
|
2007-03-27 18:21:56 +05:30
|
|
|
constitutive_state_new=0.0_pReal
|
2007-03-30 01:03:12 +05:30
|
|
|
allocate(constitutive_Nresults(constitutive_maxNgrains,mesh_maxNips,mesh_NcpElems)) ; constitutive_Nresults=0_pInt
|
2007-03-28 23:18:59 +05:30
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
!* Assignment of all grains in all IPs of all cp-elements
|
2007-04-04 19:27:32 +05:30
|
|
|
do e=1,mesh_NcpElems
|
|
|
|
matID=mesh_element(3,e)
|
|
|
|
texID=mesh_element(4,e)
|
|
|
|
do i=1,FE_Nips(FE_mapElemtype(mesh_element(2,e)))
|
2007-04-10 17:59:11 +05:30
|
|
|
g = 0_pInt ! grain counter
|
2007-04-04 19:27:32 +05:30
|
|
|
do m = 1,multiplicity(texID)
|
2007-04-10 17:59:11 +05:30
|
|
|
o = 0_pInt ! component counter
|
2007-04-04 19:27:32 +05:30
|
|
|
if (texture_ODFfile(texID)=='') then
|
|
|
|
do k = 1,texture_nGauss(texID) ! *** gauss ***
|
|
|
|
o = o+1
|
|
|
|
Euler(:,o) = math_sampleGaussOri(texture_Gauss(1:3,k,texID),texture_Gauss(4,k,texID))
|
|
|
|
texVolFrac(o) = texture_Gauss(5,k,texID)
|
|
|
|
enddo
|
|
|
|
do k = 1,texture_nFiber(texID) ! *** fiber ***
|
|
|
|
o = o+1
|
|
|
|
Euler(:,o) = math_sampleFiberOri(texture_Fiber(1:2,k,texID),texture_Fiber(3:4,k,texID),texture_Fiber(5,k,texID))
|
|
|
|
texVolFrac(o) = texture_Fiber(6,k,texID)
|
|
|
|
enddo
|
|
|
|
do k = 1,texture_nRandom(texID) ! *** random ***
|
|
|
|
o = o+1
|
|
|
|
Euler(:,o) = math_sampleRandomOri()
|
|
|
|
texVolfrac(o) = 1.0_pReal-sumVolfrac(texID)
|
|
|
|
enddo
|
2007-04-10 17:59:11 +05:30
|
|
|
else ! *** hybrid IA ***
|
|
|
|
o = 1 ! only singular orientation, i.e. single "component"
|
2007-04-04 19:27:32 +05:30
|
|
|
Euler(:,o) = hybridIA_population(:,1+sampleCount(texID),ODFmap(texID))
|
|
|
|
texVolfrac(o) = 1.0_pReal
|
|
|
|
endif
|
|
|
|
if (Nsym(texID) > 1) then ! symmetry generates additional orientations
|
|
|
|
forall (k=1:o)
|
|
|
|
Euler(:,1+o+(Nsym(texID)-1)*(k-1):3+o+(Nsym(texID)-1)*(k-1)) = &
|
|
|
|
math_symmetricEulers(texture_symmetry(texID),Euler(:,k))
|
|
|
|
texVolfrac(1+o+(Nsym(texID)-1)*(k-1):3+o+(Nsym(texID)-1)*(k-1)) = texVolfrac(k)
|
|
|
|
end forall
|
|
|
|
endif
|
|
|
|
do s = 1,Nsym(texID)*o ! loop over orientations to be assigned to ip (ex multiplicity)
|
|
|
|
g = g+1 ! next "grain"
|
|
|
|
sampleCount(texID) = sampleCount(texID)+1 ! next member of population
|
|
|
|
constitutive_matID(g,i,e) = matID ! copy matID of element
|
|
|
|
constitutive_texID(g,i,e) = texID ! copy texID of element
|
|
|
|
constitutive_MatVolFrac(g,i,e) = 1.0_pReal ! singular material (so far)
|
|
|
|
constitutive_TexVolFrac(g,i,e) = texVolfrac(s)/multiplicity(texID)/Nsym(texID)
|
2007-04-10 17:59:11 +05:30
|
|
|
constitutive_Nstatevars(g,i,e) = material_Nslip(matID) ! number of state variables (i.e. tau_c of each slip system)
|
|
|
|
CPFEM_Fp_old(:,:,g,i,e) = math_EulerToR(Euler(:,s)) ! set plastic deformation gradient at t_0
|
2007-04-04 19:27:32 +05:30
|
|
|
forall (l=1:constitutive_Nstatevars(g,i,e)) ! initialize state variables
|
|
|
|
constitutive_state_old(l,g,i,e) = material_s0_slip(matID)
|
|
|
|
constitutive_state_new(l,g,i,e) = material_s0_slip(matID)
|
|
|
|
end forall
|
2007-04-10 17:59:11 +05:30
|
|
|
enddo ! components
|
2007-04-04 19:27:32 +05:30
|
|
|
enddo ! multiplicity
|
|
|
|
enddo ! ip
|
|
|
|
enddo ! cp_element
|
|
|
|
|
2007-03-28 19:02:54 +05:30
|
|
|
|
2007-03-27 18:21:56 +05:30
|
|
|
end subroutine
|
|
|
|
|
|
|
|
|
2007-04-11 15:33:43 +05:30
|
|
|
function constitutive_homogenizedC(ipc,ip,el)
|
2007-03-28 00:21:11 +05:30
|
|
|
!*********************************************************************
|
2007-04-04 19:27:32 +05:30
|
|
|
!* This function returns the homogenized elacticity matrix *
|
2007-03-28 00:21:11 +05:30
|
|
|
!* INPUT: *
|
|
|
|
!* - ipc : component-ID of current integration point *
|
|
|
|
!* - ip : current integration point *
|
|
|
|
!* - el : current element *
|
|
|
|
!*********************************************************************
|
|
|
|
use prec, only: pReal,pInt
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
!* Definition of variables
|
|
|
|
integer(pInt) ipc,ip,el
|
2007-03-28 15:04:38 +05:30
|
|
|
real(pReal), dimension(6,6) :: constitutive_homogenizedC
|
2007-03-28 00:21:11 +05:30
|
|
|
|
|
|
|
!* Homogenization scheme
|
|
|
|
constitutive_homogenizedC=constitutive_MatVolFrac(ipc,ip,el)*material_Cslip_66(:,:,constitutive_matID(ipc,ip,el))
|
|
|
|
|
|
|
|
return
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
subroutine constitutive_LpAndItsTangent(Lp,dLp_dTstar, Tstar_v,state,ipc,ip,el)
|
2007-03-21 19:19:47 +05:30
|
|
|
!*********************************************************************
|
2007-03-24 01:07:18 +05:30
|
|
|
!* This subroutine contains the constitutive equation for *
|
|
|
|
!* calculating the velocity gradient *
|
2007-03-21 19:19:47 +05:30
|
|
|
!* INPUT: *
|
2007-04-10 16:50:05 +05:30
|
|
|
!* - Tstar_v : 2nd Piola Kirchhoff stress tensor (Mandel) *
|
2007-04-10 17:59:11 +05:30
|
|
|
!* - state : current microstructure *
|
2007-03-24 01:07:18 +05:30
|
|
|
!* - ipc : component-ID of current integration point *
|
|
|
|
!* - ip : current integration point *
|
|
|
|
!* - el : current element *
|
2007-03-28 00:21:11 +05:30
|
|
|
!* OUTPUT: *
|
2007-03-27 00:25:54 +05:30
|
|
|
!* - Lp : plastic velocity gradient *
|
2007-03-28 00:21:11 +05:30
|
|
|
!* - dLp_dTstar : derivative of Lp (4th-order tensor) *
|
2007-04-10 17:59:11 +05:30
|
|
|
!*********************************************************************
|
2007-03-21 19:19:47 +05:30
|
|
|
use prec, only: pReal,pInt
|
2007-04-10 17:59:11 +05:30
|
|
|
implicit none
|
2007-03-21 19:19:47 +05:30
|
|
|
|
|
|
|
!* Definition of variables
|
2007-03-27 00:25:54 +05:30
|
|
|
integer(pInt) ipc,ip,el
|
2007-04-10 17:59:11 +05:30
|
|
|
integer(pInt) matID,i,k,l,m,n
|
2007-04-11 15:33:43 +05:30
|
|
|
real(pReal), dimension(6) :: Tstar_v
|
|
|
|
real(pReal), dimension(3,3) :: Lp
|
|
|
|
real(pReal), dimension(3,3,3,3) :: dLp_dTstar
|
2007-04-10 17:59:11 +05:30
|
|
|
real(pReal), dimension(constitutive_Nstatevars(ipc,ip,el)) :: state,gdot_slip,dgdot_dtauslip,tau_slip
|
|
|
|
|
2007-03-27 00:25:54 +05:30
|
|
|
!* Get the material-ID from the triplet(ipc,ip,el)
|
2007-04-10 17:59:11 +05:30
|
|
|
matID = constitutive_matID(ipc,ip,el)
|
2007-03-27 00:25:54 +05:30
|
|
|
|
|
|
|
!* Calculation of Lp
|
2007-04-10 17:59:11 +05:30
|
|
|
Lp = 0.0_pReal
|
2007-03-27 01:46:37 +05:30
|
|
|
do i=1,material_Nslip(matID)
|
|
|
|
tau_slip(i)=dot_product(Tstar_v,constitutive_Sslip_v(:,i,material_CrystalStructure(matID)))
|
2007-04-10 17:59:11 +05:30
|
|
|
gdot_slip(i)=material_gdot0_slip(matID)*(abs(tau_slip(i))/state(i))**&
|
2007-03-29 16:43:40 +05:30
|
|
|
material_n_slip(matID)*sign(1.0_pReal,tau_slip(i))
|
2007-03-27 01:46:37 +05:30
|
|
|
Lp=Lp+gdot_slip(i)*constitutive_Sslip(:,:,i,material_CrystalStructure(matID))
|
2007-03-27 00:25:54 +05:30
|
|
|
enddo
|
2007-03-21 19:19:47 +05:30
|
|
|
|
2007-03-27 00:25:54 +05:30
|
|
|
!* Calculation of the tangent of Lp
|
2007-04-10 17:59:11 +05:30
|
|
|
dLp_dTstar=0.0_pReal
|
2007-03-27 01:46:37 +05:30
|
|
|
do i=1,material_Nslip(matID)
|
2007-04-10 17:59:11 +05:30
|
|
|
dgdot_dtauslip(i)=material_gdot0_slip(matID)*(abs(tau_slip(i))/state(i))**&
|
2007-03-29 16:43:40 +05:30
|
|
|
(material_n_slip(matID)-1.0_pReal)*material_n_slip(matID)/constitutive_state_new(i,ipc,ip,el)
|
2007-03-28 00:21:11 +05:30
|
|
|
forall (k=1:3,l=1:3,m=1:3,n=1:3)
|
2007-03-29 16:43:40 +05:30
|
|
|
dLp_dTstar(k,l,m,n)=dLp_dTstar(k,l,m,n)+constitutive_Sslip(k,l,i,material_CrystalStructure(matID))*&
|
|
|
|
constitutive_Sslip(m,n,i,material_CrystalStructure(matID))*dgdot_dtauslip(i)
|
2007-03-28 23:18:59 +05:30
|
|
|
endforall
|
2007-03-27 00:25:54 +05:30
|
|
|
enddo
|
2007-03-24 01:07:18 +05:30
|
|
|
|
2007-04-10 17:59:11 +05:30
|
|
|
return
|
|
|
|
end subroutine
|
|
|
|
|
|
|
|
|
2007-04-11 15:33:43 +05:30
|
|
|
function constitutive_dotState(Tstar_v,state,ipc,ip,el)
|
2007-03-21 22:27:32 +05:30
|
|
|
!*********************************************************************
|
2007-03-24 01:07:18 +05:30
|
|
|
!* This subroutine contains the constitutive equation for *
|
|
|
|
!* calculating the velocity gradient *
|
2007-03-21 22:27:32 +05:30
|
|
|
!* INPUT: *
|
2007-04-10 16:50:05 +05:30
|
|
|
!* - Tstar_v : 2nd Piola Kirchhoff stress tensor (Mandel) *
|
2007-04-10 17:59:11 +05:30
|
|
|
!* - state : current microstructure *
|
2007-03-24 01:07:18 +05:30
|
|
|
!* - ipc : component-ID of current integration point *
|
|
|
|
!* - ip : current integration point *
|
|
|
|
!* - el : current element *
|
2007-03-27 00:25:54 +05:30
|
|
|
!* OUTPUT: *
|
|
|
|
!* - constitutive_DotState : evolution of state variable *
|
2007-04-10 17:59:11 +05:30
|
|
|
!*********************************************************************
|
2007-03-21 22:27:32 +05:30
|
|
|
use prec, only: pReal,pInt
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
!* Definition of variables
|
2007-03-27 00:25:54 +05:30
|
|
|
integer(pInt) ipc,ip,el
|
2007-04-10 17:59:11 +05:30
|
|
|
integer(pInt) matID,i
|
|
|
|
real(pReal), dimension(6) :: Tstar_v
|
2007-04-11 15:33:43 +05:30
|
|
|
real(pReal), dimension(constitutive_Nstatevars(ipc,ip,el)) :: constitutive_dotState,&
|
2007-04-10 17:59:11 +05:30
|
|
|
state,gdot_slip,tau_slip,self_hardening
|
2007-03-27 00:25:54 +05:30
|
|
|
|
|
|
|
!* Get the material-ID from the triplet(ipc,ip,el)
|
2007-04-10 17:59:11 +05:30
|
|
|
matID = constitutive_matID(ipc,ip,el)
|
2007-03-27 00:25:54 +05:30
|
|
|
|
|
|
|
!* Self-Hardening of each system
|
2007-03-28 15:04:38 +05:30
|
|
|
do i=1,constitutive_Nstatevars(ipc,ip,el)
|
2007-03-27 01:46:37 +05:30
|
|
|
tau_slip(i)=dot_product(Tstar_v,constitutive_Sslip_v(:,i,material_CrystalStructure(matID)))
|
2007-04-10 17:59:11 +05:30
|
|
|
gdot_slip(i)=material_gdot0_slip(matID)*(abs(tau_slip(i))/state(i))**&
|
2007-03-29 16:43:40 +05:30
|
|
|
material_n_slip(matID)*sign(1.0_pReal,tau_slip(i))
|
2007-04-10 17:59:11 +05:30
|
|
|
self_hardening(i)=material_h0(matID)*(1.0_pReal-state(i)/&
|
2007-03-29 16:43:40 +05:30
|
|
|
material_s_sat(matID))**material_w0(matID)*abs(gdot_slip(i))
|
2007-03-27 00:25:54 +05:30
|
|
|
enddo
|
|
|
|
|
|
|
|
!* Hardening for all systems
|
2007-04-11 15:33:43 +05:30
|
|
|
constitutive_dotState=matmul(constitutive_HardeningMatrix(1:material_Nslip(matID),1:material_Nslip(matID),&
|
2007-03-29 16:43:40 +05:30
|
|
|
material_CrystalStructure(matID)),self_hardening)
|
2007-04-10 17:59:11 +05:30
|
|
|
|
|
|
|
return
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
|
END MODULE
|