Computes collisions between Point Particles and Walls.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(collision_obj), | intent(inout) | :: | this |
Collision utility |
pure subroutine collision_obj_ComputeCollisionsPPvWALL(this) !> Computes collisions between Point Particles and Walls. implicit none class(collision_obj), intent(inout) :: this !! Collision utility ! Work variable integer :: n real(wp):: r1(3), r2(3) real(wp):: d1 , d2 real(wp):: m1 , m2 real(wp):: v1(3), v2(3) real(wp):: w1(3), w2(3) real(wp):: n12(3) real(wp):: Fcol(3) real(wp):: Tcol(3) real(wp), parameter :: Pi=4.0_wp*atan(1.0_wp) select type ( center => this%PP%p) type is (particle_obj) do n=1,this%PP%count_ ! Ignore Ghost Particles if (center(n)%id.le.0) cycle ! Particle info r1 = center(n)%p d1 = center(n)%d m1 = center(n)%rho*Pi/6.0_wp*center(n)%d**3 v1 = center(n)%v w1 = center(n)%w ! Bottom wall collision ! ---------------------- ! Wall info r2 = r1; r2(this%wall_dir) = this%wall_bottom d2 = 0.0_wp m2 = m1*1e6_wp v2 = 0.0_wp w2 = 0.0_wp ! Particle-wall collision force Fcol = DEM_col(r1,r2,d1,d2,m1,m2,v1,v2,w1,w2,this%tcol,this%edry,this%muc) ! Torque n12 = (r2-r1)/(norm2(r2-r1)+epsilon(1.0_wp)) Tcol = cross_product (0.5_wp*d1*n12,Fcol) center(n)%Fc = center(n)%Fc + Fcol center(n)%Tc = center(n)%Tc + Tcol ! Top wall collision ! ---------------------- ! Wall info r2 = r1; r2(this%wall_dir) = this%wall_top d2 = 0.0_wp m2 = m1*1e6_wp v2 = 0.0_wp w2 = 0.0_wp ! Particle-wall collision force Fcol = DEM_col(r1,r2,d1,d2,m1,m2,v1,v2,w1,w2,this%tcol,this%edry,this%muc) ! Torque n12 = (r2-r1)/(norm2(r2-r1)+epsilon(1.0_wp)) Tcol = cross_product (0.5_wp*d1*n12,Fcol) center(n)%Fc = center(n)%Fc + Fcol center(n)%Tc = center(n)%Tc + Tcol end do end select return end subroutine collision_obj_ComputeCollisionsPPvWALL