diff --git a/PRIVATE b/PRIVATE index f529a16d1..281e7eb84 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit f529a16d100434c736476944a3a696d8f95ac770 +Subproject commit 281e7eb84f76a2974a50eb54faf35ea25ec89b20 diff --git a/examples/SpectralMethod/Polycrystal/material.yaml b/examples/SpectralMethod/Polycrystal/material.yaml index 04775be4c..9bfc97ca3 100644 --- a/examples/SpectralMethod/Polycrystal/material.yaml +++ b/examples/SpectralMethod/Polycrystal/material.yaml @@ -108,19 +108,19 @@ material: phase: Aluminum: - elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} - generic: - output: [F, P, F_e, F_p, L_p, O] lattice: fcc - plasticity: - N_sl: [12] - a_sl: 2.25 - atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl_sl: 75e6 - h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 - output: [xi_sl] - type: phenopowerlaw - xi_0_sl: [31e6] - xi_inf_sl: [63e6] + mech: + output: [F, P, F_e, F_p, L_p, O] + elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} + plasticity: + N_sl: [12] + a_sl: 2.25 + atol_xi: 1.0 + dot_gamma_0_sl: 0.001 + h_0_sl_sl: 75e6 + h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] + n_sl: 20 + output: [xi_sl] + type: phenopowerlaw + xi_0_sl: [31e6] + xi_inf_sl: [63e6] diff --git a/python/tests/reference/ConfigMaterial/material.yaml b/python/tests/reference/ConfigMaterial/material.yaml index b616e1ef8..933e295b3 100644 --- a/python/tests/reference/ConfigMaterial/material.yaml +++ b/python/tests/reference/ConfigMaterial/material.yaml @@ -33,12 +33,12 @@ material: phase: Aluminum: - elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} - generic: - output: [F, P, Fe, Fp, Lp] lattice: cF + mech: + output: [F, P, F_e, F_p, L_p] + elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} Steel: - elasticity: {C_11: 233.3e9, C_12: 135.5e9, C_44: 118.0e9, type: hooke} - generic: - output: [F, P, Fe, Fp, Lp] lattice: cI + mech: + output: [F, P, F_e, F_p, L_p] + elasticity: {C_11: 233.3e9, C_12: 135.5e9, C_44: 118.0e9, type: hooke} diff --git a/python/tests/reference/Result/material.yaml b/python/tests/reference/Result/material.yaml index 31f16b824..cd9cbad2a 100644 --- a/python/tests/reference/Result/material.yaml +++ b/python/tests/reference/Result/material.yaml @@ -6,39 +6,39 @@ homogenization: phase: pheno_fcc: - elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} - generic: - output: [F, P, F_e, F_p, L_p, O] lattice: fcc - plasticity: - N_sl: [12] - a_sl: 2.25 - atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl_sl: 75e6 - h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 - output: [xi_sl] - type: phenopowerlaw - xi_0_sl: [31e6] - xi_inf_sl: [63e6] - pheno_bcc: - elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} - generic: + mech: output: [F, P, F_e, F_p, L_p, O] + elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} + plasticity: + N_sl: [12] + a_sl: 2.25 + atol_xi: 1.0 + dot_gamma_0_sl: 0.001 + h_0_sl_sl: 75e6 + h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] + n_sl: 20 + output: [xi_sl] + type: phenopowerlaw + xi_0_sl: [31e6] + xi_inf_sl: [63e6] + pheno_bcc: lattice: bcc - plasticity: - N_sl: [12] - a_sl: 2.25 - atol_xi: 1.0 - dot_gamma_0_sl: 0.001 - h_0_sl_sl: 75e6 - h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] - n_sl: 20 - output: [xi_sl] - type: phenopowerlaw - xi_0_sl: [31e6] - xi_inf_sl: [63e6] + mech: + output: [F, P, F_e, F_p, L_p, O] + elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke} + plasticity: + N_sl: [12] + a_sl: 2.25 + atol_xi: 1.0 + dot_gamma_0_sl: 0.001 + h_0_sl_sl: 75e6 + h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4] + n_sl: 20 + output: [xi_sl] + type: phenopowerlaw + xi_0_sl: [31e6] + xi_inf_sl: [63e6] material: - constituents: diff --git a/src/commercialFEM_fileList.f90 b/src/commercialFEM_fileList.f90 index f4eb5d78c..d161b36eb 100644 --- a/src/commercialFEM_fileList.f90 +++ b/src/commercialFEM_fileList.f90 @@ -25,7 +25,7 @@ #include "material.f90" #include "lattice.f90" #include "constitutive.f90" -#include "constitutive_plastic.f90" +#include "constitutive_mech.f90" #include "constitutive_plastic_none.f90" #include "constitutive_plastic_isotropic.f90" #include "constitutive_plastic_phenopowerlaw.f90" diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 358937e4b..470ac4dc7 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -19,7 +19,7 @@ module constitutive implicit none private - integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable, protected :: & + integer(kind(ELASTICITY_undefined_ID)), dimension(:), allocatable :: & !ToDo: old intel compiler complains about protected phase_elasticity !< elasticity of each phase integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable :: & !ToDo: old intel compiler complains about protected @@ -52,8 +52,8 @@ module constitutive interface - module subroutine plastic_init - end subroutine plastic_init + module subroutine mech_init + end subroutine mech_init module subroutine damage_init end subroutine damage_init @@ -343,6 +343,25 @@ module constitutive end interface constitutive_dependentState + interface constitutive_SandItsTangents + + module subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) + integer, intent(in) :: & + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element + real(pReal), intent(in), dimension(3,3) :: & + Fe, & !< elastic deformation gradient + Fi !< intermediate deformation gradient + real(pReal), intent(out), dimension(3,3) :: & + S !< 2nd Piola-Kirchhoff stress tensor + real(pReal), intent(out), dimension(3,3,3,3) :: & + dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient + dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient + end subroutine constitutive_hooke_SandItsTangents + + end interface constitutive_SandItsTangents + type :: tDebugOptions logical :: & @@ -385,14 +404,10 @@ subroutine constitutive_init integer :: & p, & !< counter in phase loop - s, & !< counter in source loop - stiffDegradationCtr + s !< counter in source loop class (tNode), pointer :: & debug_constitutive, & - phases, & - phase, & - elastic, & - stiffDegradation + phases debug_constitutive => config_debug%get('constitutive', defaultVal=emptyList) debugConstitutive%basic = debug_constitutive%contains('basic') @@ -402,52 +417,15 @@ subroutine constitutive_init debugConstitutive%ip = config_debug%get_asInt('integrationpoint',defaultVal = 1) debugConstitutive%grain = config_debug%get_asInt('grain',defaultVal = 1) -!------------------------------------------------------------------------------------------------- -! initialize elasticity (hooke) !ToDO: Maybe move to elastic submodule along with function homogenizedC? - phases => config_material%get('phase') - allocate(phase_elasticity(phases%length), source = ELASTICITY_undefined_ID) - allocate(phase_elasticityInstance(phases%length), source = 0) - allocate(phase_NstiffnessDegradations(phases%length),source=0) - - do p = 1, phases%length - phase => phases%get(p) - elastic => phase%get('elasticity') - if(elastic%get_asString('type') == 'hooke') then - phase_elasticity(p) = ELASTICITY_HOOKE_ID - else - call IO_error(200,ext_msg=elastic%get_asString('type')) - endif - stiffDegradation => phase%get('stiffness_degradation',defaultVal=emptyList) ! check for stiffness degradation mechanisms - phase_NstiffnessDegradations(p) = stiffDegradation%length - enddo - - allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),phases%length), & - source=STIFFNESS_DEGRADATION_undefined_ID) - - if(maxVal(phase_NstiffnessDegradations)/=0) then - do p = 1, phases%length - phase => phases%get(p) - stiffDegradation => phase%get('stiffness_degradation',defaultVal=emptyList) - do stiffDegradationCtr = 1, stiffDegradation%length - if(stiffDegradation%get_asString(stiffDegradationCtr) == 'damage') & - phase_stiffnessDegradation(stiffDegradationCtr,p) = STIFFNESS_DEGRADATION_damage_ID - enddo - enddo - endif - - do p = 1, phases%length - phase_elasticityInstance(p) = count(phase_elasticity(1:p) == phase_elasticity(p)) - enddo - - !-------------------------------------------------------------------------------------------------- ! initialize constitutive laws - call plastic_init + call mech_init call damage_init call thermal_init print'(/,a)', ' <<<+- constitutive init -+>>>'; flush(IO_STDOUT) + phases => config_material%get('phase') constitutive_source_maxSizeDotState = 0 PhaseLoop2:do p = 1,phases%length !-------------------------------------------------------------------------------------------------- @@ -666,80 +644,6 @@ pure function constitutive_initialFi(ipc, ip, el) end function constitutive_initialFi -!-------------------------------------------------------------------------------------------------- -!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to -!> the elastic/intermediate deformation gradients depending on the selected elastic law -!! (so far no case switch because only Hooke is implemented) -!-------------------------------------------------------------------------------------------------- -subroutine constitutive_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) - - integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element - real(pReal), intent(in), dimension(3,3) :: & - Fe, & !< elastic deformation gradient - Fi !< intermediate deformation gradient - real(pReal), intent(out), dimension(3,3) :: & - S !< 2nd Piola-Kirchhoff stress tensor - real(pReal), intent(out), dimension(3,3,3,3) :: & - dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient - dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient - - call constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) - - -end subroutine constitutive_SandItsTangents - - -!-------------------------------------------------------------------------------------------------- -!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to -!> the elastic and intermediate deformation gradients using Hooke's law -!-------------------------------------------------------------------------------------------------- -subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & - Fe, Fi, ipc, ip, el) - - integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element - real(pReal), intent(in), dimension(3,3) :: & - Fe, & !< elastic deformation gradient - Fi !< intermediate deformation gradient - real(pReal), intent(out), dimension(3,3) :: & - S !< 2nd Piola-Kirchhoff stress tensor in lattice configuration - real(pReal), intent(out), dimension(3,3,3,3) :: & - dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient - dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient - real(pReal), dimension(3,3) :: E - real(pReal), dimension(3,3,3,3) :: C - integer :: & - ho, & !< homogenization - d !< counter in degradation loop - integer :: & - i, j - - ho = material_homogenizationAt(el) - C = math_66toSym3333(constitutive_homogenizedC(ipc,ip,el)) - - DegradationLoop: do d = 1, phase_NstiffnessDegradations(material_phaseAt(ipc,el)) - degradationType: select case(phase_stiffnessDegradation(d,material_phaseAt(ipc,el))) - case (STIFFNESS_DEGRADATION_damage_ID) degradationType - C = C * damage(ho)%p(damageMapping(ho)%p(ip,el))**2 - end select degradationType - enddo DegradationLoop - - E = 0.5_pReal*(matmul(transpose(Fe),Fe)-math_I3) !< Green-Lagrange strain in unloaded configuration - S = math_mul3333xx33(C,matmul(matmul(transpose(Fi),E),Fi)) !< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration - - do i =1, 3;do j=1,3 - dS_dFe(i,j,1:3,1:3) = matmul(Fe,matmul(matmul(Fi,C(i,j,1:3,1:3)),transpose(Fi))) !< dS_ij/dFe_kl = C_ijmn * Fi_lm * Fi_on * Fe_ko - dS_dFi(i,j,1:3,1:3) = 2.0_pReal*matmul(matmul(E,Fi),C(i,j,1:3,1:3)) !< dS_ij/dFi_kl = C_ijln * E_km * Fe_mn - enddo; enddo - -end subroutine constitutive_hooke_SandItsTangents - - !-------------------------------------------------------------------------------------------------- !> @brief contains the constitutive equation for calculating the rate of change of microstructure !-------------------------------------------------------------------------------------------------- diff --git a/src/constitutive_plastic.f90 b/src/constitutive_mech.f90 similarity index 76% rename from src/constitutive_plastic.f90 rename to src/constitutive_mech.f90 index bf6bc079e..074ef88fe 100644 --- a/src/constitutive_plastic.f90 +++ b/src/constitutive_mech.f90 @@ -1,7 +1,7 @@ !---------------------------------------------------------------------------------------------------- !> @brief internal microstructure state for all plasticity constitutive models !---------------------------------------------------------------------------------------------------- -submodule(constitutive) constitutive_plastic +submodule(constitutive) constitutive_mech interface @@ -191,17 +191,60 @@ contains !-------------------------------------------------------------------------------------------------- -!> @brief Initialize constitutive models for plasticity +!> @brief Initialize mechanical field related constitutive models +!> @details Initialize elasticity, plasticity and stiffness degradation models. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_init +module subroutine mech_init - integer :: p - class(tNode), pointer :: phases + integer :: & + p, & + stiffDegradationCtr + class(tNode), pointer :: & + phases, & + phase, & + mech, & + elastic, & + stiffDegradation - print'(/,a)', ' <<<+- constitutive_plastic init -+>>>' + print'(/,a)', ' <<<+- constitutive_mech init -+>>>' +!------------------------------------------------------------------------------------------------- +! initialize elasticity (hooke) !ToDO: Maybe move to elastic submodule along with function homogenizedC? phases => config_material%get('phase') + allocate(phase_elasticity(phases%length), source = ELASTICITY_undefined_ID) + allocate(phase_elasticityInstance(phases%length), source = 0) + allocate(phase_NstiffnessDegradations(phases%length),source=0) + do p = 1, phases%length + phase => phases%get(p) + mech => phase%get('mech') + elastic => mech%get('elasticity') + if(elastic%get_asString('type') == 'hooke') then + phase_elasticity(p) = ELASTICITY_HOOKE_ID + else + call IO_error(200,ext_msg=elastic%get_asString('type')) + endif + stiffDegradation => mech%get('stiffness_degradation',defaultVal=emptyList) ! check for stiffness degradation mechanisms + phase_NstiffnessDegradations(p) = stiffDegradation%length + enddo + + allocate(phase_stiffnessDegradation(maxval(phase_NstiffnessDegradations),phases%length), & + source=STIFFNESS_DEGRADATION_undefined_ID) + + if(maxVal(phase_NstiffnessDegradations)/=0) then + do p = 1, phases%length + phase => phases%get(p) + mech => phase%get('mech') + stiffDegradation => mech%get('stiffness_degradation',defaultVal=emptyList) + do stiffDegradationCtr = 1, stiffDegradation%length + if(stiffDegradation%get_asString(stiffDegradationCtr) == 'damage') & + phase_stiffnessDegradation(stiffDegradationCtr,p) = STIFFNESS_DEGRADATION_damage_ID + enddo + enddo + endif + + +! initialize plasticity allocate(plasticState(phases%length)) allocate(phase_plasticity(phases%length),source = PLASTICITY_undefined_ID) allocate(phase_plasticityInstance(phases%length),source = 0) @@ -216,11 +259,11 @@ module subroutine plastic_init where(plastic_nonlocal_init()) phase_plasticity = PLASTICITY_NONLOCAL_ID do p = 1, phases%length + phase_elasticityInstance(p) = count(phase_elasticity(1:p) == phase_elasticity(p)) phase_plasticityInstance(p) = count(phase_plasticity(1:p) == phase_plasticity(p)) enddo - -end subroutine plastic_init +end subroutine mech_init !-------------------------------------------------------------------------------------------------- @@ -234,6 +277,7 @@ module function plastic_active(plastic_label) result(active_plastic) class(tNode), pointer :: & phases, & phase, & + mech, & pl integer :: p @@ -241,13 +285,62 @@ module function plastic_active(plastic_label) result(active_plastic) allocate(active_plastic(phases%length), source = .false. ) do p = 1, phases%length phase => phases%get(p) - pl => phase%get('plasticity') + mech => phase%get('mech') + pl => mech%get('plasticity') if(pl%get_asString('type') == plastic_label) active_plastic(p) = .true. enddo end function plastic_active +!-------------------------------------------------------------------------------------------------- +!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to +!> the elastic and intermediate deformation gradients using Hooke's law +!-------------------------------------------------------------------------------------------------- +module subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & + Fe, Fi, ipc, ip, el) + + integer, intent(in) :: & + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element + real(pReal), intent(in), dimension(3,3) :: & + Fe, & !< elastic deformation gradient + Fi !< intermediate deformation gradient + real(pReal), intent(out), dimension(3,3) :: & + S !< 2nd Piola-Kirchhoff stress tensor in lattice configuration + real(pReal), intent(out), dimension(3,3,3,3) :: & + dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient + dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient + real(pReal), dimension(3,3) :: E + real(pReal), dimension(3,3,3,3) :: C + integer :: & + ho, & !< homogenization + d !< counter in degradation loop + integer :: & + i, j + + ho = material_homogenizationAt(el) + C = math_66toSym3333(constitutive_homogenizedC(ipc,ip,el)) + + DegradationLoop: do d = 1, phase_NstiffnessDegradations(material_phaseAt(ipc,el)) + degradationType: select case(phase_stiffnessDegradation(d,material_phaseAt(ipc,el))) + case (STIFFNESS_DEGRADATION_damage_ID) degradationType + C = C * damage(ho)%p(damageMapping(ho)%p(ip,el))**2 + end select degradationType + enddo DegradationLoop + + E = 0.5_pReal*(matmul(transpose(Fe),Fe)-math_I3) !< Green-Lagrange strain in unloaded configuration + S = math_mul3333xx33(C,matmul(matmul(transpose(Fi),E),Fi)) !< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration + + do i =1, 3;do j=1,3 + dS_dFe(i,j,1:3,1:3) = matmul(Fe,matmul(matmul(Fi,C(i,j,1:3,1:3)),transpose(Fi))) !< dS_ij/dFe_kl = C_ijmn * Fi_lm * Fi_on * Fe_ko + dS_dFi(i,j,1:3,1:3) = 2.0_pReal*matmul(matmul(E,Fi),C(i,j,1:3,1:3)) !< dS_ij/dFi_kl = C_ijln * E_km * Fe_mn + enddo; enddo + +end subroutine constitutive_hooke_SandItsTangents + + !-------------------------------------------------------------------------------------------------- !> @brief calls microstructure function of the different plasticity constitutive models !-------------------------------------------------------------------------------------------------- @@ -395,6 +488,5 @@ module subroutine plastic_results end subroutine plastic_results - -end submodule constitutive_plastic +end submodule constitutive_mech diff --git a/src/constitutive_plastic_disloTungsten.f90 b/src/constitutive_plastic_disloTungsten.f90 index aef3bef89..adaa36ee7 100644 --- a/src/constitutive_plastic_disloTungsten.f90 +++ b/src/constitutive_plastic_disloTungsten.f90 @@ -5,7 +5,7 @@ !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @brief crystal plasticity model for bcc metals, especially Tungsten !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_disloTungsten +submodule(constitutive:constitutive_mech) plastic_disloTungsten real(pReal), parameter :: & kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin @@ -94,6 +94,7 @@ module function plastic_disloTungsten_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_dislotungsten init -+>>>' @@ -115,14 +116,14 @@ module function plastic_disloTungsten_init() result(myPlasticity) i = 0 do p = 1, phases%length phase => phases%get(p) - + mech => phase%get('mech') if(.not. myPlasticity(p)) cycle i = i + 1 associate(prm => param(i), & dot => dotState(i), & stt => state(i), & dst => dependentState(i)) - pl => phase%get('plasticity') + pl => mech%get('plasticity') #if defined (__GFORTRAN__) prm%output = output_asStrings(pl) diff --git a/src/constitutive_plastic_dislotwin.f90 b/src/constitutive_plastic_dislotwin.f90 index 30527e301..2bc2b1176 100644 --- a/src/constitutive_plastic_dislotwin.f90 +++ b/src/constitutive_plastic_dislotwin.f90 @@ -7,7 +7,7 @@ !> @brief material subroutine incoprorating dislocation and twinning physics !> @details to be done !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_dislotwin +submodule(constitutive:constitutive_mech) plastic_dislotwin real(pReal), parameter :: & kB = 1.38e-23_pReal !< Boltzmann constant in J/Kelvin @@ -141,6 +141,7 @@ module function plastic_dislotwin_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_dislotwin init -+>>>' @@ -168,14 +169,14 @@ module function plastic_dislotwin_init() result(myPlasticity) i = 0 do p = 1, phases%length phase => phases%get(p) - + mech => phase%get('mech') if(.not. myPlasticity(p)) cycle i = i + 1 associate(prm => param(i), & dot => dotState(i), & stt => state(i), & dst => dependentState(i)) - pl => phase%get('plasticity') + pl => mech%get('plasticity') #if defined (__GFORTRAN__) prm%output = output_asStrings(pl) diff --git a/src/constitutive_plastic_isotropic.f90 b/src/constitutive_plastic_isotropic.f90 index db418663f..4bbd5187e 100644 --- a/src/constitutive_plastic_isotropic.f90 +++ b/src/constitutive_plastic_isotropic.f90 @@ -7,7 +7,7 @@ !! resolving the stress on the slip systems. Will give the response of phenopowerlaw for an !! untextured polycrystal !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_isotropic +submodule(constitutive:constitutive_mech) plastic_isotropic type :: tParameters real(pReal) :: & @@ -65,6 +65,7 @@ module function plastic_isotropic_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_isotropic init -+>>>' @@ -85,13 +86,13 @@ module function plastic_isotropic_init() result(myPlasticity) i = 0 do p = 1, phases%length phase => phases%get(p) - + mech => phase%get('mech') if(.not. myPlasticity(p)) cycle i = i + 1 associate(prm => param(i), & dot => dotState(i), & stt => state(i)) - pl => phase%get('plasticity') + pl => mech%get('plasticity') #if defined (__GFORTRAN__) diff --git a/src/constitutive_plastic_kinehardening.f90 b/src/constitutive_plastic_kinehardening.f90 index 3faf7dc41..7dbd51597 100644 --- a/src/constitutive_plastic_kinehardening.f90 +++ b/src/constitutive_plastic_kinehardening.f90 @@ -5,7 +5,7 @@ !> @brief Phenomenological crystal plasticity using a power law formulation for the shear rates !! and a Voce-type kinematic hardening rule !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_kinehardening +submodule(constitutive:constitutive_mech) plastic_kinehardening type :: tParameters real(pReal) :: & @@ -77,6 +77,7 @@ module function plastic_kinehardening_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_kinehardening init -+>>>' @@ -95,14 +96,14 @@ module function plastic_kinehardening_init() result(myPlasticity) i = 0 do p = 1, phases%length phase => phases%get(p) - + mech => phase%get('mech') if(.not. myPlasticity(p)) cycle i = i + 1 associate(prm => param(i), & dot => dotState(i), & dlt => deltaState(i), & stt => state(i)) - pl => phase%get('plasticity') + pl => mech%get('plasticity') #if defined (__GFORTRAN__) prm%output = output_asStrings(pl) diff --git a/src/constitutive_plastic_none.f90 b/src/constitutive_plastic_none.f90 index 923ae354a..6164ab29f 100644 --- a/src/constitutive_plastic_none.f90 +++ b/src/constitutive_plastic_none.f90 @@ -4,7 +4,7 @@ !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @brief Dummy plasticity for purely elastic material !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_none +submodule(constitutive:constitutive_mech) plastic_none contains @@ -22,6 +22,7 @@ module function plastic_none_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_none init -+>>>' @@ -30,7 +31,8 @@ module function plastic_none_init() result(myPlasticity) allocate(myPlasticity(phases%length), source = .false.) do p = 1, phases%length phase => phases%get(p) - pl => phase%get('plasticity') + mech => phase%get('mech') + pl => mech%get ('plasticity') if(pl%get_asString('type') == 'none') myPlasticity(p) = .true. enddo diff --git a/src/constitutive_plastic_nonlocal.f90 b/src/constitutive_plastic_nonlocal.f90 index 472415ba9..8aab40fc8 100644 --- a/src/constitutive_plastic_nonlocal.f90 +++ b/src/constitutive_plastic_nonlocal.f90 @@ -4,7 +4,7 @@ !> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH !> @brief material subroutine for plasticity including dislocation flux !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_nonlocal +submodule(constitutive:constitutive_mech) plastic_nonlocal use geometry_plastic_nonlocal, only: & nIPneighbors => geometry_plastic_nonlocal_nIPneighbors, & IPneighborhood => geometry_plastic_nonlocal_IPneighborhood, & @@ -183,6 +183,7 @@ module function plastic_nonlocal_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_nonlocal init -+>>>' @@ -212,7 +213,7 @@ module function plastic_nonlocal_init() result(myPlasticity) i = 0 do p = 1, phases%length phase => phases%get(p) - + mech => phase%get('mech') if(.not. myPlasticity(p)) cycle i = i + 1 associate(prm => param(i), & @@ -221,7 +222,7 @@ module function plastic_nonlocal_init() result(myPlasticity) st0 => state0(i), & del => deltaState(i), & dst => microstructure(i)) - pl => phase%get('plasticity') + pl => mech%get('plasticity') phase_localPlasticity(p) = .not. pl%contains('nonlocal') diff --git a/src/constitutive_plastic_phenopowerlaw.f90 b/src/constitutive_plastic_phenopowerlaw.f90 index 72fa0e9e6..747dd6615 100644 --- a/src/constitutive_plastic_phenopowerlaw.f90 +++ b/src/constitutive_plastic_phenopowerlaw.f90 @@ -4,7 +4,7 @@ !> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH !> @brief phenomenological crystal plasticity formulation using a powerlaw fitting !-------------------------------------------------------------------------------------------------- -submodule(constitutive:constitutive_plastic) plastic_phenopowerlaw +submodule(constitutive:constitutive_mech) plastic_phenopowerlaw type :: tParameters real(pReal) :: & @@ -86,6 +86,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) class(tNode), pointer :: & phases, & phase, & + mech, & pl print'(/,a)', ' <<<+- plastic_phenopowerlaw init -+>>>' @@ -103,13 +104,13 @@ module function plastic_phenopowerlaw_init() result(myPlasticity) i = 0 do p = 1, phases%length phase => phases%get(p) - + mech => phase%get('mech') if(.not. myPlasticity(p)) cycle i = i + 1 associate(prm => param(i), & dot => dotState(i), & stt => state(i)) - pl => phase%get('plasticity') + pl => mech%get('plasticity') !-------------------------------------------------------------------------------------------------- ! slip related parameters diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 8a0789fca..2315fcd77 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -150,7 +150,7 @@ subroutine crystallite_init debug_crystallite, & ! pointer to debug options for crystallite phases, & phase, & - generic_param + mech print'(/,a)', ' <<<+- crystallite init -+>>>' @@ -240,11 +240,11 @@ subroutine crystallite_init allocate(output_constituent(phases%length)) do c = 1, phases%length phase => phases%get(c) - generic_param => phase%get('generic',defaultVal = emptyDict) + mech => phase%get('mech',defaultVal = emptyDict) #if defined(__GFORTRAN__) - output_constituent(c)%label = output_asStrings(generic_param) + output_constituent(c)%label = output_asStrings(mech) #else - output_constituent(c)%label = generic_param%get_asStrings('output',defaultVal=emptyStringArray) + output_constituent(c)%label = mech%get_asStrings('output',defaultVal=emptyStringArray) #endif enddo diff --git a/src/kinematics_cleavage_opening.f90 b/src/kinematics_cleavage_opening.f90 index 44bbcb4f4..66bce6a92 100644 --- a/src/kinematics_cleavage_opening.f90 +++ b/src/kinematics_cleavage_opening.f90 @@ -41,7 +41,6 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin class(tNode), pointer :: & phases, & phase, & - pl, & kinematics, & kinematic_type @@ -58,8 +57,7 @@ module function kinematics_cleavage_opening_init(kinematics_length) result(myKin do p = 1, phases%length if(any(myKinematics(:,p))) kinematics_cleavage_opening_instance(p) = count(myKinematics(:,1:p)) - phase => phases%get(p) - pl => phase%get('plasticity') + phase => phases%get(p) if(count(myKinematics(:,p)) == 0) cycle kinematics => phase%get('kinematics') do k = 1, kinematics%length diff --git a/src/kinematics_slipplane_opening.f90 b/src/kinematics_slipplane_opening.f90 index ea8f51427..7e45a7a05 100644 --- a/src/kinematics_slipplane_opening.f90 +++ b/src/kinematics_slipplane_opening.f90 @@ -44,6 +44,7 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi class(tNode), pointer :: & phases, & phase, & + mech, & pl, & kinematics, & kinematic_type @@ -61,8 +62,9 @@ module function kinematics_slipplane_opening_init(kinematics_length) result(myKi do p = 1, phases%length if(any(myKinematics(:,p))) kinematics_slipplane_opening_instance(p) = count(myKinematics(:,1:p)) - phase => phases%get(p) - pl => phase%get('plasticity') + phase => phases%get(p) + mech => phase%get('mech') + pl => mech%get('plasticity') if(count(myKinematics(:,p)) == 0) cycle kinematics => phase%get('kinematics') do k = 1, kinematics%length diff --git a/src/kinematics_thermal_expansion.f90 b/src/kinematics_thermal_expansion.f90 index 4afde82e3..2b8b04d85 100644 --- a/src/kinematics_thermal_expansion.f90 +++ b/src/kinematics_thermal_expansion.f90 @@ -34,7 +34,6 @@ module function kinematics_thermal_expansion_init(kinematics_length) result(myKi class(tNode), pointer :: & phases, & phase, & - pl, & kinematics, & kinematic_type @@ -52,7 +51,6 @@ module function kinematics_thermal_expansion_init(kinematics_length) result(myKi do p = 1, phases%length if(any(myKinematics(:,p))) kinematics_thermal_expansion_instance(p) = count(myKinematics(:,1:p)) phase => phases%get(p) - pl => phase%get('plasticity') if(count(myKinematics(:,p)) == 0) cycle kinematics => phase%get('kinematics') do k = 1, kinematics%length diff --git a/src/lattice.f90 b/src/lattice.f90 index 78b3894c0..cc60f04a2 100644 --- a/src/lattice.f90 +++ b/src/lattice.f90 @@ -455,6 +455,7 @@ subroutine lattice_init class(tNode), pointer :: & phases, & phase, & + mech, & elasticity print'(/,a)', ' <<<+- lattice init -+>>>'; flush(IO_STDOUT) @@ -475,7 +476,8 @@ subroutine lattice_init do p = 1, phases%length phase => phases%get(p) - elasticity => phase%get('elasticity') + mech => phase%get('mech') + elasticity => mech%get('elasticity') lattice_C66(1,1,p) = elasticity%get_asFloat('C_11') lattice_C66(1,2,p) = elasticity%get_asFloat('C_12') diff --git a/src/source_damage_anisoDuctile.f90 b/src/source_damage_anisoDuctile.f90 index 2fdd46bb4..ffbb38d2a 100644 --- a/src/source_damage_anisoDuctile.f90 +++ b/src/source_damage_anisoDuctile.f90 @@ -36,6 +36,7 @@ module function source_damage_anisoDuctile_init(source_length) result(mySources) class(tNode), pointer :: & phases, & phase, & + mech, & pl, & sources, & src @@ -56,11 +57,12 @@ module function source_damage_anisoDuctile_init(source_length) result(mySources) allocate(source_damage_anisoDuctile_instance(phases%length), source=0) do p = 1, phases%length - phase => phases%get(p) + phase => phases%get(p) if(any(mySources(:,p))) source_damage_anisoDuctile_instance(p) = count(mySources(:,1:p)) if(count(mySources(:,p)) == 0) cycle + mech => phase%get('mech') + pl => mech%get('plasticity') sources => phase%get('source') - pl => phase%get('plasticity') do sourceOffset = 1, sources%length if(mySources(sourceOffset,p)) then source_damage_anisoDuctile_offset(p) = sourceOffset