wiki:u/ehansen/buildcode

Version 1 (modified by ehansen, 13 years ago) ( diff )

Building a 1D Hydro Code


Introduction

I've created this page to document the important aspects of building a hydro code. It contains general information that I have learned from reading Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction by E.F. Toro. In the near future, it will contain useful information from my own personal experience as I build my first hydro code.

The Equations of Fluid Dynamics

The first time I saw the fluid equations was in the normal conservative-law form. These are conceptually simple and make intuitive sense.

Name of Law Formula
Conservation of Mass
Conservation of Momentum
Conservation of Energy

Where is mass density, v is velocity (only in x-direction for 1D), p is pressure, and E is total energy per unit volume. E is further defined as where e is the specific internal energy. Basically, these laws state that in a given volume, the change in a conserved quantity must be equal to the flux through the boundaries of that volume.

Solving the Riemann Problem


Discretisation


Godunov's First Order Upwind Scheme

Attachments (34)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.