flux3d_advection_diffusion_3d_t Function

public pure function flux3d_advection_diffusion_3d_t(this, s, dsdx) result(flux)

Arguments

TypeIntentOptionalAttributesName
class(advection_diffusion_3d_t), intent(in) :: this
real(kind=prec), intent(in) :: s(1:this%solution%nvar)
real(kind=prec), intent(in) :: dsdx(1:this%solution%nvar,1:3)

Return Value real(kind=prec)(1:this%solution%nvar,1:3)


Contents


Source Code

  pure function flux3d_advection_diffusion_3d_t(this,s,dsdx) result(flux)
    class(advection_diffusion_3d_t),intent(in) :: this
    real(prec),intent(in) :: s(1:this%solution%nvar)
    real(prec),intent(in) :: dsdx(1:this%solution%nvar,1:3)
    real(prec) :: flux(1:this%solution%nvar,1:3)
! Local
    integer :: ivar

    do ivar = 1,this%solution%nvar
      flux(ivar,1) = this%u*s(ivar)-this%nu*dsdx(ivar,1) ! advective flux + diffusive flux
      flux(ivar,2) = this%v*s(ivar)-this%nu*dsdx(ivar,2) ! advective flux + diffusive flux
      flux(ivar,3) = this%w*s(ivar)-this%nu*dsdx(ivar,3) ! advective flux + diffusive flux
    enddo

  endfunction flux3d_advection_diffusion_3d_t