Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf ·...

15
APS DFD November 19, 2017 Keaton J. Burns, Georey M. Vasil, Jerey S. Oishi, Daniel Lecoanet, Benjamin P. Brown Dedalus: A spectral solver for PDEs with diverse applications to CFD

Transcript of Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf ·...

Page 1: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

APS DFD November 19, 2017

Keaton J. Burns, Geoffrey M. Vasil, Jeffrey S. Oishi, Daniel Lecoanet, Benjamin P. Brown

Dedalus: A spectral solver for PDEs with diverse applications to CFD

Page 2: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Dedalus Team

Daniel Lecoanet, Jeff Oishi, Geoff Vasil, Keaton Burns, Ben Brown

Page 3: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Dedalus Features

What can it simulate?

• Simple domains from the direct product of spectral series • Custom equations, including linear constraints and boundary conditions

Is it efficient?

• Compiled libraries are called for most of the work (FFTW, SUPERLU) • Simulations are automatically MPI parallelized, tested on 16k cores

Motivation

• Create a system that easily accommodates different models • Simplify parallelization and optimization

Page 4: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Spectral Methods

Page 5: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Spectral representations

Spectral series:

Operator matrices:

Equation residuals:

u(x) =N−1!

n=0

unφn(x)

��m|Hu� =�

n

��m|H�n�un

= Hmnun

Hu = F

⟨ψi|Hu⟩ = ⟨ψi|F ⟩ i = 0, 1, ...

Page 6: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Spectral bases

Fourier series:

Sine/Cosine series:

Chebyshev polynomials: Tn(z) = cos(n�), cos(�) � z

= 2zTn�1(z) � Tn�2(z)

T0(z) = 1

T1(z) = z

T2(z) = 2z2 � 1

Fn(x) = einx

Sn(x) = sin(nx)

Cn(x) = cos(nx)

Page 7: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Sparse Chebyshev representations

⟨Ti|∂xTj⟩ ⟨Ui|∂xTj⟩

Tn(cos(θ)) = cos(nθ)

Un(cos(θ)) =sin((n+ 1)θ)

sin(θ)

∂zTn = nUn−1

Page 8: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Higher dimensions and separability

Direct-product bases:

Linear separability:

u(x, y) =�

m,n

umn�xm(x)�y

n(x)

H�xm � �x

m

u(x, y) =!

m,n

umneimxTn(y)E.g. Fourier & Chebyshev:

m

nSeparate 1D problem for

each Fourier mode

Page 9: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Hydrodynamics

Page 10: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Incompressible Hydrodynamics

Non-split formulation: • Directly enforce divergence constraint • Pressure determined as Lagrange multiplier • No pressure boundary conditions • Allows for high-order DAE timesteppers

�1 0 00 1 00 0 0

� �t

�uvp

� +

����2 0 �x

0 ���2 �y

�x �y 0

�uvp

� =

���u · �u��u · �v

0

Page 11: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Rayleigh-Benard convection

Boussinesq hydrodynamics

Spiral defect chaos

Page 12: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Rayleigh-Benard convection

Global timestepping error in nonlinear regime

Page 13: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Turbulent glacier melting

Boussinesq hydrodynamics

Page 14: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

Implicit-explicit formulation: • Subtract out hydrostatic background • Linear acoustic terms are integrated implicitly • No timestep restriction from speed of sound

Fully Compressible Hydrodynamics

�tu + �0�p� + ���p0 = �u · �u � ���p�

�t�� + u · ��0 � �0� · u = �u · ��� + ��� · u

�tp� + u · �p0 + �p0� · u = �u · �p� � �p�� · u

Page 15: Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf · Dedalus Features What can it simulate? • Simple domains from the direct product of

dedalus-project.org