8.0
general documentation
Loading...
Searching...
No Matches
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-2023 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/*----------------------------------------------------------------------------*/
73/*----------------------------------------------------------------------------*/
74
75void
77 const cs_real_t taup[],
78 const cs_real_3_t tlag[],
79 const cs_real_3_t piil[],
80 const cs_real_33_t bx[],
81 const cs_real_t tsfext[],
82 const cs_real_33_t vagaus[],
83 const cs_real_3_t gradpr[],
84 const cs_real_33_t gradvf[],
85 cs_real_t rho_p[],
86 cs_real_3_t fextla[]);
87
88/*----------------------------------------------------------------------------*/
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/*---------------------------------------------------------------------------*/
120/*
121 * \brief User function of the Lagrangian particle-tracking module
122 *
123 * User input of physical, numerical and post-processing options.
124 */
125/*----------------------------------------------------------------------------*/
126
127void
129
130/*----------------------------------------------------------------------------*/
138/*----------------------------------------------------------------------------*/
139
140void
142 cs_real_t re_p,
143 cs_real_t uvwr,
144 cs_real_t rho_f,
145 cs_real_t rho_p,
146 cs_real_t nu_f,
147 cs_real_t taup[],
148 const cs_real_t dt[]);
149
150/*----------------------------------------------------------------------------*/
158/*----------------------------------------------------------------------------*/
159
160void
162 cs_real_t re_p,
163 cs_real_t uvwr,
164 cs_real_t rho_f,
165 cs_real_t rho_p,
166 cs_real_t nu_f,
167 cs_real_t cp_f,
168 cs_real_t k_f,
169 cs_real_t tauc[],
170 const cs_real_t dt[]);
171
172/*----------------------------------------------------------------------------*/
183/*----------------------------------------------------------------------------*/
184
185void
187 const cs_real_t dt,
188 cs_real_t disp[3]);
189
190/*----------------------------------------------------------------------------*/
198/*----------------------------------------------------------------------------*/
199
200void
202
203/*----------------------------------------------------------------------------*/
233/*----------------------------------------------------------------------------*/
234
235void
237 cs_real_t taup[],
238 cs_real_3_t tlag[],
239 cs_real_t tempct[]);
240
241/*----------------------------------------------------------------------------*/
250/*----------------------------------------------------------------------------*/
251
252void
253cs_user_lagr_boundary_conditions(const int itypfb[]);
254
255/*----------------------------------------------------------------------------*/
272/*----------------------------------------------------------------------------*/
273
274void
276 cs_lnum_t p_id,
277 cs_lnum_t face_id,
278 const cs_real_t face_norm[3],
279 const cs_real_t c_intersect[3],
280 cs_real_t t_intersect,
281 int b_zone_id,
282 int *event_flag,
283 cs_lagr_tracking_state_t *tracking_state);
284
285/*----------------------------------------------------------------------------*/
292/*----------------------------------------------------------------------------*/
293
294void
296
297/*----------------------------------------------------------------------------*/
312/*----------------------------------------------------------------------------*/
313
314void
316 cs_lnum_t p_id,
317 cs_lnum_t face_id,
318 const cs_real_t face_norm[3],
319 const cs_real_t c_intersect[3],
320 cs_real_t t_intersect,
321 cs_lagr_tracking_state_t *tracking_state);
322
323/*----------------------------------------------------------------------------*/
324
325#endif /* __CS_LAGR_PROTOTYPES_H__ */
326
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition cs_defs.h:341
#define BEGIN_C_DECLS
Definition cs_defs.h:509
double cs_real_t
Floating-point value.
Definition cs_defs.h:319
#define END_C_DECLS
Definition cs_defs.h:510
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:313
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition cs_defs.h:332
@ dt
Definition cs_field_pointer.h:65
void cs_user_lagr_imposed_motion(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.c:146
void cs_user_lagr_boundary_conditions(const int itypfb[])
Define particle boundary conditions.
Definition cs_user_lagr_boundary_conditions.c: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.c:283
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.c:93
void cs_user_lagr_extra_operations(const cs_real_t dt[])
User function (non-mandatory intervention)
Definition cs_user_lagr_particle.c:126
void cs_user_lagr_volume_conditions(void)
Define particle volume conditions.
Definition cs_user_lagr_volume_conditions.c: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.c: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.c:239
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.c:340
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.c:181
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.c:89
void cs_user_lagr_model(void)
Definition cs_user_lagr_model.c:53
cs_lagr_tracking_state_t
Definition cs_lagr_tracking.h:54
Definition cs_lagr.h:560
Definition cs_lagr_particle.h:222