My Project
programmer's documentation
|
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "fvm_selector.h"
#include "cs_interface.h"
#include "cs_base.h"
#include "cs_balance_by_zone.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_field_operator.h"
#include "cs_geom.h"
#include "cs_gradient.h"
#include "cs_gradient_perio.h"
#include "cs_join.h"
#include "cs_halo.h"
#include "cs_halo_perio.h"
#include "cs_math.h"
#include "cs_matrix_default.h"
#include "cs_mesh.h"
#include "cs_mesh_coherency.h"
#include "cs_mesh_location.h"
#include "cs_mesh_quantities.h"
#include "cs_parall.h"
#include "cs_parameters.h"
#include "cs_physical_model.h"
#include "cs_physical_constants.h"
#include "cs_post.h"
#include "cs_prototypes.h"
#include "cs_renumber.h"
#include "cs_rotation.h"
#include "cs_stokes_model.h"
#include "cs_thermal_model.h"
#include "cs_time_step.h"
#include "cs_timer.h"
#include "cs_timer_stats.h"
#include "cs_turbomachinery.h"
#include "cs_turbulence_model.h"
#include "cs_post_util.h"
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... | |
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.
[in] | input | pointer to selection criterion |
[out] | n_elts | number of selected coordinates |
[out] | coords | coordinates of selected elements. |
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:
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.
[in] | input | pointer to segment start and end: [x0, y0, z0, x1, y1, z1] |
[out] | n_elts | number of selected coordinates |
[out] | coords | coordinates of selected elements. |
[out] | s | curvilinear coordinates of selected elements |
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:
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.
[in] | input | pointer to segment start and end: [x0, y0, z0, x1, y1, z1] |
[out] | n_cells | number of selected cells |
[out] | cell_ids | array of selected cell ids (0 to n-1 numbering) |
Compute pressure on a specific boundary region.
[in] | n_b_faces | number of faces |
[in] | b_face_ids | list of faces (0 to n-1) |
[in] | hyd_p_flag | flag for hydrostatic pressure |
[in] | f_ext | exterior force generating the hydrostatic pressure |
[out] | pres | pressure on a specific boundary region |
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.
[in] | scalar_name | scalar name |
[in] | n_loc_b_faces | number of selected boundary faces |
[in] | b_face_ids | ids of selected boundary faces |
[out] | b_face_flux | surface flux through selected faces |
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.
[in] | interpolation_type | interpolation type for turbulent kinetic energy field |
[in] | n_cells | number of points |
[in] | cell_ids | cell location of points (indexed from 0 to n-1) |
[in] | coords | point coordinates |
[out] | rst | Reynolds stresses stored as vector [r11,r22,r33,r12,r23,r13] |
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.
[in] | n_b_faces | number of faces |
[in] | b_face_ids | list of faces (0 to n-1) |
[in] | axis | axis |
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.
where is the vorticity tensor and the deviatoric of the rate of strain tensor.
[in] | n_loc_cells | number of cells |
[in] | cell_ids | list of cells (0 to n-1) |
[out] | q_crit | Q-criterion over the specified volume region. |
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.
[in] | n_b_faces | number of faces |
[in] | b_face_ids | list of faces (0 to n-1) |
[out] | stress | tangential stress on the specific boundary |
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)
[in] | criteria_in | selection criteria of turbomachinery suction |
[in] | location_in | mesh location of turbomachinery suction |
[in] | criteria_out | selection criteria of turbomachinery discharge |
[in] | location_out | mesh location of turbomachinery discharge |