avoid conversions
This commit is contained in:
parent
038dd1fc40
commit
fa8218124a
|
@ -643,17 +643,17 @@ module function RGC_updateState(P,F,avgF,dt,dPdF,ce) result(doneAndHappy)
|
|||
!-------------------------------------------------------------------------------------------------
|
||||
!> @brief compute the equivalent shear and bulk moduli from the elasticity tensor
|
||||
!-------------------------------------------------------------------------------------------------
|
||||
real(pReal) function equivalentMu(grainID,ce)
|
||||
real(pReal) function equivalentMu(co,ce)
|
||||
|
||||
integer, intent(in) :: &
|
||||
grainID,&
|
||||
co,&
|
||||
ce
|
||||
|
||||
real(pReal), dimension(6,6) :: C
|
||||
|
||||
|
||||
C = phase_homogenizedC66(material_phaseID(grainID,ce),material_phaseEntry(grainID,ce))
|
||||
equivalentMu = lattice_equivalent_mu(C,'voigt')
|
||||
C = phase_homogenizedC66(material_phaseID(co,ce),material_phaseEntry(co,ce))
|
||||
equivalentMu = lattice_equivalent_mu(math_sym3333to66(math_Voigt66to3333(C)),'voigt') !ToDo: Bug, should be Voigt not sym
|
||||
|
||||
end function equivalentMu
|
||||
|
||||
|
|
|
@ -234,10 +234,10 @@ module phase
|
|||
integer, intent(in) :: ph, en
|
||||
real(pReal), dimension(6,6) :: C
|
||||
end function phase_homogenizedC66
|
||||
module function phase_damage_C66(C66,ph,en)
|
||||
module function phase_damage_C66(C66,ph,en) result(C66_degraded)
|
||||
real(pReal), dimension(6,6), intent(in) :: C66
|
||||
integer, intent(in) :: ph,en
|
||||
real(pReal), dimension(6,6) :: phase_damage_C66
|
||||
real(pReal), dimension(6,6) :: C66_degraded
|
||||
end function phase_damage_C66
|
||||
|
||||
module function phase_f_phi(phi,co,ce) result(f)
|
||||
|
|
|
@ -151,18 +151,18 @@ end function phase_damage_constitutive
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns the degraded/modified elasticity matrix
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module function phase_damage_C66(C66,ph,en)
|
||||
module function phase_damage_C66(C66,ph,en) result(C66_degraded)
|
||||
|
||||
real(pReal), dimension(6,6), intent(in) :: C66
|
||||
integer, intent(in) :: ph,en
|
||||
real(pReal), dimension(6,6) :: phase_damage_C66
|
||||
real(pReal), dimension(6,6) :: C66_degraded
|
||||
|
||||
|
||||
damageType: select case (phase_damage(ph))
|
||||
case (DAMAGE_ISOBRITTLE_ID) damageType
|
||||
phase_damage_C66 = C66 * damage_phi(ph,en)**2
|
||||
C66_degraded = C66 * damage_phi(ph,en)**2
|
||||
case default damageType
|
||||
phase_damage_C66 = C66
|
||||
C66_degraded = C66
|
||||
end select damageType
|
||||
|
||||
end function phase_damage_C66
|
||||
|
|
|
@ -96,6 +96,7 @@ end function isobrittle_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief calculates derived quantities from state
|
||||
! ToDo: Use Voigt directly
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
module subroutine isobrittle_deltaState(C, Fe, ph,en)
|
||||
|
||||
|
@ -109,13 +110,16 @@ module subroutine isobrittle_deltaState(C, Fe, ph,en)
|
|||
epsilon
|
||||
real(pReal) :: &
|
||||
r_W
|
||||
real(pReal), dimension(6,6) :: &
|
||||
C_sym
|
||||
|
||||
|
||||
C_sym = math_sym3333to66(math_Voigt66to3333(C))
|
||||
epsilon = 0.5_pReal*math_sym33to6(matmul(transpose(Fe),Fe)-math_I3)
|
||||
|
||||
associate(prm => param(ph), stt => state(ph), dlt => deltaState(ph))
|
||||
|
||||
r_W = 2.0_pReal*dot_product(epsilon,matmul(C,epsilon))/prm%W_crit
|
||||
r_W = 2.0_pReal*dot_product(epsilon,matmul(C_sym,epsilon))/prm%W_crit
|
||||
dlt%r_W(en) = merge(r_W - stt%r_W(en), 0.0_pReal, r_W > stt%r_W(en))
|
||||
|
||||
end associate
|
||||
|
|
|
@ -152,7 +152,7 @@ module subroutine phase_hooke_SandItsTangents(S, dS_dFe, dS_dFi, &
|
|||
i, j
|
||||
|
||||
|
||||
C = math_66toSym3333(phase_damage_C66(phase_homogenizedC66(ph,en),ph,en))
|
||||
C = math_Voigt66to3333(phase_damage_C66(phase_homogenizedC66(ph,en),ph,en))
|
||||
|
||||
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
|
||||
|
@ -176,9 +176,9 @@ module function phase_homogenizedC66(ph,en) result(C)
|
|||
|
||||
plasticType: select case (phase_plasticity(ph))
|
||||
case (PLASTICITY_DISLOTWIN_ID) plasticType
|
||||
C = plastic_dislotwin_homogenizedC(ph,en)
|
||||
C = math_3333toVoigt66(math_66toSym3333(plastic_dislotwin_homogenizedC(ph,en)))
|
||||
case default plasticType
|
||||
C = math_sym3333to66(math_Voigt66to3333(elastic_C66(ph,en)))
|
||||
C = elastic_C66(ph,en)
|
||||
end select plasticType
|
||||
|
||||
end function phase_homogenizedC66
|
||||
|
|
Loading…
Reference in New Issue