Back to module page · Back to alphabetical overview
Signature¶
osher(normalized_c_c, normalized_x_c, normalized_x_d)
Summary¶
Compute the Osher TVD correction in normalized-variable space.
Source¶
def osher(normalized_c_c, normalized_x_c, normalized_x_d):
"""Compute the Osher TVD correction in normalized-variable space."""
normalized_concentration_diff = np.maximum(
0,
np.where(
normalized_c_c < normalized_x_c / normalized_x_d,
(normalized_x_d / normalized_x_c - 1) * normalized_c_c,
1 - normalized_c_c,
),
)
return normalized_concentration_diff