Performs intermediate IB step>
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
subroutine cdifs_obj_AdvanceSolutionIB(this) !> Performs intermediate IB step> implicit none class(cdifs_obj), intent(inout) :: this !! CDIFS solver ! Work variable integer :: i,j,k integer :: dir ! Build forcing associate ( V => this%V, Vm => this%Vm, rho => this%rho, & ibS => this%ibS, ibF => this%ibF, op => this%op, & dt=>this%timer%dt) ! Update SDF ibS = 0.0_wp if (this%use_RP) call this%RP%UpdateSDF(ibS) if (this%use_IB) call this%IB%UpdateSDF(ibS) call this%bcs%UpdateBoundary(this%ibS) ! Interpolate velocities Vm(1)= op%intrp1(V(1)); call Vm(1)%UpdateGhostCells Vm(2)= op%intrp2(V(2)); call Vm(2)%UpdateGhostCells Vm(3)= op%intrp3(V(3)); call Vm(3)%UpdateGhostCells ! Recompute the forcing ibF(1) = 0.0_wp; ibF(2) = 0.0_wp; ibF(3) = 0.0_wp if (this%use_RP) call this%RP%GetIBForcing(Vm(1),Vm(2),Vm(3),rho,ibS,ibF,dt) if (this%use_IB) call this%IB%GetIBForcing(Vm(1),Vm(2),Vm(3),rho,ibS,ibF,dt) call this%bcs%UpdateBoundary(this%ibF) end associate ! Apply forcing associate ( V => this%V, ibF => this%ibF, rho => this%rho, & lo => this%block%lo, hi => this%block%hi, op=>this%op, & bcs => this%bcs, dt=>this%timer%dt) do k=lo(3),hi(3) do j=lo(2),hi(2) do i=lo(1),hi(1) if (this%maskV(1)%cell(i,j,k)>0) & V(1)%cell(i,j,k) = V(1)%cell(i,j,k) + dt/rho * dot_product(op%c_intrp1m(:,i),ibF(1)%cell(i-op%st:i+op%st-1,j,k)) if (this%maskV(2)%cell(i,j,k)>0) & V(2)%cell(i,j,k) = V(2)%cell(i,j,k) + dt/rho * dot_product(op%c_intrp2m(:,j),ibF(2)%cell(i,j-op%st:j+op%st-1,k)) if (this%maskV(3)%cell(i,j,k)>0) & V(3)%cell(i,j,k) = V(3)%cell(i,j,k) + dt/rho * dot_product(op%c_intrp3m(:,k),ibF(3)%cell(i,j,k-op%st:k+op%st-1)) end do end do end do do dir=1,3 call bcs%UpdateBoundary(V(dir)) end do end associate return end subroutine cdifs_obj_AdvanceSolutionIB