fixed missing initialization causing a NaN in gdot and crashes
This commit is contained in:
parent
5bc93efd63
commit
7c8f2ede31
|
@ -253,37 +253,26 @@ subroutine plastic_dislokmc_init(fileUnit)
|
||||||
allocate(plastic_dislokmc_dipoleFormationFactor(maxNinstance), source=1.0_pReal) !should be on by default
|
allocate(plastic_dislokmc_dipoleFormationFactor(maxNinstance), source=1.0_pReal) !should be on by default
|
||||||
allocate(plastic_dislokmc_rhoEdge0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
allocate(plastic_dislokmc_rhoEdge0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_rhoEdgeDip0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
allocate(plastic_dislokmc_rhoEdgeDip0(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_burgersPerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
allocate(plastic_dislokmc_burgersPerSlipFamily(lattice_maxNslipFamily,maxNinstance),source=0.0_pReal)
|
||||||
source=0.0_pReal)
|
allocate(plastic_dislokmc_burgersPerTwinFamily(lattice_maxNtwinFamily,maxNinstance),source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_burgersPerTwinFamily(lattice_maxNtwinFamily,maxNinstance), &
|
allocate(plastic_dislokmc_QedgePerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
source=0.0_pReal)
|
allocate(plastic_dislokmc_v0PerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_QedgePerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
|
||||||
source=0.0_pReal)
|
|
||||||
allocate(plastic_dislokmc_v0PerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
|
||||||
source=0.0_pReal)
|
|
||||||
allocate(plastic_dislokmc_tau_peierlsPerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
allocate(plastic_dislokmc_tau_peierlsPerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
||||||
source=0.0_pReal)
|
source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_pPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
allocate(plastic_dislokmc_pPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_qPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
allocate(plastic_dislokmc_qPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_uPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
allocate(plastic_dislokmc_uPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_sPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
allocate(plastic_dislokmc_sPerSlipFamily(lattice_maxNslipFamily,maxNinstance), source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_Ndot0PerTwinFamily(lattice_maxNtwinFamily,maxNinstance), &
|
allocate(plastic_dislokmc_Ndot0PerTwinFamily(lattice_maxNtwinFamily,maxNinstance), source=0.0_pReal)
|
||||||
source=0.0_pReal)
|
allocate(plastic_dislokmc_twinsizePerTwinFamily(lattice_maxNtwinFamily,maxNinstance),source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_twinsizePerTwinFamily(lattice_maxNtwinFamily,maxNinstance), &
|
|
||||||
source=0.0_pReal)
|
|
||||||
allocate(plastic_dislokmc_CLambdaSlipPerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
allocate(plastic_dislokmc_CLambdaSlipPerSlipFamily(lattice_maxNslipFamily,maxNinstance), &
|
||||||
source=0.0_pReal)
|
source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_rPerTwinFamily(lattice_maxNtwinFamily,maxNinstance),source=0.0_pReal)
|
allocate(plastic_dislokmc_rPerTwinFamily(lattice_maxNtwinFamily,maxNinstance),source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_interaction_SlipSlip(lattice_maxNinteraction,maxNinstance), &
|
allocate(plastic_dislokmc_interaction_SlipSlip(lattice_maxNinteraction,maxNinstance),source=0.0_pReal)
|
||||||
source=0.0_pReal)
|
allocate(plastic_dislokmc_interaction_SlipTwin(lattice_maxNinteraction,maxNinstance),source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_interaction_SlipTwin(lattice_maxNinteraction,maxNinstance), &
|
allocate(plastic_dislokmc_interaction_TwinSlip(lattice_maxNinteraction,maxNinstance),source=0.0_pReal)
|
||||||
source=0.0_pReal)
|
allocate(plastic_dislokmc_interaction_TwinTwin(lattice_maxNinteraction,maxNinstance),source=0.0_pReal)
|
||||||
allocate(plastic_dislokmc_interaction_TwinSlip(lattice_maxNinteraction,maxNinstance), &
|
allocate(plastic_dislokmc_nonSchmidCoeff(lattice_maxNnonSchmid,maxNinstance), source=0.0_pReal)
|
||||||
source=0.0_pReal)
|
|
||||||
allocate(plastic_dislokmc_interaction_TwinTwin(lattice_maxNinteraction,maxNinstance), &
|
|
||||||
source=0.0_pReal)
|
|
||||||
allocate(plastic_dislokmc_nonSchmidCoeff(lattice_maxNnonSchmid,maxNinstance), &
|
|
||||||
source=0.0_pReal)
|
|
||||||
|
|
||||||
|
|
||||||
rewind(fileUnit)
|
rewind(fileUnit)
|
||||||
|
@ -406,7 +395,7 @@ subroutine plastic_dislokmc_init(fileUnit)
|
||||||
plastic_dislokmc_Nslip(j,instance) = IO_intValue(line,positions,1_pInt+j)
|
plastic_dislokmc_Nslip(j,instance) = IO_intValue(line,positions,1_pInt+j)
|
||||||
enddo
|
enddo
|
||||||
case ('rhoedge0','rhoedgedip0','slipburgers','qedge','v0','clambdaslip','tau_peierls','p_slip','q_slip',&
|
case ('rhoedge0','rhoedgedip0','slipburgers','qedge','v0','clambdaslip','tau_peierls','p_slip','q_slip',&
|
||||||
'u_slip','v_slip','s_slip')
|
'u_slip','s_slip')
|
||||||
do j = 1_pInt, Nchunks_SlipFamilies
|
do j = 1_pInt, Nchunks_SlipFamilies
|
||||||
tempPerSlip(j) = IO_floatValue(line,positions,1_pInt+j)
|
tempPerSlip(j) = IO_floatValue(line,positions,1_pInt+j)
|
||||||
enddo
|
enddo
|
||||||
|
@ -1195,7 +1184,6 @@ subroutine plastic_dislokmc_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature,
|
||||||
tau_slip_neg = tau_slip_pos
|
tau_slip_neg = tau_slip_pos
|
||||||
nonSchmid_tensor(1:3,1:3,1) = lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
|
nonSchmid_tensor(1:3,1:3,1) = lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
|
||||||
nonSchmid_tensor(1:3,1:3,2) = nonSchmid_tensor(1:3,1:3,1)
|
nonSchmid_tensor(1:3,1:3,2) = nonSchmid_tensor(1:3,1:3,1)
|
||||||
|
|
||||||
nonSchmidSystems: do k = 1,lattice_NnonSchmid(ph)
|
nonSchmidSystems: do k = 1,lattice_NnonSchmid(ph)
|
||||||
tau_slip_pos = tau_slip_pos + plastic_dislokmc_nonSchmidCoeff(k,instance)* &
|
tau_slip_pos = tau_slip_pos + plastic_dislokmc_nonSchmidCoeff(k,instance)* &
|
||||||
dot_product(Tstar_v,lattice_Sslip_v(1:6,2*k,index_myFamily+i,ph))
|
dot_product(Tstar_v,lattice_Sslip_v(1:6,2*k,index_myFamily+i,ph))
|
||||||
|
@ -1280,7 +1268,6 @@ subroutine plastic_dislokmc_LpAndItsTangent(Lp,dLp_dTstar99,Tstar_v,Temperature,
|
||||||
endif significantNegativeStress
|
endif significantNegativeStress
|
||||||
!* Plastic velocity gradient for dislocation glide
|
!* Plastic velocity gradient for dislocation glide
|
||||||
Lp = Lp + (gdot_slip_pos(j)+gdot_slip_neg(j))*0.5_pReal*lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
|
Lp = Lp + (gdot_slip_pos(j)+gdot_slip_neg(j))*0.5_pReal*lattice_Sslip(1:3,1:3,1,index_myFamily+i,ph)
|
||||||
|
|
||||||
!* Calculation of the tangent of Lp
|
!* Calculation of the tangent of Lp
|
||||||
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
|
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
|
||||||
dLp_dTstar3333(k,l,m,n) = &
|
dLp_dTstar3333(k,l,m,n) = &
|
||||||
|
@ -1436,6 +1423,7 @@ subroutine plastic_dislokmc_dotState(Tstar_v,Temperature,nSlipDamage,slipDamage,
|
||||||
|
|
||||||
!* Dislocation density evolution
|
!* Dislocation density evolution
|
||||||
gdot_slip_pos = 0.0_pReal
|
gdot_slip_pos = 0.0_pReal
|
||||||
|
gdot_slip_neg = 0.0_pReal
|
||||||
j = 0_pInt
|
j = 0_pInt
|
||||||
slipFamilies: do f = 1_pInt,lattice_maxNslipFamily
|
slipFamilies: do f = 1_pInt,lattice_maxNslipFamily
|
||||||
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
|
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
|
||||||
|
@ -1595,7 +1583,6 @@ subroutine plastic_dislokmc_dotState(Tstar_v,Temperature,nSlipDamage,slipDamage,
|
||||||
|
|
||||||
end subroutine plastic_dislokmc_dotState
|
end subroutine plastic_dislokmc_dotState
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief returns accumulated slip
|
!> @brief returns accumulated slip
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue