2013-03-22 23:05:05 +05:30
|
|
|
! Copyright 2011-13 Max-Planck-Institut für Eisenforschung GmbH
|
2012-07-03 16:46:38 +05:30
|
|
|
!
|
|
|
|
! This file is part of DAMASK,
|
|
|
|
! the Düsseldorf Advanced MAterial Simulation Kit.
|
|
|
|
!
|
|
|
|
! DAMASK is free software: you can redistribute it and/or modify
|
|
|
|
! it under the terms of the GNU General Public License as published by
|
|
|
|
! the Free Software Foundation, either version 3 of the License, or
|
|
|
|
! (at your option) any later version.
|
|
|
|
!
|
|
|
|
! DAMASK is distributed in the hope that it will be useful,
|
|
|
|
! but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
! GNU General Public License for more details.
|
|
|
|
!
|
|
|
|
! You should have received a copy of the GNU General Public License
|
|
|
|
! along with DAMASK. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
!
|
2013-05-17 22:39:42 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! $Id$
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief material subroutine for purely elastic material
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2012-07-03 16:46:38 +05:30
|
|
|
module constitutive_none
|
2013-05-17 22:39:42 +05:30
|
|
|
use prec, only: &
|
|
|
|
pReal, &
|
|
|
|
pInt
|
2013-11-27 21:50:27 +05:30
|
|
|
use lattice, only: &
|
2013-12-12 03:33:09 +05:30
|
|
|
LATTICE_undefined_ID
|
2012-07-03 16:46:38 +05:30
|
|
|
|
|
|
|
implicit none
|
|
|
|
private
|
2013-12-12 03:33:09 +05:30
|
|
|
integer(pInt), dimension(:), allocatable, public, protected :: &
|
2012-07-03 16:46:38 +05:30
|
|
|
constitutive_none_sizeDotState, &
|
|
|
|
constitutive_none_sizeState, &
|
2013-01-22 03:27:26 +05:30
|
|
|
constitutive_none_sizePostResults
|
2012-07-03 16:46:38 +05:30
|
|
|
|
2013-12-12 03:33:09 +05:30
|
|
|
integer(pInt), dimension(:,:), allocatable, target, public :: &
|
2013-07-01 11:40:42 +05:30
|
|
|
constitutive_none_sizePostResult !< size of each post result output
|
|
|
|
|
2013-12-12 03:33:09 +05:30
|
|
|
integer(kind(LATTICE_undefined_ID)), dimension(:), allocatable, public :: &
|
2013-11-27 21:50:27 +05:30
|
|
|
constitutive_none_structureID !< ID of the lattice structure
|
2012-07-03 16:46:38 +05:30
|
|
|
|
2013-12-12 03:33:09 +05:30
|
|
|
real(pReal), dimension(:,:,:), allocatable, private :: &
|
2012-07-03 16:46:38 +05:30
|
|
|
constitutive_none_Cslip_66
|
|
|
|
|
2013-05-17 22:39:42 +05:30
|
|
|
public :: &
|
|
|
|
constitutive_none_init, &
|
2013-10-16 18:34:59 +05:30
|
|
|
constitutive_none_homogenizedC
|
2013-05-17 22:39:42 +05:30
|
|
|
|
2013-07-01 11:40:42 +05:30
|
|
|
contains
|
2012-07-03 16:46:38 +05:30
|
|
|
|
|
|
|
|
2013-05-17 22:39:42 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-07-01 11:40:42 +05:30
|
|
|
!> @brief module initialization
|
|
|
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
2013-05-17 22:39:42 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-12-12 03:33:09 +05:30
|
|
|
subroutine constitutive_none_init(fileUnit)
|
2013-05-17 22:39:42 +05:30
|
|
|
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
2012-07-03 16:46:38 +05:30
|
|
|
use math, only: &
|
|
|
|
math_Mandel3333to66, &
|
|
|
|
math_Voigt66to3333
|
|
|
|
use IO, only: &
|
2013-06-27 00:49:00 +05:30
|
|
|
IO_read, &
|
2012-07-03 16:46:38 +05:30
|
|
|
IO_lc, &
|
|
|
|
IO_getTag, &
|
|
|
|
IO_isBlank, &
|
|
|
|
IO_stringPos, &
|
|
|
|
IO_stringValue, &
|
|
|
|
IO_floatValue, &
|
2013-02-25 22:04:59 +05:30
|
|
|
IO_error, &
|
2013-12-12 03:33:09 +05:30
|
|
|
IO_timeStamp, &
|
|
|
|
IO_EOF
|
2012-07-03 16:46:38 +05:30
|
|
|
use material
|
|
|
|
use debug, only: &
|
2012-07-05 15:24:50 +05:30
|
|
|
debug_level, &
|
2012-07-03 16:46:38 +05:30
|
|
|
debug_constitutive, &
|
|
|
|
debug_levelBasic
|
2013-11-27 21:50:27 +05:30
|
|
|
use lattice
|
2012-07-03 16:46:38 +05:30
|
|
|
|
|
|
|
implicit none
|
2013-12-12 03:33:09 +05:30
|
|
|
integer(pInt), intent(in) :: fileUnit
|
2012-07-03 16:46:38 +05:30
|
|
|
|
2013-05-28 23:01:55 +05:30
|
|
|
integer(pInt), parameter :: MAXNCHUNKS = 7_pInt
|
2013-07-01 11:40:42 +05:30
|
|
|
|
2013-05-28 23:01:55 +05:30
|
|
|
integer(pInt), dimension(1_pInt+2_pInt*MAXNCHUNKS) :: positions
|
2013-05-17 22:39:42 +05:30
|
|
|
integer(pInt) :: section = 0_pInt, maxNinstance, i
|
2013-11-28 14:26:02 +05:30
|
|
|
character(len=32) :: &
|
|
|
|
structure = ''
|
2013-07-01 11:40:42 +05:30
|
|
|
character(len=65536) :: &
|
|
|
|
tag = '', &
|
2013-11-28 14:26:02 +05:30
|
|
|
line = ''
|
2013-01-09 03:41:59 +05:30
|
|
|
|
2013-11-27 13:34:05 +05:30
|
|
|
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_NONE_label//' init -+>>>'
|
2013-05-28 23:01:55 +05:30
|
|
|
write(6,'(a)') ' $Id$'
|
2013-05-17 22:39:42 +05:30
|
|
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
2012-07-03 16:46:38 +05:30
|
|
|
#include "compilation_info.f90"
|
|
|
|
|
2013-11-27 13:34:05 +05:30
|
|
|
maxNinstance = int(count(phase_plasticity == PLASTICITY_NONE_ID),pInt)
|
2012-07-03 16:46:38 +05:30
|
|
|
if (maxNinstance == 0_pInt) return
|
|
|
|
|
2013-05-17 22:39:42 +05:30
|
|
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
|
|
|
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
2012-07-03 16:46:38 +05:30
|
|
|
|
2013-12-12 03:33:09 +05:30
|
|
|
allocate(constitutive_none_sizeDotState(maxNinstance), source=0_pInt)
|
|
|
|
allocate(constitutive_none_sizeState(maxNinstance), source=0_pInt)
|
|
|
|
allocate(constitutive_none_sizePostResults(maxNinstance), source=0_pInt)
|
|
|
|
allocate(constitutive_none_structureID(maxNinstance), source=LATTICE_undefined_ID)
|
|
|
|
allocate(constitutive_none_Cslip_66(6,6,maxNinstance), source=0.0_pReal)
|
2012-07-03 16:46:38 +05:30
|
|
|
|
2013-12-12 03:33:09 +05:30
|
|
|
rewind(fileUnit)
|
|
|
|
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= 'phase') ! wind forward to <phase>
|
|
|
|
line = IO_read(fileUnit)
|
2012-07-03 16:46:38 +05:30
|
|
|
enddo
|
|
|
|
|
2013-12-12 03:33:09 +05:30
|
|
|
do while (trim(line) /= IO_EOF) ! read through sections of phase part
|
|
|
|
line = IO_read(fileUnit)
|
2013-05-17 22:39:42 +05:30
|
|
|
if (IO_isBlank(line)) cycle ! skip empty lines
|
2013-12-12 03:33:09 +05:30
|
|
|
if (IO_getTag(line,'<','>') /= '') then ! stop at next part
|
|
|
|
line = IO_read(fileUnit, .true.) ! reset IO_read
|
|
|
|
exit
|
|
|
|
endif
|
2013-05-17 22:39:42 +05:30
|
|
|
if (IO_getTag(line,'[',']') /= '') then ! next section
|
|
|
|
section = section + 1_pInt ! advance section counter
|
2013-12-12 22:39:59 +05:30
|
|
|
cycle ! skip to next line
|
2012-07-03 16:46:38 +05:30
|
|
|
endif
|
2013-07-01 11:40:42 +05:30
|
|
|
if (section > 0_pInt ) then ! do not short-circuit here (.and. with next if-statement). It's not safe in Fortran
|
2013-11-27 13:34:05 +05:30
|
|
|
if (phase_plasticity(section) == PLASTICITY_NONE_ID) then ! one of my sections
|
2013-06-12 01:46:40 +05:30
|
|
|
i = phase_plasticityInstance(section) ! which instance of my plasticity is present phase
|
|
|
|
positions = IO_stringPos(line,MAXNCHUNKS)
|
|
|
|
tag = IO_lc(IO_stringValue(line,positions,1_pInt)) ! extract key
|
|
|
|
select case(tag)
|
|
|
|
case ('plasticity','elasticity')
|
|
|
|
cycle
|
|
|
|
case ('lattice_structure')
|
2013-11-28 14:26:02 +05:30
|
|
|
structure = IO_lc(IO_stringValue(line,positions,2_pInt))
|
|
|
|
select case(structure(1:3))
|
2013-11-27 21:50:27 +05:30
|
|
|
case(LATTICE_iso_label)
|
|
|
|
constitutive_none_structureID(i) = LATTICE_iso_ID
|
|
|
|
case(LATTICE_fcc_label)
|
|
|
|
constitutive_none_structureID(i) = LATTICE_fcc_ID
|
|
|
|
case(LATTICE_bcc_label)
|
|
|
|
constitutive_none_structureID(i) = LATTICE_bcc_ID
|
|
|
|
case(LATTICE_hex_label)
|
|
|
|
constitutive_none_structureID(i) = LATTICE_hex_ID
|
|
|
|
case(LATTICE_ort_label)
|
|
|
|
constitutive_none_structureID(i) = LATTICE_ort_ID
|
|
|
|
end select
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c11')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(1,1,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c12')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(1,2,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c13')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(1,3,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c22')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(2,2,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c23')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(2,3,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c33')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(3,3,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c44')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(4,4,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c55')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(5,5,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case ('c66')
|
2013-10-11 14:47:03 +05:30
|
|
|
constitutive_none_Cslip_66(6,6,i) = IO_floatValue(line,positions,2_pInt)
|
2013-06-12 01:46:40 +05:30
|
|
|
case default
|
2013-11-27 13:34:05 +05:30
|
|
|
call IO_error(210_pInt,ext_msg=trim(tag)//' ('//PLASTICITY_NONE_label//')')
|
2013-06-12 01:46:40 +05:30
|
|
|
end select
|
|
|
|
endif
|
2012-07-03 16:46:38 +05:30
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
|
2013-07-01 11:40:42 +05:30
|
|
|
instancesLoop: do i = 1_pInt,maxNinstance
|
2012-07-03 16:46:38 +05:30
|
|
|
constitutive_none_sizeDotState(i) = 1_pInt
|
|
|
|
constitutive_none_sizeState(i) = 1_pInt
|
|
|
|
|
2013-11-27 21:50:27 +05:30
|
|
|
constitutive_none_Cslip_66(1:6,1:6,i) = lattice_symmetrizeC66(constitutive_none_structureID(i),&
|
|
|
|
constitutive_none_Cslip_66(1:6,1:6,i))
|
|
|
|
constitutive_none_Cslip_66(1:6,1:6,i) = &
|
|
|
|
math_Mandel3333to66(math_Voigt66to3333(constitutive_none_Cslip_66(1:6,1:6,i)))
|
2012-07-03 16:46:38 +05:30
|
|
|
|
2013-07-01 11:40:42 +05:30
|
|
|
enddo instancesLoop
|
2012-07-03 16:46:38 +05:30
|
|
|
|
|
|
|
end subroutine constitutive_none_init
|
|
|
|
|
|
|
|
|
2013-05-17 22:39:42 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-07-01 11:40:42 +05:30
|
|
|
!> @brief returns the homogenized elasticity matrix
|
2013-05-17 22:39:42 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2013-10-16 18:34:59 +05:30
|
|
|
pure function constitutive_none_homogenizedC(ipc,ip,el)
|
2013-05-17 22:39:42 +05:30
|
|
|
use prec, only: &
|
|
|
|
p_vec
|
|
|
|
use mesh, only: &
|
|
|
|
mesh_NcpElems, &
|
|
|
|
mesh_maxNips
|
|
|
|
use material, only: &
|
|
|
|
homogenization_maxNgrains, &
|
|
|
|
material_phase, &
|
|
|
|
phase_plasticityInstance
|
2012-07-03 16:46:38 +05:30
|
|
|
|
|
|
|
implicit none
|
2013-07-01 11:40:42 +05:30
|
|
|
real(pReal), dimension(6,6) :: &
|
|
|
|
constitutive_none_homogenizedC
|
2013-05-17 22:39:42 +05:30
|
|
|
integer(pInt), intent(in) :: &
|
2013-07-01 11:40:42 +05:30
|
|
|
ipc, & !< component-ID of integration point
|
|
|
|
ip, & !< integration point
|
|
|
|
el !< element
|
2013-05-17 22:39:42 +05:30
|
|
|
|
2013-07-01 11:40:42 +05:30
|
|
|
constitutive_none_homogenizedC = constitutive_none_Cslip_66(1:6,1:6,&
|
|
|
|
phase_plasticityInstance(material_phase(ipc,ip,el)))
|
2012-07-03 16:46:38 +05:30
|
|
|
|
|
|
|
end function constitutive_none_homogenizedC
|
|
|
|
|
|
|
|
end module constitutive_none
|