From fe3bc1f8eead6893881daa42a96ec15c85fea9cf Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 19 Jul 2021 20:13:53 +0200 Subject: [PATCH 1/4] [skip ci] updated version information after successful test of v3.0.0-alpha4-112-gb36da7378 --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index 862500995..469c1d14b 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha4-94-g63fee141b +v3.0.0-alpha4-112-gb36da7378 From b98819a36c0475dc7f98cc4112e56c257d65e7f4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 20 Jul 2021 18:14:19 +0200 Subject: [PATCH 2/4] adjusting names --- PRIVATE | 2 +- examples/config/numerics.yaml | 1 - .../phase/damage/anisobrittle_cubic.yaml | 2 +- .../phase/damage/isobrittle_generic.yaml | 2 +- src/homogenization.f90 | 9 --------- src/homogenization_damage.f90 | 11 ++-------- src/phase_damage.f90 | 20 +++++++++---------- 7 files changed, 15 insertions(+), 32 deletions(-) diff --git a/PRIVATE b/PRIVATE index 8fec909d1..a949f5417 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 8fec909d1931b092b223b0560dd30c3339c6e5a7 +Subproject commit a949f5417762bddc551bf99f19a26ea2bdb4e5b4 diff --git a/examples/config/numerics.yaml b/examples/config/numerics.yaml index 72fbe82a2..4363b97cc 100644 --- a/examples/config/numerics.yaml +++ b/examples/config/numerics.yaml @@ -79,6 +79,5 @@ commercialFEM: unitlength: 1 # physical length of one computational length unit generic: - charLength: 1.0 # characteristic length scale for gradient problems. random_seed: 0 # fixed seeding for pseudo-random number generator, Default 0: use random seed. residualStiffness: 1.0e-6 # non-zero residual damage. diff --git a/examples/config/phase/damage/anisobrittle_cubic.yaml b/examples/config/phase/damage/anisobrittle_cubic.yaml index 5320a4aa9..41f64efcf 100644 --- a/examples/config/phase/damage/anisobrittle_cubic.yaml +++ b/examples/config/phase/damage/anisobrittle_cubic.yaml @@ -7,5 +7,5 @@ q: 20 output: [f_phi] -K_11: 1.0 +D_11: 1.0 mu: 0.001 diff --git a/examples/config/phase/damage/isobrittle_generic.yaml b/examples/config/phase/damage/isobrittle_generic.yaml index a7c30ff1e..95c0e8b61 100644 --- a/examples/config/phase/damage/isobrittle_generic.yaml +++ b/examples/config/phase/damage/isobrittle_generic.yaml @@ -3,5 +3,5 @@ W_crit: 1400000.0 output: [f_phi] -K_11: 1.0 +D_11: 1.0 mu: 0.001 diff --git a/src/homogenization.f90 b/src/homogenization.f90 index fc5dd7bda..924e45989 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -41,15 +41,6 @@ module homogenization integer(kind(DAMAGE_none_ID)), dimension(:), allocatable :: & damage_type !< nonlocal damage model - type, private :: tNumerics_damage - real(pReal) :: & - charLength !< characteristic length scale for gradient problems - end type tNumerics_damage - - type(tNumerics_damage), private :: & - num_damage - - logical, public :: & terminallyIll = .false. !< at least one material point is terminally ill diff --git a/src/homogenization_damage.f90 b/src/homogenization_damage.f90 index f95322bfe..251cc72dc 100644 --- a/src/homogenization_damage.f90 +++ b/src/homogenization_damage.f90 @@ -37,8 +37,7 @@ module subroutine damage_init() class(tNode), pointer :: & configHomogenizations, & configHomogenization, & - configHomogenizationDamage, & - num_generic + configHomogenizationDamage integer :: ho,Nmembers @@ -70,11 +69,6 @@ module subroutine damage_init() end associate enddo -!------------------------------------------------------------------------------------ -! read numerics parameter - num_generic => config_numerics%get('generic',defaultVal= emptyDict) - num_damage%charLength = num_generic%get_asFloat('charLength',defaultVal=1.0_pReal) - call pass_init() end subroutine damage_init @@ -119,8 +113,7 @@ module function homogenization_K_phi(ce) result(K) real(pReal), dimension(3,3) :: K - K = phase_K_phi(1,ce) & - * num_damage%charLength**2 + K = phase_K_phi(1,ce) end function homogenization_K_phi diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index 172f6f22a..e749a7fa0 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -5,7 +5,7 @@ submodule(phase) damage type :: tDamageParameters real(pReal) :: mu = 0.0_pReal !< viscosity - real(pReal), dimension(3,3) :: K = 0.0_pReal !< conductivity/diffusivity + real(pReal), dimension(3,3) :: D = 0.0_pReal !< conductivity/diffusivity end type tDamageParameters enum, bind(c); enumerator :: & @@ -18,7 +18,7 @@ submodule(phase) damage type :: tDataContainer - real(pReal), dimension(:), allocatable :: phi, d_phi_d_dot_phi + real(pReal), dimension(:), allocatable :: phi end type tDataContainer integer(kind(DAMAGE_UNDEFINED_ID)), dimension(:), allocatable :: & @@ -97,7 +97,6 @@ module subroutine damage_init Nmembers = count(material_phaseID == ph) allocate(current(ph)%phi(Nmembers),source=1.0_pReal) - allocate(current(ph)%d_phi_d_dot_phi(Nmembers),source=0.0_pReal) phase => phases%get(ph) sources => phase%get('damage',defaultVal=emptyList) @@ -105,10 +104,10 @@ module subroutine damage_init if (sources%length == 1) then damage_active = .true. source => sources%get(1) - param(ph)%mu = source%get_asFloat('mu',defaultVal=0.0_pReal) ! ToDo: make mandatory? - param(ph)%K(1,1) = source%get_asFloat('K_11',defaultVal=0.0_pReal) ! ToDo: make mandatory? - param(ph)%K(3,3) = source%get_asFloat('K_33',defaultVal=0.0_pReal) ! ToDo: depends on symmetry - param(ph)%K = lattice_applyLatticeSymmetry33(param(ph)%K,phase_lattice(ph)) + param(ph)%mu = source%get_asFloat('mu') + param(ph)%D(1,1) = source%get_asFloat('D_11') + if (any(phase_lattice(ph) == ['hP','tI'])) param(ph)%D(3,3) = source%get_asFloat('D_33') + param(ph)%D = lattice_applyLatticeSymmetry33(param(ph)%D,phase_lattice(ph)) endif enddo @@ -385,9 +384,10 @@ module function phase_K_phi(co,ce) result(K) integer, intent(in) :: co, ce real(pReal), dimension(3,3) :: K - - - K = crystallite_push33ToRef(co,ce,param(material_phaseID(co,ce))%K) + real(pReal), parameter :: l = 1.0_pReal + + K = crystallite_push33ToRef(co,ce,param(material_phaseID(co,ce))%D) \ + * l**2.0_pReal end function phase_K_phi From 575c84ad86b3b4ea02ef1e515dfe0cc174f76268 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 20 Jul 2021 20:01:14 +0200 Subject: [PATCH 3/4] [skip ci] updated version information after successful test of v3.0.0-alpha4-114-gb98819a36 --- python/damask/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/damask/VERSION b/python/damask/VERSION index 469c1d14b..7c2b718dc 100644 --- a/python/damask/VERSION +++ b/python/damask/VERSION @@ -1 +1 @@ -v3.0.0-alpha4-112-gb36da7378 +v3.0.0-alpha4-114-gb98819a36 From 6f1911307258dca7bbf75397a77219dce54924fd Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 21 Jul 2021 06:19:04 +0200 Subject: [PATCH 4/4] L, P, F, etc. are second order tensors --- PRIVATE | 2 +- src/grid/DAMASK_grid.f90 | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/PRIVATE b/PRIVATE index a949f5417..174ecac2d 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit a949f5417762bddc551bf99f19a26ea2bdb4e5b4 +Subproject commit 174ecac2d3ab7596bdb60184d6bb9e1a52cb7378 diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index e98b2d818..9c31b6f26 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -482,20 +482,13 @@ subroutine getMaskedTensor(values,mask,tensor) values = 0.0 - if (tensor%length == 9) then ! temporary support for deprecated 1D tensor - do i = 1,9 - mask((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asString(i) /= 'x' - if (mask((i-1)/3+1,mod(i-1,3)+1)) values((i-1)/3+1,mod(i-1,3)+1) = tensor%get_asFloat(i) + do i = 1,3 + row => tensor%get(i) + do j = 1,3 + mask(i,j) = row%get_asString(j) /= 'x' + if (mask(i,j)) values(i,j) = row%get_asFloat(j) enddo - else - do i = 1,3 - row => tensor%get(i) - do j = 1,3 - mask(i,j) = row%get_asString(j) /= 'x' ! ToDo change to np.masked behavior - if (mask(i,j)) values(i,j) = row%get_asFloat(j) - enddo - enddo - endif + enddo end subroutine