Skip to content

Wanted: a more flexible mechanism for specifying boundary conditions #225

@jeff-cohere

Description

@jeff-cohere

We are now in a position where we need to specify different boundary conditions on different surfaces within a domain. Here's a proposal for allowing this using command-line options (with easily-imagined extensions to the library).

TDycore should accept one or more -bc arguments, each of which sets a boundary condition on a single surface. The format of the proposed argument is:

-bc BOUNDARY:BC_NAME[:BC_ARG]

where BOUNDARY refers to a named sideset/DMLabel found within a mesh, BC_NAME is the symbolic name for one of our boundary conditions, and BC_ARG is an argument (if needed) that specifies the boundary condition.

The boundary conditions we support are named the following way:

  • noflow: this specifies that the flow velocity is zero on the given boundary. No argument is needed.
  • seepage: this specifies a seepage boundary condition on the given boundary. No argument is needed, since the seepage condition uses data from the cells on either side of the specified boundary.
  • pressure: this specifies a Dirichlet boundary condition on the pressure field. It accepts one argument, which is either the numeric value of the pressure [Pa], or the name of a function that supplies the pressure as a function of the spatial position (and possibly other context-dependent information).
  • temperature: this specifies a Dirichlet boundary condition on the temperature field for non-isothermal flows. It works the same way as the pressure field, with numeric values specified in K.

If no boundary condition is set on a surface identified within the mesh, a noflow boundary condition is assumed.

Unless I'm missing something, this syntax allows us to completely specify boundary conditions for a domain with surfaces specified in its mesh file. This means we can get rid of the existing boundary-condition-related arguments, which assumed a single boundary condition for each of the flow velocity, pressure, and temperature fields.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions