My Project
programmer's documentation
Loading...
Searching...
No Matches
cs_boundary.h
Go to the documentation of this file.
1#ifndef __CS_BOUNDARY_H__
2#define __CS_BOUNDARY_H__
3
4/*============================================================================
5 * Handle the boundaries of a computational domain
6 *============================================================================*/
7
8/*
9 This file is part of Code_Saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2019 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 * Local headers
30 *----------------------------------------------------------------------------*/
31
32#include "cs_base.h"
33#include "cs_defs.h"
34
35/*----------------------------------------------------------------------------*/
36
38
39/*============================================================================
40 * Macro definitions
41 *============================================================================*/
42
43/* Name of the boundary zone gathering all domain boundary walls */
44#define CS_BOUNDARY_WALLS_NAME "cs_boundary_walls"
45
46/*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50/* Physic-driven boundary */
72
86
87/*============================================================================
88 * Static global variables
89 *============================================================================*/
90
91extern cs_boundary_t *cs_glob_boundaries; /* Pointer to the shared boundaries
92 * on the computational domain */
93
94/*============================================================================
95 * Public function prototypes
96 *============================================================================*/
97
98/*----------------------------------------------------------------------------*/
106/*----------------------------------------------------------------------------*/
107
108const char *
110
111/*----------------------------------------------------------------------------*/
120/*----------------------------------------------------------------------------*/
121
122bool
124
125/*----------------------------------------------------------------------------*/
134/*----------------------------------------------------------------------------*/
135
136int
138 int z_id);
139
140/*----------------------------------------------------------------------------*/
148/*----------------------------------------------------------------------------*/
149
150void
152 cs_boundary_type_t type);
153
154/*----------------------------------------------------------------------------*/
162/*----------------------------------------------------------------------------*/
163
166
167/*----------------------------------------------------------------------------*/
173/*----------------------------------------------------------------------------*/
174
175void
176cs_boundary_free(cs_boundary_t **p_boundaries);
177
178/*----------------------------------------------------------------------------*/
186/*----------------------------------------------------------------------------*/
187
188void
191 const char *zone_name);
192
193/*----------------------------------------------------------------------------*/
202/*----------------------------------------------------------------------------*/
203
204void
206 cs_lnum_t n_b_faces,
207 cs_boundary_type_t *bf_type);
208
209/*----------------------------------------------------------------------------*/
215/*----------------------------------------------------------------------------*/
216
217void
219
220/*----------------------------------------------------------------------------*/
226/*----------------------------------------------------------------------------*/
227
228void
230
231/*----------------------------------------------------------------------------*/
232
234
235#endif /* __CS_BOUNDARY_H__ */
cs_boundary_t * cs_boundary_create(cs_boundary_type_t type)
Create a default boundary structure for the computational domain.
Definition cs_boundary.c:336
void cs_boundary_set_default(cs_boundary_t *boundaries, cs_boundary_type_t type)
Set the default boundary related to the given cs_boundary_t structure.
Definition cs_boundary.c:310
void cs_boundary_free(cs_boundary_t **p_boundaries)
Free all metadate related to the domain boundaries.
Definition cs_boundary.c:359
const char * cs_boundary_get_name(cs_boundary_type_t type)
Get the name of the domain boundary condition.
Definition cs_boundary.c:239
void cs_boundary_add(cs_boundary_t *bdy, cs_boundary_type_t type, const char *zone_name)
Add a new boundary type for a given boundary zone.
Definition cs_boundary.c:383
cs_boundary_type_t
Definition cs_boundary.h:51
@ CS_BOUNDARY_ALE_EXTERNAL_COUPLING
Definition cs_boundary.h:66
@ CS_BOUNDARY_ALE_IMPOSED_DISP
Definition cs_boundary.h:64
@ CS_BOUNDARY_PRESSURE_INLET_OUTLET
Definition cs_boundary.h:57
@ CS_BOUNDARY_OUTLET
Definition cs_boundary.h:56
@ CS_BOUNDARY_ALE_SLIDING
Definition cs_boundary.h:62
@ CS_BOUNDARY_N_TYPES
Definition cs_boundary.h:69
@ CS_BOUNDARY_ALE_FIXED
Definition cs_boundary.h:61
@ CS_BOUNDARY_ALE_INTERNAL_COUPLING
Definition cs_boundary.h:65
@ CS_BOUNDARY_SYMMETRY
Definition cs_boundary.h:58
@ CS_BOUNDARY_ALE_IMPOSED_VEL
Definition cs_boundary.h:63
@ CS_BOUNDARY_INLET
Definition cs_boundary.h:55
@ CS_BOUNDARY_SLIDING_WALL
Definition cs_boundary.h:54
@ CS_BOUNDARY_ALE_FREE_SURFACE
Definition cs_boundary.h:67
@ CS_BOUNDARY_WALL
Definition cs_boundary.h:53
int cs_boundary_id_by_zone_id(const cs_boundary_t *boundaries, int z_id)
Retrieve the related id associated to a boundary from its zone id.
Definition cs_boundary.c:284
void cs_boundary_log_setup(const cs_boundary_t *bdy)
Summarize the setup of the boundary of the computational domain.
Definition cs_boundary.c:481
void cs_boundary_def_wall_zones(cs_boundary_t *boundaries)
Add a new zone gathering all CS_BOUNDARY_WALL zone type.
Definition cs_boundary.c:452
cs_boundary_t * cs_glob_boundaries
void cs_boundary_build_type_array(const cs_boundary_t *boundaries, cs_lnum_t n_b_faces, cs_boundary_type_t *bf_type)
Build an array on boundary faces which specify the type of boundary for each face.
Definition cs_boundary.c:422
bool cs_boundary_has_pressure_boundary(const cs_boundary_t *boundaries)
Check if there is a pressure-related boundary among the prescribed bounadries.
Definition cs_boundary.c:259
#define BEGIN_C_DECLS
Definition cs_defs.h:467
#define END_C_DECLS
Definition cs_defs.h:468
int cs_lnum_t
local mesh entity id
Definition cs_defs.h:298
Structure storing information related to the "physical" boundaries that one want to set on the comput...
Definition cs_boundary.h:77
cs_boundary_type_t default_type
Definition cs_boundary.h:79
int n_boundaries
Definition cs_boundary.h:81
int * zone_ids
Definition cs_boundary.h:83
cs_boundary_type_t * types
Definition cs_boundary.h:82