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

stationary navier stokes with functional minimizing

+5 votes

Hello,

i want to minimizing a functional, subject to stationary navier stokes equation, with dirichlet inflow condition, no slip boundary condition and do nothing outflow condition. More precise

$\min_{u} J(u)=\int_{\Gamma_s} F(\frac{\partial u}{\partial n})d\Gamma_s$ where $\Gamma_s$ is a small part of the boundary

$\frac{-1}{Re}\Delta{u}+(u\nabla )u + \nabla p=0$

$-\operatorname{div}(u)=0$

$u=g\ \text{on}\ \Gamma_{in}$

$u=0\ \text{on}\ \Gamma \setminus(\Gamma_{in} \cup \Gamma_{out})$

$\frac{1}{Re}\frac{\partial u}{\partial n}=pn\ \text{on}\ \Gamma_{out}$

The underlying model problem, is the backward facing step and the cost function should minimizing the recirculation bubble.
I am able to solve the stationary problem without functional (taylorhood elements) like here:

    a1 = inner(grad(u) * u, v) * dx
    a2 = self.nu * inner(grad(u), grad(v)) * dx
    a3 = -1 * p * div(v) * dx
    cond = -1 * div(u) * q * dx
    rhs = inner(self.rhs, v) * dx
    F = a1 + a2 + a3 + cond + rhs

    # build derivative
    dw = TrialFunction(self.W)
    dF = derivative(F, w, dw)

    # solve the problem
    nsproblem = NonlinearVariationalProblem(F, w, bc, dF)
    solver = NonlinearVariationalSolver(nsproblem)

About any idea how to formulate this in Fenics or in a mathematical way, i would be apreciate.

asked Feb 9, 2015 by maxb90 FEniCS Novice (770 points)
edited Feb 11, 2015 by maxb90

1 Answer

0 votes

What are the design variables? If you formulate it as element wise permeabilities, you can use dolfin-adjoint to calculate a sensitivity. You might want to have a look at Borrvall and Peterson paper on Topology Optimization of Stokes flow.

answered Feb 9, 2015 by KristianE FEniCS Expert (12,900 points)

Hi,
thanks for your advice. Out of the box the formulation contains no design variables. As far as i know uniques of the stationary with inhomogenous dirichlet boundary data is in general and also in my formulated problem not given, so i am looking in my problem for a stationary solution which minimizes my cost functional. Introducing permeability constraints is no option for me.
I took already a look into dolfin-adjoint, but as i said my problem has out of the box no desgin variables. Using the Notation given in the dolfin adjoint tutorial (inspired by Gunzberger), libadjoint should be able to solve problems of that form:
$\min_{u,m} J(u,m)$

$F(u,m)=0$

$l_u<=m<=l_b$

$g(m)<=0$

A more or less artificial reformulation of my problem leads to

$\min_{u,m} J(u,m)=\int_{\Gamma_s}m d \Gamma_s$

$\frac{-1}{Re}\Delta{u}+(u\nabla u)u + \nabla p=0$

$-\operatorname{div}(u)=0$

$u=g\ \text{on}\ \Gamma_{in}$

$u=0\ \text{on}\ \Gamma \setminus(\Gamma_{in} \cup \Gamma_{out})$

$\frac{1}{Re}\frac{\partial u}{\partial n}=pn\ \text{on}\ \Gamma_{out}$

$m= F(\frac{\partial u}{\partial n})\ \text{on}\ \Gamma_{s}$

Do you have experience with dolfin-adjoint?
Is this reformulation well posed for dolfin-adjoint?

...