|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Header file for Particle related physics modules. More...
#include <petsc.h>#include <petscdmswarm.h>#include <stdbool.h>#include <petscsys.h>#include <math.h>#include "variables.h"#include "logging.h"#include "walkingsearch.h"Go to the source code of this file.
Functions | |
| PetscErrorCode | UpdateParticleField (const char *fieldName, PetscReal t, Cmpnts pos, Cmpnts vel, PetscReal *psi_io) |
| Updates a single particle's field based on its state and the specified field name. | |
| PetscErrorCode | UpdateFieldForAllParticles (UserCtx *user, const char *fieldName) |
| Loops over all local particles and updates a specified field. | |
| PetscErrorCode | UpdateAllParticleFields (UserCtx *user) |
| Orchestrates the update of all physical properties for particles. | |
Header file for Particle related physics modules.
This file contains declarations of functions responsible for solving for fields in the particle swarms within a simulation using PETSc's DMSwarm.
Definition in file ParticlePhysics.h.
| PetscErrorCode UpdateParticleField | ( | const char * | fieldName, |
| PetscReal | t, | ||
| Cmpnts | pos, | ||
| Cmpnts | vel, | ||
| PetscReal * | psi_io | ||
| ) |
Updates a single particle's field based on its state and the specified field name.
This function serves as a switchboard for various particle property calculations. Given a particle's data, it computes a new value for the specified field.
Currently supported fields:
| [in] | fieldName | The name of the field to update (e.g., "Psi"). |
| [in] | t | The current simulation time. |
| [in] | pos | The particle's physical position. |
| [in] | vel | The particle's velocity. |
| [in,out] | psi_io | A pointer to the particle's current Psi value (used for accumulation if needed). |
Definition at line 29 of file ParticlePhysics.c.
| PetscErrorCode UpdateFieldForAllParticles | ( | UserCtx * | user, |
| const char * | fieldName | ||
| ) |
Loops over all local particles and updates a specified field.
This function orchestrates the update of a single particle field across the entire local swarm. It gets access to the necessary particle data arrays and calls the UpdateParticleField kernel for each particle.
| [in,out] | user | Pointer to the UserCtx containing the swarm and simulation context. |
| [in] | fieldName | The name of the field to update (e.g., "Psi"). |
Definition at line 69 of file ParticlePhysics.c.
| PetscErrorCode UpdateAllParticleFields | ( | UserCtx * | user | ) |
Orchestrates the update of all physical properties for particles.
This function serves as the top-level entry point for updating particle-specific physical quantities after their position and the surrounding fluid velocity are known. It calls a sequence of more specific update routines for each property.
For example, it can be configured to update:
| [in,out] | user | Pointer to the UserCtx containing the swarm and simulation context. |
Definition at line 137 of file ParticlePhysics.c.