diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 040858e3f..abff6e21d 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -101,9 +101,9 @@ module constitutive module subroutine source_damage_anisoBrittle_dotState(S, ipc, ip, el) integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element real(pReal), intent(in), dimension(3,3) :: & S end subroutine source_damage_anisoBrittle_dotState @@ -111,17 +111,17 @@ module constitutive module subroutine source_damage_anisoDuctile_dotState(ipc, ip, el) integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element end subroutine source_damage_anisoDuctile_dotState module subroutine source_damage_isoDuctile_dotState(ipc, ip, el) integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element end subroutine source_damage_isoDuctile_dotState module subroutine source_thermal_externalheat_dotState(phase, of) @@ -143,28 +143,28 @@ module constitutive module subroutine constitutive_plastic_dependentState(F, Fp, ipc, ip, el) integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element real(pReal), intent(in), dimension(3,3) :: & - F, & !< elastic deformation gradient - Fp !< plastic deformation gradient + F, & !< elastic deformation gradient + Fp !< plastic deformation gradient end subroutine constitutive_plastic_dependentState module subroutine constitutive_plastic_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, & S, Fi, ipc, ip, el) integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element real(pReal), intent(in), dimension(3,3) :: & - S, & !< 2nd Piola-Kirchhoff stress - Fi !< intermediate deformation gradient + S, & !< 2nd Piola-Kirchhoff stress + Fi !< intermediate deformation gradient real(pReal), intent(out), dimension(3,3) :: & - Lp !< plastic velocity gradient + Lp !< plastic velocity gradient real(pReal), intent(out), dimension(3,3,3,3) :: & dLp_dS, & - dLp_dFi !< derivative of Lp with respect to Fi + dLp_dFi !< derivative of Lp with respect to Fi end subroutine constitutive_plastic_LpAndItsTangents @@ -190,8 +190,8 @@ module constitutive module subroutine constitutive_damage_getRateAndItsTangents(phiDot, dPhiDot_dPhi, phi, ip, el) integer, intent(in) :: & - ip, & !< integration point number - el !< element number + ip, & !< integration point number + el !< element number real(pReal), intent(in) :: & phi real(pReal), intent(inout) :: & @@ -202,8 +202,8 @@ module constitutive module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, Tstar, Lp, ip, el) integer, intent(in) :: & - ip, & !< integration point number - el !< element number + ip, & !< integration point number + el !< element number real(pReal), intent(in) :: & T real(pReal), intent(in), dimension(:,:,:,:,:) :: & @@ -231,41 +231,41 @@ module constitutive module subroutine kinematics_cleavage_opening_LiAndItsTangent(Ld, dLd_dTstar, S, ipc, ip, el) integer, intent(in) :: & - ipc, & !< grain number - ip, & !< integration point number - el !< element number + ipc, & !< grain number + ip, & !< integration point number + el !< element number real(pReal), intent(in), dimension(3,3) :: & S real(pReal), intent(out), dimension(3,3) :: & - Ld !< damage velocity gradient + Ld !< damage velocity gradient real(pReal), intent(out), dimension(3,3,3,3) :: & - dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor) + dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor) end subroutine kinematics_cleavage_opening_LiAndItsTangent module subroutine kinematics_slipplane_opening_LiAndItsTangent(Ld, dLd_dTstar, S, ipc, ip, el) integer, intent(in) :: & - ipc, & !< grain number - ip, & !< integration point number - el !< element number + ipc, & !< grain number + ip, & !< integration point number + el !< element number real(pReal), intent(in), dimension(3,3) :: & S real(pReal), intent(out), dimension(3,3) :: & - Ld !< damage velocity gradient + Ld !< damage velocity gradient real(pReal), intent(out), dimension(3,3,3,3) :: & - dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor) + dLd_dTstar !< derivative of Ld with respect to Tstar (4th-order tensor) end subroutine kinematics_slipplane_opening_LiAndItsTangent module subroutine kinematics_thermal_expansion_LiAndItsTangent(Li, dLi_dTstar, ipc, ip, el) integer, intent(in) :: & - ipc, & !< grain number - ip, & !< integration point number - el !< element number + ipc, & !< grain number + ip, & !< integration point number + el !< element number real(pReal), intent(out), dimension(3,3) :: & - Li !< thermal velocity gradient + Li !< thermal velocity gradient real(pReal), intent(out), dimension(3,3,3,3) :: & - dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero) + dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero) end subroutine kinematics_thermal_expansion_LiAndItsTangent @@ -289,9 +289,9 @@ module constitutive module subroutine source_damage_isoBrittle_deltaState(C, Fe, ipc, ip, el) integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element real(pReal), intent(in), dimension(3,3) :: & Fe real(pReal), intent(in), dimension(6,6) :: & @@ -613,7 +613,7 @@ function constitutive_collectDotState(S, FArray, Fi, FpArray, subdt, ipc, ip, el integer, intent(in) :: & ipc, & !< component-ID of integration point ip, & !< integration point - el, & !< element + el, & !< element phase, & of real(pReal), intent(in) :: & @@ -668,7 +668,7 @@ function constitutive_collectDotState(S, FArray, Fi, FpArray, subdt, ipc, ip, el sourceType: select case (phase_source(i,phase)) case (SOURCE_damage_anisoBrittle_ID) sourceType - call source_damage_anisoBrittle_dotState (S, ipc, ip, el) !< correct stress? + call source_damage_anisoBrittle_dotState (S, ipc, ip, el) ! correct stress? case (SOURCE_damage_isoDuctile_ID) sourceType call source_damage_isoDuctile_dotState ( ipc, ip, el) diff --git a/src/constitutive_damage.f90 b/src/constitutive_damage.f90 index fe9eb4e41..5e1ed848d 100644 --- a/src/constitutive_damage.f90 +++ b/src/constitutive_damage.f90 @@ -23,10 +23,10 @@ submodule(constitutive) constitutive_damage module subroutine source_damage_anisobrittle_getRateAndItsTangent(localphiDot, dLocalphiDot_dPhi, phi, phase, constituent) integer, intent(in) :: & - phase, & - constituent + phase, & !< phase ID of element + constituent !< position of element within its phase instance real(pReal), intent(in) :: & - phi + phi !< damage value real(pReal), intent(out) :: & localphiDot, & dLocalphiDot_dPhi @@ -102,6 +102,9 @@ submodule(constitutive) constitutive_damage contains +!---------------------------------------------------------------------------------------------- +!< @brief initialize damage sources and kinematics mechanism +!---------------------------------------------------------------------------------------------- module subroutine damage_init ! initialize source mechanisms @@ -118,7 +121,19 @@ module subroutine damage_init end subroutine damage_init -module procedure constitutive_damage_getRateAndItsTangents +!---------------------------------------------------------------------------------------------- +!< @brief returns local part of nonlocal damage driving force +!---------------------------------------------------------------------------------------------- +module subroutine constitutive_damage_getRateAndItsTangents(phiDot, dPhiDot_dPhi, phi, ip, el) + + integer, intent(in) :: & + ip, & !< integration point number + el !< element number + real(pReal), intent(in) :: & + phi + real(pReal), intent(inout) :: & + phiDot, & + dPhiDot_dPhi real(pReal) :: & localphiDot, & @@ -159,9 +174,12 @@ module procedure constitutive_damage_getRateAndItsTangents enddo enddo -end procedure constitutive_damage_getRateAndItsTangents +end subroutine constitutive_damage_getRateAndItsTangents +!---------------------------------------------------------------------------------------------- +!< @brief writes damage sources resultsvto HDF5 output file +!---------------------------------------------------------------------------------------------- module subroutine damage_results integer :: p,i diff --git a/src/constitutive_plastic.f90 b/src/constitutive_plastic.f90 index 873887149..f62bca60e 100644 --- a/src/constitutive_plastic.f90 +++ b/src/constitutive_plastic.f90 @@ -168,7 +168,6 @@ submodule(constitutive) constitutive_plastic end subroutine plastic_nonlocal_results - end interface @@ -197,11 +196,18 @@ module subroutine plastic_init end subroutine plastic_init +!-------------------------------------------------------------------------------------------------- +!> @brief calls microstructure function of the different plasticity constitutive models +!-------------------------------------------------------------------------------------------------- +module subroutine constitutive_plastic_dependentState(F, Fp, ipc, ip, el) -!-------------------------------------------------------------------------------------------------- -!> @brief calls microstructure function of the different constitutive models -!-------------------------------------------------------------------------------------------------- -module procedure constitutive_plastic_dependentState + integer, intent(in) :: & + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element + real(pReal), intent(in), dimension(3,3) :: & + F, & !< elastic deformation gradient + Fp !< plastic deformation gradient integer :: & ho, & !< homogenization @@ -222,14 +228,28 @@ module procedure constitutive_plastic_dependentState call plastic_nonlocal_dependentState (F,Fp,instance,of,ip,el) end select plasticityType -end procedure constitutive_plastic_dependentState +end subroutine constitutive_plastic_dependentState + !-------------------------------------------------------------------------------------------------- !> @brief contains the constitutive equation for calculating the velocity gradient ! ToDo: Discuss whether it makes sense if crystallite handles the configuration conversion, i.e. ! Mp in, dLp_dMp out !-------------------------------------------------------------------------------------------------- -module procedure constitutive_plastic_LpAndItsTangents +module subroutine constitutive_plastic_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, & + S, 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) :: & + S, & !< 2nd Piola-Kirchhoff stress + Fi !< intermediate deformation gradient + real(pReal), intent(out), dimension(3,3) :: & + Lp !< plastic velocity gradient + real(pReal), intent(out), dimension(3,3,3,3) :: & + dLp_dS, & + dLp_dFi !< derivative of Lp with respect to Fi real(pReal), dimension(3,3,3,3) :: & dLp_dMp !< derivative of Lp with respect to Mandel stress @@ -280,8 +300,12 @@ module procedure constitutive_plastic_LpAndItsTangents dLp_dS(i,j,1:3,1:3) = matmul(matmul(transpose(Fi),Fi),dLp_dMp(i,j,1:3,1:3)) ! ToDo: @PS: why not: dLp_dMp:(FiT Fi) enddo; enddo -end procedure constitutive_plastic_LpAndItsTangents +end subroutine constitutive_plastic_LpAndItsTangents + +!-------------------------------------------------------------------------------------------- +!> @brief writes plasticity constitutive results to HDF5 output file +!-------------------------------------------------------------------------------------------- module subroutine plastic_results integer :: p diff --git a/src/constitutive_thermal.f90 b/src/constitutive_thermal.f90 index ca40e21fa..5972f5dc3 100644 --- a/src/constitutive_thermal.f90 +++ b/src/constitutive_thermal.f90 @@ -39,8 +39,12 @@ submodule(constitutive) constitutive_thermal end subroutine source_thermal_externalheat_getRateAndItsTangent end interface + contains +!---------------------------------------------------------------------------------------------- +!< @brief initializes thermal sources and kinematics mechanism +!---------------------------------------------------------------------------------------------- module subroutine thermal_init ! initialize source mechanisms @@ -54,7 +58,21 @@ module subroutine thermal_init end subroutine thermal_init -module procedure constitutive_thermal_getRateAndItsTangents +!---------------------------------------------------------------------------------------------- +!< @brief calculates thermal dissipation rate +!---------------------------------------------------------------------------------------------- +module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, Tstar, Lp, ip, el) + integer, intent(in) :: & + ip, & !< integration point number + el !< element number + real(pReal), intent(in) :: & + T + real(pReal), intent(in), dimension(:,:,:,:,:) :: & + Tstar, & + Lp + real(pReal), intent(inout) :: & + TDot, & + dTDot_dT real(pReal) :: & my_Tdot, & @@ -94,6 +112,6 @@ module procedure constitutive_thermal_getRateAndItsTangents enddo enddo -end procedure constitutive_thermal_getRateAndItsTangents +end subroutine constitutive_thermal_getRateAndItsTangents end submodule