I have two coupled nonlinear PDEs that I wish to solve. I try the following (following roughly the tutorial for mixed poisson equation):
c = Function(W)
(u,v) = TestFunction(W)
(T,xi) = Function(W)
F = dx*(v*(T*Dx(xi,1)+3*T**2*Dx(xi,0)**2+Dx(T,0)*Dx(xi,0))+Dx(v,0)*T*Dx(xi,0) + \
u*(T*Dx(T,1))+Dx(u,0)*(T*Dx(T,0)-2*T**3 *Dx(xi,0)))-Constant(0.)*v*dx-Constant(0.)*u*dx
solve(F == 0, c, [bc,bc2,bc3,bc4], solver_parameters={"newton_solver":
{"relative_tolerance": 1e-6}})
Here W is a product function space that I define as:
V = FunctionSpace(mesh,"Lagrange",1)
U = FunctionSpace(mesh,"Lagrange",1)
W = V*U
This gives me an error:
TypeError: unsupported operand type(s) for *: 'Measure' and 'Sum'
This probably has to do with the fact that, defined this way, type of my u,v,T and xi is ufl.indexed.Indexed instead of dolfin.functions.function.Argument, but I can't figure out how else I can define them. I also tried defining T and xi as TrialFunctions instead of Functions, but it didn't help. What is the correct way to do this?