9.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-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/*----------------------------------------------------------------------------*/
72/*----------------------------------------------------------------------------*/
73
74void
76 const cs_real_t **taup,
77 const cs_real_3_t **tlag,
78 const cs_real_3_t **piil,
79 const cs_real_33_t **bx,
80 const cs_real_t tsfext[],
81 const cs_real_33_t vagaus[],
82 cs_real_t rho_p[],
83 cs_real_3_t fextla[]);
84
85/*----------------------------------------------------------------------------*/
106/*----------------------------------------------------------------------------*/
107
108void
110 const cs_lagr_injection_set_t *zis,
111 const cs_lnum_t particle_range[2],
112 const cs_lnum_t particle_face_id[],
113 const cs_real_t visc_length[]);
114
115/*----------------------------------------------------------------------------*/
139/*----------------------------------------------------------------------------*/
140
141void
143 const cs_lagr_injection_set_t *zis,
144 const cs_lnum_t particle_range[2],
145 const cs_lnum_t particle_face_id[],
146 const cs_real_t visc_length[]);
147
148/*---------------------------------------------------------------------------*/
149/*
150 * \brief User function of the Lagrangian particle-tracking module
151 *
152 * User input of physical, numerical and post-processing options.
153 */
154/*----------------------------------------------------------------------------*/
155
156void
158
159/*----------------------------------------------------------------------------*/
167/*----------------------------------------------------------------------------*/
168
169void
171 cs_real_t re_p,
172 cs_real_t uvwr,
173 cs_real_t rho_f,
174 cs_real_t rho_p,
175 cs_real_t nu_f,
176 cs_real_t *taup,
177 const cs_real_t dt[]);
178
179/*----------------------------------------------------------------------------*/
187/*----------------------------------------------------------------------------*/
188
189void
191 cs_real_t re_p,
192 cs_real_t uvwr,
193 cs_real_t rho_f,
194 cs_real_t rho_p,
195 cs_real_t nu_f,
196 cs_real_t cp_f,
197 cs_real_t k_f,
198 cs_real_t tauc[],
199 const cs_real_t dt[]);
200
201/*----------------------------------------------------------------------------*/
214/*----------------------------------------------------------------------------*/
215
216void
218 cs_lnum_t p_id,
219 const cs_real_t coords[3],
220 const cs_real_t dt,
221 cs_real_t disp[3]);
222
223/*----------------------------------------------------------------------------*/
231/*----------------------------------------------------------------------------*/
232
233void
235
236/*----------------------------------------------------------------------------*/
266/*----------------------------------------------------------------------------*/
267
268void
270 cs_real_t **taup,
271 cs_real_3_t **tlag,
272 cs_real_t tempct[]);
273
274/*----------------------------------------------------------------------------*/
283/*----------------------------------------------------------------------------*/
284
285void
286cs_user_lagr_boundary_conditions(const int itypfb[]);
287
288/*----------------------------------------------------------------------------*/
305/*----------------------------------------------------------------------------*/
306
307void
309 cs_lnum_t p_id,
310 cs_lnum_t face_id,
311 const cs_real_t face_norm[3],
312 const cs_real_t c_intersect[3],
313 cs_real_t t_intersect,
314 int b_zone_id,
315 int *event_flag,
316 cs_lagr_tracking_state_t *tracking_state);
317
318/*----------------------------------------------------------------------------*/
325/*----------------------------------------------------------------------------*/
326
327void
329
330/*----------------------------------------------------------------------------*/
345/*----------------------------------------------------------------------------*/
346
347void
349 cs_lnum_t p_id,
350 cs_lnum_t face_id,
351 const cs_real_t face_norm[3],
352 const cs_real_t c_intersect[3],
353 cs_real_t t_intersect,
354 cs_lagr_tracking_state_t *tracking_state);
355
356/*----------------------------------------------------------------------------*/
357
358#endif /* __CS_LAGR_PROTOTYPES_H__ */
359
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition cs_defs.h:368
#define BEGIN_C_DECLS
Definition cs_defs.h:542
double cs_real_t
Floating-point value.
Definition cs_defs.h:342
#define END_C_DECLS
Definition cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:335
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition cs_defs.h:359
@ 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:180
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:323
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_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:279
void cs_user_lagr_extra_operations(const cs_real_t dt[])
User function (non-mandatory intervention)
Definition cs_user_lagr_particle.cpp:120
void cs_user_lagr_volume_conditions(void)
Define particle volume conditions.
Definition cs_user_lagr_volume_conditions.cpp:65
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:142
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:380
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[], 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:85
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:221
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
Definition cs_lagr.h:578
Definition cs_lagr_particle.h:224