PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
variables.h
Go to the documentation of this file.
1/**
2 * @file variables.h
3 * @author Vishal Kandala
4 * @brief Main header file for a complex fluid dynamics solver.
5 *
6 * This file defines the core data structures, global variables, and function
7 * prototypes for a CFD application. It combines features for a curvilinear,
8 * multi-block, immersed boundary (IBM) solver with fluid-structure interaction (FSI),
9 * a modern particle tracking system, a modular boundary condition framework,
10 * and post-processing utilities. It heavily utilizes the PETSc library.
11 *
12 * *** REVISION NOTE ***
13 * This version introduces a central `SimulationContext` struct to encapsulate all
14 * simulation-wide configuration, replacing the legacy system of global variables.
15 * The `UserCtx` struct has been refactored to hold only data specific to a
16 * single grid level and now contains a back-pointer to the `SimulationContext`.
17 * All struct definitions now follow the `typedef struct Name { ... } Name;` convention.
18 */
19
20#ifndef VARIABLES_H
21#define VARIABLES_H
22
23/* Build identity, generated by make so that a commit or dirty-state change rebuilds
24 * the translation units that stamp it into binaries and checkpoints. The fallbacks
25 * keep a build possible outside make; a binary reporting 0.0.0 is saying exactly that. */
26#if defined(__has_include)
27# if __has_include("picurv_build_identity.h")
28# include "picurv_build_identity.h"
29# endif
30#endif
31#ifndef PICURV_RELEASE_VERSION
32#define PICURV_RELEASE_VERSION "0.0.0"
33#endif
34#ifndef PICURV_BUILD_VERSION
35#define PICURV_BUILD_VERSION PICURV_RELEASE_VERSION
36#endif
37#ifndef PICURV_GIT_COMMIT
38#define PICURV_GIT_COMMIT "unknown"
39#endif
40#ifndef PICURV_BUILD_DIRTY
41#define PICURV_BUILD_DIRTY "unknown"
42#endif
43
44/*================================================================================*
45 * PETSC & SYSTEM LIBRARIES *
46 *================================================================================*/
47
48// --- PETSc Includes ---
49#include "petscvec.h"
50#include "petscdmda.h"
51#include "petscksp.h"
52#include "petscsnes.h"
53#include "petscdmswarm.h"
54
55// --- Standard C/C++ Includes ---
56#include <stdio.h>
57#include <stdlib.h>
58#include <string.h>
59
60/** Forces inlining of a per-cell or per-face kernel whose size defeats the compiler's inlining
61 * heuristics, so a call with constant arguments compiles to specialised straight-line code. */
62#if defined(__GNUC__) || defined(__clang__)
63#define PICURV_ALWAYS_INLINE inline __attribute__((always_inline))
64#else
65#define PICURV_ALWAYS_INLINE inline
66#endif
67
68/** @brief Most particle IDs one run can trace (`-picurv_trace_particles`). */
69#define PICURV_MAX_TRACED_PARTICLES 64
70
71/** @brief Most rows one rank contributes to a particle console snapshot (`io.particle_log_interval` samples IDs). */
72#define PICURV_SNAPSHOT_ROWS_PER_RANK 32
73
74/** @brief Most distinct CSV records one run opens through PicurvOpenRunCsv(): about twenty, plus a few per block. */
75#define PICURV_RUN_CSV_CAPACITY 256
76
77#include <unistd.h>
78
79// --- C++ Specific Includes ---
80#if defined(__cplusplus)
81#include <vector>
82#include <algorithm>
83#include <cassert>
84#endif
85
86// Define a C-compatible interface for C++ compilers
87#ifdef __cplusplus
88extern "C" {
89#endif
90
91/*================================================================================*
92 * MACROS & GLOBAL VARIABLES *
93 *================================================================================*/
94
95/// Coefficient controlling the temporal accuracy scheme (e.g., 1.5 for 2nd Order Backward Difference).
96#define COEF_TIME_ACCURACY 1.5
97
98/* --- NOTE: All legacy global 'extern' variables have been removed. --- */
99/* They are now members of the SimulationContext struct. */
100
101
102/*================================================================================*
103 * CORE DATA STRUCTURES & TYPEDEFS *
104 *================================================================================*/
105
106//--------------------------------------------------------------------------------
107// 1. FORWARD DECLARATIONS & BASIC TYPES
108//--------------------------------------------------------------------------------
109
110// --- Forward Declarations ---
111// These declarations allow pointers to these types before their full definition.
112typedef struct SimCtx SimCtx;
113struct ParticleFieldPlan;
114struct ParticleInlet;
115struct AnalyticalField;
116struct PicurvWindow;
118typedef struct UserCtx UserCtx;
119typedef struct BC_Param_s BC_Param; /* Retains _s for linked list safety */
122typedef struct IBMNodes IBMNodes;
123typedef struct IBMVNodes IBMVNodes;
124typedef struct FSInfo FSInfo;
125typedef struct UserMG UserMG;
127typedef struct Cell Cell;
128typedef struct Particle Particle;
132typedef struct Cstart Cstart;
133typedef struct MGCtx MGCtx;
137typedef struct IBMInfo IBMInfo;
139typedef struct ScalingCtx ScalingCtx;
140
141// --- Foundational Geometric and Data Types ---
142
143/** @brief A 3D point or vector with PetscScalar components. */
144typedef struct Cmpnts {
145 PetscScalar x, y, z;
147
148/** @brief A 2D point or vector with PetscScalar components. */
149typedef struct Cmpnts2 {
150 PetscScalar x, y;
152
153/** @brief A symmetric second-order tensor stored by its six independent components.
154 *
155 * The three missing components are recovered by symmetry: `yx == xy`, `zx == xz`,
156 * and `zy == yz`. Contractions must therefore double the off-diagonal terms, which
157 * is what `SymTensorContract()` exists to do in one place instead of at every call
158 * site. Used for strain rates and for the Germano identity's Leonard and model
159 * tensors.
160 */
161typedef struct SymTensor {
162 PetscReal xx, xy, xz, yy, yz, zz;
164
165/** @brief A 2D vector of PETSc real numbers (for geometry/coordinates). */
166typedef struct Cpt2D {
167 PetscReal x, y;
169
170/** @brief Boundary condition data used by the BC pipeline and ghost cell machinery. */
171typedef struct BCS {
172 Vec Ubcs; ///< Physical Cartesian velocity at boundary faces. Full 3D array but only boundary-face entries are meaningful; interior is unused. Consumed by UpdateDummyCells for ghost cell extrapolation.
173 Vec Uch; ///< Characteristic velocity for boundary conditions.
175
176
177//--------------------------------------------------------------------------------
178// 2. PARTICLE LOCATION SYSTEM ENUMS
179//--------------------------------------------------------------------------------
180
181/**
182 * @enum ParticleLocationStatus
183 * @brief Defines the state of a particle with respect to its location and migration
184 * status during the iterative SettleParticles() process.
185 */
186typedef enum {
190 LOST, /**< The search failed for a particle believed to be inside the domain. */
192 EXITED /**< The particle crossed a domain-boundary face whose particle policy removes it. */
194
195/** @brief Enumerates the six faces of a cubic cell for distance calculations. */
196typedef enum {
199
200/** @brief Selects the authoritative velocity representation in a staged file IC. */
205
206
207//--------------------------------------------------------------------------------
208// 3. PARTICLE LOCATION SYSTEM STRUCTS
209//--------------------------------------------------------------------------------
210
211/** @brief Defines a 3D axis-aligned bounding box. */
212typedef struct BoundingBox {
213 Cmpnts min_coords; ///< Minimum x, y, z coordinates of the bounding box.
214 Cmpnts max_coords; ///< Maximum x, y, z coordinates of the bounding box.
216
217/** @brief Defines the vertices of a single hexahedral grid cell. */
218typedef struct Cell {
219 Cmpnts vertices[8]; ///< Coordinates of the eight vertices of the cell.
220} Cell;
221
222/** @brief One cell face as the particle search tests against it: a plane through the vertex mean. */
223typedef struct FacePlane {
224 Cmpnts normal; ///< Unit outward normal of (v2 - v1) x (v4 - v1); unnormalised when degenerate.
225 Cmpnts centroid; ///< Mean of the face's four vertices.
227
228/** @brief The six face planes of one hexahedron, indexed by `Face`, and its characteristic size. */
229typedef struct CellFacePlanes {
230 FacePlane face[NUM_FACES]; ///< Face planes in LEFT..BACK order.
231 PetscInt degenerate; ///< Bit f set when face f's normal magnitude is below 1e-12.
232 PetscReal size; ///< Mean edge length (GetCellCharacteristicSize()); 0 where unused.
234
235/** @brief Defines a particle's core properties for Lagrangian tracking. */
248
249/** @brief Index in RankNeighbors::rank of the neighbour offset (di, dj, dk), each -1, 0 or 1. */
250#define RANK_NEIGHBOR_INDEX(di, dj, dk) (9 * ((dk) + 1) + 3 * ((dj) + 1) + ((di) + 1))
251
252/**
253 * @brief The MPI ranks of the subdomains around this one, across faces, edges and corners.
254 * @details In DMDAGetNeighbors() order, indexed by RANK_NEIGHBOR_INDEX(); entry 13 is this rank.
255 * A neighbour across a periodic axis is the wrapped rank (this rank when the axis has
256 * one rank); one beyond a non-periodic boundary is MPI_PROC_NULL.
257 */
258typedef struct RankNeighbors {
259 PetscMPIInt rank[27];
261
262/** @brief A lean struct to hold the global cell ownership range for a single MPI rank. */
263typedef struct RankCellInfo {
267
268/** @brief Information needed to migrate a single particle between MPI ranks. */
269typedef struct MigrationInfo {
270 PetscInt local_index;
271 PetscInt target_rank;
273
274/** @brief A verification-only prescribed field: an expression in physical x, y, z and t, enabled when set. */
276 struct PicurvExpression *expression; /**< Compiled expression, or NULL when the field is not configured. */
278
279/** @brief Aggregated per-timestep search instrumentation counters. */
301
302
303//--------------------------------------------------------------------------------
304// 4. BOUNDARY CONDITION SYSTEM ENUMS
305//--------------------------------------------------------------------------------
306
307/** @brief Identifies the six logical faces of a structured computational block. */
313
314
315/** @brief Defines the general mathematical/physical Category of a boundary. */
316typedef enum {
319 WALL = 1 ,
321 /* 3 was SYMMETRY, retired: a symmetry plane is a WALL with the free-slip handler. */
323 INLET = 5,
330 OGRID = 12,
332 // Note: Legacy 14 can be a JUNCTION with a specific handler.
333} BCType;
334
335/** @brief What happens to a particle that crosses a domain-boundary face. */
336typedef enum {
337 PARTICLE_BOUNDARY_REMOVE = 0, ///< The particle leaves the domain (EXITED) and is removed.
338 PARTICLE_BOUNDARY_REFLECT = 1, ///< The particle is mirrored about the face plane and stays.
339 PARTICLE_BOUNDARY_WRAP = 2 ///< Periodic faces: the particle re-enters through the paired face.
341
342/** @brief Defines the specific computational "strategy" for a boundary handler. */
357
358
366
367//--------------------------------------------------------------------------------
368// 5. BOUNDARY CONDITION SYSTEM STRUCTS
369//--------------------------------------------------------------------------------
370
371/** @brief A node in a linked list for storing key-value parameters from the bcs.dat file. */
373 char *key;
374 char *value;
376};
377
378/** @brief Provides execution context for a boundary condition handler. */
387
388/** @brief The "virtual table" struct for a boundary condition handler object. */
389typedef struct BoundaryCondition {
392 void *data;
393 PetscErrorCode (*Initialize)(BoundaryCondition *self, BCContext *ctx);
394 PetscErrorCode (*PreStep)(BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow, PetscReal *local_outflow);
395 PetscErrorCode (*Apply)(BoundaryCondition *self, BCContext *ctx);
396 PetscErrorCode (*PostStep)(BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow, PetscReal *local_outflow);
397 PetscErrorCode (*UpdateUbcs)(BoundaryCondition *self,BCContext *ctx);
398 PetscErrorCode (*Destroy)(BoundaryCondition *self);
399 /** Apply() reads state its own boundary pass changes after it runs (the interior Ucat that
400 * Contra2Cart refreshes, or an accumulating flux trim), so a second pass can change the
401 * result. ApplyBoundaryConditions() repeats its pass only when some face sets this. */
404
405/**
406 * @brief The elements of one boundary face that this rank owns: one per interior cell beside
407 * the face, addressed by the face's normal axis, its two tangential axes and their owned
408 * index ranges. Filled by GetBoundaryFaceElements().
409 *
410 * Element (p, q) sits at index `layer` along `normal`, `lo[0] + p` along `a` and `lo[1] + q`
411 * along `b`. `layer` indexes the face's own metric and flux: 0 on a negative face, where the
412 * dummy cell is that same index and the cell behind it is 1; m - 2 on a positive face, where the
413 * cell behind it is that index and the dummy cell is m - 1.
414 */
415typedef struct BoundaryFaceElements {
416 PetscInt normal; /**< Logical axis of the face normal. */
417 PetscInt a, b; /**< The two tangential axes, a < b. */
418 PetscInt layer; /**< Index along the normal of the face's metric and flux. */
419 PetscInt lo[2]; /**< First owned indices along a and b. */
420 PetscInt n[2]; /**< Owned elements along a and b; 0 when this rank does not serve the face. */
422
423/** @brief Holds the complete configuration for one of the six boundary faces. */
432
433//--------------------------------------------------------------------------------
434// 6. IMBERSED BOUNDARY METHOD (IBM) & FSI STRUCTS
435//--------------------------------------------------------------------------------
436
437/** @brief Holds interpolation and distance information for a single IBM point. */
438typedef struct IBMInfo {
439 PetscInt i1, j1, k1, i2, j2, k2, i3, j3, k3;
440 PetscReal cr1, cr2, cr3;
441 PetscReal d_i;
442 PetscInt imode;
443 PetscInt ni, nj, nk;
444 PetscReal d_s;
446 PetscInt cell;
447 PetscReal cs1, cs2, cs3;
448 PetscInt i11, j11, k11, i22, j22, k22, i33, j33, k33;
449 PetscReal cr11, cr22, cr33;
450 PetscReal d_ii;
451 PetscInt iimode;
452 PetscReal cs11, cs22, cs33;
453 PetscInt ii1, jj1, kk1, ii2, jj2, kk2, ii3, jj3, kk3;
454 PetscReal ct1, ct2, ct3;
455 PetscInt smode;
456 PetscInt ii11, jj11, kk11, ii22, jj22, kk22, ii33, jj33, kk33;
457 PetscReal ct11, ct22, ct33;
458 PetscReal d_ss;
459 PetscInt ssmode;
460} IBMInfo;
461
462/** @brief Represents a collection of nodes forming a surface for the IBM. */
463typedef struct IBMNodes {
464 PetscInt nbnumber;
465 PetscInt n_v, n_elmt;
466 PetscInt *nv1, *nv2, *nv3;
467 PetscReal *nf_x, *nf_y, *nf_z;
468 PetscReal *x_bp, *y_bp, *z_bp;
469 PetscReal *x_bp0, *y_bp0, *z_bp0;
470 PetscReal *x_bp_o, *y_bp_o, *z_bp_o;
471 PetscReal *cf, *cfsum, *CCp;
472 PetscReal x_bp_in[101][3270], y_bp_in[101][3270], z_bp_in[101][3270];
474 PetscReal *dA, *nt_x, *nt_y, *nt_z, *ns_x, *ns_y, *ns_z;
475 PetscReal *cent_x, *cent_y, *cent_z;
476 PetscReal *pres, *tau0, *tauN, *Bvel_u, *Bvel_v, *Bvel_w;
479 PetscReal *radvec;
480} IBMNodes;
481
482/** @brief Represents a collection of nodes forming a volume for the IBM. */
483typedef struct IBMVNodes {
484 PetscInt nbnumber;
485 PetscInt n_v, n_elmt;
486 PetscInt *nv1, *nv2, *nv3, *nv4;
487 PetscReal *x_bp, *y_bp, *z_bp;
488 PetscReal *x_bp0, *y_bp0, *z_bp0;
489 PetscReal *x_bp_o, *y_bp_o, *z_bp_o;
491 PetscReal V, *dV0;
492 PetscReal *cent_x, *cent_y, *cent_z;
493 PetscReal x_c, y_c, z_c;
494 PetscReal J[3][3], I_inv[3][3];
495} IBMVNodes;
496
497/** @brief A generic C-style linked list node for integers. */
498typedef struct node{
499 PetscInt Node;
500 struct node *next;
502
503/** @brief Head of a generic C-style linked list. */
504typedef struct list{
507
508/** @brief A generic C-style linked list node for indices. */
509typedef struct list_node {
510 PetscInt index;
513
514/** @brief A linked list node containing IBM interpolation info. */
519
520/** @brief Head of a linked list for IBM data. */
524
525/** @brief Information about a surface element for FSI calculations. */
526typedef struct SurfElmtInfo {
527 PetscReal P;
528 PetscInt n_P;
529 PetscReal Tow_ws, Tow_wt, Tow_wn;
531 PetscInt icell, jcell, kcell;
534
535/** @brief Holds all data related to the state and motion of a body in FSI. */
536typedef struct FSInfo {
537 PetscReal S_new[6], S_old[6], S_real[6], S_realm1[6];
538 PetscReal S_ang_n[6], S_ang_o[6], S_ang_r[6], S_ang_rm1[6];
539 PetscReal red_vel, damp, mu_s;
540 PetscReal F_x, F_y, F_z, A_tot;
543 PetscReal M_x, M_y, M_z;
548 PetscReal x_c, y_c, z_c;
549 PetscReal a_c[3];
552 PetscReal Power, clone;
553 PetscInt pbc[3];
554 PetscReal I_inv[3][3];
555 PetscReal L_n[3], L_o[3], L_r[3];
556 PetscReal alpha[3], acc[3];
557 PetscReal R[3][3], q[4], q_r[4];
558 PetscReal dS[6], dS_o[6], atk, atk_o;
562 PetscInt CV_ys, CV_ye, CV_zs, CV_ze;
563} FSInfo;
564
565/** @brief Defines prescribed body motion using splines. */
566typedef struct Cstart {
568 PetscReal *x_midp, *y_midp, *z_midp;
569 PetscReal *x_com, *y_com, *head_ang;
570 PetscReal *s1, *s2, *s3, *st1, *st2, *st3;
571 Mat Mphi;
572 PetscReal xmin, xmax, ymin, ymax, zmin, zmax;
573} Cstart;
574
575//--------------------------------------------------------------------------------
576// 7. LES TURBULENCE MODEL STRUCTS & ENUMS
577//--------------------------------------------------------------------------------
578/** @brief Identifies the subgrid-scale closure evaluated during a timestep.
579 *
580 * Add new enum values only when the parser, runtime dispatch, docs, and tests
581 * are updated in the same change.
582 */
590
591/** @brief Selects the wall model applied on WALL faces.
592 *
593 * The value doubles as the enable switch: ::WALL_FUNCTION_NONE disables the treatment,
594 * and every other value both enables it and names the law. Configured independently of
595 * the LES closure.
596 *
597 * Add new enum values only when the parser, runtime dispatch, docs, and tests are
598 * updated in the same change.
599 */
606
607/** @brief Selects how a cell's grid filter width is derived from its metrics.
608 *
609 * `CUBE_ROOT_VOLUME` is exact for a cube and progressively underestimates the
610 * width as a cell is stretched. The others use the cell's extents along its own grid
611 * directions: `SCOTTI` corrects the cube root for the cell's aspect ratios, and
612 * `MAX_EDGE` takes the longest extent. See @ref ComputeCellFilterWidth.
613 */
620
621/** @brief Selects the discrete test-filter kernel used by the dynamic procedure.
622 *
623 * `SIMPSON_IK` collapses onto the central eta-plane and is valid only when the
624 * xi and zeta directions are homogeneous; the ingress layer enforces that.
625 */
630
631/** @brief Selects the set over which the Germano contractions are averaged.
632 *
633 * Lilly's least-squares closure assumes the model coefficient is constant across
634 * the averaging set, so the set should span directions in which the flow really is
635 * statistically homogeneous. `LOCAL` makes no such claim and is the only choice
636 * valid on arbitrary geometry. `HOMOGENEOUS` derives its directions from the
637 * periodic boundary pairs unless they are named explicitly.
638 */
644
645/** @brief Selects the admissible range imposed on the dynamic model coefficient.
646 *
647 * `NONE` keeps the coefficient signed, so subgrid-to-resolved energy transfer
648 * (backscatter) survives; stability then rests on the total-viscosity floor
649 * rather than on the coefficient's sign. The clipping modes discard the negative
650 * tail, which removes backscatter and biases the mean dissipation upward.
651 */
657
658/** @brief Every user-selectable parameter of the LES closure.
659 *
660 * Resolved once from the generated control file by @ref CreateSimulationContext and
661 * read-only thereafter. The model selector itself stays on `SimCtx::les`, because
662 * dispatch and field availability are decided from it throughout the runtime.
663 */
664typedef struct LESConfig {
665 PetscInt dynamic_frequency; ///< Recompute the dynamic coefficient every N steps.
666 PetscReal constant_cs; ///< Fixed Cs for CONSTANT_SMAGORINSKY; unused by the dynamic model.
667 PetscReal vreman_coefficient; ///< Model constant c for VREMAN (Vreman 2004: 2.5 Cs^2).
668 PetscReal wale_coefficient; ///< Model constant C_w for WALE (Nicoud & Ducros 1999).
669 LESFilterWidthModel filter_width_model; ///< How the grid filter width Delta is derived per cell.
670 LESTestFilterKernel test_filter_kernel; ///< Discrete test-filter stencil.
671 PetscReal test_filter_width_ratio; ///< Test-to-grid ratio per filtered direction; alpha is its square for the box, ratio^(4/3) for Simpson.
672 LESAveragingMode averaging_mode; ///< Averaging set for the Germano contractions.
673 PetscBool averaging_direction[3]; ///< Averaged-over logical directions (xi, eta, zeta).
674 LESClipMode clip_mode; ///< Admissible range for the coefficient.
675 PetscReal max_cs; ///< Ceiling on Cs under LES_CLIP_CLAMP.
676 PetscReal min_viscosity_ratio; ///< Enforce nu + nu_t >= ratio * nu.
677 PetscReal yoshizawa_ci; ///< Yoshizawa constant for the reported SGS kinetic energy.
678 PetscBool diagnostics_enabled; ///< Append per-step coefficient statistics to the run log directory.
679 PetscInt diagnostics_cadence; ///< Steps between diagnostic rows.
681
682/** @brief Pre-clipping volume statistics captured by one dynamic-coefficient update.
683 *
684 * The backscattering and limited fractions describe the coefficient field as the
685 * Germano contraction produced it. Clipping overwrites that state, and no stored
686 * field preserves it, so it is recorded here on the way past and consumed by
687 * @ref LogLESDiagnostics.
688 */
689typedef struct LESDiagnosticsState {
690 PetscReal contraction_lm; ///< Volume-weighted sum of `L_ij M_ij` over fluid cells.
691 PetscReal contraction_mm; ///< Volume-weighted sum of `M_ij M_ij` over fluid cells.
692 PetscReal backscatter_volume; ///< Fluid volume whose raw coefficient was negative.
693 PetscReal limited_volume; ///< Fluid volume whose coefficient the clip modified.
694 PetscReal fluid_volume; ///< Total fluid volume sampled.
695 PetscBool valid; ///< Set once a dynamic update has populated this state.
697
698/** @brief Near-wall statistics captured by one wall-model pass.
699 *
700 * The wall model evaluates the wall distance and the friction velocity together at each
701 * corrected cell. `y+` is the number that says whether the model is being asked to work
702 * in the range it is valid for, and it cannot be recovered afterwards from the corrected
703 * velocity field, which no longer carries the law that produced it. Recomputing the wall
704 * distance in the diagnostic would duplicate geometry the correction already has in hand,
705 * so it is accumulated on the way past and consumed by @ref LogWallModelDiagnostics.
706 */
708 PetscReal friction_velocity_sum; ///< Sum of `u_tau` over corrected cells.
709 PetscReal friction_velocity_sq; ///< Sum of `u_tau^2`, for the RMS.
710 PetscReal friction_velocity_min; ///< Smallest `u_tau` this rank corrected.
711 PetscReal friction_velocity_max; ///< Largest `u_tau` this rank corrected.
712 PetscReal wall_distance_sum; ///< Sum of the first-cell wall distance.
713 PetscReal y_plus_sum; ///< Sum of `u_tau * y / nu` over corrected cells.
714 PetscReal y_plus_max; ///< Largest first-cell `y+` this rank corrected.
715 PetscInt friction_velocity_max_at[4]; ///< Wall face (`BCFace`) and global cell i, j, k of `friction_velocity_max`.
716 PetscInt y_plus_max_at[4]; ///< Wall face (`BCFace`) and global cell i, j, k of `y_plus_max`.
717 PetscReal wall_viscosity_sum; ///< Sum of the equivalent eddy viscosity u_tau^2 y/|U_1| - nu (diagnostic only).
718 PetscInt cells; ///< Number of cells this rank corrected.
720//--------------------------------------------------------------------------------
721// 8. MULTIGRID, SOLVERS AND POST-PROCESSING STRUCTS AND ENUMS
722//--------------------------------------------------------------------------------
723
724/** @brief Enumerator to identify the implemented momentum solver strategies.
725 *
726 * Add new enum values only when the parser, runtime dispatch, docs, and tests
727 * are updated in the same change.
728 */
736
737/** @brief Selects the runtime solution-convergence diagnostics mode. */
744
745/** @brief Enumerator to identify the particle initialization strategy. */
746typedef enum {
747 PARTICLE_INIT_SURFACE_RANDOM = 0, /**< Random placement on the inlet face */
748 PARTICLE_INIT_VOLUME = 1, /**< Random volumetric distribution across the domain */
749 PARTICLE_INIT_POINT_SOURCE = 2 /**< All particles at a fixed (psrc_x,psrc_y,psrc_z) — for validation */
751
752/**
753 * @brief Selects the grid-to-particle interpolation method.
754 *
755 * - INTERP_TRILINEAR: Direct trilinear from 8 nearest cell centers (second-order on curvilinear grids).
756 * - INTERP_CORNER_AVERAGED: Legacy center-to-corner average, then trilinear from corners.
757 * - INTERP_FACE_FLUX: Velocity from the host cell's face fluxes, linear between opposite faces,
758 * so it is divergence-free where the fluxes are; other fields use INTERP_TRILINEAR.
759 */
765
766/** @brief Context for Multigrid operations. */
767typedef struct MGCtx {
769 PetscInt thislevel;
771} MGCtx;
772
773/** @brief User-level context for managing the entire multigrid hierarchy. */
774typedef struct UserMG {
775 PetscInt mglevels;
776 PetscInt thislevel;
777 PetscBool isc, jsc, ksc;
781} UserMG;
782
783#define MAX_PIPELINE_LENGTH 1024
784#define MAX_FIELD_LIST_LENGTH 1024
785#define MAX_FILENAME_LENGTH 256
786/// Defines the maximum number of data fields for VTK point data.
787#define MAX_POINT_DATA_FIELDS 20
788#define MAX_VTK_FIELD_NAME_LENGTH 64 ///< Maximum length for VTK field names.
789/**
790 * @brief Holds all configuration parameters for a post-processing run.
791 * This is an enhanced version combining command-line and file-based settings.
792 */
793typedef struct PostProcessParams {
794 // -- Source Directory --- (For Data)
795 char source_dir[PETSC_MAX_PATH_LEN];
796
797 // --- Time Controls (can be set by command line or file) ---
798 PetscInt startTime;
799 PetscInt endTime;
800 PetscInt timeStep;
801 /** File listing the exact steps to process, one per line; empty uses the time controls. */
802 char step_list_file[PETSC_MAX_PATH_LEN];
804
805 // --- Configuration primarily from the .cfg file ---
813
814 // --- Statistics Pipeline (global reductions → CSV files) ---
815 char statistics_pipeline[MAX_PIPELINE_LENGTH]; /**< e.g. "ComputeMSD" */
816 char statistics_output_prefix[MAX_FILENAME_LENGTH]; /**< basename for CSV output, e.g. "Stats" */
817
818 // --- Field Statistics (accumulated window state → derived fields) ---
819 /** Comma-separated window names to derive; empty disables the pipeline. */
821 /** Comma-separated outputs: mean, reynolds_stress, rms, tke, flux, point_variance. */
823 /** Comma-separated formats: vtk for derived fields, csv for the convergence history. */
825 /** Analysis prefix for CSV summaries; VTK continues to use output_prefix. */
826 char field_statistics_output_prefix[PETSC_MAX_PATH_LEN];
827 /** Whether derived output leaves non-dimensional form, from global_operations.dimensionalize. */
828 PetscBool dimensionalize;
829 /** Committed step supplying the state; negative means the step being processed. */
831 /** Directions profiles merge over, in (i, j, k) order; none selected writes no profile. */
833 /** Recipe-defined single-instant windows, derived at every processed step. */
836 /** Whether each ensemble samples the particles in a cell rather than the cell's state. */
838
839 // --- Legacy settings ---
840 char eulerianExt[8]; // from original PostProcessParams (repurposed for PreCheckAndResize() as the input file extension.)
841 char particleExt[8]; // from original PostProcessParams
842
843 // --- Processing Parameters ---
844 PetscInt reference[3]; // Reference point for normalizing any field against.
845 PetscInt da_procs[3]; ///< Postprocessor MPI decomposition (i, j, k) from the recipe; PETSC_DECIDE where unset.
846
848
849/**
850 * @brief Stores all necessary information for a single data array in a VTK file.
851 */
852typedef struct VTKFieldInfo {
853 char name[MAX_VTK_FIELD_NAME_LENGTH]; // Name of the data field
854 PetscInt num_components; // 1 for scalar, 3 for vector
855 PetscScalar* data; // Pointer to the raw data array (must be freed by caller)
857
858/** @brief Enumerates the type of VTK file to be written. */
863
864/**
865 * @brief One VTK file being assembled collectively.
866 * @details `mx`/`my`/`mz` and `npoints` describe the whole file and agree on every rank. The
867 * arrays hold only this rank's points: for a structured grid the box of `local_size`
868 * points starting at `local_start` (i fastest), for polydata the `local_size[0]`
869 * consecutive output points starting at `local_start[0]`.
870 */
883
884/**
885 * @brief Defines the execution mode of the application.
886 */
887typedef enum {
888 EXEC_MODE_SOLVER, // The application is running as the main fluid solver.
889 EXEC_MODE_POSTPROCESSOR, // The application is running as the post-processor.
890 EXEC_MODE_RESTART_CHECK, // The solver only checks that a restart can continue its checkpoint, then exits.
891 EXEC_MODE_UNKNOWN // Default/error state.
893
894//-------------------------------------------------------------------------------
895// 9. SCALING AND DIMENSIONAL ANALYSIS STRUCTS
896//-------------------------------------------------------------------------------
897typedef struct ScalingCtx{
898 PetscReal L_ref;
899 PetscReal U_ref;
900 PetscReal rho_ref;
901 PetscReal P_ref;
903//-------------------------------------------------------------------------------
904/*================================================================================*
905 * MAIN APPLICATION CONTEXT *
906 *================================================================================*/
907
908/**
909 * @brief The master context for the entire simulation.
910 *
911 * This struct encapsulates all global configuration flags, physical parameters,
912 * simulation control settings, and top-level data objects. It replaces the
913 * numerous global variables from the legacy codebase, providing a single,
914 * explicit source of truth for the simulation's setup.
915 */
916typedef struct SimCtx {
917
918 //================ Group 1: Parallelism & MPI Information ================
919 PetscMPIInt rank;
920 PetscMPIInt size;
921
922 //================ Group 2: Simulation Control, Time, and I/O ================
923
924 PetscInt step;
925 PetscReal ti;
926 PetscInt StartStep;
927 PetscInt StepsToRun;
928 PetscInt tiout;
929 PetscBool skipInitialCheckpoint; ///< io.write_initial_checkpoint false: no initial/branch_start bundle.
930 PetscBool skipFinalCheckpoint; ///< io.write_final_checkpoint false: no end-of-run bundle.
932 PetscReal StartTime;
933 PetscReal dt;
934 PetscBool OnlySetup;
935 PetscBool continueMode;
936 PetscViewer logviewer;
938 char eulerianSource[PETSC_MAX_PATH_LEN];
939 char restart_dir[PETSC_MAX_PATH_LEN];
940 char output_dir[PETSC_MAX_PATH_LEN];
941 char log_dir[PETSC_MAX_PATH_LEN];
942 char analysis_dir[PETSC_MAX_PATH_LEN];
943 char _io_context_buffer[PETSC_MAX_PATH_LEN]; // Persistent store for I/O context strings.
944 char *current_io_directory; // Pointer into the above buffer.
948
949 //================ Group 3: High-Level Physics & Model Selection Flags ================
950 PetscInt immersed, movefsi, rotatefsi; ///< Refused at setup: immersed boundaries and moving bodies are not implemented.
951 PetscInt invicid, TwoD, moveframe, rotateframe; ///< moveframe/rotateframe are refused at setup.
952 struct AnalyticalField *analyticalField; /**< The prescribed field's source, once read; see AnalyticalSolutionEngine(). */
953
954 //================ Group 4: Immersed-Body Flux Corrections ================
955 PetscInt MHV, LV; ///< Heart-valve flux corrections for immersed bodies; refused at setup.
956
957 //================ Group 5: Solver & Numerics Parameters ================
962 PetscInt poisson;
963 PetscInt central;
964
967 PetscReal max_pseudo_cfl, min_pseudo_cfl; // New addition for adaptive pseudo-CFL
968 PetscReal mom_dt_jameson_residual_norm_noise_allowance_factor; // New addition for divergence detection
969 PetscBool no_pseudo_cfl_backtrack; /* Diagnostic: commit all finite RK trials, skip ratio-based rollback */
970 PetscReal mom_ratio_ema_alpha; /* EMA smoothing coefficient for trial-ratio rejection (0=no smooth, 1=raw) */
971 PetscBool mom_last_converged; /* Set after each momentum solve: true if pseudo-time converged */
972 PetscInt mom_max_unconverged_steps; /* Stop after this many consecutive unconverged momentum steps; 0 never stops. */
973 PetscInt mom_unconverged_streak; /* Consecutive momentum steps committed unconverged, up to the current one. */
974 PetscReal mom_last_lambda_max; /* Global spectral radius [1/s] from the last momentum solve; for diagnostics */
975 PetscBool mom_nk_monitor_history; /* Write PICurv's structured per-Newton-iteration residual history. */
976 PetscBool ps_ksp_pic_monitor_true_residual; // Parsed once from options for custom Poisson monitor logging.
977 PetscBool initialConditionStaged; /* A staged velocity field is part of the initial source. */
979 char initialConditionDirectory[PETSC_MAX_PATH_LEN];
987 /* --- Field Statistics (window lifecycle; accumulator binding arrives with ingress) --- */
992 /* Whether saved window state is resumed rather than restarted from zero.
993 * Defaults to the run's continue mode; --restart-from requires an explicit
994 * request because it may branch onto a different physical trajectory. */
998
999 //================ Group 6: Physical & Geometric Parameters ================
1001 PetscReal CMx_c, CMy_c, CMz_c;
1002 PetscReal psrc_x, psrc_y, psrc_z; /**< Point source location for PARTICLE_INIT_POINT_SOURCE */
1006 PetscReal iem_constant; /**< IEM mixing constant C_IEM in Omega = C_IEM Gamma / Delta^2 (default 2.0). */
1007
1008 //================ Group 7: Grid, Domain, and Boundary Condition Settings ================
1011 PetscBool generate_grid;
1012 char grid_file[PETSC_MAX_PATH_LEN];
1017 // Turbulent Flat Channel with Forcing term
1019 /* Physical step whose smoothed driving force `drivingForceMagnitude` holds
1020 * (-1 = none yet). ComputeDrivenChannelFlowSource() runs once per ComputeRHS,
1021 * i.e. per RK stage or per Newton residual evaluation, so its EMA must be
1022 * advanced against this rather than on every call. */
1024 PetscReal targetVolumetricFlux; // for DRIVEN flow.
1025 /* True once a driven-flow target is fixed for the run. `constant_flux` sets
1026 * it at initialization from the bcs file; `initial_flux` sets it at the
1027 * first PreStep from the starting field. Checkpointed so a restart holds the
1028 * original target instead of re-measuring a drifted one. */
1032 /* The planar-average volumetric flux and cross-section area the controller set
1033 * `bulkVelocityCorrection` from this step. Kept so the driven-flow diagnostics can
1034 * report them without repeating the controller's global reductions. */
1037 PetscInt ccc;
1038 PetscReal ratio;
1039
1040 //================ Group 8: Turbulence Modeling (LES) ================
1041 PetscInt les; ///< Active LES closure; an ::LESModelType value.
1042 PetscInt wallfunction; ///< Enable wall functions on WALL faces.
1043 PetscBool inflowFluctuations; ///< Some inlet adds synthetic fluctuations; their filter state is checkpointed.
1044 PetscBool inflowFluctuationsRestored; ///< That state was read from the restart checkpoint.
1045 PetscInt les_gradient_model; ///< Add the Clark gradient (tensor-diffusivity) term to the viscous flux.
1046 LESConfig les_config; ///< Parameters of the LES closure selected by `les`.
1047
1048 //================ Group 9: Particle / DMSwarm Data & Settings ================
1049 PetscInt np;
1050 PetscInt particleRandomSeed; ///< Base seed for every particle RNG stream (-particle_random_seed).
1051 PetscInt sourceRandomSeed; ///< Seed of the draws in velocity and pressure sources (-source_random_seed).
1057 PetscInt particlesLostLastStep; /**< Particles removed this step because their search failed. */
1059 PetscReal particlesLostScalarLastStep; /**< Sum of Psi over the particles removed this step as LOST. */
1060 PetscInt particlesExitedLastStep; /**< Particles removed this step because they left the domain. */
1062 PetscReal particlesExitedScalarLastStep; /**< Sum of Psi over the particles that left the domain this step. */
1063 struct ParticleFieldPlan *particleFieldPlan; /**< Configured initial particle-field values, or NULL. */
1064 struct ParticleInlet *particleInlets; /**< Inlet faces that inject particles, or NULL. */
1065 PetscInt particleInletCount; /**< Entries of `particleInlets`. */
1069 PetscInt particlesPerCellMin; /**< Fewest particles in any cell after the step */
1070 PetscInt particlesPerCellMax; /**< Most particles in any cell after the step */
1071 PetscReal particlesPerCellMean; /**< Particles counted in cells divided by the cell count */
1074 PetscReal C_IEM;
1075
1076 //================ Group 10: Immersed Boundary & FSI Data Object Pointers ================
1080
1081 //================ Group 11: Top-Level Managers, Custom Configuration,Logging/Monitoring ====
1083 char allowedFile[PETSC_MAX_PATH_LEN];
1084 PetscBool useCfg;
1086 PetscInt nAllowed;
1088 PetscInt64 *tracePIDs; ///< Sorted, distinct IDs of the particles whose every stage is reported (-picurv_trace_particles); NULL when none.
1089 PetscInt nTracePIDs; ///< Number of entries in tracePIDs (at most PICURV_MAX_TRACED_PARTICLES).
1090 /* Net volume flux into the domain carried by the momentum step's velocity before the
1091 * pressure correction (inflow minus outflow, through every boundary face): the domain
1092 * integral of the pressure equation's source. With Neumann pressure boundaries it must
1093 * be near zero for that equation to have a solution. Unlike the continuity log's
1094 * Net Flux, which sums only the inlet and outlet faces, it covers all boundaries. */
1096 PetscReal MaxDiv;
1098 // Profiling
1099 char profilingSelectedFuncsFile[PETSC_MAX_PATH_LEN];
1103 char **profilingHelpers; ///< Helper functions whose timers are enabled (-profiling_helpers).
1105 PetscBool profilingAllHelpers; ///< -profiling_helpers all: every helper timer is enabled.
1108 PetscBool verifyGhostUpdates; ///< -picurv_verify_ghost_updates: test-only cross-checks of skipped or partial ghost updates, and of migration newcomers against a PID snapshot.
1123 PetscBool runtimeMemoryLogEnabled; /**< Enable the rank-reduced runtime memory log (log_dir/Runtime_Memory.csv). */
1124 uint64_t runCsvWritten[PICURV_RUN_CSV_CAPACITY]; /**< Rank 0 only: path hashes of the CSV records this run has opened (see PicurvOpenRunCsv()). */
1125 PetscInt runCsvWrittenCount; /**< Entries of runCsvWritten in use. */
1126 PetscBool runtimeMemoryLogHasPrevious; /**< True after the first process-memory sample. */
1127 PetscReal runtimeMemoryLogPreviousProcessMB; /**< Previous local process memory sample in MB. */
1128 PetscReal lastStepWallSeconds; /**< Slowest rank's wall time of the last completed step (0 before one). */
1129 //================ Group 12: Post-Processing =================================================
1130 char PostprocessingControlFile[PETSC_MAX_PATH_LEN];
1132
1133 //=============== Group 13: Miscellaneous =============================================
1134 PetscReal r[101], tin[101], uinr[101][1001];
1135
1136} SimCtx;
1137
1138/**
1139 * @brief Whether the run carries particles: a seeded or restored population, or inlets that inject them.
1140 * @param[in] simCtx Simulation context.
1141 * @return PETSC_TRUE when particle state and steps are needed.
1142 */
1143static inline PetscBool ParticlesEnabled(const SimCtx *simCtx)
1144{
1145 return (PetscBool)(simCtx->np > 0 || simCtx->particleInletCount > 0);
1146}
1147
1148/** @deprecated Use mom_dt_jameson_residual_norm_noise_allowance_factor. */
1149#define mom_dt_rk4_residual_norm_noise_allowance_factor mom_dt_jameson_residual_norm_noise_allowance_factor
1150
1151
1152/**
1153 * @brief User-defined context containing data specific to a single computational
1154 * grid level. This is the primary data structure passed to low-level
1155 * numerical and solver functions.
1156 */
1157typedef struct UserCtx {
1158
1159 // --- The Critical Link to Global Configuration ---
1160 SimCtx *simCtx; ///< Back-pointer to the master simulation context.
1161
1162 // --- Grid, Geometry & Parallelization (Per-Level) ---
1163 DM da, fda;
1164 /* Symmetric second-order tensor DM (dof 6), mirroring da's decomposition.
1165 * Field-statistics products need six components at each point; splitting them
1166 * across six scalar vectors would cost six memory streams in the per-step
1167 * accumulation loop and six collective gathers per checkpoint. */
1169 DMDALocalInfo info;
1170 AO ao;
1171 PetscInt IM, JM, KM; // No.of grid points.
1176 PetscReal rx, ry, rz;
1177 PetscInt cgrid;
1180
1181 // --- Boundary Conditions & Interfacing ---
1186 /* Wall-model friction velocity. Global is authoritative - the wall model writes
1187 it alongside the global Ucat it corrects - and the local view is its ghosted
1188 image, refreshed through the field catalog like every other cell field. */
1190 /* Kinematic wall shear stress per wall-face element, in that face's dummy cell, oriented
1191 as the face's viscous flux per unit area. Derived, rebuilt by every wall pass, and
1192 never restored from a checkpoint. */
1194 Vec InflowFluctuation, lInflowFluctuation; ///< Inlet fluctuation filter state in the inlet faces' dummy planes.
1195
1196 // --- Primary Flow Fields (Global & Local Views) ---
1198
1199 // --- Secondary Flow & Derived Fields ---
1202
1203 // --- Time-Stepping & Solver Workspace Fields ---
1205 /* Rhs, dUcont, pUcont and pRhs are the implicit momentum solvers' workspaces: allocated on
1206 a solver's first call and kept for the run (Rhs is zeroed on each step's entry). */
1210 /* Corner-staging workspace, one pair per block size, so neither the DM nor
1211 * the degree of freedom has to be rediscovered from a cached vector. */
1212 Vec CellScalarAtCorner, lCellScalarAtCorner; /* da-based, dof 1 */
1213 Vec CellVectorAtCorner, lCellVectorAtCorner; /* fda-based, dof 3 */
1214 /* Post-processing staging vectors. A derived statistic is config-counted and has
1215 * no compile-time offset of its own, so it is written here to be addressed by
1216 * name through the existing ghost and nodal-average paths. The nodal companions
1217 * are reused field by field, because the VTK writer copies each one out before
1218 * the next is produced. */
1219 Vec PostScalar, lPostScalar, PostScalarNodal; /* da-based, dof 1 */
1220 Vec PostVector, lPostVector, PostVectorNodal; /* fda-based, dof 3 */
1221 /* Per-window statistics accumulators, one entry per configured window. */
1223
1224 // --- Pressure-Poisson System ---
1225 /* Built once by PoissonSolver_Multigrid() and kept for the run. A, nullsp and R live
1226 on every level (R below the finest); MR and MP are the transfers between this level
1227 and the next coarser one; ksp and B are held on the finest level only. */
1228 Mat A; KSP ksp; MatNullSpace nullsp;
1229 Vec B,R;
1230 Mat MR, MP;
1231
1232 // --- Newton-Krylov Momentum System ---
1233 /* Built by MomentumSolver_NewtonKrylov() on its first call (finest level) and kept for the
1234 run; released by MomentumSolver_NewtonKrylov_Destroy(). */
1236
1237
1238 // --- Grid Metrics (Global and Local) ---
1239 /* Node coordinates: da's own global and ghosted coordinate vectors, borrowed (PETSc owns and
1240 destroys them). Set once with the DM; coordinates are then edited in place and their ghosts
1241 refreshed with UpdateLocalGhosts(). DMSetCoordinates() on da would replace both vectors and
1242 leave these dangling, so nothing calls it after grid setup. */
1245 // Face planes for particle search (grid cells) and cell-centre interpolation (dual cells): one
1246 // plane per face family, shared by the two cells on either side (MetricComputeFacePlanes()).
1257
1258 // --- Turbulence Modeling (LES) ---
1260 LESDiagnosticsState les_diagnostics; ///< Pre-clipping statistics from the last dynamic update.
1261 WallModelDiagnosticsState wall_diagnostics; ///< Near-wall statistics from the last wall-model pass.
1262 PetscInt wall_yplus_excursions; ///< Consecutive diagnostic samples with the first cell outside the selected law's valid y+ range.
1263 PetscBool wall_yplus_max_reported; ///< The local y+ maximum has already been reported above the law's range.
1264
1265 // --- Immersed Boundary Method (IBM) ---
1267
1268 // --- Multigrid Hierarchy ---
1271
1272 // --- Particle System ---
1275 PetscInt RankCellInfoProcs[3]; ///< DMDA process grid (m, n, p) of RankCellInfoMap: rank i + m (j + n k).
1277 Vec Psi, lPsi; //scalar dummy to demonstrate scatter.
1278
1279 // --- Post-Processing ---
1283 Vec Qcrit, lQcrit; ///< Cell-centred Q-criterion and its ghosted copy for nodal averaging.
1284 Vec Qcrit_nodal; ///< Q-criterion averaged to grid nodes; the field a .vts can place correctly.
1286
1287} UserCtx;
1288
1289#ifdef __cplusplus
1290}
1291#endif
1292
1293#endif // VARIABLES_H
The prescribed field: the case's source, and what it reuses from step to step.
One inlet face that injects particles.
Independent accumulator state for one window on one block.
Runtime state of one window.
The "virtual table" struct for a boundary condition handler object.
Definition variables.h:389
PetscErrorCode(* PostStep)(BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow, PetscReal *local_outflow)
Definition variables.h:396
PetscErrorCode(* PreStep)(BoundaryCondition *self, BCContext *ctx, PetscReal *local_inflow, PetscReal *local_outflow)
Definition variables.h:394
BCHandlerType type
Definition variables.h:390
PetscErrorCode(* Destroy)(BoundaryCondition *self)
Definition variables.h:398
PetscErrorCode(* Initialize)(BoundaryCondition *self, BCContext *ctx)
Definition variables.h:393
PetscErrorCode(* UpdateUbcs)(BoundaryCondition *self, BCContext *ctx)
Definition variables.h:397
PetscErrorCode(* Apply)(BoundaryCondition *self, BCContext *ctx)
Definition variables.h:395
PetscBool needs_repeat_pass
Apply() reads state its own boundary pass changes after it runs (the interior Ucat that Contra2Cart r...
Definition variables.h:402
BCPriorityType priority
Definition variables.h:391
PetscBool inflowFluctuations
Some inlet adds synthetic fluctuations; their filter state is checkpointed.
Definition variables.h:1043
PetscReal M_x_rm3
Definition variables.h:547
PetscInt particlesPerCellMin
Fewest particles in any cell after the step.
Definition variables.h:1069
PetscInt particleInletCount
Entries of particleInlets.
Definition variables.h:1065
PetscReal y_c
Definition variables.h:493
PetscReal * x_bp_o
Definition variables.h:470
LESModelType
Identifies the subgrid-scale closure evaluated during a timestep.
Definition variables.h:583
@ DYNAMIC_SMAGORINSKY
Definition variables.h:586
@ VREMAN
Definition variables.h:587
@ NO_LES_MODEL
Definition variables.h:584
@ WALE
Definition variables.h:588
@ CONSTANT_SMAGORINSKY
Definition variables.h:585
PetscInt MHV
Definition variables.h:955
Vec lFriction_Velocity
Definition variables.h:1189
const PetscReal * global_outflow_sum
Definition variables.h:385
Vec lDiffusivityGradient
Definition variables.h:1201
Vec Wall_Stress
Definition variables.h:1193
PetscInt isc
Definition variables.h:1175
PetscInt CV_ye
Definition variables.h:562
Cmpnts * urm1
Definition variables.h:490
DM packer
Definition variables.h:779
PetscBool mom_nk_monitor_history
Definition variables.h:975
PetscReal P
Definition variables.h:527
PetscInt ii22
Definition variables.h:456
PetscInt particlesPerCellMax
Most particles in any cell after the step.
Definition variables.h:1070
PetscReal FarFluxInSum
Definition variables.h:1016
Vec Qcrit_nodal
Q-criterion averaged to grid nodes; the field a .vts can place correctly.
Definition variables.h:1284
Vec lPostScalar
Definition variables.h:1219
PetscInt fieldStatisticsWindowCount
Definition variables.h:989
char statistics_output_prefix[256]
basename for CSV output, e.g.
Definition variables.h:816
PetscInt movefsi
Definition variables.h:950
Vec lCent
Definition variables.h:1244
BCType
Defines the general mathematical/physical Category of a boundary.
Definition variables.h:316
@ MOVING_WALL
Definition variables.h:320
@ INLET
Definition variables.h:323
@ INTERFACE
Definition variables.h:318
@ ANNULUS
Definition variables.h:329
@ ANALYTICAL_VORTEX
Definition variables.h:327
@ RHEOLOGY
Definition variables.h:331
@ FARFIELD
Definition variables.h:324
@ CHARACTERISTIC_BC
Definition variables.h:326
@ WALLFUNCTION
Definition variables.h:317
@ OGRID
Definition variables.h:330
@ OUTLET
Definition variables.h:322
@ PERIODIC
Definition variables.h:325
@ JUNCTION
Definition variables.h:328
@ WALL
Definition variables.h:319
PetscReal M_x_rm2
Definition variables.h:546
PetscInt j2
Definition variables.h:439
PetscReal yoshizawa_ci
Yoshizawa constant for the reported SGS kinetic energy.
Definition variables.h:677
struct list_node * next
Definition variables.h:511
PetscBool continueMode
Definition variables.h:935
PetscReal * dA
Definition variables.h:474
PetscInt jj11
Definition variables.h:456
PetscReal F_x
Definition variables.h:540
PetscInt moveframe
Definition variables.h:951
Vec P_nodal
Definition variables.h:1281
Cmpnts vel
Definition variables.h:240
PetscReal * cent_y
Definition variables.h:475
PetscInt TwoD
Definition variables.h:951
PetscInt pseudo_periodic
Definition variables.h:1010
UserCtx * user
Definition variables.h:768
Vec PlaneCentroidK
Definition variables.h:1248
PetscReal d_s
Definition variables.h:444
PetscReal FarFluxOutSum
Definition variables.h:1016
Mat Mphi
Definition variables.h:571
PetscInt ssmode
Definition variables.h:459
#define MAX_POINT_DATA_FIELDS
Defines the maximum number of data fields for VTK point data.
Definition variables.h:787
PetscInt k22
Definition variables.h:448
PetscReal I_inv[3][3]
Definition variables.h:494
PetscInt ys_cell
Definition variables.h:264
PetscReal clone
Definition variables.h:552
PetscInt n_elmt
Definition variables.h:485
Vec lSearchCellSize
Definition variables.h:1249
PetscInt npoints
Definition variables.h:874
PetscInt i22
Definition variables.h:448
PetscBool inletFaceDefined
Definition variables.h:1183
PetscReal wall_viscosity_sum
Sum of the equivalent eddy viscosity u_tau^2 y/|U_1| - nu (diagnostic only).
Definition variables.h:717
PetscInt i1
Definition variables.h:439
PetscReal S_ang_o[6]
Definition variables.h:538
PetscInt j11
Definition variables.h:448
PetscInt i3
Definition variables.h:439
PetscInt icell
Definition variables.h:531
IBMList * ibmlist
Definition variables.h:1266
PetscInt num_components
Definition variables.h:854
PetscInt j3
Definition variables.h:439
PetscReal * y_bp
Definition variables.h:487
PetscBool profilingFinalSummary
Definition variables.h:1107
char particle_output_prefix[256]
Definition variables.h:811
PetscInt xs_cell
Definition variables.h:264
PetscReal y_bp_in[101][3270]
Definition variables.h:472
PetscReal schmidt_number
Definition variables.h:1005
PetscMPIInt rank
Definition variables.h:919
PetscInt imode
Definition variables.h:442
PetscInt dynamic_frequency
Recompute the dynamic coefficient every N steps.
Definition variables.h:665
PetscInt kk22
Definition variables.h:456
PetscInt mglevels
Definition variables.h:1269
PetscInt LV
Heart-valve flux corrections for immersed bodies; refused at setup.
Definition variables.h:955
PetscReal mu_s
Definition variables.h:539
PetscReal angle
Definition variables.h:1000
PetscBool verifyGhostUpdates
-picurv_verify_ghost_updates: test-only cross-checks of skipped or partial ghost updates,...
Definition variables.h:1108
PetscReal Turbulent_schmidt_number
Definition variables.h:1005
PetscReal cr33
Definition variables.h:449
PetscInt target_rank
Definition variables.h:271
PetscReal tin[101]
Definition variables.h:1134
PetscInt cgrid
Definition variables.h:1177
struct AnalyticalField * analyticalField
The prescribed field's source, once read; see AnalyticalSolutionEngine().
Definition variables.h:952
Cmpnts normal
Unit outward normal of (v2 - v1) x (v4 - v1); unnormalised when degenerate.
Definition variables.h:224
BoundaryFaceConfig boundary_faces[6]
Definition variables.h:1182
PetscInt64 searchLocatedCount
Definition variables.h:283
PetscReal yy
Definition variables.h:162
PetscInt64 reflectionCount
Definition variables.h:296
PetscReal z_bp_in[101][3270]
Definition variables.h:472
LESFilterWidthModel filter_width_model
How the grid filter width Delta is derived per cell.
Definition variables.h:669
PetscReal * s2
Definition variables.h:570
MatNullSpace nullsp
Definition variables.h:1228
PetscInt statisticsConsoleOutputFreq
Definition variables.h:991
PetscInt block_number
Definition variables.h:1009
Vec lIEta
Definition variables.h:1254
PetscInt nbnumber
Definition variables.h:484
PetscReal * y_com
Definition variables.h:569
PetscInt num_point_data_fields
Definition variables.h:879
struct PicurvWindow * field_statistics_ensembles
Definition variables.h:835
PetscReal * radvec
Definition variables.h:479
PetscReal * cent_y
Definition variables.h:492
Cmpnts centroid
Mean of the face's four vertices.
Definition variables.h:225
PetscReal * Bvel_v
Definition variables.h:476
PetscReal contraction_mm
Volume-weighted sum of M_ij M_ij over fluid cells.
Definition variables.h:691
PetscReal mom_rtol
Definition variables.h:960
PetscReal F_z_old
Definition variables.h:541
PetscInt64 searchLostCount
Definition variables.h:284
PetscInt ii1
Definition variables.h:453
BCFace identifiedInletBCFace
Definition variables.h:1184
PetscInt da_procs_z
Definition variables.h:1013
PetscInt local_size[3]
Definition variables.h:876
PetscReal M_z
Definition variables.h:543
PetscInt CV_zs
Definition variables.h:562
PetscReal J[3][3]
Definition variables.h:494
PetscReal R[3][3]
Definition variables.h:557
PetscReal F_y_real
Definition variables.h:542
PetscReal targetVolumetricFlux
Definition variables.h:1024
Vec * solutionConvergencePeriodicPRef
Definition variables.h:1209
PetscInt cell[3]
Definition variables.h:238
PetscReal Max_ybc
Definition variables.h:561
PetscReal xmax
Definition variables.h:572
PetscInt jj2
Definition variables.h:453
PetscReal * z_bp_o
Definition variables.h:489
PetscBool walltimeGuardActive
Definition variables.h:1110
SNES snespacker
Definition variables.h:780
Vec lIZet
Definition variables.h:1254
LESTestFilterKernel test_filter_kernel
Discrete test-filter stencil.
Definition variables.h:670
UserCtx * user_f
Definition variables.h:1270
PetscReal mom_last_lambda_max
Definition variables.h:974
Vec lNvert
Definition variables.h:1197
Vec DualPlaneCentroidJ
Definition variables.h:1251
PetscReal walltimeGuardWarmupTotalSeconds
Definition variables.h:1118
Cmpnts pmin
Definition variables.h:445
LESConfig les_config
Parameters of the LES closure selected by les.
Definition variables.h:1046
PetscInt CV_ys
Definition variables.h:562
PetscReal forceScalingFactor
Definition variables.h:1018
PetscReal pseudo_cfl_reduction_factor
Definition variables.h:966
SimCtx * simCtx
Back-pointer to the master simulation context.
Definition variables.h:1160
ParticleInitializationType
Enumerator to identify the particle initialization strategy.
Definition variables.h:746
@ PARTICLE_INIT_SURFACE_RANDOM
Random placement on the inlet face.
Definition variables.h:747
@ PARTICLE_INIT_POINT_SOURCE
All particles at a fixed (psrc_x,psrc_y,psrc_z) — for validation.
Definition variables.h:749
@ PARTICLE_INIT_VOLUME
Random volumetric distribution across the domain.
Definition variables.h:748
PetscReal zmin
Definition variables.h:572
PetscReal StartTime
Definition variables.h:932
PetscReal Mdpdn_x_old
Definition variables.h:551
ParticleLocationStatus
Defines the state of a particle with respect to its location and migration status during the iterativ...
Definition variables.h:186
@ LOST
The search failed for a particle believed to be inside the domain.
Definition variables.h:190
@ NEEDS_LOCATION
Definition variables.h:187
@ ACTIVE_AND_LOCATED
Definition variables.h:188
@ EXITED
The particle crossed a domain-boundary face whose particle policy removes it.
Definition variables.h:192
@ UNINITIALIZED
Definition variables.h:191
@ MIGRATING_OUT
Definition variables.h:189
PetscReal * st3
Definition variables.h:570
PetscReal * solutionConvergenceMeanSpeedHistory
Definition variables.h:985
PetscReal * z_midp
Definition variables.h:568
PetscReal FluxOutSum
Definition variables.h:1016
PetscReal * cent_x
Definition variables.h:492
PetscBool walltimeGuardHasEWMA
Definition variables.h:1120
PetscReal CMy_c
Definition variables.h:1001
PetscReal cs2
Definition variables.h:447
PetscInt jj1
Definition variables.h:453
PetscInt nTracePIDs
Number of entries in tracePIDs (at most PICURV_MAX_TRACED_PARTICLES).
Definition variables.h:1089
PetscReal cr22
Definition variables.h:449
PetscInt local_start[3]
Definition variables.h:875
Vec Centz
Definition variables.h:1252
PetscBool runtimeMemoryLogEnabled
Enable the rank-reduced runtime memory log (log_dir/Runtime_Memory.csv).
Definition variables.h:1123
Vec lPlaneCentroidK
Definition variables.h:1248
Vec lDualPlaneCentroidK
Definition variables.h:1251
char output_prefix[256]
Definition variables.h:808
PetscBool dimensionalize
Whether derived output leaves non-dimensional form, from global_operations.dimensionalize.
Definition variables.h:828
PetscInt n_P
Definition variables.h:528
Vec PlaneNormalK
Definition variables.h:1247
char ** bcs_files
Definition variables.h:1015
PetscReal * x_bp_o
Definition variables.h:489
Vec lDualPlaneNormalI
Definition variables.h:1250
struct BC_Param_s * next
Definition variables.h:375
PetscReal boundaryVelocityCorrection
Definition variables.h:1031
PetscReal max_angle
Definition variables.h:1000
PetscReal cr1
Definition variables.h:440
PetscReal Tow_wt
Definition variables.h:529
PetscReal acc[3]
Definition variables.h:556
PetscReal Min_X
Definition variables.h:1172
PetscInt64 wrapCount
Definition variables.h:298
PetscReal min_pseudo_cfl
Definition variables.h:967
PetscReal * head_ang
Definition variables.h:569
PetscInt64 boundaryClampCount
Definition variables.h:290
char * key
Definition variables.h:373
PetscBool valid
Set once a dynamic update has populated this state.
Definition variables.h:695
PetscInt * nv1
Definition variables.h:486
PetscInt ksc
Definition variables.h:1175
PetscInt particlesLostLastStep
Particles removed this step because their search failed.
Definition variables.h:1057
PetscReal Tow_wn
Definition variables.h:529
PetscInt KM
Definition variables.h:1171
Vec Distance
Definition variables.h:1259
PetscInt tiout
Definition variables.h:928
PetscReal xmin
Definition variables.h:572
char field_statistics_output_prefix[PETSC_MAX_PATH_LEN]
Analysis prefix for CSV summaries; VTK continues to use output_prefix.
Definition variables.h:826
UserMG usermg
Definition variables.h:1082
#define MAX_FIELD_LIST_LENGTH
Definition variables.h:784
PetscBool inflowFluctuationsRestored
That state was read from the restart checkpoint.
Definition variables.h:1044
PetscReal walltimeGuardMinSeconds
Definition variables.h:1113
char allowedFile[PETSC_MAX_PATH_LEN]
Definition variables.h:1083
PetscInt local_index
Definition variables.h:270
Vec * solutionConvergencePeriodicUcatRef
Definition variables.h:1208
ParticleBoundaryPolicy
What happens to a particle that crosses a domain-boundary face.
Definition variables.h:336
@ PARTICLE_BOUNDARY_REMOVE
The particle leaves the domain (EXITED) and is removed.
Definition variables.h:337
@ PARTICLE_BOUNDARY_REFLECT
The particle is mirrored about the face plane and stays.
Definition variables.h:338
@ PARTICLE_BOUNDARY_WRAP
Periodic faces: the particle re-enters through the paired face.
Definition variables.h:339
PetscInt da_procs_y
Definition variables.h:1013
PetscReal d_i
Definition variables.h:441
PetscReal L_ref
Definition variables.h:898
PetscInt Clsnbpt_j
Definition variables.h:530
PetscInt64 traversalStepsSum
Definition variables.h:285
Vec InflowFluctuation
Definition variables.h:1194
PetscReal cs1
Definition variables.h:447
PetscInt n_subit
Definition variables.h:567
PetscInt wall_yplus_excursions
Consecutive diagnostic samples with the first cell outside the selected law's valid y+ range.
Definition variables.h:1262
Vec lPlaneNormalK
Definition variables.h:1247
PetscBool mom_last_converged
Definition variables.h:971
BCHandlerType
Defines the specific computational "strategy" for a boundary handler.
Definition variables.h:343
@ BC_HANDLER_PERIODIC_GEOMETRIC
Definition variables.h:352
@ BC_HANDLER_PERIODIC_DRIVEN_INITIAL_FLUX
Definition variables.h:355
@ BC_HANDLER_INTERFACE_OVERSET
Definition variables.h:353
@ BC_HANDLER_PERIODIC_DRIVEN_CONSTANT_FLUX
Definition variables.h:354
@ BC_HANDLER_WALL_MOVING
Definition variables.h:346
@ BC_HANDLER_INLET_PRESCRIBED_VELOCITY
Definition variables.h:348
@ BC_HANDLER_WALL_NOSLIP
Definition variables.h:345
@ BC_HANDLER_OUTLET_CONSERVATION
Definition variables.h:350
@ BC_HANDLER_WALL_FREE_SLIP
Definition variables.h:347
@ BC_HANDLER_FARFIELD_NONREFLECTING
Definition variables.h:349
@ BC_HANDLER_OUTLET_PRESSURE
Definition variables.h:351
@ BC_HANDLER_UNDEFINED
Definition variables.h:344
PetscReal M_z_real
Definition variables.h:545
PetscReal friction_velocity_sq
Sum of u_tau^2, for the RMS.
Definition variables.h:709
PetscReal psrc_x
Definition variables.h:1002
PetscReal * ns_y
Definition variables.h:474
#define MAX_PIPELINE_LENGTH
Definition variables.h:783
PetscReal ren
Definition variables.h:965
PetscReal iem_constant
IEM mixing constant C_IEM in Omega = C_IEM Gamma / Delta^2 (default 2.0).
Definition variables.h:1006
PetscReal Mdpdn_y_old
Definition variables.h:551
PetscReal F_z
Definition variables.h:540
BCHandlerType handler_type
Definition variables.h:427
DM post_swarm
Definition variables.h:1280
Vec PlaneCentroidJ
Definition variables.h:1248
PetscReal * tau0
Definition variables.h:476
PetscReal M_z_rm3
Definition variables.h:547
Vec lUcont_rm1
Definition variables.h:1207
PetscInt layer
Index along the normal of the face's metric and flux.
Definition variables.h:418
PetscReal * y_bp0
Definition variables.h:488
PetscInt zm_cell
Definition variables.h:265
PetscInt normal
Logical axis of the face normal.
Definition variables.h:416
PetscInt solutionConvergenceSamplesRecorded
Definition variables.h:984
PetscReal M_y_real
Definition variables.h:545
SurfElmtInfo * elmtinfo
Definition variables.h:559
Cmpnts max_coords
Maximum x, y, z coordinates of the bounding box.
Definition variables.h:214
PetscInt zs_cell
Definition variables.h:264
PetscReal poissonSourceImbalance
Definition variables.h:1095
PetscReal ct33
Definition variables.h:457
PetscBool drivenFluxTargetLatched
Definition variables.h:1029
IBMVNodes * ibmv
Definition variables.h:1078
Cmpnts diffusivitygradient
Definition variables.h:245
PetscInt _this
Definition variables.h:1175
PetscReal uinr[101][1001]
Definition variables.h:1134
PetscReal L_o[3]
Definition variables.h:555
Vec lKEta
Definition variables.h:1256
char step_list_file[PETSC_MAX_PATH_LEN]
File listing the exact steps to process, one per line; empty uses the time controls.
Definition variables.h:802
PetscInt k1
Definition variables.h:439
PetscInt jj3
Definition variables.h:453
PetscInt * nv3
Definition variables.h:466
PetscInt64 searchPopulation
Definition variables.h:282
Cmpnts * uold
Definition variables.h:473
PetscInt reference[3]
Definition variables.h:844
char output_dir[PETSC_MAX_PATH_LEN]
Definition variables.h:940
PetscBool solutionConvergenceEnabled
Definition variables.h:980
PetscReal * solutionConvergenceMeanKEHistory
Definition variables.h:986
PetscInt kcell
Definition variables.h:531
PetscReal walltimeGuardLatestStepSeconds
Definition variables.h:1122
PetscReal dt
Definition variables.h:933
PetscReal ry
Definition variables.h:1176
PetscReal V
Definition variables.h:491
PetscReal * st1
Definition variables.h:570
PetscInt * connectivity
Definition variables.h:880
PetscInt occupiedCellCount
Definition variables.h:1068
LESClipMode
Selects the admissible range imposed on the dynamic model coefficient.
Definition variables.h:652
@ LES_CLIP_CLIP_NEGATIVE
Definition variables.h:654
@ LES_CLIP_CLAMP
Definition variables.h:653
@ LES_CLIP_NONE
Definition variables.h:655
PetscInt StepsToRun
Definition variables.h:927
char profilingTimestepMode[32]
Definition variables.h:1106
PetscReal y
Definition variables.h:167
const PetscReal * global_farfield_outflow_sum
Definition variables.h:384
PetscInt k_periodic
Definition variables.h:1010
PetscInt inletprofile
Definition variables.h:1009
PetscReal * cent_z
Definition variables.h:492
PetscInt * offsets
Definition variables.h:881
PetscInt k33
Definition variables.h:448
Vec Ucat_nodal
Definition variables.h:1282
RankNeighbors neighbors
Definition variables.h:1174
PetscReal bulkVelocityCorrection
Definition variables.h:1030
PetscReal * cent_z
Definition variables.h:475
PetscReal cdisy
Definition variables.h:965
PetscReal mom_atol
Definition variables.h:960
PetscReal Max_xbc
Definition variables.h:561
PetscReal * z_bp0
Definition variables.h:488
LESTestFilterKernel
Selects the discrete test-filter kernel used by the dynamic procedure.
Definition variables.h:626
@ LES_TEST_FILTER_SIMPSON_IK
Definition variables.h:628
@ LES_TEST_FILTER_VOLUME_WEIGHTED_BOX
Definition variables.h:627
PetscInt k3
Definition variables.h:439
Vec lPlaneCentroidI
Definition variables.h:1248
static PetscBool ParticlesEnabled(const SimCtx *simCtx)
Whether the run carries particles: a seeded or restored population, or inlets that inject them.
Definition variables.h:1143
PetscReal cr11
Definition variables.h:449
WallFunctionModel
Selects the wall model applied on WALL faces.
Definition variables.h:600
@ WALL_FUNCTION_CABOT
Definition variables.h:604
@ WALL_FUNCTION_LOG_LAW
Definition variables.h:602
@ WALL_FUNCTION_WERNER
Definition variables.h:603
@ WALL_FUNCTION_NONE
Definition variables.h:601
PetscInt jj22
Definition variables.h:456
PetscInt timeStep
Definition variables.h:800
PetscInt currentSettlementPass
Definition variables.h:299
PetscInt np
Definition variables.h:1049
PetscReal cs22
Definition variables.h:452
Vec PostScalarNodal
Definition variables.h:1219
PetscBool fieldStatisticsEnabled
Definition variables.h:988
PetscInt jsc
Definition variables.h:1175
PetscReal x_bp_in[101][3270]
Definition variables.h:472
PetscReal max_cs
Ceiling on Cs under LES_CLIP_CLAMP.
Definition variables.h:675
PetscInt smode
Definition variables.h:455
LESClipMode clip_mode
Admissible range for the coefficient.
Definition variables.h:674
Cmpnts * qvec
Definition variables.h:478
PetscReal Max_Y
Definition variables.h:1172
PetscInt thislevel
Definition variables.h:769
PetscReal y_min
Definition variables.h:477
PetscBool no_pseudo_cfl_backtrack
Definition variables.h:969
PetscReal C_IEM
Definition variables.h:1074
Vec DiffusivityGradient
Definition variables.h:1201
Vec lJCsi
Definition variables.h:1255
char * value
Definition variables.h:374
PetscReal * x_com
Definition variables.h:569
PetscInt ccc
Definition variables.h:1037
PetscReal * CCp
Definition variables.h:471
PetscBool skipFinalCheckpoint
io.write_final_checkpoint false: no end-of-run bundle.
Definition variables.h:930
BCFace face_id
Definition variables.h:381
PetscReal q_r[4]
Definition variables.h:557
PetscReal M_y_rm2
Definition variables.h:546
PetscReal ratio
Definition variables.h:1038
#define MAX_FILENAME_LENGTH
Definition variables.h:785
PetscInt Node
Definition variables.h:499
PetscInt64 searchExitedCount
Definition variables.h:294
LESDiagnosticsState les_diagnostics
Pre-clipping statistics from the last dynamic update.
Definition variables.h:1260
PetscReal d_ss
Definition variables.h:458
PetscInt kk2
Definition variables.h:453
Vec PlaneNormalJ
Definition variables.h:1247
Vec Ucont
Definition variables.h:1197
PetscInt RankCellInfoProcs[3]
DMDA process grid (m, n, p) of RankCellInfoMap: rank i + m (j + n k).
Definition variables.h:1275
PetscInt thislevel
Definition variables.h:776
PetscReal * z_bp
Definition variables.h:487
PetscInt StartStep
Definition variables.h:926
PetscReal Mdpdn_z_old
Definition variables.h:551
PetscReal red_vel
Definition variables.h:539
Cmpnts min_coords
Minimum x, y, z coordinates of the bounding box.
Definition variables.h:213
PetscBool OnlySetup
Definition variables.h:934
PetscInt rotatefsi
Refused at setup: immersed boundaries and moving bodies are not implemented.
Definition variables.h:950
PetscReal F_y_old
Definition variables.h:541
Vec lDualPlaneNormalJ
Definition variables.h:1250
PetscInt cell
Definition variables.h:446
PetscReal M_y_rm3
Definition variables.h:547
Vec PostScalar
Definition variables.h:1219
Vec Ubcs
Physical Cartesian velocity at boundary faces. Full 3D array but only boundary-face entries are meani...
Definition variables.h:172
PetscReal * pres
Definition variables.h:476
MomentumSolverType
Enumerator to identify the implemented momentum solver strategies.
Definition variables.h:729
@ MOMENTUM_SOLVER_DUALTIME_PICARD_JAMESON_RK
Definition variables.h:731
@ MOMENTUM_SOLVER_EXPLICIT_RK
Definition variables.h:730
@ MOMENTUM_SOLVER_NEWTON_KRYLOV
Definition variables.h:732
@ MOMENTUM_SOLVER_DUALTIME_PICARD_RK4
Definition variables.h:734
PetscInt friction_velocity_max_at[4]
Wall face (BCFace) and global cell i, j, k of friction_velocity_max.
Definition variables.h:715
PetscInt solutionConvergencePeriodSteps
Definition variables.h:982
PetscReal cdisz
Definition variables.h:965
Vec Qcrit
Definition variables.h:1283
PetscInt jcell
Definition variables.h:531
PetscReal S_realm1[6]
Definition variables.h:537
PetscReal * nt_x
Definition variables.h:474
PetscReal * y_bp_o
Definition variables.h:489
PetscScalar x
Definition variables.h:145
Cmpnts loc
Definition variables.h:239
PetscReal wall_distance_sum
Sum of the first-cell wall distance.
Definition variables.h:712
PetscReal y_max
Definition variables.h:477
Vec PlaneNormalI
Definition variables.h:1247
PetscReal ct11
Definition variables.h:457
PetscReal x_c
Definition variables.h:493
PetscReal x_max
Definition variables.h:477
Vec CellScalarAtCorner
Definition variables.h:1212
PetscBool averaging_direction[3]
Averaged-over logical directions (xi, eta, zeta).
Definition variables.h:673
PetscReal wale_coefficient
Model constant C_w for WALE (Nicoud & Ducros 1999).
Definition variables.h:668
PetscInt64 reSearchCount
Definition variables.h:286
PetscReal dS[6]
Definition variables.h:558
PetscReal size
Mean edge length (GetCellCharacteristicSize()); 0 where unused.
Definition variables.h:232
char * current_io_directory
Definition variables.h:944
PetscReal MaxDiv
Definition variables.h:1096
PetscMPIInt destination_rank
Definition variables.h:243
struct PicurvExpression * expression
Compiled expression, or NULL when the field is not configured.
Definition variables.h:276
Vec Centx
Definition variables.h:1252
PetscReal x
Definition variables.h:167
UserCtx * user
Definition variables.h:380
PetscReal atk
Definition variables.h:558
char grid_file[PETSC_MAX_PATH_LEN]
Definition variables.h:1012
PetscReal * y_bp0
Definition variables.h:469
PetscReal * x_bp0
Definition variables.h:488
Vec lParticleCount
Definition variables.h:1276
Vec lPlaneCentroidJ
Definition variables.h:1248
PetscInt FoundAroundcell
Definition variables.h:532
PetscInt invicid
Definition variables.h:951
char ** allowedFuncs
Definition variables.h:1085
PetscInt xm_cell
Definition variables.h:265
PetscReal particlesExitedScalarLastStep
Sum of Psi over the particles that left the domain this step.
Definition variables.h:1062
char statistics_pipeline[1024]
e.g.
Definition variables.h:815
struct IBMListNode * next
Definition variables.h:517
Vec lUcont_o
Definition variables.h:1204
PetscInt * nv4
Definition variables.h:486
PetscInt64 bboxGuessFallbackCount
Definition variables.h:292
InterpolationMethod interpolationMethod
Definition variables.h:1055
PetscReal * nf_x
Definition variables.h:467
PetscReal friction_velocity_min
Smallest u_tau this rank corrected.
Definition variables.h:710
RankCellInfo * RankCellInfoMap
Definition variables.h:1274
PetscReal ymin
Definition variables.h:572
PetscReal limited_volume
Fluid volume whose coefficient the clip modified.
Definition variables.h:693
PetscReal psrc_z
Point source location for PARTICLE_INIT_POINT_SOURCE.
Definition variables.h:1002
PetscReal fluid_volume
Total fluid volume sampled.
Definition variables.h:694
const PetscReal * global_inflow_sum
Definition variables.h:382
PetscReal S_ang_r[6]
Definition variables.h:538
VTKFileType fileType
Definition variables.h:872
PetscReal * nt_y
Definition variables.h:474
Vec CellVectorAtCorner
Definition variables.h:1213
PetscReal * ns_z
Definition variables.h:474
PetscInt * nv3
Definition variables.h:486
PetscInt mg_poItr
Definition variables.h:961
PetscReal Min_ybc
Definition variables.h:561
PetscInt pbc[3]
Definition variables.h:553
char field_statistics_formats[1024]
Comma-separated formats: vtk for derived fields, csv for the convergence history.
Definition variables.h:824
PetscInt ym_cell
Definition variables.h:265
PetscReal max_pseudo_cfl
Definition variables.h:967
PetscReal S_real[6]
Definition variables.h:537
PetscReal S_new[6]
Definition variables.h:537
PetscInt nk
Definition variables.h:443
Vec Ucat_o
Definition variables.h:1204
char output_fields_instantaneous[1024]
Definition variables.h:807
VerificationFieldConfig verificationDiffusivity
Definition variables.h:996
PetscInt MaxDivx
Definition variables.h:1097
PetscReal L_n[3]
Definition variables.h:555
UserCtx * user_c
Definition variables.h:1270
PetscInt j33
Definition variables.h:448
PetscInt jj33
Definition variables.h:456
PetscReal * nf_y
Definition variables.h:467
PetscInt poisson
Definition variables.h:962
PetscInt * nv1
Definition variables.h:466
Cmpnts * u
Definition variables.h:473
PetscInt mom_unconverged_streak
Definition variables.h:973
PetscScalar * data
Definition variables.h:855
PetscInt iimode
Definition variables.h:451
char profilingSelectedFuncsFile[PETSC_MAX_PATH_LEN]
Definition variables.h:1099
PetscInt MaxDivy
Definition variables.h:1097
ParticleLocationStatus location_status
Definition variables.h:242
char analysis_dir[PETSC_MAX_PATH_LEN]
Definition variables.h:942
uint64_t runCsvWritten[256]
Rank 0 only: path hashes of the CSV records this run has opened (see PicurvOpenRunCsv()).
Definition variables.h:1124
char particleRestartMode[16]
Definition variables.h:1056
PetscReal dS_o[6]
Definition variables.h:558
PetscReal * cent_x
Definition variables.h:475
char eulerianExt[8]
Definition variables.h:840
Vec DualPlaneNormalK
Definition variables.h:1250
PetscReal F_x_real
Definition variables.h:542
PetscInt Need3rdPoint
Definition variables.h:532
PetscInt64 bboxGuessSuccessCount
Definition variables.h:291
Vec DualPlaneCentroidK
Definition variables.h:1251
PetscInt MaxDivz
Definition variables.h:1097
PetscInt Clsnbpt_k
Definition variables.h:530
PetscReal damp
Definition variables.h:539
BoundingBox * bboxlist
Definition variables.h:1053
Vec lKZet
Definition variables.h:1256
struct PicurvWindow * fieldStatisticsWindows
Definition variables.h:990
PetscReal * x_midp
Definition variables.h:568
PetscReal * cfsum
Definition variables.h:471
PetscReal Max_zbc
Definition variables.h:561
PetscInt n_elmt
Definition variables.h:465
char log_dir[PETSC_MAX_PATH_LEN]
Definition variables.h:941
PetscReal Mdpdn_x
Definition variables.h:550
PetscInt MaxDivFlatArg
Definition variables.h:1097
Vec lNu_t
Definition variables.h:1259
PetscReal FluxInSum
Definition variables.h:1016
PetscReal friction_velocity_max
Largest u_tau this rank corrected.
Definition variables.h:711
PetscReal * s3
Definition variables.h:570
PetscReal contraction_lm
Volume-weighted sum of L_ij M_ij over fluid cells.
Definition variables.h:690
PetscInt walltimeGuardCompletedSteps
Definition variables.h:1117
PetscInt64 maxParticlePassDepth
Definition variables.h:293
PetscReal rz
Definition variables.h:1176
char source_dir[PETSC_MAX_PATH_LEN]
Definition variables.h:795
PetscReal d_ii
Definition variables.h:450
Vec lCellScalarAtCorner
Definition variables.h:1212
PetscReal * ns_x
Definition variables.h:474
PetscReal z_c
Definition variables.h:493
Vec lDualPlaneCentroidI
Definition variables.h:1251
Vec lJEta
Definition variables.h:1255
PetscInt j1
Definition variables.h:439
PetscReal M_z_rm2
Definition variables.h:546
PetscInt les_gradient_model
Add the Clark gradient (tensor-diffusivity) term to the viscous flux.
Definition variables.h:1045
Vec lDualPlaneNormalK
Definition variables.h:1250
PetscReal CMz_c
Definition variables.h:1001
Vec DualPlaneNormalI
Definition variables.h:1250
PetscInt64 maxTraversalSteps
Definition variables.h:287
ParticleBoundaryPolicy particle_policy
What a particle crossing this face becomes (BC param particle_policy).
Definition variables.h:428
PetscBool generate_grid
Definition variables.h:1011
PetscInt64 particlesLostCumulative
Definition variables.h:1058
PetscInt thislevel
Definition variables.h:1269
char particle_pipeline[1024]
Definition variables.h:809
PetscInt * nv2
Definition variables.h:466
BC_Param * params
Definition variables.h:429
char eulerianSource[PETSC_MAX_PATH_LEN]
Definition variables.h:938
PetscReal * nf_z
Definition variables.h:467
PetscReal imp_stol
Definition variables.h:960
PetscReal cr2
Definition variables.h:440
PetscInt nAllowed
Definition variables.h:1086
PetscBool walltimeGuardEnabled
Definition variables.h:1109
PetscBool checkpointGeometryHashReady
Definition variables.h:946
PetscReal y_plus_sum
Sum of u_tau * y / nu over corrected cells.
Definition variables.h:713
PetscReal z_max
Definition variables.h:477
PetscReal wall_roughness_height
Definition variables.h:1004
PetscBool useProfilingSelectedFuncsCfg
Definition variables.h:1100
PetscReal friction_velocity_sum
Sum of u_tau over corrected cells.
Definition variables.h:708
PetscInt walltimeGuardWarmupSteps
Definition variables.h:1111
ParticleInitializationType ParticleInitialization
Definition variables.h:1054
PetscReal mom_dt_jameson_residual_norm_noise_allowance_factor
Definition variables.h:968
PetscScalar z
Definition variables.h:145
Vec pUcont
Definition variables.h:1207
InterpolationMethod
Selects the grid-to-particle interpolation method.
Definition variables.h:760
@ INTERP_CORNER_AVERAGED
Definition variables.h:762
@ INTERP_FACE_FLUX
Definition variables.h:763
@ INTERP_TRILINEAR
Definition variables.h:761
Vec lKCsi
Definition variables.h:1256
PetscReal ct3
Definition variables.h:454
Vec ParticleCount
Definition variables.h:1276
PetscReal * z_bp0
Definition variables.h:469
Vec lDualPlaneCentroidJ
Definition variables.h:1251
IBMInfo ibm_intp
Definition variables.h:516
PetscReal S_ang_n[6]
Definition variables.h:538
ScalingCtx scaling
Definition variables.h:1003
PetscBool ksc
Definition variables.h:777
PetscInt diagnostics_cadence
Steps between diagnostic rows.
Definition variables.h:679
IBMInfo * fsi_intp
Definition variables.h:560
Vec Ucont_o
Definition variables.h:1204
struct node * next
Definition variables.h:500
PetscReal min_viscosity_ratio
Enforce nu + nu_t >= ratio * nu.
Definition variables.h:676
#define PICURV_RUN_CSV_CAPACITY
Most distinct CSV records one run opens through PicurvOpenRunCsv(): about twenty, plus a few per bloc...
Definition variables.h:75
PetscInt index
Definition variables.h:510
PetscReal particlesPerCellMean
Particles counted in cells divided by the cell count.
Definition variables.h:1071
PetscReal ct2
Definition variables.h:454
PetscInt JM
Definition variables.h:1171
PetscReal M_x_old
Definition variables.h:544
Vec lCenty
Definition variables.h:1253
PetscInt wallfunction
Enable wall functions on WALL faces.
Definition variables.h:1042
PetscInt drivingForceStep
Definition variables.h:1023
PetscInt da_procs[3]
Postprocessor MPI decomposition (i, j, k) from the recipe; PETSC_DECIDE where unset.
Definition variables.h:845
PetscInt ii11
Definition variables.h:456
PetscInt kk1
Definition variables.h:453
struct list List
Head of a generic C-style linked list.
PetscReal Flux_in
Definition variables.h:1000
PetscReal x_min
Definition variables.h:477
Vec PostVectorNodal
Definition variables.h:1220
char name[64]
Definition variables.h:853
LESAveragingMode
Selects the set over which the Germano contractions are averaged.
Definition variables.h:639
@ LES_AVERAGING_LOCAL
Definition variables.h:640
@ LES_AVERAGING_GLOBAL
Definition variables.h:642
@ LES_AVERAGING_HOMOGENEOUS
Definition variables.h:641
PetscReal I_inv[3][3]
Definition variables.h:554
PetscReal drivenFluxMeasured
Definition variables.h:1035
PetscInt y_plus_max_at[4]
Wall face (BCFace) and global cell i, j, k of y_plus_max.
Definition variables.h:716
PetscInt k2
Definition variables.h:439
PetscBool runtimeMemoryLogHasPrevious
True after the first process-memory sample.
Definition variables.h:1126
PetscReal L_r[3]
Definition variables.h:555
PetscScalar * coords
Definition variables.h:877
struct MomentumNewtonKrylovContext * momentumNewtonKrylov
Definition variables.h:1235
PetscInt mglevels
Definition variables.h:775
char ** profilingSelectedFuncs
Definition variables.h:1101
PetscReal F_z_real
Definition variables.h:542
PetscBool * field_statistics_ensemble_from_particles
Whether each ensemble samples the particles in a cell rather than the cell's state.
Definition variables.h:837
PetscReal cdisx
Definition variables.h:965
PetscReal F_x_old
Definition variables.h:541
Vec DualPlaneNormalJ
Definition variables.h:1250
PetscReal Min_Z
Definition variables.h:1172
const PetscReal * global_farfield_inflow_sum
Definition variables.h:383
PetscInt mglevels
Definition variables.h:961
PetscBool diagnostics_enabled
Append per-step coefficient statistics to the run log directory.
Definition variables.h:678
DM packer
Definition variables.h:770
PetscReal constant_cs
Fixed Cs for CONSTANT_SMAGORINSKY; unused by the dynamic model.
Definition variables.h:666
PetscInt num_bcs_files
Definition variables.h:1014
Vec lWall_Stress
Definition variables.h:1193
PetscReal q[4]
Definition variables.h:557
PetscInt cells
Number of cells this rank corrected.
Definition variables.h:718
PetscInt64 particlesExitedCumulative
Definition variables.h:1061
DM dm_swarm
Definition variables.h:1052
PetscBool useCfg
Definition variables.h:1084
Vec Friction_Velocity
Definition variables.h:1189
PetscReal psrc_y
Definition variables.h:1002
PetscInt solutionConvergenceWindowSteps
Definition variables.h:983
PetscInt central
Definition variables.h:963
char process_pipeline[1024]
Definition variables.h:806
PetscInt n[2]
Owned elements along a and b; 0 when this rank does not serve the face.
Definition variables.h:420
PetscInt particlesExitedLastStep
Particles removed this step because they left the domain.
Definition variables.h:1060
PetscInt particle_output_freq
Definition variables.h:812
PetscReal Fluxsum
Definition variables.h:1016
PetscReal ct1
Definition variables.h:454
Vec lJZet
Definition variables.h:1255
Vec Nvert_o
Definition variables.h:1204
PetscReal test_filter_width_ratio
Test-to-grid ratio per filtered direction; alpha is its square for the box, ratio^(4/3) for Simpson.
Definition variables.h:671
PetscReal xx
Definition variables.h:162
PetscReal a_c[3]
Definition variables.h:549
char particle_fields[1024]
Definition variables.h:810
PetscReal pseudo_cfl_growth_factor
Definition variables.h:966
PetscBool outputParticles
Definition variables.h:803
PetscReal S_old[6]
Definition variables.h:537
PetscReal y_plus_max
Largest first-cell y+ this rank corrected.
Definition variables.h:714
PetscInt mom_max_unconverged_steps
Definition variables.h:972
VTKFieldInfo point_data_fields[20]
Definition variables.h:878
PetscInt nProfilingSelectedFuncs
Definition variables.h:1102
PetscInt i33
Definition variables.h:448
PetscInt degenerate
Bit f set when face f's normal magnitude is below 1e-12.
Definition variables.h:231
Vec lCoor
Definition variables.h:1243
Vec lCellVectorAtCorner
Definition variables.h:1213
PetscInt particlesMigratedLastStep
Definition variables.h:1067
PetscReal S_ang_rm1[6]
Definition variables.h:538
PetscReal Mdpdn_y
Definition variables.h:550
PetscReal * z_bp
Definition variables.h:468
PetscReal M_y_old
Definition variables.h:544
PetscInt particleRandomSeed
Base seed for every particle RNG stream (-particle_random_seed).
Definition variables.h:1050
PetscInt n_time
Definition variables.h:567
char initialConditionDirectory[PETSC_MAX_PATH_LEN]
Definition variables.h:979
PetscReal * st2
Definition variables.h:570
PetscInt Clsnbpt_i
Definition variables.h:530
LESAveragingMode averaging_mode
Averaging set for the Germano contractions.
Definition variables.h:672
PetscInt64 * tracePIDs
Sorted, distinct IDs of the particles whose every stage is reported (-picurv_trace_particles); NULL w...
Definition variables.h:1088
PetscReal cs33
Definition variables.h:452
struct PicurvWindowStorage * fieldStatisticsStorage
Definition variables.h:1222
PetscScalar y
Definition variables.h:150
Vec Psi_nodal
Definition variables.h:1285
PetscInt da_procs_x
Definition variables.h:1013
PetscInt field_statistics_ensemble_count
Recipe-defined single-instant windows, derived at every processed step.
Definition variables.h:834
Vec lPostVector
Definition variables.h:1220
PetscReal walltimeGuardWarmupAverageSeconds
Definition variables.h:1119
PetscInt sourceRandomSeed
Seed of the draws in velocity and pressure sources (-source_random_seed).
Definition variables.h:1051
PetscReal Max_X
Definition variables.h:1172
PetscInt particleConsoleOutputFreq
Definition variables.h:931
Vec lCentx
Definition variables.h:1253
PetscBool initialConditionStaged
Definition variables.h:977
Vec Ucont_rm1
Definition variables.h:1207
SearchMetricsState searchMetrics
Definition variables.h:1073
PetscReal zmax
Definition variables.h:572
PetscReal Min_Y
Definition variables.h:1172
PetscInt i_periodic
Definition variables.h:1010
PetscReal diffusivity
Definition variables.h:244
PetscBool skipInitialCheckpoint
io.write_initial_checkpoint false: no initial/branch_start bundle.
Definition variables.h:929
PetscReal mom_resid_rtol
Definition variables.h:960
char checkpointGeometrySHA256[65]
Definition variables.h:945
Vec lUcont
Definition variables.h:1197
PetscReal runtimeMemoryLogPreviousProcessMB
Previous local process memory sample in MB.
Definition variables.h:1127
PetscBool jsc
Definition variables.h:777
PetscInt step
Definition variables.h:924
Vec Diffusivity
Definition variables.h:1200
PetscReal * Bvel_u
Definition variables.h:476
PetscReal M_y
Definition variables.h:543
PetscReal Mdpdn_z
Definition variables.h:550
PetscReal psi
Definition variables.h:246
PetscReal walltimeGuardEWMASeconds
Definition variables.h:1121
PetscReal AreaOutSum
Definition variables.h:1036
PetscReal * x_bp
Definition variables.h:468
PetscReal vreman_coefficient
Model constant c for VREMAN (Vreman 2004: 2.5 Cs^2).
Definition variables.h:667
PetscInt mom_max_pseudo_steps
Definition variables.h:959
PetscReal r[101]
Definition variables.h:1134
IBMNodes * ibm
Definition variables.h:1266
Vec lICsi
Definition variables.h:1254
PetscReal drivenFluxArea
Definition variables.h:1035
PetscInt GridOrientation
Definition variables.h:1175
PetscInt mz
Definition variables.h:873
DMDALocalInfo info
Definition variables.h:1169
Vec dUcont
Definition variables.h:1207
PetscInt ni
Definition variables.h:443
BCPriorityType
Definition variables.h:359
@ BC_PRIORITY_OUTLET
Definition variables.h:364
@ BC_PRIORITY_FARFIELD
Definition variables.h:362
@ BC_PRIORITY_UNDEFINED
Definition variables.h:360
@ BC_PRIORITY_WALL
Definition variables.h:363
@ BC_PRIORITY_INLET
Definition variables.h:361
Vec lUcat
Definition variables.h:1197
PetscMPIInt rank[27]
Definition variables.h:259
PostProcessParams * pps
Definition variables.h:1131
PetscInt ii3
Definition variables.h:453
PetscInt migrationPassesLastStep
Definition variables.h:1066
PetscScalar y
Definition variables.h:145
InitialConditionField
Selects the authoritative velocity representation in a staged file IC.
Definition variables.h:201
@ IC_FIELD_UCONT
Definition variables.h:203
@ IC_FIELD_UCAT
Definition variables.h:202
PetscInt ii2
Definition variables.h:453
Vec lPlaneNormalI
Definition variables.h:1247
PetscMPIInt size
Definition variables.h:920
PetscInt kk3
Definition variables.h:453
PetscScalar x
Definition variables.h:150
PetscReal Tow_ws
Definition variables.h:529
ExecutionMode
Defines the execution mode of the application.
Definition variables.h:887
@ EXEC_MODE_UNKNOWN
Definition variables.h:891
@ EXEC_MODE_SOLVER
Definition variables.h:888
@ EXEC_MODE_POSTPROCESSOR
Definition variables.h:889
@ EXEC_MODE_RESTART_CHECK
Definition variables.h:890
PetscInt IM
Definition variables.h:1171
PetscInt * nv2
Definition variables.h:486
char _io_context_buffer[PETSC_MAX_PATH_LEN]
Definition variables.h:943
PetscInt j22
Definition variables.h:448
PetscInt field_statistics_source_step
Committed step supplying the state; negative means the step being processed.
Definition variables.h:830
PetscReal walltimeGuardLimitSeconds
Definition variables.h:1116
Cmpnts periodic_translation[3]
Definition variables.h:1178
Cmpnts weights
Definition variables.h:241
Face
Enumerates the six faces of a cubic cell for distance calculations.
Definition variables.h:196
@ TOP
Definition variables.h:197
@ FRONT
Definition variables.h:197
@ BOTTOM
Definition variables.h:197
@ BACK
Definition variables.h:197
@ LEFT
Definition variables.h:197
@ NUM_FACES
Definition variables.h:197
@ RIGHT
Definition variables.h:197
PetscReal M_x_real
Definition variables.h:545
Vec SearchCellSize
Definition variables.h:1249
Vec DualPlaneCentroidI
Definition variables.h:1251
char particleExt[8]
Definition variables.h:841
Vec PostVector
Definition variables.h:1220
PetscReal * y_bp
Definition variables.h:468
PetscInt kk33
Definition variables.h:456
PetscReal A_tot
Definition variables.h:540
PetscBool ps_ksp_pic_monitor_true_residual
Definition variables.h:976
PetscBool profilingAllHelpers
-profiling_helpers all: every helper timer is enabled.
Definition variables.h:1105
Cmpnts * uold
Definition variables.h:490
PetscInt n_v
Definition variables.h:485
PetscReal walltimeGuardEstimatorAlpha
Definition variables.h:1114
PetscInt kk11
Definition variables.h:456
PetscInt les
Active LES closure; an LESModelType value.
Definition variables.h:1041
PetscBool isc
Definition variables.h:777
char field_statistics_windows[1024]
Comma-separated window names to derive; empty disables the pipeline.
Definition variables.h:820
char field_statistics_outputs[1024]
Comma-separated outputs: mean, reynolds_stress, rms, tke, flux, point_variance.
Definition variables.h:822
Vec lQcrit
Cell-centred Q-criterion and its ghosted copy for nodal averaging.
Definition variables.h:1283
PetscReal cs3
Definition variables.h:447
Vec Nvert
Definition variables.h:1197
MGCtx * mgctx
Definition variables.h:778
struct list_node Node_List
A generic C-style linked list node for indices.
SolutionConvergenceMode
Selects the runtime solution-convergence diagnostics mode.
Definition variables.h:738
@ SOLUTION_CONVERGENCE_TRANSIENT
Definition variables.h:742
@ SOLUTION_CONVERGENCE_PERIODIC_DETERMINISTIC
Definition variables.h:740
@ SOLUTION_CONVERGENCE_STATISTICAL_STEADY
Definition variables.h:741
@ SOLUTION_CONVERGENCE_STEADY_DETERMINISTIC
Definition variables.h:739
PetscBool periodic_translation_valid[3]
Definition variables.h:1179
Vec lPlaneNormalJ
Definition variables.h:1247
PetscInt mg_preItr
Definition variables.h:961
Vec lDiffusivity
Definition variables.h:1200
Vec lNvert_o
Definition variables.h:1204
PetscReal mom_ratio_ema_alpha
Definition variables.h:970
BCType mathematical_type
Definition variables.h:426
PetscReal * s1
Definition variables.h:570
Vec Centy
Definition variables.h:1252
SolutionConvergenceMode solutionConvergenceMode
Definition variables.h:981
PetscReal P_ref
Definition variables.h:901
Cmpnts * u
Definition variables.h:490
PetscReal rx
Definition variables.h:1176
PetscReal Power
Definition variables.h:552
PetscViewer logviewer
Definition variables.h:936
PetscReal * z_bp_o
Definition variables.h:470
PetscReal yz
Definition variables.h:162
char ** profilingHelpers
Helper functions whose timers are enabled (-profiling_helpers).
Definition variables.h:1103
PetscReal * dV0
Definition variables.h:491
Vec lCentz
Definition variables.h:1253
PetscReal Min_xbc
Definition variables.h:561
PetscInt n_midp
Definition variables.h:567
PetscReal particlesLostScalarLastStep
Sum of Psi over the particles removed this step as LOST.
Definition variables.h:1059
PetscReal * Bvel_w
Definition variables.h:476
PetscReal alpha[3]
Definition variables.h:556
PetscInt64 searchAttempts
Definition variables.h:281
InitialConditionField initialConditionField
Definition variables.h:978
ExecutionMode exec_mode
Definition variables.h:937
FacePlane face[NUM_FACES]
Face planes in LEFT..BACK order.
Definition variables.h:230
PetscReal ct22
Definition variables.h:457
PetscInt startTime
Definition variables.h:798
PetscReal zz
Definition variables.h:162
PetscReal rho_ref
Definition variables.h:900
PetscInt64 reflectionFallbackCount
Definition variables.h:297
PetscInt nj
Definition variables.h:443
PetscInt64 tieBreakCount
Definition variables.h:289
PetscReal mom_resid_atol
Definition variables.h:960
PetscBool wall_yplus_max_reported
The local y+ maximum has already been reported above the law's range.
Definition variables.h:1263
Vec lInflowFluctuation
Inlet fluctuation filter state in the inlet faces' dummy planes.
Definition variables.h:1194
PetscReal backscatter_volume
Fluid volume whose raw coefficient was negative.
Definition variables.h:692
BoundingBox bbox
Definition variables.h:1173
PetscBool restartHistoryAvailable
Definition variables.h:947
PetscInt my
Definition variables.h:873
PetscBool field_statistics_homogeneous[3]
Directions profiles merge over, in (i, j, k) order; none selected writes no profile.
Definition variables.h:832
PetscReal ti
Definition variables.h:925
PetscReal walltimeGuardMultiplier
Definition variables.h:1112
PetscReal cr3
Definition variables.h:440
PetscReal Max_Z
Definition variables.h:1172
PetscInt rotateframe
moveframe/rotateframe are refused at setup.
Definition variables.h:951
PetscInt64 PID
Definition variables.h:237
PetscReal U_ref
Definition variables.h:899
IBMNodes * ibm
Definition variables.h:1077
PetscReal * x_bp
Definition variables.h:487
PetscReal AreaInSum
Definition variables.h:1036
PetscInt mx
Definition variables.h:873
PetscInt k11
Definition variables.h:448
MomentumSolverType mom_solver_type
Definition variables.h:958
PetscInt64 blockedWalkRetryCount
Definition variables.h:295
IBMListNode * head
Definition variables.h:522
PetscReal ymax
Definition variables.h:572
PetscInt immersed
Definition variables.h:950
PetscReal * x_bp0
Definition variables.h:469
PetscInt64 maxTraversalFailCount
Definition variables.h:288
char PostprocessingControlFile[PETSC_MAX_PATH_LEN]
Definition variables.h:1130
char restart_dir[PETSC_MAX_PATH_LEN]
Definition variables.h:939
node * head
Definition variables.h:505
PetscInt lo[2]
First owned indices along a and b.
Definition variables.h:419
PetscReal * y_bp_o
Definition variables.h:470
PetscReal y_c
Definition variables.h:548
PetscInt b
The two tangential axes, a < b.
Definition variables.h:417
PetscReal Min_zbc
Definition variables.h:561
PetscReal z_min
Definition variables.h:477
PetscReal walltimeGuardJobStartEpochSeconds
Definition variables.h:1115
PetscReal pseudo_cfl
Definition variables.h:965
PetscReal x_c
Definition variables.h:548
PetscReal * nt_z
Definition variables.h:474
PetscInt nProfilingHelpers
Definition variables.h:1104
PetscReal M_z_old
Definition variables.h:544
#define MAX_VTK_FIELD_NAME_LENGTH
Maximum length for VTK field names.
Definition variables.h:788
PetscReal cs11
Definition variables.h:452
LESFilterWidthModel
Selects how a cell's grid filter width is derived from its metrics.
Definition variables.h:614
@ LES_FILTER_WIDTH_SCOTTI
Definition variables.h:618
@ LES_FILTER_WIDTH_GEOMETRIC_MEAN
Definition variables.h:616
@ LES_FILTER_WIDTH_CUBE_ROOT_VOLUME
Definition variables.h:615
@ LES_FILTER_WIDTH_MAX_EDGE
Definition variables.h:617
PetscInt LoggingFrequency
Definition variables.h:1087
PetscReal z_c
Definition variables.h:548
PetscReal xz
Definition variables.h:162
VerificationFieldConfig verificationScalar
Definition variables.h:997
Cmpnts vertices[8]
Coordinates of the eight vertices of the cell.
Definition variables.h:219
PetscInt ii33
Definition variables.h:456
PetscReal F_y
Definition variables.h:540
PetscReal CMx_c
Definition variables.h:1001
PetscReal drivingForceMagnitude
Definition variables.h:1018
struct ParticleInlet * particleInlets
Inlet faces that inject particles, or NULL.
Definition variables.h:1064
PetscInt CV_ze
Definition variables.h:562
PetscReal atk_o
Definition variables.h:558
PetscReal lastStepWallSeconds
Slowest rank's wall time of the last completed step (0 before one).
Definition variables.h:1128
PetscReal particleLoadImbalance
Definition variables.h:1072
Cmpnts * urm1
Definition variables.h:473
PetscInt i2
Definition variables.h:439
PetscReal M_x
Definition variables.h:543
PetscReal * tauN
Definition variables.h:476
struct ParticleFieldPlan * particleFieldPlan
Configured initial particle-field values, or NULL.
Definition variables.h:1063
PetscBool fieldStatisticsContinue
Definition variables.h:995
PetscReal xy
Definition variables.h:162
Vec Uch
Characteristic velocity for boundary conditions.
Definition variables.h:173
PetscInt runCsvWrittenCount
Entries of runCsvWritten in use.
Definition variables.h:1125
BCFace
Identifies the six logical faces of a structured computational block.
Definition variables.h:308
@ BC_FACE_NEG_X
Definition variables.h:309
@ BC_FACE_POS_Z
Definition variables.h:311
@ BC_FACE_POS_Y
Definition variables.h:310
@ BC_FACE_NEG_Z
Definition variables.h:311
@ BC_FACE_POS_X
Definition variables.h:309
@ BC_FACE_NEG_Y
Definition variables.h:310
PetscInt i11
Definition variables.h:448
PetscInt j_periodic
Definition variables.h:1010
WallModelDiagnosticsState wall_diagnostics
Near-wall statistics from the last wall-model pass.
Definition variables.h:1261
Vec PlaneCentroidI
Definition variables.h:1248
BoundaryCondition * handler
Definition variables.h:430
PetscReal * y_midp
Definition variables.h:568
PetscInt n_v
Definition variables.h:465
VTKFileType
Enumerates the type of VTK file to be written.
Definition variables.h:859
@ VTK_POLYDATA
Definition variables.h:861
@ VTK_STRUCTURED
Definition variables.h:860
PetscInt nbnumber
Definition variables.h:464
PetscReal * cf
Definition variables.h:471
FSInfo * fsi
Definition variables.h:1079
Provides execution context for a boundary condition handler.
Definition variables.h:379
Boundary condition data used by the BC pipeline and ghost cell machinery.
Definition variables.h:171
A node in a linked list for storing key-value parameters from the bcs.dat file.
Definition variables.h:372
Holds the complete configuration for one of the six boundary faces.
Definition variables.h:424
The elements of one boundary face that this rank owns: one per interior cell beside the face,...
Definition variables.h:415
Defines a 3D axis-aligned bounding box.
Definition variables.h:212
Defines the vertices of a single hexahedral grid cell.
Definition variables.h:218
The six face planes of one hexahedron, indexed by Face, and its characteristic size.
Definition variables.h:229
A 3D point or vector with PetscScalar components.
Definition variables.h:144
A 2D point or vector with PetscScalar components.
Definition variables.h:149
A 2D vector of PETSc real numbers (for geometry/coordinates).
Definition variables.h:166
Defines prescribed body motion using splines.
Definition variables.h:566
Holds all data related to the state and motion of a body in FSI.
Definition variables.h:536
One cell face as the particle search tests against it: a plane through the vertex mean.
Definition variables.h:223
Holds interpolation and distance information for a single IBM point.
Definition variables.h:438
Head of a linked list for IBM data.
Definition variables.h:521
A linked list node containing IBM interpolation info.
Definition variables.h:515
Represents a collection of nodes forming a surface for the IBM.
Definition variables.h:463
Represents a collection of nodes forming a volume for the IBM.
Definition variables.h:483
Every user-selectable parameter of the LES closure.
Definition variables.h:664
Pre-clipping volume statistics captured by one dynamic-coefficient update.
Definition variables.h:689
Context for Multigrid operations.
Definition variables.h:767
Information needed to migrate a single particle between MPI ranks.
Definition variables.h:269
Defines a particle's core properties for Lagrangian tracking.
Definition variables.h:236
Holds all configuration parameters for a post-processing run.
Definition variables.h:793
A lean struct to hold the global cell ownership range for a single MPI rank.
Definition variables.h:263
The MPI ranks of the subdomains around this one, across faces, edges and corners.
Definition variables.h:258
Aggregated per-timestep search instrumentation counters.
Definition variables.h:280
The master context for the entire simulation.
Definition variables.h:916
Information about a surface element for FSI calculations.
Definition variables.h:526
A symmetric second-order tensor stored by its six independent components.
Definition variables.h:161
User-defined context containing data specific to a single computational grid level.
Definition variables.h:1157
User-level context for managing the entire multigrid hierarchy.
Definition variables.h:774
Stores all necessary information for a single data array in a VTK file.
Definition variables.h:852
One VTK file being assembled collectively.
Definition variables.h:871
A verification-only prescribed field: an expression in physical x, y, z and t, enabled when set.
Definition variables.h:275
Near-wall statistics captured by one wall-model pass.
Definition variables.h:707
Head of a generic C-style linked list.
Definition variables.h:504
A generic C-style linked list node for indices.
Definition variables.h:509
A generic C-style linked list node for integers.
Definition variables.h:498