jf1uids.shock_finder.shock_finder

jf1uids.shock_finder.shock_finder#

Module Contents#

Functions#

shock_sensor

WENO-JS 1D smoothness indicator for shock detection.

shock_criteria

Implement the shock criteria from Pfrommer et al, 2017. https://arxiv.org/abs/1604.07399

find_shock_zone

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.

API#

jf1uids.shock_finder.shock_finder.shock_sensor(pressure: jf1uids.option_classes.simulation_config.FIELD_TYPE) jf1uids.option_classes.simulation_config.FIELD_TYPE[source]#

WENO-JS 1D smoothness indicator for shock detection.

Args:

pressure: the 1d pressure

Returns:

shock sensors, high where large pressure jumps

jf1uids.shock_finder.shock_finder.shock_criteria(primitive_state: jf1uids.option_classes.simulation_config.STATE_TYPE, config: jf1uids.option_classes.simulation_config.SimulationConfig, registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables, helper_data: jf1uids.data_classes.simulation_helper_data.HelperData) jax.numpy.ndarray[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.find_shock_zone(primitive_state: jf1uids.option_classes.simulation_config.STATE_TYPE, config: jf1uids.option_classes.simulation_config.SimulationConfig, registered_variables: jf1uids.fluid_equations.registered_variables.RegisteredVariables, helper_data: jf1uids.data_classes.simulation_helper_data.HelperData) Tuple[Union[int, jaxtyping.Int[jaxtyping.Array]], Union[int, jaxtyping.Int[jaxtyping.Array]], Union[int, jaxtyping.Int[jaxtyping.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.

Args:

pressure: 1d pressure velocity: 1d velocity

Returns:

index of max shock sensor, left boundary of broadened shock, right boundary of broadened shock