Optiflow is an implementation of a shape-optimization method for two-dimensional incompressible flows.
-
You will need a recent FreeFem++ installation, see http://www.freefem.org/ff++/. This program was written and tested with FreeFem++ 3.42 and should work properly with any subsequent version.
-
Download the zip archive at https://github.com/flomnes/optiflow/archive/master.zip or clone this repository
git clone https://github.com/flomnes/optiflow.git
then navigate to the decompressed directory :
cd optiflow-master
or
cd optiflow
Five examples can be found in the file run_case.sh. The general syntax is
FreeFem++-nw main.edp [--config numconfig] [--resu resfolder] [numerical parameters]
The basic options are:
--config configuration number, from 1 to 5
--resu folder in which the files and results will be saved, created if non-existent
Numerical paramters:
--navsto 1=Navier-Stokes, 0=Stokes
--raffinit required edge size when remeshing : hmax=raffinit, hmin=raffinit/sqrt(2)
--optraff 1=remesh if necessary, 0=no remeshing
--minarea remesh if any element has an area less than minarea
--binit initial value for b
--btarget final value for b : b is no longer updated if b >= btarget
--tau value of tau, step of the gradient method
--l0 initial value of the Lagrange multiplier
--gamma value of the regularization parameter
--jjmax maximal number of outer iterations
--errc value for the stopping criterion \eps_{stop} on the residual
--beta 0 for perimeter constraint, 1 for volume constraint (default)
--delta Select the functional : 0 for the dissipated energy, 1 for the least-square profile at the outlet
--cv Ratio (required constraint value)/(initial constraint value). 1 for an identical initial and required volume or perimeter
--alpha Update ratio for b : b^{n+1}=alpha*b^n
--save 1=save all figures in the result directory, 0=save nothing at all
--saveevery n figures will be saved every n iterations
-
If gnuplot is installed, you can plot relevant data from a result directory. Simply copy plot.gp from the project root the result directory and execute
gnuplot plot.gp
. A file called "multi.pdf" will be generated. -
Crashes may occur for because of mesh self-intersections. You may try to choose a smaller value for
tau
. You can also increase the value ofminarea
so that remeshing will be done earlier.
- optiflow has been developped by Florian Omnès (Université Pierre et Marie-Curie), Yannick Privat (Université Pierre et Marie Curie, CNRS), Charles Dapogny (Université Grenobles-Alpes, CNRS) and Pascal Frey (Université Pierre et Marie Curie, Institut du Calcul et des Données)
- Anyone wishing to contribute is welcome
optiflow is licensed under the terms of the LGPL (LICENSE.md)