My Project
programmer's documentation
cs_post_util.h
Go to the documentation of this file.
1 #ifndef __CS_POST_UTIL_H__
2 #define __CS_POST_UTIL_H__
3 
4 /*============================================================================
5  * Postprocessing utility functions.
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 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 #include "cs_mesh_location.h"
36 #include "cs_field_operator.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*=============================================================================
43  * Type Definitions
44  *============================================================================*/
45 
46 typedef enum {
47 
55 
56 /*============================================================================
57  * Global variables
58  *============================================================================*/
59 
62 extern int cs_glob_post_util_flag[];
63 
64 /*============================================================================
65  * Public function prototypes
66  *============================================================================*/
67 
68 /*----------------------------------------------------------------------------*/
93 /*----------------------------------------------------------------------------*/
94 
95 void
97  cs_lnum_t *n_cells,
98  cs_lnum_t **cell_ids);
99 
100 /*----------------------------------------------------------------------------*/
127 /*----------------------------------------------------------------------------*/
128 
129 void
131  cs_lnum_t *n_elts,
133  cs_real_t **s);
134 
135 /*----------------------------------------------------------------------------*/
148 void
150  cs_lnum_t *n_elts,
152  cs_real_t **s);
153 
154 /*----------------------------------------------------------------------------*/
165 /*----------------------------------------------------------------------------*/
166 
167 cs_real_t
168 cs_post_turbomachinery_head(const char *criteria_in,
169  cs_mesh_location_type_t location_in,
170  const char *criteria_out,
171  cs_mesh_location_type_t location_out);
172 
173 /*----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------*/
185 
186 cs_real_t
188  const cs_lnum_t b_face_ids[],
189  cs_real_t axis[3]);
190 
191 /*----------------------------------------------------------------------------*/
200 /*----------------------------------------------------------------------------*/
201 
202 void
204  const cs_lnum_t b_face_ids[],
205  cs_real_3_t stress[]);
206 
207 /*----------------------------------------------------------------------------*/
215 /*----------------------------------------------------------------------------*/
216 
217 void
218 cs_post_b_pressure(cs_lnum_t n_b_faces,
219  const cs_lnum_t b_face_ids[],
220  cs_real_t pres[]);
221 
222 /*----------------------------------------------------------------------------*/
235 /*----------------------------------------------------------------------------*/
236 
237 void
239  cs_lnum_t n_cells,
240  const cs_lnum_t cell_ids[],
241  const cs_real_3_t *coords,
242  cs_real_6_t *rst);
243 
244 /*----------------------------------------------------------------------------*/
261 /*----------------------------------------------------------------------------*/
262 
263 void
264 cs_post_q_criterion(const cs_lnum_t n_loc_cells,
265  const cs_lnum_t cell_ids[],
266  cs_real_t q_crit[]);
267 
268 /*----------------------------------------------------------------------------*/
279 /*----------------------------------------------------------------------------*/
280 
281 void
282 cs_post_boundary_flux(const char *scalar_name,
283  cs_lnum_t n_loc_b_faces,
284  const cs_lnum_t b_face_ids[],
285  cs_real_t b_face_flux[]);
286 
287 /*----------------------------------------------------------------------------*/
288 
290 
291 #endif /* __CS_POST_UTIL_H__ */
cs_mesh_location_type_t
cs_mesh_location_type_t
Definition: cs_mesh_location.h:60
cs_post_boundary_flux
void cs_post_boundary_flux(const char *scalar_name, cs_lnum_t n_loc_b_faces, const cs_lnum_t b_face_ids[], cs_real_t b_face_flux[])
Compute scalar flux on a specific boundary region.
Definition: cs_post_util.c:844
input
static int input(void)
cs_defs.h
cs_post_moment_of_force
cs_real_t cs_post_moment_of_force(cs_lnum_t n_b_faces, const cs_lnum_t b_face_ids[], cs_real_t axis[3])
Compute the magnitude of a moment of force torque) given an axis and the stress on a specific boundar...
Definition: cs_post_util.c:554
cs_post_b_pressure
void cs_post_b_pressure(cs_lnum_t n_b_faces, const cs_lnum_t b_face_ids[], cs_real_t pres[])
Compute pressure on a specific boundary region.
Definition: cs_post_util.c:633
CS_POST_UTIL_BOUNDARY_CLASS_ID
Definition: cs_post_util.h:50
cs_glob_post_util_flag
int cs_glob_post_util_flag[]
cs_post_evm_reynolds_stresses
void cs_post_evm_reynolds_stresses(cs_field_interpolate_t interpolation_type, cs_lnum_t n_cells, const cs_lnum_t cell_ids[], const cs_real_3_t *coords, cs_real_6_t *rst)
Compute Reynolds stresses in case of Eddy Viscosity Models.
Definition: cs_post_util.c:720
cs_real_3_t
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:315
cs_post_util_type_t
cs_post_util_type_t
Definition: cs_post_util.h:46
cs_cell_segment_intersect_select
void cs_cell_segment_intersect_select(void *input, cs_lnum_t *n_cells, cs_lnum_t **cell_ids)
Select cells cut by a given segment.
Definition: cs_post_util.c:144
cs_post_stress_tangential
void cs_post_stress_tangential(cs_lnum_t n_b_faces, const cs_lnum_t b_face_ids[], cs_real_3_t stress[])
Compute tangential stress on a specific boundary.
Definition: cs_post_util.c:592
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_field_interpolate_t
cs_field_interpolate_t
Field interpolation modes.
Definition: cs_field_operator.h:54
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
CS_POST_UTIL_N_TYPES
Definition: cs_post_util.h:52
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_post_q_criterion
void cs_post_q_criterion(const cs_lnum_t n_loc_cells, const cs_lnum_t cell_ids[], cs_real_t q_crit[])
Compute the Q-criterion from Hunt et. al over each cell of a specified volume region.
Definition: cs_post_util.c:800
cs_field_operator.h
cs_cell_segment_intersect_probes_define
void cs_cell_segment_intersect_probes_define(void *input, cs_lnum_t *n_elts, cs_real_3_t **coords, cs_real_t **s)
Define probes based on the centers of cells intersected by a given segment.
Definition: cs_post_util.c:314
cs_b_face_criterion_probes_define
void cs_b_face_criterion_probes_define(void *input, cs_lnum_t *n_elts, cs_real_3_t **coords, cs_real_t **s)
Define a profile based on centers of faces defined by a given criterion.
Definition: cs_post_util.c:370
cs_real_6_t
cs_real_t cs_real_6_t[6]
vector of 6 floating-point values
Definition: cs_defs.h:317
cs_post_turbomachinery_head
cs_real_t cs_post_turbomachinery_head(const char *criteria_in, cs_mesh_location_type_t location_in, const char *criteria_out, cs_mesh_location_type_t location_out)
Compute the head of a turbomachinery (total pressure increase)
Definition: cs_post_util.c:420
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
CS_POST_UTIL_Q_CRITERION
Definition: cs_post_util.h:48
cs_mesh_location.h
coords
void const cs_int_t const cs_real_t const cs_real_t * coords
Definition: cs_measures_util.h:360