Performs predictor step: compute intermediate velocity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
subroutine cdifs_obj_AdvanceSolutionPredictor(this) !> Performs predictor step: compute intermediate velocity. implicit none class(cdifs_obj), intent(inout) :: this !! CDIFS solver ! Work variables integer :: dir associate ( V => this%V, P => this%P ,Vold => this%Vold, & resV => this%resV, rho => this%rho, visc => this%visc, & bcs => this%bcs, dt => this%timer%dt, op => this%op) ! Predictor step !------------------------- ! - Build midstep velocities do dir=1,3 V(dir) = (V(dir)+Vold(dir))*0.5_wp end do ! - Compute momentum right-hand side resV(1) = cdifs_AdvanceSolutionMomentumRHS1(this) resV(2) = cdifs_AdvanceSolutionMomentumRHS2(this) resV(3) = cdifs_AdvanceSolutionMomentumRHS3(this) ! - Update velocities to intermediate state do dir=1,3 ! buid new velocity: u_{k+1}^{n+1} V(dir)%cell = Vold(dir)%cell + dt*(resV(dir)%cell + this%srcV(dir)%cell) call bcs%UpdateBoundary(V(dir)) end do end associate return end subroutine cdifs_obj_AdvanceSolutionPredictor