9.0
general documentation
Loading...
Searching...
No Matches
cs_function_default.h File Reference
#include "base/cs_defs.h"
#include "base/cs_function.h"
Include dependency graph for cs_function_default.h:

Go to the source code of this file.

Enumerations

enum  cs_function_predefined_t { CS_FUNCTION_CELL_RANK_ID , CS_FUNCTION_B_FACE_RANK_ID }

Functions

void cs_function_default_define (void)
 Define functions based on code_saturne case setup.
cs_function_tcs_function_define_mpi_rank_id (cs_mesh_location_type_t location_id)
 Create or access a function for evaluation of element's MPI rank id.
cs_function_tcs_function_define_refinement_generation (cs_mesh_location_type_t location_id)
 Create or access a function for evaluation of mesh element's refinement generation (i.e. level).
cs_function_tcs_function_define_boundary_stress_normal (void)
 Define function object for computation of normal boundary stress.
cs_function_tcs_function_define_boundary_stress_tangential (void)
 Define function object for computation of tangential boundary stress.
cs_function_tcs_function_define_boundary_thermal_flux (void)
 Define function object for computation of boundary thermal flux.
cs_function_tcs_function_define_q_criterion (void)
 Define function for computation of cell Q criterion.
void cs_function_class_or_zone_id (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Extract optional boundary face class of element zone id.
void cs_function_field_boundary_nr (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute non-reconstructed cell-based field values at boundary.
void cs_function_boundary_stress_normal (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute normal stress at boundary.
void cs_function_boundary_stress_tangential (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute tangential stress at boundary.
cs_function_tcs_function_define_boundary_nusselt (void)
 Define function for computation of boundary layer Nusselt.
void cs_function_boundary_thermal_flux (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute thermal flux at boundary (in $ W\,m^{-2} $),.
void cs_function_boundary_nusselt (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute local Nusselt number near boundary.
void cs_function_q_criterion (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute the Q-criterion from Hunt et. al over each cell of a specified volume region.
cs_function_tcs_function_define_property_cells (char *property_name)
 Define output function of a property (which is not a field).
cs_function_tcs_function_define_vorticity (cs_field_t *velocity_field)
 Define output function for the vorticity.

Enumeration Type Documentation

◆ cs_function_predefined_t

Predefined function objects

Enumerator
CS_FUNCTION_CELL_RANK_ID 

cell MPI rank id (integer)

CS_FUNCTION_B_FACE_RANK_ID 

boundary face MPI rank id (integer)

Function Documentation

◆ cs_function_boundary_nusselt()

void cs_function_boundary_nusselt ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

Compute local Nusselt number near boundary.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputignored
[in,out]valspointer to output values (size: n_elts*dimension)

◆ cs_function_boundary_stress_normal()

void cs_function_boundary_stress_normal ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

Compute normal stress at boundary.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputignored
[in,out]valspointer to output values (size: n_elts*dimension)

◆ cs_function_boundary_stress_tangential()

void cs_function_boundary_stress_tangential ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

Compute tangential stress at boundary.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputignored
[in,out]valspointer to output values (size: n_elts*dimension)

◆ cs_function_boundary_thermal_flux()

void cs_function_boundary_thermal_flux ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

Compute thermal flux at boundary (in $ W\,m^{-2} $),.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputignored
[in,out]valspointer to output values (size: n_elts*dimension)

◆ cs_function_class_or_zone_id()

void cs_function_class_or_zone_id ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

Extract optional boundary face class of element zone id.

For boundary faces, if no face classes have been defined by cs_boundary_zone_face_class_id the highest boundary face zone id is

For cells, the highest cell volume zone id is used.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputpointer to field
[in,out]valspointer to output values (size: n_elts*dimension)

◆ cs_function_default_define()

void cs_function_default_define ( void )

Define functions based on code_saturne case setup.

◆ cs_function_define_boundary_nusselt()

cs_function_t * cs_function_define_boundary_nusselt ( void )

Define function for computation of boundary layer Nusselt.

Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_boundary_stress_normal()

cs_function_t * cs_function_define_boundary_stress_normal ( void )

Define function object for computation of normal boundary stress.

Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_boundary_stress_tangential()

cs_function_t * cs_function_define_boundary_stress_tangential ( void )

Define function object for computation of tangential boundary stress.

Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_boundary_thermal_flux()

cs_function_t * cs_function_define_boundary_thermal_flux ( void )

Define function object for computation of boundary thermal flux.

Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_mpi_rank_id()

cs_function_t * cs_function_define_mpi_rank_id ( cs_mesh_location_type_t location_id)

Create or access a function for evaluation of element's MPI rank id.

Parameters
[in]location_idbase associated mesh location id
Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_property_cells()

cs_function_t * cs_function_define_property_cells ( char * property_name)

Define output function of a property (which is not a field).

Parameters
[in]property_namename of the property

◆ cs_function_define_q_criterion()

cs_function_t * cs_function_define_q_criterion ( void )

Define function for computation of cell Q criterion.

Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_refinement_generation()

cs_function_t * cs_function_define_refinement_generation ( cs_mesh_location_type_t location_id)

Create or access a function for evaluation of mesh element's refinement generation (i.e. level).

Parameters
[in]location_idbase associated mesh location id
Returns
pointer to the associated function object in case of success, or null in case of error

◆ cs_function_define_vorticity()

cs_function_t * cs_function_define_vorticity ( cs_field_t * velocity_field)

Define output function for the vorticity.

Parameters
[in]velocity_fieldPointer to velocity field

◆ cs_function_field_boundary_nr()

void cs_function_field_boundary_nr ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

Compute non-reconstructed cell-based field values at boundary.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputpointer to field
[in,out]valspointer to output values (size: n_elts*dimension)

◆ cs_function_q_criterion()

void cs_function_q_criterion ( int location_id,
cs_lnum_t n_elts,
const cs_lnum_t * elt_ids,
void * input,
void * vals )

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.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputignored
[in,out]valspointer to output values (size: n_elts*dimension)

\[   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.

This function matches the cs_eval_at_location_t function profile.

Parameters
[in]location_idbase associated mesh location id
[in]n_eltsnumber of associated elements
[in]elt_idsids of associated elements, or null if no filtering is required
[in,out]inputignored
[in,out]valspointer to output values (size: n_elts*dimension)