Shock
Module: flow_props.shock
Purpose
This module finds the shock on each wall-normal grid line of a structured solution and writes the shock curve (see Shock Extraction for the method).
Main Functions
find_shock_on_line(values, level=0.5, min_rise=0.05, max_thickness=20.0, method="walk", indicator_threshold=0.0025): the shock on one line, as aShockCrossing(fractionalj,j_tail, the outer edgej_foot,thickness_cells,detected_by, and each detector's own pointj_walk,j_indicator, whatever the method), orNoneextract_shock(ds, quantity="pressure", ..., method="walk", indicator_threshold=0.0025): every line of a dataset, as aShockExtraction(station, x, y, j, distance, thickness_cells, detected_by, and the stations without a shock)smoothness_indicator(values, reference): the WENO smoothness indicator along a line, divided by 5040 reference^2smooth_shock(ds, extraction, length): the same points moved, along their grid lines, onto local quadratics fitted in the shock's frame overlengthwall-to-shock distances (see Smoothing the Curve)write_shock_curve(path, extraction): the x, y CSV that grid-generator's[shock] curvereads
Example
Notes
- the dataset must use a
StructuredGridwith \(j = 0\) at the wall (cfd-io's canonical orientation) and the outer boundary in the freestream - the quantity's field is looked up as
pres,pressure,p(ordens,density,rho)