DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
material.f90
Go to the documentation of this file.
1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/material.f90"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/material.f90"
5 !--------------------------------------------------------------------------------------------------
10 !--------------------------------------------------------------------------------------------------
11 module material
12  use prec
13  use math
14  use config
15  use results
16  use io
17  use debug
18  use numerics
19  use rotations
20  use discretization
21 
22  implicit none
23  private
24 
25  character(len=*), parameter, public :: &
26  elasticity_hooke_label = 'hooke', &
27  plasticity_none_label = 'none', &
28  plasticity_isotropic_label = 'isotropic', &
29  plasticity_phenopowerlaw_label = 'phenopowerlaw', &
30  plasticity_kinehardening_label = 'kinehardening', &
31  plasticity_dislotwin_label = 'dislotwin', &
32  plasticity_disloucla_label = 'disloucla', &
33  plasticity_nonlocal_label = 'nonlocal', &
34  source_thermal_dissipation_label = 'thermal_dissipation', &
35  source_thermal_externalheat_label = 'thermal_externalheat', &
36  source_damage_isobrittle_label = 'damage_isobrittle', &
37  source_damage_isoductile_label = 'damage_isoductile', &
38  source_damage_anisobrittle_label = 'damage_anisobrittle', &
39  source_damage_anisoductile_label = 'damage_anisoductile', &
40  kinematics_thermal_expansion_label = 'thermal_expansion', &
41  kinematics_cleavage_opening_label = 'cleavage_opening', &
42  kinematics_slipplane_opening_label = 'slipplane_opening', &
44  thermal_isothermal_label = 'isothermal', &
45  thermal_adiabatic_label = 'adiabatic', &
46  thermal_conduction_label = 'conduction', &
47  damage_none_label = 'none', &
48  damage_local_label = 'local', &
49  damage_nonlocal_label = 'nonlocal', &
50  homogenization_none_label = 'none', &
51  homogenization_isostrain_label = 'isostrain', &
53 
54  enum, bind(c); enumerator :: &
88  end enum
89 
90  integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable, public, protected :: &
92  integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable, public, protected :: &
94  integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable, public, protected :: &
96  integer(kind(DAMAGE_none_ID)), dimension(:), allocatable, public, protected :: &
98  integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable, public, protected :: &
100 
101  integer, public, protected :: &
102  material_nphase, & !< number of phases
104 
105  integer(kind(SOURCE_undefined_ID)), dimension(:,:), allocatable, public, protected :: &
106  phase_source, & !< active sources mechanisms of each phase
107  phase_kinematics, & !< active kinematic mechanisms of each phase
109 
110  integer, public, protected :: &
112 
113  integer, dimension(:), allocatable, public, protected :: &
114  phase_nsources, & !< number of source mechanisms active in each phase
115  phase_nkinematics, & !< number of kinematic mechanisms active in each phase
116  phase_nstiffnessdegradations, & !< number of stiffness degradation mechanisms active in each phase
117  phase_elasticityinstance, & !< instance of particular elasticity of each phase
118  phase_plasticityinstance, & !< instance of particular plasticity of each phase
119  homogenization_ngrains, & !< number of grains in each homogenization
120  homogenization_typeinstance, & !< instance of particular type of each homogenization
121  thermal_typeinstance, & !< instance of particular type of each thermal transport
123 
124  real(preal), dimension(:), allocatable, public, protected :: &
125  thermal_initialt, & !< initial temperature per each homogenization
127 
128  integer, dimension(:), allocatable, public, protected :: & ! (elem)
130  integer, dimension(:,:), allocatable, public, target :: & ! (ip,elem) ToDo: ugly target for mapping hack
132  integer, dimension(:,:), allocatable, public, protected :: & ! (constituent,elem)
134  integer, dimension(:,:,:), allocatable, public, protected :: & ! (constituent,elem)
136 
137  type(tplasticstate), allocatable, dimension(:), public :: &
139  type(tsourcestate), allocatable, dimension(:), public :: &
141  type(tstate), allocatable, dimension(:), public :: &
142  homogstate, &
143  thermalstate, &
145 
146  integer, dimension(:,:,:), allocatable, public, protected :: &
148 
149  type(rotation), dimension(:,:,:), allocatable, public, protected :: &
151 
152  logical, dimension(:), allocatable, public, protected :: &
154 
155  integer, dimension(:), allocatable, private :: &
157 
158  integer, dimension(:,:), allocatable, private :: &
159  microstructure_phase, & !< phase IDs of each microstructure
161 
162  type(rotation), dimension(:), allocatable, private :: &
164 
165 
166 ! BEGIN DEPRECATED
167  integer, dimension(:,:), allocatable, private, target :: mappinghomogenizationconst
168 ! END DEPRECATED
169 
170  type(thomogmapping), allocatable, dimension(:), public :: &
171  thermalmapping, & !< mapping for thermal state/fields
173 
174  type(group_float), allocatable, dimension(:), public :: &
175  temperature, & !< temperature field
176  damage, & !< damage field
178 
179  public :: &
180  material_init, &
204  damage_none_id, &
205  damage_local_id, &
210 
211 contains
212 
213 !--------------------------------------------------------------------------------------------------
215 !--------------------------------------------------------------------------------------------------
216 subroutine material_init
217 
218  integer :: i,e,m,c,h, mydebug, myphase, myhomog, mymicro
219  integer, dimension(:), allocatable :: &
220  counterphase, &
221  counterhomogenization
222 
223  mydebug = debug_level(debug_material)
224 
225  write(6,'(/,a)') ' <<<+- material init -+>>>'; flush(6)
226 
227  call material_parsephase()
228  if (iand(mydebug,debug_levelbasic) /= 0) write(6,'(a)') ' Phase parsed'; flush(6)
229 
231  if (iand(mydebug,debug_levelbasic) /= 0) write(6,'(a)') ' Microstructure parsed'; flush(6)
232 
234  if (iand(mydebug,debug_levelbasic) /= 0) write(6,'(a)') ' Homogenization parsed'; flush(6)
235 
236  call material_parsetexture()
237  if (iand(mydebug,debug_levelbasic) /= 0) write(6,'(a)') ' Texture parsed'; flush(6)
238 
241 
242 
243  allocate(plasticstate(material_nphase))
244  allocate(sourcestate(material_nphase))
245  do myphase = 1,material_nphase
246  allocate(sourcestate(myphase)%p(phase_nsources(myphase)))
247  enddo
248 
252 
255 
258 
260 
261  do m = 1,size(config_microstructure)
262  if(minval(microstructure_phase(1:microstructure_nconstituents(m),m)) < 1 .or. &
264  call io_error(150,m,ext_msg='phase')
265  if(minval(microstructure_texture(1:microstructure_nconstituents(m),m)) < 1 .or. &
267  call io_error(150,m,ext_msg='texture')
268  if(microstructure_nconstituents(m) < 1) &
269  call io_error(151,m)
270  enddo
272 
273  debugout: if (iand(mydebug,debug_levelextensive) /= 0) then
274  write(6,'(/,a,/)') ' MATERIAL configuration'
275  write(6,'(a32,1x,a16,1x,a6)') 'homogenization ','type ','grains'
276  do h = 1,size(config_homogenization)
277  write(6,'(1x,a32,1x,a16,1x,i6)') config_name_homogenization(h),homogenization_type(h),homogenization_ngrains(h)
278  enddo
279  write(6,'(/,a14,18x,1x,a11,1x,a12,1x,a13)') 'microstructure','constituents'
280  do m = 1,size(config_microstructure)
281  write(6,'(1x,a32,1x,i12)') config_name_microstructure(m), microstructure_nconstituents(m)
282  if (microstructure_nconstituents(m) > 0) then
283  do c = 1,microstructure_nconstituents(m)
284  write(6,'(a1,1x,a32,1x,a32)') '>',config_name_phase(microstructure_phase(c,m)),&
286  enddo
287  write(6,*)
288  endif
289  enddo
290  endif debugout
291 
293  allocate(material_texture(homogenization_maxngrains,discretization_nip,discretization_nelem),source=0) !this is only needed by plasticity nonlocal
295 
296  do e = 1, discretization_nelem
297  do i = 1, discretization_nip
300  if(microstructure_phase(c,mymicro) > 0) then
301  material_phaseat(c,e) = microstructure_phase(c,mymicro)
302  else
303  call io_error(150,ext_msg='phase')
304  endif
305  if(microstructure_texture(c,mymicro) > 0) then
306  material_texture(c,i,e) = microstructure_texture(c,mymicro)
308  else
309  call io_error(150,ext_msg='texture')
310  endif
311  enddo
312  enddo
313  enddo
314 
315  deallocate(microstructure_phase)
316  deallocate(microstructure_texture)
317  deallocate(texture_orientation)
318 
319 
322 
323  allocate(counterhomogenization(size(config_homogenization)),source=0)
324  do e = 1, discretization_nelem
325  do i = 1, discretization_nip
326  counterhomogenization(material_homogenizationat(e)) = &
327  counterhomogenization(material_homogenizationat(e)) + 1
328  material_homogenizationmemberat(i,e) = counterhomogenization(material_homogenizationat(e))
329  enddo
330  enddo
331 
333 
334  allocate(counterphase(size(config_phase)),source=0)
335  do e = 1, discretization_nelem
336  do i = 1, discretization_nip
337  do c = 1, homogenization_maxngrains
338  counterphase(material_phaseat(c,e)) = &
339  counterphase(material_phaseat(c,e)) + 1
340  material_phasememberat(c,i,e) = counterphase(material_phaseat(c,e))
341  enddo
342  enddo
343  enddo
344 
345  call config_deallocate('material.config/microstructure')
346  call config_deallocate('material.config/texture')
347 
352 
353 
354 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
355 ! BEGIN DEPRECATED
357 
358 ! hack needed to initialize field values used during constitutive initialization
359  do myhomog = 1,size(config_homogenization)
362  allocate(temperature(myhomog)%p(1), source=thermal_initialt(myhomog))
363  allocate(damage(myhomog)%p(1), source=damage_initialphi(myhomog))
364  allocate(temperaturerate(myhomog)%p(1), source=0.0_preal)
365  enddo
366 ! END DEPRECATED
367 
368 end subroutine material_init
369 
370 !--------------------------------------------------------------------------------------------------
372 !--------------------------------------------------------------------------------------------------
374 
375  integer :: h
376  character(len=pStringLen) :: tag
377 
378  logical, dimension(:), allocatable :: homogenization_active
379 
382  allocate(damage_type(size(config_homogenization)), source=damage_none_id)
383  allocate(homogenization_typeinstance(size(config_homogenization)), source=0)
384  allocate(thermal_typeinstance(size(config_homogenization)), source=0)
385  allocate(damage_typeinstance(size(config_homogenization)), source=0)
386  allocate(homogenization_ngrains(size(config_homogenization)), source=0)
387  allocate(homogenization_active(size(config_homogenization)), source=.false.) !!!!!!!!!!!!!!!
388  allocate(thermal_initialt(size(config_homogenization)), source=300.0_preal)
389  allocate(damage_initialphi(size(config_homogenization)), source=1.0_preal)
390 
391  forall (h = 1:size(config_homogenization)) &
392  homogenization_active(h) = any(discretization_homogenizationat == h)
393 
394 
395  do h=1, size(config_homogenization)
396 
397  tag = config_homogenization(h)%getString('mech')
398  select case (trim(tag))
404  homogenization_ngrains(h) = config_homogenization(h)%getInt('nconstituents')
407  homogenization_ngrains(h) = config_homogenization(h)%getInt('nconstituents')
408  case default
409  call io_error(500,ext_msg=trim(tag))
410  end select
411 
413 
414  if (config_homogenization(h)%keyExists('thermal')) then
415  thermal_initialt(h) = config_homogenization(h)%getFloat('t0',defaultval=300.0_preal)
416 
417  tag = config_homogenization(h)%getString('thermal')
418  select case (trim(tag))
425  case default
426  call io_error(500,ext_msg=trim(tag))
427  end select
428 
429  endif
430 
431  if (config_homogenization(h)%keyExists('damage')) then
432  damage_initialphi(h) = config_homogenization(h)%getFloat('initialdamage',defaultval=1.0_preal)
433 
434  tag = config_homogenization(h)%getString('damage')
435  select case (trim(tag))
436  case(damage_none_label)
438  case(damage_local_label)
442  case default
443  call io_error(500,ext_msg=trim(tag))
444  end select
445 
446  endif
447 
448  enddo
449 
450  do h=1, size(config_homogenization)
452  thermal_typeinstance(h) = count(thermal_type(1:h) == thermal_type(h))
453  damage_typeinstance(h) = count(damage_type(1:h) == damage_type(h))
454  enddo
455 
456  homogenization_maxngrains = maxval(homogenization_ngrains,homogenization_active)
457 
458 end subroutine material_parsehomogenization
459 
460 
461 !--------------------------------------------------------------------------------------------------
463 !--------------------------------------------------------------------------------------------------
465 
466  character(len=pStringLen), dimension(:), allocatable :: &
467  strings
468  integer, allocatable, dimension(:) :: chunkPos
469  integer :: m, c, i
470  character(len=pStringLen) :: &
471  tag
472  real(pReal), dimension(:,:), allocatable :: &
473  microstructure_fraction
474  integer :: &
475  maxNconstituents
476 
477  allocate(microstructure_nconstituents(size(config_microstructure)), source=0)
478 
480  call io_error(155,ext_msg='More microstructures in geometry than sections in material.config')
481 
482  do m=1, size(config_microstructure)
483  microstructure_nconstituents(m) = config_microstructure(m)%countKeys('(constituent)')
484  enddo
485 
486  maxnconstituents = maxval(microstructure_nconstituents)
487  allocate(microstructure_phase(maxnconstituents,size(config_microstructure)),source=0)
488  allocate(microstructure_texture(maxnconstituents,size(config_microstructure)),source=0)
489  allocate(microstructure_fraction(maxnconstituents,size(config_microstructure)),source=0.0_preal)
490 
491  allocate(strings(1)) ! Intel 16.0 Bug
492  do m=1, size(config_microstructure)
493  strings = config_microstructure(m)%getStrings('(constituent)',raw=.true.)
494  do c = 1, size(strings)
495  chunkpos = io_stringpos(strings(c))
496 
497  do i = 1,5,2
498  tag = io_stringvalue(strings(c),chunkpos,i)
499 
500  select case (tag)
501  case('phase')
502  microstructure_phase(c,m) = io_intvalue(strings(c),chunkpos,i+1)
503  case('texture')
504  microstructure_texture(c,m) = io_intvalue(strings(c),chunkpos,i+1)
505  case('fraction')
506  microstructure_fraction(c,m) = io_floatvalue(strings(c),chunkpos,i+1)
507  end select
508 
509  enddo
510  enddo
511  if (dneq(sum(microstructure_fraction(:,m)),1.0_preal)) call io_error(153,ext_msg=config_name_microstructure(m))
512  enddo
513 
514 
515 end subroutine material_parsemicrostructure
516 
517 
518 !--------------------------------------------------------------------------------------------------
520 !--------------------------------------------------------------------------------------------------
521 subroutine material_parsephase
522 
523  integer :: sourceCtr, kinematicsCtr, stiffDegradationCtr, p
524  character(len=pStringLen), dimension(:), allocatable :: str
525 
526 
529  allocate(phase_nsources(size(config_phase)), source=0)
530  allocate(phase_nkinematics(size(config_phase)), source=0)
531  allocate(phase_nstiffnessdegradations(size(config_phase)),source=0)
532  allocate(phase_localplasticity(size(config_phase)), source=.false.)
533 
534  do p=1, size(config_phase)
535  phase_nsources(p) = config_phase(p)%countKeys('(source)')
536  phase_nkinematics(p) = config_phase(p)%countKeys('(kinematics)')
537  phase_nstiffnessdegradations(p) = config_phase(p)%countKeys('(stiffness_degradation)')
538  phase_localplasticity(p) = .not. config_phase(p)%KeyExists('/nonlocal/')
539 
540  select case (config_phase(p)%getString('elasticity'))
543  case default
544  call io_error(200,ext_msg=trim(config_phase(p)%getString('elasticity')))
545  end select
546 
547  select case (config_phase(p)%getString('plasticity'))
548  case (plasticity_none_label)
562  case default
563  call io_error(201,ext_msg=trim(config_phase(p)%getString('plasticity')))
564  end select
565 
566  enddo
567 
568  allocate(phase_source(maxval(phase_nsources),size(config_phase)), source=source_undefined_id)
572  do p=1, size(config_phase)
573 
574  str = ['GfortranBug86277']
575  str = config_phase(p)%getStrings('(source)',defaultval=str)
576  if (str(1) == 'GfortranBug86277') str = [character(len=pStringLen)::]
577 
578 
579 
580  do sourcectr = 1, size(str)
581  select case (trim(str(sourcectr)))
594  end select
595  enddo
596 
597 
598  str = ['GfortranBug86277']
599  str = config_phase(p)%getStrings('(kinematics)',defaultval=str)
600  if (str(1) == 'GfortranBug86277') str = [character(len=pStringLen)::]
601 
602 
603 
604  do kinematicsctr = 1, size(str)
605  select case (trim(str(kinematicsctr)))
612  end select
613  enddo
614 
615  str = ['GfortranBug86277']
616  str = config_phase(p)%getStrings('(stiffness_degradation)',defaultval=str)
617  if (str(1) == 'GfortranBug86277') str = [character(len=pStringLen)::]
618 
619 
620 
621  do stiffdegradationctr = 1, size(str)
622  select case (trim(str(stiffdegradationctr)))
625  end select
626  enddo
627  enddo
628 
629  allocate(phase_plasticityinstance(size(config_phase)),source=0)
630  allocate(phase_elasticityinstance(size(config_phase)),source=0)
631 
632  do p=1, size(config_phase)
635  enddo
636 
637 end subroutine material_parsephase
638 
639 
640 !--------------------------------------------------------------------------------------------------
642 !--------------------------------------------------------------------------------------------------
643 subroutine material_parsetexture
644 
645  integer :: j,t
646  character(len=pStringLen), dimension(:), allocatable :: strings ! Values for given key in material config
647  integer, dimension(:), allocatable :: chunkPos
648  real(pReal), dimension(3,3) :: transformation ! maps texture to microstructure coordinate system
649  real(pReal), dimension(3) :: Eulers ! Euler angles in degrees from file
650  type(rotation) :: transformation_
651 
652  do t=1, size(config_texture)
653  if (config_texture(t)%countKeys('(gauss)') /= 1) call io_error(147,ext_msg='count((gauss)) != 1')
654  if (config_texture(t)%keyExists('symmetry')) call io_error(147,ext_msg='symmetry')
655  if (config_texture(t)%keyExists('(random)')) call io_error(147,ext_msg='(random)')
656  if (config_texture(t)%keyExists('(fiber)')) call io_error(147,ext_msg='(fiber)')
657  enddo
658 
659  allocate(texture_orientation(size(config_texture)))
660 
661  do t=1, size(config_texture)
662 
663  strings = config_texture(t)%getStrings('(gauss)',raw= .true.)
664  chunkpos = io_stringpos(strings(1))
665  do j = 1,5,2
666  select case (io_stringvalue(strings(1),chunkpos,j))
667  case('phi1')
668  eulers(1) = io_floatvalue(strings(1),chunkpos,j+1)
669  case('phi')
670  eulers(2) = io_floatvalue(strings(1),chunkpos,j+1)
671  case('phi2')
672  eulers(3) = io_floatvalue(strings(1),chunkpos,j+1)
673  end select
674  enddo
675  call texture_orientation(t)%fromEulers(eulers,degrees=.true.)
676 
677  if (config_texture(t)%keyExists('axes')) then
678  strings = config_texture(t)%getStrings('axes')
679  do j = 1, 3 ! look for "x", "y", and "z" entries
680  select case (strings(j))
681  case('x', '+x')
682  transformation(j,1:3) = [ 1.0_preal, 0.0_preal, 0.0_preal] ! original axis is now +x-axis
683  case('-x')
684  transformation(j,1:3) = [-1.0_preal, 0.0_preal, 0.0_preal] ! original axis is now -x-axis
685  case('y', '+y')
686  transformation(j,1:3) = [ 0.0_preal, 1.0_preal, 0.0_preal] ! original axis is now +y-axis
687  case('-y')
688  transformation(j,1:3) = [ 0.0_preal,-1.0_preal, 0.0_preal] ! original axis is now -y-axis
689  case('z', '+z')
690  transformation(j,1:3) = [ 0.0_preal, 0.0_preal, 1.0_preal] ! original axis is now +z-axis
691  case('-z')
692  transformation(j,1:3) = [ 0.0_preal, 0.0_preal,-1.0_preal] ! original axis is now -z-axis
693  case default
694  call io_error(157,t)
695  end select
696  enddo
697  call transformation_%fromMatrix(transformation)
698  texture_orientation(t) = texture_orientation(t) * transformation_
699  endif
700 
701  enddo
702 
703 end subroutine material_parsetexture
704 
705 
706 !--------------------------------------------------------------------------------------------------
708 !--------------------------------------------------------------------------------------------------
709 subroutine material_allocateplasticstate(phase,NipcMyPhase,&
710  sizeState,sizeDotState,sizeDeltaState)
711 
712  integer, intent(in) :: &
713  phase, &
714  nipcmyphase, &
715  sizestate, &
716  sizedotstate, &
717  sizedeltastate
718 
719  plasticstate(phase)%sizeState = sizestate
720  plasticstate(phase)%sizeDotState = sizedotstate
721  plasticstate(phase)%sizeDeltaState = sizedeltastate
722  plasticstate(phase)%offsetDeltaState = sizestate-sizedeltastate ! deltaState occupies latter part of state by definition
723 
724  allocate(plasticstate(phase)%atol (sizestate), source=0.0_preal)
725  allocate(plasticstate(phase)%state0 (sizestate,nipcmyphase), source=0.0_preal)
726  allocate(plasticstate(phase)%partionedState0 (sizestate,nipcmyphase), source=0.0_preal)
727  allocate(plasticstate(phase)%subState0 (sizestate,nipcmyphase), source=0.0_preal)
728  allocate(plasticstate(phase)%state (sizestate,nipcmyphase), source=0.0_preal)
729 
730  allocate(plasticstate(phase)%dotState (sizedotstate,nipcmyphase),source=0.0_preal)
731  if (numerics_integrator == 1) then
732  allocate(plasticstate(phase)%previousDotState (sizedotstate,nipcmyphase),source=0.0_preal)
733  allocate(plasticstate(phase)%previousDotState2 (sizedotstate,nipcmyphase),source=0.0_preal)
734  endif
735  if (numerics_integrator == 4) &
736  allocate(plasticstate(phase)%RK4dotState (4,sizedotstate,nipcmyphase),source=0.0_preal)
737  if (numerics_integrator == 5) &
738  allocate(plasticstate(phase)%RKCK45dotState (6,sizedotstate,nipcmyphase),source=0.0_preal)
739 
740  allocate(plasticstate(phase)%deltaState (sizedeltastate,nipcmyphase),source=0.0_preal)
741 
742 end subroutine material_allocateplasticstate
743 
744 
745 !--------------------------------------------------------------------------------------------------
747 !--------------------------------------------------------------------------------------------------
748 subroutine material_allocatesourcestate(phase,of,NipcMyPhase,&
749  sizeState,sizeDotState,sizeDeltaState)
750 
751  integer, intent(in) :: &
752  phase, &
753  of, &
754  nipcmyphase, &
755  sizestate, sizedotstate,sizedeltastate
756 
757  sourcestate(phase)%p(of)%sizeState = sizestate
758  sourcestate(phase)%p(of)%sizeDotState = sizedotstate
759  sourcestate(phase)%p(of)%sizeDeltaState = sizedeltastate
760  sourcestate(phase)%p(of)%offsetDeltaState = sizestate-sizedeltastate ! deltaState occupies latter part of state by definition
761 
762  allocate(sourcestate(phase)%p(of)%atol (sizestate), source=0.0_preal)
763  allocate(sourcestate(phase)%p(of)%state0 (sizestate,nipcmyphase), source=0.0_preal)
764  allocate(sourcestate(phase)%p(of)%partionedState0 (sizestate,nipcmyphase), source=0.0_preal)
765  allocate(sourcestate(phase)%p(of)%subState0 (sizestate,nipcmyphase), source=0.0_preal)
766  allocate(sourcestate(phase)%p(of)%state (sizestate,nipcmyphase), source=0.0_preal)
767 
768  allocate(sourcestate(phase)%p(of)%dotState (sizedotstate,nipcmyphase),source=0.0_preal)
769  if (numerics_integrator == 1) then
770  allocate(sourcestate(phase)%p(of)%previousDotState (sizedotstate,nipcmyphase),source=0.0_preal)
771  allocate(sourcestate(phase)%p(of)%previousDotState2 (sizedotstate,nipcmyphase),source=0.0_preal)
772  endif
773  if (numerics_integrator == 4) &
774  allocate(sourcestate(phase)%p(of)%RK4dotState (4,sizedotstate,nipcmyphase),source=0.0_preal)
775  if (numerics_integrator == 5) &
776  allocate(sourcestate(phase)%p(of)%RKCK45dotState (6,sizedotstate,nipcmyphase),source=0.0_preal)
777 
778  allocate(sourcestate(phase)%p(of)%deltaState (sizedeltastate,nipcmyphase),source=0.0_preal)
779 
780 end subroutine material_allocatesourcestate
781 
782 end module material
material::thermalmapping
type(thomogmapping), dimension(:), allocatable, public thermalmapping
mapping for thermal state/fields
Definition: material.f90:170
material::sourcestate
type(tsourcestate), dimension(:), allocatable, public sourcestate
Definition: material.f90:139
material::damage_local_label
character(len= *), parameter, public damage_local_label
Definition: material.f90:25
material::material_phaseat
integer, dimension(:,:), allocatable, public, protected material_phaseat
phase ID of each element
Definition: material.f90:132
material::phase_elasticityinstance
integer, dimension(:), allocatable, public, protected phase_elasticityinstance
instance of particular elasticity of each phase
Definition: material.f90:113
numerics::numerics_integrator
integer, public, protected numerics_integrator
method used for state integration Default 1: fix-point iteration
Definition: numerics.f90:1470
rotations
rotation storage and conversion
Definition: rotations.f90:53
io::io_stringpos
pure integer function, dimension(:), allocatable, public io_stringpos(string)
locates all whitespace-separated chunks in given string and returns array containing number them and ...
Definition: IO.f90:204
material::source_damage_isoductile_id
@, public source_damage_isoductile_id
Definition: material.f90:87
material::damagemapping
type(thomogmapping), dimension(:), allocatable, public damagemapping
mapping for damage state/fields
Definition: material.f90:170
material::plasticity_isotropic_label
character(len= *), parameter, public plasticity_isotropic_label
Definition: material.f90:25
material::plasticity_kinehardening_label
character(len= *), parameter, public plasticity_kinehardening_label
Definition: material.f90:25
material::material_phasememberat
integer, dimension(:,:,:), allocatable, public, protected material_phasememberat
position of the element within its phase instance
Definition: material.f90:134
results::results_closejobfile
subroutine, public results_closejobfile
closes the results file
Definition: results.f90:102
io::io_error
subroutine, public io_error(error_ID, el, ip, g, instance, ext_msg)
write error statements to standard out and terminate the Marc/spectral run with exit #9xxx
Definition: IO.f90:305
rotations::rotation
Definition: rotations.f90:63
prec::thomogmapping
Definition: prec.f90:77
material::source_damage_isobrittle_id
@, public source_damage_isobrittle_id
Definition: material.f90:87
config::config_phase
type(tpartitionedstringlist), dimension(:), allocatable, public, protected config_phase
Definition: config.f90:23
material::source_undefined_id
@ source_undefined_id
Definition: material.f90:87
material::source_thermal_dissipation_id
@, public source_thermal_dissipation_id
Definition: material.f90:87
material::kinematics_thermal_expansion_id
@, public kinematics_thermal_expansion_id
Definition: material.f90:87
debug::debug_level
integer, dimension(debug_maxntype+2), public, protected debug_level
Definition: debug.f90:48
material::material_allocateplasticstate
subroutine, public material_allocateplasticstate(phase, NipcMyPhase, sizeState, sizeDotState, sizeDeltaState)
allocates the plastic state of a phase
Definition: material.f90:711
material::source_thermal_externalheat_label
character(len= *), parameter, public source_thermal_externalheat_label
Definition: material.f90:25
material::phase_plasticity
integer(kind(plasticity_undefined_id)), dimension(:), allocatable, public, protected phase_plasticity
plasticity of each phase
Definition: material.f90:92
results::results_mapping_materialpoint
subroutine, public results_mapping_materialpoint(homogenizationAt, memberAtLocal, label)
adds the unique mapping from spatial position and constituent ID to results
Definition: results.f90:628
material::thermal_adiabatic_id
@, public thermal_adiabatic_id
Definition: material.f90:87
material::plasticity_isotropic_id
@, public plasticity_isotropic_id
Definition: material.f90:87
material::material_parsetexture
subroutine material_parsetexture
parses the texture part in the material configuration file
Definition: material.f90:644
material::damage_nonlocal_id
@, public damage_nonlocal_id
Definition: material.f90:87
material::plasticity_dislotwin_id
@, public plasticity_dislotwin_id
Definition: material.f90:87
material::temperature
type(group_float), dimension(:), allocatable, public temperature
temperature field
Definition: material.f90:174
config::config_name_phase
character(len=pstringlen), dimension(:), allocatable, public, protected config_name_phase
name of each phase
Definition: config.f90:34
material::damage_initialphi
real(preal), dimension(:), allocatable, public, protected damage_initialphi
initial damage per each homogenization
Definition: material.f90:124
material
Parses material config file, either solverJobName.materialConfig or material.config.
Definition: material.f90:11
material::homogenization_maxngrains
integer, public, protected homogenization_maxngrains
max number of grains in any USED homogenization
Definition: material.f90:110
material::material_orientation0
type(rotation), dimension(:,:,:), allocatable, public, protected material_orientation0
initial orientation of each grain,IP,element
Definition: material.f90:149
material::microstructure_phase
integer, dimension(:,:), allocatable, private microstructure_phase
phase IDs of each microstructure
Definition: material.f90:158
material::texture_orientation
type(rotation), dimension(:), allocatable, private texture_orientation
Euler angles in material.config (possibly rotated for alignment)
Definition: material.f90:162
material::plasticity_undefined_id
@ plasticity_undefined_id
Definition: material.f90:87
config
Reads in the material configuration from file.
Definition: config.f90:13
material::mappinghomogenizationconst
integer, dimension(:,:), allocatable, target, private mappinghomogenizationconst
mapping from material points to offset in constant state/field
Definition: material.f90:167
material::phase_nkinematics
integer, dimension(:), allocatable, public, protected phase_nkinematics
number of kinematic mechanisms active in each phase
Definition: material.f90:113
material::elasticity_hooke_id
@, public elasticity_hooke_id
Definition: material.f90:87
material::damagestate
type(tstate), dimension(:), allocatable, public damagestate
Definition: material.f90:141
config::config_deallocate
subroutine, public config_deallocate(what)
deallocates the linked lists that store the content of the configuration files
Definition: config.f90:290
material::homogenization_ngrains
integer, dimension(:), allocatable, public, protected homogenization_ngrains
number of grains in each homogenization
Definition: material.f90:113
material::thermal_isothermal_id
@, public thermal_isothermal_id
Definition: material.f90:87
material::thermal_initialt
real(preal), dimension(:), allocatable, public, protected thermal_initialt
initial temperature per each homogenization
Definition: material.f90:124
material::damage_local_id
@, public damage_local_id
Definition: material.f90:87
material::thermal_conduction_label
character(len= *), parameter, public thermal_conduction_label
Definition: material.f90:25
material::phase_elasticity
integer(kind(elasticity_undefined_id)), dimension(:), allocatable, public, protected phase_elasticity
elasticity of each phase
Definition: material.f90:90
material::kinematics_undefined_id
@ kinematics_undefined_id
Definition: material.f90:87
material::thermal_type
integer(kind(thermal_isothermal_id)), dimension(:), allocatable, public, protected thermal_type
thermal transport model
Definition: material.f90:94
prec
setting precision for real and int type
Definition: prec.f90:13
material::homogenization_typeinstance
integer, dimension(:), allocatable, public, protected homogenization_typeinstance
instance of particular type of each homogenization
Definition: material.f90:113
debug::debug_material
integer, parameter, public debug_material
stores debug level for material part of DAMASK bitwise coded
Definition: debug.f90:32
material::homogstate
type(tstate), dimension(:), allocatable, public homogstate
Definition: material.f90:141
config::config_name_microstructure
character(len=pstringlen), dimension(:), allocatable, public, protected config_name_microstructure
name of each microstructure
Definition: config.f90:34
material::homogenization_undefined_id
@ homogenization_undefined_id
Definition: material.f90:87
discretization::discretization_homogenizationat
integer, dimension(:), allocatable, public, protected discretization_homogenizationat
Definition: discretization.f90:21
material::source_damage_isobrittle_label
character(len= *), parameter, public source_damage_isobrittle_label
Definition: material.f90:25
discretization
spatial discretization
Definition: discretization.f90:9
material::homogenization_rgc_label
character(len= *), parameter, public homogenization_rgc_label
Definition: material.f90:25
material::microstructure_texture
integer, dimension(:,:), allocatable, private microstructure_texture
texture IDs of each microstructure
Definition: material.f90:158
material::material_parsemicrostructure
subroutine material_parsemicrostructure
parses the microstructure part in the material configuration file
Definition: material.f90:465
discretization::discretization_nip
integer, public, protected discretization_nip
Definition: discretization.f90:17
material::homogenization_none_label
character(len= *), parameter, public homogenization_none_label
Definition: material.f90:25
material::source_thermal_externalheat_id
@, public source_thermal_externalheat_id
Definition: material.f90:87
material::homogenization_isostrain_id
@, public homogenization_isostrain_id
Definition: material.f90:87
material::kinematics_cleavage_opening_label
character(len= *), parameter, public kinematics_cleavage_opening_label
Definition: material.f90:25
material::thermal_isothermal_label
character(len= *), parameter, public thermal_isothermal_label
Definition: material.f90:25
material::plasticity_phenopowerlaw_id
@, public plasticity_phenopowerlaw_id
Definition: material.f90:87
material::phase_localplasticity
logical, dimension(:), allocatable, public, protected phase_localplasticity
flags phases with local constitutive law
Definition: material.f90:152
io
input/output functions, partly depending on chosen solver
Definition: IO.f90:12
material::damage_typeinstance
integer, dimension(:), allocatable, public, protected damage_typeinstance
instance of particular type of each nonlocal damage
Definition: material.f90:113
config::config_name_texture
character(len=pstringlen), dimension(:), allocatable, public, protected config_name_texture
name of each texture
Definition: config.f90:34
material::phase_plasticityinstance
integer, dimension(:), allocatable, public, protected phase_plasticityinstance
instance of particular plasticity of each phase
Definition: material.f90:113
material::plasticity_none_label
character(len= *), parameter, public plasticity_none_label
Definition: material.f90:25
debug::debug_levelbasic
integer, parameter, public debug_levelbasic
Definition: debug.f90:19
prec::preal
integer, parameter preal
number with 15 significant digits, up to 1e+-307 (typically 64 bit)
Definition: prec.f90:20
debug
Reading in and interpretating the debugging settings for the various modules.
Definition: debug.f90:12
material::kinematics_slipplane_opening_id
@, public kinematics_slipplane_opening_id
Definition: material.f90:87
material::material_allocatesourcestate
subroutine, public material_allocatesourcestate(phase, of, NipcMyPhase, sizeState, sizeDotState, sizeDeltaState)
allocates the source state of a phase
Definition: material.f90:750
material::phase_kinematics
integer(kind(source_undefined_id)), dimension(:,:), allocatable, public, protected phase_kinematics
active kinematic mechanisms of each phase
Definition: material.f90:105
config::config_texture
type(tpartitionedstringlist), dimension(:), allocatable, public, protected config_texture
Definition: config.f90:23
material::source_damage_anisobrittle_id
@, public source_damage_anisobrittle_id
Definition: material.f90:87
material::phase_nstiffnessdegradations
integer, dimension(:), allocatable, public, protected phase_nstiffnessdegradations
number of stiffness degradation mechanisms active in each phase
Definition: material.f90:113
config::config_name_homogenization
character(len=pstringlen), dimension(:), allocatable, public, protected config_name_homogenization
name of each homogenization
Definition: config.f90:34
results::results_mapping_constituent
subroutine, public results_mapping_constituent(phaseAt, memberAtLocal, label)
adds the unique mapping from spatial position and constituent ID to results
Definition: results.f90:493
material::thermalstate
type(tstate), dimension(:), allocatable, public thermalstate
Definition: material.f90:141
material::elasticity_hooke_label
character(len= *), parameter, public elasticity_hooke_label
Definition: material.f90:25
prec::dneq
logical elemental pure function dneq(a, b, tol)
inequality comparison for float with double precision
Definition: prec.f90:146
material::source_damage_anisobrittle_label
character(len= *), parameter, public source_damage_anisobrittle_label
Definition: material.f90:25
material::damage_none_id
@, public damage_none_id
Definition: material.f90:87
debug::debug_levelextensive
integer, parameter, public debug_levelextensive
Definition: debug.f90:19
prec::group_float
variable length datatype used for storage of state
Definition: prec.f90:33
material::damage_nonlocal_label
character(len= *), parameter, public damage_nonlocal_label
Definition: material.f90:25
material::thermal_typeinstance
integer, dimension(:), allocatable, public, protected thermal_typeinstance
instance of particular type of each thermal transport
Definition: material.f90:113
prec::tstate
Definition: prec.f90:42
material::elasticity_undefined_id
@ elasticity_undefined_id
Definition: material.f90:87
io::io_intvalue
integer function, public io_intvalue(string, chunkPos, myChunk)
reads integer value at myChunk from string
Definition: IO.f90:252
material::stiffness_degradation_damage_label
character(len= *), parameter, public stiffness_degradation_damage_label
Definition: material.f90:25
results::results_openjobfile
subroutine, public results_openjobfile
opens the results file to append data
Definition: results.f90:92
results
Definition: results.f90:11
material::stiffness_degradation_damage_id
@, public stiffness_degradation_damage_id
Definition: material.f90:87
material::plasticity_disloucla_id
@, public plasticity_disloucla_id
Definition: material.f90:87
material::material_homogenizationat
integer, dimension(:), allocatable, public, protected material_homogenizationat
homogenization ID of each element (copy of discretization_homogenizationAt)
Definition: material.f90:128
material::material_nphase
integer, public, protected material_nphase
number of phases
Definition: material.f90:101
material::material_init
subroutine, public material_init
parses material configuration file
Definition: material.f90:217
material::kinematics_slipplane_opening_label
character(len= *), parameter, public kinematics_slipplane_opening_label
Definition: material.f90:25
material::plasticstate
type(tplasticstate), dimension(:), allocatable, public plasticstate
Definition: material.f90:137
math
Mathematical library, including random number generation and tensor representations.
Definition: math.f90:12
material::source_damage_anisoductile_label
character(len= *), parameter, public source_damage_anisoductile_label
Definition: material.f90:25
material::plasticity_dislotwin_label
character(len= *), parameter, public plasticity_dislotwin_label
Definition: material.f90:25
material::stiffness_degradation_undefined_id
@ stiffness_degradation_undefined_id
Definition: material.f90:87
config::config_microstructure
type(tpartitionedstringlist), dimension(:), allocatable, public, protected config_microstructure
Definition: config.f90:23
material::material_nhomogenization
integer, public, protected material_nhomogenization
number of homogenizations
Definition: material.f90:101
material::kinematics_cleavage_opening_id
@, public kinematics_cleavage_opening_id
Definition: material.f90:87
material::plasticity_nonlocal_label
character(len= *), parameter, public plasticity_nonlocal_label
Definition: material.f90:25
material::kinematics_thermal_expansion_label
character(len= *), parameter, public kinematics_thermal_expansion_label
Definition: material.f90:25
material::plasticity_nonlocal_id
@, public plasticity_nonlocal_id
Definition: material.f90:87
discretization::discretization_nelem
integer, public, protected discretization_nelem
Definition: discretization.f90:17
material::plasticity_kinehardening_id
@, public plasticity_kinehardening_id
Definition: material.f90:87
material::damage_none_label
character(len= *), parameter, public damage_none_label
Definition: material.f90:25
discretization::discretization_microstructureat
integer, dimension(:), allocatable, public, protected discretization_microstructureat
Definition: discretization.f90:21
material::material_texture
integer, dimension(:,:,:), allocatable, public, protected material_texture
texture (index) of each grain,IP,element. Only used by plastic_nonlocal
Definition: material.f90:146
material::phase_source
integer(kind(source_undefined_id)), dimension(:,:), allocatable, public, protected phase_source
active sources mechanisms of each phase
Definition: material.f90:105
material::material_homogenizationmemberat
integer, dimension(:,:), allocatable, target, public material_homogenizationmemberat
position of the element within its homogenization instance
Definition: material.f90:130
material::material_parsehomogenization
subroutine material_parsehomogenization
parses the homogenization part from the material configuration
Definition: material.f90:374
material::homogenization_type
integer(kind(homogenization_undefined_id)), dimension(:), allocatable, public, protected homogenization_type
type of each homogenization
Definition: material.f90:98
material::phase_stiffnessdegradation
integer(kind(source_undefined_id)), dimension(:,:), allocatable, public, protected phase_stiffnessdegradation
active stiffness degradation mechanisms of each phase
Definition: material.f90:105
io::io_stringvalue
character(len=:) function, allocatable, public io_stringvalue(string, chunkPos, myChunk)
reads string value at myChunk from string
Definition: IO.f90:232
material::phase_nsources
integer, dimension(:), allocatable, public, protected phase_nsources
number of source mechanisms active in each phase
Definition: material.f90:113
material::plasticity_disloucla_label
character(len= *), parameter, public plasticity_disloucla_label
Definition: material.f90:25
material::plasticity_phenopowerlaw_label
character(len= *), parameter, public plasticity_phenopowerlaw_label
Definition: material.f90:25
material::damage
type(group_float), dimension(:), allocatable, public damage
damage field
Definition: material.f90:174
prec::tplasticstate
Definition: prec.f90:65
material::thermal_adiabatic_label
character(len= *), parameter, public thermal_adiabatic_label
Definition: material.f90:25
material::damage_type
integer(kind(damage_none_id)), dimension(:), allocatable, public, protected damage_type
nonlocal damage model
Definition: material.f90:96
prec::tsourcestate
Definition: prec.f90:73
numerics
Managing of parameters related to numerics.
Definition: numerics.f90:10
material::temperaturerate
type(group_float), dimension(:), allocatable, public temperaturerate
temperature change rate field
Definition: material.f90:174
material::microstructure_nconstituents
integer, dimension(:), allocatable, private microstructure_nconstituents
number of constituents in each microstructure
Definition: material.f90:155
material::source_damage_anisoductile_id
@, public source_damage_anisoductile_id
Definition: material.f90:87
material::plasticity_none_id
@, public plasticity_none_id
Definition: material.f90:87
material::source_damage_isoductile_label
character(len= *), parameter, public source_damage_isoductile_label
Definition: material.f90:25
config::config_homogenization
type(tpartitionedstringlist), dimension(:), allocatable, public, protected config_homogenization
Definition: config.f90:23
material::homogenization_rgc_id
@, public homogenization_rgc_id
Definition: material.f90:87
material::homogenization_none_id
@, public homogenization_none_id
Definition: material.f90:87
io::io_floatvalue
real(preal) function, public io_floatvalue(string, chunkPos, myChunk)
reads float value at myChunk from string
Definition: IO.f90:266
material::thermal_conduction_id
@, public thermal_conduction_id
Definition: material.f90:87
material::material_parsephase
subroutine material_parsephase
parses the phase part in the material configuration file
Definition: material.f90:522
material::homogenization_isostrain_label
character(len= *), parameter, public homogenization_isostrain_label
Definition: material.f90:25
material::source_thermal_dissipation_label
character(len= *), parameter, public source_thermal_dissipation_label
Definition: material.f90:25