- Thank you received: 1
Stokes equation with purely Neumann boundary conditions
4 years 4 months ago #3054
by dong
Stokes equation with purely Neumann boundary conditions was created by dong
I tried to implement the Stokes equation with purely Neumann boundary conditions. Since only Neumann conditions are applied, u is only determined up to a constant c. Then I added a Lagrange multiplier to the weak form so that the variational problem is well-posed.
When running the code, the order of convergence of p was good, but the that of u was 0. The error of u is still the same when refining mesh. Please see the attached file.
Could you please tell me how to fix this error? Any help would be appreciated.
Thank you so much.
Code:
k = 2
V = VectorH1(mesh,order=k)
Q = H1(mesh,order=k-1)
R = NumberSpace(mesh)
X = FESpace([V, Q, R, R])
gfu = GridFunction(X)
(u,p, lam1, lam2), (v,q, mu1, mu2) = X.TnT()
lam = CoefficientFunction((lam1, lam2))
mu = CoefficientFunction((mu1, mu2))
When running the code, the order of convergence of p was good, but the that of u was 0. The error of u is still the same when refining mesh. Please see the attached file.
Could you please tell me how to fix this error? Any help would be appreciated.
Thank you so much.
Attachments:
- mneunteufel
- Offline
- Premium Member
Less
More
- Thank you received: 59
4 years 4 months ago #3055
by mneunteufel
Replied by mneunteufel on topic Stokes equation with purely Neumann boundary conditions
Hi dong,
by using the NumberSpaces you force that your solution has zero mean value for both velocity components.
Your exact solution, however, does not have zero mean value.
If you change your exact solution to have zero mean
you should get convergence (see attached file)
Best
Michael
by using the NumberSpaces you force that your solution has zero mean value for both velocity components.
Your exact solution, however, does not have zero mean value.
If you change your exact solution to have zero mean
Code:
u1=sin(pi*x)*sin(pi*y)-4/pi**2
Best
Michael
Attachments:
The following user(s) said Thank You: dong
Time to create page: 0.098 seconds