|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Implements the analytical solution engine for initializing or driving the simulation. More...
Go to the source code of this file.
Macros | |
| #define | __FUNCT__ "SetAnalyticalGridInfo" |
| #define | __FUNCT__ "AnalyticalSolutionEngine" |
| #define | __FUNCT__ "SetAnalyticalSolution_TGV3D" |
| #define | __FUNCT__ "SetAnalyticalSolution_ZeroFlow" |
| #define | __FUNCT__ "SetAnalyticalSolution_UniformFlow" |
| #define | __FUNCT__ "SetAnalyticalSolutionForParticles_TGV3D" |
| #define | __FUNCT__ "SetAnalyticalSolutionForParticles_UniformFlow" |
| #define | __FUNCT__ "SetAnalyticalSolutionForParticles" |
| #define | __FUNCT__ "EvaluateAnalyticalScalarProfile" |
| #define | __FUNCT__ "SetAnalyticalScalarFieldOnParticles" |
| #define | __FUNCT__ "SetAnalyticalScalarFieldAtCellCenters" |
Functions | |
| static PetscErrorCode | SetAnalyticalSolution_TGV3D (SimCtx *simCtx) |
| Populate the Eulerian field vectors with the Taylor–Green vortex at the current time. | |
| static PetscErrorCode | SetAnalyticalSolution_ZeroFlow (SimCtx *simCtx) |
| Set every analytical Eulerian field to the quiescent zero-flow reference state. | |
| static PetscErrorCode | SetAnalyticalSolution_UniformFlow (SimCtx *simCtx) |
| Fill the analytical Eulerian fields with the configured spatially uniform flow state. | |
| static PetscErrorCode | SetAnalyticalSolutionForParticles_TGV3D (Vec tempVec, SimCtx *simCtx) |
Evaluate Taylor–Green velocities at swarm particle positions and store them in tempVec. | |
| static PetscErrorCode | SetAnalyticalSolutionForParticles_UniformFlow (Vec tempVec, SimCtx *simCtx) |
| Fill the particle velocity vector with the configured uniform analytical flow. | |
| static PetscErrorCode | EvaluateConfiguredScalarProfile (const VerificationScalarConfig *cfg, PetscReal x, PetscReal y, PetscReal z, PetscReal *value) |
| Internal helper that evaluates the configured scalar verification profile. | |
| PetscBool | AnalyticalTypeRequiresCustomGeometry (const char *analytical_type) |
| Implementation of AnalyticalTypeRequiresCustomGeometry(). | |
| PetscBool | AnalyticalTypeSupportsInterpolationError (const char *analytical_type) |
| Implementation of AnalyticalTypeSupportsInterpolationError(). | |
| PetscErrorCode | SetAnalyticalGridInfo (UserCtx *user) |
Internal helper implementation: SetAnalyticalGridInfo(). | |
| PetscErrorCode | AnalyticalSolutionEngine (SimCtx *simCtx) |
| Implementation of AnalyticalSolutionEngine(). | |
| PetscErrorCode | SetAnalyticalSolutionForParticles (Vec tempVec, SimCtx *simCtx) |
| Implementation of SetAnalyticalSolutionForParticles(). | |
| PetscErrorCode | EvaluateAnalyticalScalarProfile (const SimCtx *simCtx, PetscReal x, PetscReal y, PetscReal z, PetscReal t, PetscReal *value) |
| Implementation of EvaluateAnalyticalScalarProfile(). | |
| PetscErrorCode | SetAnalyticalScalarFieldOnParticles (UserCtx *user, ParticleFieldId particle_field_id) |
| Implementation of SetAnalyticalScalarFieldOnParticles(). | |
| PetscErrorCode | SetAnalyticalScalarFieldAtCellCenters (UserCtx *user, Vec targetVec) |
| Implementation of SetAnalyticalScalarFieldAtCellCenters(). | |
Implements the analytical solution engine for initializing or driving the simulation.
This file provides a modular and extensible framework for applying analytical solutions to the Eulerian fields. The primary entry point is AnalyticalSolutionEngine, which acts as a dispatcher based on user configuration.
— DESIGN PHILOSOPHY —
simCtx->scaling parameters are intentionally NOT used here; they are reserved for dimensionalization during I/O and post-processing only.t. This involves:Ucat and P directly.Ucont via metric dot products and deriving Ucat through Contra2Cart.user->Bcs.Ubcs). It does NOT implement the numerical scheme for ghost cells. Instead, after setting the physical state, it relies on the solver's standard utility functions (UpdateDummyCells, UpdateCornerNodes) to correctly populate all ghost cell layers.else if condition and a corresponding static implementation function, without modifying any other part of the solver. Definition in file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalGridInfo" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "AnalyticalSolutionEngine" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalSolution_TGV3D" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalSolution_ZeroFlow" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalSolution_UniformFlow" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalSolutionForParticles_TGV3D" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalSolutionForParticles_UniformFlow" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalSolutionForParticles" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "EvaluateAnalyticalScalarProfile" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalScalarFieldOnParticles" |
Definition at line 75 of file AnalyticalSolutions.c.
| #define __FUNCT__ "SetAnalyticalScalarFieldAtCellCenters" |
Definition at line 75 of file AnalyticalSolutions.c.
|
static |
Populate the Eulerian field vectors with the Taylor–Green vortex at the current time.
Definition at line 238 of file AnalyticalSolutions.c.
|
static |
Set every analytical Eulerian field to the quiescent zero-flow reference state.
Definition at line 378 of file AnalyticalSolutions.c.
|
static |
Fill the analytical Eulerian fields with the configured spatially uniform flow state.
Definition at line 409 of file AnalyticalSolutions.c.
|
static |
Evaluate Taylor–Green velocities at swarm particle positions and store them in tempVec.
Definition at line 465 of file AnalyticalSolutions.c.
|
static |
Fill the particle velocity vector with the configured uniform analytical flow.
Definition at line 507 of file AnalyticalSolutions.c.
|
static |
Internal helper that evaluates the configured scalar verification profile.
Local to this translation unit.
Definition at line 564 of file AnalyticalSolutions.c.
| PetscBool AnalyticalTypeRequiresCustomGeometry | ( | const char * | analytical_type | ) |
Implementation of AnalyticalTypeRequiresCustomGeometry().
Reports whether an analytical type requires custom geometry/decomposition logic.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 55 of file AnalyticalSolutions.c.
| PetscBool AnalyticalTypeSupportsInterpolationError | ( | const char * | analytical_type | ) |
Implementation of AnalyticalTypeSupportsInterpolationError().
Reports whether an analytical type has a non-trivial velocity field for which interpolation error measurement is meaningful.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 67 of file AnalyticalSolutions.c.
| PetscErrorCode SetAnalyticalGridInfo | ( | UserCtx * | user | ) |
Internal helper implementation: SetAnalyticalGridInfo().
Sets the grid domain and resolution for analytical solution cases.
Local to this translation unit.
Definition at line 80 of file AnalyticalSolutions.c.
| PetscErrorCode AnalyticalSolutionEngine | ( | SimCtx * | simCtx | ) |
Implementation of AnalyticalSolutionEngine().
Dispatches to the appropriate analytical solution function based on simulation settings.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 184 of file AnalyticalSolutions.c.
| PetscErrorCode SetAnalyticalSolutionForParticles | ( | Vec | tempVec, |
| SimCtx * | simCtx | ||
| ) |
Implementation of SetAnalyticalSolutionForParticles().
Applies the analytical solution to particle velocity vector.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 536 of file AnalyticalSolutions.c.
| PetscErrorCode EvaluateAnalyticalScalarProfile | ( | const SimCtx * | simCtx, |
| PetscReal | x, | ||
| PetscReal | y, | ||
| PetscReal | z, | ||
| PetscReal | t, | ||
| PetscReal * | value | ||
| ) |
Implementation of EvaluateAnalyticalScalarProfile().
Evaluates the configured verification scalar profile at one physical point.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 599 of file AnalyticalSolutions.c.
| PetscErrorCode SetAnalyticalScalarFieldOnParticles | ( | UserCtx * | user, |
| ParticleFieldId | particle_field_id | ||
| ) |
Implementation of SetAnalyticalScalarFieldOnParticles().
Writes the configured verification scalar profile onto a particle swarm scalar field.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 625 of file AnalyticalSolutions.c.
| PetscErrorCode SetAnalyticalScalarFieldAtCellCenters | ( | UserCtx * | user, |
| Vec | targetVec | ||
| ) |
Implementation of SetAnalyticalScalarFieldAtCellCenters().
Writes the configured verification scalar profile at physical cell centers into a scalar Vec.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/AnalyticalSolutions.h.
Definition at line 675 of file AnalyticalSolutions.c.