don't clutter the code with useless stuff
we only need to be more strict about prefixing functions/subroutines/variables to see in which module they reside
This commit is contained in:
parent
028bdcff22
commit
01e3b646c2
|
@ -42,7 +42,8 @@ module Lambert
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
real(pReal), parameter, private :: &
|
|
||||||
|
real(pReal), parameter :: &
|
||||||
SPI = sqrt(PI), &
|
SPI = sqrt(PI), &
|
||||||
PREF = sqrt(6.0_pReal/PI), &
|
PREF = sqrt(6.0_pReal/PI), &
|
||||||
A = PI**(5.0_pReal/6.0_pReal)/6.0_pReal**(1.0_pReal/6.0_pReal), &
|
A = PI**(5.0_pReal/6.0_pReal)/6.0_pReal**(1.0_pReal/6.0_pReal), &
|
||||||
|
@ -55,10 +56,8 @@ module Lambert
|
||||||
PREK = R1 * 2.0_pReal**(1.0_pReal/4.0_pReal)/BETA
|
PREK = R1 * 2.0_pReal**(1.0_pReal/4.0_pReal)/BETA
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
LambertCubeToBall, &
|
Lambert_CubeToBall, &
|
||||||
LambertBallToCube
|
Lambert_BallToCube
|
||||||
private :: &
|
|
||||||
GetPyramidOrder
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -68,7 +67,7 @@ contains
|
||||||
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!> @brief map from 3D cubic grid to 3D ball
|
!> @brief map from 3D cubic grid to 3D ball
|
||||||
!--------------------------------------------------------------------------
|
!--------------------------------------------------------------------------
|
||||||
function LambertCubeToBall(cube) result(ball)
|
function Lambert_CubeToBall(cube) result(ball)
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: cube
|
real(pReal), intent(in), dimension(3) :: cube
|
||||||
real(pReal), dimension(3) :: ball, LamXYZ, XYZ
|
real(pReal), dimension(3) :: ball, LamXYZ, XYZ
|
||||||
|
@ -116,7 +115,7 @@ function LambertCubeToBall(cube) result(ball)
|
||||||
|
|
||||||
endif center
|
endif center
|
||||||
|
|
||||||
end function LambertCubeToBall
|
end function Lambert_CubeToBall
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------
|
!--------------------------------------------------------------------------
|
||||||
|
@ -124,7 +123,7 @@ end function LambertCubeToBall
|
||||||
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
||||||
!> @brief map from 3D ball to 3D cubic grid
|
!> @brief map from 3D ball to 3D cubic grid
|
||||||
!--------------------------------------------------------------------------
|
!--------------------------------------------------------------------------
|
||||||
pure function LambertBallToCube(xyz) result(cube)
|
pure function Lambert_BallToCube(xyz) result(cube)
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: xyz
|
real(pReal), intent(in), dimension(3) :: xyz
|
||||||
real(pReal), dimension(3) :: cube, xyz1, xyz3
|
real(pReal), dimension(3) :: cube, xyz1, xyz3
|
||||||
|
@ -170,7 +169,7 @@ pure function LambertBallToCube(xyz) result(cube)
|
||||||
|
|
||||||
endif center
|
endif center
|
||||||
|
|
||||||
end function LambertBallToCube
|
end function Lambert_BallToCube
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------
|
!--------------------------------------------------------------------------
|
||||||
|
|
|
@ -7,10 +7,14 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module config
|
module config
|
||||||
use prec
|
use prec
|
||||||
|
use DAMASK_interface
|
||||||
|
use IO
|
||||||
|
use debug
|
||||||
use list
|
use list
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: &
|
type(tPartitionedStringList), public, protected, allocatable, dimension(:) :: &
|
||||||
config_phase, &
|
config_phase, &
|
||||||
config_microstructure, &
|
config_microstructure, &
|
||||||
|
@ -22,6 +26,7 @@ module config
|
||||||
config_numerics, &
|
config_numerics, &
|
||||||
config_debug
|
config_debug
|
||||||
|
|
||||||
|
!ToDo: bad names (how should one know that those variables are defined in config?)
|
||||||
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
|
||||||
|
@ -45,19 +50,9 @@ contains
|
||||||
!> @brief reads material.config and stores its content per part
|
!> @brief reads material.config and stores its content per part
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine config_init
|
subroutine config_init
|
||||||
use DAMASK_interface, only: &
|
|
||||||
getSolverJobName
|
|
||||||
use IO, only: &
|
|
||||||
IO_read_ASCII, &
|
|
||||||
IO_error, &
|
|
||||||
IO_lc, &
|
|
||||||
IO_getTag
|
|
||||||
use debug, only: &
|
|
||||||
debug_level, &
|
|
||||||
debug_material, &
|
|
||||||
debug_levelBasic
|
|
||||||
|
|
||||||
integer :: myDebug,i
|
integer :: i
|
||||||
|
logical :: verbose
|
||||||
|
|
||||||
character(len=pStringLen) :: &
|
character(len=pStringLen) :: &
|
||||||
line, &
|
line, &
|
||||||
|
@ -67,7 +62,7 @@ subroutine config_init
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- config init -+>>>'
|
write(6,'(/,a)') ' <<<+- config init -+>>>'
|
||||||
|
|
||||||
myDebug = debug_level(debug_material)
|
verbose = iand(debug_level(debug_material),debug_levelBasic) /= 0
|
||||||
|
|
||||||
inquire(file=trim(getSolverJobName())//'.materialConfig',exist=fileExists)
|
inquire(file=trim(getSolverJobName())//'.materialConfig',exist=fileExists)
|
||||||
if(fileExists) then
|
if(fileExists) then
|
||||||
|
@ -87,23 +82,23 @@ subroutine config_init
|
||||||
|
|
||||||
case (trim('phase'))
|
case (trim('phase'))
|
||||||
call parse_materialConfig(phase_name,config_phase,line,fileContent(i+1:))
|
call parse_materialConfig(phase_name,config_phase,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0) write(6,'(a)') ' Phase parsed'; flush(6)
|
if (verbose) write(6,'(a)') ' Phase parsed'; flush(6)
|
||||||
|
|
||||||
case (trim('microstructure'))
|
case (trim('microstructure'))
|
||||||
call parse_materialConfig(microstructure_name,config_microstructure,line,fileContent(i+1:))
|
call parse_materialConfig(microstructure_name,config_microstructure,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0) write(6,'(a)') ' Microstructure parsed'; flush(6)
|
if (verbose) write(6,'(a)') ' Microstructure parsed'; flush(6)
|
||||||
|
|
||||||
case (trim('crystallite'))
|
case (trim('crystallite'))
|
||||||
call parse_materialConfig(crystallite_name,config_crystallite,line,fileContent(i+1:))
|
call parse_materialConfig(crystallite_name,config_crystallite,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0) write(6,'(a)') ' Crystallite parsed'; flush(6)
|
if (verbose) write(6,'(a)') ' Crystallite parsed'; flush(6)
|
||||||
|
|
||||||
case (trim('homogenization'))
|
case (trim('homogenization'))
|
||||||
call parse_materialConfig(homogenization_name,config_homogenization,line,fileContent(i+1:))
|
call parse_materialConfig(homogenization_name,config_homogenization,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0) write(6,'(a)') ' Homogenization parsed'; flush(6)
|
if (verbose) write(6,'(a)') ' Homogenization parsed'; flush(6)
|
||||||
|
|
||||||
case (trim('texture'))
|
case (trim('texture'))
|
||||||
call parse_materialConfig(texture_name,config_texture,line,fileContent(i+1:))
|
call parse_materialConfig(texture_name,config_texture,line,fileContent(i+1:))
|
||||||
if (iand(myDebug,debug_levelBasic) /= 0) write(6,'(a)') ' Texture parsed'; flush(6)
|
if (verbose) write(6,'(a)') ' Texture parsed'; flush(6)
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
|
@ -141,8 +136,6 @@ contains
|
||||||
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
!! Recursion is triggered by "{path/to/inputfile}" in a line
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
recursive function read_materialConfig(fileName,cnt) result(fileContent)
|
recursive function read_materialConfig(fileName,cnt) result(fileContent)
|
||||||
use IO, only: &
|
|
||||||
IO_warning
|
|
||||||
|
|
||||||
character(len=*), intent(in) :: fileName
|
character(len=*), intent(in) :: fileName
|
||||||
integer, intent(in), optional :: cnt !< recursion counter
|
integer, intent(in), optional :: cnt !< recursion counter
|
||||||
|
@ -226,9 +219,6 @@ end function read_materialConfig
|
||||||
subroutine parse_materialConfig(sectionNames,part,line, &
|
subroutine parse_materialConfig(sectionNames,part,line, &
|
||||||
fileContent)
|
fileContent)
|
||||||
|
|
||||||
use IO, only: &
|
|
||||||
IO_intOut
|
|
||||||
|
|
||||||
character(len=64), allocatable, dimension(:), intent(out) :: sectionNames
|
character(len=64), allocatable, dimension(:), intent(out) :: sectionNames
|
||||||
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
|
type(tPartitionedStringList), allocatable, dimension(:), intent(inout) :: part
|
||||||
character(len=pStringLen), intent(inout) :: line
|
character(len=pStringLen), intent(inout) :: line
|
||||||
|
@ -298,8 +288,6 @@ end subroutine config_init
|
||||||
!> @brief deallocates the linked lists that store the content of the configuration files
|
!> @brief deallocates the linked lists that store the content of the configuration files
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine config_deallocate(what)
|
subroutine config_deallocate(what)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
character(len=*), intent(in) :: what
|
character(len=*), intent(in) :: what
|
||||||
|
|
||||||
|
|
|
@ -9,36 +9,43 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
module crystallite
|
module crystallite
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal, &
|
use IO
|
||||||
pStringLen
|
use config
|
||||||
use rotations, only: &
|
use debug
|
||||||
rotation
|
use numerics
|
||||||
use FEsolving, only: &
|
use rotations
|
||||||
FEsolving_execElem, &
|
use math
|
||||||
FEsolving_execIP
|
use mesh
|
||||||
use material, only: &
|
use FEsolving
|
||||||
homogenization_Ngrains
|
use material
|
||||||
|
use constitutive
|
||||||
|
use lattice
|
||||||
use future
|
use future
|
||||||
|
use plastic_nonlocal
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
use HDF5_utilities
|
||||||
|
use results
|
||||||
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
character(len=64), dimension(:,:), allocatable, private :: &
|
character(len=64), dimension(:,:), allocatable :: &
|
||||||
crystallite_output !< name of each post result output
|
crystallite_output !< name of each post result output
|
||||||
integer, public, protected :: &
|
integer, public, protected :: &
|
||||||
crystallite_maxSizePostResults !< description not available
|
crystallite_maxSizePostResults !< description not available
|
||||||
integer, dimension(:), allocatable, public, protected :: &
|
integer, dimension(:), allocatable, public, protected :: &
|
||||||
crystallite_sizePostResults !< description not available
|
crystallite_sizePostResults !< description not available
|
||||||
integer, dimension(:,:), allocatable, private :: &
|
integer, dimension(:,:), allocatable :: &
|
||||||
crystallite_sizePostResult !< description not available
|
crystallite_sizePostResult !< description not available
|
||||||
|
|
||||||
real(pReal), dimension(:,:,:), allocatable, public :: &
|
real(pReal), dimension(:,:,:), allocatable, public :: &
|
||||||
crystallite_dt !< requested time increment of each grain
|
crystallite_dt !< requested time increment of each grain
|
||||||
real(pReal), dimension(:,:,:), allocatable, private :: &
|
real(pReal), dimension(:,:,:), allocatable :: &
|
||||||
crystallite_subdt, & !< substepped time increment of each grain
|
crystallite_subdt, & !< substepped time increment of each grain
|
||||||
crystallite_subFrac, & !< already calculated fraction of increment
|
crystallite_subFrac, & !< already calculated fraction of increment
|
||||||
crystallite_subStep !< size of next integration step
|
crystallite_subStep !< size of next integration step
|
||||||
type(rotation), dimension(:,:,:), allocatable, private :: &
|
type(rotation), dimension(:,:,:), allocatable :: &
|
||||||
crystallite_orientation, & !< orientation
|
crystallite_orientation, & !< orientation
|
||||||
crystallite_orientation0 !< initial orientation
|
crystallite_orientation0 !< initial orientation
|
||||||
real(pReal), dimension(:,:,:,:,:), allocatable, public, protected :: &
|
real(pReal), dimension(:,:,:,:,:), allocatable, public, protected :: &
|
||||||
|
@ -63,7 +70,7 @@ module crystallite
|
||||||
crystallite_Li, & !< current intermediate velocitiy grad (end of converged time step)
|
crystallite_Li, & !< current intermediate velocitiy grad (end of converged time step)
|
||||||
crystallite_Li0, & !< intermediate velocitiy grad at start of FE inc
|
crystallite_Li0, & !< intermediate velocitiy grad at start of FE inc
|
||||||
crystallite_partionedLi0 !< intermediate velocity grad at start of homog inc
|
crystallite_partionedLi0 !< intermediate velocity grad at start of homog inc
|
||||||
real(pReal), dimension(:,:,:,:,:), allocatable, private :: &
|
real(pReal), dimension(:,:,:,:,:), allocatable :: &
|
||||||
crystallite_subS0, & !< 2nd Piola-Kirchhoff stress vector at start of crystallite inc
|
crystallite_subS0, & !< 2nd Piola-Kirchhoff stress vector at start of crystallite inc
|
||||||
crystallite_invFp, & !< inverse of current plastic def grad (end of converged time step)
|
crystallite_invFp, & !< inverse of current plastic def grad (end of converged time step)
|
||||||
crystallite_subFp0,& !< plastic def grad at start of crystallite inc
|
crystallite_subFp0,& !< plastic def grad at start of crystallite inc
|
||||||
|
@ -77,7 +84,7 @@ module crystallite
|
||||||
crystallite_dPdF !< current individual dPdF per grain (end of converged time step)
|
crystallite_dPdF !< current individual dPdF per grain (end of converged time step)
|
||||||
logical, dimension(:,:,:), allocatable, public :: &
|
logical, dimension(:,:,:), allocatable, public :: &
|
||||||
crystallite_requested !< used by upper level (homogenization) to request crystallite calculation
|
crystallite_requested !< used by upper level (homogenization) to request crystallite calculation
|
||||||
logical, dimension(:,:,:), allocatable, private :: &
|
logical, dimension(:,:,:), allocatable :: &
|
||||||
crystallite_converged, & !< convergence flag
|
crystallite_converged, & !< convergence flag
|
||||||
crystallite_todo, & !< flag to indicate need for further computation
|
crystallite_todo, & !< flag to indicate need for further computation
|
||||||
crystallite_localPlasticity !< indicates this grain to have purely local constitutive law
|
crystallite_localPlasticity !< indicates this grain to have purely local constitutive law
|
||||||
|
@ -101,16 +108,16 @@ module crystallite
|
||||||
neighboringip_ID, &
|
neighboringip_ID, &
|
||||||
neighboringelement_ID
|
neighboringelement_ID
|
||||||
end enum
|
end enum
|
||||||
integer(kind(undefined_ID)),dimension(:,:), allocatable, private :: &
|
integer(kind(undefined_ID)),dimension(:,:), allocatable :: &
|
||||||
crystallite_outputID !< ID of each post result output
|
crystallite_outputID !< ID of each post result output
|
||||||
|
|
||||||
type, private :: tOutput !< new requested output (per phase)
|
type :: tOutput !< new requested output (per phase)
|
||||||
character(len=65536), allocatable, dimension(:) :: &
|
character(len=65536), allocatable, dimension(:) :: &
|
||||||
label
|
label
|
||||||
end type tOutput
|
end type tOutput
|
||||||
type(tOutput), allocatable, dimension(:), private :: output_constituent
|
type(tOutput), allocatable, dimension(:) :: output_constituent
|
||||||
|
|
||||||
type, private :: tNumerics
|
type :: tNumerics
|
||||||
integer :: &
|
integer :: &
|
||||||
iJacoLpresiduum, & !< frequency of Jacobian update of residuum in Lp
|
iJacoLpresiduum, & !< frequency of Jacobian update of residuum in Lp
|
||||||
nState, & !< state loop limit
|
nState, & !< state loop limit
|
||||||
|
@ -138,15 +145,6 @@ module crystallite
|
||||||
crystallite_push33ToRef, &
|
crystallite_push33ToRef, &
|
||||||
crystallite_postResults, &
|
crystallite_postResults, &
|
||||||
crystallite_results
|
crystallite_results
|
||||||
private :: &
|
|
||||||
integrateStress, &
|
|
||||||
integrateState, &
|
|
||||||
integrateStateFPI, &
|
|
||||||
integrateStateEuler, &
|
|
||||||
integrateStateAdaptiveEuler, &
|
|
||||||
integrateStateRK4, &
|
|
||||||
integrateStateRKCK45, &
|
|
||||||
stateJump
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -155,39 +153,6 @@ contains
|
||||||
!> @brief allocates and initialize per grain variables
|
!> @brief allocates and initialize per grain variables
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine crystallite_init
|
subroutine crystallite_init
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: &
|
|
||||||
debug_info, &
|
|
||||||
debug_reset, &
|
|
||||||
debug_level, &
|
|
||||||
debug_crystallite, &
|
|
||||||
debug_levelBasic
|
|
||||||
#endif
|
|
||||||
use numerics, only: &
|
|
||||||
numerics_integrator, &
|
|
||||||
worldrank, &
|
|
||||||
usePingPong
|
|
||||||
use math, only: &
|
|
||||||
math_I3, &
|
|
||||||
math_EulerToR, &
|
|
||||||
math_inv33
|
|
||||||
use mesh, only: &
|
|
||||||
theMesh, &
|
|
||||||
mesh_element
|
|
||||||
use IO, only: &
|
|
||||||
IO_stringValue, &
|
|
||||||
IO_write_jobFile, &
|
|
||||||
IO_error
|
|
||||||
use material
|
|
||||||
use config, only: &
|
|
||||||
config_deallocate, &
|
|
||||||
config_crystallite, &
|
|
||||||
config_numerics, &
|
|
||||||
config_phase, &
|
|
||||||
crystallite_name
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_initialFi, &
|
|
||||||
constitutive_microstructure ! derived (shortcut) quantities of given state
|
|
||||||
|
|
||||||
integer, parameter :: FILEUNIT=434
|
integer, parameter :: FILEUNIT=434
|
||||||
logical, dimension(:,:), allocatable :: devNull
|
logical, dimension(:,:), allocatable :: devNull
|
||||||
|
@ -478,34 +443,6 @@ end subroutine crystallite_init
|
||||||
!> @brief calculate stress (P)
|
!> @brief calculate stress (P)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function crystallite_stress(dummyArgumentToPreventInternalCompilerErrorWithGCC)
|
function crystallite_stress(dummyArgumentToPreventInternalCompilerErrorWithGCC)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dNeq0
|
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: &
|
|
||||||
debug_level, &
|
|
||||||
debug_crystallite, &
|
|
||||||
debug_levelBasic, &
|
|
||||||
debug_levelExtensive, &
|
|
||||||
debug_levelSelective, &
|
|
||||||
debug_e, &
|
|
||||||
debug_i, &
|
|
||||||
debug_g
|
|
||||||
#endif
|
|
||||||
use IO, only: &
|
|
||||||
IO_warning, &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
math_inv33
|
|
||||||
use mesh, only: &
|
|
||||||
theMesh, &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
|
||||||
homogenization_Ngrains, &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phase_Nsources, &
|
|
||||||
phaseAt, phasememberAt
|
|
||||||
|
|
||||||
logical, dimension(theMesh%elem%nIPs,theMesh%Nelems) :: crystallite_stress
|
logical, dimension(theMesh%elem%nIPs,theMesh%Nelems) :: crystallite_stress
|
||||||
real(pReal), intent(in), optional :: &
|
real(pReal), intent(in), optional :: &
|
||||||
|
@ -746,30 +683,6 @@ end function crystallite_stress
|
||||||
!> @brief calculate tangent (dPdF)
|
!> @brief calculate tangent (dPdF)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine crystallite_stressTangent
|
subroutine crystallite_stressTangent
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dNeq0
|
|
||||||
use IO, only: &
|
|
||||||
IO_warning, &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
math_inv33, &
|
|
||||||
math_identity2nd, &
|
|
||||||
math_3333to99, &
|
|
||||||
math_99to3333, &
|
|
||||||
math_I3, &
|
|
||||||
math_mul3333xx3333, &
|
|
||||||
math_mul33xx33, &
|
|
||||||
math_invert2, &
|
|
||||||
math_det33
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
|
||||||
homogenization_Ngrains
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_SandItsTangents, &
|
|
||||||
constitutive_LpAndItsTangents, &
|
|
||||||
constitutive_LiAndItsTangents
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
c, & !< counter in integration point component loop
|
c, & !< counter in integration point component loop
|
||||||
|
@ -910,19 +823,6 @@ end subroutine crystallite_stressTangent
|
||||||
!> @brief calculates orientations
|
!> @brief calculates orientations
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine crystallite_orientations
|
subroutine crystallite_orientations
|
||||||
use math, only: &
|
|
||||||
math_rotationalPart33, &
|
|
||||||
math_RtoQ
|
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
material_phase, &
|
|
||||||
homogenization_Ngrains
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use lattice, only: &
|
|
||||||
lattice_qDisorientation
|
|
||||||
use plastic_nonlocal, only: &
|
|
||||||
plastic_nonlocal_updateCompatibility
|
|
||||||
|
|
||||||
integer &
|
integer &
|
||||||
c, & !< counter in integration point component loop
|
c, & !< counter in integration point component loop
|
||||||
|
@ -979,28 +879,6 @@ end function crystallite_push33ToRef
|
||||||
!> @brief return results of particular grain
|
!> @brief return results of particular grain
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function crystallite_postResults(ipc, ip, el)
|
function crystallite_postResults(ipc, ip, el)
|
||||||
use math, only: &
|
|
||||||
math_det33, &
|
|
||||||
math_I3, &
|
|
||||||
inDeg
|
|
||||||
use mesh, only: &
|
|
||||||
theMesh, &
|
|
||||||
mesh_element, &
|
|
||||||
mesh_ipVolume, &
|
|
||||||
mesh_ipNeighborhood
|
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
microstructure_crystallite, &
|
|
||||||
crystallite_Noutput, &
|
|
||||||
material_phase, &
|
|
||||||
material_texture, &
|
|
||||||
homogenization_Ngrains
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_homogenizedC, &
|
|
||||||
constitutive_postResults
|
|
||||||
use rotations, only: &
|
|
||||||
rotation
|
|
||||||
|
|
||||||
integer, intent(in):: &
|
integer, intent(in):: &
|
||||||
el, & !< element index
|
el, & !< element index
|
||||||
|
@ -1118,10 +996,6 @@ end function crystallite_postResults
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine crystallite_results
|
subroutine crystallite_results
|
||||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
use lattice
|
|
||||||
use results
|
|
||||||
use HDF5_utilities
|
|
||||||
use rotations
|
|
||||||
use config, only: &
|
use config, only: &
|
||||||
config_name_phase => phase_name ! anticipate logical name
|
config_name_phase => phase_name ! anticipate logical name
|
||||||
|
|
||||||
|
@ -1264,33 +1138,6 @@ end subroutine crystallite_results
|
||||||
!> intermediate acceleration of the Newton-Raphson correction
|
!> intermediate acceleration of the Newton-Raphson correction
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
logical function integrateStress(ipc,ip,el,timeFraction)
|
logical function integrateStress(ipc,ip,el,timeFraction)
|
||||||
use, intrinsic :: &
|
|
||||||
IEEE_arithmetic
|
|
||||||
use prec, only: tol_math_check, &
|
|
||||||
dEq0
|
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: debug_level, &
|
|
||||||
debug_e, &
|
|
||||||
debug_i, &
|
|
||||||
debug_g, &
|
|
||||||
debug_crystallite, &
|
|
||||||
debug_levelBasic, &
|
|
||||||
debug_levelExtensive, &
|
|
||||||
debug_levelSelective
|
|
||||||
#endif
|
|
||||||
|
|
||||||
use constitutive, only: constitutive_LpAndItsTangents, &
|
|
||||||
constitutive_LiAndItsTangents, &
|
|
||||||
constitutive_SandItsTangents
|
|
||||||
use math, only: math_mul33xx33, &
|
|
||||||
math_mul3333xx3333, &
|
|
||||||
math_inv33, &
|
|
||||||
math_det33, &
|
|
||||||
math_I3, &
|
|
||||||
math_identity2nd, &
|
|
||||||
math_3333to99, &
|
|
||||||
math_33to9, &
|
|
||||||
math_9to33
|
|
||||||
|
|
||||||
integer, intent(in):: el, & ! element index
|
integer, intent(in):: el, & ! element index
|
||||||
ip, & ! integration point index
|
ip, & ! integration point index
|
||||||
|
@ -1690,27 +1537,6 @@ end function integrateStress
|
||||||
!> using Fixed Point Iteration to adapt the stepsize
|
!> using Fixed Point Iteration to adapt the stepsize
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateFPI
|
subroutine integrateStateFPI
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: debug_level, &
|
|
||||||
debug_e, &
|
|
||||||
debug_i, &
|
|
||||||
debug_g, &
|
|
||||||
debug_crystallite, &
|
|
||||||
debug_levelBasic, &
|
|
||||||
debug_levelExtensive, &
|
|
||||||
debug_levelSelective
|
|
||||||
#endif
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phaseAt, phasememberAt, &
|
|
||||||
phase_Nsources, &
|
|
||||||
homogenization_Ngrains
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_plasticity_maxSizeDotState, &
|
|
||||||
constitutive_source_maxSizeDotState
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
NiterationState, & !< number of iterations in state loop
|
NiterationState, & !< number of iterations in state loop
|
||||||
|
@ -1898,8 +1724,6 @@ end subroutine integrateStateFPI
|
||||||
!> @brief integrate state with 1st order explicit Euler method
|
!> @brief integrate state with 1st order explicit Euler method
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateEuler
|
subroutine integrateStateEuler
|
||||||
use material, only: &
|
|
||||||
plasticState
|
|
||||||
|
|
||||||
call update_dotState(1.0_pReal)
|
call update_dotState(1.0_pReal)
|
||||||
call update_state(1.0_pReal)
|
call update_state(1.0_pReal)
|
||||||
|
@ -1916,19 +1740,6 @@ end subroutine integrateStateEuler
|
||||||
!> @brief integrate stress, state with 1st order Euler method with adaptive step size
|
!> @brief integrate stress, state with 1st order Euler method with adaptive step size
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateAdaptiveEuler
|
subroutine integrateStateAdaptiveEuler
|
||||||
use mesh, only: &
|
|
||||||
theMesh, &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
|
||||||
homogenization_Ngrains, &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phaseAt, phasememberAt, &
|
|
||||||
phase_Nsources, &
|
|
||||||
homogenization_maxNgrains
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_plasticity_maxSizeDotState, &
|
|
||||||
constitutive_source_maxSizeDotState
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
e, & ! element index in element loop
|
e, & ! element index in element loop
|
||||||
|
@ -2022,14 +1833,6 @@ end subroutine integrateStateAdaptiveEuler
|
||||||
! ToDo: This is totally BROKEN: RK4dotState is never used!!!
|
! ToDo: This is totally BROKEN: RK4dotState is never used!!!
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateRK4
|
subroutine integrateStateRK4
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
|
||||||
homogenization_Ngrains, &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phase_Nsources, &
|
|
||||||
phaseAt, phasememberAt
|
|
||||||
|
|
||||||
real(pReal), dimension(4), parameter :: &
|
real(pReal), dimension(4), parameter :: &
|
||||||
TIMESTEPFRACTION = [0.5_pReal, 0.5_pReal, 1.0_pReal, 1.0_pReal] ! factor giving the fraction of the original timestep used for Runge Kutta Integration
|
TIMESTEPFRACTION = [0.5_pReal, 0.5_pReal, 1.0_pReal, 1.0_pReal] ! factor giving the fraction of the original timestep used for Runge Kutta Integration
|
||||||
|
@ -2089,19 +1892,6 @@ end subroutine integrateStateRK4
|
||||||
!> adaptive step size (use 5th order solution to advance = "local extrapolation")
|
!> adaptive step size (use 5th order solution to advance = "local extrapolation")
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateRKCK45
|
subroutine integrateStateRKCK45
|
||||||
use mesh, only: &
|
|
||||||
mesh_element, &
|
|
||||||
theMesh
|
|
||||||
use material, only: &
|
|
||||||
homogenization_Ngrains, &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phase_Nsources, &
|
|
||||||
phaseAt, phasememberAt, &
|
|
||||||
homogenization_maxNgrains
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_plasticity_maxSizeDotState, &
|
|
||||||
constitutive_source_maxSizeDotState
|
|
||||||
|
|
||||||
real(pReal), dimension(5,5), parameter :: &
|
real(pReal), dimension(5,5), parameter :: &
|
||||||
A = reshape([&
|
A = reshape([&
|
||||||
|
@ -2284,8 +2074,6 @@ end subroutine nonlocalConvergenceCheck
|
||||||
!> @details: For explicitEuler, RK4 and RKCK45, adaptive Euler and FPI have their on criteria
|
!> @details: For explicitEuler, RK4 and RKCK45, adaptive Euler and FPI have their on criteria
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine setConvergenceFlag
|
subroutine setConvergenceFlag
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
e, & !< element index in element loop
|
e, & !< element index in element loop
|
||||||
|
@ -2324,8 +2112,6 @@ end subroutine setConvergenceFlag
|
||||||
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
|
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine update_stress(timeFraction)
|
subroutine update_stress(timeFraction)
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
|
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
timeFraction
|
timeFraction
|
||||||
|
@ -2357,8 +2143,6 @@ end subroutine update_stress
|
||||||
!> @brief tbd
|
!> @brief tbd
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine update_dependentState
|
subroutine update_dependentState
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use constitutive, only: &
|
use constitutive, only: &
|
||||||
constitutive_dependentState => constitutive_microstructure
|
constitutive_dependentState => constitutive_microstructure
|
||||||
|
|
||||||
|
@ -2384,13 +2168,6 @@ end subroutine update_dependentState
|
||||||
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
|
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine update_state(timeFraction)
|
subroutine update_state(timeFraction)
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phase_Nsources, &
|
|
||||||
phaseAt, phasememberAt
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
|
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
timeFraction
|
timeFraction
|
||||||
|
@ -2432,17 +2209,6 @@ end subroutine update_state
|
||||||
!> if NaN occurs, crystallite_todo is set to FALSE. Any NaN in a nonlocal propagates to all others
|
!> if NaN occurs, crystallite_todo is set to FALSE. Any NaN in a nonlocal propagates to all others
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine update_dotState(timeFraction)
|
subroutine update_dotState(timeFraction)
|
||||||
use, intrinsic :: &
|
|
||||||
IEEE_arithmetic
|
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phaseAt, phasememberAt, &
|
|
||||||
phase_Nsources
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_collectDotState
|
|
||||||
|
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
timeFraction
|
timeFraction
|
||||||
|
@ -2489,19 +2255,7 @@ end subroutine update_DotState
|
||||||
|
|
||||||
|
|
||||||
subroutine update_deltaState
|
subroutine update_deltaState
|
||||||
use, intrinsic :: &
|
|
||||||
IEEE_arithmetic
|
|
||||||
use prec, only: &
|
|
||||||
dNeq0
|
|
||||||
use mesh, only: &
|
|
||||||
mesh_element
|
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phase_Nsources, &
|
|
||||||
phaseAt, phasememberAt
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_collectDeltaState
|
|
||||||
integer :: &
|
integer :: &
|
||||||
e, & !< element index in element loop
|
e, & !< element index in element loop
|
||||||
i, & !< integration point index in ip loop
|
i, & !< integration point index in ip loop
|
||||||
|
@ -2566,27 +2320,6 @@ end subroutine update_deltaState
|
||||||
!> returns true, if state jump was successfull or not needed. false indicates NaN in delta state
|
!> returns true, if state jump was successfull or not needed. false indicates NaN in delta state
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
logical function stateJump(ipc,ip,el)
|
logical function stateJump(ipc,ip,el)
|
||||||
use, intrinsic :: &
|
|
||||||
IEEE_arithmetic
|
|
||||||
use prec, only: &
|
|
||||||
dNeq0
|
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: &
|
|
||||||
debug_e, &
|
|
||||||
debug_i, &
|
|
||||||
debug_g, &
|
|
||||||
debug_level, &
|
|
||||||
debug_crystallite, &
|
|
||||||
debug_levelExtensive, &
|
|
||||||
debug_levelSelective
|
|
||||||
#endif
|
|
||||||
use material, only: &
|
|
||||||
plasticState, &
|
|
||||||
sourceState, &
|
|
||||||
phase_Nsources, &
|
|
||||||
phaseAt, phasememberAt
|
|
||||||
use constitutive, only: &
|
|
||||||
constitutive_collectDeltaState
|
|
||||||
|
|
||||||
integer, intent(in):: &
|
integer, intent(in):: &
|
||||||
el, & ! element index
|
el, & ! element index
|
||||||
|
|
200
src/lattice.f90
200
src/lattice.f90
|
@ -7,8 +7,10 @@
|
||||||
! and cleavage as well as interaction among the various systems
|
! and cleavage as well as interaction among the various systems
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module lattice
|
module lattice
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
use IO
|
||||||
|
use config
|
||||||
|
use math
|
||||||
use future
|
use future
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -28,25 +30,25 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! face centered cubic
|
! face centered cubic
|
||||||
integer, dimension(2), parameter, private :: &
|
integer, dimension(2), parameter :: &
|
||||||
LATTICE_FCC_NSLIPSYSTEM = [12, 6] !< # of slip systems per family for fcc
|
LATTICE_FCC_NSLIPSYSTEM = [12, 6] !< # of slip systems per family for fcc
|
||||||
|
|
||||||
integer, dimension(1), parameter, private :: &
|
integer, dimension(1), parameter :: &
|
||||||
LATTICE_FCC_NTWINSYSTEM = [12] !< # of twin systems per family for fcc
|
LATTICE_FCC_NTWINSYSTEM = [12] !< # of twin systems per family for fcc
|
||||||
|
|
||||||
integer, dimension(1), parameter, private :: &
|
integer, dimension(1), parameter :: &
|
||||||
LATTICE_FCC_NTRANSSYSTEM = [12] !< # of transformation systems per family for fcc
|
LATTICE_FCC_NTRANSSYSTEM = [12] !< # of transformation systems per family for fcc
|
||||||
|
|
||||||
integer, dimension(2), parameter, private :: &
|
integer, dimension(2), parameter :: &
|
||||||
LATTICE_FCC_NCLEAVAGESYSTEM = [3, 4] !< # of cleavage systems per family for fcc
|
LATTICE_FCC_NCLEAVAGESYSTEM = [3, 4] !< # of cleavage systems per family for fcc
|
||||||
|
|
||||||
integer, parameter, private :: &
|
integer, parameter :: &
|
||||||
LATTICE_FCC_NSLIP = sum(LATTICE_FCC_NSLIPSYSTEM), & !< total # of slip 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_NTWIN = sum(LATTICE_FCC_NTWINSYSTEM), & !< total # of twin systems for fcc
|
||||||
LATTICE_FCC_NTRANS = sum(LATTICE_FCC_NTRANSSYSTEM), & !< total # of transformation 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
|
LATTICE_FCC_NCLEAVAGE = sum(LATTICE_FCC_NCLEAVAGESYSTEM) !< total # of cleavage systems for fcc
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_FCC_NSLIP), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_FCC_NSLIP), parameter :: &
|
||||||
LATTICE_FCC_SYSTEMSLIP = reshape(real([&
|
LATTICE_FCC_SYSTEMSLIP = reshape(real([&
|
||||||
! Slip direction Plane normal ! SCHMID-BOAS notation
|
! Slip direction Plane normal ! SCHMID-BOAS notation
|
||||||
0, 1,-1, 1, 1, 1, & ! B2
|
0, 1,-1, 1, 1, 1, & ! B2
|
||||||
|
@ -70,11 +72,11 @@ module lattice
|
||||||
0, 1,-1, 0, 1, 1 &
|
0, 1,-1, 0, 1, 1 &
|
||||||
],pReal),shape(LATTICE_FCC_SYSTEMSLIP)) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
],pReal),shape(LATTICE_FCC_SYSTEMSLIP)) !< Slip system <110>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
||||||
|
|
||||||
character(len=*), dimension(2), parameter, private :: LATTICE_FCC_SLIPFAMILY_NAME = &
|
character(len=*), dimension(2), parameter :: LATTICE_FCC_SLIPFAMILY_NAME = &
|
||||||
['<0 1 -1>{1 1 1}', &
|
['<0 1 -1>{1 1 1}', &
|
||||||
'<0 1 -1>{0 1 1}']
|
'<0 1 -1>{0 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_FCC_NTWIN), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_FCC_NTWIN), parameter :: &
|
||||||
LATTICE_FCC_SYSTEMTWIN = reshape(real( [&
|
LATTICE_FCC_SYSTEMTWIN = reshape(real( [&
|
||||||
-2, 1, 1, 1, 1, 1, &
|
-2, 1, 1, 1, 1, 1, &
|
||||||
1,-2, 1, 1, 1, 1, &
|
1,-2, 1, 1, 1, 1, &
|
||||||
|
@ -90,7 +92,7 @@ module lattice
|
||||||
-1, 1, 2, -1, 1,-1 &
|
-1, 1, 2, -1, 1,-1 &
|
||||||
],pReal),shape(LATTICE_FCC_SYSTEMTWIN)) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
],pReal),shape(LATTICE_FCC_SYSTEMTWIN)) !< Twin system <112>{111} directions. Sorted according to Eisenlohr & Hantcherli
|
||||||
|
|
||||||
character(len=*), dimension(1), parameter, private :: LATTICE_FCC_TWINFAMILY_NAME = &
|
character(len=*), dimension(1), parameter :: LATTICE_FCC_TWINFAMILY_NAME = &
|
||||||
['<-2 1 1>{1 1 1}']
|
['<-2 1 1>{1 1 1}']
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,7 +112,7 @@ module lattice
|
||||||
10,11 &
|
10,11 &
|
||||||
],shape(LATTICE_FCC_TWINNUCLEATIONSLIPPAIR))
|
],shape(LATTICE_FCC_TWINNUCLEATIONSLIPPAIR))
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_FCC_NCLEAVAGE), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_FCC_NCLEAVAGE), parameter :: &
|
||||||
LATTICE_FCC_SYSTEMCLEAVAGE = reshape(real([&
|
LATTICE_FCC_SYSTEMCLEAVAGE = reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
0, 1, 0, 1, 0, 0, &
|
0, 1, 0, 1, 0, 0, &
|
||||||
|
@ -124,21 +126,21 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! body centered cubic
|
! body centered cubic
|
||||||
integer, dimension(2), parameter, private :: &
|
integer, dimension(2), parameter :: &
|
||||||
LATTICE_BCC_NSLIPSYSTEM = [12, 12] !< # of slip systems per family for bcc
|
LATTICE_BCC_NSLIPSYSTEM = [12, 12] !< # of slip systems per family for bcc
|
||||||
|
|
||||||
integer, dimension(1), parameter, private :: &
|
integer, dimension(1), parameter :: &
|
||||||
LATTICE_BCC_NTWINSYSTEM = [12] !< # of twin systems per family for bcc
|
LATTICE_BCC_NTWINSYSTEM = [12] !< # of twin systems per family for bcc
|
||||||
|
|
||||||
integer, dimension(2), parameter, private :: &
|
integer, dimension(2), parameter :: &
|
||||||
LATTICE_BCC_NCLEAVAGESYSTEM = [3, 6] !< # of cleavage systems per family for bcc
|
LATTICE_BCC_NCLEAVAGESYSTEM = [3, 6] !< # of cleavage systems per family for bcc
|
||||||
|
|
||||||
integer, parameter, private :: &
|
integer, parameter :: &
|
||||||
LATTICE_BCC_NSLIP = sum(LATTICE_BCC_NSLIPSYSTEM), & !< total # of slip 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_NTWIN = sum(LATTICE_BCC_NTWINSYSTEM), & !< total # of twin systems for bcc
|
||||||
LATTICE_BCC_NCLEAVAGE = sum(LATTICE_BCC_NCLEAVAGESYSTEM) !< total # of cleavage 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 :: &
|
real(pReal), dimension(3+3,LATTICE_BCC_NSLIP), parameter :: &
|
||||||
LATTICE_BCC_SYSTEMSLIP = reshape(real([&
|
LATTICE_BCC_SYSTEMSLIP = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
! Slip system <111>{110}
|
! Slip system <111>{110}
|
||||||
|
@ -169,11 +171,11 @@ module lattice
|
||||||
1, 1, 1, 1, 1,-2 &
|
1, 1, 1, 1, 1,-2 &
|
||||||
],pReal),shape(LATTICE_BCC_SYSTEMSLIP))
|
],pReal),shape(LATTICE_BCC_SYSTEMSLIP))
|
||||||
|
|
||||||
character(len=*), dimension(2), parameter, private :: LATTICE_BCC_SLIPFAMILY_NAME = &
|
character(len=*), dimension(2), parameter :: LATTICE_BCC_SLIPFAMILY_NAME = &
|
||||||
['<1 -1 1>{0 1 1}', &
|
['<1 -1 1>{0 1 1}', &
|
||||||
'<1 -1 1>{2 1 1}']
|
'<1 -1 1>{2 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_BCC_NTWIN), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_BCC_NTWIN), parameter :: &
|
||||||
LATTICE_BCC_SYSTEMTWIN = reshape(real([&
|
LATTICE_BCC_SYSTEMTWIN = reshape(real([&
|
||||||
! Twin system <111>{112}
|
! Twin system <111>{112}
|
||||||
-1, 1, 1, 2, 1, 1, &
|
-1, 1, 1, 2, 1, 1, &
|
||||||
|
@ -190,10 +192,10 @@ module lattice
|
||||||
1, 1, 1, 1, 1,-2 &
|
1, 1, 1, 1, 1,-2 &
|
||||||
],pReal),shape(LATTICE_BCC_SYSTEMTWIN))
|
],pReal),shape(LATTICE_BCC_SYSTEMTWIN))
|
||||||
|
|
||||||
character(len=*), dimension(1), parameter, private :: LATTICE_BCC_TWINFAMILY_NAME = &
|
character(len=*), dimension(1), parameter :: LATTICE_BCC_TWINFAMILY_NAME = &
|
||||||
['<1 1 1>{2 1 1}']
|
['<1 1 1>{2 1 1}']
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_BCC_NCLEAVAGE), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_BCC_NCLEAVAGE), parameter :: &
|
||||||
LATTICE_BCC_SYSTEMCLEAVAGE = reshape(real([&
|
LATTICE_BCC_SYSTEMCLEAVAGE = reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
0, 1, 0, 1, 0, 0, &
|
0, 1, 0, 1, 0, 0, &
|
||||||
|
@ -209,21 +211,21 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! hexagonal
|
! hexagonal
|
||||||
integer, dimension(6), parameter, private :: &
|
integer, dimension(6), parameter :: &
|
||||||
LATTICE_HEX_NSLIPSYSTEM = [3, 3, 3, 6, 12, 6] !< # of slip systems per family for hex
|
LATTICE_HEX_NSLIPSYSTEM = [3, 3, 3, 6, 12, 6] !< # of slip systems per family for hex
|
||||||
|
|
||||||
integer, dimension(4), parameter, private :: &
|
integer, dimension(4), parameter :: &
|
||||||
LATTICE_HEX_NTWINSYSTEM = [6, 6, 6, 6] !< # of slip systems per family for hex
|
LATTICE_HEX_NTWINSYSTEM = [6, 6, 6, 6] !< # of slip systems per family for hex
|
||||||
|
|
||||||
integer, dimension(1), parameter, private :: &
|
integer, dimension(1), parameter :: &
|
||||||
LATTICE_HEX_NCLEAVAGESYSTEM = [3] !< # of cleavage systems per family for hex
|
LATTICE_HEX_NCLEAVAGESYSTEM = [3] !< # of cleavage systems per family for hex
|
||||||
|
|
||||||
integer, parameter, private :: &
|
integer, parameter :: &
|
||||||
LATTICE_HEX_NSLIP = sum(LATTICE_HEX_NSLIPSYSTEM), & !< total # of slip 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_NTWIN = sum(LATTICE_HEX_NTWINSYSTEM), & !< total # of twin systems for hex
|
||||||
LATTICE_HEX_NCLEAVAGE = sum(LATTICE_HEX_NCLEAVAGESYSTEM) !< total # of cleavage 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 :: &
|
real(pReal), dimension(4+4,LATTICE_HEX_NSLIP), parameter :: &
|
||||||
LATTICE_HEX_SYSTEMSLIP = reshape(real([&
|
LATTICE_HEX_SYSTEMSLIP = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
! Basal systems <11.0>{00.1} (independent of c/a-ratio, Bravais notation (4 coordinate base))
|
! Basal systems <11.0>{00.1} (independent of c/a-ratio, Bravais notation (4 coordinate base))
|
||||||
|
@ -267,7 +269,7 @@ module lattice
|
||||||
1, 1, -2, 3, -1, -1, 2, 2 &
|
1, 1, -2, 3, -1, -1, 2, 2 &
|
||||||
],pReal),shape(LATTICE_HEX_SYSTEMSLIP)) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
|
],pReal),shape(LATTICE_HEX_SYSTEMSLIP)) !< slip systems for hex sorted by A. Alankar & P. Eisenlohr
|
||||||
|
|
||||||
character(len=*), dimension(6), parameter, private :: LATTICE_HEX_SLIPFAMILY_NAME = &
|
character(len=*), dimension(6), parameter :: LATTICE_HEX_SLIPFAMILY_NAME = &
|
||||||
['<1 1 . 1>{0 0 . 1} ', &
|
['<1 1 . 1>{0 0 . 1} ', &
|
||||||
'<1 1 . 1>{1 0 . 0} ', &
|
'<1 1 . 1>{1 0 . 0} ', &
|
||||||
'<1 0 . 0>{1 1 . 0} ', &
|
'<1 0 . 0>{1 1 . 0} ', &
|
||||||
|
@ -275,7 +277,7 @@ module lattice
|
||||||
'<1 1 . 3>{-1 0 . 1} ', &
|
'<1 1 . 3>{-1 0 . 1} ', &
|
||||||
'<1 1 . 3>{-1 -1 . 2}']
|
'<1 1 . 3>{-1 -1 . 2}']
|
||||||
|
|
||||||
real(pReal), dimension(4+4,LATTICE_HEX_NTWIN), parameter, private :: &
|
real(pReal), dimension(4+4,LATTICE_HEX_NTWIN), parameter :: &
|
||||||
LATTICE_HEX_SYSTEMTWIN = reshape(real([&
|
LATTICE_HEX_SYSTEMTWIN = reshape(real([&
|
||||||
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
|
! Compression or Tension =f(twinning shear=f(c/a)) for each metal ! (according to Yoo 1981)
|
||||||
1, -1, 0, 1, -1, 1, 0, 2, & ! <-10.1>{10.2} shear = (3-(c/a)^2)/(sqrt(3) c/a)
|
1, -1, 0, 1, -1, 1, 0, 2, & ! <-10.1>{10.2} shear = (3-(c/a)^2)/(sqrt(3) c/a)
|
||||||
|
@ -307,13 +309,13 @@ module lattice
|
||||||
1, 1, -2, -3, 1, 1, -2, 2 &
|
1, 1, -2, -3, 1, 1, -2, 2 &
|
||||||
],pReal),shape(LATTICE_HEX_SYSTEMTWIN)) !< twin systems for hex, order follows Prof. Tom Bieler's scheme
|
],pReal),shape(LATTICE_HEX_SYSTEMTWIN)) !< twin systems for hex, order follows Prof. Tom Bieler's scheme
|
||||||
|
|
||||||
character(len=*), dimension(4), parameter, private :: LATTICE_HEX_TWINFAMILY_NAME = &
|
character(len=*), dimension(4), parameter :: LATTICE_HEX_TWINFAMILY_NAME = &
|
||||||
['<-1 0 . 1>{1 0 . 2} ', &
|
['<-1 0 . 1>{1 0 . 2} ', &
|
||||||
'<1 1 . 6>{-1 -1 . 1}', &
|
'<1 1 . 6>{-1 -1 . 1}', &
|
||||||
'<1 0 . -2>{1 0 . 1} ', &
|
'<1 0 . -2>{1 0 . 1} ', &
|
||||||
'<1 1 . -3>{1 1 . 2} ']
|
'<1 1 . -3>{1 1 . 2} ']
|
||||||
|
|
||||||
real(pReal), dimension(4+4,LATTICE_HEX_NCLEAVAGE), parameter, private :: &
|
real(pReal), dimension(4+4,LATTICE_HEX_NCLEAVAGE), parameter :: &
|
||||||
LATTICE_HEX_SYSTEMCLEAVAGE = reshape(real([&
|
LATTICE_HEX_SYSTEMCLEAVAGE = reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
2,-1,-1, 0, 0, 0, 0, 1, &
|
2,-1,-1, 0, 0, 0, 0, 1, &
|
||||||
|
@ -324,13 +326,13 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! body centered tetragonal
|
! body centered tetragonal
|
||||||
integer, dimension(13), parameter, private :: &
|
integer, dimension(13), parameter :: &
|
||||||
LATTICE_BCT_NSLIPSYSTEM = [2, 2, 2, 4, 2, 4, 2, 2, 4, 8, 4, 8, 8 ] !< # of slip systems per family for bct (Sn) Bieler J. Electr Mater 2009
|
LATTICE_BCT_NSLIPSYSTEM = [2, 2, 2, 4, 2, 4, 2, 2, 4, 8, 4, 8, 8 ] !< # of slip systems per family for bct (Sn) Bieler J. Electr Mater 2009
|
||||||
|
|
||||||
integer, parameter, private :: &
|
integer, parameter :: &
|
||||||
LATTICE_BCT_NSLIP = sum(LATTICE_BCT_NSLIPSYSTEM) !< total # of slip systems for bct
|
LATTICE_BCT_NSLIP = sum(LATTICE_BCT_NSLIPSYSTEM) !< total # of slip systems for bct
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_BCT_NSLIP), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_BCT_NSLIP), parameter :: &
|
||||||
LATTICE_BCT_SYSTEMSLIP = reshape(real([&
|
LATTICE_BCT_SYSTEMSLIP = reshape(real([&
|
||||||
! Slip direction Plane normal
|
! Slip direction Plane normal
|
||||||
! Slip family 1 {100)<001] (Bravais notation {hkl)<uvw] for bct c/a = 0.5456)
|
! Slip family 1 {100)<001] (Bravais notation {hkl)<uvw] for bct c/a = 0.5456)
|
||||||
|
@ -400,7 +402,7 @@ module lattice
|
||||||
1, 1, 1, 1,-2, 1 &
|
1, 1, 1, 1,-2, 1 &
|
||||||
],pReal),[ 3 + 3,LATTICE_BCT_NSLIP]) !< slip systems for bct sorted by Bieler
|
],pReal),[ 3 + 3,LATTICE_BCT_NSLIP]) !< slip systems for bct sorted by Bieler
|
||||||
|
|
||||||
character(len=*), dimension(13), parameter, private :: LATTICE_BCT_SLIPFAMILY_NAME = &
|
character(len=*), dimension(13), parameter :: LATTICE_BCT_SLIPFAMILY_NAME = &
|
||||||
['{1 0 0)<0 0 1] ', &
|
['{1 0 0)<0 0 1] ', &
|
||||||
'{1 1 0)<0 0 1] ', &
|
'{1 1 0)<0 0 1] ', &
|
||||||
'{1 0 0)<0 1 0] ', &
|
'{1 0 0)<0 1 0] ', &
|
||||||
|
@ -418,13 +420,13 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! isotropic
|
! isotropic
|
||||||
integer, dimension(1), parameter, private :: &
|
integer, dimension(1), parameter :: &
|
||||||
LATTICE_ISO_NCLEAVAGESYSTEM = [3] !< # of cleavage systems per family for iso
|
LATTICE_ISO_NCLEAVAGESYSTEM = [3] !< # of cleavage systems per family for iso
|
||||||
|
|
||||||
integer, parameter, private :: &
|
integer, parameter :: &
|
||||||
LATTICE_ISO_NCLEAVAGE = sum(LATTICE_ISO_NCLEAVAGESYSTEM) !< total # of cleavage systems for iso
|
LATTICE_ISO_NCLEAVAGE = sum(LATTICE_ISO_NCLEAVAGESYSTEM) !< total # of cleavage systems for iso
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_ISO_NCLEAVAGE), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_ISO_NCLEAVAGE), parameter :: &
|
||||||
LATTICE_ISO_SYSTEMCLEAVAGE= reshape(real([&
|
LATTICE_ISO_SYSTEMCLEAVAGE= reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
0, 1, 0, 1, 0, 0, &
|
0, 1, 0, 1, 0, 0, &
|
||||||
|
@ -435,13 +437,13 @@ module lattice
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! orthorhombic
|
! orthorhombic
|
||||||
integer, dimension(3), parameter, private :: &
|
integer, dimension(3), parameter :: &
|
||||||
LATTICE_ORT_NCLEAVAGESYSTEM = [1, 1, 1] !< # of cleavage systems per family for ortho
|
LATTICE_ORT_NCLEAVAGESYSTEM = [1, 1, 1] !< # of cleavage systems per family for ortho
|
||||||
|
|
||||||
integer, parameter, private :: &
|
integer, parameter :: &
|
||||||
LATTICE_ORT_NCLEAVAGE = sum(LATTICE_ORT_NCLEAVAGESYSTEM) !< total # of cleavage systems for ortho
|
LATTICE_ORT_NCLEAVAGE = sum(LATTICE_ORT_NCLEAVAGESYSTEM) !< total # of cleavage systems for ortho
|
||||||
|
|
||||||
real(pReal), dimension(3+3,LATTICE_ORT_NCLEAVAGE), parameter, private :: &
|
real(pReal), dimension(3+3,LATTICE_ORT_NCLEAVAGE), parameter :: &
|
||||||
LATTICE_ORT_SYSTEMCLEAVAGE = reshape(real([&
|
LATTICE_ORT_SYSTEMCLEAVAGE = reshape(real([&
|
||||||
! Cleavage direction Plane normal
|
! Cleavage direction Plane normal
|
||||||
0, 1, 0, 1, 0, 0, &
|
0, 1, 0, 1, 0, 0, &
|
||||||
|
@ -541,10 +543,6 @@ module lattice
|
||||||
!> @brief Module initialization
|
!> @brief Module initialization
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine lattice_init
|
subroutine lattice_init
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use config, only: &
|
|
||||||
config_phase
|
|
||||||
|
|
||||||
integer :: Nphases
|
integer :: Nphases
|
||||||
character(len=65536) :: &
|
character(len=65536) :: &
|
||||||
|
@ -654,14 +652,6 @@ end subroutine lattice_init
|
||||||
!> @brief !!!!!!!DEPRECTATED!!!!!!
|
!> @brief !!!!!!!DEPRECTATED!!!!!!
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine lattice_initializeStructure(myPhase,CoverA)
|
subroutine lattice_initializeStructure(myPhase,CoverA)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check
|
|
||||||
use math, only: &
|
|
||||||
math_sym3333to66, &
|
|
||||||
math_Voigt66to3333, &
|
|
||||||
math_cross
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, intent(in) :: myPhase
|
integer, intent(in) :: myPhase
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
|
@ -690,9 +680,10 @@ subroutine lattice_initializeStructure(myPhase,CoverA)
|
||||||
call IO_error(135,el=i,ip=myPhase,ext_msg='matrix diagonal "el"ement of phase "ip"')
|
call IO_error(135,el=i,ip=myPhase,ext_msg='matrix diagonal "el"ement of phase "ip"')
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
forall (i = 1:3) &
|
do i = 1,3
|
||||||
lattice_thermalExpansion33 (1:3,1:3,i,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
|
lattice_thermalExpansion33 (1:3,1:3,i,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
|
||||||
lattice_thermalExpansion33 (1:3,1:3,i,myPhase))
|
lattice_thermalExpansion33 (1:3,1:3,i,myPhase))
|
||||||
|
enddo
|
||||||
|
|
||||||
lattice_thermalConductivity33 (1:3,1:3,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
|
lattice_thermalConductivity33 (1:3,1:3,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
|
||||||
lattice_thermalConductivity33 (1:3,1:3,myPhase))
|
lattice_thermalConductivity33 (1:3,1:3,myPhase))
|
||||||
|
@ -763,17 +754,17 @@ pure function lattice_symmetrizeC66(struct,C66)
|
||||||
|
|
||||||
select case(struct)
|
select case(struct)
|
||||||
case (LATTICE_iso_ID)
|
case (LATTICE_iso_ID)
|
||||||
forall(k=1:3)
|
do k=1,3
|
||||||
forall(j=1:3) lattice_symmetrizeC66(k,j) = C66(1,2)
|
forall(j=1:3) lattice_symmetrizeC66(k,j) = C66(1,2)
|
||||||
lattice_symmetrizeC66(k,k) = C66(1,1)
|
lattice_symmetrizeC66(k,k) = C66(1,1)
|
||||||
lattice_symmetrizeC66(k+3,k+3) = 0.5_pReal*(C66(1,1)-C66(1,2))
|
lattice_symmetrizeC66(k+3,k+3) = 0.5_pReal*(C66(1,1)-C66(1,2))
|
||||||
end forall
|
enddo
|
||||||
case (LATTICE_fcc_ID,LATTICE_bcc_ID)
|
case (LATTICE_fcc_ID,LATTICE_bcc_ID)
|
||||||
forall(k=1:3)
|
do k=1,3
|
||||||
forall(j=1:3) lattice_symmetrizeC66(k,j) = C66(1,2)
|
forall(j=1:3) lattice_symmetrizeC66(k,j) = C66(1,2)
|
||||||
lattice_symmetrizeC66(k,k) = C66(1,1)
|
lattice_symmetrizeC66(k,k) = C66(1,1)
|
||||||
lattice_symmetrizeC66(k+3,k+3) = C66(4,4)
|
lattice_symmetrizeC66(k+3,k+3) = C66(4,4)
|
||||||
end forall
|
enddo
|
||||||
case (LATTICE_hex_ID)
|
case (LATTICE_hex_ID)
|
||||||
lattice_symmetrizeC66(1,1) = C66(1,1)
|
lattice_symmetrizeC66(1,1) = C66(1,1)
|
||||||
lattice_symmetrizeC66(2,2) = C66(1,1)
|
lattice_symmetrizeC66(2,2) = C66(1,1)
|
||||||
|
@ -834,7 +825,9 @@ pure function lattice_symmetrize33(struct,T33)
|
||||||
|
|
||||||
select case(struct)
|
select case(struct)
|
||||||
case (LATTICE_iso_ID,LATTICE_fcc_ID,LATTICE_bcc_ID)
|
case (LATTICE_iso_ID,LATTICE_fcc_ID,LATTICE_bcc_ID)
|
||||||
forall(k=1:3) lattice_symmetrize33(k,k) = T33(1,1)
|
do k=1,3
|
||||||
|
lattice_symmetrize33(k,k) = T33(1,1)
|
||||||
|
enddo
|
||||||
case (LATTICE_hex_ID)
|
case (LATTICE_hex_ID)
|
||||||
lattice_symmetrize33(1,1) = T33(1,1)
|
lattice_symmetrize33(1,1) = T33(1,1)
|
||||||
lattice_symmetrize33(2,2) = T33(1,1)
|
lattice_symmetrize33(2,2) = T33(1,1)
|
||||||
|
@ -854,10 +847,6 @@ end function lattice_symmetrize33
|
||||||
!> @brief figures whether unit quat falls into stereographic standard triangle
|
!> @brief figures whether unit quat falls into stereographic standard triangle
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
logical pure function lattice_qInSST(Q, struct)
|
logical pure function lattice_qInSST(Q, struct)
|
||||||
use, intrinsic :: &
|
|
||||||
IEEE_arithmetic
|
|
||||||
use math, only: &
|
|
||||||
math_qToRodrig
|
|
||||||
|
|
||||||
real(pReal), dimension(4), intent(in) :: Q ! orientation
|
real(pReal), dimension(4), intent(in) :: Q ! orientation
|
||||||
integer(kind(LATTICE_undefined_ID)), intent(in) :: struct ! lattice structure
|
integer(kind(LATTICE_undefined_ID)), intent(in) :: struct ! lattice structure
|
||||||
|
@ -888,11 +877,6 @@ end function lattice_qInSST
|
||||||
!> @brief calculates the disorientation for 2 unit quaternions
|
!> @brief calculates the disorientation for 2 unit quaternions
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure function lattice_qDisorientation(Q1, Q2, struct)
|
pure function lattice_qDisorientation(Q1, Q2, struct)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check
|
|
||||||
use math, only: &
|
|
||||||
math_qMul, &
|
|
||||||
math_qConj
|
|
||||||
|
|
||||||
real(pReal), dimension(4) :: lattice_qDisorientation
|
real(pReal), dimension(4) :: lattice_qDisorientation
|
||||||
real(pReal), dimension(4), intent(in) :: &
|
real(pReal), dimension(4), intent(in) :: &
|
||||||
|
@ -998,8 +982,6 @@ end function lattice_qDisorientation
|
||||||
!> @brief Characteristic shear for twinning
|
!> @brief Characteristic shear for twinning
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_characteristicShear_Twin(Ntwin,structure,CoverA) result(characteristicShear)
|
function lattice_characteristicShear_Twin(Ntwin,structure,CoverA) result(characteristicShear)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -1077,14 +1059,6 @@ end function lattice_characteristicShear_Twin
|
||||||
!> @brief Rotated elasticity matrices for twinning in 66-vector notation
|
!> @brief Rotated elasticity matrices for twinning in 66-vector notation
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_C66_twin(Ntwin,C66,structure,CoverA)
|
function lattice_C66_twin(Ntwin,C66,structure,CoverA)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
PI, &
|
|
||||||
math_axisAngleToR, &
|
|
||||||
math_sym3333to66, &
|
|
||||||
math_66toSym3333, &
|
|
||||||
math_rotate_forward3333
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -1125,17 +1099,6 @@ end function lattice_C66_twin
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_C66_trans(Ntrans,C_parent66,structure_target, &
|
function lattice_C66_trans(Ntrans,C_parent66,structure_target, &
|
||||||
CoverA_trans,a_bcc,a_fcc)
|
CoverA_trans,a_bcc,a_fcc)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
INRAD, &
|
|
||||||
MATH_I3, &
|
|
||||||
math_axisAngleToR, &
|
|
||||||
math_sym3333to66, &
|
|
||||||
math_66toSym3333, &
|
|
||||||
math_rotate_forward3333
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntrans !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntrans !< number of active twin systems per family
|
||||||
character(len=*), intent(in) :: structure_target !< lattice structure
|
character(len=*), intent(in) :: structure_target !< lattice structure
|
||||||
|
@ -1196,13 +1159,6 @@ function lattice_C66_trans(Ntrans,C_parent66,structure_target, &
|
||||||
! Gröger et al. 2008, Acta Materialia 56 (2008) 5412–5425, table 1
|
! Gröger et al. 2008, Acta Materialia 56 (2008) 5412–5425, table 1
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_nonSchmidMatrix(Nslip,nonSchmidCoefficients,sense) result(nonSchmidMatrix)
|
function lattice_nonSchmidMatrix(Nslip,nonSchmidCoefficients,sense) result(nonSchmidMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
INRAD, &
|
|
||||||
math_outer, &
|
|
||||||
math_cross, &
|
|
||||||
math_axisAngleToR
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
real(pReal), dimension(:), intent(in) :: nonSchmidCoefficients !< non-Schmid coefficients for projections
|
real(pReal), dimension(:), intent(in) :: nonSchmidCoefficients !< non-Schmid coefficients for projections
|
||||||
|
@ -1246,8 +1202,6 @@ end function lattice_nonSchmidMatrix
|
||||||
!> details only active slip systems are considered
|
!> details only active slip systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_interaction_SlipBySlip(Nslip,interactionValues,structure) result(interactionMatrix)
|
function lattice_interaction_SlipBySlip(Nslip,interactionValues,structure) result(interactionMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
real(pReal), dimension(:), intent(in) :: interactionValues !< values for slip-slip interaction
|
real(pReal), dimension(:), intent(in) :: interactionValues !< values for slip-slip interaction
|
||||||
|
@ -1468,8 +1422,6 @@ end function lattice_interaction_SlipBySlip
|
||||||
!> details only active twin systems are considered
|
!> details only active twin systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_interaction_TwinByTwin(Ntwin,interactionValues,structure) result(interactionMatrix)
|
function lattice_interaction_TwinByTwin(Ntwin,interactionValues,structure) result(interactionMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
||||||
real(pReal), dimension(:), intent(in) :: interactionValues !< values for twin-twin interaction
|
real(pReal), dimension(:), intent(in) :: interactionValues !< values for twin-twin interaction
|
||||||
|
@ -1571,8 +1523,6 @@ end function lattice_interaction_TwinByTwin
|
||||||
!> details only active trans systems are considered
|
!> details only active trans systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_interaction_TransByTrans(Ntrans,interactionValues,structure) result(interactionMatrix)
|
function lattice_interaction_TransByTrans(Ntrans,interactionValues,structure) result(interactionMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntrans !< number of active trans systems per family
|
integer, dimension(:), intent(in) :: Ntrans !< number of active trans systems per family
|
||||||
real(pReal), dimension(:), intent(in) :: interactionValues !< values for trans-trans interaction
|
real(pReal), dimension(:), intent(in) :: interactionValues !< values for trans-trans interaction
|
||||||
|
@ -1618,8 +1568,6 @@ end function lattice_interaction_TransByTrans
|
||||||
!> details only active slip and twin systems are considered
|
!> details only active slip and twin systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,structure) result(interactionMatrix)
|
function lattice_interaction_SlipByTwin(Nslip,Ntwin,interactionValues,structure) result(interactionMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip, & !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip, & !< number of active slip systems per family
|
||||||
Ntwin !< number of active twin systems per family
|
Ntwin !< number of active twin systems per family
|
||||||
|
@ -1760,8 +1708,6 @@ end function lattice_interaction_SlipByTwin
|
||||||
!> details only active slip and trans systems are considered
|
!> details only active slip and trans systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_interaction_SlipByTrans(Nslip,Ntrans,interactionValues,structure) result(interactionMatrix)
|
function lattice_interaction_SlipByTrans(Nslip,Ntrans,interactionValues,structure) result(interactionMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip, & !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip, & !< number of active slip systems per family
|
||||||
Ntrans !< number of active trans systems per family
|
Ntrans !< number of active trans systems per family
|
||||||
|
@ -1818,8 +1764,6 @@ function lattice_interaction_SlipByTrans(Nslip,Ntrans,interactionValues,structur
|
||||||
!> details only active twin and slip systems are considered
|
!> details only active twin and slip systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_interaction_TwinBySlip(Ntwin,Nslip,interactionValues,structure) result(interactionMatrix)
|
function lattice_interaction_TwinBySlip(Ntwin,Nslip,interactionValues,structure) result(interactionMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntwin, & !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntwin, & !< number of active twin systems per family
|
||||||
Nslip !< number of active slip systems per family
|
Nslip !< number of active slip systems per family
|
||||||
|
@ -1898,13 +1842,6 @@ end function lattice_interaction_TwinBySlip
|
||||||
!> details only active slip systems are considered
|
!> details only active slip systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_SchmidMatrix_slip(Nslip,structure,cOverA) result(SchmidMatrix)
|
function lattice_SchmidMatrix_slip(Nslip,structure,cOverA) result(SchmidMatrix)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
math_trace33, &
|
|
||||||
math_outer
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -1957,13 +1894,6 @@ end function lattice_SchmidMatrix_slip
|
||||||
!> details only active twin systems are considered
|
!> details only active twin systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_SchmidMatrix_twin(Ntwin,structure,cOverA) result(SchmidMatrix)
|
function lattice_SchmidMatrix_twin(Ntwin,structure,cOverA) result(SchmidMatrix)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
math_trace33, &
|
|
||||||
math_outer
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntwin !< number of active twin systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -2013,8 +1943,6 @@ function lattice_SchmidMatrix_twin(Ntwin,structure,cOverA) result(SchmidMatrix)
|
||||||
!> details only active twin systems are considered
|
!> details only active twin systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_SchmidMatrix_trans(Ntrans,structure_target,cOverA,a_bcc,a_fcc) result(SchmidMatrix)
|
function lattice_SchmidMatrix_trans(Ntrans,structure_target,cOverA,a_bcc,a_fcc) result(SchmidMatrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ntrans !< number of active twin systems per family
|
integer, dimension(:), intent(in) :: Ntrans !< number of active twin systems per family
|
||||||
real(pReal), intent(in) :: cOverA !< c/a ratio
|
real(pReal), intent(in) :: cOverA !< c/a ratio
|
||||||
|
@ -2041,10 +1969,6 @@ end function lattice_SchmidMatrix_trans
|
||||||
!> details only active cleavage systems are considered
|
!> details only active cleavage systems are considered
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function lattice_SchmidMatrix_cleavage(Ncleavage,structure,cOverA) result(SchmidMatrix)
|
function lattice_SchmidMatrix_cleavage(Ncleavage,structure,cOverA) result(SchmidMatrix)
|
||||||
use math, only: &
|
|
||||||
math_outer
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Ncleavage !< number of active cleavage systems per family
|
integer, dimension(:), intent(in) :: Ncleavage !< number of active cleavage systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -2154,8 +2078,6 @@ end function lattice_slip_transverse
|
||||||
!> @details: This projection is used to calculate forest hardening for edge dislocations
|
!> @details: This projection is used to calculate forest hardening for edge dislocations
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function slipProjection_transverse(Nslip,structure,cOverA) result(projection)
|
function slipProjection_transverse(Nslip,structure,cOverA) result(projection)
|
||||||
use math, only: &
|
|
||||||
math_inner
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -2179,8 +2101,6 @@ end function slipProjection_transverse
|
||||||
!> @details: This projection is used to calculate forest hardening for screw dislocations
|
!> @details: This projection is used to calculate forest hardening for screw dislocations
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function slipProjection_direction(Nslip,structure,cOverA) result(projection)
|
function slipProjection_direction(Nslip,structure,cOverA) result(projection)
|
||||||
use math, only: &
|
|
||||||
math_inner
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -2204,8 +2124,6 @@ end function slipProjection_direction
|
||||||
!> @details Order: Direction, plane (normal), and common perpendicular
|
!> @details Order: Direction, plane (normal), and common perpendicular
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function coordinateSystem_slip(Nslip,structure,cOverA) result(coordinateSystem)
|
function coordinateSystem_slip(Nslip,structure,cOverA) result(coordinateSystem)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
character(len=*), intent(in) :: structure !< lattice structure
|
character(len=*), intent(in) :: structure !< lattice structure
|
||||||
|
@ -2249,8 +2167,6 @@ end function coordinateSystem_slip
|
||||||
!> @brief Populates reduced interaction matrix
|
!> @brief Populates reduced interaction matrix
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function buildInteraction(reacting_used,acting_used,reacting_max,acting_max,values,matrix)
|
function buildInteraction(reacting_used,acting_used,reacting_max,acting_max,values,matrix)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: &
|
integer, dimension(:), intent(in) :: &
|
||||||
reacting_used, & !< # of reacting systems per family as specified in material.config
|
reacting_used, & !< # of reacting systems per family as specified in material.config
|
||||||
|
@ -2295,10 +2211,6 @@ end function buildInteraction
|
||||||
!> @details Order: Direction, plane (normal), and common perpendicular
|
!> @details Order: Direction, plane (normal), and common perpendicular
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function buildCoordinateSystem(active,complete,system,structure,cOverA)
|
function buildCoordinateSystem(active,complete,system,structure,cOverA)
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
math_cross
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: &
|
integer, dimension(:), intent(in) :: &
|
||||||
active, &
|
active, &
|
||||||
|
@ -2370,16 +2282,6 @@ end function buildCoordinateSystem
|
||||||
! set a_bcc = 0.0 for fcc -> hex transformation
|
! set a_bcc = 0.0 for fcc -> hex transformation
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine buildTransformationSystem(Q,S,Ntrans,cOverA,a_fcc,a_bcc)
|
subroutine buildTransformationSystem(Q,S,Ntrans,cOverA,a_fcc,a_bcc)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
math_cross, &
|
|
||||||
math_outer, &
|
|
||||||
math_axisAngleToR, &
|
|
||||||
INRAD, &
|
|
||||||
MATH_I3
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: &
|
integer, dimension(:), intent(in) :: &
|
||||||
Ntrans
|
Ntrans
|
||||||
|
|
|
@ -8,17 +8,26 @@
|
||||||
!> @details to be done
|
!> @details to be done
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_dislotwin
|
module plastic_dislotwin
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
use debug
|
||||||
|
use math
|
||||||
|
use IO
|
||||||
|
use material
|
||||||
|
use config
|
||||||
|
use lattice
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
use results
|
||||||
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable, target, public :: &
|
integer, dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_dislotwin_sizePostResult !< size of each post result output
|
plastic_dislotwin_sizePostResult !< size of each post result output
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_dislotwin_output !< name of each post result output
|
plastic_dislotwin_output !< name of each post result output
|
||||||
|
|
||||||
real(pReal), parameter, private :: &
|
real(pReal), parameter :: &
|
||||||
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
|
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
|
||||||
|
|
||||||
enum, bind(c)
|
enum, bind(c)
|
||||||
|
@ -39,7 +48,7 @@ module plastic_dislotwin
|
||||||
f_tr_ID
|
f_tr_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters
|
type :: tParameters
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
mu, &
|
mu, &
|
||||||
nu, &
|
nu, &
|
||||||
|
@ -119,7 +128,7 @@ module plastic_dislotwin
|
||||||
dipoleFormation !< flag indicating consideration of dipole formation
|
dipoleFormation !< flag indicating consideration of dipole formation
|
||||||
end type !< container type for internal constitutive parameters
|
end type !< container type for internal constitutive parameters
|
||||||
|
|
||||||
type, private :: tDislotwinState
|
type :: tDislotwinState
|
||||||
real(pReal), dimension(:,:), pointer :: &
|
real(pReal), dimension(:,:), pointer :: &
|
||||||
rho_mob, &
|
rho_mob, &
|
||||||
rho_dip, &
|
rho_dip, &
|
||||||
|
@ -128,7 +137,7 @@ module plastic_dislotwin
|
||||||
f_tr
|
f_tr
|
||||||
end type tDislotwinState
|
end type tDislotwinState
|
||||||
|
|
||||||
type, private :: tDislotwinMicrostructure
|
type :: tDislotwinMicrostructure
|
||||||
real(pReal), dimension(:,:), allocatable :: &
|
real(pReal), dimension(:,:), allocatable :: &
|
||||||
Lambda_sl, & !* mean free path between 2 obstacles seen by a moving dislocation
|
Lambda_sl, & !* mean free path between 2 obstacles seen by a moving dislocation
|
||||||
Lambda_tw, & !* mean free path between 2 obstacles seen by a growing twin
|
Lambda_tw, & !* mean free path between 2 obstacles seen by a growing twin
|
||||||
|
@ -144,11 +153,11 @@ module plastic_dislotwin
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! containers for parameters and state
|
! containers for parameters and state
|
||||||
type(tParameters), allocatable, dimension(:), private :: param
|
type(tParameters), allocatable, dimension(:) :: param
|
||||||
type(tDislotwinState), allocatable, dimension(:), private :: &
|
type(tDislotwinState), allocatable, dimension(:) :: &
|
||||||
dotState, &
|
dotState, &
|
||||||
state
|
state
|
||||||
type(tDislotwinMicrostructure), allocatable, dimension(:), private :: dependentState
|
type(tDislotwinMicrostructure), allocatable, dimension(:) :: dependentState
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
plastic_dislotwin_init, &
|
plastic_dislotwin_init, &
|
||||||
|
@ -158,10 +167,6 @@ module plastic_dislotwin
|
||||||
plastic_dislotwin_dotState, &
|
plastic_dislotwin_dotState, &
|
||||||
plastic_dislotwin_postResults, &
|
plastic_dislotwin_postResults, &
|
||||||
plastic_dislotwin_results
|
plastic_dislotwin_results
|
||||||
private :: &
|
|
||||||
kinetics_slip, &
|
|
||||||
kinetics_twin, &
|
|
||||||
kinetics_trans
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -171,24 +176,6 @@ contains
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_dislotwin_init
|
subroutine plastic_dislotwin_init
|
||||||
use prec, only: &
|
|
||||||
pStringLen, &
|
|
||||||
dEq0, &
|
|
||||||
dNeq0, &
|
|
||||||
dNeq
|
|
||||||
use debug, only: &
|
|
||||||
debug_level,&
|
|
||||||
debug_constitutive,&
|
|
||||||
debug_levelBasic
|
|
||||||
use math, only: &
|
|
||||||
math_expand,&
|
|
||||||
PI
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use material
|
|
||||||
use config, only: &
|
|
||||||
config_phase
|
|
||||||
use lattice
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstance, &
|
Ninstance, &
|
||||||
|
@ -591,10 +578,6 @@ end subroutine plastic_dislotwin_init
|
||||||
!> @brief returns the homogenized elasticity matrix
|
!> @brief returns the homogenized elasticity matrix
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function plastic_dislotwin_homogenizedC(ipc,ip,el) result(homogenizedC)
|
function plastic_dislotwin_homogenizedC(ipc,ip,el) result(homogenizedC)
|
||||||
use material, only: &
|
|
||||||
material_phase, &
|
|
||||||
phase_plasticityInstance, &
|
|
||||||
phasememberAt
|
|
||||||
|
|
||||||
real(pReal), dimension(6,6) :: &
|
real(pReal), dimension(6,6) :: &
|
||||||
homogenizedC
|
homogenizedC
|
||||||
|
@ -634,14 +617,6 @@ end function plastic_dislotwin_homogenizedC
|
||||||
!> @brief calculates plastic velocity gradient and its tangent
|
!> @brief calculates plastic velocity gradient and its tangent
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dMp,Mp,T,instance,of)
|
subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dMp,Mp,T,instance,of)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_eigenValuesVectorsSym, &
|
|
||||||
math_outer, &
|
|
||||||
math_symmetric33, &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(out) :: Lp
|
real(pReal), dimension(3,3), intent(out) :: Lp
|
||||||
real(pReal), dimension(3,3,3,3), intent(out) :: dLp_dMp
|
real(pReal), dimension(3,3,3,3), intent(out) :: dLp_dMp
|
||||||
|
@ -757,13 +732,6 @@ end subroutine plastic_dislotwin_LpAndItsTangent
|
||||||
!> @brief calculates the rate of change of microstructure
|
!> @brief calculates the rate of change of microstructure
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_dislotwin_dotState(Mp,T,instance,of)
|
subroutine plastic_dislotwin_dotState(Mp,T,instance,of)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
math_clip, &
|
|
||||||
math_mul33xx33, &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in):: &
|
real(pReal), dimension(3,3), intent(in):: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -854,8 +822,6 @@ end subroutine plastic_dislotwin_dotState
|
||||||
!> @brief calculates derived quantities from state
|
!> @brief calculates derived quantities from state
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_dislotwin_dependentState(T,instance,of)
|
subroutine plastic_dislotwin_dependentState(T,instance,of)
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
instance, &
|
instance, &
|
||||||
|
@ -868,13 +834,13 @@ subroutine plastic_dislotwin_dependentState(T,instance,of)
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
sumf_twin,SFE,sumf_trans
|
sumf_twin,SFE,sumf_trans
|
||||||
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||||
inv_lambda_sl_sl, & !* 1/mean free distance between 2 forest dislocations seen by a moving dislocation
|
inv_lambda_sl_sl, & !< 1/mean free distance between 2 forest dislocations seen by a moving dislocation
|
||||||
inv_lambda_sl_tw, & !* 1/mean free distance between 2 twin stacks from different systems seen by a moving dislocation
|
inv_lambda_sl_tw, & !< 1/mean free distance between 2 twin stacks from different systems seen by a moving dislocation
|
||||||
inv_lambda_sl_tr !* 1/mean free distance between 2 martensite lamellar from different systems seen by a moving dislocation
|
inv_lambda_sl_tr !< 1/mean free distance between 2 martensite lamellar from different systems seen by a moving dislocation
|
||||||
real(pReal), dimension(param(instance)%sum_N_tw) :: &
|
real(pReal), dimension(param(instance)%sum_N_tw) :: &
|
||||||
inv_lambda_tw_tw !* 1/mean free distance between 2 twin stacks from different systems seen by a growing twin
|
inv_lambda_tw_tw !< 1/mean free distance between 2 twin stacks from different systems seen by a growing twin
|
||||||
real(pReal), dimension(param(instance)%sum_N_tr) :: &
|
real(pReal), dimension(param(instance)%sum_N_tr) :: &
|
||||||
inv_lambda_tr_tr !* 1/mean free distance between 2 martensite stacks from different systems seen by a growing martensite (1/lambda_trans)
|
inv_lambda_tr_tr !< 1/mean free distance between 2 martensite stacks from different systems seen by a growing martensite
|
||||||
|
|
||||||
real(pReal), dimension(:), allocatable :: &
|
real(pReal), dimension(:), allocatable :: &
|
||||||
x0, &
|
x0, &
|
||||||
|
@ -967,12 +933,6 @@ end subroutine plastic_dislotwin_dependentState
|
||||||
!> @brief return array of constitutive results
|
!> @brief return array of constitutive results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function plastic_dislotwin_postResults(Mp,T,instance,of) result(postResults)
|
function plastic_dislotwin_postResults(Mp,T,instance,of) result(postResults)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
PI, &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3),intent(in) :: &
|
real(pReal), dimension(3,3),intent(in) :: &
|
||||||
Mp !< 2nd Piola Kirchhoff stress tensor in Mandel notation
|
Mp !< 2nd Piola Kirchhoff stress tensor in Mandel notation
|
||||||
|
@ -1050,8 +1010,6 @@ end function plastic_dislotwin_postResults
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_dislotwin_results(instance,group)
|
subroutine plastic_dislotwin_results(instance,group)
|
||||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
use results, only: &
|
|
||||||
results_writeDataset
|
|
||||||
|
|
||||||
integer, intent(in) :: instance
|
integer, intent(in) :: instance
|
||||||
character(len=*) :: group
|
character(len=*) :: group
|
||||||
|
@ -1112,11 +1070,6 @@ end subroutine plastic_dislotwin_results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics_slip(Mp,T,instance,of, &
|
pure subroutine kinetics_slip(Mp,T,instance,of, &
|
||||||
dot_gamma_sl,ddot_gamma_dtau_slip,tau_slip)
|
dot_gamma_sl,ddot_gamma_dtau_slip,tau_slip)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -1190,11 +1143,6 @@ end subroutine kinetics_slip
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics_twin(Mp,T,dot_gamma_sl,instance,of,&
|
pure subroutine kinetics_twin(Mp,T,dot_gamma_sl,instance,of,&
|
||||||
dot_gamma_twin,ddot_gamma_dtau_twin)
|
dot_gamma_twin,ddot_gamma_dtau_twin)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -1261,11 +1209,6 @@ end subroutine kinetics_twin
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics_trans(Mp,T,dot_gamma_sl,instance,of,&
|
pure subroutine kinetics_trans(Mp,T,dot_gamma_sl,instance,of,&
|
||||||
dot_gamma_tr,ddot_gamma_dtau_trans)
|
dot_gamma_tr,ddot_gamma_dtau_trans)
|
||||||
use prec, only: &
|
|
||||||
tol_math_check, &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
|
|
@ -8,11 +8,19 @@
|
||||||
!! untextured polycrystal
|
!! untextured polycrystal
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_isotropic
|
module plastic_isotropic
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
use debug
|
||||||
|
use math
|
||||||
|
use IO
|
||||||
|
use material
|
||||||
|
use config
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
use results
|
||||||
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable, target, public :: &
|
integer, dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_isotropic_sizePostResult !< size of each post result output
|
plastic_isotropic_sizePostResult !< size of each post result output
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
|
@ -25,7 +33,7 @@ module plastic_isotropic
|
||||||
dot_gamma_ID
|
dot_gamma_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters
|
type :: tParameters
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
M, & !< Taylor factor
|
M, & !< Taylor factor
|
||||||
xi_0, & !< initial critical stress
|
xi_0, & !< initial critical stress
|
||||||
|
@ -49,7 +57,7 @@ module plastic_isotropic
|
||||||
dilatation
|
dilatation
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
|
||||||
type, private :: tIsotropicState
|
type :: tIsotropicState
|
||||||
real(pReal), pointer, dimension(:) :: &
|
real(pReal), pointer, dimension(:) :: &
|
||||||
xi, &
|
xi, &
|
||||||
gamma
|
gamma
|
||||||
|
@ -57,8 +65,8 @@ module plastic_isotropic
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! containers for parameters and state
|
! containers for parameters and state
|
||||||
type(tParameters), allocatable, dimension(:), private :: param
|
type(tParameters), allocatable, dimension(:) :: param
|
||||||
type(tIsotropicState), allocatable, dimension(:), private :: &
|
type(tIsotropicState), allocatable, dimension(:) :: &
|
||||||
dotState, &
|
dotState, &
|
||||||
state
|
state
|
||||||
|
|
||||||
|
@ -77,24 +85,6 @@ contains
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_isotropic_init
|
subroutine plastic_isotropic_init
|
||||||
use prec, only: &
|
|
||||||
pStringLen
|
|
||||||
use debug, only: &
|
|
||||||
#ifdef DEBUG
|
|
||||||
debug_e, &
|
|
||||||
debug_i, &
|
|
||||||
debug_g, &
|
|
||||||
debug_levelExtensive, &
|
|
||||||
#endif
|
|
||||||
debug_level, &
|
|
||||||
debug_constitutive, &
|
|
||||||
debug_levelBasic
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use material
|
|
||||||
use config, only: &
|
|
||||||
config_phase
|
|
||||||
use lattice
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstance, &
|
Ninstance, &
|
||||||
|
@ -235,16 +225,6 @@ end subroutine plastic_isotropic_init
|
||||||
!> @brief calculates plastic velocity gradient and its tangent
|
!> @brief calculates plastic velocity gradient and its tangent
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: &
|
|
||||||
debug_level, &
|
|
||||||
debug_constitutive,&
|
|
||||||
debug_levelExtensive, &
|
|
||||||
debug_levelSelective
|
|
||||||
#endif
|
|
||||||
use math, only: &
|
|
||||||
math_deviatoric33, &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(out) :: &
|
real(pReal), dimension(3,3), intent(out) :: &
|
||||||
Lp !< plastic velocity gradient
|
Lp !< plastic velocity gradient
|
||||||
|
@ -307,10 +287,6 @@ end subroutine plastic_isotropic_LpAndItsTangent
|
||||||
! ToDo: Rename Tstar to Mi?
|
! ToDo: Rename Tstar to Mi?
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,instance,of)
|
subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,instance,of)
|
||||||
use math, only: &
|
|
||||||
math_I3, &
|
|
||||||
math_spherical33, &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(out) :: &
|
real(pReal), dimension(3,3), intent(out) :: &
|
||||||
Li !< inleastic velocity gradient
|
Li !< inleastic velocity gradient
|
||||||
|
@ -362,11 +338,6 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,instance,of)
|
||||||
!> @brief calculates the rate of change of microstructure
|
!> @brief calculates the rate of change of microstructure
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_isotropic_dotState(Mp,instance,of)
|
subroutine plastic_isotropic_dotState(Mp,instance,of)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33, &
|
|
||||||
math_deviatoric33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -416,9 +387,6 @@ end subroutine plastic_isotropic_dotState
|
||||||
!> @brief return array of constitutive results
|
!> @brief return array of constitutive results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function plastic_isotropic_postResults(Mp,instance,of) result(postResults)
|
function plastic_isotropic_postResults(Mp,instance,of) result(postResults)
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33, &
|
|
||||||
math_deviatoric33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -468,7 +436,6 @@ end function plastic_isotropic_postResults
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_isotropic_results(instance,group)
|
subroutine plastic_isotropic_results(instance,group)
|
||||||
#if defined(PETSc) || defined(DAMASKHDF5)
|
#if defined(PETSc) || defined(DAMASKHDF5)
|
||||||
use results
|
|
||||||
|
|
||||||
integer, intent(in) :: instance
|
integer, intent(in) :: instance
|
||||||
character(len=*), intent(in) :: group
|
character(len=*), intent(in) :: group
|
||||||
|
|
|
@ -6,11 +6,20 @@
|
||||||
!! and a Voce-type kinematic hardening rule
|
!! and a Voce-type kinematic hardening rule
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_kinehardening
|
module plastic_kinehardening
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
use debug
|
||||||
|
use math
|
||||||
|
use IO
|
||||||
|
use material
|
||||||
|
use config
|
||||||
|
use lattice
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
use results
|
||||||
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable, target, public :: &
|
integer, dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_kinehardening_sizePostResult !< size of each post result output
|
plastic_kinehardening_sizePostResult !< size of each post result output
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
|
@ -29,7 +38,7 @@ module plastic_kinehardening
|
||||||
resolvedstress_ID
|
resolvedstress_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters
|
type :: tParameters
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
gdot0, & !< reference shear strain rate for slip
|
gdot0, & !< reference shear strain rate for slip
|
||||||
n, & !< stress exponent for slip
|
n, & !< stress exponent for slip
|
||||||
|
@ -59,7 +68,7 @@ module plastic_kinehardening
|
||||||
outputID !< ID of each post result output
|
outputID !< ID of each post result output
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
|
||||||
type, private :: tKinehardeningState
|
type :: tKinehardeningState
|
||||||
real(pReal), pointer, dimension(:,:) :: & !< vectors along NipcMyInstance
|
real(pReal), pointer, dimension(:,:) :: & !< vectors along NipcMyInstance
|
||||||
crss, & !< critical resolved stress
|
crss, & !< critical resolved stress
|
||||||
crss_back, & !< critical resolved back stress
|
crss_back, & !< critical resolved back stress
|
||||||
|
@ -71,8 +80,8 @@ module plastic_kinehardening
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! containers for parameters and state
|
! containers for parameters and state
|
||||||
type(tParameters), allocatable, dimension(:), private :: param
|
type(tParameters), allocatable, dimension(:) :: param
|
||||||
type(tKinehardeningState), allocatable, dimension(:), private :: &
|
type(tKinehardeningState), allocatable, dimension(:) :: &
|
||||||
dotState, &
|
dotState, &
|
||||||
deltaState, &
|
deltaState, &
|
||||||
state
|
state
|
||||||
|
@ -84,8 +93,6 @@ module plastic_kinehardening
|
||||||
plastic_kinehardening_deltaState, &
|
plastic_kinehardening_deltaState, &
|
||||||
plastic_kinehardening_postResults, &
|
plastic_kinehardening_postResults, &
|
||||||
plastic_kinehardening_results
|
plastic_kinehardening_results
|
||||||
private :: &
|
|
||||||
kinetics
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -95,27 +102,6 @@ contains
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_kinehardening_init
|
subroutine plastic_kinehardening_init
|
||||||
use prec, only: &
|
|
||||||
dEq0, &
|
|
||||||
pStringLen
|
|
||||||
use debug, only: &
|
|
||||||
#ifdef DEBUG
|
|
||||||
debug_e, &
|
|
||||||
debug_i, &
|
|
||||||
debug_g, &
|
|
||||||
debug_levelExtensive, &
|
|
||||||
#endif
|
|
||||||
debug_level, &
|
|
||||||
debug_constitutive,&
|
|
||||||
debug_levelBasic
|
|
||||||
use math, only: &
|
|
||||||
math_expand
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use material
|
|
||||||
use config, only: &
|
|
||||||
config_phase
|
|
||||||
use lattice
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstance, &
|
Ninstance, &
|
||||||
|
@ -417,16 +403,6 @@ end subroutine plastic_kinehardening_dotState
|
||||||
!> @brief calculates (instantaneous) incremental change of microstructure
|
!> @brief calculates (instantaneous) incremental change of microstructure
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_kinehardening_deltaState(Mp,instance,of)
|
subroutine plastic_kinehardening_deltaState(Mp,instance,of)
|
||||||
use prec, only: &
|
|
||||||
dNeq, &
|
|
||||||
dEq0
|
|
||||||
#ifdef DEBUG
|
|
||||||
use debug, only: &
|
|
||||||
debug_level, &
|
|
||||||
debug_constitutive,&
|
|
||||||
debug_levelExtensive, &
|
|
||||||
debug_levelSelective
|
|
||||||
#endif
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -475,8 +451,6 @@ end subroutine plastic_kinehardening_deltaState
|
||||||
!> @brief return array of constitutive results
|
!> @brief return array of constitutive results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function plastic_kinehardening_postResults(Mp,instance,of) result(postResults)
|
function plastic_kinehardening_postResults(Mp,instance,of) result(postResults)
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -535,8 +509,6 @@ end function plastic_kinehardening_postResults
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_kinehardening_results(instance,group)
|
subroutine plastic_kinehardening_results(instance,group)
|
||||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
use results, only: &
|
|
||||||
results_writeDataset
|
|
||||||
|
|
||||||
integer, intent(in) :: instance
|
integer, intent(in) :: instance
|
||||||
character(len=*) :: group
|
character(len=*) :: group
|
||||||
|
@ -585,10 +557,6 @@ end subroutine plastic_kinehardening_results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics(Mp,instance,of, &
|
pure subroutine kinetics(Mp,instance,of, &
|
||||||
gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
|
gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
|
||||||
use prec, only: &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
!> @brief Dummy plasticity for purely elastic material
|
!> @brief Dummy plasticity for purely elastic material
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_none
|
module plastic_none
|
||||||
|
use material
|
||||||
|
use debug
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
@ -19,11 +21,6 @@ contains
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_none_init
|
subroutine plastic_none_init
|
||||||
use debug, only: &
|
|
||||||
debug_level, &
|
|
||||||
debug_constitutive, &
|
|
||||||
debug_levelBasic
|
|
||||||
use material
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstance, &
|
Ninstance, &
|
||||||
|
|
|
@ -5,11 +5,20 @@
|
||||||
!> @brief phenomenological crystal plasticity formulation using a powerlaw fitting
|
!> @brief phenomenological crystal plasticity formulation using a powerlaw fitting
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_phenopowerlaw
|
module plastic_phenopowerlaw
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
use debug
|
||||||
|
use math
|
||||||
|
use IO
|
||||||
|
use material
|
||||||
|
use config
|
||||||
|
use lattice
|
||||||
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
|
use results
|
||||||
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
integer, dimension(:,:), allocatable, target, public :: &
|
integer, dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_phenopowerlaw_sizePostResult !< size of each post result output
|
plastic_phenopowerlaw_sizePostResult !< size of each post result output
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
|
@ -28,7 +37,7 @@ module plastic_phenopowerlaw
|
||||||
resolvedstress_twin_ID
|
resolvedstress_twin_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters
|
type :: tParameters
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
gdot0_slip, & !< reference shear strain rate for slip
|
gdot0_slip, & !< reference shear strain rate for slip
|
||||||
gdot0_twin, & !< reference shear strain rate for twin
|
gdot0_twin, & !< reference shear strain rate for twin
|
||||||
|
@ -73,7 +82,7 @@ module plastic_phenopowerlaw
|
||||||
outputID !< ID of each post result output
|
outputID !< ID of each post result output
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
|
||||||
type, private :: tPhenopowerlawState
|
type :: tPhenopowerlawState
|
||||||
real(pReal), pointer, dimension(:,:) :: &
|
real(pReal), pointer, dimension(:,:) :: &
|
||||||
xi_slip, &
|
xi_slip, &
|
||||||
xi_twin, &
|
xi_twin, &
|
||||||
|
@ -83,8 +92,8 @@ module plastic_phenopowerlaw
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! containers for parameters and state
|
! containers for parameters and state
|
||||||
type(tParameters), allocatable, dimension(:), private :: param
|
type(tParameters), allocatable, dimension(:) :: param
|
||||||
type(tPhenopowerlawState), allocatable, dimension(:), private :: &
|
type(tPhenopowerlawState), allocatable, dimension(:) :: &
|
||||||
dotState, &
|
dotState, &
|
||||||
state
|
state
|
||||||
|
|
||||||
|
@ -94,9 +103,6 @@ module plastic_phenopowerlaw
|
||||||
plastic_phenopowerlaw_dotState, &
|
plastic_phenopowerlaw_dotState, &
|
||||||
plastic_phenopowerlaw_postResults, &
|
plastic_phenopowerlaw_postResults, &
|
||||||
plastic_phenopowerlaw_results
|
plastic_phenopowerlaw_results
|
||||||
private :: &
|
|
||||||
kinetics_slip, &
|
|
||||||
kinetics_twin
|
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
|
@ -106,20 +112,6 @@ contains
|
||||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_phenopowerlaw_init
|
subroutine plastic_phenopowerlaw_init
|
||||||
use prec, only: &
|
|
||||||
pStringLen
|
|
||||||
use debug, only: &
|
|
||||||
debug_level, &
|
|
||||||
debug_constitutive,&
|
|
||||||
debug_levelBasic
|
|
||||||
use math, only: &
|
|
||||||
math_expand
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use material
|
|
||||||
use config, only: &
|
|
||||||
config_phase
|
|
||||||
use lattice
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstance, &
|
Ninstance, &
|
||||||
|
@ -484,8 +476,6 @@ end subroutine plastic_phenopowerlaw_dotState
|
||||||
!> @brief return array of constitutive results
|
!> @brief return array of constitutive results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function plastic_phenopowerlaw_postResults(Mp,instance,of) result(postResults)
|
function plastic_phenopowerlaw_postResults(Mp,instance,of) result(postResults)
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -552,8 +542,6 @@ end function plastic_phenopowerlaw_postResults
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_phenopowerlaw_results(instance,group)
|
subroutine plastic_phenopowerlaw_results(instance,group)
|
||||||
#if defined(PETSc) || defined(DAMASK_HDF5)
|
#if defined(PETSc) || defined(DAMASK_HDF5)
|
||||||
use results, only: &
|
|
||||||
results_writeDataset
|
|
||||||
|
|
||||||
integer, intent(in) :: instance
|
integer, intent(in) :: instance
|
||||||
character(len=*), intent(in) :: group
|
character(len=*), intent(in) :: group
|
||||||
|
@ -598,10 +586,6 @@ end subroutine plastic_phenopowerlaw_results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics_slip(Mp,instance,of, &
|
pure subroutine kinetics_slip(Mp,instance,of, &
|
||||||
gdot_slip_pos,gdot_slip_neg,dgdot_dtau_slip_pos,dgdot_dtau_slip_neg)
|
gdot_slip_pos,gdot_slip_neg,dgdot_dtau_slip_pos,dgdot_dtau_slip_neg)
|
||||||
use prec, only: &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -674,10 +658,6 @@ end subroutine kinetics_slip
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics_twin(Mp,instance,of,&
|
pure subroutine kinetics_twin(Mp,instance,of,&
|
||||||
gdot_twin,dgdot_dtau_twin)
|
gdot_twin,dgdot_dtau_twin)
|
||||||
use prec, only: &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
math_mul33xx33
|
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
|
|
@ -34,8 +34,7 @@
|
||||||
!> @details w is the real part, (x, y, z) are the imaginary parts.
|
!> @details w is the real part, (x, y, z) are the imaginary parts.
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
module quaternions
|
module quaternions
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
|
||||||
use future
|
use future
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
@ -286,8 +285,6 @@ end function div_scal__
|
||||||
!> equality of two quaternions
|
!> equality of two quaternions
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
logical elemental function eq__(self,other)
|
logical elemental function eq__(self,other)
|
||||||
use prec, only: &
|
|
||||||
dEq
|
|
||||||
|
|
||||||
class(quaternion), intent(in) :: self,other
|
class(quaternion), intent(in) :: self,other
|
||||||
|
|
||||||
|
|
|
@ -46,12 +46,15 @@
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
module rotations
|
module rotations
|
||||||
use prec, only: &
|
use prec
|
||||||
pReal
|
use IO
|
||||||
|
use math
|
||||||
|
use Lambert
|
||||||
use quaternions
|
use quaternions
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
type, public :: rotation
|
type, public :: rotation
|
||||||
type(quaternion), private :: q
|
type(quaternion), private :: q
|
||||||
contains
|
contains
|
||||||
|
@ -148,8 +151,6 @@ end subroutine
|
||||||
!> @details: rotation is based on unit quaternion or rotation matrix (fallback)
|
!> @details: rotation is based on unit quaternion or rotation matrix (fallback)
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
function rotVector(self,v,active)
|
function rotVector(self,v,active)
|
||||||
use prec, only: &
|
|
||||||
dEq
|
|
||||||
|
|
||||||
real(pReal), dimension(3) :: rotVector
|
real(pReal), dimension(3) :: rotVector
|
||||||
class(rotation), intent(in) :: self
|
class(rotation), intent(in) :: self
|
||||||
|
@ -260,10 +261,6 @@ end function qu2om
|
||||||
!> @brief convert unit quaternion to Euler angles
|
!> @brief convert unit quaternion to Euler angles
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function qu2eu(qu) result(eu)
|
pure function qu2eu(qu) result(eu)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
type(quaternion), intent(in) :: qu
|
type(quaternion), intent(in) :: qu
|
||||||
real(pReal), dimension(3) :: eu
|
real(pReal), dimension(3) :: eu
|
||||||
|
@ -294,12 +291,6 @@ end function qu2eu
|
||||||
!> @brief convert unit quaternion to axis angle pair
|
!> @brief convert unit quaternion to axis angle pair
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function qu2ax(qu) result(ax)
|
pure function qu2ax(qu) result(ax)
|
||||||
use prec, only: &
|
|
||||||
dEq0, &
|
|
||||||
dNeq0
|
|
||||||
use math, only: &
|
|
||||||
PI, &
|
|
||||||
math_clip
|
|
||||||
|
|
||||||
type(quaternion), intent(in) :: qu
|
type(quaternion), intent(in) :: qu
|
||||||
real(pReal), dimension(4) :: ax
|
real(pReal), dimension(4) :: ax
|
||||||
|
@ -324,13 +315,6 @@ end function qu2ax
|
||||||
!> @brief convert unit quaternion to Rodrigues vector
|
!> @brief convert unit quaternion to Rodrigues vector
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function qu2ro(qu) result(ro)
|
pure function qu2ro(qu) result(ro)
|
||||||
use, intrinsic :: IEEE_ARITHMETIC, only: &
|
|
||||||
IEEE_value, &
|
|
||||||
IEEE_positive_inf
|
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
math_clip
|
|
||||||
|
|
||||||
type(quaternion), intent(in) :: qu
|
type(quaternion), intent(in) :: qu
|
||||||
real(pReal), dimension(4) :: ro
|
real(pReal), dimension(4) :: ro
|
||||||
|
@ -358,10 +342,6 @@ end function qu2ro
|
||||||
!> @brief convert unit quaternion to homochoric
|
!> @brief convert unit quaternion to homochoric
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function qu2ho(qu) result(ho)
|
pure function qu2ho(qu) result(ho)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
math_clip
|
|
||||||
|
|
||||||
type(quaternion), intent(in) :: qu
|
type(quaternion), intent(in) :: qu
|
||||||
real(pReal), dimension(3) :: ho
|
real(pReal), dimension(3) :: ho
|
||||||
|
@ -415,8 +395,6 @@ end function om2qu
|
||||||
!> @brief orientation matrix to Euler angles
|
!> @brief orientation matrix to Euler angles
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function om2eu(om) result(eu)
|
pure function om2eu(om) result(eu)
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3,3) :: om
|
real(pReal), intent(in), dimension(3,3) :: om
|
||||||
real(pReal), dimension(3) :: eu
|
real(pReal), dimension(3) :: eu
|
||||||
|
@ -441,15 +419,6 @@ end function om2eu
|
||||||
!> @brief convert orientation matrix to axis angle pair
|
!> @brief convert orientation matrix to axis angle pair
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
function om2ax(om) result(ax)
|
function om2ax(om) result(ax)
|
||||||
use prec, only: &
|
|
||||||
dEq0, &
|
|
||||||
cEq, &
|
|
||||||
dNeq0
|
|
||||||
use IO, only: &
|
|
||||||
IO_error
|
|
||||||
use math, only: &
|
|
||||||
math_clip, &
|
|
||||||
math_trace33
|
|
||||||
|
|
||||||
real(pReal), intent(in) :: om(3,3)
|
real(pReal), intent(in) :: om(3,3)
|
||||||
real(pReal) :: ax(4)
|
real(pReal) :: ax(4)
|
||||||
|
@ -560,8 +529,6 @@ end function eu2qu
|
||||||
!> @brief Euler angles to orientation matrix
|
!> @brief Euler angles to orientation matrix
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function eu2om(eu) result(om)
|
pure function eu2om(eu) result(om)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: eu
|
real(pReal), intent(in), dimension(3) :: eu
|
||||||
real(pReal), dimension(3,3) :: om
|
real(pReal), dimension(3,3) :: om
|
||||||
|
@ -591,11 +558,6 @@ end function eu2om
|
||||||
!> @brief convert euler to axis angle
|
!> @brief convert euler to axis angle
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function eu2ax(eu) result(ax)
|
pure function eu2ax(eu) result(ax)
|
||||||
use prec, only: &
|
|
||||||
dEq0, &
|
|
||||||
dEq
|
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: eu
|
real(pReal), intent(in), dimension(3) :: eu
|
||||||
real(pReal), dimension(4) :: ax
|
real(pReal), dimension(4) :: ax
|
||||||
|
@ -625,13 +587,6 @@ end function eu2ax
|
||||||
!> @brief Euler angles to Rodrigues vector
|
!> @brief Euler angles to Rodrigues vector
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function eu2ro(eu) result(ro)
|
pure function eu2ro(eu) result(ro)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use, intrinsic :: IEEE_ARITHMETIC, only: &
|
|
||||||
IEEE_value, &
|
|
||||||
IEEE_positive_inf
|
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: eu
|
real(pReal), intent(in), dimension(3) :: eu
|
||||||
real(pReal), dimension(4) :: ro
|
real(pReal), dimension(4) :: ro
|
||||||
|
@ -681,8 +636,6 @@ end function eu2cu
|
||||||
!> @brief convert axis angle pair to quaternion
|
!> @brief convert axis angle pair to quaternion
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function ax2qu(ax) result(qu)
|
pure function ax2qu(ax) result(qu)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(4) :: ax
|
real(pReal), intent(in), dimension(4) :: ax
|
||||||
type(quaternion) :: qu
|
type(quaternion) :: qu
|
||||||
|
@ -755,13 +708,6 @@ end function ax2eu
|
||||||
!> @brief convert axis angle pair to Rodrigues vector
|
!> @brief convert axis angle pair to Rodrigues vector
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function ax2ro(ax) result(ro)
|
pure function ax2ro(ax) result(ro)
|
||||||
use, intrinsic :: IEEE_ARITHMETIC, only: &
|
|
||||||
IEEE_value, &
|
|
||||||
IEEE_positive_inf
|
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(4) :: ax
|
real(pReal), intent(in), dimension(4) :: ax
|
||||||
real(pReal), dimension(4) :: ro
|
real(pReal), dimension(4) :: ro
|
||||||
|
@ -858,12 +804,6 @@ end function ro2eu
|
||||||
!> @brief convert Rodrigues vector to axis angle pair
|
!> @brief convert Rodrigues vector to axis angle pair
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function ro2ax(ro) result(ax)
|
pure function ro2ax(ro) result(ax)
|
||||||
use, intrinsic :: IEEE_ARITHMETIC, only: &
|
|
||||||
IEEE_is_finite
|
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(4) :: ro
|
real(pReal), intent(in), dimension(4) :: ro
|
||||||
real(pReal), dimension(4) :: ax
|
real(pReal), dimension(4) :: ax
|
||||||
|
@ -890,12 +830,6 @@ end function ro2ax
|
||||||
!> @brief convert Rodrigues vector to homochoric
|
!> @brief convert Rodrigues vector to homochoric
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function ro2ho(ro) result(ho)
|
pure function ro2ho(ro) result(ho)
|
||||||
use, intrinsic :: IEEE_ARITHMETIC, only: &
|
|
||||||
IEEE_is_finite
|
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
use math, only: &
|
|
||||||
PI
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(4) :: ro
|
real(pReal), intent(in), dimension(4) :: ro
|
||||||
real(pReal), dimension(3) :: ho
|
real(pReal), dimension(3) :: ho
|
||||||
|
@ -973,8 +907,6 @@ end function ho2eu
|
||||||
!> @brief convert homochoric to axis angle pair
|
!> @brief convert homochoric to axis angle pair
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
pure function ho2ax(ho) result(ax)
|
pure function ho2ax(ho) result(ax)
|
||||||
use prec, only: &
|
|
||||||
dEq0
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: ho
|
real(pReal), intent(in), dimension(3) :: ho
|
||||||
real(pReal), dimension(4) :: ax
|
real(pReal), dimension(4) :: ax
|
||||||
|
@ -1029,13 +961,11 @@ end function ho2ro
|
||||||
!> @brief convert homochoric to cubochoric
|
!> @brief convert homochoric to cubochoric
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
function ho2cu(ho) result(cu)
|
function ho2cu(ho) result(cu)
|
||||||
use Lambert, only: &
|
|
||||||
LambertBallToCube
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: ho
|
real(pReal), intent(in), dimension(3) :: ho
|
||||||
real(pReal), dimension(3) :: cu
|
real(pReal), dimension(3) :: cu
|
||||||
|
|
||||||
cu = LambertBallToCube(ho)
|
cu = Lambert_BallToCube(ho)
|
||||||
|
|
||||||
end function ho2cu
|
end function ho2cu
|
||||||
|
|
||||||
|
@ -1115,13 +1045,11 @@ end function cu2ro
|
||||||
!> @brief convert cubochoric to homochoric
|
!> @brief convert cubochoric to homochoric
|
||||||
!---------------------------------------------------------------------------------------------------
|
!---------------------------------------------------------------------------------------------------
|
||||||
function cu2ho(cu) result(ho)
|
function cu2ho(cu) result(ho)
|
||||||
use Lambert, only: &
|
|
||||||
LambertCubeToBall
|
|
||||||
|
|
||||||
real(pReal), intent(in), dimension(3) :: cu
|
real(pReal), intent(in), dimension(3) :: cu
|
||||||
real(pReal), dimension(3) :: ho
|
real(pReal), dimension(3) :: ho
|
||||||
|
|
||||||
ho = LambertCubeToBall(cu)
|
ho = Lambert_CubeToBall(cu)
|
||||||
|
|
||||||
end function cu2ho
|
end function cu2ho
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue