Builds and writes immersed boundary.
subroutine SetUpCaseIB() !> Builds and writes immersed boundary. use immersed_boundaries implicit none ! Work variables character(str64) :: filename type(marker_set) :: IB !! IB real(wp) :: center(3) !! IB plane centroid character(len=3) :: normal !! IB plane normal direction real(wp) :: width(3) !! IB plane width real(wp) :: vel(3) !! IB plane velocity real(wp) :: dl !! IB plane resolution (marker spacing) ! Get case info call parser%Get('IB IC file', filename ) ! Initialze resolved particles call IB%Initialize('IB',block,parallel) ! Root creates planes if (parallel%RankIsRoot()) then dl = 0.5_wp*minval(block%dx) ! Plane 1 (bottom) center = [ 0.5_wp*(block%pmin(1)+block%pmax(1)), & IBy(1), & 0.5_wp*(block%pmin(3)+block%pmax(3))] normal = '+x2' width = [ block%pmax(1)-block%pmin(1), & 0.0_wp, & block%pmax(3)-block%pmin(3) ] vel = 0.0_wp call IB%AddPlane(center,normal,width,vel,dl) ! Plane 2 (top) center = [ 0.5_wp*(block%pmin(1)+block%pmax(1)), & IBy(2), & 0.5_wp*(block%pmin(3)+block%pmax(3))] normal = '-x2' width = [ block%pmax(1)-block%pmin(1), & 0.0_wp, & block%pmax(3)-block%pmin(3) ] vel = 0.0_wp call IB%AddPlane(center,normal,width,vel,dl) end if ! Treatment for periodicity call IB%ApplyPeriodicity ! Send to the right rank call IB%Communicate ! Localize centers and markers on grid call IB%Localize ! Write data to disk call IB%SetWriteFileName(filename) call IB%Write(0,0.0_WP) ! Finalize call IB%Finalize return end subroutine SetUpCaseIB