9.1
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-2025 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
48
49/*============================================================================
50 * Lagrangian User function prototypes
51 *============================================================================*/
52
53/*----------------------------------------------------------------------------*/
57/*----------------------------------------------------------------------------*/
58
59/*----------------------------------------------------------------------------*/
68/*----------------------------------------------------------------------------*/
69
70void
71cs_user_lagr_boundary_conditions(const int itypfb[]);
72
73/*----------------------------------------------------------------------------*/
90/*----------------------------------------------------------------------------*/
91
92void
94 cs_lnum_t p_id,
95 cs_lnum_t face_id,
96 const cs_real_t face_norm[3],
97 const cs_real_t c_intersect[3],
98 cs_real_t t_intersect,
99 int b_zone_id,
100 int *event_flag,
101 cs_lagr_tracking_state_t *tracking_state);
102
103/*----------------------------------------------------------------------------*/
107/*----------------------------------------------------------------------------*/
108
109/*---------------------------------------------------------------------------*/
110/*
111 * \brief User function of the Lagrangian particle-tracking module
112 *
113 * User input of physical, numerical and post-processing options.
114 */
115/*----------------------------------------------------------------------------*/
116
117void
119
120/*----------------------------------------------------------------------------*/
124/*----------------------------------------------------------------------------*/
125
126/*----------------------------------------------------------------------------*/
148/*----------------------------------------------------------------------------*/
149
150void
152 const cs_lnum_t p_id,
153 const cs_real_t *taup,
154 const cs_real_3_t *tlag,
155 const cs_real_3_t *piil,
156 const cs_real_33_t *bx,
157 const cs_real_t tsfext,
158 const cs_real_3_t *vagaus,
159 const cs_real_3_t gradpr,
160 const cs_real_33_t gradvf,
161 cs_real_t rho_p,
162 cs_real_3_t fextla);
163
164/*----------------------------------------------------------------------------*/
172/*----------------------------------------------------------------------------*/
173
174void
176
177/*----------------------------------------------------------------------------*/
190/*----------------------------------------------------------------------------*/
191
192void
194 cs_lnum_t p_id,
195 const cs_real_t coords[3],
196 const cs_real_t dt,
197 cs_real_t disp[3]);
198
199/*----------------------------------------------------------------------------*/
220/*----------------------------------------------------------------------------*/
221
222void
224 const cs_lagr_injection_set_t *zis,
225 const cs_lnum_t particle_range[2],
226 const cs_lnum_t particle_face_id[],
227 const cs_real_t visc_length[]);
228
229/*----------------------------------------------------------------------------*/
253/*----------------------------------------------------------------------------*/
254
255void
257 const cs_lagr_injection_set_t *zis,
258 const cs_lnum_t particle_range[2],
259 const cs_lnum_t particle_face_id[],
260 const cs_real_t visc_length[]);
261
262/*----------------------------------------------------------------------------*/
294/*----------------------------------------------------------------------------*/
295
296void
297cs_user_lagr_rt(int phase_id,
298 cs_lnum_t id_p,
299 cs_real_t re_p,
300 cs_real_t uvwr,
301 cs_real_t rho_f,
302 cs_real_t rho_p,
303 cs_real_t nu_f,
304 cs_real_t *taup,
305 const cs_real_t dt);
306
307/*----------------------------------------------------------------------------*/
315/*----------------------------------------------------------------------------*/
316
317void
319 cs_real_t re_p,
320 cs_real_t uvwr,
321 cs_real_t rho_f,
322 cs_real_t rho_p,
323 cs_real_t nu_f,
324 cs_real_t cp_f,
325 cs_real_t k_f,
326 cs_real_2_t tempct,
327 const cs_real_t dt);
328
329/*----------------------------------------------------------------------------*/
364/*----------------------------------------------------------------------------*/
365
366void
368 const cs_lnum_t p_id,
369 const cs_real_t *taup,
370 const cs_real_3_t *tlag,
371 const cs_real_2_t tempct,
372 const int nor);
373
374/*----------------------------------------------------------------------------*/
378/*----------------------------------------------------------------------------*/
379
380/*----------------------------------------------------------------------------*/
387/*----------------------------------------------------------------------------*/
388
389void
391
392/*----------------------------------------------------------------------------*/
407/*----------------------------------------------------------------------------*/
408
409void
411 cs_lnum_t p_id,
412 cs_lnum_t face_id,
413 const cs_nreal_t face_u_norm[3],
414 const cs_real_t c_intersect[3],
415 cs_real_t t_intersect,
416 cs_lagr_tracking_state_t *tracking_state);
417
418/*----------------------------------------------------------------------------*/
419
420#endif /* __CS_LAGR_PROTOTYPES_H__ */
421
#define BEGIN_C_DECLS
Definition: cs_defs.h:554
double cs_real_t
Floating-point value.
Definition: cs_defs.h:357
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:374
cs_real_t cs_real_2_t[2]
vector of 2 floating-point values
Definition: cs_defs.h:373
#define END_C_DECLS
Definition: cs_defs.h:555
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:383
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:350
double cs_nreal_t
Definition: cs_defs.h:361
@ dt
Definition: cs_field_pointer.h:65
void cs_user_lagr_in_force_coords(cs_lagr_particle_set_t *particles, 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:174
void cs_user_lagr_boundary_conditions(const int itypfb[])
Define particle boundary conditions.
Definition: cs_user_lagr_boundary_conditions.cpp:65
void cs_lagr_user_boundary_interaction(cs_lagr_particle_set_t *particles, 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:91
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 *vagaus, 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:87
void cs_user_lagr_extra_operations(const cs_real_t dt[])
User function (non-mandatory intervention)
Definition: cs_user_lagr_particle.cpp:116
void cs_user_lagr_volume_conditions(void)
Define particle volume conditions.
Definition: cs_user_lagr_volume_conditions.cpp:63
void cs_user_lagr_imposed_motion(const cs_lagr_particle_set_t *particles, 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:138
void cs_lagr_user_internal_interaction(cs_lagr_particle_set_t *particles, 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:87
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_in(cs_lagr_particle_set_t *particles, 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:213
void cs_user_lagr_rt_t(cs_lnum_t id_p, 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:310
void cs_user_lagr_rt(int phase_id, cs_lnum_t id_p, 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:270
void cs_user_lagr_model(void)
Definition: cs_user_lagr_model.cpp:59
cs_lagr_tracking_state_t
Definition: cs_lagr_tracking.h:54
Definition: cs_lagr.h:597
Definition: cs_lagr_particle.h:226