fluxes are disabled when keyword "/nonlocal/" is omitted in the material.config (this is a way to use the constitutive_nonlocal model as a local dislocation based model)
This commit is contained in:
parent
322cbd2597
commit
6a3dd78259
|
@ -1469,23 +1469,25 @@ where (rhoSgl(:,1:2) > 0.0_pReal) &
|
|||
|
||||
|
||||
!****************************************************************************
|
||||
!*** calculate dislocation fluxes
|
||||
!*** calculate dislocation fluxes (only for nonlocal constitution)
|
||||
|
||||
rhoDotFlux = 0.0_pReal
|
||||
periodicSurfaceFlux = (/.false.,.true.,.false./)
|
||||
periodicSurfaceFlux = (/.false.,.false.,.false./)
|
||||
|
||||
m(:,:,1) = lattice_sd(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
m(:,:,2) = -lattice_sd(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
m(:,:,3) = lattice_st(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
m(:,:,4) = -lattice_st(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
if (.not. phase_localConstitution(material_phase(g,ip,el))) then ! only for nonlocal constitution
|
||||
|
||||
F = math_mul33x33(Fe(:,:,g,ip,el), Fp(:,:,g,ip,el))
|
||||
detFe = math_det3x3(Fe(:,:,g,ip,el))
|
||||
m(:,:,1) = lattice_sd(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
m(:,:,2) = -lattice_sd(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
m(:,:,3) = lattice_st(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
m(:,:,4) = -lattice_st(:, constitutive_nonlocal_slipSystemLattice(:,myInstance), myStructure)
|
||||
|
||||
fluxdensity = rhoSgl(:,1:4) * constitutive_nonlocal_v(:,:,g,ip,el)
|
||||
F = math_mul33x33(Fe(:,:,g,ip,el), Fp(:,:,g,ip,el))
|
||||
detFe = math_det3x3(Fe(:,:,g,ip,el))
|
||||
|
||||
!if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,*) '--> dislocation flux <---'
|
||||
do n = 1,FE_NipNeighbors(mesh_element(2,el)) ! loop through my neighbors
|
||||
fluxdensity = rhoSgl(:,1:4) * constitutive_nonlocal_v(:,:,g,ip,el)
|
||||
|
||||
!if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,*) '--> dislocation flux <---'
|
||||
do n = 1,FE_NipNeighbors(mesh_element(2,el)) ! loop through my neighbors
|
||||
|
||||
neighboring_el = mesh_ipNeighborhood(1,n,ip,el)
|
||||
neighboring_ip = mesh_ipNeighborhood(2,n,ip,el)
|
||||
|
@ -1507,11 +1509,11 @@ do n = 1,FE_NipNeighbors(mesh_element(2,el))
|
|||
surfaceNormal = surfaceNormal / math_norm3(surfaceNormal) ! normalize the surface normal to unit length
|
||||
|
||||
neighboring_rhoDotFlux = 0.0_pReal
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,i2)') 'neighbor',n
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,i2)') 'neighbor',n
|
||||
do s = 1,ns
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,i2)') ' system',s
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,i2)') ' system',s
|
||||
do t = 1,4
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,i2)') ' type',t
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,i2)') ' type',t
|
||||
c = (t + 1) / 2
|
||||
topp = t + mod(t,2) - mod(t+1,2)
|
||||
|
||||
|
@ -1523,7 +1525,7 @@ do n = 1,FE_NipNeighbors(mesh_element(2,el))
|
|||
if ( (opposite_el > 0 .and. opposite_ip > 0) &
|
||||
.or. .not. all(periodicSurfaceFlux(maxloc(abs(mesh_ipAreaNormal(:,opposite_n,ip,el))))) ) then
|
||||
rhoDotFlux(s,t) = rhoDotFlux(s,t) - lineLength / mesh_ipVolume(ip,el) ! subtract dislocation flux from cuurent mobile type
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,e12.5)') ' outgoing flux:', lineLength / mesh_ipVolume(ip,el)
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,e12.5)') ' outgoing flux:', lineLength / mesh_ipVolume(ip,el)
|
||||
endif
|
||||
rhoDotFlux(s,t+4) = rhoDotFlux(s,t+4) + lineLength / mesh_ipVolume(ip,el) &
|
||||
* (1.0_pReal - sum(constitutive_nonlocal_compatibility(c,:,s,n,ip,el)**2.0_pReal)) &
|
||||
|
@ -1538,8 +1540,8 @@ do n = 1,FE_NipNeighbors(mesh_element(2,el))
|
|||
neighboring_rhoDotFlux(:,topp) = neighboring_rhoDotFlux(:,topp) & ! ....transferring to opposite signed dislocation type at neighbor
|
||||
+ lineLength / mesh_ipVolume(neighboring_ip,neighboring_el) &
|
||||
* constitutive_nonlocal_compatibility(c,:,s,n,ip,el) ** 2.0_pReal
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,e12.5)') ' entering flux at neighbor:', lineLength / mesh_ipVolume(ip,el) &
|
||||
! * sum(constitutive_nonlocal_compatibility(c,:,s,n,ip,el) ** 2.0_pReal)
|
||||
! if ((debug_g==g .and. debug_i==ip .and. debug_e==el)) write(6,'(a,x,e12.5)') ' entering flux at neighbor:', lineLength / mesh_ipVolume(ip,el) &
|
||||
! * sum(constitutive_nonlocal_compatibility(c,:,s,n,ip,el) ** 2.0_pReal)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
@ -1558,12 +1560,14 @@ do n = 1,FE_NipNeighbors(mesh_element(2,el))
|
|||
neighboring_rhoDotFlux = 0.0_pReal
|
||||
endif
|
||||
|
||||
enddo ! neighbor loop
|
||||
enddo ! neighbor loop
|
||||
|
||||
if (any(abs(rhoDotFlux) > 0.0_pReal)) then
|
||||
if (any(abs(rhoDotFlux) > 0.0_pReal)) then
|
||||
!$OMP CRITICAL (fluxes)
|
||||
constitutive_nonlocal_rhoDotFlux(:,:,g,ip,el) = constitutive_nonlocal_rhoDotFlux(:,:,g,ip,el) + rhoDotFlux
|
||||
!$OMP END CRITICAL (fluxes)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue