Merge remote-tracking branch 'origin/modularize-mech' into development

This commit is contained in:
Martin Diehl 2020-11-11 11:13:29 +01:00
commit 56f5c69136
20 changed files with 226 additions and 220 deletions

@ -1 +1 @@
Subproject commit f529a16d100434c736476944a3a696d8f95ac770
Subproject commit 281e7eb84f76a2974a50eb54faf35ea25ec89b20

View File

@ -108,10 +108,10 @@ material:
phase:
Aluminum:
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
generic:
output: [F, P, F_e, F_p, L_p, O]
lattice: fcc
mech:
output: [F, P, F_e, F_p, L_p, O]
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
plasticity:
N_sl: [12]
a_sl: 2.25

View File

@ -33,12 +33,12 @@ material:
phase:
Aluminum:
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
generic:
output: [F, P, Fe, Fp, Lp]
lattice: cF
mech:
output: [F, P, F_e, F_p, L_p]
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
Steel:
elasticity: {C_11: 233.3e9, C_12: 135.5e9, C_44: 118.0e9, type: hooke}
generic:
output: [F, P, Fe, Fp, Lp]
lattice: cI
mech:
output: [F, P, F_e, F_p, L_p]
elasticity: {C_11: 233.3e9, C_12: 135.5e9, C_44: 118.0e9, type: hooke}

View File

@ -6,10 +6,10 @@ homogenization:
phase:
pheno_fcc:
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
generic:
output: [F, P, F_e, F_p, L_p, O]
lattice: fcc
mech:
output: [F, P, F_e, F_p, L_p, O]
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
plasticity:
N_sl: [12]
a_sl: 2.25
@ -23,10 +23,10 @@ phase:
xi_0_sl: [31e6]
xi_inf_sl: [63e6]
pheno_bcc:
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
generic:
output: [F, P, F_e, F_p, L_p, O]
lattice: bcc
mech:
output: [F, P, F_e, F_p, L_p, O]
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
plasticity:
N_sl: [12]
a_sl: 2.25

View File

@ -25,7 +25,7 @@
#include "material.f90"
#include "lattice.f90"
#include "constitutive.f90"
#include "constitutive_plastic.f90"
#include "constitutive_mech.f90"
#include "constitutive_plastic_none.f90"
#include "constitutive_plastic_isotropic.f90"
#include "constitutive_plastic_phenopowerlaw.f90"

View File

@ -19,7 +19,7 @@ module constitutive
implicit none
private
integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable, protected :: &
integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable :: & !ToDo: old intel compiler complains about protected
phase_elasticity !< elasticity of each phase
integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable :: & !ToDo: old intel compiler complains about protected
@ -52,8 +52,8 @@ module constitutive
interface
module subroutine plastic_init
end subroutine plastic_init
module subroutine mech_init
end subroutine mech_init
module subroutine damage_init
end subroutine damage_init
@ -343,6 +343,25 @@ module constitutive
end interface constitutive_dependentState
interface constitutive_SandItsTangents
module subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el)
integer, intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
real(pReal), intent(in), dimension(3,3) :: &
Fe, & !< elastic deformation gradient
Fi !< intermediate deformation gradient
real(pReal), intent(out), dimension(3,3) :: &
S !< 2nd Piola-Kirchhoff stress tensor
real(pReal), intent(out), dimension(3,3,3,3) :: &
dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient
dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient
end subroutine constitutive_hooke_SandItsTangents
end interface constitutive_SandItsTangents
type :: tDebugOptions
logical :: &
@ -385,14 +404,10 @@ subroutine constitutive_init
integer :: &
p, & !< counter in phase loop
s, & !< counter in source loop
stiffDegradationCtr
s !< counter in source loop
class (tNode), pointer :: &
debug_constitutive, &
phases, &
phase, &
elastic, &
stiffDegradation
phases
debug_constitutive => config_debug%get('constitutive', defaultVal=emptyList)
debugConstitutive%basic = debug_constitutive%contains('basic')
@ -402,52 +417,15 @@ subroutine constitutive_init
debugConstitutive%ip = config_debug%get_asInt('integrationpoint',defaultVal = 1)
debugConstitutive%grain = config_debug%get_asInt('grain',defaultVal = 1)
!-------------------------------------------------------------------------------------------------
! initialize elasticity (hooke) !ToDO: Maybe move to elastic submodule along with function homogenizedC?
phases => config_material%get('phase')
allocate(phase_elasticity(phases%length), source = ELASTICITY_undefined_ID)
allocate(phase_elasticityInstance(phases%length), source = 0)
allocate(phase_NstiffnessDegradations(phases%length),source=0)
do p = 1, phases%length
phase => phases%get(p)
elastic => phase%get('elasticity')
if(elastic%get_asString('type') == 'hooke') then
phase_elasticity(p) = ELASTICITY_HOOKE_ID
else
call IO_error(200,ext_msg=elastic%get_asString('type'))
endif
stiffDegradation => phase%get('stiffness_degradation',defaultVal=emptyList) ! check for stiffness degradation mechanisms
phase_NstiffnessDegradations(p) = stiffDegradation%length
enddo
allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),phases%length), &
source=STIFFNESS_DEGRADATION_undefined_ID)
if(maxVal(phase_NstiffnessDegradations)/=0) then
do p = 1, phases%length
phase => phases%get(p)
stiffDegradation => phase%get('stiffness_degradation',defaultVal=emptyList)
do stiffDegradationCtr = 1, stiffDegradation%length
if(stiffDegradation%get_asString(stiffDegradationCtr) == 'damage') &
phase_stiffnessDegradation(stiffDegradationCtr,p) = STIFFNESS_DEGRADATION_damage_ID
enddo
enddo
endif
do p = 1, phases%length
phase_elasticityInstance(p) = count(phase_elasticity(1:p) == phase_elasticity(p))
enddo
!--------------------------------------------------------------------------------------------------
! initialize constitutive laws
call plastic_init
call mech_init
call damage_init
call thermal_init
print'(/,a)', ' <<<+- constitutive init -+>>>'; flush(IO_STDOUT)
phases => config_material%get('phase')
constitutive_source_maxSizeDotState = 0
PhaseLoop2:do p = 1,phases%length
!--------------------------------------------------------------------------------------------------
@ -666,80 +644,6 @@ pure function constitutive_initialFi(ipc, ip, el)
end function constitutive_initialFi
!--------------------------------------------------------------------------------------------------
!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to
!> the elastic/intermediate deformation gradients depending on the selected elastic law
!! (so far no case switch because only Hooke is implemented)
!--------------------------------------------------------------------------------------------------
subroutine constitutive_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el)
integer, intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
real(pReal), intent(in), dimension(3,3) :: &
Fe, & !< elastic deformation gradient
Fi !< intermediate deformation gradient
real(pReal), intent(out), dimension(3,3) :: &
S !< 2nd Piola-Kirchhoff stress tensor
real(pReal), intent(out), dimension(3,3,3,3) :: &
dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient
dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient
call constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el)
end subroutine constitutive_SandItsTangents
!--------------------------------------------------------------------------------------------------
!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to
!> the elastic and intermediate deformation gradients using Hooke's law
!--------------------------------------------------------------------------------------------------
subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, &
Fe, Fi, ipc, ip, el)
integer, intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
real(pReal), intent(in), dimension(3,3) :: &
Fe, & !< elastic deformation gradient
Fi !< intermediate deformation gradient
real(pReal), intent(out), dimension(3,3) :: &
S !< 2nd Piola-Kirchhoff stress tensor in lattice configuration
real(pReal), intent(out), dimension(3,3,3,3) :: &
dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient
dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient
real(pReal), dimension(3,3) :: E
real(pReal), dimension(3,3,3,3) :: C
integer :: &
ho, & !< homogenization
d !< counter in degradation loop
integer :: &
i, j
ho = material_homogenizationAt(el)
C = math_66toSym3333(constitutive_homogenizedC(ipc,ip,el))
DegradationLoop: do d = 1, phase_NstiffnessDegradations(material_phaseAt(ipc,el))
degradationType: select case(phase_stiffnessDegradation(d,material_phaseAt(ipc,el)))
case (STIFFNESS_DEGRADATION_damage_ID) degradationType
C = C * damage(ho)%p(damageMapping(ho)%p(ip,el))**2
end select degradationType
enddo DegradationLoop
E = 0.5_pReal*(matmul(transpose(Fe),Fe)-math_I3) !< Green-Lagrange strain in unloaded configuration
S = math_mul3333xx33(C,matmul(matmul(transpose(Fi),E),Fi)) !< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration
do i =1, 3;do j=1,3
dS_dFe(i,j,1:3,1:3) = matmul(Fe,matmul(matmul(Fi,C(i,j,1:3,1:3)),transpose(Fi))) !< dS_ij/dFe_kl = C_ijmn * Fi_lm * Fi_on * Fe_ko
dS_dFi(i,j,1:3,1:3) = 2.0_pReal*matmul(matmul(E,Fi),C(i,j,1:3,1:3)) !< dS_ij/dFi_kl = C_ijln * E_km * Fe_mn
enddo; enddo
end subroutine constitutive_hooke_SandItsTangents
!--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the rate of change of microstructure
!--------------------------------------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
!----------------------------------------------------------------------------------------------------
!> @brief internal microstructure state for all plasticity constitutive models
!----------------------------------------------------------------------------------------------------
submodule(constitutive) constitutive_plastic
submodule(constitutive) constitutive_mech
interface
@ -191,17 +191,60 @@ contains
!--------------------------------------------------------------------------------------------------
!> @brief Initialize constitutive models for plasticity
!> @brief Initialize mechanical field related constitutive models
!> @details Initialize elasticity, plasticity and stiffness degradation models.
!--------------------------------------------------------------------------------------------------
module subroutine plastic_init
module subroutine mech_init
integer :: p
class(tNode), pointer :: phases
integer :: &
p, &
stiffDegradationCtr
class(tNode), pointer :: &
phases, &
phase, &
mech, &
elastic, &
stiffDegradation
print'(/,a)', ' <<<+- constitutive_plastic init -+>>>'
print'(/,a)', ' <<<+- constitutive_mech init -+>>>'
!-------------------------------------------------------------------------------------------------
! initialize elasticity (hooke) !ToDO: Maybe move to elastic submodule along with function homogenizedC?
phases => config_material%get('phase')
allocate(phase_elasticity(phases%length), source = ELASTICITY_undefined_ID)
allocate(phase_elasticityInstance(phases%length), source = 0)
allocate(phase_NstiffnessDegradations(phases%length),source=0)
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
elastic => mech%get('elasticity')
if(elastic%get_asString('type') == 'hooke') then
phase_elasticity(p) = ELASTICITY_HOOKE_ID
else
call IO_error(200,ext_msg=elastic%get_asString('type'))
endif
stiffDegradation => mech%get('stiffness_degradation',defaultVal=emptyList) ! check for stiffness degradation mechanisms
phase_NstiffnessDegradations(p) = stiffDegradation%length
enddo
allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),phases%length), &
source=STIFFNESS_DEGRADATION_undefined_ID)
if(maxVal(phase_NstiffnessDegradations)/=0) then
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
stiffDegradation => mech%get('stiffness_degradation',defaultVal=emptyList)
do stiffDegradationCtr = 1, stiffDegradation%length
if(stiffDegradation%get_asString(stiffDegradationCtr) == 'damage') &
phase_stiffnessDegradation(stiffDegradationCtr,p) = STIFFNESS_DEGRADATION_damage_ID
enddo
enddo
endif
! initialize plasticity
allocate(plasticState(phases%length))
allocate(phase_plasticity(phases%length),source = PLASTICITY_undefined_ID)
allocate(phase_plasticityInstance(phases%length),source = 0)
@ -216,11 +259,11 @@ module subroutine plastic_init
where(plastic_nonlocal_init()) phase_plasticity = PLASTICITY_NONLOCAL_ID
do p = 1, phases%length
phase_elasticityInstance(p) = count(phase_elasticity(1:p) == phase_elasticity(p))
phase_plasticityInstance(p) = count(phase_plasticity(1:p) == phase_plasticity(p))
enddo
end subroutine plastic_init
end subroutine mech_init
!--------------------------------------------------------------------------------------------------
@ -234,6 +277,7 @@ module function plastic_active(plastic_label) result(active_plastic)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
integer :: p
@ -241,13 +285,62 @@ module function plastic_active(plastic_label) result(active_plastic)
allocate(active_plastic(phases%length), source = .false. )
do p = 1, phases%length
phase => phases%get(p)
pl => phase%get('plasticity')
mech => phase%get('mech')
pl => mech%get('plasticity')
if(pl%get_asString('type') == plastic_label) active_plastic(p) = .true.
enddo
end function plastic_active
!--------------------------------------------------------------------------------------------------
!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to
!> the elastic and intermediate deformation gradients using Hooke's law
!--------------------------------------------------------------------------------------------------
module subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, &
Fe, Fi, ipc, ip, el)
integer, intent(in) :: &
ipc, & !< component-ID of integration point
ip, & !< integration point
el !< element
real(pReal), intent(in), dimension(3,3) :: &
Fe, & !< elastic deformation gradient
Fi !< intermediate deformation gradient
real(pReal), intent(out), dimension(3,3) :: &
S !< 2nd Piola-Kirchhoff stress tensor in lattice configuration
real(pReal), intent(out), dimension(3,3,3,3) :: &
dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient
dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient
real(pReal), dimension(3,3) :: E
real(pReal), dimension(3,3,3,3) :: C
integer :: &
ho, & !< homogenization
d !< counter in degradation loop
integer :: &
i, j
ho = material_homogenizationAt(el)
C = math_66toSym3333(constitutive_homogenizedC(ipc,ip,el))
DegradationLoop: do d = 1, phase_NstiffnessDegradations(material_phaseAt(ipc,el))
degradationType: select case(phase_stiffnessDegradation(d,material_phaseAt(ipc,el)))
case (STIFFNESS_DEGRADATION_damage_ID) degradationType
C = C * damage(ho)%p(damageMapping(ho)%p(ip,el))**2
end select degradationType
enddo DegradationLoop
E = 0.5_pReal*(matmul(transpose(Fe),Fe)-math_I3) !< Green-Lagrange strain in unloaded configuration
S = math_mul3333xx33(C,matmul(matmul(transpose(Fi),E),Fi)) !< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration
do i =1, 3;do j=1,3
dS_dFe(i,j,1:3,1:3) = matmul(Fe,matmul(matmul(Fi,C(i,j,1:3,1:3)),transpose(Fi))) !< dS_ij/dFe_kl = C_ijmn * Fi_lm * Fi_on * Fe_ko
dS_dFi(i,j,1:3,1:3) = 2.0_pReal*matmul(matmul(E,Fi),C(i,j,1:3,1:3)) !< dS_ij/dFi_kl = C_ijln * E_km * Fe_mn
enddo; enddo
end subroutine constitutive_hooke_SandItsTangents
!--------------------------------------------------------------------------------------------------
!> @brief calls microstructure function of the different plasticity constitutive models
!--------------------------------------------------------------------------------------------------
@ -395,6 +488,5 @@ module subroutine plastic_results
end subroutine plastic_results
end submodule constitutive_plastic
end submodule constitutive_mech

View File

@ -5,7 +5,7 @@
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief crystal plasticity model for bcc metals, especially Tungsten
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_disloTungsten
submodule(constitutive:constitutive_mech) plastic_disloTungsten
real(pReal), parameter :: &
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
@ -94,6 +94,7 @@ module function plastic_disloTungsten_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_dislotungsten init -+>>>'
@ -115,14 +116,14 @@ module function plastic_disloTungsten_init() result(myPlasticity)
i = 0
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
if(.not. myPlasticity(p)) cycle
i = i + 1
associate(prm => param(i), &
dot => dotState(i), &
stt => state(i), &
dst => dependentState(i))
pl => phase%get('plasticity')
pl => mech%get('plasticity')
#if defined (__GFORTRAN__)
prm%output = output_asStrings(pl)

View File

@ -7,7 +7,7 @@
!> @brief material subroutine incoprorating dislocation and twinning physics
!> @details to be done
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_dislotwin
submodule(constitutive:constitutive_mech) plastic_dislotwin
real(pReal), parameter :: &
kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin
@ -141,6 +141,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_dislotwin init -+>>>'
@ -168,14 +169,14 @@ module function plastic_dislotwin_init() result(myPlasticity)
i = 0
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
if(.not. myPlasticity(p)) cycle
i = i + 1
associate(prm => param(i), &
dot => dotState(i), &
stt => state(i), &
dst => dependentState(i))
pl => phase%get('plasticity')
pl => mech%get('plasticity')
#if defined (__GFORTRAN__)
prm%output = output_asStrings(pl)

View File

@ -7,7 +7,7 @@
!! resolving the stress on the slip systems. Will give the response of phenopowerlaw for an
!! untextured polycrystal
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_isotropic
submodule(constitutive:constitutive_mech) plastic_isotropic
type :: tParameters
real(pReal) :: &
@ -65,6 +65,7 @@ module function plastic_isotropic_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_isotropic init -+>>>'
@ -85,13 +86,13 @@ module function plastic_isotropic_init() result(myPlasticity)
i = 0
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
if(.not. myPlasticity(p)) cycle
i = i + 1
associate(prm => param(i), &
dot => dotState(i), &
stt => state(i))
pl => phase%get('plasticity')
pl => mech%get('plasticity')
#if defined (__GFORTRAN__)

View File

@ -5,7 +5,7 @@
!> @brief Phenomenological crystal plasticity using a power law formulation for the shear rates
!! and a Voce-type kinematic hardening rule
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_kinehardening
submodule(constitutive:constitutive_mech) plastic_kinehardening
type :: tParameters
real(pReal) :: &
@ -77,6 +77,7 @@ module function plastic_kinehardening_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_kinehardening init -+>>>'
@ -95,14 +96,14 @@ module function plastic_kinehardening_init() result(myPlasticity)
i = 0
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
if(.not. myPlasticity(p)) cycle
i = i + 1
associate(prm => param(i), &
dot => dotState(i), &
dlt => deltaState(i), &
stt => state(i))
pl => phase%get('plasticity')
pl => mech%get('plasticity')
#if defined (__GFORTRAN__)
prm%output = output_asStrings(pl)

View File

@ -4,7 +4,7 @@
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief Dummy plasticity for purely elastic material
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_none
submodule(constitutive:constitutive_mech) plastic_none
contains
@ -22,6 +22,7 @@ module function plastic_none_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_none init -+>>>'
@ -30,7 +31,8 @@ module function plastic_none_init() result(myPlasticity)
allocate(myPlasticity(phases%length), source = .false.)
do p = 1, phases%length
phase => phases%get(p)
pl => phase%get('plasticity')
mech => phase%get('mech')
pl => mech%get ('plasticity')
if(pl%get_asString('type') == 'none') myPlasticity(p) = .true.
enddo

View File

@ -4,7 +4,7 @@
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
!> @brief material subroutine for plasticity including dislocation flux
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_nonlocal
submodule(constitutive:constitutive_mech) plastic_nonlocal
use geometry_plastic_nonlocal, only: &
nIPneighbors => geometry_plastic_nonlocal_nIPneighbors, &
IPneighborhood => geometry_plastic_nonlocal_IPneighborhood, &
@ -183,6 +183,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_nonlocal init -+>>>'
@ -212,7 +213,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
i = 0
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
if(.not. myPlasticity(p)) cycle
i = i + 1
associate(prm => param(i), &
@ -221,7 +222,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
st0 => state0(i), &
del => deltaState(i), &
dst => microstructure(i))
pl => phase%get('plasticity')
pl => mech%get('plasticity')
phase_localPlasticity(p) = .not. pl%contains('nonlocal')

View File

@ -4,7 +4,7 @@
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
!> @brief phenomenological crystal plasticity formulation using a powerlaw fitting
!--------------------------------------------------------------------------------------------------
submodule(constitutive:constitutive_plastic) plastic_phenopowerlaw
submodule(constitutive:constitutive_mech) plastic_phenopowerlaw
type :: tParameters
real(pReal) :: &
@ -86,6 +86,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl
print'(/,a)', ' <<<+- plastic_phenopowerlaw init -+>>>'
@ -103,13 +104,13 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
i = 0
do p = 1, phases%length
phase => phases%get(p)
mech => phase%get('mech')
if(.not. myPlasticity(p)) cycle
i = i + 1
associate(prm => param(i), &
dot => dotState(i), &
stt => state(i))
pl => phase%get('plasticity')
pl => mech%get('plasticity')
!--------------------------------------------------------------------------------------------------
! slip related parameters

View File

@ -150,7 +150,7 @@ subroutine crystallite_init
debug_crystallite, & ! pointer to debug options for crystallite
phases, &
phase, &
generic_param
mech
print'(/,a)', ' <<<+- crystallite init -+>>>'
@ -240,11 +240,11 @@ subroutine crystallite_init
allocate(output_constituent(phases%length))
do c = 1, phases%length
phase => phases%get(c)
generic_param => phase%get('generic',defaultVal = emptyDict)
mech => phase%get('mech',defaultVal = emptyDict)
#if defined(__GFORTRAN__)
output_constituent(c)%label = output_asStrings(generic_param)
output_constituent(c)%label = output_asStrings(mech)
#else
output_constituent(c)%label = generic_param%get_asStrings('output',defaultVal=emptyStringArray)
output_constituent(c)%label = mech%get_asStrings('output',defaultVal=emptyStringArray)
#endif
enddo

View File

@ -41,7 +41,6 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin
class(tNode), pointer :: &
phases, &
phase, &
pl, &
kinematics, &
kinematic_type
@ -59,7 +58,6 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin
do p = 1, phases%length
if(any(myKinematics(:,p))) kinematics_cleavage_opening_instance(p) = count(myKinematics(:,1:p))
phase => phases%get(p)
pl => phase%get('plasticity')
if(count(myKinematics(:,p)) == 0) cycle
kinematics => phase%get('kinematics')
do k = 1, kinematics%length

View File

@ -44,6 +44,7 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl, &
kinematics, &
kinematic_type
@ -62,7 +63,8 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi
do p = 1, phases%length
if(any(myKinematics(:,p))) kinematics_slipplane_opening_instance(p) = count(myKinematics(:,1:p))
phase => phases%get(p)
pl => phase%get('plasticity')
mech => phase%get('mech')
pl => mech%get('plasticity')
if(count(myKinematics(:,p)) == 0) cycle
kinematics => phase%get('kinematics')
do k = 1, kinematics%length

View File

@ -34,7 +34,6 @@ module function kinematics_thermal_expansion_init(kinematics_length) result(myKi
class(tNode), pointer :: &
phases, &
phase, &
pl, &
kinematics, &
kinematic_type
@ -52,7 +51,6 @@ module function kinematics_thermal_expansion_init(kinematics_length) result(myKi
do p = 1, phases%length
if(any(myKinematics(:,p))) kinematics_thermal_expansion_instance(p) = count(myKinematics(:,1:p))
phase => phases%get(p)
pl => phase%get('plasticity')
if(count(myKinematics(:,p)) == 0) cycle
kinematics => phase%get('kinematics')
do k = 1, kinematics%length

View File

@ -455,6 +455,7 @@ subroutine lattice_init
class(tNode), pointer :: &
phases, &
phase, &
mech, &
elasticity
print'(/,a)', ' <<<+- lattice init -+>>>'; flush(IO_STDOUT)
@ -475,7 +476,8 @@ subroutine lattice_init
do p = 1, phases%length
phase => phases%get(p)
elasticity => phase%get('elasticity')
mech => phase%get('mech')
elasticity => mech%get('elasticity')
lattice_C66(1,1,p) = elasticity%get_asFloat('C_11')
lattice_C66(1,2,p) = elasticity%get_asFloat('C_12')

View File

@ -36,6 +36,7 @@ module function source_damage_anisoDuctile_init(source_length) result(mySources)
class(tNode), pointer :: &
phases, &
phase, &
mech, &
pl, &
sources, &
src
@ -59,8 +60,9 @@ module function source_damage_anisoDuctile_init(source_length) result(mySources)
phase => phases%get(p)
if(any(mySources(:,p))) source_damage_anisoDuctile_instance(p) = count(mySources(:,1:p))
if(count(mySources(:,p)) == 0) cycle
mech => phase%get('mech')
pl => mech%get('plasticity')
sources => phase%get('source')
pl => phase%get('plasticity')
do sourceOffset = 1, sources%length
if(mySources(sourceOffset,p)) then
source_damage_anisoDuctile_offset(p) = sourceOffset