fixed wrong initialized symmetry value

This commit is contained in:
Martin Diehl 2013-12-16 10:56:56 +00:00
parent e20ffb379d
commit 118dff9f23
1 changed files with 35 additions and 36 deletions

View File

@ -34,7 +34,7 @@ module material
implicit none implicit none
private private
character(len=*), parameter, public :: & character(len=*), parameter, public :: &
ELASTICITY_HOOKE_label = 'hooke', & ELASTICITY_HOOKE_label = 'hooke', &
PLASTICITY_NONE_label = 'none', & PLASTICITY_NONE_label = 'none', &
PLASTICITY_J2_label = 'j2', & PLASTICITY_J2_label = 'j2', &
@ -64,11 +64,11 @@ module material
HOMOGENIZATION_RGC_ID HOMOGENIZATION_RGC_ID
end enum end enum
character(len=*), parameter, public :: & character(len=*), parameter, public :: &
MATERIAL_configFile = 'material.config', & !< generic name for material configuration file MATERIAL_configFile = 'material.config', & !< generic name for material configuration file
MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file MATERIAL_localFileExt = 'materialConfig' !< extension of solver job name depending material configuration file
character(len=*), parameter, public :: & character(len=*), parameter, public :: &
MATERIAL_partHomogenization = 'homogenization', & !< keyword for homogenization part MATERIAL_partHomogenization = 'homogenization', & !< keyword for homogenization part
MATERIAL_partCrystallite = 'crystallite', & !< keyword for crystallite part MATERIAL_partCrystallite = 'crystallite', & !< keyword for crystallite part
MATERIAL_partPhase = 'phase' !< keyword for phase part MATERIAL_partPhase = 'phase' !< keyword for phase part
@ -80,7 +80,7 @@ module material
integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable, public, protected :: & integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable, public, protected :: &
homogenization_type !< type of each homogenization homogenization_type !< type of each homogenization
character(len=64), dimension(:), allocatable, public, protected :: & character(len=64), dimension(:), allocatable, public, protected :: &
phase_name, & !< name of each phase phase_name, & !< name of each phase
homogenization_name, & !< name of each homogenization homogenization_name, & !< name of each homogenization
crystallite_name !< name of each crystallite setting crystallite_name !< name of each crystallite setting
@ -92,7 +92,7 @@ module material
material_Nmicrostructure, & !< number of microstructures material_Nmicrostructure, & !< number of microstructures
material_Ncrystallite !< number of crystallite settings material_Ncrystallite !< number of crystallite settings
integer(pInt), dimension(:), allocatable, public, protected :: & integer(pInt), dimension(:), allocatable, public, protected :: &
homogenization_Ngrains, & !< number of grains in each homogenization homogenization_Ngrains, & !< number of grains in each homogenization
homogenization_Noutput, & !< number of '(output)' items per homogenization homogenization_Noutput, & !< number of '(output)' items per homogenization
phase_Noutput, & !< number of '(output)' items per phase phase_Noutput, & !< number of '(output)' items per phase
@ -102,72 +102,69 @@ module material
homogenization_typeInstance, & !< instance of particular type of each homogenization homogenization_typeInstance, & !< instance of particular type of each homogenization
microstructure_crystallite !< crystallite setting ID of each microstructure microstructure_crystallite !< crystallite setting ID of each microstructure
integer(pInt), dimension(:,:,:), allocatable, public:: & integer(pInt), dimension(:,:,:), allocatable, public:: &
material_phase !< phase (index) of each grain,IP,element material_phase !< phase (index) of each grain,IP,element
integer(pInt), dimension(:,:,:), allocatable, public, protected :: & integer(pInt), dimension(:,:,:), allocatable, public, protected :: &
material_texture !< texture (index) of each grain,IP,element material_texture !< texture (index) of each grain,IP,element
real(pReal), dimension(:,:,:,:), allocatable, public, protected :: & real(pReal), dimension(:,:,:,:), allocatable, public, protected :: &
material_EulerAngles !< initial orientation of each grain,IP,element material_EulerAngles !< initial orientation of each grain,IP,element
logical, dimension(:), allocatable, public, protected :: & logical, dimension(:), allocatable, public, protected :: &
microstructure_active, & microstructure_active, &
microstructure_elemhomo, & !< flag to indicate homogeneous microstructure distribution over element's IPs microstructure_elemhomo, & !< flag to indicate homogeneous microstructure distribution over element's IPs
phase_localPlasticity !< flags phases with local constitutive law phase_localPlasticity !< flags phases with local constitutive law
character(len=*), parameter, private :: & character(len=*), parameter, private :: &
MATERIAL_partMicrostructure = 'microstructure', & !< keyword for microstructure part MATERIAL_partMicrostructure = 'microstructure', & !< keyword for microstructure part
MATERIAL_partTexture = 'texture' !< keyword for texture part MATERIAL_partTexture = 'texture' !< keyword for texture part
character(len=64), dimension(:), allocatable, private :: & character(len=64), dimension(:), allocatable, private :: &
microstructure_name, & !< name of each microstructure microstructure_name, & !< name of each microstructure
texture_name !< name of each texture texture_name !< name of each texture
character(len=256), dimension(:), allocatable, private :: & character(len=256), dimension(:), allocatable, private :: &
texture_ODFfile !< name of each ODF file texture_ODFfile !< name of each ODF file
integer(pInt), private :: & integer(pInt), private :: &
material_Ntexture, & !< number of textures material_Ntexture, & !< number of textures
microstructure_maxNconstituents, & !< max number of constituents in any phase microstructure_maxNconstituents, & !< max number of constituents in any phase
texture_maxNgauss, & !< max number of Gauss components in any texture texture_maxNgauss, & !< max number of Gauss components in any texture
texture_maxNfiber !< max number of Fiber components in any texture texture_maxNfiber !< max number of Fiber components in any texture
integer(pInt), dimension(:), allocatable, private :: & integer(pInt), dimension(:), allocatable, private :: &
microstructure_Nconstituents, & !< number of constituents in each microstructure microstructure_Nconstituents, & !< number of constituents in each microstructure
texture_symmetry, & !< number of symmetric orientations per texture texture_symmetry, & !< number of symmetric orientations per texture
texture_Ngauss, & !< number of Gauss components per texture texture_Ngauss, & !< number of Gauss components per texture
texture_Nfiber !< number of Fiber components per texture texture_Nfiber !< number of Fiber components per texture
integer(pInt), dimension(:,:), allocatable, private :: & integer(pInt), dimension(:,:), allocatable, private :: &
microstructure_phase, & !< phase IDs of each microstructure microstructure_phase, & !< phase IDs of each microstructure
microstructure_texture !< texture IDs of each microstructure microstructure_texture !< texture IDs of each microstructure
real(pReal), dimension(:,:), allocatable, private :: & real(pReal), dimension(:,:), allocatable, private :: &
microstructure_fraction !< vol fraction of each constituent in microstructure microstructure_fraction !< vol fraction of each constituent in microstructure
real(pReal), dimension(:,:,:), allocatable, private :: & real(pReal), dimension(:,:,:), allocatable, private :: &
material_volume, & !< volume of each grain,IP,element material_volume, & !< volume of each grain,IP,element
texture_Gauss, & !< data of each Gauss component texture_Gauss, & !< data of each Gauss component
texture_Fiber, & !< data of each Fiber component texture_Fiber, & !< data of each Fiber component
texture_transformation !< transformation for each texture texture_transformation !< transformation for each texture
logical, dimension(:), allocatable, private :: & logical, dimension(:), allocatable, private :: &
homogenization_active homogenization_active
public :: & public :: &
material_init, & material_init, &
ELASTICITY_undefined_ID, & ELASTICITY_hooke_ID ,&
ELASTICITY_hooke_ID, &
PLASTICITY_undefined_ID, &
PLASTICITY_none_ID, & PLASTICITY_none_ID, &
PLASTICITY_J2_ID, & PLASTICITY_J2_ID, &
PLASTICITY_phenopowerlaw_ID, & PLASTICITY_phenopowerlaw_ID, &
PLASTICITY_dislotwin_ID, & PLASTICITY_dislotwin_ID, &
PLASTICITY_titanmod_ID, & PLASTICITY_titanmod_ID, &
PLASTICITY_nonlocal_ID, & PLASTICITY_nonlocal_ID, &
HOMOGENIZATION_undefined_ID, &
HOMOGENIZATION_isostrain_ID, & HOMOGENIZATION_isostrain_ID, &
HOMOGENIZATION_RGC_ID HOMOGENIZATION_RGC_ID
@ -308,7 +305,7 @@ subroutine material_parseHomogenization(fileUnit,myPart)
material_Nhomogenization = Nsections material_Nhomogenization = Nsections
if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart) if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart)
allocate(homogenization_name(Nsections)); homogenization_name = '' allocate(homogenization_name(Nsections)); homogenization_name = ''
allocate(homogenization_type(Nsections), source=HOMOGENIZATION_undefined_ID) allocate(homogenization_type(Nsections), source=HOMOGENIZATION_undefined_ID)
allocate(homogenization_typeInstance(Nsections), source=0_pInt) allocate(homogenization_typeInstance(Nsections), source=0_pInt)
allocate(homogenization_Ngrains(Nsections), source=0_pInt) allocate(homogenization_Ngrains(Nsections), source=0_pInt)
@ -391,7 +388,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
material_Nmicrostructure = Nsections material_Nmicrostructure = Nsections
if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart) if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart)
allocate(microstructure_name(Nsections)); microstructure_name = '' allocate(microstructure_name(Nsections)); microstructure_name = ''
allocate(microstructure_crystallite(Nsections), source=0_pInt) allocate(microstructure_crystallite(Nsections), source=0_pInt)
allocate(microstructure_Nconstituents(Nsections), source=0_pInt) allocate(microstructure_Nconstituents(Nsections), source=0_pInt)
allocate(microstructure_active(Nsections), source=.false.) allocate(microstructure_active(Nsections), source=.false.)
@ -411,6 +408,7 @@ subroutine material_parseMicrostructure(fileUnit,myPart)
line = '' ! to have it initialized line = '' ! to have it initialized
section = 0_pInt ! - " - section = 0_pInt ! - " -
constituent = 0_pInt ! - " - constituent = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
line = IO_read(fileUnit) line = IO_read(fileUnit)
enddo enddo
@ -485,7 +483,7 @@ subroutine material_parseCrystallite(fileUnit,myPart)
material_Ncrystallite = Nsections material_Ncrystallite = Nsections
if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart) if (Nsections < 1_pInt) call IO_error(160_pInt,ext_msg=myPart)
allocate(crystallite_name(Nsections)); crystallite_name='' allocate(crystallite_name(Nsections)); crystallite_name = ''
allocate(crystallite_Noutput(Nsections), source=0_pInt) allocate(crystallite_Noutput(Nsections), source=0_pInt)
crystallite_Noutput = IO_countTagInPart(fileUnit,myPart,'(output)',Nsections) crystallite_Noutput = IO_countTagInPart(fileUnit,myPart,'(output)',Nsections)
@ -663,7 +661,7 @@ subroutine material_parseTexture(fileUnit,myPart)
allocate(texture_name(Nsections)); texture_name='' allocate(texture_name(Nsections)); texture_name=''
allocate(texture_ODFfile(Nsections)); texture_ODFfile='' allocate(texture_ODFfile(Nsections)); texture_ODFfile=''
allocate(texture_symmetry(Nsections), source=0_pInt) allocate(texture_symmetry(Nsections), source=1_pInt)
allocate(texture_Ngauss(Nsections), source=0_pInt) allocate(texture_Ngauss(Nsections), source=0_pInt)
allocate(texture_Nfiber(Nsections), source=0_pInt) allocate(texture_Nfiber(Nsections), source=0_pInt)
@ -682,6 +680,7 @@ subroutine material_parseTexture(fileUnit,myPart)
section = 0_pInt ! - " - section = 0_pInt ! - " -
gauss = 0_pInt ! - " - gauss = 0_pInt ! - " -
fiber = 0_pInt ! - " - fiber = 0_pInt ! - " -
do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart do while (trim(line) /= IO_EOF .and. IO_lc(IO_getTag(line,'<','>')) /= myPart) ! wind forward to myPart
line = IO_read(fileUnit) line = IO_read(fileUnit)
enddo enddo
@ -711,17 +710,17 @@ subroutine material_parseTexture(fileUnit,myPart)
tag = IO_lc(IO_stringValue(line,positions,j+1_pInt)) tag = IO_lc(IO_stringValue(line,positions,j+1_pInt))
select case (tag) select case (tag)
case('x', '+x') case('x', '+x')
texture_transformation(j,1:3,section) = (/ 1.0_pReal, 0.0_pReal, 0.0_pReal/) ! original axis is now +x-axis texture_transformation(j,1:3,section) = [ 1.0_pReal, 0.0_pReal, 0.0_pReal] ! original axis is now +x-axis
case('-x') case('-x')
texture_transformation(j,1:3,section) = (/-1.0_pReal, 0.0_pReal, 0.0_pReal/) ! original axis is now -x-axis texture_transformation(j,1:3,section) = [-1.0_pReal, 0.0_pReal, 0.0_pReal] ! original axis is now -x-axis
case('y', '+y') case('y', '+y')
texture_transformation(j,1:3,section) = (/ 0.0_pReal, 1.0_pReal, 0.0_pReal/) ! original axis is now +y-axis texture_transformation(j,1:3,section) = [ 0.0_pReal, 1.0_pReal, 0.0_pReal] ! original axis is now +y-axis
case('-y') case('-y')
texture_transformation(j,1:3,section) = (/ 0.0_pReal,-1.0_pReal, 0.0_pReal/) ! original axis is now -y-axis texture_transformation(j,1:3,section) = [ 0.0_pReal,-1.0_pReal, 0.0_pReal] ! original axis is now -y-axis
case('z', '+z') case('z', '+z')
texture_transformation(j,1:3,section) = (/ 0.0_pReal, 0.0_pReal, 1.0_pReal/) ! original axis is now +z-axis texture_transformation(j,1:3,section) = [ 0.0_pReal, 0.0_pReal, 1.0_pReal] ! original axis is now +z-axis
case('-z') case('-z')
texture_transformation(j,1:3,section) = (/ 0.0_pReal, 0.0_pReal,-1.0_pReal/) ! original axis is now -z-axis texture_transformation(j,1:3,section) = [ 0.0_pReal, 0.0_pReal,-1.0_pReal] ! original axis is now -z-axis
case default case default
call IO_error(157_pInt,section) call IO_error(157_pInt,section)
end select end select