Clawpack Tutorial Part I

Similar documents
Clawpack Tutorial Part I

High-resolution finite volume methods for hyperbolic PDEs on manifolds

Conservation Laws and Finite Volume Methods

Conservation Laws and Finite Volume Methods

High-Resolution Finite Volume Methods and Adaptive Mesh Refinement

Wave Propagation Software, Computational Science, and Reproducible Research

Notes: Outline. Diffusive flux. Notes: Notes: Advection-diffusion

Calculating Storm Surge and Other Coastal Hazards Using Geoclaw

Notes: Outline. Shock formation. Notes: Notes: Shocks in traffic flow

AMath 574 February 11, 2011

Numerical simulation of cylindrical solitary waves in periodic media

Characteristics for IBVP. Notes: Notes: Periodic boundary conditions. Boundary conditions. Notes: In x t plane for the case u > 0: Solution:

Poroelasticity simulation in CLAWPACK for geophysical and biological applications

ADAPTIVE MESH REFINEMENT USING WAVE-PROPAGATION ALGORITHMS FOR HYPERBOLIC SYSTEMS

Two-layer shallow water system and its applications

A Well-Balanced Path-Integral f-wave Method for Hyperbolic Problems with Source Terms

Computational Methods for Storm Surge

Computational Astrophysics 7 Hydrodynamics with source terms

Introduction to Partial Differential Equations

David I. Ketcheson. Appointment. Memberships. Awards & Recognition SIAM Student Paper Prize, Research Interests.

Scientific Computing I

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

The RAMSES code and related techniques 4. Source terms

Computational Fluid Dynamics. PHY 688: Numerical Methods for (Astro)Physics

Calculation of Sound Fields in Flowing Media Using CAPA and Diffpack

High-resolution finite volume methods for extracorporeal shock wave therapy

Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems

Phase Plane Behavior of Solitary Waves in Nonlinear Layered Media

Finite Volume Methods for Hyperbolic Problems

The RAMSES code and related techniques I. Hydro solvers

Notes: Outline. Shallow water equations. Notes: Shallow water equations. Notes:

High-Performance Scientific Computing

c Copyright 2014 Jihwan Kim

Length Learning Objectives Learning Objectives Assessment

RESEARCH HIGHLIGHTS. WAF: Weighted Average Flux Method

Magnetized Target Fusion: Insights from Mathematical Modelling

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

The Lattice Boltzmann method for hyperbolic systems. Benjamin Graille. October 19, 2016

Chapter 1. Introduction

A Very Brief Introduction to Conservation Laws

Computational Analysis of an Imploding Gas:

Constrained Transport Method for the Finite Volume Evolution Galerkin Schemes with Application in Astrophysics

Applying Asymptotic Approximations to the Full Two-Fluid Plasma System to Study Reduced Fluid Models

Traffic Flow Problems

NUMERICAL SOLUTION OF HYPERBOLIC PARTIAL DIFFERENTIAL EQUATIONS

Wave propagation methods for hyperbolic problems on mapped grids

Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework

Équation de Burgers avec particule ponctuelle

Advanced numerical methods for nonlinear advectiondiffusion-reaction. Peter Frolkovič, University of Heidelberg

CapSel Roe Roe solver.

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

Computational Astrophysics

Numerical Simulations. Duncan Christie

Non-linear Scalar Equations

Computational Engineering

Approximate Harten-Lax-Van Leer (HLL) Riemann Solvers for Relativistic hydrodynamics and MHD

Comparison of Approximate Riemann Solvers

Shock-capturing Schemes for a Collisionless Two-fluid Plasma Model

Numerically Solving Partial Differential Equations

Application of Nodal Discontinuous Glaerkin Methods in Acoustic Wave Modeling

A Finite Volume Code for 1D Gas Dynamics

Deforming Composite Grids for Fluid Structure Interactions

arxiv: v2 [math.na] 4 Mar 2014

Finite volumes for complex applications In this paper, we study finite-volume methods for balance laws. In particular, we focus on Godunov-type centra

NUMERICAL METHODS IN ASTROPHYSICS An Introduction

Solving PDEs with freefem++

Various Hydro Solvers in FLASH3

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

An Improved Ghost-cell Immersed Boundary Method for Compressible Inviscid Flow Simulations. Thesis by Cheng Chi

Towards Understanding Simulations of Galaxy Formation. Nigel Mitchell. On the Origin of Cores in Simulated Galaxy Clusters

The Center for Astrophysical Thermonuclear Flashes. FLASH Hydrodynamics

Riemann Solvers and Numerical Methods for Fluid Dynamics

Advanced Methods for Numerical Fluid Dynamics and Heat Transfer (MVKN70)

A general well-balanced finite volume scheme for Euler equations with gravity

Solving Time-Harmonic Scattering Problems by the Ultra Weak Variational Formulation

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

Basics on Numerical Methods for Hyperbolic Equations

Chp 4: Non-linear Conservation Laws; the Scalar Case. By Prof. Dinshaw S. Balsara

Recapitulation: Questions on Chaps. 1 and 2 #A

State of the Art MHD Methods for Astrophysical Applications p.1/32

Monte Carlo Radiation Transport Kenny Wood

A Space-Time Expansion Discontinuous Galerkin Scheme with Local Time-Stepping for the Ideal and Viscous MHD Equations

Los Alamos National Laboratory Hydrodynamic Methods Applications and Research 1 LA-UR

SWE Anatomy of a Parallel Shallow Water Code

Numerical Methods for Hyperbolic Conservation Laws Lecture 4

Finite Volume Schemes: an introduction

11.3 MATLAB for Partial Differential Equations

A PARALLEL ADAPTIVE 3D MHD SCHEME FOR MODELING CORONAL AND SOLAR WIND PLASMA FLOWS

Numerical Solution Techniques in Mechanical and Aerospace Engineering

The shallow water equations Lecture 8. (photo due to Clark Little /SWNS)

The Hopf equation. The Hopf equation A toy model of fluid mechanics

Linear Hyperbolic Systems

Numerical Solutions to Partial Differential Equations

A Fluid-Mixture Type Algorithm for Compressible Multicomponent Flow with Mie Grüneisen Equation of State

CapSel Euler The Euler equations. conservation laws for 1D dynamics of compressible gas. = 0 m t + (m v + p) x

Sung-Ik Sohn and Jun Yong Shin

Simplified ADER schemes based on a time-reconstruction GRP solver

HIGH-RESOLUTION FINITE VOLUME METHODS FOR DUSTY GAS JETS AND PLUMES

A recovery-assisted DG code for the compressible Navier-Stokes equations

NIMROD Project Overview

Transcription:

Clawpack Tutorial Part I Randall J. LeVeque Applied Mathematics University of Washington Conservation Laws Package www.clawpack.org (pdf s will be posted and green links can be clicked)

Some collaborators Marsha Berger, NYU Jan Olav Langseth, FFI, Oslo David George, USGS CVO Donna Calhoun, CEA, Paris Christiane Helzel, Bochum David Ketcheson, KAUST Sorin Mitran, UNC Current students: Kyle Mandli (PyClaw, GeoClaw, storm surges) Jonathan Claridge (Implicit AMR) Grady Lemoine (Cut cells, bone modeling) Jihwan Kim (multi-layer, submarine landslides) Funded in part by: NSF, DOE, NCAR, NIH, ONR, AFOSR Founders Term Professorship

Outline Monday: Overview of Clawpack software What are hyperbolic problems? Finite volume methods Riemann problems and Godunov s method Downloading and installing Running and plotting Tuesday: Specifying boundary conditions Riemann solvers Limiters Wednesday: Plotting with the Python modules Multidimensional, Adaptive mesh refinement

Options for using Clawpack 1 Use IMA computers platinum, carbon, or tan. Install from tar file or Subversion: Instructions. 2 Install on your own computer. Requires some prerequisites: Fortran, Python modules. 3 Use the VirtualClaw virtual machine. 4 For some applications, use EagleClaw (Easy Access Graphical Laboratory for Exploring Conservation Laws) Also perhaps useful: Class notes on Python, Fortran, version control, etc.

First order hyperbolic PDE in 1 space dimension Linear: q t + Aq x = 0, q(x, t) lr m, A lr m m Conservation law: q t + f(q) x = 0, f : lr m lr m (flux) Quasilinear form: q t + f (q)q x = 0 Hyperbolic if A or f (q) is diagonalizable with real eigenvalues. Models wave motion or advective transport. Eigenvalues are wave speeds. Note: Second order wave equation p tt = c 2 p xx can be written as a first-order system (acoustics).

Some applications where CLAWPACK has been used Aerodynamics, supersonic flows Seismic waves, tsunamis, flow on the sphere Volcanic flows, dusty gas jets, pyroclastic surges Ultrasound, lithotripsy, shock wave therapy Plasticity, nonlinear elasticity Chemotaxis and pattern formation Semiconductor modeling Multi-fluids, multi-phase flows, bubbly flow Combustion, detonation waves Astrophysics: binary stars, planetary nebulae, jets, Magnetohydrodynamics, plasmas, relativistic flow Numerical relativity gravitational waves, cosmology

Finite differences vs. finite volumes Finite difference Methods Pointwise values Q n i q(x i, t n ) Approximate derivatives by finite differences Assumes smoothness Finite volume Methods Approximate cell averages: Q n i 1 xi+1/2 q(x, t n ) dx x x i 1/2 Integral form of conservation law, xi+1/2 q(x, t) dx = f(q(x t i 1/2, t)) f(q(x i+1/2, t)) x i 1/2 leads to conservation law q t + f x = 0 but also directly to numerical method.

Advection equation u = constant flow velocity q(x, t) = tracer concentration, f(q) = uq = q t + uq x = 0. True solution: q(x, t) = q(x ut, 0)

Advection equation u = constant flow velocity q(x, t) = tracer concentration, f(q) = uq = q t + uq x = 0. True solution: q(x, t) = q(x ut, 0)

Advection equation u = constant flow velocity q(x, t) = tracer concentration, f(q) = uq = q t + uq x = 0. True solution: q(x, t) = q(x ut, 0)

The Riemann problem The Riemann problem consists of the hyperbolic equation under study together with initial data of the form { ql if x < 0 q(x, 0) = q r if x 0 Piecewise constant with a single jump discontinuity from q l to q r. The Riemann problem is fundamental to understanding The mathematical theory of hyperbolic problems, Godunov-type finite volume methods Why? Even for nonlinear systems of conservation laws, the Riemann problem can often be solved for general q l and q r, and consists of a set of waves propagating at constant speeds.

The Riemann problem for advection The Riemann problem for the advection equation q t + uq x = 0 with { ql if x < 0 q(x, 0) = q r if x 0 has solution { ql if x < ut q(x, t) = q(x ut, 0) = if x ut consisting of a single wave of strength W 1 = q r q l propagating with speed s 1 = u. q r

Riemann solution for advection q(x, T ) x t plane q(x, 0)

Advection examples $CLAW/apps/advection/1d/example1/README.html Advection in EagleClaw

Example: Linear acoustics in a 1d tube [ ] p p(x, t) = pressure perturbation q = u u(x, t) = velocity Equations: or p t + κu x = 0 κ = bulk modulus ρu t + p x = 0 ρ = density [ p u ] t [ 0 κ + 1/ρ 0 ] [ p u ] x = 0. Eigenvalues: λ = ±c, where c = κ/ρ = sound speed Second order form: Can combine equations to obtain p tt = c 2 p xx

Riemann Problem Special initial data: q(x, 0) = { ql if x < 0 q r if x > 0 Example: Acoustics with bursting diaphram Pressure: Acoustic waves propagate with speeds ±c.

Riemann Problem Special initial data: q(x, 0) = { ql if x < 0 q r if x > 0 Example: Acoustics with bursting diaphram Pressure: Acoustic waves propagate with speeds ±c.

Riemann Problem Special initial data: q(x, 0) = { ql if x < 0 q r if x > 0 Example: Acoustics with bursting diaphram Pressure: Acoustic waves propagate with speeds ±c.

Riemann Problem Special initial data: q(x, 0) = { ql if x < 0 q r if x > 0 Example: Acoustics with bursting diaphram Pressure: Acoustic waves propagate with speeds ±c.

Riemann Problem Special initial data: q(x, 0) = { ql if x < 0 q r if x > 0 Example: Acoustics with bursting diaphram Pressure: Acoustic waves propagate with speeds ±c.

Riemann Problem Special initial data: q(x, 0) = { ql if x < 0 q r if x > 0 Example: Acoustics with bursting diaphram Pressure: Acoustic waves propagate with speeds ±c.

Riemann Problem for acoustics Waves propagating in x t space: Left-going wave W 1 = q m q l and right-going wave W 2 = q r q m are eigenvectors of A.

Acoustics examples $CLAW/apps/acoustics/1d/example2/README.html Acoustics in EagleClaw

CLAWPACK www.clawpack.org Open source, 1d, 2d, (3d in V4.3, soon to be ported) Originally f77 with Matlab graphics (V4.3). Now use Python for user interface, graphics Adaptive mesh refinement, GeoClaw. Coming: OpenMP and MPI. User supplies: Riemann solver, splitting data into waves and speeds (Need not be in conservation form) Boundary condition routine to extend data to ghost cells Standard bc1.f routine includes many standard BC s Initial conditions qinit.f Source terms src1.f

Options for using Clawpack 1 Use IMA computers platinum, carbon, or tan. Install from tar file or Subversion: Instructions. 2 Install on your own computer. Requires some prerequisites: Fortran, Python modules. 3 Use the VirtualClaw virtual machine. 4 For some applications, use EagleClaw (Easy Access Graphical Laboratory for Exploring Conservation Laws) Also perhaps useful: Class notes on Python, Fortran, version control, etc.