#include "base/cs_defs.h"#include "base/cs_math.h"#include <math.h>#include "bft/bft_printf.h"#include "base/cs_mem.h"#include "mesh/cs_mesh.h"#include "mesh/cs_mesh_quantities.h"#include "base/cs_physical_constants.h"#include "pprt/cs_physical_model.h"#include "base/cs_prototypes.h"#include "base/cs_random.h"#include "base/cs_rotation.h"#include "base/cs_thermal_model.h"#include "turb/cs_turbulence_model.h"#include "lagr/cs_lagr.h"#include "lagr/cs_lagr_adh.h"#include "lagr/cs_lagr_deposition_model.h"#include "lagr/cs_lagr_event.h"#include "lagr/cs_lagr_roughness.h"#include "lagr/cs_lagr_tracking.h"#include "lagr/cs_lagr_prototypes.h"#include "lagr/cs_lagr_sde.h"
Include dependency graph for cs_lagr_sde.cpp:Functions | |
| static void | _add_resuspension_event (cs_lagr_event_set_t *events, cs_lagr_particle_set_t *particles, cs_lnum_t p_id, cs_lnum_t face_id, const cs_real_t particle_velocity[3]) |
| Add a resulspension event. More... | |
| static double | _x_expm1 (double x) |
| static double | _x_expm1_p (double x) |
| static double | _secant_ter2p (double a, double b) |
| static double | _secant_ter2x (double a, double b) |
| static double | _secant_ter7x (double a, double b) |
| static double | _secant_ter7p (double a, double b) |
| void | cs_sde_vels_pos_1_st_order_time_integ (cs_lnum_t p_id, cs_real_t dt_part, int nor, const cs_real_t *taup, const cs_real_3_t *tlag, const cs_real_3_t *piil, const cs_real_33_t *bx, const cs_real_3_t *vagaus, const cs_real_6_t brgaus, const cs_real_3_t force_p, const cs_real_3_t beta) |
| Integration of SDEs by 1st order time scheme for one particle. More... | |
| static void | cs_sde_vels_pos_2_nd_order_time_integ (cs_lnum_t p_id, cs_real_t dt_part, int nor, const cs_real_t *taup, const cs_real_3_t *tlag, const cs_real_3_t *piil, const cs_real_33_t *bx, cs_real_t *tsfext, const cs_real_3_t *vagaus, const cs_real_6_t brgaus, const cs_real_3_t force_p, const cs_real_3_t beta) |
| Integration of SDEs by 2nd order scheme. More... | |
| static void | _lagesd (cs_real_t dt_part, cs_lnum_t p_id, int nor, const cs_real_t taup, const cs_real_3_t piil, const cs_real_3_t *vagaus, const cs_real_t romp, const cs_real_3_t force_p, cs_real_t tempf, const cs_real_t vislen[], cs_lagr_event_set_t *events, cs_real_t *depint, cs_lnum_t *n_new_particles) |
| Deposition submodel. More... | |
| static void | cs_sde_vels_pos_time_integ_depot (cs_lnum_t p_id, cs_real_t dt_part, int nor, const cs_real_t taup, const cs_real_3_t tlag, const cs_real_3_t piil, const cs_real_33_t bx, const cs_real_3_t *vagaus, const cs_real_t romp, const cs_real_3_t force_p, const cs_real_t vislen[], cs_lnum_t *n_new_particles) |
| Deposition submodel. More... | |
| void | cs_lagr_sde (cs_lnum_t p_id, cs_real_t dt_part, int nor, const cs_real_t *taup, const cs_real_3_t *tlag, const cs_real_3_t *piil, const cs_real_33_t *bx, cs_real_t *tsfext, const cs_real_3_t force_p, const cs_real_t vislen[], const cs_real_3_t beta, cs_real_3_t *vagaus, cs_real_6_t brgaus, cs_lnum_t *n_new_particles) |
| Integration of particle equations of motion: More... | |
| void | cs_lagr_sde_attr (cs_lagr_attribute_t attr, const cs_lnum_t p_id, int nor, const cs_real_t dt_part, cs_real_t tcarac, cs_real_t pip) |
| Integration of a stochastic differential equation (SDE) for a user particle variable (attribute). More... | |
|
static |
Add a resulspension event.
TODO add additional info to events.
| [in] | events | pointer to events set |
| [in] | particles | pointer to particle set |
| [in] | p_id | particle id |
| [in] | face_id | associated face id |
| [in] | particle_velocity | velocity after event |
|
static |
Deposition submodel.
1/ Modification of the coordinate system (global ->local) 2/ Call of subroutine lagcli 3/ Integration of the stochastic differential equations in the 2 directions different from the normal to the boundary face 4/ Modification of the coordinate system (local ->global) 5/ Update of the particle position
| [in] | dt_part | remaining time step associated to the particle |
| [in] | p_id | particle index in set |
| [in] | nor | current step id (for 2nd order scheme) |
| [in] | taup | dynamic characteristic time |
| [in] | piil | term in integration of UP SDEs |
| [in] | vagaus | gaussian random variables |
| [in] | romp | particles associated density |
| [in] | force_p | forces per mass unit on particles (m/s^2) |
| [in] | tempf | temperature of the fluid (K) |
| [in] | vislen | FIXME |
| [in] | events | associated events set |
| [in] | depint | interface location near-wall/core-flow |
| [in] | n_new_particles |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
| void cs_lagr_sde | ( | cs_lnum_t | p_id, |
| cs_real_t | dt_part, | ||
| int | nor, | ||
| const cs_real_t * | taup, | ||
| const cs_real_3_t * | tlag, | ||
| const cs_real_3_t * | piil, | ||
| const cs_real_33_t * | bx, | ||
| cs_real_t * | tsfext, | ||
| const cs_real_3_t | force_p, | ||
| const cs_real_t | vislen[], | ||
| const cs_real_3_t | beta, | ||
| cs_real_3_t * | vagaus, | ||
| cs_real_6_t | brgaus, | ||
| cs_lnum_t * | n_new_particles | ||
| ) |
Integration of particle equations of motion:
| [in] | p_id | particle index in set |
| [in] | dt_part | remaining time step associated to the particle |
| [in] | nor | current step id (for 2nd order scheme) |
| [in] | taup | dynamic characteristic time |
| [in] | tlag | fluid characteristic time |
| [in] | piil | term in integration of U-P SDEs |
| [in] | bx | turbulence characteristics |
| [out] | tsfext | info for return coupling source terms |
| [out] | force_p | forces per mass unit on particles (m/s^2) |
| [in] | vislen | nu/u* = y/y+ |
| [in] | beta | proportional to the gradient of T_lag |
| [out] | vagaus | gaussian random variables |
| [out] | brgaus | gaussian random variables |
| [in] | n_new_particles |
| void cs_lagr_sde_attr | ( | cs_lagr_attribute_t | attr, |
| const cs_lnum_t | p_id, | ||
| int | nor, | ||
| const cs_real_t | dt_part, | ||
| cs_real_t | tcarac, | ||
| cs_real_t | pip | ||
| ) |
Integration of a stochastic differential equation (SDE) for a user particle variable (attribute).
When there is interaction with a boundary face, the integration degenerates to order 1 (even if the 2nd order scheme is active).
| [in] | attr | attribute/variable |
| [in] | p_id | particle id |
| [in] | nor | current step id (for 2nd order scheme) |
| [in] | dt_part | remaining time step associated to the particle |
| [in] | tcarac | variable characteristic time |
| [in] | pip | right-hand side associated with SDE |
| void cs_sde_vels_pos_1_st_order_time_integ | ( | cs_lnum_t | p_id, |
| cs_real_t | dt_part, | ||
| int | nor, | ||
| const cs_real_t * | taup, | ||
| const cs_real_3_t * | tlag, | ||
| const cs_real_3_t * | piil, | ||
| const cs_real_33_t * | bx, | ||
| const cs_real_3_t * | vagaus, | ||
| const cs_real_6_t | brgaus, | ||
| const cs_real_3_t | force_p, | ||
| const cs_real_3_t | beta | ||
| ) |
Integration of SDEs by 1st order time scheme for one particle.
| [in] | p_id | particle index in set |
| [in] | dt_part | remaining time step associated to the particle |
| [in] | nor | current step id (for 2nd order scheme) |
| [in] | taup | dynamic characteristic time |
| [in] | tlag | lagrangian fluid characteristic time |
| [in] | piil | term in integration of up sdes |
| [in] | bx | turbulence characteristics |
| [in] | vagaus | gaussian random variables |
| [in] | brgaus | gaussian random variables |
| [in] | force_p | forces per mass unit on particles (m/s^2) |
| [in] | beta | proportional to the gradient of T_lag |
|
static |
Integration of SDEs by 2nd order scheme.
When there has beed interaction with a boundary face, the velocity and velocity seen computations are forced to 1st order.
| [in] | p_id | particle index in set |
| [in] | dt_part | remaining time step associated to the particle |
| [in] | nor | current step id (for 2nd order scheme) |
| [in] | taup | dynamic characteristic time |
| [in] | tlag | lagrangian fluid characteristic time |
| [in] | piil | term in integration of up sdes |
| [in] | bx | turbulence characteristics |
| [out] | tsfext | info for return coupling source terms |
| [in] | vagaus | gaussian random variables |
| [in] | brgaus | gaussian random variables |
| [in] | force_p | forces per mass unit on particles (m/s^2) |
| [in] | beta | proportional to the gradient of T_lag |
|
static |
Deposition submodel.
Main subroutine of the submodel 1/ Calculation of the normalized wall-normal distance of the boundary-cell particles 2/ Sorting of the particles with respect to their normalized wall-normal distance
| [in] | p_id | particle index in set |
| [in] | dt_part | remaining time step associated to the particle |
| [in] | nor | current step id (for 2nd order scheme) |
| [in] | taup | dynamic characteristic time |
| [in] | tlag | lagrangian fluid characteristic time |
| [in] | piil | term in integration of up sdes |
| [in] | bx | turbulence characteristics |
| [in] | vagaus | gaussian random variables |
| [in] | romp | particles associated density |
| [in] | force_p | forces per mass unit on particles (m/s^2) |
| [in] | vislen | nu/u* = y/y+ |
| [out] | n_new_particles |