Dear all,
I have been trying to solve the following coupled problem:
T is the temperature, P is the pressure, I am trying to solve in 1D first.
I have a robin boundary condition for both boundaries at the sides for pressure.
For the temperature I have a Dirichilet boundary condition and a Robin condition at the opposite side.
However I have 2 major doubts. The first one is that I am trying to define the function space for my two scalar functions:
P1 = FiniteElement('P', interval , 1)
V = FunctionSpace(mesh, MixedElement([P1,P1]))
u = Function(V)
However, when trying to define the Dirichilet Boundary Condition,
T_D = Expression('t + 120.0', degree=2, t=0)
bcl_T = 'near(x[0],0)'
bc = DirichletBC(V, T_D, bcl_T)
I get the following error:
*** Error: Unable to create Dirichlet boundary condition.
*** Reason: Expecting a vector-valued boundary value but given function is scalar.
*** Where: This error was encountered inside DirichletBC.cpp.
I think I don't understand what I am doing with a MixedElement, I thought I would have a function space for both my scalar functions (Temperature T and Pressure P).
I am also in doubt of how to develop the variational formulation.
I have put equations 1 and 2 in their weak form, I supose I have to use different test functions and sum them.
As they are nonlinear, I would solve F == 0, where F would be the sum of both weak forms of equations 1 and 2.
Am I right?
Thank you for your attention, evryone here is really helpful.
All the best, Murilo.