subroutine velocidades (max, u)

	integer max, i
	
	real,dimension(max) ::  u

	do i = 1, max
		u(i) = 10.0**(i-6)
	end do

end subroutine velocidades

!------------------------------------------------

subroutine reynolds (max, u, re, d, mi, ro)

	integer max, i

	real,dimension(max) :: u, re

	real d, mi, ro

	do i = 1, max
		re(i) = ro*u(i)*d/mi
	end do

end subroutine reynolds

!------------------------------------------------

subroutine nusselt (max, re, nu, e, d, Pr)

	integer max, i

	real,dimension(max) :: re, nu

	real e, d, Pr, f

	do i = 1, max
		if ( re(i) <= 2300 ) then
			nu(i) = 3.66
		else
			f = 0.25 * (( log10( (e/d)/3.7 + 5.74/(Re(i)**0.9) ) ) ** (-2.0))
			nu(i) = ((f/8.0)*(Re(i)-1000.0)*Pr) / ( 1.0+12.7*sqrt(f/8.0)*(Pr**(2.0/3.0)-1.0))
		end if
	end do

end subroutine nusselt