FixedConcentrationBoundary

FixedConcentrationBoundary(
    fixed_concentration,
    *,
    is_active=lambda t, system: jnp.array(True),
    species_selector,
    boundary,
)

Boundary condition with fixed concentration at the domain boundary.

This boundary condition maintains a specified concentration at the boundary by adjusting the flux. On outflow, dispersive flux is set to zero to avoid unphysical behavior.

Parameters

Name Type Description Default
fixed_concentration float or Callable[[jax.Array], jax.Array] The fixed concentration value, either constant or time-dependent. required
is_active Callable[[jax.Array, System], jax.Array] Function determining if the boundary condition is active. Inherited from BoundaryCondition. lambda t, system: jnp.array(True)
species_selector Callable Function to select which species this applies to. Inherited from BoundaryCondition. required
boundary Literal['left', 'right'] Which boundary this applies to. Inherited from BoundaryCondition. required

Notes

For inflow boundaries, both advective and dispersive fluxes contribute. For outflow boundaries, only advective flux is considered.

Methods

Name Description
compute_flux Compute the advective and dispersive flux at the boundary.

compute_flux

FixedConcentrationBoundary.compute_flux(time, system, boundary_cell_state)

Compute the advective and dispersive flux at the boundary.

Parameters

Name Type Description Default
time jax.Array Current simulation time. required
system System The reactive transport system. required
boundary_cell_state jax.Array Concentration in the boundary cell. required

Returns

Name Type Description
jax.Array The total flux (advective + dispersive) at the boundary.
Back to top