PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
 
Loading...
Searching...
No Matches
AnalyticalSolutions.h
Go to the documentation of this file.
1#ifndef ANALYTICALSOLUTIONS_H
2#define ANALYTICALSOLUTIONS_H
3
4#include "variables.h"
5
6/**
7 * @brief Sets the Eulerian fields from the case's source (`-ic_source_*`) at the step's time.
8 * @details Sets the fluxes on every face, `Ubcs` on every boundary face, and `Ucat` and `P` at the
9 * cell centres. A source that does not read `t` is evaluated once. Collective.
10 * @param simCtx The main simulation context, containing configuration and state.
11 * @return PetscErrorCode 0 on success.
12 */
13PetscErrorCode AnalyticalSolutionEngine(SimCtx *simCtx);
14
15/**
16 * @brief Release what AnalyticalSolutionEngine() keeps from step to step, if anything.
17 * @param simCtx Simulation context.
18 * @return PetscErrorCode 0 on success.
19 */
20PetscErrorCode AnalyticalFieldDestroy(SimCtx *simCtx);
21
22/**
23 * @brief Reports whether the analytical field can be compared with interpolated particle velocities.
24 * @details It must be evaluable at any point, a Cartesian source reading only x, y, z and t, and
25 * must vary in space: interpolating a uniform field has no error to measure.
26 * @param simCtx Simulation context, after AnalyticalSolutionEngine().
27 * @return PETSC_TRUE if interpolation error is meaningful, PETSC_FALSE otherwise.
28 */
30
31/**
32 * @brief Evaluates the analytical velocity at particle positions.
33 * @param tempVec The PETSc Vec containing particle positions, replaced by the velocities.
34 * @param simCtx The simulation context.
35 * @return PetscErrorCode Returns 0 on success.
36 */
37PetscErrorCode SetAnalyticalSolutionForParticles(Vec tempVec, SimCtx *simCtx);
38
39#endif // ANALYTICALSOLUTIONS_H
PetscErrorCode AnalyticalFieldDestroy(SimCtx *simCtx)
Release what AnalyticalSolutionEngine() keeps from step to step, if anything.
PetscErrorCode AnalyticalSolutionEngine(SimCtx *simCtx)
Sets the Eulerian fields from the case's source (-ic_source_*) at the step's time.
PetscBool AnalyticalFieldSupportsInterpolationError(const SimCtx *simCtx)
Reports whether the analytical field can be compared with interpolated particle velocities.
PetscErrorCode SetAnalyticalSolutionForParticles(Vec tempVec, SimCtx *simCtx)
Evaluates the analytical velocity at particle positions.
Main header file for a complex fluid dynamics solver.
The master context for the entire simulation.
Definition variables.h:916