https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
INSFVBCInterface Class Reference

This interface gives the inheriting class information about all the different boundary conditions that surround a flow physics region. More...

#include <INSFVBCInterface.h>

Inheritance diagram for INSFVBCInterface:
[legend]

Protected Member Functions

template<typename T >
void initialSetup (T &insfv_fk)
 setup all the boundary condition member information
 

Protected Attributes

std::set< BoundaryID_no_slip_wall_boundaries
 Boundary IDs with no slip walls.
 
std::set< BoundaryID_slip_wall_boundaries
 Boundary IDs with slip walls.
 
std::set< BoundaryID_free_surface_boundaries
 Boundary IDs for free surfaces.
 
std::set< BoundaryID_flow_boundaries
 Flow Boundary IDs.
 
std::set< BoundaryID_fully_developed_flow_boundaries
 Fully Developed Flow Boundary IDs. This is a subset of _flow_boundaries.
 
std::set< BoundaryID_symmetry_boundaries
 Symmetry Boundary IDs.
 
std::set< BoundaryID_all_boundaries
 All the BoundaryIDs covered by our different types of INSFVBCs.
 

Private Member Functions

template<typename T >
void setupFlowBoundaries (T &insfv_fk, BoundaryID bnd_id)
 Query for INSFVBCs::INSFVFlowBC on bc_id and add if query successful.
 
template<typename T , typename T2 >
void setupBoundaries (T2 &insfv_fk, const BoundaryID bnd_id, INSFVBCs bc_type, std::set< BoundaryID > &bnd_ids)
 Query for INSFVBCs on bc_id and add if query successful.
 

Detailed Description

This interface gives the inheriting class information about all the different boundary conditions that surround a flow physics region.

A use case for this interface is forcing execution of advection kernels on flow boundaries

Definition at line 30 of file INSFVBCInterface.h.

Member Function Documentation

◆ initialSetup()

template<typename T >
void INSFVBCInterface::initialSetup ( T insfv_fk)
protected

setup all the boundary condition member information

Definition at line 79 of file INSFVBCInterface.h.

80{
81 const auto & mesh = insfv_fk.subProblem().mesh();
82
83 std::set<BoundaryID> all_connected_boundaries;
84 const auto & blk_ids = insfv_fk.blockRestricted() ? insfv_fk.blockIDs() : mesh.meshSubdomains();
85 for (const auto blk_id : blk_ids)
86 {
87 const auto & connected_boundaries = mesh.getSubdomainInterfaceBoundaryIds(blk_id);
88 for (const auto bnd_id : connected_boundaries)
89 all_connected_boundaries.insert(bnd_id);
90 }
91
92 for (const auto bnd_id : all_connected_boundaries)
93 {
94 setupFlowBoundaries(insfv_fk, bnd_id);
95 setupBoundaries<INSFVNoSlipWallBC>(
97 setupBoundaries<INSFVSlipWallBC>(
99 setupBoundaries<INSFVFreeSurfaceBC>(
101 setupBoundaries<INSFVSymmetryBC>(
103 }
104}
@ INSFVSlipWallBC
@ INSFVSymmetryBC
@ INSFVFreeSurfaceBC
@ INSFVNoSlipWallBC
std::set< BoundaryID > _free_surface_boundaries
Boundary IDs for free surfaces.
void setupFlowBoundaries(T &insfv_fk, BoundaryID bnd_id)
Query for INSFVBCs::INSFVFlowBC on bc_id and add if query successful.
std::set< BoundaryID > _no_slip_wall_boundaries
Boundary IDs with no slip walls.
std::set< BoundaryID > _slip_wall_boundaries
Boundary IDs with slip walls.
std::set< BoundaryID > _symmetry_boundaries
Symmetry Boundary IDs.
MeshBase & mesh

Referenced by INSFVAdvectionKernel::initialSetup().

◆ setupBoundaries()

template<typename T , typename T2 >
void INSFVBCInterface::setupBoundaries ( T2 &  insfv_fk,
const BoundaryID  bnd_id,
INSFVBCs  bc_type,
std::set< BoundaryID > &  bnd_ids 
)
private

Query for INSFVBCs on bc_id and add if query successful.

Definition at line 150 of file INSFVBCInterface.h.

154{
155 std::vector<T *> bcs;
156
157 insfv_fk.subProblem()
158 .getMooseApp()
159 .theWarehouse()
160 .query()
161 .template condition<AttribBoundaries>(bnd_id)
162 .template condition<AttribINSFVBCs>(bc_type)
163 .queryInto(bcs);
164
165 if (!bcs.empty())
166 {
167 bnd_ids.insert(bnd_id);
168 _all_boundaries.insert(bnd_id);
169 }
170}
std::set< BoundaryID > _all_boundaries
All the BoundaryIDs covered by our different types of INSFVBCs.

◆ setupFlowBoundaries()

template<typename T >
void INSFVBCInterface::setupFlowBoundaries ( T insfv_fk,
BoundaryID  bnd_id 
)
private

Query for INSFVBCs::INSFVFlowBC on bc_id and add if query successful.

Definition at line 108 of file INSFVBCInterface.h.

109{
110 std::vector<INSFVFlowBC *> flow_bcs;
111
112 insfv_fk.subProblem()
113 .getMooseApp()
114 .theWarehouse()
115 .query()
116 .template condition<AttribBoundaries>(bnd_id)
117 .template condition<AttribINSFVBCs>(INSFVBCs::INSFVFlowBC)
118 .queryInto(flow_bcs);
119
120 if (!flow_bcs.empty())
121 {
122 if (dynamic_cast<INSFVFullyDevelopedFlowBC *>(flow_bcs.front()))
123 {
125
126#ifndef NDEBUG
127 for (auto * flow_bc : flow_bcs)
128 mooseAssert(dynamic_cast<INSFVFullyDevelopedFlowBC *>(flow_bc),
129 "If one BC is a fully developed flow BC, then all other flow BCs on that "
130 "boundary must also be fully developed flow BCs. This flow BC is not: " +
131 dynamic_cast<MooseObject *>(flow_bc)->name());
132 }
133 else
134 for (auto * flow_bc : flow_bcs)
135 mooseAssert(!dynamic_cast<INSFVFullyDevelopedFlowBC *>(flow_bc),
136 "If one BC is not a fully developed flow BC, then all other flow BCs on that "
137 "boundary must also not be fully developed flow BCs. This flow BC is not: " +
138 dynamic_cast<MooseObject *>(flow_bc)->name());
139#else
140 }
141#endif
142
143 _flow_boundaries.insert(bnd_id);
144 _all_boundaries.insert(bnd_id);
145 }
const std::string name
Definition Setup.h:21
std::set< BoundaryID > _flow_boundaries
Flow Boundary IDs.
std::set< BoundaryID > _fully_developed_flow_boundaries
Fully Developed Flow Boundary IDs. This is a subset of _flow_boundaries.
A parent class for INSFV fully developed flow boundary conditions.

Referenced by initialSetup().

Member Data Documentation

◆ _all_boundaries

std::set<BoundaryID> INSFVBCInterface::_all_boundaries
protected

All the BoundaryIDs covered by our different types of INSFVBCs.

Definition at line 58 of file INSFVBCInterface.h.

Referenced by setupBoundaries(), and setupFlowBoundaries().

◆ _flow_boundaries

std::set<BoundaryID> INSFVBCInterface::_flow_boundaries
protected

Flow Boundary IDs.

Definition at line 49 of file INSFVBCInterface.h.

Referenced by setupFlowBoundaries(), and INSFVAdvectionKernel::skipForBoundary().

◆ _free_surface_boundaries

std::set<BoundaryID> INSFVBCInterface::_free_surface_boundaries
protected

Boundary IDs for free surfaces.

Definition at line 46 of file INSFVBCInterface.h.

Referenced by initialSetup().

◆ _fully_developed_flow_boundaries

std::set<BoundaryID> INSFVBCInterface::_fully_developed_flow_boundaries
protected

Fully Developed Flow Boundary IDs. This is a subset of _flow_boundaries.

Definition at line 52 of file INSFVBCInterface.h.

Referenced by setupFlowBoundaries().

◆ _no_slip_wall_boundaries

std::set<BoundaryID> INSFVBCInterface::_no_slip_wall_boundaries
protected

Boundary IDs with no slip walls.

Definition at line 40 of file INSFVBCInterface.h.

Referenced by initialSetup().

◆ _slip_wall_boundaries

std::set<BoundaryID> INSFVBCInterface::_slip_wall_boundaries
protected

Boundary IDs with slip walls.

Definition at line 43 of file INSFVBCInterface.h.

Referenced by initialSetup().

◆ _symmetry_boundaries

std::set<BoundaryID> INSFVBCInterface::_symmetry_boundaries
protected

Symmetry Boundary IDs.

Definition at line 55 of file INSFVBCInterface.h.

Referenced by initialSetup().


The documentation for this class was generated from the following file: