|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
#include <petscpf.h>#include <petscdmswarm.h>#include <stdlib.h>#include <time.h>#include <math.h>#include <petsctime.h>#include <petscsys.h>#include <petscdmcomposite.h>#include <petscsystypes.h>#include "variables.h"#include "ParticleSwarm.h"#include "walkingsearch.h"#include "grid.h"#include "logging.h"#include "io.h"#include "interpolation.h"#include "AnalyticalSolutions.h"#include "ParticleMotion.h"#include "Boundaries.h"#include "runloop.h"Go to the source code of this file.
Functions | |
| PetscErrorCode | SetInitialInteriorField (UserCtx *user, const char *fieldName) |
| Sets the initial values for the INTERIOR of a specified Eulerian field. | |
| PetscErrorCode | PopulateInitialUcont (UserCtx *user) |
| Populate Ucont for one fresh-start block from the configured IC mode. | |
| PetscErrorCode | InitializeEulerianState (SimCtx *simCtx) |
| High-level orchestrator to set the complete initial state of the Eulerian solver. | |
| PetscErrorCode SetInitialInteriorField | ( | UserCtx * | user, |
| const char * | fieldName | ||
| ) |
Sets the initial values for the INTERIOR of a specified Eulerian field.
This function initializes the interior nodes of Ucont based on the mode selected by simCtx->initialConditionMode.
Supported profiles for "Ucont":
UniformCart2Contra dots the Cartesian vector (InitialConstantContra.x/y/z) with the local metric vectors to fill all three contravariant components correctly across the entire interior.flowDirection or the identified INLET face) proportional to icVelocityPhysical * |A_n|.icVelocityPhysical; streamwise axis from flowDirection or the identified INLET face.| user | The main UserCtx struct, containing all simulation data and configuration. |
| fieldName | A string ("Ucont" or "P") identifying which field to initialize. |
Sets the initial values for the INTERIOR of a specified Eulerian field.
Local to this translation unit.
Definition at line 14 of file initialcondition.c.
| PetscErrorCode PopulateInitialUcont | ( | UserCtx * | user | ) |
Populate Ucont for one fresh-start block from the configured IC mode.
Built-in modes generate Ucont directly. File mode loads either Ucat or Ucont from the staged IC directory and converts Ucat when necessary.
| [in,out] | user | Block context whose velocity field is populated. |
Populate Ucont for one fresh-start block from the configured IC mode.
Definition at line 219 of file initialcondition.c.
| PetscErrorCode InitializeEulerianState | ( | SimCtx * | simCtx | ) |
High-level orchestrator to set the complete initial state of the Eulerian solver.
This function is called once from main() before the time loop begins. It inspects the simulation context to determine whether to perform a fresh start (t=0) or restart from saved files. It then delegates to the appropriate helper function. Finally, it initializes the solver's history vectors (Ucont_o, P_o, etc.) to ensure the first time step has the necessary data.
| simCtx | Simulation context controlling the operation. |
High-level orchestrator to set the complete initial state of the Eulerian solver.
Local to this translation unit.
Definition at line 360 of file initialcondition.c.