Fluid-Structure Interaction with Vortex methods and the ... · 2 • Engineering applications •...
Transcript of Fluid-Structure Interaction with Vortex methods and the ... · 2 • Engineering applications •...
CSElab Computational Science & Engineering Laboratory http://www.cse-lab.ethz.ch
Fluid-Structure Interaction with Vortex methods and the Finite Element Method
Siddhartha Verma Gengyun Li, Petros Koumoutsakos
October 5, 2016
2
• Engineering applications • Wind turbines, aircraft frames, buildings,
bridges, bio-inspired devices…
Fluid-Structure Interaction
• Simulations difficult with body fitted grids • Complex shapes, deforming geometries, moving
meshes - large overhead
• Vortex methods + Brinkman penalisation • Fast & accurate, parellelizes easily • Multiple deforming geometries with relative ease
Credit: inhabit.com
Credit: Boeing
Credit: thrombus-vph.eu
Credit: wyss.harvard.edu
• Biomedical applications • Artificial heart valves, stents, aneurysms…
• Vortex methods + Brinkman penalization • Fluid velocity penalized to match
at appropriate grid nodes • Solid influences fluid
• Finite Element Method • Compliant solids deform due to flow-induced
forces on the solid boundary • Fluid influences solid via surface-forces
Objective: Combine vortex methods and FEM
3
Vortex Methods(Fluid mechanics)
D!
Dt= ⌫r2! + �r⇥ (� (us � u))
fext
us
us
fext
Finite Element Method(Solid Mechanics)Mv +Cv +Kv = f
ext
• Weak coupling (partitioned approach) • Staggered stepping of fluid- and solid-solvers
4
Fluid Mechanics (Vortex Methods)
Background• Enforcing Boundary Condition (BC) on
complex, deforming geometries
• Arbitrary Lagrangian Eulerian (ALE) • Body Fitted grid : Difficulty with Multiple bodies
& with Deforming geometries • Expensive : frequent re-meshing
5
Source: https://www.cfd.tu-berlin.de/research/acoustic/AIAA_PAPER_2004-2926/graphics/gitter.png
Source: http://euler.yonsei.ac.kr/2011/09/30/immersed-boundary-method-for-complex-flows/
• Immersed Boundary (IB) method • Simple Cartesian grids • BCs enforced via Dirac-delta forcing
Vortex methods & Brinkman penalization • Remeshed vortex methods
• Solve vorticity form of incompressible Navier-Stokes
6
Koumoutsakos & Leonard, JFM (1995)@!
@t+ u ·r! = ! ·ru+ ⌫r2! + �r⇥ (� (us � u))
Hejlesen et al., JCP (2015)
• Single grid handles both Fluid and Solid
• Fluid:Solid:
� = 0� = 1
DiffusionAdvection
Penalization
0 in 2D
• Brinkman penalization • Relatively easy to implement,
computationally cheap
• Accounts for fluid-solid interaction • Penalty term enforces no-slip BC
Angot et al., Numerische Mathematik (1999)
@u
@t+ u ·ru = �rP
⇢+ ⌫r2u+ �� (us � u)
Curl
Vortex methods & Brinkman penalization • Remeshed vortex methods
• Solve vorticity form of incompressible Navier-Stokes
7
Koumoutsakos & Leonard, JFM (1995)@!
@t+ u ·r! = ! ·ru+ ⌫r2! + �r⇥ (� (us � u))
DiffusionAdvection
Penalization
0 in 2D
@u
@t+ u ·ru = �rP
⇢+ ⌫r2u+ �� (us � u)
Curl
ADVANTAGES: 1) Do advection only where vorticity is non-zero (think uniform flow, where FV/FD
have to do computations in non-important regions) 2) Time step not limited by CFL (i.e., stability issues, but rather limited by accuracy concerns) 3) SL schemes tend to exhibit lower numerical diffusion
Implementation
8
@!
@t+ u ·r! = ! ·ru+ ⌫r2! + �r⇥ (� (us � u))
!? = !n +�t {�r⇥ (� (us � u))}!?? = !? +�t
�r2!?
D!??
Dt= 0 ) !n+1 = !??
• Godunov splitting 1. Penalization 2. Diffusion 3. Advection
• Wavelet-based adaptive grid • Cost-effective compared to uniform grids
• Each thread receives a small data block (up to 60% CPU utilisation)
• Open source code: available on github • https://github.com/cselab/MRAG-I2D
Rossinelli et al., JCP (2015)
• Force computations require the stress tensor σ • Drag = net force opposing velocity
• Compute surface traction, dot product with velocity vector • +ve => Thrust; -ve => Drag
Surface forces
Fsurf =
Z� · nds
FD/T =Fsurf · u
|u|
• Stress tensor requires two things • Pressure • Strain-rate tensor
Z�Pn · dS
Z2µD · ndS
D =1
2
�ru+ruT
�
• Vorticity form of Navier Stokes • Advantage: no need to deal with pressure • Disadvantage: pressure term unavailable!
9
@u
@t+ u ·ru = �rP
⇢+ ⌫r2u+ �� (us � u)
Cur
l
@!
@t+ u ·r! = ! ·ru+ ⌫r2! + �r⇥ (� (us � u))
Computing pressure• For Pressure : divg. of the N-S equans
10
r ·✓@u
@t+ u ·ru = �rP
⇢+ ⌫r2u+ �� (us � u)
◆
r · u = 0
ruT : ru = �r2P
⇢+
1
⇢2r⇢ ·rP +r · (�� (us � u))
r2P = ⇢��ruT : ru+r · (�� (us � u))
�
0
• Poisson’s equation: solved using free-space Green’s function r2
G = �(x� x0)
rG = 0 on dS
) G =1
2⇡ln|r|
P = G ⇤RHS
• Strain-rate tensor (for frictional forces)
D =1
2
�ru+ruT
�
STRESS that Pressure solve is not done on the entire domain, but a very small subset consisting of the solid surface points.
The Fast Multipole Method (FMM)• Extremely fast solutions for the
Poisson equation (‘N-body’ problem) • Speed-up: 10,000X and more
11
O
z
R1
R2
zc1zc2
Group 1
Group 2
• Speed-up results from combination of • Tree-code: groups together sources into clusters • Truncated series expansions
• Impulsively started flow around a stationary cylinder
Flow around a cylinder
12
0
0.5
1
1.5
2
0 1 2 3 4 5 6 7
Cd
T
CdPCd
νRe = 550
0
0.5
1
1.5
2
0 1 2 3 4 5
Cd
T
CdPCd
νRe = 1000Vorticity
Pressure
-3
-2
-1
0
1
2
0 0.25 0.5 0.75 1
Cp
θ/π
T = 1T = 3T = 5
Surface-pressure (Re = 550)
Koumoutsakos & Leonard, JFM (1995)Li et al., JFM (2004)
• Spatial distribution of surface-pressure & drag time-evolution agree with reference data
Surface vorticity distribution
13
Re = 1000
Re = 550
• Body-undulations displace fluid • Reaction forces propels swimmer forward
Self-propelled swimmer (Re=4000)
14
-0.01
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0 1 2 3 4 5 6 7 8 9 10
ucm
T
uv
Surface-force vectors
• Compare unsteady acceleration computed using surface-forces to penalisation accel.
• Good agreement: Surface-force computation accurate for complex, temporally deforming bodies
Validation for self-propelled swimmer
15
-0.02
0
0.02
0.04
0.06
0.08
0.1
0 1 2 3 4 5 6 7 8 9 10
ax
T
apenalaSF
-0.04
-0.02
0
0.02
0.04
0 1 2 3 4 5 6 7 8 9 10
ay
T
Horizontal acceleration
Vertical acceleration-0.02
0
0.02
0.04
0.06
0.08
0.1
0 1 2 3 4 5
ax
T
10242
20482
40962
81922
• Low sensitivity to grid-resolution
16
Solid Mechanics (now ‘u’ = displacement!)
1.Mesh the object (Delaunay triangulation) • Equi-angular triangles (few ‘skinny’ triangles) • No vertex lies inside the circumcircle of other triangles • Returns list of element connectivity
2.Assign degrees of freedom • Each node has 2DoFs: u, v
(displacements in x and y)
FEM Steps : Pre-processing
17
Credit: http://www.cescg.org/
• u : Displacement • M : Mass matrix - inertia • K : Stiffness matrix - elasticity
• Governing equation
Mu+Cu+Ku = fext
FEM Steps : Generate system matrices
18
3.Generate local ‘mass’ and ‘stiffness’ matrices for each CST element
Source: mae.uta.edu/~lawrenceme5310/course_materials/... : Concepts and applications of FEA (Robert Cook et al.)
4.Assemble local element matrices into a global system matrix
• Each node may belong to multiple elements
Ke = teAe
�B0DB
�
M e =
ZZZ⇢NTNdV
Node 1
234
1
34
Ele 1
23
1
Ele 2
Discretization
1
234
Assembly
• u : Displacement • M : Mass matrix - inertia • K : Stiffness matrix - elasticity
FEM Steps : Constrain system & Solve5.Apply constraints to fix object in space
• Remove rows and columns corresponding to known displacements
2
6664
u2
u3
u4...
3
7775+
2
6664
m22 m23 m24 . . .m32 m33 m34 . . .m42 m43 m44 . . .
......
3
7775
2
6664
u2
u3
u4...
3
7775=
2
6664
f2f3f4...
3
7775�
2
6664
k21k31k41...
3
7775u1 �
2
6664
m21
m31
m41...
3
7775u1
2
666664
k11 k12 k13 k14 . . .k21 k22 k23 k24 . . .k31 k32 k33 k34 . . .k41 k42 k43 k44 . . .
......
3
777775
19
RHS knownUnknown
un+1 = 2
�un+1 � un
�
�t� un
un+1 = 4
�un+1 � un
�
�t2� 4
un
�t� un
Plug into matrix system, solve for un+16.Advance in time using implicit
integration scheme (Newmark’s method)
Mu+Cu+Ku = fext
• Vortex methods + Brinkman penalization • Fluid velocity penalized to match
at appropriate grid nodes • Solid influences fluid
• Finite Element Method • Compliant solids deform due to flow-induced
forces on the solid boundary
Objective: Combine vortex methods and FEM
20
Vortex Methods(Fluid mechanics)
D!
Dt= ⌫r2! + �r⇥ (� (us � u))
fext
us
us
Finite Element Method(Solid Mechanics)Mv +Cv +Kv = f
ext
B. Patzák, OOFEM project home pagehttp://www.oofem.org, 2000
• OOFEM: Open source FEM solver
Coupling the Fluids solver with FEM
21
MultipolesVelocity
Projection
Penalization
Diffusion
Advection
RK2+LTS
Explicit Euler
r2 n = �!n
un = r⇥ n
@!n�
@t= ⌫r2!n
�
@!n�
@t+ u
n� ·r!n
� = 0
!n+1 = !n+1�
x
n+1i = x
ni + u
t,ni �tn
✓n+1i = ✓n + ✓
n
i �tn
RK2+LTS / particles
x
n+1i = x
ni + u
t,ni �tn, ✓n+1
i = ✓ni + ✓
n
i �tn
⇢n = ⇢f +NX
i=1
(⇢ni � ⇢f )�ni
u
t,ni =
1
mi
Z
⌦⇢n�n
i un dx
✓n
i = J
�1i
Z
⌦⇢n�n
i (x� x
ni )⇥ u
n dx
u
r,ni = ✓
n
i ⇥ (x� x
ni )
!� = !n +r⇥ (u� � un)u� =un + ���tuS
1 + ���t
Surface forces r2P = ⇢��ruT : ru+r · (�� (us � u))
�
D =1
2
�ru+ruT
�
Vortex methods + Brinkmann penalization
0.44
0.46
0.48
0.5
0.52
0.54
0.56
0.1 0.15 0.2 0.25 0.3 0.35 0.4
y
x
Coupling the Fluids solver with FEM
22
MultipolesVelocity
Projection
Penalization
Diffusion
Advection
RK2+LTS
Explicit Euler
r2 n = �!n
un = r⇥ n
@!n�
@t= ⌫r2!n
�
@!n�
@t+ u
n� ·r!n
� = 0
!n+1 = !n+1�
x
n+1i = x
ni + u
t,ni �tn
✓n+1i = ✓n + ✓
n
i �tn
RK2+LTS / particles
x
n+1i = x
ni + u
t,ni �tn, ✓n+1
i = ✓ni + ✓
n
i �tn
⇢n = ⇢f +NX
i=1
(⇢ni � ⇢f )�ni
u
t,ni =
1
mi
Z
⌦⇢n�n
i un dx
✓n
i = J
�1i
Z
⌦⇢n�n
i (x� x
ni )⇥ u
n dx
u
r,ni = ✓
n
i ⇥ (x� x
ni )
!� = !n +r⇥ (u� � un)u� =un + ���tuS
1 + ���t
Surface forces r2P = ⇢��ruT : ru+r · (�� (us � u))
�
D =1
2
�ru+ruT
�
Vortex methods + Brinkmann penalization
OOFEM Solve
DeformablemeshForce
distribution
Deformed configuration
FSI: Dynamic tests• Cantilever beam (fixed at lower end)
• Uniform inflow U∞ = 0.1 Re = 2000
23
Material: Biological Tissue equivalent
0.4
0.45
0.5
0.55
0.6
0.65
0.36 0.38 0.4 0.42 0.44
• Beam deformation • abrupt initially: impulsive force • then exhibits ‘wobbling’
• Flow induced force largest in the centre (high pressure due to flow stagnation)
• Beam rigid up until 1s, then allowed to deform
Stiffer beams
24
Stiff rubber Lead
Vortex induced vibrations• Solid cylinder with attached tail
• Tail rigid until steady state attained U∞ = 2.0 Re = 200
• Exhibits large-amplitude oscillations
25
Lee & You (Phys. Fluids, 2013)
• Still to do • Quantitative comparisons with
FSI benchmarksTurek et al. (2010),
Fluid Structure Interaction II, LNCS
Summary• Method for determining surface
pressure and shear forces • Using Vortex methods and
Brinkman penalisation
26
• Coupled with the Finite Element Method • Flow-induced deformation: cantilever beams • Vortex-induced oscillation of flexible tail
r2P = ⇢��ruT : ru+r · (�� (us � u))
�D =
1
2
�ru+ruT
�
@!
@t+ u ·r! = ! ·ru+ ⌫r2! + �r⇥ (� (us � u))
• Validated using simulations of rigid and deforming objects
Backup
27
Application: ‘Smart’ follower learning to maximise efficiency
• ‘Siphoning’ energy from the leader’s wake
• Follower autonomously learns optimal manoeuvres for maximising efficiency • Reinforcement Learning
28
R⌘ =Tu
Tu+max(Pdef , 0)
• Overall, 28% gain in average efficiency • Energetic savings of 64%
• Relatively long occurrences of η=1 • Follower effectively hitching a ‘free ride’
29
• Variation of all three parameters
Efficiency, Thrust power & Def power
⌘ =PThrust
PThrust + PDef
t=0 to 2 t=8 to 10
t=0 to 10
Spatial & temporal evolution
30
31
• Max η - neck and tail no drag, tail tip barely moving, fore section low curvature
• Min η - tail tip max velocity, neck substantial drag
• Max Power - majority of the body high vel
Spatial & temporal evolutionMax η
Max P(Thrust) & P(Def) Min η
Def. power along the body• Majority of effort at tail
• Head: suction peak results in large thrust, with almost no effort • Rest of body: thrust closely follows deformation power
32
Pressure
x x
Thrust generation along the body• Majority of thrust from mid-body & tail
• Head: drag caused by stagnation pressure. Thrust at bulge (suction peak) • ‘Neck’ region : no thrust, negligible drag • Tail end: Mostly drag!
33
Pressure
x
Pressure FMM
34
then the logarithm is equal to:
log(z � z
j
) = log r + log(ei✓) = log r + i✓ = log |z � z
j
|+ i✓.
We found that Re(log(z � z
j
)) = log |z � z
j
|. Thus the potential can be computed as the realpart of the complex number:
�(z) =mX
j=1
m
j
log(z � z
j
).
Now for the multiple expansion, consider the case in which |z| is larger than any |zj
|. We maywrite the previous as:
�(z) =mX
j=1
m
j
log(z � z
j
) =mX
j=1
m
j
hlog z + log
⇣1� z
j
z
⌘i= M log z +
mX
j=1
m
j
1X
l=1
⇣z
j
z
⌘l
l
=
= M log z +1X
l=1
mX
j=1
m
j
⇣z
j
z
⌘l
l
= M log z +1X
l=1
2
4z
�l
mX
j=1
m
j
z
l
j
l
3
5 = M log z +1X
l=1
↵
l
z
l
where ↵
l
=mPj=1
m
j
z
l
j
l
. We can now introduce the first theorem for the expansion. Having to do
with a Quadtree, we would use it to compute the FMM expansions of the leaves, truncating theinfinite sum to a certain order p.
Lemma 1. Suppose that m charges of strengths {qi
, i = 1, . . . ,m} are located at points {zi
, i =1, . . . ,m} with |z
i
| < r. Then for any z with |z| > r the potential �(z) induced by the charges isgiven by:
�(z) = a0 log(z) +1X
k=1
a
k
z
k
where:
a0 =mX
i=1
q
i
and a
k
=mX
i=1
�q
i
z
k
i
k
for k � 1
The gain in speed is achieved by using a grid which is as coarse as possible. In order to dothis we should be able to “unify” the expansions of neighboring leaves. This is possible by usingthe next lemma, which allows us to translate the center of a certain expansion. In this way, forexample, we could compute the expansions for 4 leaves, center them onto their common parentnode and sum the expansions, so that we have the expansion for the entire parent node.
Lemma 2. Suppose that:
�(z) = a0 log(z � z0) +1X
k=1
a
k
(z � z0)k
is a multipole expansion of the potential due to a set of m charges of strength q1, q2, . . . qm, all ofwhich are located inside the circle D of radius R with center at z0. Then for z outside the circleD1 of radius (R+ |z0|) and center at the origin,
�(z) = a0 log(z) +1X
l=1
b
l
z
l
3
• Poisson equation: solved using free-space Green’s function r2
G = �(x� x0)
rG = 0 on dS
) G =1
2⇡ln|r|
P = G ⇤RHS
then the logarithm is equal to:
log(z � z
j
) = log r + log(ei✓) = log r + i✓ = log |z � z
j
|+ i✓.
We found that Re(log(z � z
j
)) = log |z � z
j
|. Thus the potential can be computed as the realpart of the complex number:
�(z) =mX
j=1
m
j
log(z � z
j
).
Now for the multiple expansion, consider the case in which |z| is larger than any |zj
|. We maywrite the previous as:
�(z) =mX
j=1
m
j
log(z � z
j
) =mX
j=1
m
j
hlog z + log
⇣1� z
j
z
⌘i= M log z +
mX
j=1
m
j
1X
l=1
⇣z
j
z
⌘l
l
=
= M log z +1X
l=1
mX
j=1
m
j
⇣z
j
z
⌘l
l
= M log z +1X
l=1
2
4z
�l
mX
j=1
m
j
z
l
j
l
3
5 = M log z +1X
l=1
↵
l
z
l
where ↵
l
=mPj=1
m
j
z
l
j
l
. We can now introduce the first theorem for the expansion. Having to do
with a Quadtree, we would use it to compute the FMM expansions of the leaves, truncating theinfinite sum to a certain order p.
Lemma 1. Suppose that m charges of strengths {qi
, i = 1, . . . ,m} are located at points {zi
, i =1, . . . ,m} with |z
i
| < r. Then for any z with |z| > r the potential �(z) induced by the charges isgiven by:
�(z) = a0 log(z) +1X
k=1
a
k
z
k
where:
a0 =mX
i=1
q
i
and a
k
=mX
i=1
�q
i
z
k
i
k
for k � 1
The gain in speed is achieved by using a grid which is as coarse as possible. In order to dothis we should be able to “unify” the expansions of neighboring leaves. This is possible by usingthe next lemma, which allows us to translate the center of a certain expansion. In this way, forexample, we could compute the expansions for 4 leaves, center them onto their common parentnode and sum the expansions, so that we have the expansion for the entire parent node.
Lemma 2. Suppose that:
�(z) = a0 log(z � z0) +1X
k=1
a
k
(z � z0)k
is a multipole expansion of the potential due to a set of m charges of strength q1, q2, . . . qm, all ofwhich are located inside the circle D of radius R with center at z0. Then for z outside the circleD1 of radius (R+ |z0|) and center at the origin,
�(z) = a0 log(z) +1X
l=1
b
l
z
l
3
then the logarithm is equal to:
log(z � z
j
) = log r + log(ei✓) = log r + i✓ = log |z � z
j
|+ i✓.
We found that Re(log(z � z
j
)) = log |z � z
j
|. Thus the potential can be computed as the realpart of the complex number:
�(z) =mX
j=1
m
j
log(z � z
j
).
Now for the multiple expansion, consider the case in which |z| is larger than any |zj
|. We maywrite the previous as:
�(z) =mX
j=1
m
j
log(z � z
j
) =mX
j=1
m
j
hlog z + log
⇣1� z
j
z
⌘i= M log z +
mX
j=1
m
j
1X
l=1
⇣z
j
z
⌘l
l
=
= M log z +1X
l=1
mX
j=1
m
j
⇣z
j
z
⌘l
l
= M log z +1X
l=1
2
4z
�l
mX
j=1
m
j
z
l
j
l
3
5 = M log z +1X
l=1
↵
l
z
l
where ↵
l
=mPj=1
m
j
z
l
j
l
. We can now introduce the first theorem for the expansion. Having to do
with a Quadtree, we would use it to compute the FMM expansions of the leaves, truncating theinfinite sum to a certain order p.
Lemma 1. Suppose that m charges of strengths {qi
, i = 1, . . . ,m} are located at points {zi
, i =1, . . . ,m} with |z
i
| < r. Then for any z with |z| > r the potential �(z) induced by the charges isgiven by:
�(z) = a0 log(z) +1X
k=1
a
k
z
k
where:
a0 =mX
i=1
q
i
and a
k
=mX
i=1
�q
i
z
k
i
k
for k � 1
The gain in speed is achieved by using a grid which is as coarse as possible. In order to dothis we should be able to “unify” the expansions of neighboring leaves. This is possible by usingthe next lemma, which allows us to translate the center of a certain expansion. In this way, forexample, we could compute the expansions for 4 leaves, center them onto their common parentnode and sum the expansions, so that we have the expansion for the entire parent node.
Lemma 2. Suppose that:
�(z) = a0 log(z � z0) +1X
k=1
a
k
(z � z0)k
is a multipole expansion of the potential due to a set of m charges of strength q1, q2, . . . qm, all ofwhich are located inside the circle D of radius R with center at z0. Then for z outside the circleD1 of radius (R+ |z0|) and center at the origin,
�(z) = a0 log(z) +1X
l=1
b
l
z
l
3
• The algorithm Speedy Q-Learning was implemented and tried, but it did not convergefaster than normal Q-Learning. The update of the Q-table is the following:
Q
k+1(x, a) = Q
k
(x, a)+↵
k
(Tk
Q
k�1(x, a)�Q
k
(x, a))+(1�↵
k
)(Tk
Q
k
(x, a)�Tk
Q
k�1(x, a))
where we have:Tk
Q(x, a) = r(x, a) + �MQ(yk
).
Here (MQ)(x) = maxa2A Q(x, a) and ↵
k
is the decaying learning rate, going as 1/n wheren is the number of the trial. If you really use ↵
k
= 1/k the algorithm does not seem toconverge, while you substitute ↵
k
with a small but constant learning rate (e.g. 0.01) youcan observe a slow convergence.
The problems now are:
• Convergence is slow
• Is the reward ok? (pressure?)
• Learning: the Q table might not be the best choice, it is not flexible and cannot be refined,you need to restart everything. The next approach might be to emulate the Q functionvalue with a neural network (Batch Programming).
• E�ciency: once the fish had learned how to follow a point, it has to learn how to followthat e�ciently, and the di↵erence in e�ciency between a good and a bad case might bequantitatively small (reward?).
Fast Multiple Method [5] [6]
We need to solve the potential problem of 2-dimensional point charges. Every point chargelocated in x
0
2 R2 gives rise to the potential:
�
x0(x, y) = � log(||x� x
0
||),
and away from the charge the potential is harmonic:
4� = 0.
First of all, substitute (x, y) with the complex number z = x+ iy, so that we have:
�
x0(x) = Re(� log(z � z0)).
Consider we have m particles located at z1, z2, . . . , zm, they will generate a potential:
�(x, y) =mX
j=1
m
j
log r =mX
j=1
m
j
log
q(x� x
j
)2 + (y � y
j
)2�.
We can write r as:
r =q(x� x
j
)2 + (y � y
j
)2 = |z � z
j
|
which in polar coordinates becomes:
z � z
j
= re
i✓ = r cos ✓ + ir sin ✓
2
So solution is the real part of
Pressure FMM
35
then the logarithm is equal to:
log(z � z
j
) = log r + log(ei✓) = log r + i✓ = log |z � z
j
|+ i✓.
We found that Re(log(z � z
j
)) = log |z � z
j
|. Thus the potential can be computed as the realpart of the complex number:
�(z) =mX
j=1
m
j
log(z � z
j
).
Now for the multiple expansion, consider the case in which |z| is larger than any |zj
|. We maywrite the previous as:
�(z) =mX
j=1
m
j
log(z � z
j
) =mX
j=1
m
j
hlog z + log
⇣1� z
j
z
⌘i= M log z +
mX
j=1
m
j
1X
l=1
⇣z
j
z
⌘l
l
=
= M log z +1X
l=1
mX
j=1
m
j
⇣z
j
z
⌘l
l
= M log z +1X
l=1
2
4z
�l
mX
j=1
m
j
z
l
j
l
3
5 = M log z +1X
l=1
↵
l
z
l
where ↵
l
=mPj=1
m
j
z
l
j
l
. We can now introduce the first theorem for the expansion. Having to do
with a Quadtree, we would use it to compute the FMM expansions of the leaves, truncating theinfinite sum to a certain order p.
Lemma 1. Suppose that m charges of strengths {qi
, i = 1, . . . ,m} are located at points {zi
, i =1, . . . ,m} with |z
i
| < r. Then for any z with |z| > r the potential �(z) induced by the charges isgiven by:
�(z) = a0 log(z) +1X
k=1
a
k
z
k
where:
a0 =mX
i=1
q
i
and a
k
=mX
i=1
�q
i
z
k
i
k
for k � 1
The gain in speed is achieved by using a grid which is as coarse as possible. In order to dothis we should be able to “unify” the expansions of neighboring leaves. This is possible by usingthe next lemma, which allows us to translate the center of a certain expansion. In this way, forexample, we could compute the expansions for 4 leaves, center them onto their common parentnode and sum the expansions, so that we have the expansion for the entire parent node.
Lemma 2. Suppose that:
�(z) = a0 log(z � z0) +1X
k=1
a
k
(z � z0)k
is a multipole expansion of the potential due to a set of m charges of strength q1, q2, . . . qm, all ofwhich are located inside the circle D of radius R with center at z0. Then for z outside the circleD1 of radius (R+ |z0|) and center at the origin,
�(z) = a0 log(z) +1X
l=1
b
l
z
l
3
then the logarithm is equal to:
log(z � z
j
) = log r + log(ei✓) = log r + i✓ = log |z � z
j
|+ i✓.
We found that Re(log(z � z
j
)) = log |z � z
j
|. Thus the potential can be computed as the realpart of the complex number:
�(z) =mX
j=1
m
j
log(z � z
j
).
Now for the multiple expansion, consider the case in which |z| is larger than any |zj
|. We maywrite the previous as:
�(z) =mX
j=1
m
j
log(z � z
j
) =mX
j=1
m
j
hlog z + log
⇣1� z
j
z
⌘i= M log z +
mX
j=1
m
j
1X
l=1
⇣z
j
z
⌘l
l
=
= M log z +1X
l=1
mX
j=1
m
j
⇣z
j
z
⌘l
l
= M log z +1X
l=1
2
4z
�l
mX
j=1
m
j
z
l
j
l
3
5 = M log z +1X
l=1
↵
l
z
l
where ↵
l
=mPj=1
m
j
z
l
j
l
. We can now introduce the first theorem for the expansion. Having to do
with a Quadtree, we would use it to compute the FMM expansions of the leaves, truncating theinfinite sum to a certain order p.
Lemma 1. Suppose that m charges of strengths {qi
, i = 1, . . . ,m} are located at points {zi
, i =1, . . . ,m} with |z
i
| < r. Then for any z with |z| > r the potential �(z) induced by the charges isgiven by:
�(z) = a0 log(z) +1X
k=1
a
k
z
k
where:
a0 =mX
i=1
q
i
and a
k
=mX
i=1
�q
i
z
k
i
k
for k � 1
The gain in speed is achieved by using a grid which is as coarse as possible. In order to dothis we should be able to “unify” the expansions of neighboring leaves. This is possible by usingthe next lemma, which allows us to translate the center of a certain expansion. In this way, forexample, we could compute the expansions for 4 leaves, center them onto their common parentnode and sum the expansions, so that we have the expansion for the entire parent node.
Lemma 2. Suppose that:
�(z) = a0 log(z � z0) +1X
k=1
a
k
(z � z0)k
is a multipole expansion of the potential due to a set of m charges of strength q1, q2, . . . qm, all ofwhich are located inside the circle D of radius R with center at z0. Then for z outside the circleD1 of radius (R+ |z0|) and center at the origin,
�(z) = a0 log(z) +1X
l=1
b
l
z
l
3
then the logarithm is equal to:
log(z � z
j
) = log r + log(ei✓) = log r + i✓ = log |z � z
j
|+ i✓.
We found that Re(log(z � z
j
)) = log |z � z
j
|. Thus the potential can be computed as the realpart of the complex number:
�(z) =mX
j=1
m
j
log(z � z
j
).
Now for the multiple expansion, consider the case in which |z| is larger than any |zj
|. We maywrite the previous as:
�(z) =mX
j=1
m
j
log(z � z
j
) =mX
j=1
m
j
hlog z + log
⇣1� z
j
z
⌘i= M log z +
mX
j=1
m
j
1X
l=1
⇣z
j
z
⌘l
l
=
= M log z +1X
l=1
mX
j=1
m
j
⇣z
j
z
⌘l
l
= M log z +1X
l=1
2
4z
�l
mX
j=1
m
j
z
l
j
l
3
5 = M log z +1X
l=1
↵
l
z
l
where ↵
l
=mPj=1
m
j
z
l
j
l
. We can now introduce the first theorem for the expansion. Having to do
with a Quadtree, we would use it to compute the FMM expansions of the leaves, truncating theinfinite sum to a certain order p.
Lemma 1. Suppose that m charges of strengths {qi
, i = 1, . . . ,m} are located at points {zi
, i =1, . . . ,m} with |z
i
| < r. Then for any z with |z| > r the potential �(z) induced by the charges isgiven by:
�(z) = a0 log(z) +1X
k=1
a
k
z
k
where:
a0 =mX
i=1
q
i
and a
k
=mX
i=1
�q
i
z
k
i
k
for k � 1
The gain in speed is achieved by using a grid which is as coarse as possible. In order to dothis we should be able to “unify” the expansions of neighboring leaves. This is possible by usingthe next lemma, which allows us to translate the center of a certain expansion. In this way, forexample, we could compute the expansions for 4 leaves, center them onto their common parentnode and sum the expansions, so that we have the expansion for the entire parent node.
Lemma 2. Suppose that:
�(z) = a0 log(z � z0) +1X
k=1
a
k
(z � z0)k
is a multipole expansion of the potential due to a set of m charges of strength q1, q2, . . . qm, all ofwhich are located inside the circle D of radius R with center at z0. Then for z outside the circleD1 of radius (R+ |z0|) and center at the origin,
�(z) = a0 log(z) +1X
l=1
b
l
z
l
3
where:
b
l
= �a0zl
0
l
+lX
k=1
a
k
z
l�k
0
✓l � 1k � 1
◆
with
✓l � 1k � 1
◆the binomial coe�cients.
4
where:
b
l
= �a0zl
0
l
+lX
k=1
a
k
z
l�k
0
✓l � 1k � 1
◆
with
✓l � 1k � 1
◆the binomial coe�cients.
4
FSI Algorithm details
@!
@t+ (u ·r)! = (! ·r)u+ ⌫r2! +
1
⇢2r⇢⇥rp
d(Msx)
dt= F
d(Is!)
dt= ⌧
r · u = 0
u = uS ⌘ ut + ur + udef
fluid flow
fluid2solid solid2fluid
continuum
r · u = 0@!
@t+ (u ·r)! = (! ·r)u+ ⌫r2!
� r⇢
⇢⇥
✓@u
@t+ (u ·r)u� ⌫r2u� g
◆
+ ��(uS � u)
single-fluid model for FSI
u
ti =
1
mi
Z
⌦⇢�iu dx
✓i = J
�1i
Z
⌦⇢�i(x� xi)⇥ u dx
u
ri = ✓i ⇥ (x� xi)
@!n
@t= !n ·run
MultipolesVelocity
Projection
Penalization
Diffusion
Advection
Refinement
Compression
tn
tn+1
RK2+LTS
RK2
Explicit Euler
r2 n = �!n
un = r⇥ n
@!n�
@t= ⌫r2!n
�
@!n�
@t+ u
n� ·r!n
� = 0
!n+1 = !n+1�
x
n+1i = x
ni + u
t,ni �tn
✓n+1i = ✓n + ✓
n
i �tn
R(!nand/or un
)|tr
C(!n+1and/or un+1
)|tc
Stretching
RK2+LTS / particles
x
n+1i = x
ni + u
t,ni �tn, ✓n+1
i = ✓ni + ✓
n
i �tn
Baroclinicity @!n�
@t= �r⇢n
⇢n⇥
✓@un
�
@t+ (un
� ·r)un� � ⌫r2un
� � g
◆Explicit Euler
⇢n = ⇢f +NX
i=1
(⇢ni � ⇢f )�ni
u
t,ni =
1
mi
Z
⌦⇢n�n
i un dx
✓n
i = J
�1i
Z
⌦⇢n�n
i (x� x
ni )⇥ u
n dx
u
r,ni = ✓
n
i ⇥ (x� x
ni )
disc
reti
zati
on
!� = !n +r⇥ (u� � un)u� =un + ���tuS
1 + ���t
Fish surface pressure-force• Time varying force
37
• Thrust magnitude • Almost all segments
contribute to thrust • Either side of head -
thrust (negative pressure)
• Largest drag: tip of head, and tail-end
• Sum : Net Fx and Fy • For validation
against ax/y from velocity
Pressure and thrust• Thrust contribution:
depends on • Pressure sign • Body curvature
38
• Regions close to head contribute to thrust via pressure • Caveat: still need to
examine viscous contribution