Skip to content

arbitrary boundary condition #858

@ragusa

Description

@ragusa

Arbitrary Boundary Condition via Python Function (Incoming Angular Flux)

Goals

Enable a new boundary condition type that allows the user to bind a boundary ID to a user-supplied Python function defining the incoming angular flux. In the v1 implementation, the function provides values that are uniform in space over all faces with that boundary ID and depends only on energy group index and direction index. The solver uses these values to set the boundary inflow for directions with $\Omega \cdot n < 0$ on the tagged boundary faces. A spatially dependent extension (function of face coordinates) may be added later.

  • Provide a flexible mechanism for user-defined inflow angular flux without hard-coding spectral/anisotropic sources.
  • Support boundary inflow that varies by energy group and discrete ordinate direction.
  • Keep v1 simple and robust (no spatial dependence).

Scope

In scope (v1)

  • New BC type: python_inflow (name TBD).
  • Association of a single boundary ID with a Python callback.
  • Callback returns boundary inflow uniform across that boundary.
  • Energy- and angle-dependent values:
    • per group g
    • per direction index d
  • Time-dependent inflow.

Out of scope (v1)

  • Spatially varying inflow on a boundary (coordinate-dependent evaluation).
  • Boundary conditions defined per face element rather than boundary ID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions