Exercise 5, Stokes Problem

advertisement
Exercise 5, Stokes Problem
I wish to solve exercise 5 in the notes about the Stokes problem. I dene my
functions spaces: V = H01 (U )d , Q = L2 (U ) and notes that f ∈ L2 (U )d . By
multiplying the rst equation by v ∈ V and integrate by parts I obtain:
Z
Z
∇u : ∇vdx −
U
Z
p (∇ · v) dx =
U
f
· vdx, ∀v ∈ V
U
and multiplying the second equation by q ∈ Q I obtain:
Z
q (∇ · u) dx = 0, ∀q ∈ Q
U
By adding this equations together I have a variational formulation of my
problem. I now nd the u and p that solves the problem. Note p will become
an "arbitrary" constant, since the problem is not probably
formulated.
In or
R
2
der to get p = 0 I have to add the restriction Q = q ∈ L (U ) : U qdx = 0 .
I now solve this by the FEM method and a compute. I use python and fenics .
See the program exercise5.py.
Figure 1: Plot of the solution u for 64 X 64 mesh.
1
Download