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

implementing boundary condition

0 votes

I am trying to solve the following 1D nonlinear PDE:

h_t + [(h^3)h_xxx + (1/h)h_x]_x = 0 in domain x = [0, pi*sqrt(2)]

with IC. h(x,t=0) = 1- 0.1cos(x/sqrt(2))

and BC's. h_x(x=0,t) = h_x(x=pi* sqrt(2),t) = h_xxx(x=0,t) = h_xxx(x=pi* sqrt(2),t) = 0

I was wondering how to implement the derivative boundary conditions if I want to solve the problem in Fenics.

asked Feb 19, 2015 by rajib FEniCS Novice (120 points)

1 Answer

0 votes

Hello,

for the implementation of the boundary condition involving the first derivatives, you can use a simple Neumann BC, see here in the online documentation of FEniCS 1.

As for the third order derivatives, can you please clarify whether your PDE is

$
\frac{\partial h}{\partial t} + \frac{\partial }{\partial x}\left( h^{3} \frac{\partial^{3}h}{\partial x^{3}} + \frac{1}{h} \frac{\partial h}{\partial x}\right) = 0 .
$

If so, take the derivative, apply the boundary conditions to the resulting PDE, and that will show that you have to take into account that at the boundaries, the time derivative is a certain function of higher derivatives, which gives you another PDE with fourth order derivatives. This can then be coded up as a system of two second order PDEs.

Hope that helps!

answered Feb 20, 2015 by wilhelmbraun FEniCS User (2,070 points)
edited Feb 20, 2015 by wilhelmbraun
...