I getting an typeerror of 'unsupported operand type(s) for *: 'function' and 'function' '

This is my code,

x,t = sym.symbols('x[0] t')

mesh = Mesh()
with XDMFFile("mesh_5um/mesh_5um.xdmf") as infile:
    infile.read(mesh)

H = FunctionSpace(mesh, 'P', 1)    # heat
T = TrialFunction(H)
h = TestFunction(H)

q = sym.Piecewise((15e4*t, t <= 100) , (15e6, True))
q = sym.printing.ccode(q)
q = Expression(q, degree=1, t=0)

T_ini = Expression('298.15', degree=1)   
T_n = interpolate(T_ini, H) 

def k(T):   
    return 174.9274-0.1067*T+5.0067e-5*T**2-7.8349e-9*T**3

def mu(T):
    return 19302.7-0.23786*T-2.2448e-5*T**2

def c(T):
    return 128.308+3.2797e-2*T-3.4097e-6*T**2

class BoundaryTop(SubDomain):    
    def inside(self, x, on_boundary):
        return on_boundary and abs(x[0] - 0) < DOLFIN_EPS     
    
class BoundaryBottom(SubDomain):
    def inside(self,x,on_boundary):
        return on_boundary and abs(x[0] - 10e-6) < DOLFIN_EPS
    

b_Top = BoundaryTop()    
b_Bottom = BoundaryBottom()

boundary_markers = MeshFunction('size_t', mesh, mesh.topology().dim()-1)    

b_Top.mark(boundary_markers, 1)    
b_Bottom.mark(boundary_markers,2)

bc = DirichletBC(H, 363.15, boundary_markers, 2)    

ds = Measure('ds', domain = mesh, subdomain_data = boundary_markers)

T = Function(H)
T_n = Function(H)

F = mu*c*T*h*dx + dt*k*dot(grad(T), grad(h))*dx - mu*c*T_n*h*dx - dt*q*h*ds(1)

I getting an Typeerror

TypeError                                 Traceback (most recent call last)
<ipython-input-1-f12459c7f086> in <module>
    149 T_n = Function(H)
    150 
--> 151 F = mu*c*T*h*dx + dt*k*dot(grad(T), grad(h))*dx - mu*c*T_n*h*dx - dt*q*h*ds(1)
    152 
    153 

TypeError: unsupported operand type(s) for *: 'function' and 'function'

I do not know how to correct this error.

Please read Read before posting: How do I get my question answered?

That is not a reproducible example, since, for instance, we don’t have access to the mesh. You could have easily used a builtin mesh. You must also include the imports in your code.

From what I gather, in

def mu(T):
    return 19302.7-0.23786*T-2.2448e-5*T**2

is unnecessary to use a python function. Simply define a Function (not TrialFunction) T, and use it in

mu = 19302.7-0.23786*T-2.2448e-5*T**2