9.2
general documentation
cs_lagr_prototypes.h
Go to the documentation of this file.
1#ifndef CS_LAGR_PROTOTYPES_H
2#define CS_LAGR_PROTOTYPES_H
3
4/*============================================================================
5 * Prototypes for Fortran functions and subroutines callable from C
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2026 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "base/cs_base.h"
35#include "mesh/cs_mesh.h"
38
39#include "cdo/cs_domain.h"
40
41#include "lagr/cs_lagr.h"
43#include "lagr/cs_lagr_stat.h"
44
45/*----------------------------------------------------------------------------*/
46
47/*============================================================================
48 * Public C++
49 *============================================================================*/
50
51#if defined(__cplusplus)
52
53/*============================================================================
54 * Lagrangian User function prototypes
55 *============================================================================*/
56
57/*----------------------------------------------------------------------------*/
61/*----------------------------------------------------------------------------*/
62
63/*----------------------------------------------------------------------------*/
72/*----------------------------------------------------------------------------*/
73
74void
75cs_user_lagr_boundary_conditions(const int itypfb[]);
76
77/*----------------------------------------------------------------------------*/
94/*----------------------------------------------------------------------------*/
95
96void
98 cs_lnum_t p_id,
99 cs_lnum_t face_id,
100 const cs_real_t face_norm[3],
101 const cs_real_t c_intersect[3],
102 cs_real_t t_intersect,
103 int b_zone_id,
104 int *event_flag,
105 cs_lagr_tracking_state_t *tracking_state);
106
107/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113/*---------------------------------------------------------------------------*/
114/*
115 * \brief User function of the Lagrangian particle-tracking module
116 *
117 * User input of physical, numerical and post-processing options.
118 */
119/*----------------------------------------------------------------------------*/
120
121void
123
124/*----------------------------------------------------------------------------*/
128/*----------------------------------------------------------------------------*/
129
130/*----------------------------------------------------------------------------*/
151/*----------------------------------------------------------------------------*/
152
153void
155 const cs_lnum_t p_id,
156 const cs_real_t *taup,
157 const cs_real_3_t *tlag,
158 const cs_real_3_t *piil,
159 const cs_real_33_t *bx,
160 const cs_real_t tsfext,
161 const cs_real_3_t gradpr,
162 const cs_real_33_t gradvf,
163 cs_real_t rho_p,
164 cs_real_3_t fextla);
165
166/*----------------------------------------------------------------------------*/
174/*----------------------------------------------------------------------------*/
175
176void
178
179/*----------------------------------------------------------------------------*/
192/*----------------------------------------------------------------------------*/
193
194void
196 cs_lnum_t p_id,
197 const cs_real_t coords[3],
198 const cs_real_t dt,
199 cs_real_t disp[3]);
200
201/*----------------------------------------------------------------------------*/
222/*----------------------------------------------------------------------------*/
223
224void
226 const cs_lagr_injection_set_t *zis,
227 const cs_lnum_t particle_range[2],
228 const cs_lnum_t particle_face_id[],
229 const cs_real_t visc_length[]);
230
231/*----------------------------------------------------------------------------*/
255/*----------------------------------------------------------------------------*/
256
257void
259 const cs_lagr_injection_set_t *zis,
260 const cs_lnum_t particle_range[2],
261 const cs_lnum_t particle_face_id[],
262 const cs_real_t visc_length[]);
263
264/*----------------------------------------------------------------------------*/
296/*----------------------------------------------------------------------------*/
297
298void
299cs_user_lagr_rt(int phase_id,
301 cs_lnum_t p_id,
302 cs_real_t re_p,
303 cs_real_t uvwr,
304 cs_real_t rho_f,
305 cs_real_t rho_p,
306 cs_real_t nu_f,
307 cs_real_t *taup,
308 const cs_real_t dt);
309
310/*----------------------------------------------------------------------------*/
318/*----------------------------------------------------------------------------*/
319
320void
322 cs_lnum_t p_id,
323 cs_real_t re_p,
324 cs_real_t uvwr,
325 cs_real_t rho_f,
326 cs_real_t rho_p,
327 cs_real_t nu_f,
328 cs_real_t cp_f,
329 cs_real_t k_f,
330 cs_real_2_t tempct,
331 const cs_real_t dt);
332
333/*----------------------------------------------------------------------------*/
368/*----------------------------------------------------------------------------*/
369
370void
372 const cs_lnum_t p_id,
373 const cs_real_t *taup,
374 const cs_real_3_t *tlag,
375 const cs_real_2_t tempct,
376 const int nor);
377
378/*----------------------------------------------------------------------------*/
382/*----------------------------------------------------------------------------*/
383
384/*----------------------------------------------------------------------------*/
391/*----------------------------------------------------------------------------*/
392
393void
395
396/*----------------------------------------------------------------------------*/
411/*----------------------------------------------------------------------------*/
412
413void
415 cs_lnum_t p_id,
416 cs_lnum_t face_id,
417 const cs_nreal_t face_u_norm[3],
418 const cs_real_t c_intersect[3],
419 cs_real_t t_intersect,
420 cs_lagr_tracking_state_t *tracking_state);
421
422#endif /* __cplusplus */
423
424#endif /* CS_LAGR_PROTOTYPES_H */
425
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:349
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:348
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:358
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
double cs_nreal_t
Definition: cs_defs.h:336
@ dt
Definition: cs_field_pointer.h:61
void cs_lagr_user_boundary_interaction(cs_lagr_particle_set_t &p_set, cs_lnum_t p_id, cs_lnum_t face_id, const cs_real_t face_norm[3], const cs_real_t c_intersect[3], cs_real_t t_intersect, int b_zone_id, int *event_flag, cs_lagr_tracking_state_t *tracking_state)
Handling of a particle interaction with a boundary of type CS_LAGR_BC_USER.
Definition: cs_user_lagr_boundary_conditions.cpp:89
void cs_user_lagr_boundary_conditions(const int itypfb[])
Define particle boundary conditions.
Definition: cs_user_lagr_boundary_conditions.cpp:63
void cs_user_lagr_in(cs_lagr_particle_set_t &p_set, const cs_lagr_injection_set_t *zis, const cs_lnum_t particle_range[2], const cs_lnum_t particle_face_id[], const cs_real_t visc_length[])
User modification of newly injected particles.
Definition: cs_user_lagr_particle.cpp:209
void cs_user_lagr_ef(cs_real_t dt_p, const cs_lnum_t p_id, 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_t tsfext, const cs_real_3_t gradpr, const cs_real_33_t gradvf, cs_real_t rho_p, cs_real_3_t fextla)
User definition of an external force field acting on the particles.
Definition: cs_user_lagr_particle.cpp:84
void cs_user_lagr_in_force_coords(cs_lagr_particle_set_t &p_set, const cs_lagr_injection_set_t *zis, const cs_lnum_t particle_range[2], const cs_lnum_t particle_face_id[], const cs_real_t visc_length[])
User modification of newly injected particle location and cell_id.
Definition: cs_user_lagr_particle.cpp:170
void cs_user_lagr_extra_operations(const cs_real_t dt[])
User function (non-mandatory intervention)
Definition: cs_user_lagr_particle.cpp:112
void cs_user_lagr_volume_conditions(void)
Define particle volume conditions.
Definition: cs_user_lagr_volume_conditions.cpp:61
void cs_user_lagr_rt_t(cs_lagr_particle_set_t &p_set, cs_lnum_t p_id, cs_real_t re_p, cs_real_t uvwr, cs_real_t rho_f, cs_real_t rho_p, cs_real_t nu_f, cs_real_t cp_f, cs_real_t k_f, cs_real_2_t tempct, const cs_real_t dt)
Modification of the calculation of the thermal relaxation time of the particles with respect to the c...
Definition: cs_user_lagr_particle.cpp:309
void cs_user_lagr_sde(const cs_real_t dt, const cs_lnum_t p_id, const cs_real_t *taup, const cs_real_3_t *tlag, const cs_real_2_t tempct, const int nor)
User integration of the SDE for the user-defined variables.
Definition: cs_user_lagr_particle.cpp:365
void cs_user_lagr_rt(int phase_id, cs_lagr_particle_set_t &p_set, cs_lnum_t p_id, cs_real_t re_p, cs_real_t uvwr, cs_real_t rho_f, cs_real_t rho_p, cs_real_t nu_f, cs_real_t *taup, const cs_real_t dt)
Modification of the calculation of the particle relaxation time with respect to the chosen formulatio...
Definition: cs_user_lagr_particle.cpp:267
void cs_lagr_user_internal_interaction(cs_lagr_particle_set_t &p_set, cs_lnum_t p_id, cs_lnum_t face_id, const cs_nreal_t face_u_norm[3], const cs_real_t c_intersect[3], cs_real_t t_intersect, cs_lagr_tracking_state_t *tracking_state)
Handling of a particle interaction with a interior face of type CS_LAGR_BC_USER.
Definition: cs_user_lagr_volume_conditions.cpp:85
void cs_user_lagr_imposed_motion(cs_lagr_particle_set_t &p_set, cs_lnum_t p_id, const cs_real_t coords[3], const cs_real_t dt, cs_real_t disp[3])
Impose the motion of a particle flagged CS_LAGR_PART_IMPOSED_MOTION.
Definition: cs_user_lagr_particle.cpp:134
void cs_user_lagr_model(void)
Definition: cs_user_lagr_model.cpp:55
cs_lagr_tracking_state_t
Definition: cs_lagr_tracking.h:50
Definition: cs_lagr.h:615
Definition: cs_lagr_particle.h:324