AssertError in solving Stokes equation

I have at tutorial_create_nullspace a tutorial about singular problems, it’s not about Stokes equations but maybe it can help you understand what is going on in the part of the code where you set up the null space.

About your case: I don’t think you should impose the null space, since you don’t have a singular problem. The problem would have been singular if Dirichlet boundary conditions were imposed on the entire boundary, but you say you have a Neumann condition at the outflow.

Finally, make sure to read https://fenicsproject.discourse.group/t/read-before-posting-how-do-i-get-my-question-answered/21: the code you post is not fully reproducible, in the sense that people cannot just copy and paste to run it.

1 Like