|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
#include "BC_Handlers.h"Go to the source code of this file.
Data Structures | |
| struct | InletConstantData |
| Private data structure for the Constant Velocity Inlet handler. More... | |
| struct | InletParabolicData |
| Private data structure for the Parabolic Velocity Inlet handler. More... | |
| struct | InletProfileFileData |
| struct | DrivenFluxData |
| Private data structure shared by both periodic driven-flux handlers. More... | |
Macros | |
| #define | __FUNCT__ "Validate_DrivenFlowConfiguration" |
| #define | __FUNCT__ "Create_WallNoSlip" |
| #define | __FUNCT__ "Apply_WallNoSlip" |
| #define | __FUNCT__ "Create_InletConstantVelocity" |
| #define | __FUNCT__ "Initialize_InletConstantVelocity" |
| #define | __FUNCT__ "PreStep_InletConstantVelocity" |
| #define | __FUNCT__ "Apply_InletConstantVelocity" |
| #define | __FUNCT__ "PostStep_InletConstantVelocity" |
| #define | __FUNCT__ "Destroy_InletConstantVelocity" |
| #define | __FUNCT__ "Create_InletParabolicProfile" |
| #define | __FUNCT__ "Initialize_InletParabolicProfile" |
| #define | __FUNCT__ "PreStep_InletParabolicProfile" |
| #define | __FUNCT__ "Apply_InletParabolicProfile" |
| #define | __FUNCT__ "PostStep_InletParabolicProfile" |
| #define | __FUNCT__ "Destroy_InletParabolicProfile" |
| #define | __FUNCT__ "Create_InletProfileFromFile" |
| #define | __FUNCT__ "Initialize_InletProfileFromFile" |
| #define | __FUNCT__ "PreStep_InletProfileFromFile" |
| #define | __FUNCT__ "Apply_InletProfileFromFile" |
| #define | __FUNCT__ "PostStep_InletProfileFromFile" |
| #define | __FUNCT__ "Destroy_InletProfileFromFile" |
| #define | __FUNCT__ "Create_OutletConservation" |
| #define | __FUNCT__ "PreStep_OutletConservation" |
| #define | __FUNCT__ "Apply_OutletConservation" |
| #define | __FUNCT__ "PostStep_OutletConservation" |
| #define | __FUNCT__ "MeasureDrivenFluxes" |
| #define | __FUNCT__ "Create_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Initialize_PeriodicDrivenConstant" |
| #define | __FUNCT__ "PreStep_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Apply_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Destroy_PeriodicDrivenConstant" |
| #define | __FUNCT__ "Create_PeriodicDrivenInitial" |
| #define | __FUNCT__ "Initialize_PeriodicDrivenInitial" |
| #define | __FUNCT__ "PreStep_PeriodicDrivenInitial" |
Functions | |
| PetscErrorCode | Validate_DrivenFlowConfiguration (UserCtx *user) |
Internal helper implementation: Validate_DrivenFlowConfiguration(). | |
| static PetscErrorCode | Apply_WallNoSlip (BoundaryCondition *self, BCContext *ctx) |
| Apply no-slip velocity values to wall-adjacent cells for this boundary condition. | |
| PetscErrorCode | Create_WallNoSlip (BoundaryCondition *bc) |
| Implementation of Create_WallNoSlip(). | |
| static PetscErrorCode | Initialize_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx) |
| Initialize persistent state for a constant-velocity inlet boundary. | |
| static PetscErrorCode | PreStep_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Update constant-inlet data required before the next solver step. | |
| static PetscErrorCode | Apply_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx) |
| Impose the configured constant velocity on inlet boundary cells. | |
| static PetscErrorCode | PostStep_InletConstantVelocity (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Perform post-step bookkeeping for a constant-velocity inlet boundary. | |
| static PetscErrorCode | Destroy_InletConstantVelocity (BoundaryCondition *self) |
| Release resources owned by a constant-velocity inlet boundary. | |
| PetscErrorCode | Create_InletConstantVelocity (BoundaryCondition *bc) |
| Implementation of Create_InletConstantVelocity(). | |
| static PetscErrorCode | Initialize_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx) |
| Initialize the geometric data used to evaluate a parabolic inlet profile. | |
| static PetscErrorCode | PreStep_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Refresh parabolic-inlet values required before the solver step. | |
| static PetscErrorCode | Apply_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx) |
| Impose the evaluated parabolic velocity profile on inlet cells. | |
| static PetscErrorCode | PostStep_InletParabolicProfile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Perform post-step bookkeeping for a parabolic inlet boundary. | |
| static PetscErrorCode | Destroy_InletParabolicProfile (BoundaryCondition *self) |
| Release resources owned by a parabolic inlet boundary. | |
| PetscErrorCode | Create_InletParabolicProfile (BoundaryCondition *bc) |
| Implementation of Create_InletParabolicProfile(). | |
| static PetscErrorCode | Initialize_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx) |
| Initializes a file-prescribed inlet profile handler for one boundary face. | |
| static PetscErrorCode | PreStep_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Pre-step hook for the static file-prescribed inlet profile handler. | |
| static PetscErrorCode | Apply_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx) |
| Applies the loaded PICSLICE scalar profile to Ucont and Ubcs on an inlet face. | |
| static PetscErrorCode | PostStep_InletProfileFromFile (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Accumulates the applied inlet flux for a file-prescribed profile. | |
| static PetscErrorCode | Destroy_InletProfileFromFile (BoundaryCondition *self) |
| Releases private storage owned by a file-prescribed inlet profile handler. | |
| static PetscErrorCode | GetBCParamStringLocal (BC_Param *params, const char *key, const char **value_out, PetscBool *found) |
| Looks up a string-valued boundary-condition parameter in a BC_Param list. | |
| static PetscErrorCode | GetProfileFileExpectedDims (UserCtx *user, BCFace face_id, PetscInt *n1, PetscInt *n2) |
| Computes the expected PICSLICE dimensions for an inlet face. | |
| static PetscErrorCode | ReadPicSliceProfile (const char *source_file, PetscInt expected_n1, PetscInt expected_n2, InletProfileFileData *data) |
| Reads and validates a static scalar inlet profile from a canonical PICSLICE file. | |
| static PetscReal | ProfileSpeedAt (const InletProfileFileData *data, PetscInt a, PetscInt b) |
| Returns one scalar speed from the flattened PICSLICE profile. | |
| PetscErrorCode | Create_InletProfileFromFile (BoundaryCondition *bc) |
| Implementation of Create_InletProfileFromFile(). | |
| static PetscErrorCode | PreStep_OutletConservation (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Prepare the outlet-conservation correction before advancing the solver. | |
| static PetscErrorCode | Apply_OutletConservation (BoundaryCondition *self, BCContext *ctx) |
| (Handler Action) Applies mass conservation correction to the outlet face. | |
| static PetscErrorCode | PostStep_OutletConservation (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Update outlet-conservation state after a completed solver step. | |
| PetscErrorCode | Create_OutletConservation (BoundaryCondition *bc) |
| Implementation of Create_OutletConservation(). | |
| PetscErrorCode | Create_PeriodicGeometric (BoundaryCondition *bc) |
| Implementation of Create_PeriodicGeometric(). | |
| static PetscErrorCode | MeasureDrivenFluxes (UserCtx *user, char direction, PetscReal *boundaryFlux, PetscReal *planarAverageFlux) |
| Measure the two volumetric fluxes the driven-flow controller senses. | |
| static PetscErrorCode | Initialize_PeriodicDrivenConstant (BoundaryCondition *self, BCContext *ctx) |
| Initialize constant forcing data for a periodically driven boundary. | |
| static PetscErrorCode | PreStep_PeriodicDrivenConstant (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Prepare constant periodic-driving data before the solver step. | |
| static PetscErrorCode | Apply_PeriodicDrivenConstant (BoundaryCondition *self, BCContext *ctx) |
| Apply the configured constant driving term to the periodic boundary. | |
| static PetscErrorCode | Destroy_PeriodicDrivenConstant (BoundaryCondition *self) |
| Release resources owned by the constant periodic-driving boundary. | |
| PetscErrorCode | Create_PeriodicDrivenConstant (BoundaryCondition *bc) |
Internal helper implementation: Create_PeriodicDrivenConstant(). | |
| static PetscErrorCode | Initialize_PeriodicDrivenInitial (BoundaryCondition *self, BCContext *ctx) |
| Initialize forcing data for a periodic boundary driven to its initial flux. | |
| static PetscErrorCode | PreStep_PeriodicDrivenInitial (BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow_contribution, PetscReal *local_outflow_contribution) |
| Latch the initial-state flux once, then drive to it like a constant target. | |
| PetscErrorCode | Create_PeriodicDrivenInitial (BoundaryCondition *bc) |
Internal helper implementation: Create_PeriodicDrivenInitial(). | |
| struct InletConstantData |
Private data structure for the Constant Velocity Inlet handler.
Definition at line 310 of file BC_Handlers.c.
| Data Fields | ||
|---|---|---|
| PetscReal | normal_velocity | |
| struct InletParabolicData |
Private data structure for the Parabolic Velocity Inlet handler.
Stores the peak velocity and pre-computed cross-stream geometry needed to evaluate the parabolic profile at each boundary node.
Definition at line 699 of file BC_Handlers.c.
| struct InletProfileFileData |
Definition at line 1106 of file BC_Handlers.c.
| Data Fields | ||
|---|---|---|
| PetscInt | n1 | |
| PetscInt | n2 | |
| PetscReal * | profile | |
| PetscReal | min_speed | |
| PetscReal | max_speed | |
| char * | source_file | |
| struct DrivenFluxData |
Private data structure shared by both periodic driven-flux handlers.
constant_flux fills targetVolumetricFlux from the bcs file at initialization; initial_flux latches it from the starting field at the first PreStep. Everything downstream of the target is identical, so both handlers reuse this struct and the PreStep/Apply/Destroy implementations below.
Definition at line 2308 of file BC_Handlers.c.
| Data Fields | ||
|---|---|---|
| char | direction | |
| PetscReal | targetVolumetricFlux | |
| PetscBool | isMasterController | |
| PetscBool | enforceSeamFlux | |
| PetscInt | lastBulkCorrectionStep | |
| #define __FUNCT__ "Validate_DrivenFlowConfiguration" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_WallNoSlip" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_WallNoSlip" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_InletConstantVelocity" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_InletParabolicProfile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_InletProfileFromFile" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PostStep_OutletConservation" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "MeasureDrivenFluxes" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Apply_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Destroy_PeriodicDrivenConstant" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Create_PeriodicDrivenInitial" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "Initialize_PeriodicDrivenInitial" |
Definition at line 10 of file BC_Handlers.c.
| #define __FUNCT__ "PreStep_PeriodicDrivenInitial" |
Definition at line 10 of file BC_Handlers.c.
| PetscErrorCode Validate_DrivenFlowConfiguration | ( | UserCtx * | user | ) |
Internal helper implementation: Validate_DrivenFlowConfiguration().
(Private) Validates all consistency rules for a driven flow (channel/pipe) setup.
Local to this translation unit.
Definition at line 15 of file BC_Handlers.c.
|
static |
Apply no-slip velocity values to wall-adjacent cells for this boundary condition.
Definition at line 143 of file BC_Handlers.c.
| PetscErrorCode Create_WallNoSlip | ( | BoundaryCondition * | bc | ) |
Implementation of Create_WallNoSlip().
Configures a BoundaryCondition object to behave as a no-slip, stationary wall.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 114 of file BC_Handlers.c.
|
static |
Initialize persistent state for a constant-velocity inlet boundary.
Definition at line 350 of file BC_Handlers.c.
|
static |
Update constant-inlet data required before the next solver step.
Definition at line 399 of file BC_Handlers.c.
|
static |
Impose the configured constant velocity on inlet boundary cells.
Definition at line 421 of file BC_Handlers.c.
|
static |
Perform post-step bookkeeping for a constant-velocity inlet boundary.
Definition at line 556 of file BC_Handlers.c.
|
static |
Release resources owned by a constant-velocity inlet boundary.
Definition at line 650 of file BC_Handlers.c.
| PetscErrorCode Create_InletConstantVelocity | ( | BoundaryCondition * | bc | ) |
Implementation of Create_InletConstantVelocity().
Configures a BoundaryCondition object to behave as a constant velocity inlet.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 322 of file BC_Handlers.c.
|
static |
Initialize the geometric data used to evaluate a parabolic inlet profile.
Definition at line 743 of file BC_Handlers.c.
|
static |
Refresh parabolic-inlet values required before the solver step.
Definition at line 808 of file BC_Handlers.c.
|
static |
Impose the evaluated parabolic velocity profile on inlet cells.
Definition at line 827 of file BC_Handlers.c.
|
static |
Perform post-step bookkeeping for a parabolic inlet boundary.
Definition at line 984 of file BC_Handlers.c.
|
static |
Release resources owned by a parabolic inlet boundary.
Definition at line 1077 of file BC_Handlers.c.
| PetscErrorCode Create_InletParabolicProfile | ( | BoundaryCondition * | bc | ) |
Implementation of Create_InletParabolicProfile().
Configures a BoundaryCondition object for a parabolic inlet profile.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 715 of file BC_Handlers.c.
|
static |
Initializes a file-prescribed inlet profile handler for one boundary face.
Reads the source_file BC parameter, validates the target face dimensions, loads the PICSLICE scalar speed profile, records summary statistics for logging, and applies the profile once to initialize boundary state.
| self | BoundaryCondition object configured by Create_InletProfileFromFile(). |
| ctx | Runtime boundary context containing the UserCtx and face id. |
Definition at line 1333 of file BC_Handlers.c.
|
static |
Pre-step hook for the static file-prescribed inlet profile handler.
Static profiles require no per-step preparation. The hook is implemented so future time-varying profile support can reuse the same handler lifecycle.
| self | BoundaryCondition object for this inlet handler. |
| ctx | Runtime boundary context. |
| local_inflow_contribution | Inflow accumulator, intentionally unchanged. |
| local_outflow_contribution | Outflow accumulator, intentionally unchanged. |
Definition at line 1378 of file BC_Handlers.c.
|
static |
Applies the loaded PICSLICE scalar profile to Ucont and Ubcs on an inlet face.
Each stored scalar is treated as a positive normal speed magnitude. The routine uses the same negative/positive face sign convention, immersed-boundary skip checks, metric vectors, and CellArea conversion used by the constant and parabolic inlet handlers.
| self | BoundaryCondition object with InletProfileFileData storage. |
| ctx | Runtime boundary context containing arrays and face id. |
Definition at line 1404 of file BC_Handlers.c.
|
static |
Accumulates the applied inlet flux for a file-prescribed profile.
Sums the face-normal Ucont component over the same interior face slots populated by Apply_InletProfileFromFile().
| self | BoundaryCondition object for this inlet handler. |
| ctx | Runtime boundary context containing the UserCtx and face id. |
| local_inflow_contribution | Accumulator incremented by the measured inlet flux. |
| local_outflow_contribution | Outflow accumulator, intentionally unchanged. |
Definition at line 1524 of file BC_Handlers.c.
|
static |
Releases private storage owned by a file-prescribed inlet profile handler.
| self | BoundaryCondition object whose data field stores InletProfileFileData. |
Definition at line 1600 of file BC_Handlers.c.
|
static |
Looks up a string-valued boundary-condition parameter in a BC_Param list.
| params | Head of the boundary-condition parameter linked list. | |
| key | Case-insensitive key to search for. | |
| [out] | value_out | Borrowed pointer to the matching value string, or NULL if absent. |
| [out] | found | PETSC_TRUE when the key is present, PETSC_FALSE otherwise. |
Definition at line 1124 of file BC_Handlers.c.
|
static |
Computes the expected PICSLICE dimensions for an inlet face.
| user | User context containing global grid node counts. | |
| face_id | Boundary face whose tangential profile dimensions are requested. | |
| [out] | n1 | First PICSLICE dimension in handler storage order. |
| [out] | n2 | Second PICSLICE dimension in handler storage order. |
Definition at line 1149 of file BC_Handlers.c.
|
static |
Reads and validates a static scalar inlet profile from a canonical PICSLICE file.
The file must contain magic token PICSLICE, frame count 1, the expected two-dimensional face shape, and exactly one finite nonnegative scalar speed value per interior face slot. Values are stored row-major in data->profile.
| source_file | Path to the PICSLICE profile file. | |
| expected_n1 | Expected first slice dimension. | |
| expected_n2 | Expected second slice dimension. | |
| [in,out] | data | Handler-private storage that receives dimensions, profile values, and min/max speeds. |
Definition at line 1194 of file BC_Handlers.c.
|
inlinestatic |
Returns one scalar speed from the flattened PICSLICE profile.
| data | Handler-private profile storage. |
| a | First profile index in face-specific storage order. |
| b | Second profile index in face-specific storage order. |
(a, b). Definition at line 1279 of file BC_Handlers.c.
| PetscErrorCode Create_InletProfileFromFile | ( | BoundaryCondition * | bc | ) |
Implementation of Create_InletProfileFromFile().
Configures a BoundaryCondition object for a file-prescribed inlet profile.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 1292 of file BC_Handlers.c.
|
static |
Prepare the outlet-conservation correction before advancing the solver.
Definition at line 1672 of file BC_Handlers.c.
|
static |
(Handler Action) Applies mass conservation correction to the outlet face.
This function calculates a global correction factor based on the total inflow and outflow fluxes and applies it to the contravariant velocity (ucont) on the outlet face to ensure mass conservation.
Definition at line 1808 of file BC_Handlers.c.
|
static |
Update outlet-conservation state after a completed solver step.
Definition at line 2020 of file BC_Handlers.c.
| PetscErrorCode Create_OutletConservation | ( | BoundaryCondition * | bc | ) |
Implementation of Create_OutletConservation().
Configures a BoundaryCondition object for conservative outlet treatment.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 1644 of file BC_Handlers.c.
| PetscErrorCode Create_PeriodicGeometric | ( | BoundaryCondition * | bc | ) |
Implementation of Create_PeriodicGeometric().
Configures a BoundaryCondition object for geometric periodic coupling.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/BC_Handlers.h.
Definition at line 2159 of file BC_Handlers.c.
|
static |
Measure the two volumetric fluxes the driven-flow controller senses.
Both periodic driven handlers steer on the same pair of measurements, so they are taken here in a single sweep of lUcont:
*boundaryFlux is the flux through the single periodic boundary plane. It is fast and responsive but noisy, and drives the boundary trim.*planarAverageFlux is the flux averaged over every cross-sectional plane in the driven direction. It is stable and inertial, and drives the momentum source. It is also the quantity initial_flux latches at t=0.| [in] | user | Block context supplying lUcont, lNvert and info. |
| [in] | direction | Driven direction, 'X', 'Y' or 'Z'. |
| [out] | boundaryFlux | Globally reduced flux through the boundary plane. |
| [out] | planarAverageFlux | Globally reduced plane-averaged flux. |
Definition at line 2199 of file BC_Handlers.c.
|
static |
Initialize constant forcing data for a periodically driven boundary.
Definition at line 2368 of file BC_Handlers.c.
|
static |
Prepare constant periodic-driving data before the solver step.
Definition at line 2438 of file BC_Handlers.c.
|
static |
Apply the configured constant driving term to the periodic boundary.
Definition at line 2520 of file BC_Handlers.c.
|
static |
Release resources owned by the constant periodic-driving boundary.
Definition at line 2623 of file BC_Handlers.c.
| PetscErrorCode Create_PeriodicDrivenConstant | ( | BoundaryCondition * | bc | ) |
Internal helper implementation: Create_PeriodicDrivenConstant().
Configures a BoundaryCondition object for periodic driven-flow forcing.
Local to this translation unit.
Definition at line 2325 of file BC_Handlers.c.
|
static |
Initialize forcing data for a periodic boundary driven to its initial flux.
InitializeEulerianState() runs, so at this point Ucont still holds zeros. The measurement is deferred to the first PreStep, by which time either the initial condition has been applied or the restart target has been restored from the checkpoint manifest. Definition at line 2716 of file BC_Handlers.c.
|
static |
Latch the initial-state flux once, then drive to it like a constant target.
The latch is one-shot and guarded by simCtx->drivenFluxTargetLatched:
Ucont now holds the initial condition, so the plane-averaged flux is measured and stored.ReadSimulationFields() restored both the target and the flag from the checkpoint manifest, so the original target survives instead of being re-measured from a drifted field. Definition at line 2788 of file BC_Handlers.c.
| PetscErrorCode Create_PeriodicDrivenInitial | ( | BoundaryCondition * | bc | ) |
Internal helper implementation: Create_PeriodicDrivenInitial().
Configures a BoundaryCondition object for initial-flux periodic driving.
Local to this translation unit.
Definition at line 2669 of file BC_Handlers.c.