8.3
general documentation
cs_function_default.cpp File Reference
#include "cs_defs.h"
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "cs_log.h"
#include "cs_mesh_location.h"
#include "cs_assert.h"
#include "cs_balance_by_zone.h"
#include "cs_boundary_zone.h"
#include "cs_elec_model.h"
#include "cs_field_default.h"
#include "cs_field_operator.h"
#include "cs_function.h"
#include "cs_function_default.h"
#include "cs_mesh_quantities.h"
#include "cs_math.h"
#include "cs_parameters.h"
#include "cs_physical_constants.h"
#include "cs_physical_model.h"
#include "cs_property.h"
#include "cs_post.h"
#include "cs_rotation.h"
#include "cs_thermal_model.h"
#include "cs_turbomachinery.h"
#include "cs_volume_zone.h"
+ Include dependency graph for cs_function_default.cpp:

Functions

void cs_function_default_define (void)
 Define functions based on code_saturne case setup. More...
 
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. More...
 
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). More...
 
cs_function_tcs_function_define_boundary_stress (void)
 Define function object for computation of boundary stress. More...
 
cs_function_tcs_function_define_boundary_stress_normal (void)
 Define function object for computation of normal boundary stress. More...
 
cs_function_tcs_function_define_boundary_stress_tangential (void)
 Define function object for computation of tangential boundary stress. More...
 
cs_function_tcs_function_define_boundary_thermal_flux (void)
 Define function object for computation of boundary thermal flux. More...
 
cs_function_tcs_function_define_boundary_nusselt (void)
 Define function for computation of boundary layer Nusselt. More...
 
cs_function_tcs_function_define_q_criterion (void)
 Define function for computation of cell Q criterion. More...
 
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. More...
 
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. More...
 
void cs_function_boundary_stress (int location_id, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, void *input, void *vals)
 Compute stress at boundary. More...
 
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. More...
 
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. More...
 
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} $),. More...
 
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. More...
 
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. More...
 
cs_function_tcs_function_define_property_cells (char *property_name)
 Define output function of a property (which is not a field). More...
 

Detailed Description

Base predefined function objects.

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

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

Compute 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_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()

cs_function_t * cs_function_define_boundary_stress ( void  )

Define function object for computation of boundary stress.

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