Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf ·...
Transcript of Dedalus: A spectral solver for PDEs with diverse ...keaton-burns.com/docs/dfd_2017_talk.pdf ·...
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
Dedalus Team
Daniel Lecoanet, Jeff Oishi, Geoff Vasil, Keaton Burns, Ben Brown
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
Spectral Methods
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, ...
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)
Sparse Chebyshev representations
⟨Ti|∂xTj⟩ ⟨Ui|∂xTj⟩
Tn(cos(θ)) = cos(nθ)
Un(cos(θ)) =sin((n+ 1)θ)
sin(θ)
∂zTn = nUn−1
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
Hydrodynamics
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
�
�
Rayleigh-Benard convection
Boussinesq hydrodynamics
Spiral defect chaos
Rayleigh-Benard convection
Global timestepping error in nonlinear regime
Turbulent glacier melting
Boussinesq hydrodynamics
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
dedalus-project.org