Computes d(U2 U1)/dx2.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(op_obj), | intent(in) | :: | this |
Differential operators utility |
||
| type(eulerian_obj_r), | intent(in) | :: | in1 |
Convecting velocity: Ui |
||
| type(eulerian_obj_r), | intent(in) | :: | in2 |
Velocity Uj |
Result
impure function op_obj_conv21(this,in1,in2) result(out) !> Computes d(U2 U1)/dx2. class(op_obj), intent(in) :: this !! Differential operators utility type(eulerian_obj_r), intent(in) :: in1 !! Convecting velocity: Ui type(eulerian_obj_r), intent(in) :: in2 !! Velocity Uj type(eulerian_obj_r) :: out !! Result ! Work variables type(eulerian_obj_r) :: in1c !! Interpolated Ui from face to cell center integer :: i,j,k,n call in1c%Initialize('in1c', this%block,this%parallel,2 ) call out%Initialize('ddx2(U2U1)',this%block,this%parallel,in2%staggering) out = 0.0_wp in1c = this%intrp1(in1) call in1c%UpdateGhostCells associate (lo => this%block%lo, hi => this%block%hi) do k=lo(3),hi(3) do j=lo(2),hi(2) do i=lo(1),hi(1) do n = -this%st+1, this%st out%cell(i,j,k) = out%cell(i,j,k) + this%c_d1dx2 (n,j)*in1c%cell(i,j+n,k)* & 0.5_wp*(in2%cell(i,j+2*n-1,k)+in2%cell(i,j,k)) end do end do end do end do end associate return end function op_obj_conv21