Automatic high order absorption layers for advective-diffusive systems of equations
1. Automatic high order absorption layers by M.Storti et.al.
Automatic high order absorption layers for
advective-diffusive systems of equations
by Mario Storti, Laura Battaglia, and Rodrigo Paz
´
Centro Internacional de Metodos Computacionales
en Ingenier´a - CIMEC
ı
INTEC, (CONICET-UNL), Santa Fe, Argentina
<mario.storti at gmail.com>
http://www.cimec.org.ar/mstorti
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 1
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
2. Automatic high order absorption layers by M.Storti et.al.
Motivation for Absorbing Boundary Conditions
In wave-like propagation problems, not
including ABC may lead to
non-convergent solutions .
utt = c2 ∆u, in Ω
u = u(x, t), at Γb , u = 0, at Γ∞ v
¯
u doesn’t converge to the correct
solution irradiating energy from the
source, even if Γ∞ → ∞. A standing
wave is always found.
u is unbounded if u emits in an
¯
eigenfrequency which is a resonance
mode of the closed cavity.
Absorbing boundary conditions must be
added to the outer boundary in order to let
energy be extracted from the domain.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 2
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
3. Automatic high order absorption layers by M.Storti et.al.
Motivation for Absorbing Boundary Conditions (cont.)
If a dissipative region is large
enough so that many wavelengths
are included in the region may act
as an absorbing layer, i.e. as an
absorbing boundary condition.
dissipative
However, it is a common
misconception to assume that a
coarse mesh adds dissipation and
fine mesh coarse mesh
consequently may improve
absorption. For instance for the dissipative??
wave equation a coarse mesh may
lead to evanescent solutions and
then to act as a fully reflecting
boundary.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 3
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
4. Automatic high order absorption layers by M.Storti et.al.
Boundary conditions for advective diffusive systems
Well known theory and practice for advective systems say that at a boundary
the number of Dirichlet conditions should be equal to the
number of incoming characteristics .
∂U ∂Fc,j (U)
+ =0
∂t ∂xj
∂Fc,j (U)
Ac,j = , advective Jacobian
∂U
Nbr. of incoming characteristics = sum(eig(A · n) < 0)
ˆ
ˆ
n is the exterior normal.
Adding extra Dirichlet conditions leads to spurious shocks, and lack of
enough Dirichlet conditions leads to instability.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 4
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
5. Automatic high order absorption layers by M.Storti et.al.
Boundary conditions for advective diffusive systems (cont.)
For simple scalar advection problems the Jacobian is the transport velocity.
The rule is then to check the projection of velocity onto the exterior normal.
For more complex flows (i.e. with non diagonalizable Jacobians , as gas
dynamics or shallow water eqs.) the number of incoming characteristics may
be approx. predicted from the flow conditions.
subsonic flow (Minf<1) supersonic flow (Minf>1)
supersonic outgoing
subsonic incoming (no fields imposed)
rho,u,v rho,u,v,p
ck
ho
ws
M>1 bo
M<1
1111111
0000000
1111111
0000000 111111
000000
111111
000000
1111111
0000000 111111
000000
1111111
0000000 111111
000000
p p
subsonic outgoing subsonic outgoing
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 5
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
6. Automatic high order absorption layers by M.Storti et.al.
Absorbing boundary conditions
However, this kind of conditions are, generally, reflective . Consider a pure
advective system of equations in 1D, i.e., Fd,j ≡ 0
∂H(U) ∂Fc,x (U)
+ = 0, in [0, L]. (1)
∂t ∂x
If the system is “linear”, i.e., Fc,x (U) = AU, H(U) = CU (A and C do
not depend on U), a first order linear system is obtained
∂U ∂U
C +A = 0. (2)
∂t ∂x
The system is “hyperbolic” if C is invertible, C−1 A is diagonalizable with
real eigenvalues. If this is the case, it is possible to make the following
eigenvalue decomposition for C−1 A
C−1 A = SΛS−1 , (3)
where S is real and invertible and Λ is real and diagonal. If new variables are
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 6
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
7. Automatic high order absorption layers by M.Storti et.al.
defined V = S−1 U, then equation (2) becomes
∂V ∂V
+Λ = 0. (4)
∂t ∂x
Now, each equation is a linear scalar advection equation
∂vk ∂vk
+ λk = 0, (no summation over k ). (5)
∂t ∂x
vk are the “characteristic components” and λk are the “characteristic
velocities” of propagation.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 7
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
8. Automatic high order absorption layers by M.Storti et.al.
Linear 1D absorbing boundary conditions
Assuming λk = 0, the absorbing boundary conditions are, depending on the
sign of λk ,
if λk > 0: vk (0) = vk0 ;
¯ no boundary condition at x =L
(6)
if λk < 0: vk (L) = vkL ; no boundary condition at x = 0
¯
This can be put in compact form as
¯
Π+ (V − V0 ) = 0; at x =0
V
(7)
Π− (V
V
¯
− VL ) = 0; at x =L
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 8
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
9. Automatic high order absorption layers by M.Storti et.al.
Linear 1D absorbing boundary conditions (cont.)
Π± are the projection matrices onto the right/left-going characteristic modes
V
in the V basis,
1; if j = k and λ > 0
k
Π+ =
V,jk
0; otherwise, (8)
Π+ + Π− = I.
It can be easily shown that they are effectively projection matrices, i.e.,
Π± Π± = Π± and Π+ Π− = 0. Coming back to the boundary condition at
x = L in the U basis, it can be written
Π− S−1 (U − UL ) = 0
V
¯ (9)
or, multiplying by S at the left
Π± (U − U0,L ) = 0, at x = 0, L,
U
¯ (10)
where
Π± = S Π± S−1 ,
U V (11)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 9
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
10. Automatic high order absorption layers by M.Storti et.al.
Linear 1D absorbing boundary conditions (cont.)
Π± (U − U0,L ) = 0, at x = 0, L,
U
¯
(12)
Π±
U = S Π±
V
−1
S ,
These conditions are completely absorbing for 1D linear advection system of
equations (2).
+
The rank of Π is equal to the number n+ of positive eigenvalues, i.e., the
number of right-going waves. Recall that the right-going waves are incoming
at the x = 0 boundary and outgoing at the x = L boundary. Conversely, the
−
rank of Π is equal to the number n− of negative eigenvalues, i.e., the
number of left-going waves (incoming at x = L and outgoing at the x = 0
boundary).
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 10
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
11. Automatic high order absorption layers by M.Storti et.al.
ABC for nonlinear problems
First order absorbing boundary conditions may be constructed by imposing
exactly the components along the incoming characteristics.
Π− (Uref ) (U − Uref ) = 0.
Π− is the projection operator onto incoming characteristics. It can be
obtained straightforwardly from the projected Jacobian.
What for non-linear problems? A posisble strategy is to linearize the state
around the last state or a predictor state.
Storti, M.; Nigro, N.; Paz, R.R.; Dalcin, L. “Dynamic boundary conditions in
Computational Fluid Dynamics” Computer Methods in Applied Mechanics
and Engineering 197(13-16), pp. 1219-1232 (2008)
Paz, R.R.; Storti, M.; Garelli, L. “Local Absorbent Boundary Condition for
Nonlinear Hyperbolic Problems with Unknown Riemann Invariants”
Computers and Fluids 40, pp. 52-67 (2011)
(launch video cylabso-xoffset015-Rext10)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 11
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
12. Automatic high order absorption layers by M.Storti et.al.
Higher order absorbing boundary conditions
irregular geometries:
emitter
In 2D or 3D a first order
ABC will be partially
reflecting for regular geometries:
wall (reflecting)
non-normal incidence.
This can lead to large
errors, speciall for very
1st order ABC
1st order ABC
regular geometries like
a channel. emitter
wall (reflecting)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 12
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
13. Automatic high order absorption layers by M.Storti et.al.
Higher order absorbing boundary conditions (cont.)
There are several approaches for higher order aborbing layers, among them a
popular approach is the Perfectly Matched Layer (PML, Makefile. J-P
Berenger, J. Comput. Phys. 114, 185 (1994)). However,
It is addhoc for each physical problem.
It is formulated only on rectangular domains .
It’s not very robust .
It requires additional variables to be defined in the program in the
absorbing layer.
The first is the most concerning us. We want an absorbing numerical device
with the following characteristics
To be automatically computable from the flux function (and perhaps the
Jacobian of the fluxes).
To be adjustable higher order (more probably first and second order).
To be robust .
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 13
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
14. Automatic high order absorption layers by M.Storti et.al.
If auxiliary variables are needed, they must be easily computable in the
actual context.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 14
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
15. Automatic high order absorption layers by M.Storti et.al.
Advective/diffusive systems implemented
Navier-Stokes compressible flow ( ),
Shallow water equations ( ),
Stratified shallow water equations ( ),
1D shallow water equations in channels of arbitrary section ( ),
Scalar advection/diffusion ( ),
Scalar wave equation ( )
Maxwell equations ( )
( = implemented in PETSc-FEM)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 15
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
16. Automatic high order absorption layers by M.Storti et.al.
A second order absorbing layer
If, for the first order aborbing boundary condition we condense the Lagrange
multiplier version, we get a penalized version of the form
Un+1 − Un Un+1 − Un+1 1
C 0 0
+A 1 0
+ CΠ+ Un+1 = 0.
U 0 (13)
∆t h
Assuming that we want to add an absorbing layer in 0 ≤ x ≤ L, then the
equation would be
∂U ∂U ∂U
C + HU + A +B = 0, (14)
∂t ∂x ∂y
where H is the matrix of absorbing coefficients to be yet defined. We now
transform Fourier in t and y with associated variables iω and iky , i.e. we
assume
ˆ
U(x, y, t) = U(x)exp {i(ky y − ωt)}. (15)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 16
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
17. Automatic high order absorption layers by M.Storti et.al.
ˆ
Then, we get (for simplicity we drop the hat symbol (U → U),
∂U
A + (−iωC + H + iky B)U = 0,
∂x (16)
∂U
=⇒ + (A−1 H − iωM(z))U = 0,
∂x
where
z = ky /ω,
−1
(17)
M(z) = A (C − zB).
In order to not have reflections A−1 H must have the same eigenvectors
that M(z). One possibility is then to diagonalize M(z)
M(z) = QΛQ−1 , (18)
and then to force A−1 H to be diagonal in the same basis
A−1 H = QΛH Q−1 . (19)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 17
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
18. Automatic high order absorption layers by M.Storti et.al.
In order to have an absorbing layer we must have
sign(λ(A−1 H)j ) = sign(λj ), (20)
Transforming Fourier back to t and y we obtain the desired absorbing layer.
However, Q depends on z and so will H so it would be non-local . In order to
have a local operator we perform an expansion of it in powers of z . For
instance if we can approximate it to
H(z) ≈ H0 + zδH, (21)
then the absorbing term would be
H0 U + zδHU = H0 U + (iky /iω)δHU. (22)
Transforming Fourier back to (t, y) we get
∂U ∂U ∂U
C + H({U}) + A +B = 0,
∂t ∂x ∂y
t (23)
∂U
H({U}) = H0 U + δH dt.
t=0 ∂y
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 18
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
19. Automatic high order absorption layers by M.Storti et.al.
The simplest choice for (29) is λ(A−1 H)j = Kλj , and we get H0 = KC,
H1 = −KB, so that the absorbing layer is
t
∂U ∂U ∂U ∂U
C + K CU − B dt + A +B = 0, (24)
∂t t=0 ∂y ∂x ∂y
Note that in the first order case we get a local operator .
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 19
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
20. Automatic high order absorption layers by M.Storti et.al.
Numerical evaluation of the absorbing operator
It involves an integral over time , that involves storing an auxiliary
variable say W and then updating with
t
∂U
W= dt,
t=0 ∂y
(25)
n+1 n n−1 n+1
(3W − 4W + W )jk (Uj,k+1 − Uj,k−1 )
= .
2∆t 2∆y
The derivative with respect to y is computed by standard finite difference
approximations (j(k) indices is along x(y) axis).
The operator can be easily evaluated in the context of an
unstructured grid solver (FEM for instance).
K[=]T−1 but if a velocity scale v is available then we get a length scale
¯
¯
Labso = v /K
¯
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 20
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
21. Automatic high order absorption layers by M.Storti et.al.
Examples. The scalar wave equation
The standard representation of the scalar wave equation is
φtt = c2 ∆φ (26)
In 2D we can put it in the form of an advective-diffusive as
ut + c(ux + vy ) = 0,
(27)
vt + c(−vx + uy ) = 0.
and the corresponding vectorial form is
u 1 0 0 1
U= , Ax = c , Ay = c , (28)
v 0 −1 1 0
u and v satisfy the wave equation, and the dispersion relation is ω = ck (the
same as for the wave equation).
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 21
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
22. Automatic high order absorption layers by M.Storti et.al.
Reflection coefficients
1
1st order , K=0
0.8 1st order , K=5
1st order , K=10
1st order , K=20
2nd order , K=5
0.6
2nd order , K=10
2nd order , K=20
0.4
0.2
0
0 0.5 1 1.5 2
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 22
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
23. Automatic high order absorption layers by M.Storti et.al.
Reflection coefficients (cont.)
1st order layer 2nd order layer
1
wave amplitude
wave amplitude
1
u,v variables
0.9
0.8
0.8
0.7
u
u
0.6 0.6
0.5
0.4
0.4
0.2
v 0.3
0.2
v
0 0.1
0 0.2 0.4 0.6 0.8
x 1 0 0.2 0.4 0.6 0.8
x 1
charact. vrbles
wave amplitude
wave amplitude
1 1
0.8 0.8
V1
0.6
V1 0.6
0.4 0.4
0.2
V2 0.2
0 0
V2
x
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 23
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
24. Automatic high order absorption layers by M.Storti et.al.
Decaying perturbation example
wall (perfectly reflecting)
1st order ABC
1st order ABC
10
absorbing
layer
1 wall (perfectly reflecting)
1st order surf
[4300 step/OM]
1st order surf
+ 1st order layer
[4000 step/OM]
0.1
1st order surf
2nd order + layer
[1200 step/OM]
0.01
0 500 1000 1500 2000
time step
(launch video fsabso2d-pertini)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 24
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
25. Automatic high order absorption layers by M.Storti et.al.
Diffraction by a slit
wall (perfectly reflecting)
1st order ABC
Lslit=0.5
absorbing
Ly=1
layer
omega=25.7 wall (perfectly reflecting)
lambda = 0.25 Lx=1
c=1
Labso=0.25
(launch video fsabso2d-slit-best)
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 25
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
26. Automatic high order absorption layers by M.Storti et.al.
Other choices for the absorbing matrix coefficient
Recall that the requirement on H is
sign(λ(A−1 H)j ) = sign(λj ), (29)
some possible choices are
λ(A−1 H)j ) = λj =⇒ H0 = C,
λ(A−1 H)j ) = sign(λj ) =⇒ H0 = A|A−1 C|, (30)
λ(A−1 H)j ) = 1/λj =⇒ H0 = A|C−1 A|,
The expansion H(z) ≈ H0 + zδH can be donde numerically if it is not
possible to do analytically, i.e. compute H(z) for several z and fit with
polynomials for each entry in H.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 26
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
27. Automatic high order absorption layers by M.Storti et.al.
Conclusions
An aborbing high order layer has been presented.
It can be automatically computed programatically from the flux function
and its Jacobians .
It requires an auxiliary variable that is basically the integral over time of
the lateral derivatives. (It’s non-local in time) .
Several examples for the wave equation have been shown with the
simplest choice H = C − zB.
Other choices for H may be computed by polynomial fitting on z .
Computational cost is negligible (but results on the absorbing layer must
be discarded) ( / )
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 27
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))
28. Automatic high order absorption layers by M.Storti et.al.
Acknowledgment
This work has received financial support from Universidad Nacional del
Litoral (UNL, Argentina, grants CAI+D 2005-10-64) and Agencia Nacional de
´ ´
Promocion Cient´fica y Tecnologica (ANPCyT, Argentina, grants PICT PME
ı
209/2003, PICT-1141/2007, PICT-1506/2006).
We made extensive use of Free Software (http://www.gnu.org) as
GNU/Linux OS, MPI, PETSc, GCC/G++ compilers, Octave, VTK, Python, Git,
among many others. In addition, many ideas from these packages have been
inspiring to us.
´
Centro Internacional de Metodos Computacionales en Ingenier´a
ı 28
((version texstuff-1.0.36-102-gdb116be Thu Nov 3 09:14:55 2011 -0300) (date Thu Nov 3 09:15:35 2011 -0300))