8.2
general documentation
Loading...
Searching...
No Matches
cs_equation_bc.h
Go to the documentation of this file.
1#ifndef __CS_EQUATION_BC_H__
2#define __CS_EQUATION_BC_H__
3
4/*============================================================================
5 * Functions to handle the evaluation of boundary conditions when building the
6 * algebraic system in CDO/HHO schemes
7 *============================================================================*/
8
9/*
10 This file is part of code_saturne, a general-purpose CFD tool.
11
12 Copyright (C) 1998-2024 EDF S.A.
13
14 This program is free software; you can redistribute it and/or modify it under
15 the terms of the GNU General Public License as published by the Free Software
16 Foundation; either version 2 of the License, or (at your option) any later
17 version.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 details.
23
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26 Street, Fifth Floor, Boston, MA 02110-1301, USA.
27*/
28
29/*----------------------------------------------------------------------------
30 * Local headers
31 *----------------------------------------------------------------------------*/
32
33#include "cs_cdo_bc.h"
34#include "cs_cdo_connect.h"
35#include "cs_cdo_quantities.h"
36#include "cs_cdo_local.h"
37#include "cs_equation_param.h"
38#include "cs_time_step.h"
39#include "cs_xdef_eval.h"
40
41/*----------------------------------------------------------------------------*/
42
44
45/*============================================================================
46 * Macro definitions
47 *============================================================================*/
48
49/*============================================================================
50 * Type definitions
51 *============================================================================*/
52
53/*----------------------------------------------------------------------------*/
65/*----------------------------------------------------------------------------*/
66
67typedef void
68(cs_cdo_apply_boundary_t)(short int f,
69 const cs_equation_param_t *eqp,
70 const cs_cell_mesh_t *cm,
71 const cs_property_data_t *pty,
73 cs_cell_sys_t *csys);
74
75/*----------------------------------------------------------------------------*/
86/*----------------------------------------------------------------------------*/
87
88typedef void
90 const cs_cell_mesh_t *cm,
92 cs_hodge_t *hodge,
94 cs_cell_sys_t *csys);
95
96/*============================================================================
97 * Public function prototypes
98 *============================================================================*/
99
100/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113void
115 const cs_cdo_quantities_t *cdoq,
116 const cs_equation_param_t *eqp,
117 cs_real_t *values);
118
119/*----------------------------------------------------------------------------*/
133/*----------------------------------------------------------------------------*/
134
135void
137 const cs_equation_param_t *eqp,
138 const cs_cdo_bc_face_t *face_bc,
139 const cs_flag_t vtx_bc_flag[],
140 const cs_real_t dir_values[],
141 cs_real_t t_eval,
142 cs_cell_sys_t *csys,
144
145/*----------------------------------------------------------------------------*/
157/*----------------------------------------------------------------------------*/
158
159void
161 const cs_equation_param_t *eqp,
162 const cs_cdo_bc_face_t *face_bc,
163 const cs_real_t dir_values[],
164 cs_cell_sys_t *csys,
166
167/*----------------------------------------------------------------------------*/
179/*----------------------------------------------------------------------------*/
180
181void
183 const cs_equation_param_t *eqp,
184 const cs_cdo_bc_face_t *face_bc,
185 const cs_real_t dir_values[],
186 cs_cell_sys_t *csys,
188
189/*----------------------------------------------------------------------------*/
201/*----------------------------------------------------------------------------*/
202
203void
205 const cs_equation_param_t *eqp,
206 const cs_cdo_bc_face_t *face_bc,
207 const cs_real_t dir_values[],
208 cs_cell_sys_t *csys,
210
211
212/*----------------------------------------------------------------------------*/
222/*----------------------------------------------------------------------------*/
223
224void
226 const cs_cdo_bc_face_t *face_bc,
227 cs_flag_t *vflag);
228
229/*----------------------------------------------------------------------------*/
239/*----------------------------------------------------------------------------*/
240
241void
243 const cs_cdo_bc_face_t *face_bc,
244 cs_flag_t *edge_flag);
245
246/*----------------------------------------------------------------------------*/
260/*----------------------------------------------------------------------------*/
261
262void
264 const cs_mesh_t *mesh,
265 const cs_cdo_quantities_t *quant,
266 const cs_cdo_connect_t *connect,
267 const cs_equation_param_t *eqp,
268 const cs_cdo_bc_face_t *face_bc,
269 cs_flag_t *bcflag,
270 cs_real_t *values);
271
272/*----------------------------------------------------------------------------*/
286/*----------------------------------------------------------------------------*/
287
288void
290 const cs_cdo_quantities_t *quant,
291 const cs_cdo_connect_t *connect,
292 const cs_equation_param_t *eqp,
293 const cs_cdo_bc_face_t *face_bc,
294 cs_real_t t_eval,
295 cs_real_t *values);
296
297/*----------------------------------------------------------------------------*/
310/*----------------------------------------------------------------------------*/
311
312void
314 short int def_id,
315 short int f,
316 const cs_equation_param_t *eqp,
317 const cs_cell_mesh_t *cm,
318 double *neu_values);
319
320/*----------------------------------------------------------------------------*/
333/*----------------------------------------------------------------------------*/
334
335void
337 short int def_id,
338 short int f,
339 const cs_equation_param_t *eqp,
340 const cs_cell_mesh_t *cm,
341 double *neu_values);
342
343/*----------------------------------------------------------------------------*/
356/*----------------------------------------------------------------------------*/
357
358void
360 short int def_id,
361 short int f,
362 const cs_equation_param_t *eqp,
363 const cs_cell_mesh_t *cm,
364 double *neu_values);
365
366/*----------------------------------------------------------------------------*/
379/*----------------------------------------------------------------------------*/
380
381void
383 short int def_id,
384 short int f,
385 const cs_equation_param_t *eqp,
386 const cs_cell_mesh_t *cm,
387 double *neu_values);
388
389/*----------------------------------------------------------------------------*/
402/*----------------------------------------------------------------------------*/
403
404void
406 short int def_id,
407 short int f,
408 const cs_equation_param_t *eqp,
409 const cs_cell_mesh_t *cm,
410 double *neu_values);
411
412/*----------------------------------------------------------------------------*/
424/*----------------------------------------------------------------------------*/
425
426void
428 short int def_id,
429 short int f,
430 const cs_equation_param_t *eqp,
431 const cs_cell_mesh_t *cm,
432 double *rob_values);
433
434/*----------------------------------------------------------------------------*/
448/*----------------------------------------------------------------------------*/
449
450void
452 const cs_mesh_t *mesh,
453 const cs_cdo_quantities_t *quant,
454 const cs_cdo_connect_t *connect,
455 const cs_equation_param_t *eqp,
456 cs_real_t *values);
457
458/*----------------------------------------------------------------------------*/
465/*----------------------------------------------------------------------------*/
466
467void
469
470/*----------------------------------------------------------------------------*/
471
473
474#endif /* __CS_EQUATION_BC_H__ */
#define BEGIN_C_DECLS
Definition cs_defs.h:528
double cs_real_t
Floating-point value.
Definition cs_defs.h:332
#define END_C_DECLS
Definition cs_defs.h:529
unsigned short int cs_flag_t
Definition cs_defs.h:334
void cs_equation_bc_set_edge_flag(const cs_cdo_connect_t *connect, const cs_cdo_bc_face_t *face_bc, cs_flag_t *edge_flag)
Define an array of flags for each edge collecting the flags of associated boundary faces.
Definition cs_equation_bc.c:868
void cs_equation_bc_dirichlet_at_vertices(cs_real_t t_eval, const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, cs_flag_t *bcflag, cs_real_t *values)
Compute the values of the Dirichlet BCs when DoFs are attached to vertices.
Definition cs_equation_bc.c:932
void cs_equation_bc_set_cw_eb(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Set the BC into a cellwise view of the current system. Case of edge-based schemes.
Definition cs_equation_bc.c:516
void cs_equation_bc_dirichlet_at_faces(const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, cs_real_t t_eval, cs_real_t *values)
Compute the values of the Dirichlet BCs at boundary faces. This can be applied to CDO face-based sche...
Definition cs_equation_bc.c:1133
void cs_equation_bc_cw_robin(cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *rob_values)
Compute the values of the Robin BCs for a face (cell-wise compute relying on the cs_cell_mesh_t struc...
Definition cs_equation_bc.c:1894
void cs_equation_compute_neumann_svb(cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to a vertex-based sche...
Definition cs_equation_bc.c:1366
void cs_equation_bc_circulation_at_edges(cs_real_t t_eval, const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, cs_real_t *values)
Compute the values of the circulation along primal edges lying on the domain boundary (the integral o...
Definition cs_equation_bc.c:1998
void cs_equation_bc_update_for_increment(cs_cell_sys_t *csys)
Update the boundary conditions to fullfill the constraint when an incremental solve is set.
Definition cs_equation_bc.c:2085
void cs_equation_compute_neumann_sfb(cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs when DoFs are attached to the face f. Case of scalar-valued equ...
Definition cs_equation_bc.c:1592
void cs_cdo_enforce_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_hodge_t *hodge, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Enforcement of a boundary condition (Dirichlet, Robin, sliding...)
Definition cs_equation_bc.h:89
void cs_equation_compute_neumann_vfb(cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs at the face f when DoFs are attached to faces....
Definition cs_equation_bc.c:1791
void cs_equation_bc_set_cw_vb(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_flag_t vtx_bc_flag[], const cs_real_t dir_values[], cs_real_t t_eval, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Set the BC into a cellwise view of the current system. Case of vertex-based schemes.
Definition cs_equation_bc.c:399
void cs_cdo_apply_boundary_t(short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply a boundary condition for a given face (inlet, outlet, wall, sliding wall, symmetry....
Definition cs_equation_bc.h:68
void cs_equation_bc_set_cw_fb(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Set the BC into a cellwise view of the current system. Case of Face-based schemes.
Definition cs_equation_bc.c:591
void cs_equation_compute_full_neumann_svb(cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to a vertex-based sche...
Definition cs_equation_bc.c:1479
void cs_equation_bc_set_vertex_flag(const cs_cdo_connect_t *connect, const cs_cdo_bc_face_t *face_bc, cs_flag_t *vflag)
Define an array of flags for each vertex collecting the flags of associated boundary faces.
Definition cs_equation_bc.c:808
void cs_equation_compute_full_neumann_sfb(cs_real_t t_eval, short int def_id, short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs when DoFs are attached to the face f. Case of scalar-valued equ...
Definition cs_equation_bc.c:1690
void cs_equation_bc_init_boundary_flux(cs_real_t t_eval, const cs_cdo_quantities_t *cdoq, const cs_equation_param_t *eqp, cs_real_t *values)
Set the values for the normal boundary flux stemming from the Neumann boundary conditions (zero is le...
Definition cs_equation_bc.c:311
void cs_equation_bc_set_cw_cb(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_cdo_bc_face_t *face_bc, const cs_real_t dir_values[], cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Set the BC into a cellwise view of the current system. Case of Face-based schemes.
Definition cs_equation_bc.c:711
@ fm
Definition cs_field_pointer.h:127
Definition mesh.f90:26
Definition cs_cdo_bc.h:109
Definition cs_cdo_connect.h:61
Definition cs_cdo_quantities.h:137
Set of local and temporary buffers.
Definition cs_cdo_local.h:60
Set of local quantities and connectivities related to a mesh cell.
Definition cs_cdo_local.h:203
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition cs_cdo_local.h:147
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition cs_equation_param.h:193
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition cs_cdo_local.h:279
Structure associated to a discrete Hodge operator *.
Definition cs_hodge.h:183
Definition cs_mesh.h:85
Structure storing the evaluation of a property and its related data.
Definition cs_property.h:223