ASTR 474 · Computational Lab 04

Lab 04: Finite-Volume Sod Shock Tube

L05-L06 · Euler equations and shock resolution

Purpose and learning objectives

L05-L06 · Euler equations and shock resolution. This investigation develops a numerical method and tests its output against a declared benchmark, invariant, uncertainty model, or independent implementation.

Preparation, setup, and inputs

Software: CPython 3.14.6; dependencies in requirements.txt. From repository root run .venv/Scripts/python.exe materials/ASTR474/src/astr474_computations.py. Then use the corresponding CSV/JSON under materials/ASTR474/data/generated/. Required data: generated/hydro_resolution.csv.

Apparatus: computer with local CPU, terminal, text editor, and browser; no telescope, GPU, network account, or paid service is required. Preserve the generated input files and record file hash/version.

Model scope: All initial states and results are synthetic dimensionless shock-tube experiments.

Procedure

  1. Inspect the documented dimensionless left/right density and pressure states, gamma, domain, discontinuity, final time, and CFL.
  2. Run the first-order Rusanov solver at 32, 64, 128, and 256 zones; do not change boundary conditions or final time between runs.
  3. Plot density versus position with shock/contact features; compare each run to the 512-zone reference on cell centers.
  4. Compute mass before and after, L1 density difference, and the error reduction on each refinement.
  5. State explicitly which outputs are teaching-code diagnostics and what a production code would additionally require.

Measurement record

QuantityValue or fieldUnit/conventionSource/method
Input configurationRecord solver, version, seed, timestep/grid/toleranceAs defined by the experimentCommand line and source file
Primary diagnosticRecord every resolution/sample/fit row, not just the preferred resultState units and normalizationGenerated CSV/JSON
Independent referenceThe density L1 discrepancy against the 512-zone reference decreases from 0.03066 at 32 cells to 0.00521 at 256; measured mass errors are listed independently.As stated in the generated exampleAnalytic/JPL/invariant cross-check
Uncertainty/sensitivityRepeat with changed resolution, seed, parameter, or methodReport interval or relative changeStudent analysis

Analysis and uncertainty

Resolution trend is numerical error evidence; the 512-zone reference is not exact. Report boundary, flux, and model limitations.

Plot the diagnostic against the controlled parameter; label axes, units, normalization, and reference. Explain any non-monotonic point rather than smoothing or dropping it. If propagating independent errors, state why independence is plausible; preserve correlated/common-mode terms separately.

Deliverables and assessment

  1. Runnable source or notebook export with command, package versions, and all input/output paths.
  2. One scientific figure plus a machine-readable table of measurements and convergence/sampling/residual diagnostics.
  3. A 700-1000 word technical report describing model, method, validation, uncertainty categories, and one failed assumption.
  4. A short claim-evidence table separating result, numerical check, and domain limitation.

Rubric: 30% correct method and setup; 25% validation and numerical diagnostics; 20% uncertainty/provenance; 15% physical interpretation; 10% clarity and reproducibility. Revisions and resubmissions are encouraged under the syllabus mastery policy.

Data and source provenance

All initial states and results are synthetic dimensionless shock-tube experiments. Provenance levels, request records, and source verification limits are documented in reference-log.md; generated files and seeds are documented in data/README.md.

References: