|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
#include "ParticlePhysics.h"Go to the source code of this file.
Macros | |
| #define | ERROR_MSG_BUFFER_SIZE 256 |
| #define | __FUNCT__ "UpdateParticleField" |
| #define | __FUNCT__ "UpdateFieldForAllParticles" |
| #define | __FUNCT__ "UpdateAllParticleFields" |
Functions | |
| PetscErrorCode | UpdateParticleField (const char *fieldName, PetscReal dt, PetscReal *psi_io, PetscReal diffusivity, PetscReal mean_val, PetscReal cell_vol, PetscReal C_model) |
| Updates a single particle's field based on its state and physics model. | |
| 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. | |
| #define ERROR_MSG_BUFFER_SIZE 256 |
Definition at line 4 of file ParticlePhysics.c.
| #define __FUNCT__ "UpdateParticleField" |
Definition at line 8 of file ParticlePhysics.c.
| #define __FUNCT__ "UpdateFieldForAllParticles" |
Definition at line 8 of file ParticlePhysics.c.
| #define __FUNCT__ "UpdateAllParticleFields" |
Definition at line 8 of file ParticlePhysics.c.
| PetscErrorCode UpdateParticleField | ( | const char * | fieldName, |
| PetscReal | dt, | ||
| PetscReal * | psi_io, | ||
| PetscReal | diffusivity, | ||
| PetscReal | mean_val, | ||
| PetscReal | cell_vol, | ||
| PetscReal | C_model | ||
| ) |
Updates a single particle's field based on its state and physics model.
Updates a single particle's field based on its state and the specified field name.
Implements the IEM (Interaction by Exchange with the Mean) model for scalar mixing.
Physics: dPsi/dt = -Omega * (Psi - <Psi>) Solution: Psi_new = <Psi> + (Psi_old - <Psi>) * exp(-Omega * dt)
| [in] | fieldName | Name of the field (e.g., "Psi"). |
| [in] | dt | Time step size. |
| [in,out] | psi_io | Pointer to the particle's scalar value (Psi). |
| [in] | diffusivity | Particle diffusivity (Gamma + Gamma_t). |
| [in] | mean_val | Local Eulerian mean value (<Psi>). |
| [in] | cell_vol | Volume of the host cell (1/Jacobian). |
| [in] | C_model | Model constant (C_IEM). |
Definition at line 25 of file ParticlePhysics.c.
| PetscErrorCode UpdateFieldForAllParticles | ( | UserCtx * | user, |
| const char * | fieldName | ||
| ) |
Loops over all local particles and updates a specified field.
Prepares necessary Eulerian and Lagrangian data structures before looping.
| [in,out] | user | Pointer to the UserCtx. |
| [in] | fieldName | The name of the field to update (e.g., "Psi"). |
Definition at line 76 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 178 of file ParticlePhysics.c.