8.3
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-2024 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 "cs_base.h"
35#include "cs_mesh.h"
36#include "cs_mesh_quantities.h"
37#include "cs_mesh_bad_cells.h"
38
39#include "cs_domain.h"
40
41#include "cs_lagr.h"
42#include "cs_lagr_tracking.h"
43#include "cs_lagr_stat.h"
44
45/*----------------------------------------------------------------------------*/
46
48
49/*============================================================================
50 * Lagrangian User function prototypes
51 *============================================================================*/
52
53/*----------------------------------------------------------------------------*/
74/*----------------------------------------------------------------------------*/
75
76void
78 const cs_real_t taup[],
79 const cs_real_3_t tlag[],
80 const cs_real_3_t piil[],
81 const cs_real_33_t bx[],
82 const cs_real_t tsfext[],
83 const cs_real_33_t vagaus[],
84 const cs_real_3_t gradpr[],
85 const cs_real_33_t gradvf[],
86 cs_real_t rho_p[],
87 cs_real_3_t fextla[]);
88
89/*----------------------------------------------------------------------------*/
110/*----------------------------------------------------------------------------*/
111
112void
114 const cs_lagr_injection_set_t *zis,
115 const cs_lnum_t particle_range[2],
116 const cs_lnum_t particle_face_id[],
117 const cs_real_t visc_length[]);
118
119/*----------------------------------------------------------------------------*/
143/*----------------------------------------------------------------------------*/
144
145void
147 const cs_lagr_injection_set_t *zis,
148 const cs_lnum_t particle_range[2],
149 const cs_lnum_t particle_face_id[],
150 const cs_real_t visc_length[]);
151
152/*---------------------------------------------------------------------------*/
153/*
154 * \brief User function of the Lagrangian particle-tracking module
155 *
156 * User input of physical, numerical and post-processing options.
157 */
158/*----------------------------------------------------------------------------*/
159
160void
162
163/*----------------------------------------------------------------------------*/
171/*----------------------------------------------------------------------------*/
172
173void
175 cs_real_t re_p,
176 cs_real_t uvwr,
177 cs_real_t rho_f,
178 cs_real_t rho_p,
179 cs_real_t nu_f,
180 cs_real_t taup[],
181 const cs_real_t dt[]);
182
183/*----------------------------------------------------------------------------*/
191/*----------------------------------------------------------------------------*/
192
193void
195 cs_real_t re_p,
196 cs_real_t uvwr,
197 cs_real_t rho_f,
198 cs_real_t rho_p,
199 cs_real_t nu_f,
200 cs_real_t cp_f,
201 cs_real_t k_f,
202 cs_real_t tauc[],
203 const cs_real_t dt[]);
204
205/*----------------------------------------------------------------------------*/
218/*----------------------------------------------------------------------------*/
219
220void
222 cs_lnum_t p_id,
223 const cs_real_t coords[3],
224 const cs_real_t dt,
225 cs_real_t disp[3]);
226
227/*----------------------------------------------------------------------------*/
235/*----------------------------------------------------------------------------*/
236
237void
239
240/*----------------------------------------------------------------------------*/
270/*----------------------------------------------------------------------------*/
271
272void
274 cs_real_t taup[],
275 cs_real_3_t tlag[],
276 cs_real_t tempct[]);
277
278/*----------------------------------------------------------------------------*/
287/*----------------------------------------------------------------------------*/
288
289void
291
292/*----------------------------------------------------------------------------*/
309/*----------------------------------------------------------------------------*/
310
311void
313 cs_lnum_t p_id,
314 cs_lnum_t face_id,
315 const cs_real_t face_norm[3],
316 const cs_real_t c_intersect[3],
317 cs_real_t t_intersect,
318 int b_zone_id,
319 int *event_flag,
320 cs_lagr_tracking_state_t *tracking_state);
321
322/*----------------------------------------------------------------------------*/
329/*----------------------------------------------------------------------------*/
330
331void
333
334/*----------------------------------------------------------------------------*/
349/*----------------------------------------------------------------------------*/
350
351void
353 cs_lnum_t p_id,
354 cs_lnum_t face_id,
355 const cs_real_t face_norm[3],
356 const cs_real_t c_intersect[3],
357 cs_real_t t_intersect,
358 cs_lagr_tracking_state_t *tracking_state);
359
360/*----------------------------------------------------------------------------*/
361
362#endif /* __CS_LAGR_PROTOTYPES_H__ */
363
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:359
#define END_C_DECLS
Definition: cs_defs.h:543
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:368
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
@ 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:186
void cs_user_lagr_boundary_conditions(const int itypfb[])
Define particle boundary conditions.
Definition: cs_user_lagr_boundary_conditions.cpp:67
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_t tauc[], 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:329
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:93
void cs_user_lagr_extra_operations(const cs_real_t dt[])
User function (non-mandatory intervention)
Definition: cs_user_lagr_particle.cpp:126
void cs_user_lagr_volume_conditions(void)
Define particle volume conditions.
Definition: cs_user_lagr_volume_conditions.cpp:65
void cs_user_lagr_ef(cs_real_t dt_p, 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_33_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_rt(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:285
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:148
void cs_user_lagr_sde(const cs_real_t dt[], cs_real_t taup[], cs_real_3_t tlag[], cs_real_t tempct[])
User integration of the SDE for the user-defined variables.
Definition: cs_user_lagr_particle.cpp:386
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:227
void cs_lagr_user_internal_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, 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:89
void cs_user_lagr_model(void)
Definition: cs_user_lagr_model.cpp:55
cs_lagr_tracking_state_t
Definition: cs_lagr_tracking.h:54
integer, dimension(:), pointer, save itypfb
boundary condition type at the boundary face ifac (see cs_user_boundary_conditions)
Definition: pointe.f90:69
Definition: cs_lagr.h:566
Definition: cs_lagr_particle.h:223