I am not a profi in hydrodynamics, but ... (hope that helps):
import numpy as np from CoolProp.CoolProp import PropsSI # from numpy import* # Remove this line, numpy is already imported as np! v = [1, 2, 3, 4, 5] # be pep8 compliant Tz = 42 + 273 v = 4e-2 # [m] s = 2e-2 # [m] #------------------------------------------------------------------------------------ npv = np.array(v, dtype=np.float64) # don't forget to specify the type of your data; A = npv * s # pep8, use npv instead of v; npv is a numpy array, that could be multiplied on a constant # A is an array now ob = 2 * (s + npv) # don't forget spaces; v -> npv Dh = (4 * A) / ob # elementwise division of vectors A and ob (hope `ob` doesn't not include zeros) # Probably, roZ is a scalar value... roZ = PropsSI('D', 'P', 101325, 'T', Tz, 'Air') # Probably, din_vis is a scalar value... din_vis= PropsSI('V', 'P', 101325, 'T', Tz, 'Air') kin_vis = din_vis / roZ # kin_vis = a scalar Re = (npv * Dh) / kin_vis # now Re is a numpy array (length(Re) = length(v)) Pr = PropsSI('PRANDTL', 'P', 101325, 'T', Tz, 'Air') # this is (probably) a scalar value print ('Re:', Re) print ('Pr:', Pr) # You can use for loop here: for r in Re: if r < 2300: print('Laminar flow, Re = ', r) elif r > 10000 and Pr >= 0.6 and Pr <= 160: print('Turbolent flow, Re = ', r) print('Pr = ', Pr) else: print('Re = ', r) print('Pr = ', Pr) # or use numpy vectorized notation: print('Laminar flow, Re = ', Re[Re < 2300]) if Pr >= 0.6 and Pr <= 160: print('Turbolent flow, Re = ', Re[Re > 10000])