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

Potential flow of incompressible fluid in a reservoir

–1 vote

Hello,

Please see below my question that was revised over time.

Thanks,
Evgeny.

asked Oct 14, 2015 by evgeny-petrov FEniCS Novice (110 points)
edited Nov 10, 2015 by evgeny-petrov

What is the question? What do you want to solve for? (u,p,phi), just phi, or is phi given? Is it okay to obtain u via postprocessing or do you really want to solve the incompressible Navier-Stokes equation with vanishing viscosity? You should clarify WHAT you want to do before anybody can give advice on HOW to do it. If you just want to solve for the potential, this is easy and covered in the tutorial (Poisson/Laplace equation).

Let us imagine that we have an ideal fluid in a reservoir, not full, which means there is a free surface of an ideal fluid on top, this reservoir makes no movements.

This problem mathematical formulation may be written as follows:

$$\nabla^2 \phi(x_i) = 0$$

Boundary condition for wet surface $S$
$$\frac{\partial \phi}{\partial n} = 0 \quad \forall x_i \in S$$

Boundary condition for a free surface $\Sigma$
$$\frac{\partial \phi}{\partial t} + \frac{1}{2}(\nabla \phi)^2 + g x_1 = 0$$

$$\frac{\partial \phi}{\partial n} = - \frac{1}{\vert \nabla \xi \vert} \frac{\partial \xi}{\partial t}$$

Note, $\xi (x_2, x_3,t)$ -- a free surface function, unknown, but for initial conditions: $\xi^0 (x_2,x_3,0)$ -- given function. $\phi$ and $\xi$ are unknown that I need to compute.

You mix up the divergence and the gradient in your notation. Make sure that you integrate the right hand side by parts for implementation. This should give you Neumann boundary conditions for the problem. Note that you will also have to normalize the constant pressure mode. This is also explained in the tutorial if I remember correctly (via Lagrange multipliers)

Would you please take a look at my boundary problem set up once again? thanks, Evgeny.

1 Answer

0 votes

As a start you should try to derive a weak formulation. In doing so you can identify which boundary conditions are required and what else is missing. Only then you can think about decoupling and discretizing your weak form using suitable ansatz spaces. In the course of this you may also identify further questions. Note that this Q&A format is not intended to solve your modeling problems but rather to provide hints regarding the implementation in FEniCS. The problem with your question is that there is only a model problem with no visible effort to attempt finding a solution. I doubt anyone will find the time to work through this and I think that even now your description is not complete. Try to think about this for yourself and pose digestible questions if you run into problems. Everything that is related to modeling issues may be better suited for e.g. scicomp.stackexchange.com.

answered Nov 10, 2015 by Christian Waluga FEniCS Expert (12,310 points)
edited Nov 10, 2015 by Christian Waluga

$$\nabla^2 \Phi = 0$$ where $u(x_i, t) = \nabla \Phi$ -- the velocity potential
Boundary condition for wet wall
$$\frac{\partial \Phi}{\partial n} = 0 \quad \forall x_i \in S$$
Boundary condition for a free surface
$$\frac{\partial \Phi}{\partial n} = - \frac{\partial \xi}{\partial t} \quad \forall x_i \in \Sigma$$ where
$\xi (x_2,x_3,t)$ -- a free surface function

Obtaining variational formulation, I would have:
$$\int_Q \nabla \Phi \nabla v \, \mathrm{d} x - \int_{\Sigma + S} \frac{\partial \Phi}{\partial n} v \, \mathrm{d} S $$

Since only derivative of $\Phi$ is known on wet wall $S$, I could not require $v$ to vanish on $S$, right?

If I can require $v$ to be vanished on $S$, then I would obtain the following form
$$\int_Q \nabla \Phi \nabla v \, \mathrm{d} x = - \int_\Sigma \frac{\partial \xi}{\partial t} v \, \mathrm{d} S$$

Though for level of $k=1$ or $t=0$ I should have defined $\Phi^0$ and $\xi^0$. If so, then do I need to rearrange all functions at level $k$ to one side and all functions at level $k+1$ to another side in the variational form? If so, to comply with FEniCS methodology, should I transform surface integral to volume integral?

Please advise,
Evgeny.

...