1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/constitutive_plastic_isotropic.f90"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/constitutive_plastic_isotropic.f90"
19 dot_gamma_0, & !< reference strain rate
20 n, & !< stress exponent
23 xi_inf, & !< maximum critical stress
33 character(len=pStringLen),
allocatable,
dimension(:) :: &
37 type :: tisotropicstate
38 real(pReal),
pointer,
dimension(:) :: &
41 end type tisotropicstate
45 type(tParameters),
allocatable,
dimension(:) :: param
46 type(tIsotropicState),
allocatable,
dimension(:) :: &
56 module subroutine plastic_isotropic_init
62 sizeState, sizeDotState
65 character(len=pStringLen) :: &
68 write(6,
'(/,a)')
' <<<+- plastic_'//plasticity_isotropic_label//
' init -+>>>';
flush(6)
70 write(6,
'(/,a)')
' Maiti and Eisenlohr, Scripta Materialia 145:37–40, 2018'
71 write(6,
'(a)')
' https://doi.org/10.1016/j.scriptamat.2017.09.047'
73 ninstance = count(phase_plasticity == plasticity_isotropic_id)
74 if (iand(debug_level(debug_constitutive),debug_levelbasic) /= 0) &
75 write(6,
'(a16,1x,i5,/)')
'# instances:',ninstance
77 allocate(param(ninstance))
78 allocate(state(ninstance))
79 allocate(dotstate(ninstance))
81 do p = 1,
size(phase_plasticity)
82 if (phase_plasticity(p) /= plasticity_isotropic_id) cycle
83 associate(prm => param(phase_plasticityinstance(p)), &
84 dot => dotstate(phase_plasticityinstance(p)), &
85 stt => state(phase_plasticityinstance(p)), &
88 prm%output =
config%getStrings(
'(output)',defaultval=emptystringarray)
95 xi_0 =
config%getFloat(
'tau0')
96 prm%xi_inf =
config%getFloat(
'tausat')
97 prm%dot_gamma_0 =
config%getFloat(
'gdot0')
98 prm%n =
config%getFloat(
'n')
99 prm%h0 =
config%getFloat(
'h0')
100 prm%M =
config%getFloat(
'm')
101 prm%h_ln =
config%getFloat(
'h0_slopelnrate', defaultval=0.0_preal)
102 prm%c_1 =
config%getFloat(
'tausat_sinhfita',defaultval=0.0_preal)
103 prm%c_4 =
config%getFloat(
'tausat_sinhfitb',defaultval=0.0_preal)
104 prm%c_3 =
config%getFloat(
'tausat_sinhfitc',defaultval=0.0_preal)
105 prm%c_2 =
config%getFloat(
'tausat_sinhfitd',defaultval=0.0_preal)
106 prm%a =
config%getFloat(
'a')
108 prm%dilatation =
config%keyExists(
'/dilatation/')
112 if (xi_0 < 0.0_preal) extmsg = trim(extmsg)//
' xi_0'
113 if (prm%dot_gamma_0 <= 0.0_preal) extmsg = trim(extmsg)//
' dot_gamma_0'
114 if (prm%n <= 0.0_preal) extmsg = trim(extmsg)//
' n'
115 if (prm%a <= 0.0_preal) extmsg = trim(extmsg)//
' a'
116 if (prm%M <= 0.0_preal) extmsg = trim(extmsg)//
' M'
120 nipcmyphase = count(material_phaseat == p) * discretization_nip
121 sizedotstate =
size([
'xi ',
'accumulated_shear'])
122 sizestate = sizedotstate
124 call material_allocateplasticstate(p,nipcmyphase,sizestate,sizedotstate,0)
128 stt%xi => plasticstate(p)%state (1,:)
130 dot%xi => plasticstate(p)%dotState(1,:)
131 plasticstate(p)%atol(1) =
config%getFloat(
'atol_xi',defaultval=1.0_preal)
132 if (plasticstate(p)%atol(1) < 0.0_preal) extmsg = trim(extmsg)//
' atol_xi'
134 stt%gamma => plasticstate(p)%state (2,:)
135 dot%gamma => plasticstate(p)%dotState(2,:)
136 plasticstate(p)%atol(2) =
config%getFloat(
'atol_gamma',defaultval=1.0e-6_preal)
137 if (plasticstate(p)%atol(2) < 0.0_preal) extmsg = trim(extmsg)//
' atol_gamma'
139 plasticstate(p)%slipRate => plasticstate(p)%dotState(2:2,:)
141 plasticstate(p)%state0 = plasticstate(p)%state
147 if (extmsg /=
'')
call io_error(211,ext_msg=trim(extmsg)//
'('//plasticity_isotropic_label//
')')
151 end subroutine plastic_isotropic_init
157 module subroutine plastic_isotropic_lpanditstangent(lp,dlp_dmp,mp,instance,of)
159 real(pReal),
dimension(3,3),
intent(out) :: &
161 real(pReal),
dimension(3,3,3,3),
intent(out) :: &
164 real(pReal),
dimension(3,3),
intent(in) :: &
166 integer,
intent(in) :: &
170 real(pReal),
dimension(3,3) :: &
173 dot_gamma, & !< strainrate
174 norm_Mp_dev, & !< norm of the deviatoric part of the Mandel stress
179 associate(prm => param(instance), stt => state(instance))
181 mp_dev = math_deviatoric33(mp)
182 squarenorm_mp_dev = math_tensordot(mp_dev,mp_dev)
183 norm_mp_dev = sqrt(squarenorm_mp_dev)
185 if (norm_mp_dev > 0.0_preal)
then
186 dot_gamma = prm%dot_gamma_0 * (sqrt(1.5_preal) * norm_mp_dev/(prm%M*stt%xi(of))) **prm%n
188 lp = dot_gamma/prm%M * mp_dev/norm_mp_dev
189 # 194 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/constitutive_plastic_isotropic.f90"
190 forall (k=1:3,l=1:3,m=1:3,n=1:3) &
191 dlp_dmp(k,l,m,n) = (prm%n-1.0_preal) * mp_dev(k,l)*mp_dev(m,n) / squarenorm_mp_dev
192 forall (k=1:3,l=1:3) &
193 dlp_dmp(k,l,k,l) = dlp_dmp(k,l,k,l) + 1.0_preal
194 forall (k=1:3,m=1:3) &
195 dlp_dmp(k,k,m,m) = dlp_dmp(k,k,m,m) - 1.0_preal/3.0_preal
196 dlp_dmp = dot_gamma / prm%M * dlp_dmp / norm_mp_dev
204 end subroutine plastic_isotropic_lpanditstangent
210 module subroutine plastic_isotropic_lianditstangent(li,dli_dmi,mi,instance,of)
212 real(pReal),
dimension(3,3),
intent(out) :: &
214 real(pReal),
dimension(3,3,3,3),
intent(out) :: &
217 real(pReal),
dimension(3,3),
intent(in) :: &
219 integer,
intent(in) :: &
228 associate(prm => param(instance), stt => state(instance))
230 tr=math_trace33(math_spherical33(mi))
232 if (prm%dilatation .and. abs(tr) > 0.0_preal)
then
234 * prm%dot_gamma_0/prm%M * (3.0_preal*prm%M*stt%xi(of))**(-prm%n) &
235 * tr * abs(tr)**(prm%n-1.0_preal)
237 # 249 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/constitutive_plastic_isotropic.f90"
239 forall (k=1:3,l=1:3,m=1:3,n=1:3) &
240 dli_dmi(k,l,m,n) = prm%n / tr * li(k,l) * math_i3(m,n)
249 end subroutine plastic_isotropic_lianditstangent
255 module subroutine plastic_isotropic_dotstate(mp,instance,of)
257 real(pReal),
dimension(3,3),
intent(in) :: &
259 integer,
intent(in) :: &
264 dot_gamma, & !< strainrate
265 xi_inf_star, & !< saturation xi
268 associate(prm => param(instance), stt => state(instance), dot => dotstate(instance))
270 if (prm%dilatation)
then
271 norm_mp = sqrt(math_tensordot(mp,mp))
273 norm_mp = sqrt(math_tensordot(math_deviatoric33(mp),math_deviatoric33(mp)))
276 dot_gamma = prm%dot_gamma_0 * (sqrt(1.5_preal) * norm_mp /(prm%M*stt%xi(of))) **prm%n
278 if (dot_gamma > 1e-12_preal)
then
279 if (deq0(prm%c_1))
then
280 xi_inf_star = prm%xi_inf
282 xi_inf_star = prm%xi_inf &
283 + asinh( (dot_gamma / prm%c_1)**(1.0_preal / prm%c_2))**(1.0_preal / prm%c_3) &
284 / prm%c_4 * (dot_gamma / prm%dot_gamma_0)**(1.0_preal / prm%n)
286 dot%xi(of) = dot_gamma &
287 * ( prm%h0 + prm%h_ln * log(dot_gamma) ) &
288 * abs( 1.0_preal - stt%xi(of)/xi_inf_star )**prm%a &
289 * sign(1.0_preal, 1.0_preal - stt%xi(of)/xi_inf_star)
291 dot%xi(of) = 0.0_preal
294 dot%gamma(of) = dot_gamma
298 end subroutine plastic_isotropic_dotstate
304 module subroutine plastic_isotropic_results(instance,group)
306 integer,
intent(in) :: instance
307 character(len=*),
intent(in) :: group
311 associate(prm => param(instance), stt => state(instance))
312 outputsloop:
do o = 1,
size(prm%output)
313 select case(trim(prm%output(o)))
315 call results_writedataset(group,stt%xi,
'xi',
'resistance against plastic flow',
'Pa')
320 end subroutine plastic_isotropic_results
323 end submodule plastic_isotropic