cashocs.geometry.boundary_distance.compute_boundary_distance_poisson#
- cashocs.geometry.boundary_distance.compute_boundary_distance_poisson(mesh: fenics.Mesh, boundaries: fenics.MeshFunction | None = None, boundary_idcs: list[int | str] | None = None, minimum_distance: float = 0.0) fenics.Function [source]#
Computes the distance to the boundary with a Poisson approach.
The user can specify which boundaries are considered for the distance computation by specifying the parameters boundaries and boundary_idcs. Default is to consider all boundaries.
The approach is described, e.g., in Section 1.1.3 of Tucker, Differential equation-based wall distance computation for DES and RANS (2003).
- Parameters:
mesh (fenics.Mesh) – The dolfin mesh object, representing the computational domain
boundaries (fenics.MeshFunction | None, optional) – A meshfunction for the boundaries, which is needed in case specific boundaries are targeted for the distance computation (while others are ignored), default is None (all boundaries are used). Defaults to None.
boundary_idcs (list[int | str] | None, optional) – A list of indices which indicate, which parts of the boundaries should be used for the distance computation, default is None (all boundaries are used). Defaults to None.
minimum_distance (float, optional) – The distance of the mesh boundary to the (physical) wall. This should be set to 0.0 for most applications, which is also the default. One exception is for turbulence modeling and wall functions. Defaults to 0.0.
- Returns:
- A fenics function representing an approximation of the
distance to the boundary.
- Return type:
fenics.Function