!中间层粒子初始化
do i = 2,ndivz
do j = 1,ndivy
do k = 1,ndivx
coordz=-thick/2.0d0+(dx/2.0d0)+(i-1)*dx !沿z轴递增,形成冰层主体
coordy=-width/2.0d0+(dx/2.0d0)+(j-1)*dx
coordx=-length/2.0d0+(dx/2.0d0)+(k-1)*dx
nnum=nnum + 1
coord(nnum,:) = (/coordx,coordy,coordz/)
enddo
enddo
enddo
!边界区域粒子初始化
!! 左侧边界 边界层:在x/y方向扩展±nbnd*dx,模拟冰板边缘约束
do i = 1,ndivz
do k = 1,nbnd
do j = 1,ndivy
coordz = -thick/2.0d0+ (dx/2.0d0)+(i-1)*dx !
coordx = -length/2.0d0-(dx/2.0d0)-(k-1)*dx
coordy = -width/2.0d0+(dx/2.0d0)+(j-1)*dx
nnum = nnum+1
coord(nnum,:) = (/coordx,coordy,coordz/)
enddo
enddo
enddo
!右侧边界(对称位置)
do i = 1,ndivz
do k = 1,nbnd
do j = 1,ndivy
coordz = -thick/2.0d0+(dx/2.0d0)+(i - 1)*dx
coordx =length/2.0d0+(dx/2.0d0)+(k - 1)*dx
coordy = -width/2.0d0+(dx/2.0d0)+(j - 1)*dx
nnum = nnum + 1
coord(nnum,:) = (/coordx,coordy,coordz/)
enddo
enddo
enddo
!Material points of the boundary region – upside
do i = 1,ndivz
do j = 1,nbnd
do k = 1,ndivx
coordz = -thick/2.0d0+ (dx/2.0d0)+(i-1)*dx
coordy = width/2.0d0+ (dx/2.0d0)+(j-1)*dx
coordx = -length/2.0d0+ (dx/2.0d0)+(k-1)*dx
nnum = nnum + 1
coord(nnum,:) = (/coordx,coordy,coordz/)
enddo
enddo
enddo
!Material points of the boundary region – downside
do i = 1,ndivz
do j = 1,nbnd
do k = 1,ndivx
coordz = -thick/2.0d0+(dx/2.0d0)+(i-1)*dx
coordy = -width/2.0d0-(dx/2.0d0)-(j-1)*dx
coordx = -length/2.0d0+(dx/2.0d0)+(k-1)*dx
nnum = nnum + 1
coord(nnum,:) = (/coordx,coordy,coordz/)
enddo
enddo
enddo
! 邻域搜索初始化
!Determination of material points inside the horizon of each material point确定每个物质点视界内的物质点
do i = 1,totnode
if (i.eq.1) then
pointfam(i,1) = 1 ! 第一个粒子的家族索引
else
pointfam(i,1) = pointfam(i-1,1) + numfam(i-1,1) ! 累加家族数量
endif
! 邻域搜索循环
do j = 1,totnode
idist = dsqrt((coord(j,1) - coord(i,1))**2 + (coord(j,2) - coord(i,2))**2 + (coord(j,3) - coord(i,3))**2)
if (i.ne.j) then
if(idist.le.delta) then
numfam(i,1) = numfam(i,1) + 1
nodefam(pointfam(i,1)+numfam(i,1)-1,1) = j
endif
endif
enddo
enddo
!Determination of surface correction factors
!Loading 1
do i = 1, totnode
disp(i,1) = 0.001d0 * coord(i,1)
disp(i,2) = 0.0d0
disp(i,3) = 0.0d0
enddo
if (idist.le.delta-radij) then
fac = 1.0d0
elseif (idist.le.delta+radij) then
fac = (delta+radij-idist)/(2.0d0*radij)
else
fac = 0.0d0
endif
stendens(i,1) = stendens(i,1) + 0.5d0 * 0.5d0 * bc * ((nlength - idist) / idist)**2 * idist * vol * fac
enddo
!Calculation of surface correction factor in x direction
!by finding the ratio of the analytical strain energy density value
!to the strain energy density value obtained from PD Theory
fncst(i,1) = sedload1 / stendens(i,1)
enddo
!Loading 2
do i = 1, totnode
disp(i,1) = 0.0d0
disp(i,2) = 0.001d0 * coord(i,2)
disp(i,3) = 0.0d0
enddo
do i = 1, totnode
stendens(i,2) = 0.0d0
do j = 1,numfam(i,1)
cnode = nodefam(pointfam(i,1)+j-1,1)
idist = dsqrt((coord(cnode,1) - coord(i,1))**2 + (coord(cnode,2) - coord(i,2))**2 + (coord(cnode,3) - coord(i,3))**2)
nlength = dsqrt((coord(cnode,1) + disp(cnode,1) - coord(i,1) - disp(i,1))**2 + (coord(cnode,2) + disp(cnode,2) - coord(i,2) - disp(i,2))**2+(coord(cnode,3) + disp(cnode,3) - coord(i,3) - disp(i,3))**2)
if (idist.le.delta-radij) then
fac = 1.0d0
elseif (idist.le.delta+radij) then
fac = (delta+radij-idist)/(2.0d0*radij)
else
fac = 0.0d0
endif
code
stendens(i,2) = stendens(i,2) + 0.5d0 * 0.5d0 * bc * ((nlength - idist) / idist)**2 * idist * vol * fac
enddo
!Calculation of surface correction factor in y direction
!by finding the ratio of the analytical strain energy density value
!to the strain energy density value obtained from PD Theory
fncst(i,2) = sedload2 / stendens(i,2)
enddo
!Loading 3
do i = 1, totnode
disp(i,1) = 0.0d0
disp(i,2) = 0.0d0
disp(i,3) = 0.001d0 * coord(i,3)
enddo
do i = 1, totnode
stendens(i,3) = 0.0d0
do j = 1,numfam(i,1)
cnode = nodefam(pointfam(i,1)+j-1,1)
idist = dsqrt((coord(cnode,1) - coord(i,1))**2 + (coord(cnode,2) - coord(i,2))**2 + (coord(cnode,3) - coord(i,3))**2)
nlength = dsqrt((coord(cnode,1) + disp(cnode,1) - coord(i,1) - disp(i,1))**2 + (coord(cnode,2) + disp(cnode,2) - coord(i,2) - disp(i,2))**2 + (coord(cnode,3) + disp(cnode,3) - coord(i,3) - disp(i,3))**2)
if (idist.le.delta-radij) then
fac = 1.0d0
elseif (idist.le.delta+radij) then
fac = (delta+radij-idist)/(2.0d0*radij)
else
fac = 0.0d0
endif
stendens(i,3) = stendens(i,3) + 0.5d0 * 0.5d0 * bc * ((nlength - idist) / idist)**2 * idist * vol * fac
enddo
!Calculation of surface correction factor in z direction
!by finding the ratio of the analytical strain energy density value
!to the strain energy density value obtained from PD Theory
fncst(i,3) = sedload3 / stendens(i,3)
enddo
!Initialization of displacements and velocities
do i = 1,totnode
vel(i,1) = 0.0d0
disp(i,1)= 0.0d0
vel(i,2) = 0.0d0
disp(i,2)= 0.0d0
vel(i,3) = 0.0d0
disp(i,3)= 0.0d0
enddo
!Stable mass vector computation
do i = 1, totnode
massvec(i,1) = 1.28d0dens0
massvec(i,2) = 1.28d0dens0
massvec(i,3) = 1.28d0*dens0
enddo
! 冲击波传播计算 ! 球形扩展
!Application of boundary conditions at the top edges
if(RR.le.length2.0d0**(1.0d0/2.0d0)/2.0d0)then
RR=dsqrt((1500.0d0ttdt)**2.0d0+3000.0d0ttdtr)
else
RR=length2.0d0**(1.0d0/2.0d0)/2.0d0
endif
!冲击波球形扩张作用于冰板上圆形范围的半径
S=piRR**2.0d0
!冲击波球形扩张作用于冰板上圆形范围的面积