1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/kinematics_cleavage_opening.f90"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/kinematics_cleavage_opening.f90"
31 real(
preal),
dimension(:),
allocatable :: &
33 real(
preal),
dimension(:,:,:,:),
allocatable :: &
52 integer :: ninstance,p
53 integer,
dimension(:),
allocatable :: n_cl
54 character(len=pStringLen) :: extmsg =
''
60 write(6,
'(a16,1x,i5,/)')
'# instances:',ninstance
63 allocate(
param(ninstance))
72 n_cl =
config%getInts(
'ncleavage')
73 prm%sum_N_cl = sum(abs(n_cl))
75 prm%n =
config%getFloat(
'anisobrittle_ratesensitivity')
76 prm%sdot0 =
config%getFloat(
'anisobrittle_sdot0')
78 prm%critLoad =
config%getFloats(
'anisobrittle_criticalload',requiredsize=
size(n_cl))
81 config%getFloat(
'c/a',defaultval=0.0_preal))
87 if (prm%n <= 0.0_preal) extmsg = trim(extmsg)//
' anisobrittle_n'
88 if (prm%sdot0 <= 0.0_preal) extmsg = trim(extmsg)//
' anisobrittle_sdot0'
89 if (any(prm%critLoad < 0.0_preal)) extmsg = trim(extmsg)//
' anisobrittle_critLoad'
106 integer,
intent(in) :: &
107 ipc, & !< grain number
108 ip, & !< integration point number
110 real(preal),
intent(in),
dimension(3,3) :: &
112 real(preal),
intent(out),
dimension(3,3) :: &
114 real(preal),
intent(out),
dimension(3,3,3,3) :: &
118 homog, damageoffset, &
121 traction_d, traction_t, traction_n, traction_crit, &
122 udotd, dudotd_dt, udott, dudott_dt, udotn, dudotn_dt
124 homog = material_homogenizationat(el)
125 damageoffset = damagemapping(homog)%p(ip,el)
128 dld_dtstar = 0.0_preal
130 do i = 1,prm%sum_N_cl
131 traction_crit = prm%critLoad(i)* damage(homog)%p(damageoffset)**2.0_preal
133 traction_d = math_tensordot(s,prm%cleavage_systems(1:3,1:3,1,i))
134 if (abs(traction_d) > traction_crit + tol_math_check)
then
135 udotd = sign(1.0_preal,traction_d)* prm%sdot0 * ((abs(traction_d) - traction_crit)/traction_crit)**prm%n
136 ld = ld + udotd*prm%cleavage_systems(1:3,1:3,1,i)
137 dudotd_dt = sign(1.0_preal,traction_d)*udotd*prm%n / (abs(traction_d) - traction_crit)
138 forall (k=1:3,l=1:3,m=1:3,n=1:3) &
139 dld_dtstar(k,l,m,n) = dld_dtstar(k,l,m,n) &
140 + dudotd_dt*prm%cleavage_systems(k,l,1,i) * prm%cleavage_systems(m,n,1,i)
143 traction_t = math_tensordot(s,prm%cleavage_systems(1:3,1:3,2,i))
144 if (abs(traction_t) > traction_crit + tol_math_check)
then
145 udott = sign(1.0_preal,traction_t)* prm%sdot0 * ((abs(traction_t) - traction_crit)/traction_crit)**prm%n
146 ld = ld + udott*prm%cleavage_systems(1:3,1:3,2,i)
147 dudott_dt = sign(1.0_preal,traction_t)*udott*prm%n / (abs(traction_t) - traction_crit)
148 forall (k=1:3,l=1:3,m=1:3,n=1:3) &
149 dld_dtstar(k,l,m,n) = dld_dtstar(k,l,m,n) &
150 + dudott_dt*prm%cleavage_systems(k,l,2,i) * prm%cleavage_systems(m,n,2,i)
153 traction_n = math_tensordot(s,prm%cleavage_systems(1:3,1:3,3,i))
154 if (abs(traction_n) > traction_crit + tol_math_check)
then
155 udotn = sign(1.0_preal,traction_n)* prm%sdot0 * ((abs(traction_n) - traction_crit)/traction_crit)**prm%n
156 ld = ld + udotn*prm%cleavage_systems(1:3,1:3,3,i)
157 dudotn_dt = sign(1.0_preal,traction_n)*udotn*prm%n / (abs(traction_n) - traction_crit)
158 forall (k=1:3,l=1:3,m=1:3,n=1:3) &
159 dld_dtstar(k,l,m,n) = dld_dtstar(k,l,m,n) &
160 + dudotn_dt*prm%cleavage_systems(k,l,3,i) * prm%cleavage_systems(m,n,3,i)