Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion demos/multicomponent/multicomponent.py.rst
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ unknowns and/or are nonlinear must be implemented with :class:`~.EquationBC` ins
# Boundary conditions on the barycentric velocity are enforced via EquationBC
bc_data = {inlet_1_id: rho_v_inflow_1_bc_func, inlet_2_id: rho_v_inflow_2_bc_func, outlet_id: rho_v_outflow_bc_func}
F_bc = sum(inner(v - rho_inv * flux, u) * ds(*subdomain) for subdomain, flux in bc_data.items())
v_bc = EquationBC(F_bc == 0, solution, (*inlet_1_id, *inlet_2_id, *outlet_id), V=Z_h.sub(2))
sub_bcs = [DirichletBC(Z_h.sub(2), 0, [(1,2), (2,3), (3,4), (4,5), (5,6), (1,6)])] # bc on the boundary of the boundary
v_bc = EquationBC(F_bc == 0, solution, (*inlet_1_id, *inlet_2_id, *outlet_id), V=Z_h.sub(2), bcs=sub_bcs)
Comment on lines +452 to +453
Copy link
Contributor

@pbrubeck pbrubeck Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could definetly explain what the tuple syntax means here, as it is a very under-used feature. Also it would be more clear if these tuples were constructed programatically using the wall, inlet and outlet ids.


# The boundary conditions on the fluxes and barycentric velocity
# Note that BCs on H(div) spaces only apply to the normal component
Expand Down
Loading