Hi,
I have a 2D rectangular system with 3 different boundary conditions. The left and right edges have a Dirichlet boundary condition, $ u = g_1 $, and the bottom edge also has a Dirichlet boundary condition, $ u = g_2(x) $. The top boundary is a mixed boundary condition, $ u_x = h_1 $, $ \partial_y u_y = h_2 $.
My understanding is that the corner nodes where the boundaries meet should have the same boundary condition as the left and right edges. Currently, I have the Dirichlet BCs set up using the DirichletBC class and the Neumann part of the mixed BC is in the weak form. However, I'm having problems with the solution near the top corners where the solution is diverging:
How does FEniCS treat the nodes at the top corners where the two different types of boundary conditions meet and is there a way to ensure that the corner nodes will have the Dirichlet BC $ u = g_1 $? Is there some special treatment required for cases like this? If so, can you point me towards some literature on this?
Thank you.
ETA: The system is a two-phase flow system where there are two sets of governing equations, one for each phase. I'm using an explicit scheme where I first compute the tentative velocities. I then use the velocities to compute the pressure and then use the pressure to compute the velocities at the current time step. From that, I use the conservation of mass equation to get the phase fractions (alpha): $ \frac{\partial \alpha_i}{\partial t} + \nabla \cdot (\alpha_i u_i) = 0 $. The screenshot shown above is from a plot of one of the alphas. I've included the code in the comment below.