My Project
programmer's documentation
Enumerations | Functions | Variables
cs_post_util.h File Reference
#include "cs_defs.h"
#include "cs_mesh_location.h"
#include "cs_field_operator.h"
Include dependency graph for cs_post_util.h:

Go to the source code of this file.

Enumerations

enum  cs_post_util_type_t { CS_POST_UTIL_Q_CRITERION, CS_POST_UTIL_BOUNDARY_CLASS_ID, CS_POST_UTIL_N_TYPES }
 

Functions

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. More...
 
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. More...
 
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. More...
 
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) More...
 
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 boundary. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Variables

int cs_glob_post_util_flag []
 

Enumeration Type Documentation

◆ cs_post_util_type_t

Enumerator
CS_POST_UTIL_Q_CRITERION 

Q-criterion output

CS_POST_UTIL_BOUNDARY_CLASS_ID 

Boundary zone class id output

CS_POST_UTIL_N_TYPES 

Number of post utility types

Function Documentation

◆ 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.

Here, the input points to string describing a selection criterion.

Parameters
[in]inputpointer to selection criterion
[out]n_eltsnumber of selected coordinates
[out]coordscoordinates of selected elements.

\param[out] s curvilinear coordinates of selected elements

Here, the input points to string describing a selection criterion.

Parameters
[in]inputpointer to selection criterion
[out]n_eltsnumber of selected coordinates
[out]coordscoordinates of selected elements.

\param[out] s curvilinear coordinates of selected elements

◆ 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.

This selection function may be used as a probe set definition function for postprocessing.

In this case, the input points to a real array containing the segment's start and end coordinates.

Note: the input pointer must point to valid data when this selection function is called, so either:

  • that value or structure should not be temporary (i.e. local);
  • post-processing output must be ensured using cs_post_write_meshes() with a fixed-mesh writer before the data pointed to goes out of scope;

The caller is responsible for freeing the returned cell_ids array. When passed to postprocessing mesh or probe set definition functions, this is handled automatically.

Parameters
[in]inputpointer to segment start and end: [x0, y0, z0, x1, y1, z1]
[out]n_eltsnumber of selected coordinates
[out]coordscoordinates of selected elements.
[out]scurvilinear coordinates of selected elements

◆ 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.

This selection function may be used as an elements selection function for postprocessing.

In this case, the input points to a real array containing the segment's start and end coordinates.

Note: the input pointer must point to valid data when this selection function is called, so either:

  • that value or structure should not be temporary (i.e. local);
  • post-processing output must be ensured using cs_post_write_meshes() with a fixed-mesh writer before the data pointed to goes out of scope;

The caller is responsible for freeing the returned cell_ids array. When passed to postprocessing mesh or probe set definition functions, this is handled automatically.

Parameters
[in]inputpointer to segment start and end: [x0, y0, z0, x1, y1, z1]
[out]n_cellsnumber of selected cells
[out]cell_idsarray of selected cell ids (0 to n-1 numbering)

◆ 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.

Parameters
[in]n_b_facesnumber of faces
[in]b_face_idslist of faces (0 to n-1)
[out]prespressure on a specific boundary region
[in]n_b_facesnumber of faces
[in]b_face_idslist of faces (0 to n-1)
[in]hyd_p_flagflag for hydrostatic pressure
[in]f_extexterior force generating the hydrostatic pressure
[out]prespressure on a specific boundary region

◆ 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.

The flux is counted negatively through the normal.

Parameters
[in]scalar_namescalar name
[in]n_loc_b_facesnumber of selected boundary faces
[in]b_face_idsids of selected boundary faces
[out]b_face_fluxsurface flux through selected faces

◆ 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.

Parameters
[in]interpolation_typeinterpolation type for turbulent kinetic energy field
[in]n_cellsnumber of points
[in]cell_idscell location of points (indexed from 0 to n-1)
[in]coordspoint coordinates
[out]rstReynolds stresses stored as vector [r11,r22,r33,r12,r23,r13]

◆ 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 boundary.

Parameters
[in]n_b_facesnumber of faces
[in]b_face_idslist of faces (0 to n-1)
[in]axisaxis
Returns
couple about the axis

◆ 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.

\[ Q = \tens{\Omega}:\tens{\Omega} - \deviator{ \left(\tens{S} \right)}:\deviator{ \left(\tens{S} \right)} \]

where $\tens{\Omega}$ is the vorticity tensor and $\deviator{ \left(\tens{S} \right)}$ the deviatoric of the rate of strain tensor.

Parameters
[in]n_loc_cellsnumber of cells
[in]cell_idslist of cells (0 to n-1)
[out]q_critQ-criterion over the specified volume region.

◆ 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.

Parameters
[in]n_b_facesnumber of faces
[in]b_face_idslist of faces (0 to n-1)
[out]stresstangential stress on the specific boundary

◆ 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)

Parameters
[in]criteria_inselection criteria of turbomachinery suction
[in]location_inmesh location of turbomachinery suction
[in]criteria_outselection criteria of turbomachinery discharge
[in]location_outmesh location of turbomachinery discharge
Returns
turbomachinery head

Variable Documentation

◆ cs_glob_post_util_flag

int cs_glob_post_util_flag[]

Names of post utility outputs