wiki:u/erica/PoissonPlusHydro

Version 11 (modified by Erica Kaminski, 11 years ago) ( diff )

Splitting Method

The non-homogenous 1D Euler equations with self-gravity are given by

which in short hand notation is

where is vector of fluid variables, is their fluxes, and is the source-term vector.

To solve this system of equations, we can employ operator splitting, which is analagous to the procedure for splitting the higher dimensional Euler equations (as I did for 2D — see wiki page).

It is basically as follows, first solve the homogenous equations,

with initial condition for the grid,

over a time-step dt (found by usual CFL condition for upwind Godunov scheme). This gives the solution,

Next, solve the equation for the source-term (again over time interval dt),

with initial condition

This gives the solution for the complete time-step,

Given the ODE's for the 'source' step only involve equations for momentum and energy, we conclude that only u and E change over this step (density does not).

Thus, a schematic is as follows,

Data time level n Hydro step

Source step

Boundary Conditions

To test my code, I used periodic boundary conditions on the box and the poisson solver. For periodic BCs on the elliptic solver, this required subtracting off the mean density from the vector for rho, and using this as the source function.

Code Outline

Note: See TracWiki for help on using the wiki.