From 3563bce6cbeb0db53a524bf4c90bf68c16538e27 Mon Sep 17 00:00:00 2001 From: Sharan Roongta Date: Fri, 10 Jul 2020 18:29:36 +0200 Subject: [PATCH] better --- src/constitutive.f90 | 181 ++++++++++++++--------------------- src/constitutive_damage.f90 | 4 +- src/constitutive_thermal.f90 | 4 +- 3 files changed, 78 insertions(+), 111 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index c44c07de1..de735fe55 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -141,6 +141,80 @@ module constitutive el !< element end function constitutive_homogenizedC + module subroutine constitutive_plastic_dependentState(F, Fp, ipc, ip, el) + + 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 + 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 + 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 + + end subroutine constitutive_plastic_LpAndItsTangents + + pure module function kinematics_thermal_expansion_initialStrain(homog,phase,offset) result(initialStrain) + + integer, intent(in) :: & + phase, & + homog, & + offset + real(pReal), dimension(3,3) :: & + initialStrain + + end function kinematics_thermal_expansion_initialStrain + + module subroutine plastic_nonlocal_updateCompatibility(orientation,instance,i,e) + integer, intent(in) :: & + instance, & + i, & + e + type(rotation), dimension(1,discretization_nIP,discretization_nElem), intent(in) :: & + orientation !< crystal orientation + end subroutine plastic_nonlocal_updateCompatibility + + 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 + + end subroutine constitutive_damage_getRateAndItsTangents + + 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 + end subroutine constitutive_thermal_getRateAndItsTangents + module subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dMi,Mi,instance,of) real(pReal), dimension(3,3), intent(out) :: & @@ -226,7 +300,6 @@ module constitutive end subroutine source_damage_isoBrittle_deltaState - module subroutine plastic_isotropic_results(instance,group) integer, intent(in) :: instance character(len=*), intent(in) :: group @@ -277,79 +350,6 @@ module constitutive character(len=*), intent(in) :: group end subroutine source_damage_isoDuctile_results - module subroutine constitutive_plastic_dependentState(F, Fp, ipc, ip, el) - - 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 - 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 - 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 - - end subroutine constitutive_plastic_LpAndItsTangents - - pure module function kinematics_thermal_expansion_initialStrain(homog,phase,offset) result(initialStrain) - - integer, intent(in) :: & - phase, & - homog, & - offset - real(pReal), dimension(3,3) :: & - initialStrain - - end function kinematics_thermal_expansion_initialStrain - - module subroutine plastic_nonlocal_updateCompatibility(orientation,instance,i,e) - integer, intent(in) :: & - instance, & - i, & - e - type(rotation), dimension(1,discretization_nIP,discretization_nElem), intent(in) :: & - orientation !< crystal orientation - end subroutine plastic_nonlocal_updateCompatibility - - module subroutine damage_source_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 - end subroutine damage_source_getRateAndItsTangents - - module subroutine thermal_source_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 - end subroutine thermal_source_getRateAndItsTangents - end interface @@ -779,39 +779,6 @@ function constitutive_deltaState(S, Fe, Fi, ipc, ip, el, phase, of) result(broke end function constitutive_deltaState -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 - - call thermal_source_getRateAndItsTangents(Tdot, dTdot_dT, T, Tstar, Lp, ip, el) - -end subroutine constitutive_thermal_getRateAndItsTangents - -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 - - call damage_source_getRateAndItsTangents(phiDot,dPhiDot_dPhi,phi,ip,el) - -end subroutine constitutive_damage_getRateAndItsTangents - !-------------------------------------------------------------------------------------------------- !> @brief writes constitutive results to HDF5 output file diff --git a/src/constitutive_damage.f90 b/src/constitutive_damage.f90 index b7d1632f8..6dae6e298 100644 --- a/src/constitutive_damage.f90 +++ b/src/constitutive_damage.f90 @@ -109,7 +109,7 @@ module subroutine damage_init end subroutine damage_init -module procedure damage_source_getRateAndItsTangents +module procedure constitutive_damage_getRateAndItsTangents real(pReal) :: & localphiDot, & @@ -150,6 +150,6 @@ module procedure damage_source_getRateAndItsTangents enddo enddo -end procedure damage_source_getRateAndItsTangents +end procedure constitutive_damage_getRateAndItsTangents end submodule diff --git a/src/constitutive_thermal.f90 b/src/constitutive_thermal.f90 index 48908b997..5526fb1d3 100644 --- a/src/constitutive_thermal.f90 +++ b/src/constitutive_thermal.f90 @@ -56,7 +56,7 @@ module subroutine thermal_init end subroutine thermal_init -module procedure thermal_source_getRateAndItsTangents +module procedure constitutive_thermal_getRateAndItsTangents real(pReal) :: & my_Tdot, & @@ -96,6 +96,6 @@ module procedure thermal_source_getRateAndItsTangents enddo enddo -end procedure thermal_source_getRateAndItsTangents +end procedure constitutive_thermal_getRateAndItsTangents end submodule