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

How to define a Slip boundary condition for Navier-Stokes incompressible equations (coupled solver)

0 votes

Hi,

I want to define a "Slip" boundary condition instead a "Wall' or "No Slip" boundary condition for Navier-Stokes incompressible equations.

I succesfully defined "Slip" boundary condition for Navier-Stokes coupled solver, but when I try to use iterative solver, like "gmres", I get an error due to not convergence, like this below.

*** -------------------------------------------------------------------------
*** 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@fenicsproject.org
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to solve linear system using PETSc Krylov solver.
*** Reason:  Solution failed to converge in 10000 iterations (PETSc reason DIVERGED_ITS, residual norm ||r|| = 9.132585e+00).
*** Where:   This error was encountered inside PETScKrylovSolver.cpp.
*** Process: unknown
*** 
*** DOLFIN version: 1.4.0
*** Git changeset:  unknown
*** -------------------------------------------------------------------------

If I use direct solver, like "ilu" I don't get an error.

My code is avalible by the link:
ns_coupled_slip_simple.py

Also you could see how I defined "Slip" boundary condition by the link:
NSCoupledSlipEquation_1.pdf

My equations for NS coupled solver

# Define Navier-Stokes Coupled equation
F = inner(dot(grad(u), u_0), v_u)*dx \
    + nu*inner(grad(u) + grad(u).T, grad(v_u))*dx \
    - p*div(v_u)*dx \
    + div(u)*v_p*dx \
    - inner(f, v_u)*dx

# Add Slip boundary conditions:
F += − nu*inner(grad(u)*n + grad(u).T*n, v_u)*ds(wall_number) \
+ inner(p*n, v_u)*ds(wall_number)

# My boundary condition for the problem
u_inlet = Constant((1.0, 0.0))
u_wall = Constant((0.0, 0.0))
p_2_const = Constant(0.0)

# For Inlet boundary conditions:
bc_u_1 = DirichletBC(VQ.sub(0), u_inlet, domains, 1)

# For Wall boundary conditions:
bc_u_3 = DirichletBC(VQ.sub(0), u_wall, domains, 3)

# For Outlet boundary conditions:
bc_p_2 = DirichletBC(VQ.sub(1), p_2_const, domains, 2)

# For NoSlip boundary conditions:
bcs_up = [bc_u_1, bc_u_3, bc_p_2]

# For Slip boundary conditions:
bcs_up = [bc_u_1]

Any hint, guess, very appreciated!
Thanks in advance!

asked Mar 3, 2015 by Maks FEniCS User (2,430 points)
edited Mar 6, 2015 by Maks

1 Answer

+1 vote
 
Best answer

I found implementation of weak slip Nitsce boundary conditions.

Here the link to the examples:
FEniCS: separate boundary conditions in normal and tangential direction of mesh boundary
fenics-nitsche

Also usefull article about this approach is called "ON WEAKLY IMPOSED BOUNDARY CONDITIONS. FOR SECOND ORDER PROBLEMS louni Freund and Rolf Stenberg. Helsinki University of Technology, Proceedings of the Ninth Int. Conf. Finite Elements in Fluids, Venice 1995, pp. 327-336".

Link to the article:
link

answered Oct 9, 2015 by Maks FEniCS User (2,430 points)
...