Optimization

This paper discusses research concerning the numerical solution of optimization problems. The introduction provides a non-technical overview of the field, and gives a general picture of the form and attributes of optimization problems. The subsequent sections include our view of several crucial areas in which further research is worthwhile, as well as a brief indication of the current state of the art.

Hurlbut S. E et all [11], Sheng Bao [12] evaluated behaviour of oscillating objects numerically.Nature experiments for similar conditions were performed by Koopmann G. H [13].
3. Lattice Boltzmann method description and implementation.Generally motion of the viscous fluid can be fully described by Navier-Stokes equations partial differential equations.It mathematically expresses conservation of momentum and conservation of mass for Newtonian fluids.But despite its strength and power Navier-Stokes equations hard to implement and paralize on modern devices due to its continuum nature.Thus other approaches more suitable for discrete space were developed.
One of such algorithms is the lattice Boltzman method.The main idea behind it is to represent fluid on a mesoscopic level with a few assumptions and approximations.It models the fluid consisting of fictive particles, and such particles perform consecutive propagation and collision processes over a discrete lattice.Those particles describe fluid though discrete-velocity distribution function   (, ).Function represents the density of particles with velocity   = (  ,   ,   ) at position  and time .The mass density  and momentum density  at (, ) can be found through weighted sums known as momentum of   [14]: (2) Each lattice in this case can be represented as a bunch of predefined vectors with corresponding velocity weights.For 2d case D2Q9 lattice description is a regular choice (fig.1): ) where   is the collision operator.While there are many different collision operators available, the simplest one that can be used for Navier-Stokes simulations is the Bhatnagar-Gross-Krook (BGK) operator: It relaxes the populations towards an equilibrium    at a rate determined by the relaxation time .Equilibrium is given by with the weights   specific to the chosen velocity set.The equilibrium    depends on the local quantities density  and fluid velocity  only.These are calculated from the local values of   , with the fluid velocity found as (, ) = (, ) / (, ).
During implementation the fully discretized Boltzmann equation with the BGK collision operator can be separated in two isolated steps: collision and streaming.Boundary conditions are handled additionally.
The first part is collision (or relaxation) ) where   * represents the distribution function after collisions and    is found from   .
The second part is streaming ) when we move computed lattice variables to the neighbor lattices.
Boundary conditions are handled before or after streaming with help of lattice entries reassignment with reverse values.
Because the collision is simply an algebraic local operation and the streaming is a data movement between arrays the whole algorithm computation can be implemented on devices with high parallelism.For that, different frameworks can be used: OpenMP, CUDA, etc.For our implementations we've stuck to TensorFlow.Generally TensorFlow is an end-to-end open source platform for machine learning.It has a comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML powered applications.But what is more important for our project is that this framework allows us to define an execution graph in Python, and later on compile it to the C/C++ executable with native CUDA support or to JavaScript with web browser compatibility.Thus we can reuse the same code base with various optimizations under the hood for different devices and use cases.
4. Experiments.To verify our implementation a few experiments with already known results were performed.We've tested flow around a fixed round cylinder with radius R = 0.0625 and the same object oscillating with amplitude equal to its radius and frequencies 0.05Hz, 0.1Hz and 0.2Hz.In addition other amplitudes were considered and CPU\GPU performance analysis was held.

. Velocity and vorticity for various Reynolds numbers
As shown in figure 2 the flow at Re = 10 is symmetric and there is a Karman vortex street at Reynolds numbers starting from Re = 60, the vortex frequency increases with the Reynolds number increasing.Such results correspond to other full-scale and numerical experiments [15,16].The simulation results showed that the vortex zones when flowing around a rigidly fixed cylinder have the same symmetric shape.Oscillations of the cylinder violate this structure: symmetry is broken when vortices form around the cylinder, and the diameter of the vortex zones increases.In the near part of the vortex wake, several vortex bunches are formed on both sides of the cylinder, but on a smaller scale compared to a stationary cylinder.Moreover, the scale of these formations decreases with an increase in the vibration frequency, and later these formations merge into structures of a larger scale.Similar results were received by Sheng Bao et al [12].
To extend our results experiments with larger amplitudes were considered as well (fig.5, 6).It was observed that while GPU vs CPU difference for small scales is subtle, with larger scales it becomes more crucial.

4 . 1
Fig 2. Velocity and vorticity for various Reynolds numbers