ashfordeOU/aero-agent-skills / skills/aerodynamics/high-speed/bow-shock-standoff
bow-shock-standoff
VerifiedUse when you must estimate the detached bow-shock standoff distance ahead of a blunt nose: compute the standoff ratio Delta over R with the classical Billig-form correlations for a sphere nose and a circular cylinder leading edge at gamma 1.4, convert the ratio to a physical standoff distance for a given nose radius, and report the trend checks that the standoff decreases with Mach and that the cylinder standoff exceeds the sphere standoff at the same Mach. Produces the standoff ratio, the standoff distance and the sanity flags that gate blunt-body nose-radius trades and shock-layer thickness estimates. Trigger: bow shock standoff, billig correlation, stagnation streamline, shock layer thickness, detached shock distance, blunt body nose radius.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.1 KB |
| scripts/bow_shock_standoff_logic.py | script | 3.3 KB |
| scripts/test_bow_shock_standoff.py | script | 12.1 KB |
scripts/bow_shock_standoff_logic.py
View on GitHub"""Billig-form bow-shock standoff correlations for blunt noses.
Classical detached bow-shock standoff estimates on the stagnation
streamline ahead of a blunt nose in supersonic and hypersonic flow,
gamma = 1.4. The sphere form applies to an axisymmetric nose and the
circular cylinder form to a two-dimensional leading edge. The
correlations are the standard Billig-form exponentials:
sphere Delta / R = 0.143 * exp(3.24 / M^2)
cylinder Delta / R = 0.386 * exp(4.67 / M^2)
with M the freestream Mach number, R the nose radius and Delta the
standoff distance of the detached shock ahead of the stagnation point.
The forms are documented for freestream Mach above about 1.5; the ratio
grows without bound as M approaches 1, where no detached shock exists.
Pure stdlib, deterministic.
"""
import math
SPHERE_COEF = 0.143
SPHERE_EXP = 3.24
CYL_COEF = 0.386
CYL_EXP = 4.67
VALID_BODIES = ("sphere", "cylinder")
VALIDITY_MACH_FLOOR = 1.5 # documented lower freestream Mach floor
def _check_mach(mach):
"""Reject Mach numbers at or below 1 (no detached bow shock there)."""
if mach <= 1.0:
raise ValueError(
"mach must exceed 1.0 for a detached bow shock; got %s" % mach
)
def _check_radius(radius):
"""Reject non-positive nose radii."""
if radius <= 0.0:
raise ValueError("nose radius must be positive; got %s" % radius)
def _check_body(body):
"""Reject body strings other than 'sphere' and 'cylinder'."""
if body not in VALID_BODIES:
raise ValueError(
"body must be 'sphere' or 'cylinder'; got %r" % body
)
def standoff_ratio(mach, body="sphere"):
"""Return the standoff ratio Delta / R on the stagnation streamline.
Billig-form correlation at freestream Mach mach for the given body
('sphere' or 'cylinder'). Raises ValueError when mach <= 1 or the
body string is unknown.
"""
_check_mach(mach)
_check_body(body)
if body == "sphere":
return SPHERE_COEF * math.exp(SPHERE_EXP / (mach * mach))
return CYL_COEF * math.exp(CYL_EXP / (mach * mach))
def standoff_distance(mach, radius, body="sphere"):
"""Return the physical standoff distance Delta in meters.
Delta = (Delta / R) * R, so the distance scales linearly with the
nose radius. Raises ValueError when mach <= 1, radius <= 0, or the
body string is unknown.
"""
_check_mach(mach)
_check_radius(radius)
_check_body(body)
return standoff_ratio(mach, body) * radius
def standoff_report(mach, radius, body="sphere"):
"""Return the standoff summary dict with the trend sanity flags.
Keys: ratio (Delta / R), distance (Delta in meters),
sphere_cylinder_order (True when the cylinder ratio exceeds the
sphere ratio at this Mach), decreasing_with_mach (True when the
ratio at mach * 1.1 is smaller than the ratio at mach). Raises
ValueError as documented for standoff_ratio and standoff_distance.
"""
_check_mach(mach)
_check_radius(radius)
_check_body(body)
ratio = standoff_ratio(mach, body)
return {
"ratio": ratio,
"distance": ratio * radius,
"sphere_cylinder_order": (
standoff_ratio(mach, "cylinder") > standoff_ratio(mach, "sphere")
),
"decreasing_with_mach": standoff_ratio(mach * 1.1, body) < ratio,
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |