PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
BC_Handlers.h
Go to the documentation of this file.
1#ifndef BC_HANDLERS_H
2#define BC_HANDLERS_H
3
4#include "variables.h"
5#include "logging.h"
6
7//================================================================================
8// VALIDATORS
9//================================================================================
10
11/**
12 * @brief (Private) Validates all consistency rules for a driven flow (channel/pipe) setup.
13 *
14 * This function enforces a strict set of rules to ensure a driven flow simulation is
15 * configured correctly. It is called by the main `BoundarySystem_Validate` dispatcher.
16 *
17 * The validation rules are checked in a specific order:
18 * 1. Detect if any `DRIVEN_` handler is active. If not, the function returns immediately.
19 * 2. Ensure that no `INLET`, `OUTLET`, or `FARFIELD` boundary conditions exist anywhere in the
20 * domain, as they are physically incompatible with a pressure-driven flow model.
21 * 3. Verify that both faces in the driven direction are of `mathematical_type PERIODIC`.
22 * 4. Verify that both faces in the driven direction use the exact same `DRIVEN_` handler type.
23 *
24 * @param user The UserCtx for a single block.
25 * @return PetscErrorCode 0 on success, non-zero PETSc error code on failure.
26 */
27PetscErrorCode Validate_DrivenFlowConfiguration(UserCtx *user);
28
29
30//================================================================================
31//
32// HANDLER "CONSTRUCTOR" FUNCTION DECLARATIONS
33//
34// Each function is responsible for populating a BoundaryCondition struct
35// with the correct function pointers for its specific behavior. They are
36// implemented in BC_Handlers.c and called by the factory in Boundaries.c.
37//
38//================================================================================
39
40/**
41 * @brief Configures a BoundaryCondition object to behave as a no-slip, stationary wall.
42 * @param bc A pointer to the generic BoundaryCondition object to be configured.
43 */
44PetscErrorCode Create_WallNoSlip(BoundaryCondition *bc);
45
46/**
47 * @brief Configures a BoundaryCondition object to behave as a constant velocity inlet.
48 */
50
52
54
56
57#endif // BC_HANDLERS_H
PetscErrorCode Create_InletConstantVelocity(BoundaryCondition *bc)
Configures a BoundaryCondition object to behave as a constant velocity inlet.
PetscErrorCode Create_PeriodicGeometric(BoundaryCondition *bc)
PetscErrorCode Validate_DrivenFlowConfiguration(UserCtx *user)
(Private) Validates all consistency rules for a driven flow (channel/pipe) setup.
Definition BC_Handlers.c:27
PetscErrorCode Create_InletParabolicProfile(BoundaryCondition *bc)
(Handler Constructor) Populates a BoundaryCondition object with Parabolic Inlet behavior.
PetscErrorCode Create_WallNoSlip(BoundaryCondition *bc)
Configures a BoundaryCondition object to behave as a no-slip, stationary wall.
PetscErrorCode Create_OutletConservation(BoundaryCondition *bc)
(Handler Constructor) Populates a BoundaryCondition object with Outlet Conservation behavior.
Logging utilities and macros for PETSc-based applications.
The "virtual table" struct for a boundary condition handler object.
Definition variables.h:280
Main header file for a complex fluid dynamics solver.
User-defined context containing data specific to a single computational grid level.
Definition variables.h:728