jf1uids.shock_finder.shock_finder module#
- jf1uids.shock_finder.shock_finder.find_shock_zone(primitive_state: Float[Array, 'num_vars num_cells_x'] | Float[Array, 'num_vars num_cells_x num_cells_y'] | Float[Array, 'num_vars num_cells_x num_cells_y num_cells_z'], config: SimulationConfig, registered_variables: RegisteredVariables, helper_data: HelperData) Tuple[int | Int[Array, ''], int | Int[Array, ''], int | Int[Array, '']][source]#
 Find a numerically broadened shock region based of the strongest shock based on the result of the shock_sensor function and the pressure difference between adjacent cells. Assumes a shock front moving left to right.
- Parameters:
 pressure – 1d pressure
velocity – 1d velocity
- Returns:
 index of max shock sensor, left boundary of broadened shock, right boundary of broadened shock
- jf1uids.shock_finder.shock_finder.shock_criteria(primitive_state: Float[Array, 'num_vars num_cells_x'] | Float[Array, 'num_vars num_cells_x num_cells_y'] | Float[Array, 'num_vars num_cells_x num_cells_y num_cells_z'], config: SimulationConfig, registered_variables: RegisteredVariables, helper_data: HelperData) Array[source]#
 Implement the shock criteria from Pfrommer et al, 2017. https://arxiv.org/abs/1604.07399
# NOTE: for now only 1D
- jf1uids.shock_finder.shock_finder.shock_sensor(pressure: Float[Array, 'num_cells_x'] | Float[Array, 'num_cells_x num_cells_y'] | Float[Array, 'num_cells_x num_cells_y num_cells_z']) Float[Array, 'num_cells_x'] | Float[Array, 'num_cells_x num_cells_y'] | Float[Array, 'num_cells_x num_cells_y num_cells_z'][source]#
 WENO-JS 1D smoothness indicator for shock detection.
- Parameters:
 pressure – the 1d pressure
- Returns:
 shock sensors, high where large pressure jumps