From 1808b37357ed53180b1092dbd1a2e11e1d19b354 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 25 Nov 2018 11:17:12 +0100 Subject: [PATCH 01/13] can be easily computed during postprocessing --- src/plastic_phenopowerlaw.f90 | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index 57d48d109..0e85a65c9 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -24,12 +24,10 @@ module plastic_phenopowerlaw accumulatedshear_slip_ID, & shearrate_slip_ID, & resolvedstress_slip_ID, & - totalshear_ID, & resistance_twin_ID, & accumulatedshear_twin_ID, & shearrate_twin_ID, & - resolvedstress_twin_ID, & - totalvolfrac_twin_ID + resolvedstress_twin_ID end enum type, private :: tParameters @@ -338,12 +336,6 @@ subroutine plastic_phenopowerlaw_init outputID = merge(resolvedstress_twin_ID,undefined_ID,prm%totalNtwin>0_pInt) outputSize = prm%totalNtwin - case ('totalshear') - outputID = merge(totalshear_ID,undefined_ID,prm%totalNslip>0_pInt) - outputSize = 1_pInt - case ('totalvolfrac_twin') - outputID = merge(totalvolfrac_twin_ID,undefined_ID,prm%totalNtwin>0_pInt) - outputSize = 1_pInt end select if (outputID /= undefined_ID) then @@ -732,13 +724,6 @@ function plastic_phenopowerlaw_postResults(Mp,instance,of) result(postResults) enddo c = c + prm%totalNtwin - case (totalshear_ID) - postResults(c+1_pInt) = stt%sumGamma(of) - c = c + 1_pInt - case (totalvolfrac_twin_ID) - postResults(c+1_pInt) = stt%sumF(of) - c = c + 1_pInt - end select enddo outputsLoop end associate From 8a253856f1262b10bad16bd71b74c51f25c23407 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 25 Nov 2018 15:38:14 +0100 Subject: [PATCH 02/13] no need to perform the state integration --- src/plastic_phenopowerlaw.f90 | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index 0e85a65c9..c777bff8c 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -79,7 +79,6 @@ module plastic_phenopowerlaw type, private :: tPhenopowerlawState real(pReal), pointer, dimension(:) :: & - sumGamma, & ! ToDo: why not make a dependent state? sumF ! ToDo: why not make a dependent state? real(pReal), pointer, dimension(:,:) :: & xi_slip, & @@ -351,7 +350,7 @@ subroutine plastic_phenopowerlaw_init NipcMyPhase = count(material_phase == p) ! number of IPCs containing my phase sizeState = size(['tau_slip ','gamma_slip']) * prm%TotalNslip & + size(['tau_twin ','gamma_twin']) * prm%TotalNtwin & - + size(['sum(gamma)','sum(f) ']) ! ToDo: only needed if either twin or slip active! + + size(['sum(f) ']) ! ToDo: only needed if either twin or slip active! sizeDotState = sizeState call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0_pInt, & @@ -375,12 +374,6 @@ subroutine plastic_phenopowerlaw_init dot%xi_twin => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%aTolState(startIndex:endIndex) = prm%aTolResistance - startIndex = endIndex + 1_pInt - endIndex = endIndex + 1_pInt - stt%sumGamma => plasticState(p)%state (startIndex,:) - dot%sumGamma => plasticState(p)%dotState(startIndex,:) - plasticState(p)%aTolState(startIndex:endIndex) = prm%aTolShear - startIndex = endIndex + 1_pInt endIndex = endIndex + 1_pInt stt%sumF=>plasticState(p)%state (startIndex,:) @@ -482,7 +475,7 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) i real(pReal) :: & c_SlipSlip,c_TwinSlip,c_TwinTwin, & - xi_slip_sat_offset + xi_slip_sat_offset,sumGamma real(pReal), dimension(param(instance)%totalNslip) :: & left_SlipSlip,right_SlipSlip, & @@ -494,11 +487,12 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) associate(prm => param(instance), stt => state(instance), dot => dotState(instance)) dot%whole(:,of) = 0.0_pReal + sumGamma = sum(stt%gamma_slip(:,of)) !-------------------------------------------------------------------------------------------------- ! system-independent (nonlinear) prefactors to M_Xx (X influenced by x) matrices c_SlipSlip = prm%h0_slipslip * (1.0_pReal + prm%twinC*stt%sumF(of)** prm%twinB) - c_TwinSlip = prm%h0_TwinSlip * stt%sumGamma(of)**prm%twinE + c_TwinSlip = prm%h0_TwinSlip * sumGamma**prm%twinE c_TwinTwin = prm%h0_TwinTwin * stt%sumF(of)**prm%twinD !-------------------------------------------------------------------------------------------------- @@ -512,7 +506,6 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) ! shear rates call kinetics_slip(prm,stt,of,Mp,gdot_slip_pos,gdot_slip_neg) dot%gamma_slip(:,of) = abs(gdot_slip_pos+gdot_slip_neg) - dot%sumGamma(of) = sum(dot%gamma_slip(:,of)) call kinetics_twin(prm,stt,of,Mp,dot%gamma_twin(:,of)) if (prm%totalNtwin > 0_pInt) dot%sumF(of) = merge(sum(dot%gamma_twin(:,of)/prm%gamma_twin_char), & 0.0_pReal, & From 7cc2892e646eb25dc61953d3e85e7ec31ad9fab0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 25 Nov 2018 16:14:46 +0100 Subject: [PATCH 03/13] no need to calculate twinned volume fraction as state --- src/plastic_phenopowerlaw.f90 | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index c777bff8c..c2f5edb68 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -78,8 +78,6 @@ module plastic_phenopowerlaw type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance) type, private :: tPhenopowerlawState - real(pReal), pointer, dimension(:) :: & - sumF ! ToDo: why not make a dependent state? real(pReal), pointer, dimension(:,:) :: & xi_slip, & xi_twin, & @@ -349,8 +347,7 @@ subroutine plastic_phenopowerlaw_init ! allocate state arrays NipcMyPhase = count(material_phase == p) ! number of IPCs containing my phase sizeState = size(['tau_slip ','gamma_slip']) * prm%TotalNslip & - + size(['tau_twin ','gamma_twin']) * prm%TotalNtwin & - + size(['sum(f) ']) ! ToDo: only needed if either twin or slip active! + + size(['tau_twin ','gamma_twin']) * prm%TotalNtwin sizeDotState = sizeState call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0_pInt, & @@ -374,12 +371,6 @@ subroutine plastic_phenopowerlaw_init dot%xi_twin => plasticState(p)%dotState(startIndex:endIndex,:) plasticState(p)%aTolState(startIndex:endIndex) = prm%aTolResistance - startIndex = endIndex + 1_pInt - endIndex = endIndex + 1_pInt - stt%sumF=>plasticState(p)%state (startIndex,:) - dot%sumF=>plasticState(p)%dotState(startIndex,:) - plasticState(p)%aTolState(startIndex:endIndex) = prm%aTolTwinFrac - startIndex = endIndex + 1_pInt endIndex = endIndex + prm%totalNslip stt%gamma_slip => plasticState(p)%state (startIndex:endIndex,:) @@ -439,7 +430,8 @@ subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of) call kinetics_slip(prm,stt,of,Mp,gdot_slip_pos,gdot_slip_neg,dgdot_dtauslip_pos,dgdot_dtauslip_neg) slipSystems: do i = 1_pInt, prm%totalNslip - Lp = Lp + (1.0_pReal-stt%sumF(of))*(gdot_slip_pos(i)+gdot_slip_neg(i))*prm%Schmid_slip(1:3,1:3,i) + Lp = Lp + (1.0_pReal- sum(stt%gamma_twin(:,of)/prm%gamma_twin_char)) & ! only shear in untwinned volume + * (gdot_slip_pos(i)+gdot_slip_neg(i))*prm%Schmid_slip(1:3,1:3,i) forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) & dLp_dMp(k,l,m,n) = dLp_dMp(k,l,m,n) & + dgdot_dtauslip_pos(i) * prm%Schmid_slip(k,l,i) * prm%nonSchmid_pos(m,n,i) & @@ -475,8 +467,8 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) i real(pReal) :: & c_SlipSlip,c_TwinSlip,c_TwinTwin, & - xi_slip_sat_offset,sumGamma - + xi_slip_sat_offset,& + sumGamma,sumF real(pReal), dimension(param(instance)%totalNslip) :: & left_SlipSlip,right_SlipSlip, & gdot_slip_pos,gdot_slip_neg @@ -488,17 +480,18 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) dot%whole(:,of) = 0.0_pReal sumGamma = sum(stt%gamma_slip(:,of)) + sumF = sum(stt%gamma_twin(:,of)/prm%gamma_twin_char) !-------------------------------------------------------------------------------------------------- ! system-independent (nonlinear) prefactors to M_Xx (X influenced by x) matrices - c_SlipSlip = prm%h0_slipslip * (1.0_pReal + prm%twinC*stt%sumF(of)** prm%twinB) + c_SlipSlip = prm%h0_slipslip * (1.0_pReal + prm%twinC*sumF** prm%twinB) c_TwinSlip = prm%h0_TwinSlip * sumGamma**prm%twinE - c_TwinTwin = prm%h0_TwinTwin * stt%sumF(of)**prm%twinD + c_TwinTwin = prm%h0_TwinTwin * sumF**prm%twinD !-------------------------------------------------------------------------------------------------- ! calculate left and right vectors left_SlipSlip = 1.0_pReal + prm%H_int - xi_slip_sat_offset = prm%spr*sqrt(stt%sumF(of)) + xi_slip_sat_offset = prm%spr*sqrt(sumF) right_SlipSlip = abs(1.0_pReal-stt%xi_slip(:,of) / (prm%xi_slip_sat+xi_slip_sat_offset)) **prm%a_slip & * sign(1.0_pReal,1.0_pReal-stt%xi_slip(:,of) / (prm%xi_slip_sat+xi_slip_sat_offset)) @@ -507,9 +500,6 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) call kinetics_slip(prm,stt,of,Mp,gdot_slip_pos,gdot_slip_neg) dot%gamma_slip(:,of) = abs(gdot_slip_pos+gdot_slip_neg) call kinetics_twin(prm,stt,of,Mp,dot%gamma_twin(:,of)) - if (prm%totalNtwin > 0_pInt) dot%sumF(of) = merge(sum(dot%gamma_twin(:,of)/prm%gamma_twin_char), & - 0.0_pReal, & - stt%sumF(of) < 0.98_pReal) !-------------------------------------------------------------------------------------------------- ! hardening @@ -605,7 +595,7 @@ end subroutine kinetics_slip !-------------------------------------------------------------------------------------------------- !> @brief calculates shear rates on twin systems and derivatives with respect to resolved stress -!> @details: Shear rates are calculated only optionally. NOTE: Against the common convention, the +!> @details: Derivates are calculated only optionally. NOTE: Against the common convention, the !> result (i.e. intent(out)) variables are the last to have the optional arguments at the end !-------------------------------------------------------------------------------------------------- pure subroutine kinetics_twin(prm,stt,of,Mp,gdot_twin,dgdot_dtau_twin) @@ -637,7 +627,8 @@ pure subroutine kinetics_twin(prm,stt,of,Mp,gdot_twin,dgdot_dtau_twin) enddo where(tau_twin > 0.0_pReal) - gdot_twin = (1.0_pReal-stt%sumF(of))*prm%gdot0_twin*(abs(tau_twin)/stt%xi_twin(:,of))**prm%n_twin + gdot_twin = (1.0_pReal-sum(stt%gamma_twin(:,of)/prm%gamma_twin_char)) & ! only twin in untwinned volume fraction + * prm%gdot0_twin*(abs(tau_twin)/stt%xi_twin(:,of))**prm%n_twin else where gdot_twin = 0.0_pReal end where From 638789b111d1540b6133b8c4449f9d4878d368c7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 25 Nov 2018 16:16:46 +0100 Subject: [PATCH 04/13] totalvolfrac and totalshear don't exist anymore use postprocessing tools if needed --- examples/ConfigFiles/Phase_Phenopowerlaw_Aluminum.config | 1 - examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Ferrite.config | 1 - examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Martensite.config | 1 - examples/ConfigFiles/Phase_Phenopowerlaw_Gold.config | 2 -- examples/ConfigFiles/Phase_Phenopowerlaw_Magnesium.config | 2 -- examples/ConfigFiles/Phase_Phenopowerlaw_cpTi-alpha.config | 2 -- examples/ConfigFiles/Phase_Phenopowerlaw_multiField.config | 2 -- 7 files changed, 11 deletions(-) diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_Aluminum.config b/examples/ConfigFiles/Phase_Phenopowerlaw_Aluminum.config index 63ec8f3c8..938961d8e 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_Aluminum.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_Aluminum.config @@ -6,7 +6,6 @@ plasticity phenopowerlaw (output) shearrate_slip (output) resolvedstress_slip (output) accumulated_shear_slip -(output) totalshear lattice_structure fcc Nslip 12 # per family diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Ferrite.config b/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Ferrite.config index 594c5dc22..87b4e2312 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Ferrite.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Ferrite.config @@ -19,4 +19,3 @@ tausat_slip 222.e6 412.7e6 # per family, optimization long h0_slipslip 1000.0e6 interaction_slipslip 1 1 1.4 1.4 1.4 1.4 w0_slip 2.0 -(output) totalshear diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Martensite.config b/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Martensite.config index c86d516a9..a04f27e7f 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Martensite.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_BCC-Martensite.config @@ -19,4 +19,3 @@ tausat_slip 872.9e6 971.2e6 # per family h0_slipslip 563.0e9 interaction_slipslip 1 1 1.4 1.4 1.4 1.4 a_slip 2.0 -(output) totalshear diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_Gold.config b/examples/ConfigFiles/Phase_Phenopowerlaw_Gold.config index a2e06fc07..bb6f8fc83 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_Gold.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_Gold.config @@ -14,11 +14,9 @@ plasticity phenopowerlaw (output) resistance_slip (output) shearrate_slip (output) resolvedstress_slip -(output) totalshear (output) resistance_twin (output) shearrate_twin (output) resolvedstress_twin -(output) totalvolfrac_twin lattice_structure fcc Nslip 12 # per family diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_Magnesium.config b/examples/ConfigFiles/Phase_Phenopowerlaw_Magnesium.config index ce6b06ff9..137606093 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_Magnesium.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_Magnesium.config @@ -9,11 +9,9 @@ elasticity hooke (output) resistance_slip (output) shearrate_slip (output) resolvedstress_slip -(output) totalshear (output) resistance_twin (output) shearrate_twin (output) resolvedstress_twin -(output) totalvolfrac_twin lattice_structure hex covera_ratio 1.62350 # from Tromans 2011, Elastic Anisotropy of HCP Metal Crystals and Polycrystals diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_cpTi-alpha.config b/examples/ConfigFiles/Phase_Phenopowerlaw_cpTi-alpha.config index 64ecbca25..565cf02d9 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_cpTi-alpha.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_cpTi-alpha.config @@ -5,11 +5,9 @@ elasticity hooke # (output) resistance_slip # (output) shearrate_slip # (output) resolvedstress_slip -# (output) totalshear # (output) resistance_twin # (output) shearrate_twin # (output) resolvedstress_twin -# (output) totalvolfrac_twin lattice_structure hex covera_ratio 1.587 diff --git a/examples/ConfigFiles/Phase_Phenopowerlaw_multiField.config b/examples/ConfigFiles/Phase_Phenopowerlaw_multiField.config index 05503a6e7..adad3710e 100644 --- a/examples/ConfigFiles/Phase_Phenopowerlaw_multiField.config +++ b/examples/ConfigFiles/Phase_Phenopowerlaw_multiField.config @@ -6,12 +6,10 @@ plasticity phenopowerlaw (output) shearrate_slip (output) resolvedstress_slip (output) accumulated_shear_slip -(output) totalshear (output) resistance_twin (output) shearrate_twin (output) resolvedstress_twin (output) accumulated_shear_twin -(output) totalvolfrac_twin lattice_structure fcc Nslip 12 # per family From cf4a0a69fd64b300fe161d314ee170d63386d45f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 26 Nov 2018 09:15:44 +0100 Subject: [PATCH 05/13] Intel compiler detected use of unallocated variable bug was in for a while --- src/plastic_phenopowerlaw.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index c2f5edb68..5fd8d8e3c 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -278,6 +278,7 @@ subroutine plastic_phenopowerlaw_init else twinActive allocate(prm%interaction_TwinTwin(0,0)) allocate(prm%xi_twin_0(0)) + allocate(prm%gamma_twin_char(0)) endif twinActive !-------------------------------------------------------------------------------------------------- From 2349341e25e9b2767e1028215b526db4b27bd1c5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 6 Dec 2018 22:23:34 +0100 Subject: [PATCH 06/13] texture component test also needs a closer look --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 368ca94db..99daef5e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -364,12 +364,12 @@ Phenopowerlaw_singleSlip: - master - release -TextureComponents: - stage: spectral - script: TextureComponents/test.py - except: - - master - - release +#TextureComponents: +# stage: spectral +# script: TextureComponents/test.py +# except: +# - master +# - release ################################################################################################### From 590f83a944a2ad5dac811d0c2f554ab19c507f72 Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 7 Dec 2018 03:32:36 +0100 Subject: [PATCH 07/13] [skip ci] updated version information after successful test of v2.0.2-1122-g2349341e --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 85ef1a02a..3ad5cdbde 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-1107-g17716b4f +v2.0.2-1122-g2349341e From 0ff9e9fa067ab8034634153b2722f1d5c5e91387 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 8 Dec 2018 18:13:16 +0100 Subject: [PATCH 08/13] report CMake should be updated on the homepage also --- DAMASK_prerequisites.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DAMASK_prerequisites.sh b/DAMASK_prerequisites.sh index c9e165c3c..f0a525c34 100755 --- a/DAMASK_prerequisites.sh +++ b/DAMASK_prerequisites.sh @@ -119,6 +119,9 @@ for executable in mpirun mpiexec; do getDetails $executable '--version' done +firstLevel "CMake" +getDetails cmake --version + firstLevel "Abaqus" cd installation/mods_Abaqus # to have the right environment file for executable in abaqus abq2017 abq2018; do From c038dc9f93cdfc69b8ceccb80c62e737e3a9b5ed Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 10 Dec 2018 06:53:20 +0100 Subject: [PATCH 09/13] [skip ci] updated version information after successful test of v2.0.2-1124-g0ff9e9fa --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3ad5cdbde..8817d8cc0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-1122-g2349341e +v2.0.2-1124-g0ff9e9fa From 2aa6b12126b62c9c2d9e282f971877e2f71f36d1 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 12 Dec 2018 16:13:57 +0100 Subject: [PATCH 10/13] IMPORTANT Behavior change: Slip (Lp) happens in twinned volume fraction aliases for associate do not have to be defined --- src/plastic_phenopowerlaw.f90 | 52 ++++++++++++++--------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index 5fd8d8e3c..136fe07e6 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -148,12 +148,6 @@ subroutine plastic_phenopowerlaw_init real(pReal), dimension(0), parameter :: emptyRealArray = [real(pReal)::] character(len=65536), dimension(0), parameter :: emptyStringArray = [character(len=65536)::] - type(tParameters) :: & - prm - type(tPhenopowerlawState) :: & - stt, & - dot - integer(kind(undefined_ID)) :: & outputID !< ID of each post result output @@ -161,7 +155,7 @@ subroutine plastic_phenopowerlaw_init structure = '',& extmsg = '' character(len=65536), dimension(:), allocatable :: & - outputs + outputs write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_PHENOPOWERLAW_label//' init -+>>>' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() @@ -398,6 +392,8 @@ end subroutine plastic_phenopowerlaw_init !-------------------------------------------------------------------------------------------------- !> @brief calculates plastic velocity gradient and its tangent +!> @details asumme that deformation by dislocation glide affects twinned and untwinned volume +! equally (Taylor assumption). Twinning happens only in untwinned volume ( !-------------------------------------------------------------------------------------------------- subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of) @@ -420,19 +416,15 @@ subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of) gdot_slip_pos,gdot_slip_neg real(pReal), dimension(param(instance)%totalNtwin) :: & gdot_twin,dgdot_dtautwin - - type(tParameters) :: prm - type(tPhenopowerlawState) :: stt - - associate(prm => param(instance), stt => state(instance)) - + Lp = 0.0_pReal dLp_dMp = 0.0_pReal - + + associate(prm => param(instance), stt => state(instance)) + call kinetics_slip(prm,stt,of,Mp,gdot_slip_pos,gdot_slip_neg,dgdot_dtauslip_pos,dgdot_dtauslip_neg) slipSystems: do i = 1_pInt, prm%totalNslip - Lp = Lp + (1.0_pReal- sum(stt%gamma_twin(:,of)/prm%gamma_twin_char)) & ! only shear in untwinned volume - * (gdot_slip_pos(i)+gdot_slip_neg(i))*prm%Schmid_slip(1:3,1:3,i) + Lp = Lp + (gdot_slip_pos(i)+gdot_slip_neg(i))*prm%Schmid_slip(1:3,1:3,i) forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) & dLp_dMp(k,l,m,n) = dLp_dMp(k,l,m,n) & + dgdot_dtauslip_pos(i) * prm%Schmid_slip(k,l,i) * prm%nonSchmid_pos(m,n,i) & @@ -446,9 +438,9 @@ subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of) dLp_dMp(k,l,m,n) = dLp_dMp(k,l,m,n) & + dgdot_dtautwin(i)*prm%Schmid_twin(k,l,i)*prm%Schmid_twin(m,n,i) enddo twinSystems + end associate - end subroutine plastic_phenopowerlaw_LpAndItsTangent @@ -474,9 +466,6 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) left_SlipSlip,right_SlipSlip, & gdot_slip_pos,gdot_slip_neg - type(tParameters) :: prm - type(tPhenopowerlawState) :: dot,stt - associate(prm => param(instance), stt => state(instance), dot => dotState(instance)) dot%whole(:,of) = 0.0_pReal @@ -506,7 +495,7 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of) ! hardening hardeningSlip: do i = 1_pInt, prm%totalNslip dot%xi_slip(i,of) = dot_product(prm%interaction_SlipSlip(i,:),right_SlipSlip*dot%gamma_slip(:,of)) & - * c_SlipSlip * left_SlipSlip(i) & + * c_SlipSlip * left_SlipSlip(i) & + dot_product(prm%interaction_SlipTwin(i,:),dot%gamma_twin(:,of)) enddo hardeningSlip @@ -522,8 +511,9 @@ end subroutine plastic_phenopowerlaw_dotState !-------------------------------------------------------------------------------------------------- !> @brief calculates shear rates on slip systems and derivatives with respect to resolved stress -!> @details: Shear rates are calculated only optionally. NOTE: Against the common convention, the -!> result (i.e. intent(out)) variables are the last to have the optional arguments at the end +!> @details Shear rates are calculated only optionally. +! NOTE: Against the common convention, the result (i.e. intent(out)) variables are the last to +! have the optional arguments at the end !-------------------------------------------------------------------------------------------------- pure subroutine kinetics_slip(prm,stt,of,Mp,gdot_slip_pos,gdot_slip_neg, & dgdot_dtau_slip_pos,dgdot_dtau_slip_neg) @@ -595,9 +585,11 @@ end subroutine kinetics_slip !-------------------------------------------------------------------------------------------------- -!> @brief calculates shear rates on twin systems and derivatives with respect to resolved stress -!> @details: Derivates are calculated only optionally. NOTE: Against the common convention, the -!> result (i.e. intent(out)) variables are the last to have the optional arguments at the end +!> @brief calculates shear rates on twin systems and derivatives with respect to resolved stress. +! twinning is assumed to take place only in untwinned volume. +!> @details Derivates are calculated only optionally. +! NOTE: Against the common convention, the result (i.e. intent(out)) variables are the last to +! have the optional arguments at the end. !-------------------------------------------------------------------------------------------------- pure subroutine kinetics_twin(prm,stt,of,Mp,gdot_twin,dgdot_dtau_twin) use prec, only: & @@ -667,13 +659,10 @@ function plastic_phenopowerlaw_postResults(Mp,instance,of) result(postResults) real(pReal), dimension(param(instance)%totalNslip) :: & gdot_slip_pos,gdot_slip_neg - type(tParameters) :: prm - type(tPhenopowerlawState) :: stt - - associate( prm => param(instance), stt => state(instance)) - postResults = 0.0_pReal c = 0_pInt + + associate( prm => param(instance), stt => state(instance)) outputsLoop: do o = 1_pInt,size(prm%outputID) select case(prm%outputID(o)) @@ -711,6 +700,7 @@ function plastic_phenopowerlaw_postResults(Mp,instance,of) result(postResults) end select enddo outputsLoop + end associate end function plastic_phenopowerlaw_postResults From 15f1badb60b915f8eeea60085608a88c4d809b75 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 13 Dec 2018 17:27:45 +0100 Subject: [PATCH 11/13] test with reference solution for modified phenopowerlaw --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 2e0ab3e25..58137906b 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 2e0ab3e2564fea6ac3779623065b47dfc3261ef5 +Subproject commit 58137906b84b6cf0e273dfdde623a2986d03f98e From 4dd064a2753868b2a8bec0d9522ec892a9a9992e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 14 Dec 2018 09:23:52 +0100 Subject: [PATCH 12/13] polishing --- DAMASK_prerequisites.sh | 2 +- src/plastic_phenopowerlaw.f90 | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DAMASK_prerequisites.sh b/DAMASK_prerequisites.sh index f0a525c34..5e96f4aee 100755 --- a/DAMASK_prerequisites.sh +++ b/DAMASK_prerequisites.sh @@ -79,7 +79,7 @@ ls $PETSC_DIR/lib firstLevel "Python" DEFAULT_PYTHON=python3 -for executable in python python2 python3 python2.7; do +for executable in python python3; do getDetails $executable '--version' done secondLevel "Details on $DEFAULT_PYTHON:" diff --git a/src/plastic_phenopowerlaw.f90 b/src/plastic_phenopowerlaw.f90 index 136fe07e6..053fe958b 100644 --- a/src/plastic_phenopowerlaw.f90 +++ b/src/plastic_phenopowerlaw.f90 @@ -53,7 +53,7 @@ module plastic_phenopowerlaw xi_twin_0, & !< initial critical shear stress for twin xi_slip_sat, & !< maximum critical shear stress for slip nonSchmidCoeff, & - H_int, & !< per family hardening activity (optional) !ToDo: Better name! + H_int, & !< per family hardening activity (optional) gamma_twin_char !< characteristic shear for twins real(pReal), allocatable, dimension(:,:) :: & interaction_SlipSlip, & !< slip resistance from slip activity @@ -234,8 +234,8 @@ subroutine plastic_phenopowerlaw_init ! sanity checks if (prm%gdot0_slip <= 0.0_pReal) extmsg = trim(extmsg)//'gdot0_slip ' - if (dEq0(prm%a_slip)) extmsg = trim(extmsg)//'a_slip ' ! ToDo: negative values ok? - if (dEq0(prm%n_slip)) extmsg = trim(extmsg)//'n_slip ' ! ToDo: negative values ok? + if (dEq0(prm%a_slip)) extmsg = trim(extmsg)//'a_slip ' ! ToDo: negative values ok? + if (dEq0(prm%n_slip)) extmsg = trim(extmsg)//'n_slip ' ! ToDo: negative values ok? if (any(prm%xi_slip_0 <= 0.0_pReal)) extmsg = trim(extmsg)//'xi_slip_0 ' if (any(prm%xi_slip_sat < prm%xi_slip_0)) extmsg = trim(extmsg)//'xi_slip_sat ' else slipActive @@ -268,7 +268,7 @@ subroutine plastic_phenopowerlaw_init ! sanity checks if (prm%gdot0_twin <= 0.0_pReal) extmsg = trim(extmsg)//'gdot0_twin ' - if (dEq0(prm%n_twin)) extmsg = trim(extmsg)//'n_twin ' ! ToDo: negative values ok? + if (dEq0(prm%n_twin)) extmsg = trim(extmsg)//'n_twin ' ! ToDo: negative values ok? else twinActive allocate(prm%interaction_TwinTwin(0,0)) allocate(prm%xi_twin_0(0)) @@ -285,8 +285,8 @@ subroutine plastic_phenopowerlaw_init config_phase(p)%getFloats('interaction_twinslip'), & structure(1:3)) else slipAndTwinActive - allocate(prm%interaction_SlipTwin(prm%totalNslip,prm%TotalNtwin)) ! at least one dimension is 0 - allocate(prm%interaction_TwinSlip(prm%totalNtwin,prm%TotalNslip)) ! at least one dimension is 0 + allocate(prm%interaction_SlipTwin(prm%totalNslip,prm%TotalNtwin)) ! at least one dimension is 0 + allocate(prm%interaction_TwinSlip(prm%totalNtwin,prm%TotalNslip)) ! at least one dimension is 0 prm%h0_TwinSlip = 0.0_pReal endif slipAndTwinActive From afe34feff55e1d0b984ba178045e894e4f6e82fb Mon Sep 17 00:00:00 2001 From: Test User Date: Sat, 15 Dec 2018 00:55:09 +0100 Subject: [PATCH 13/13] [skip ci] updated version information after successful test of v2.0.2-1137-g4dd064a2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8817d8cc0..99b9812a2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-1124-g0ff9e9fa +v2.0.2-1137-g4dd064a2