Builds and writes point particles.
subroutine SetUpCasePP() use particles_point !> Builds and writes point particles. implicit none ! Work variables type(particle_set) :: PP character(str64) :: filename character(str64) :: part_type real(wp) :: L(3) real(wp) :: dp real(wp) :: rhop integer :: n ! Get info from parser call parser%Get("PP IC file", filename) call parser%Get("Particle diameter", dp ) call parser%Get("Particle density", rhop ) call parser%Get("Particle type", part_type, default = 'default') ! Initialize point particle data data call PP%Initialize('PP',block,parallel) call PP%ChangePartType(part_type) if (parallel%RankIsRoot()) then L = block%pmax - block%pmin ! Activate Np particles call PP%Resize(2) ! Place particles in head-on collisions select type (particle => PP%p) class is (particle_obj) do n=1,PP%count_ ! Particle global ID particle(n)%id = int(n, kind=8) ! Particle diameter particle(n)%d = dp select case (n) case (1) ! Particle position particle(n)%p(1) = 0.5_wp*(block%pmin(1) + block%pmax(1)) particle(n)%p(2) = 0.5_wp*(block%pmin(2) + block%pmax(2)) - particle(n)%d particle(n)%p(3) = 0.5_wp*(block%pmin(3) + block%pmax(3)) ! Particle velocity particle(n)%v = [0.0_wp, 1.0_wp, 0.0_wp] case (2) ! Particle position particle(n)%p(1) = 0.5_wp*(block%pmin(1) + block%pmax(1)) particle(n)%p(2) = 0.5_wp*(block%pmin(2) + block%pmax(2)) + particle(n)%d particle(n)%p(3) = 0.5_wp*(block%pmin(3) + block%pmax(3)) ! Particle velocity particle(n)%v = [0.0_wp, -1.0_wp, 0.0_wp] end select ! Particle density particle(n)%rho= rhop ! Force and Torque on particle particle(n)%Fh = 0.0_wp particle(n)%Th = 0.0_wp particle(n)%Fc = 0.0_wp particle(n)%Tc = 0.0_wp end do end select end if ! Apply periodicity call PP%ApplyPeriodicity() ! Write data to disk call PP%SetWriteFileName(filename) call PP%Write(0,0.0_wp) ! Clear data call PP%Finalize() return end subroutine SetUpCasePP