### Solving linear system by PETSc direct methods for Stokes equations,

297

views

0

Dear FEniCS community

I am solving the three-dimensional Navier-Stokes equations, where Taylor-Hood element is used in space. For simplicity, I have tried the following three direct solvers

solver = LinearSolver("mumps")

solver = LinearSolver("lu")

solver = LinearSolver("umfpack")

However, the question is that only small mesh is supported. I can run my code with mesh $4\times4\times4$4×4×4, and $8\times8\times8$8×8×8 . If I run it with $16\times16\times16$16×16×16 , it will stop and give me the information below

Traceback (most recent call last):

File "stokes.py", line 139, in <module>

solver.solve(A,w.vector(), b)

RuntimeError:

*** -------------------------------------------------------------------------

*** DOLFIN encountered an error. If you are not able to resolve this issue

*** using the information listed below, you can ask for help at

***

*** fenics-support@googlegroups.com

***

*** Remember to include the error message listed below and, if possible,

*** include a *minimal* running example to reproduce the error.

***

*** -------------------------------------------------------------------------

*** Error: Unable to successfully call PETSc function 'KSPSolve'.

*** Reason: PETSc error code is: 76 (Error in external library).

*** Where: This error was encountered inside /build/dolfin-yRhxwC/dolfin-2017.1.0/dolfin/la/PETScKrylovSolver.cpp.

*** Process: 0

***

*** DOLFIN version: 2017.1.0

*** Git changeset: unknown

*** -------------------------------------------------------------------------

I am sure the storage is no problem I have a powerful machine. The boundary condition for $u$

I am solving the three-dimensional Navier-Stokes equations, where Taylor-Hood element is used in space. For simplicity, I have tried the following three direct solvers

solver = LinearSolver("mumps")

solver = LinearSolver("lu")

solver = LinearSolver("umfpack")

However, the question is that only small mesh is supported. I can run my code with mesh $4\times4\times4$4×4×4, and $8\times8\times8$8×8×8 . If I run it with $16\times16\times16$16×16×16 , it will stop and give me the information below

Traceback (most recent call last):

File "stokes.py", line 139, in <module>

solver.solve(A,w.vector(), b)

RuntimeError:

*** -------------------------------------------------------------------------

*** DOLFIN encountered an error. If you are not able to resolve this issue

*** using the information listed below, you can ask for help at

***

*** fenics-support@googlegroups.com

***

*** Remember to include the error message listed below and, if possible,

*** include a *minimal* running example to reproduce the error.

***

*** -------------------------------------------------------------------------

*** Error: Unable to successfully call PETSc function 'KSPSolve'.

*** Reason: PETSc error code is: 76 (Error in external library).

*** Where: This error was encountered inside /build/dolfin-yRhxwC/dolfin-2017.1.0/dolfin/la/PETScKrylovSolver.cpp.

*** Process: 0

***

*** DOLFIN version: 2017.1.0

*** Git changeset: unknown

*** -------------------------------------------------------------------------

I am sure the storage is no problem I have a powerful machine. The boundary condition for $u$

`u`is homogeneous Dirichlet B.C. and pinpoint B.C. for pressure $p$`p`. Can anyone provide some hints? Thanks in advance.
Community: FEniCS Project

### 1 Answer

4

Even though you are sure that storage is no problem, I would guess that your direct solver runs out of memory (with Taylor-Hood elements in 3D that easily happens). Consider using an iterative solver.
Thanks for your reply. I agree that iterative solvers shall be used for large scale problem. I also tried some Krylov solvers and got the solution correctly.

written
7 months ago by
Huadong GAO

Please login to add an answer/comment or follow this question.