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 square with the following boundary conditions:
- c = 0 on SR and PQ
- u = 0 on all sides
- $\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.