Skip to content

Instantly share code, notes, and snippets.

View gusgordon's full-sized avatar

Gus Gordon gusgordon

View GitHub Profile
@physacco
physacco / README.md
Last active December 8, 2024 07:48
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@gusgordon
gusgordon / supersonic_shock_solver.py
Created March 10, 2017 04:37
Supersonic flow oblique shock solver, for 2D wedge and 3D cone (using Taylor-Maccoll relations) in Python
import numpy as np
from scipy.integrate import odeint
def temp_to_sos(T):
# Speed of sound in dry air given temperature in K
return 20.05 * T**0.5
def taylor_maccoll(y, theta, gamma=1.4):