jaxfluids.shock_sensor package

Submodules

jaxfluids.shock_sensor.ducros module

class jaxfluids.shock_sensor.ducros.Ducros(domain_information: DomainInformation)[source]

Bases: ShockSensor

Ducros Shock Sensor

fs = jnp.where(div / (div + curl + self.epsilon_s) >= 0.95, 1, 0)

compute_sensor_function(vels: Array, axis: int) Array[source]

Computes the sensor function which is a marker (0/1) indicating the presence of shock discontinuities.

Implementation in child classes.

compute_velocity_derivatives(vels: Array) Array[source]

Computes the velocity gradient. Note that velocity gradients and especially curl and divergence are often used to determine the presence of shocks.

vel_grad = [ du/dx dv/dx dw/dx

du/dy dv/dy dw/dy du/dz dv/dz dw/dz ]

Parameters:

vels (jnp.ndarray) – Buffer of velocities.

Returns:

Buffer of the velocity gradient.

Return type:

jnp.ndarray

jaxfluids.shock_sensor.shock_sensor module

class jaxfluids.shock_sensor.shock_sensor.ShockSensor(domain_information: DomainInformation)[source]

Bases: ABC

Abstract Class for shock sensors. Shock sensors indicate the presence of discontinuities by a marker.

abstract compute_sensor_function()[source]

Computes the sensor function which is a marker (0/1) indicating the presence of shock discontinuities.

Implementation in child classes.

Module contents