local_coords Subroutine

public subroutine local_coords(uvec, norm, span, strm, valid)

Uses

  • proc~~local_coords~~UsesGraph proc~local_coords local_coords module~modglobal modglobal proc~local_coords->module~modglobal

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension(3) :: uvec
real, intent(in), dimension(3) :: norm
real, intent(out), dimension(3) :: span
real, intent(out), dimension(3) :: strm
logical, intent(out) :: valid

Calls

proc~~local_coords~~CallsGraph proc~local_coords local_coords proc~cross_product cross_product proc~local_coords->proc~cross_product proc~is_equal is_equal proc~local_coords->proc~is_equal

Called by

proc~~local_coords~~CalledByGraph proc~local_coords local_coords proc~wallfunheat wallfunheat proc~wallfunheat->proc~local_coords proc~wallfunmom wallfunmom proc~wallfunmom->proc~local_coords proc~ibmwallfun ibmwallfun proc~ibmwallfun->proc~wallfunheat proc~ibmwallfun->proc~wallfunmom program~dalesurban DALESURBAN program~dalesurban->proc~ibmwallfun

Source Code

   subroutine local_coords(uvec, norm, span, strm, valid)
     ! returns the local streamwise (strm) and spanwise vectors (span) in the
     ! plane normal to (norm) containing the velocity vector (uvec)
     use modglobal, only : vec0
     real, intent(in),  dimension(3) :: uvec, norm
     real, intent(out), dimension(3) :: span, strm
     logical, intent(out) :: valid

     span = cross_product(norm, uvec)
     !if (is_equal(span, (/0.,0.,0./))) then
     ! velocity is pointing into or outof the surface
     if (is_equal(span, vec0)) then
       strm = 0.
       valid = .false.
     else
       span = span / norm2(span)
       valid = .true.
     end if
     strm = cross_product(span, norm)

   end subroutine local_coords