Advection
Advection(limiter_type='minmod')Handles advection terms in the 1D transport equation using TVD schemes.
This class implements numerical advection using Total Variation Diminishing (TVD) schemes with selectable limiters to prevent oscillations near discontinuities.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| limiter_type | str | Type of slope limiter to use. Options: “minmod”, “upwind”, “MC”. Default is “minmod”. | 'minmod' |
Notes
The advection scheme reconstructs interface values using slope limiters to maintain monotonicity and stability in the solution.
Methods
| Name | Description |
|---|---|
| build | Build an Advection instance with a specified slope limiter. |
| choose_upwind_concentration | Select the upwind concentration based on the direction of flow. |
| compute_slope | Compute limited slope with padding at boundaries. |
| mc_limiter | Monotonized central (MC) limiter. |
| minmod | Return the standard minmod limited slope. |
| minmod3 | Minmod of three values, for MC limiter. |
| rate | Compute the advection rate for mobile species. |
build
Advection.build(limiter_type)Build an Advection instance with a specified slope limiter.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| limiter_type | str | Type of slope limiter to use. Options are “minmod”, “upwind”, or “MC”. | required |
Returns
| Name | Type | Description |
|---|---|---|
| Advection | Configured advection scheme. |
choose_upwind_concentration
Advection.choose_upwind_concentration(left_state, right_state, discharge)Select the upwind concentration based on the direction of flow.
compute_slope
Advection.compute_slope(concentration, dx_center)Compute limited slope with padding at boundaries.
mc_limiter
Advection.mc_limiter(a, b)Monotonized central (MC) limiter.
minmod
Advection.minmod(a, b)Return the standard minmod limited slope.
minmod3
Advection.minmod3(a, b, c)Minmod of three values, for MC limiter.
rate
Advection.rate(time, state, system)Compute the advection rate for mobile species.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| time | jax.Array | Current simulation time. | required |
| state | AbstractSpecies | Current species concentrations. | required |
| system | System | The reactive transport system. | required |
Returns
| Name | Type | Description |
|---|---|---|
| AbstractSpecies | Advection contribution to the rate of change. |