diff --git a/src/phase_mechanical.f90 b/src/phase_mechanical.f90 index db2faf914..37e6fe7bf 100644 --- a/src/phase_mechanical.f90 +++ b/src/phase_mechanical.f90 @@ -5,17 +5,17 @@ submodule(phase) mechanical enum, bind(c); enumerator :: & - PLASTICITY_UNDEFINED_ID, & - PLASTICITY_NONE_ID, & - PLASTICITY_ISOTROPIC_ID, & - PLASTICITY_PHENOPOWERLAW_ID, & - PLASTICITY_KINEHARDENING_ID, & - PLASTICITY_DISLOTWIN_ID, & - PLASTICITY_DISLOTUNGSTEN_ID, & - PLASTICITY_NONLOCAL_ID, & - KINEMATICS_UNDEFINED_ID, & - KINEMATICS_CLEAVAGE_OPENING_ID, & - KINEMATICS_THERMAL_EXPANSION_ID + PLASTIC_UNDEFINED_ID, & + PLASTIC_NONE_ID, & + PLASTIC_ISOTROPIC_ID, & + PLASTIC_PHENOPOWERLAW_ID, & + PLASTIC_KINEHARDENING_ID, & + PLASTIC_DISLOTWIN_ID, & + PLASTIC_DISLOTUNGSTEN_ID, & + PLASTIC_NONLOCAL_ID, & + EIGEN_UNDEFINED_ID, & + EIGEN_CLEAVAGE_OPENING_ID, & + EIGEN_THERMAL_EXPANSION_ID end enum type(tTensorContainer), dimension(:), allocatable :: & @@ -37,7 +37,7 @@ submodule(phase) mechanical phase_mechanical_S0 - integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable :: & + integer(kind(PLASTIC_undefined_ID)), dimension(:), allocatable :: & phase_plasticity !< plasticity of each phase integer :: phase_plasticity_maxSizeDotState @@ -291,7 +291,7 @@ module subroutine mechanical_init(phases) call elastic_init(phases) allocate(plasticState(phases%length)) - allocate(phase_plasticity(phases%length),source = PLASTICITY_undefined_ID) + allocate(phase_plasticity(phases%length),source = PLASTIC_UNDEFINED_ID) call plastic_init() do ph = 1,phases%length plasticState(ph)%state0 = plasticState(ph)%state @@ -340,22 +340,22 @@ module subroutine mechanical_results(group,ph) select case(phase_plasticity(ph)) - case(PLASTICITY_ISOTROPIC_ID) + case(PLASTIC_ISOTROPIC_ID) call plastic_isotropic_results(ph,group//'mechanical/') - case(PLASTICITY_PHENOPOWERLAW_ID) + case(PLASTIC_PHENOPOWERLAW_ID) call plastic_phenopowerlaw_results(ph,group//'mechanical/') - case(PLASTICITY_KINEHARDENING_ID) + case(PLASTIC_KINEHARDENING_ID) call plastic_kinehardening_results(ph,group//'mechanical/') - case(PLASTICITY_DISLOTWIN_ID) + case(PLASTIC_DISLOTWIN_ID) call plastic_dislotwin_results(ph,group//'mechanical/') - case(PLASTICITY_DISLOTUNGSTEN_ID) + case(PLASTIC_DISLOTUNGSTEN_ID) call plastic_dislotungsten_results(ph,group//'mechanical/') - case(PLASTICITY_NONLOCAL_ID) + case(PLASTIC_NONLOCAL_ID) call plastic_nonlocal_results(ph,group//'mechanical/') end select diff --git a/src/phase_mechanical_eigen.f90 b/src/phase_mechanical_eigen.f90 index c73665d17..f0b86319c 100644 --- a/src/phase_mechanical_eigen.f90 +++ b/src/phase_mechanical_eigen.f90 @@ -3,9 +3,9 @@ submodule(phase:mechanical) eigen integer, dimension(:), allocatable :: & Nmodels - integer(kind(KINEMATICS_UNDEFINED_ID)), dimension(:,:), allocatable :: & + integer(kind(EIGEN_UNDEFINED_ID)), dimension(:,:), allocatable :: & model - integer(kind(KINEMATICS_UNDEFINED_ID)), dimension(:), allocatable :: & + integer(kind(EIGEN_UNDEFINED_ID)), dimension(:), allocatable :: & model_damage interface @@ -57,15 +57,15 @@ module subroutine eigen_init(phases) Nmodels(ph) = kinematics%length end do - allocate(model(maxval(Nmodels),phases%length), source = KINEMATICS_undefined_ID) + allocate(model(maxval(Nmodels),phases%length), source = EIGEN_undefined_ID) if (maxval(Nmodels) /= 0) then - where(thermalexpansion_init(maxval(Nmodels))) model = KINEMATICS_thermal_expansion_ID + where(thermalexpansion_init(maxval(Nmodels))) model = EIGEN_thermal_expansion_ID endif - allocate(model_damage(phases%length), source = KINEMATICS_UNDEFINED_ID) + allocate(model_damage(phases%length), source = EIGEN_UNDEFINED_ID) - where(damage_anisobrittle_init()) model_damage = KINEMATICS_cleavage_opening_ID + where(damage_anisobrittle_init()) model_damage = EIGEN_cleavage_opening_ID end subroutine eigen_init @@ -173,7 +173,7 @@ module subroutine phase_LiAndItsTangents(Li, dLi_dS, dLi_dFi, & plasticType: select case (phase_plasticity(ph)) - case (PLASTICITY_isotropic_ID) plasticType + case (PLASTIC_isotropic_ID) plasticType call plastic_isotropic_LiAndItsTangent(my_Li, my_dLi_dS, S ,ph,en) Li = Li + my_Li dLi_dS = dLi_dS + my_dLi_dS @@ -182,7 +182,7 @@ module subroutine phase_LiAndItsTangents(Li, dLi_dS, dLi_dFi, & KinematicsLoop: do k = 1, Nmodels(ph) kinematicsType: select case (model(k,ph)) - case (KINEMATICS_thermal_expansion_ID) kinematicsType + case (EIGEN_thermal_expansion_ID) kinematicsType call thermalexpansion_LiAndItsTangent(my_Li, my_dLi_dS, ph,en) Li = Li + my_Li dLi_dS = dLi_dS + my_dLi_dS @@ -191,7 +191,7 @@ module subroutine phase_LiAndItsTangents(Li, dLi_dS, dLi_dFi, & end do KinematicsLoop select case (model_damage(ph)) - case (KINEMATICS_cleavage_opening_ID) + case (EIGEN_cleavage_opening_ID) call damage_anisobrittle_LiAndItsTangent(my_Li, my_dLi_dS, S, ph, en) Li = Li + my_Li dLi_dS = dLi_dS + my_dLi_dS diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index ea113ddfb..acbbac236 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -223,7 +223,7 @@ module function phase_homogenizedC66(ph,en) result(C) plasticType: select case (phase_plasticity(ph)) - case (PLASTICITY_DISLOTWIN_ID) plasticType + case (PLASTIC_DISLOTWIN_ID) plasticType C = plastic_dislotwin_homogenizedC(ph,en) case default plasticType C = elastic_C66(ph,en) diff --git a/src/phase_mechanical_plastic.f90 b/src/phase_mechanical_plastic.f90 index b2a9bdcc4..4951712fd 100644 --- a/src/phase_mechanical_plastic.f90 +++ b/src/phase_mechanical_plastic.f90 @@ -224,15 +224,15 @@ module subroutine plastic_init print'(/,1x,a)', '<<<+- phase:mechanical:plastic init -+>>>' - where(plastic_none_init()) phase_plasticity = PLASTICITY_NONE_ID - where(plastic_isotropic_init()) phase_plasticity = PLASTICITY_ISOTROPIC_ID - where(plastic_phenopowerlaw_init()) phase_plasticity = PLASTICITY_PHENOPOWERLAW_ID - where(plastic_kinehardening_init()) phase_plasticity = PLASTICITY_KINEHARDENING_ID - where(plastic_dislotwin_init()) phase_plasticity = PLASTICITY_DISLOTWIN_ID - where(plastic_dislotungsten_init()) phase_plasticity = PLASTICITY_DISLOTUNGSTEN_ID - where(plastic_nonlocal_init()) phase_plasticity = PLASTICITY_NONLOCAL_ID + where(plastic_none_init()) phase_plasticity = PLASTIC_NONE_ID + where(plastic_isotropic_init()) phase_plasticity = PLASTIC_ISOTROPIC_ID + where(plastic_phenopowerlaw_init()) phase_plasticity = PLASTIC_PHENOPOWERLAW_ID + where(plastic_kinehardening_init()) phase_plasticity = PLASTIC_KINEHARDENING_ID + where(plastic_dislotwin_init()) phase_plasticity = PLASTIC_DISLOTWIN_ID + where(plastic_dislotungsten_init()) phase_plasticity = PLASTIC_DISLOTUNGSTEN_ID + where(plastic_nonlocal_init()) phase_plasticity = PLASTIC_NONLOCAL_ID - if (any(phase_plasticity == PLASTICITY_undefined_ID)) call IO_error(201) + if (any(phase_plasticity == PLASTIC_undefined_ID)) call IO_error(201) end subroutine plastic_init @@ -262,7 +262,7 @@ module subroutine plastic_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, & i, j - if (phase_plasticity(ph) == PLASTICITY_NONE_ID) then + if (phase_plasticity(ph) == PLASTIC_NONE_ID) then Lp = 0.0_pReal dLp_dFi = 0.0_pReal dLp_dS = 0.0_pReal @@ -272,22 +272,22 @@ module subroutine plastic_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, & plasticType: select case (phase_plasticity(ph)) - case (PLASTICITY_ISOTROPIC_ID) plasticType + case (PLASTIC_ISOTROPIC_ID) plasticType call isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,en) - case (PLASTICITY_PHENOPOWERLAW_ID) plasticType + case (PLASTIC_PHENOPOWERLAW_ID) plasticType call phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,en) - case (PLASTICITY_KINEHARDENING_ID) plasticType + case (PLASTIC_KINEHARDENING_ID) plasticType call kinehardening_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,en) - case (PLASTICITY_NONLOCAL_ID) plasticType + case (PLASTIC_NONLOCAL_ID) plasticType call nonlocal_LpAndItsTangent(Lp,dLp_dMp,Mp, thermal_T(ph,en),ph,en) - case (PLASTICITY_DISLOTWIN_ID) plasticType + case (PLASTIC_DISLOTWIN_ID) plasticType call dislotwin_LpAndItsTangent(Lp,dLp_dMp,Mp, thermal_T(ph,en),ph,en) - case (PLASTICITY_DISLOTUNGSTEN_ID) plasticType + case (PLASTIC_DISLOTUNGSTEN_ID) plasticType call dislotungsten_LpAndItsTangent(Lp,dLp_dMp,Mp, thermal_T(ph,en),ph,en) end select plasticType @@ -321,28 +321,28 @@ module function plastic_dotState(subdt,co,ip,el,ph,en) result(broken) logical :: broken - if (phase_plasticity(ph) /= PLASTICITY_NONE_ID) then + if (phase_plasticity(ph) /= PLASTIC_NONE_ID) then Mp = matmul(matmul(transpose(phase_mechanical_Fi(ph)%data(1:3,1:3,en)),& phase_mechanical_Fi(ph)%data(1:3,1:3,en)),phase_mechanical_S(ph)%data(1:3,1:3,en)) plasticType: select case (phase_plasticity(ph)) - case (PLASTICITY_ISOTROPIC_ID) plasticType + case (PLASTIC_ISOTROPIC_ID) plasticType call isotropic_dotState(Mp,ph,en) - case (PLASTICITY_PHENOPOWERLAW_ID) plasticType + case (PLASTIC_PHENOPOWERLAW_ID) plasticType call phenopowerlaw_dotState(Mp,ph,en) - case (PLASTICITY_KINEHARDENING_ID) plasticType + case (PLASTIC_KINEHARDENING_ID) plasticType call plastic_kinehardening_dotState(Mp,ph,en) - case (PLASTICITY_DISLOTWIN_ID) plasticType + case (PLASTIC_DISLOTWIN_ID) plasticType call dislotwin_dotState(Mp,thermal_T(ph,en),ph,en) - case (PLASTICITY_DISLOTUNGSTEN_ID) plasticType + case (PLASTIC_DISLOTUNGSTEN_ID) plasticType call dislotungsten_dotState(Mp,thermal_T(ph,en),ph,en) - case (PLASTICITY_NONLOCAL_ID) plasticType + case (PLASTIC_NONLOCAL_ID) plasticType call nonlocal_dotState(Mp,thermal_T(ph,en),subdt,ph,en,ip,el) end select plasticType end if @@ -372,13 +372,13 @@ module subroutine plastic_dependentState(co, ip, el) plasticType: select case (phase_plasticity(ph)) - case (PLASTICITY_DISLOTWIN_ID) plasticType + case (PLASTIC_DISLOTWIN_ID) plasticType call dislotwin_dependentState(thermal_T(ph,en),ph,en) - case (PLASTICITY_DISLOTUNGSTEN_ID) plasticType + case (PLASTIC_DISLOTUNGSTEN_ID) plasticType call dislotungsten_dependentState(ph,en) - case (PLASTICITY_NONLOCAL_ID) plasticType + case (PLASTIC_NONLOCAL_ID) plasticType call nonlocal_dependentState(ph,en,ip,el) end select plasticType @@ -406,7 +406,7 @@ module function plastic_deltaState(ph, en) result(broken) broken = .false. select case (phase_plasticity(ph)) - case (PLASTICITY_NONLOCAL_ID,PLASTICITY_KINEHARDENING_ID) + case (PLASTIC_NONLOCAL_ID,PLASTIC_KINEHARDENING_ID) Mp = matmul(matmul(transpose(phase_mechanical_Fi(ph)%data(1:3,1:3,en)),& phase_mechanical_Fi(ph)%data(1:3,1:3,en)),& @@ -414,10 +414,10 @@ module function plastic_deltaState(ph, en) result(broken) plasticType: select case (phase_plasticity(ph)) - case (PLASTICITY_KINEHARDENING_ID) plasticType + case (PLASTIC_KINEHARDENING_ID) plasticType call plastic_kinehardening_deltaState(Mp,ph,en) - case (PLASTICITY_NONLOCAL_ID) plasticType + case (PLASTIC_NONLOCAL_ID) plasticType call plastic_nonlocal_deltaState(Mp,ph,en) end select plasticType diff --git a/src/phase_mechanical_plastic_nonlocal.f90 b/src/phase_mechanical_plastic_nonlocal.f90 index 6bd648eaa..c762039d4 100644 --- a/src/phase_mechanical_plastic_nonlocal.f90 +++ b/src/phase_mechanical_plastic_nonlocal.f90 @@ -1277,7 +1277,7 @@ function rhoDotFlux(timestep,ph,en,ip,el) !* The entering flux from my neighbor will be distributed on my slip systems according to the !* compatibility if (neighbor_n > 0) then - if (phase_plasticity(material_phaseAt(1,neighbor_el)) == PLASTICITY_NONLOCAL_ID .and. & + if (phase_plasticity(material_phaseAt(1,neighbor_el)) == PLASTIC_NONLOCAL_ID .and. & any(compatibility(:,:,:,n,ip,el) > 0.0_pReal)) then forall (s = 1:ns, t = 1:4) @@ -1323,7 +1323,7 @@ function rhoDotFlux(timestep,ph,en,ip,el) !* In case of reduced transmissivity, part of the leaving flux is stored as dead dislocation density. !* That means for an interface of zero transmissivity the leaving flux is fully converted to dead dislocations. if (opposite_n > 0) then - if (phase_plasticity(material_phaseAt(1,opposite_el)) == PLASTICITY_NONLOCAL_ID) then + if (phase_plasticity(material_phaseAt(1,opposite_el)) == PLASTIC_NONLOCAL_ID) then normal_me2neighbor_defConf = math_det33(Favg) & * matmul(math_inv33(transpose(Favg)),IPareaNormal(1:3,n,ip,el)) ! normal of the interface in (average) deformed configuration (pointing en => neighbor)