- Thank you received: 1
Different results when running Stokes equation example
4 years 6 months ago #2661
by dong
Different results when running Stokes equation example was created by dong
I tried to run the example in 2.6
Stokes equations
The results that I got in line 8 was different from what it was in the documentation.
It should be V.ndof = 1660 , Q.ndof = 2328.
Could you tell me why i got this error and how to fix this problem? Thank you so much.
The results that I got in line 8 was different from what it was in the documentation.
Code:
V.ndof = 1664 , Q.ndof = 2334
---------------------------------------------------------------------------
NgException Traceback (most recent call last)
<ipython-input-8-4e71f02dc134> in <module>
4 X = FESpace([V,V,Q])
5
----> 6 gfu = SolveStokes(X)
<ipython-input-6-abe06cca85c3> in SolveStokes(X)
12 res = gfu.vec.CreateVector()
13 res.data = -a.mat * gfu.vec
---> 14 inv = a.mat.Inverse(freedofs=X.FreeDofs(), inverse="umfpack")
15 gfu.vec.data += inv * res
16
NgException: UmfpackInverse: Numeric factorization failed.
Could you tell me why i got this error and how to fix this problem? Thank you so much.
Attachments:
4 years 6 months ago #2662
by joachim
Replied by joachim on topic Different results when running Stokes equation example
easy fix: don't use continuous P2 for velocity, and discontinuous P1 for pressure.
NGSolve and Umfpack are correctly telling that this is an unstable method (even leading to a singular matrix).
Joachim
NGSolve and Umfpack are correctly telling that this is an unstable method (even leading to a singular matrix).
Joachim
4 years 6 months ago - 4 years 6 months ago #2663
by dong
Replied by dong on topic Different results when running Stokes equation example
I'm sorry what I meant was V.ndof = 1664 , Q.ndof = 2334 in my results, and V.ndof = 1660 , Q.ndof = 2328 in the documentation while the codes are the same.
Last edit: 4 years 6 months ago by dong.
4 years 6 months ago #2665
by hvwahl
Replied by hvwahl on topic Different results when running Stokes equation example
Since the output from the docu was created, the mesh generation will have probably changed slightly, such that the slightly different numbers of dofs is be due do slightly different generated meshes.
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 6 months ago #2666
by christopher
Replied by christopher on topic Different results when running Stokes equation example
I assume you have an older ngsolve version installed, since your output matches the one of older ngsolve documentations.
The following user(s) said Thank You: dong
Time to create page: 0.109 seconds