I have a problem whit sympy, i need to solve a system of two equation : B1=2.51/(Re(f^(0.5))) f=(1/(-2*log10((epsilon/D/3.7)+B1)))^2 I tryed using sympy, numpy and fsolve, but there is a problem with the use of math.log10, that returns a float:
from sympy import*
import math
def f_cole(Epsilon, D, Re):
#Fattore di attrito Equazione di Colebrook per flusso turbolento
B1,f=symbols('B1,f')
eq1 =Eq(( 2.51 / (Re*(f**0.5))-B1),0)
eq2=Eq(((1/(-2* math.log10((Epsilon/D/ 3.7)+B1)))**2 -f),0)
solveset((eq1,eq2), (B1,f))
return(f)
That returns :
TypeError: can't convert expression to float