pttools.bubble.trim
Utility functions for trimming fluid solutions
Functions
- pttools.bubble.trim.trim_fluid_wall_to_cs(v, w, xi, t, v_wall, sol_type, dxi_lim=const.DXI_SMALL, cs2_fun=bag.cs2_bag)
Picks out fluid variable arrays \((v, w, \xi, t)\) which are definitely behind the wall for detonation and hybrid. Also removes negative fluid speeds and \(\xi \leq c_s\), which might be left by an inaccurate integration. If the wall is within about 1e-16 of cs, rounding errors are flagged.
- Parameters:
v (ndarray) – \(v\)
w (ndarray) – \(w\)
xi (ndarray) – \(\xi\)
t (ndarray) – \(t\)
v_wall (float | float64 | ndarray) – \(v_\text{wall}\)
sol_type (SolutionType) – solution type
dxi_lim (float) – not used
cs2_fun (Callable[[float | float64 | ndarray, float | float64 | ndarray], float | float64 | ndarray] | CPUDispatcher) – function, which gives \(c_s^2\)
- Returns:
trimmed \(v, w, \xi, t\)
- Return type:
- pttools.bubble.trim.trim_fluid_wall_to_shock(v, w, xi, t, sol_type)
Trims fluid variable arrays \((v, w, \xi)\) so last element is just ahead of shock.