From b76f499c45d595641238bd034c4dcb6cc60ecef9 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 10 Apr 2016 15:52:43 +0100 Subject: [PATCH 1/3] Li and its tangent in isotropic returned undefined values for (default) J2 behavior, set mandatory parameters to NaN when initializing for faster dying --- code/plastic_isotropic.f90 | 45 +++++++++++++++++++------------------- code/plastic_j2.f90 | 13 ----------- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/code/plastic_isotropic.f90 b/code/plastic_isotropic.f90 index 81d3055cf..132a0abb1 100644 --- a/code/plastic_isotropic.f90 +++ b/code/plastic_isotropic.f90 @@ -7,14 +7,11 @@ !! untextured polycrystal !-------------------------------------------------------------------------------------------------- module plastic_isotropic -#ifdef HDF - use hdf5, only: & - HID_T -#endif use prec, only: & pReal,& - pInt + pInt, & + DAMASK_NaN implicit none private @@ -40,20 +37,20 @@ module plastic_isotropic integer(kind(undefined_ID)), allocatable, dimension(:) :: & outputID real(pReal) :: & - fTaylor, & - tau0, & - gdot0, & - n, & - h0, & - h0_slopeLnRate, & - tausat, & - a, & - aTolFlowstress, & - aTolShear , & - tausat_SinhFitA=0.0_pReal, & - tausat_SinhFitB=0.0_pReal, & - tausat_SinhFitC=0.0_pReal, & - tausat_SinhFitD=0.0_pReal + fTaylor = DAMASK_NaN, & + tau0 = DAMASK_NaN, & + gdot0 = DAMASK_NaN, & + n = DAMASK_NaN, & + h0 = DAMASK_NaN, & + h0_slopeLnRate = 0.0_pReal, & + tausat = DAMASK_NaN, & + a = DAMASK_NaN, & + aTolFlowstress = 1.0_pReal, & + aTolShear = 1.0e-6_pReal, & + tausat_SinhFitA= 0.0_pReal, & + tausat_SinhFitB= 0.0_pReal, & + tausat_SinhFitC= 0.0_pReal, & + tausat_SinhFitD= 0.0_pReal logical :: & dilatation = .false. end type @@ -474,7 +471,8 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar_3333,Tstar_v,ipc,ip,e implicit none real(pReal), dimension(3,3), intent(out) :: & Li !< plastic velocity gradient - + real(pReal), dimension(3,3,3,3), intent(out) :: & + dLi_dTstar_3333 !< derivative of Li with respect to Tstar as 4th order tensor real(pReal), dimension(6), intent(in) :: & Tstar_v !< 2nd Piola Kirchhoff stress tensor in Mandel notation integer(pInt), intent(in) :: & @@ -484,9 +482,7 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar_3333,Tstar_v,ipc,ip,e real(pReal), dimension(3,3) :: & Tstar_sph_33 !< sphiatoric part of the 2nd Piola Kirchhoff stress tensor as 2nd order tensor - real(pReal), dimension(3,3,3,3), intent(out) :: & - dLi_dTstar_3333 !< derivative of Li with respect to Tstar as 4th order tensor - real(pReal) :: & +real(pReal) :: & gamma_dot, & !< strainrate norm_Tstar_sph, & !< euclidean norm of Tstar_sph squarenorm_Tstar_sph !< square of the euclidean norm of Tstar_sph @@ -523,6 +519,9 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar_3333,Tstar_v,ipc,ip,e dLi_dTstar_3333 = gamma_dot / param(instance)%fTaylor * & dLi_dTstar_3333 / norm_Tstar_sph endif + else + Li = 0.0_pReal + dLi_dTstar_3333 = 0.0_pReal endif end subroutine plastic_isotropic_LiAndItsTangent diff --git a/code/plastic_j2.f90 b/code/plastic_j2.f90 index 4d247677b..4138aea25 100644 --- a/code/plastic_j2.f90 +++ b/code/plastic_j2.f90 @@ -207,9 +207,6 @@ subroutine plastic_j2_init(fileUnit) phase = phase + 1_pInt ! advance section counter if (phase_plasticity(phase) == PLASTICITY_J2_ID) then instance = phase_plasticityInstance(phase) -#ifdef HDF - outID(instance)=HDF5_addGroup(str1,tempResults) -#endif endif cycle ! skip to next line endif @@ -226,21 +223,11 @@ subroutine plastic_j2_init(fileUnit) plastic_j2_outputID(plastic_j2_Noutput(instance),instance) = flowstress_ID plastic_j2_output(plastic_j2_Noutput(instance),instance) = & IO_lc(IO_stringValue(line,chunkPos,2_pInt)) -#ifdef HDF - call HDF5_addScalarDataset(outID(instance),myConstituents,'flowstress','MPa') - allocate(plastic_j2_Output2(instance)%flowstress(myConstituents)) - plastic_j2_Output2(instance)%flowstressActive = .true. -#endif case ('strainrate') plastic_j2_Noutput(instance) = plastic_j2_Noutput(instance) + 1_pInt plastic_j2_outputID(plastic_j2_Noutput(instance),instance) = strainrate_ID plastic_j2_output(plastic_j2_Noutput(instance),instance) = & IO_lc(IO_stringValue(line,chunkPos,2_pInt)) -#ifdef HDF - call HDF5_addScalarDataset(outID(instance),myConstituents,'strainrate','1/s') - allocate(plastic_j2_Output2(instance)%strainrate(myConstituents)) - plastic_j2_Output2(instance)%strainrateActive = .true. -#endif case default end select From 63386ed732795beb1b3be08b053bebbac43577d0 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 11 Apr 2016 04:20:06 +0200 Subject: [PATCH 2/3] updated version information after successful test of v2.0.0-93-g0ddc29d --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 690c6cb1d..7d1fa0440 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0-43-ge39441f +v2.0.0-93-g0ddc29d From d278d86f9d5e8ff1d8d8428dc793d51cac527a50 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 11 Apr 2016 13:24:43 +0200 Subject: [PATCH 3/3] long line --- processing/post/addSchmidfactors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/processing/post/addSchmidfactors.py b/processing/post/addSchmidfactors.py index 71040cbdc..5a08024fc 100755 --- a/processing/post/addSchmidfactors.py +++ b/processing/post/addSchmidfactors.py @@ -239,7 +239,9 @@ for name in filenames: # ------------------------------------------ assemble header --------------------------------------- table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:])) - table.labels_append(['{id}_S[{direction[0]:.1g}_{direction[1]:.1g}_{direction[2]:.1g}]({normal[0]:.1g}_{normal[1]:.1g}_{normal[2]:.1g})'\ + table.labels_append(['{id}_' + 'S[{direction[0]:.1g}_{direction[1]:.1g}_{direction[2]:.1g}]' + '({normal[0]:.1g}_{normal[1]:.1g}_{normal[2]:.1g})'\ .format( id = i+1, normal = theNormal, direction = theDirection,