Welcome to our documentation!#
Introduction#
This project proposes to do adjoint-based optimization on a simple two-phase Stokes system. To achieve this goal, some useful components have been developed:
A fairly accurate high-order collocation method has been implemented to solve the various necessary boundary integral equations.
A complete set of kernels and layer potentials involved in the Stokes system have been implemented. These are mainly used for the two-phase problems, but they are separated enough that they can easily be used to solve other types of Stokes problems with little effort.
A simple and very accurate Fourier representation of the geometry is available.
Many different generalized quadrature rules have been implemented to aid in accurately computing the singular integrals.
The main drawback is the focus on an axisymmetric flow configuration. This greatly simplifies the geometry, quadrature and interpolation routines (effectively making them one dimensional problems), but limits the types of problems that can be solved using this code. However, extending the code to 2D problems should not be too hard.
A simple example program of how the code can be currently used is given below. The boundary conditions are taken from the know Hadamard-Rybczynski exact solution for a fluid droplet in Stokes flow, given in [Clift1978].
1% capillary number
2param.Ca = 0.01;
3% viscosity ratio
4param.lambda = 5.0;
5
6% number of panels
7npanels = 64;
8% number of smooth Gauss-Legendre quadrature nodes
9nnodes = 8;
10% number of basis functions on each panel
11nbasis = nnodes;
12% interface definition
13curve_fn = @(xi) exp(2.0j * pi * xi);
14
15% construct collocation (target) and quadrature (source) points
16x = st_point_collocation(npanels, nbasis, curve_fn);
17y = st_point_quadrature(npanels, nnodes, curve_fn);
18% attach geometry: normals, curvatures, etc.
19[x, y] = st_mesh_geometry(x, y);
20% singular quadrature
21y.quad = st_layer_quadrature(x, y, {'reg', 'log'});
22
23% define freestream boundary conditions
24bc.uinf = @(x) ones(1, length(x.x));
25bc.finf = @(x) zeros(1, length(x.x));
26bc.jump = @(x) x.kappa / param.Ca .* x.n;
27bc = st_boundary_condition_options('param', param, 'fn', bc);
28
29% solve for the density in a single-layer representation
30q = st_repr_density(x, y, param.lambda, bc);
31% compute velocity
32u = st_repr_density_velocity(x, y, q, bc);
License#
This project is licensed under the MIT license:
MIT License
Copyright (c) 2018-2022 Alexandru Fikl.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
and the LGPL 2.1 or later license:
LGPL 2.1 or later
Copyright (c) 2018-2022 Alexandru Fikl.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.