Skip to main content

Simple shock tube calculator

Project description

Description

This module calculates analytical solutions for a Sod shock tube problem.

A more detailed description can be found here.

Usage

from shocktubecalc import sod

# left_state and right_state set p, rho and u
# geometry sets left boundary on 0., right boundary on 1
# and initial position of the shock xi on 0.5
# t is the time evolution for which positions and states in tube should be calculated
# gamma denotes specific heat
# npts is number of points to be calculated for rarefaction wave
# Note that gamma and npts are default parameters (1.4 and 500) in solve function.

positions, regions, values = sod.solve(left_state=(1, 1, 0), right_state=(0.1, 0.125, 0.),
                                       geometry=(0., 1., 0.5), t=0.2, gamma=1.4, npts=500)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shocktubecalc-0.12.tar.gz (24.8 kB view details)

Uploaded Source

File details

Details for the file shocktubecalc-0.12.tar.gz.

File metadata

  • Download URL: shocktubecalc-0.12.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shocktubecalc-0.12.tar.gz
Algorithm Hash digest
SHA256 35ed3b1b63f77b3ad35d9d1d689bdf3a87cb8e6833b39f4ea4cd91a69a519875
MD5 702ee91b603879daf9197664f9f4194a
BLAKE2b-256 9f516e5d3f0d8957d2febd96614d9e4a4a239a653b5fad21381bd3d1dd86589a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page