This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

pure dirichlet boundary condition resulting in singular matrix

0 votes

I am solving the following system of pde:
$\partial_t \vec{u} + (\vec{u}.\vec{\nabla})\vec{u} = \vec{\nabla} p + RP\theta \hat{z} + P\nabla^2 \vec{u}$
$\partial_t\theta + (\vec{u}.\nabla)\theta = u_z + \nabla^2\theta$
$\vec{\nabla}.\vec{u} = 0$

and the weak forms that I am using are:
$\displaystyle\int [{ \partial_t \vec{u} + (\vec{u}.\vec{\nabla})\vec{u} - \vec{\nabla} p - RP\theta \hat{z}}v_u + P\nabla u\nabla v_u + v_p\vec{\nabla}.\vec{u} ] \mathrm{d\Omega} = 0$
$\displaystyle\int [{\partial_t\theta + (\vec{u}.\nabla)\theta - u_z }v_{\theta} + \nabla\theta \nabla v_{\theta} ]\mathrm{d\Omega} = 0$

for $u(\vec{x}, t)$, $p(\vec{x}, t)$ and $c(\vec{x}, t)$. u is a vector field of dim=2 and p and c (same as $\theta$)are scalars. R , P are constants.

The domain is a unit squareunit square with the following boundary conditions:

  1. c = 0 on SR and PQ
  2. u = 0 on all sides
  3. $\nabla c . \hat{n}$ = 0 on PS and QR (excluding the verticles)

This is a minimal version of the code. In theory this set of boundary conditions are sufficient to ensure uniqueness of the solution. But, I get the error:

Solving nonlinear variational problem.
UMFPACK problem related to call to numeric
*** Warning: UMFPACK reports that the matrix being solved is singular.
UMFPACK problem related to call to solve
*** Warning: UMFPACK reports that the matrix being solved is singular.
Newton iteration 1: r (abs) = -nan (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
...

I was able to solve the same weak form correctly for the following set of boundary conditions:
1. c = 0 and u = 0 on SR and PQ
2. periodic boundary condition along horizontal direction

any help is appreciated.

asked Feb 6, 2014 by bshankar FEniCS Novice (790 points)
edited Feb 6, 2014 by bshankar

It would be easier to help you if you state the equation your are trying to solve, what problem you are encountering and the error you get.

tnx!
updated the question

Your weak formulation does not really look correct. Do intetegration by parts properly, consult stokes and navier-stokes related demos and FEniCS book.

This website doesn't seem to display curly braces in latex!
my weak formulation is correct.

1 Answer

0 votes
 
Best answer

Increasing mesh resolution solved the problem!

answered Feb 10, 2014 by bshankar FEniCS Novice (790 points)
...