7.0
general documentation
cs_syr_coupling.h File Reference
#include "fvm_defs.h"
#include "cs_base.h"
#include "cs_zone.h"
+ Include dependency graph for cs_syr_coupling.h:

Go to the source code of this file.

Functions

void cs_syr_coupling_define (const char *syrthes_name, const char *boundary_criteria, const char *volume_criteria, char projection_axis, bool allow_nonmatching, float tolerance, int verbosity, int visualization)
 Define new SYRTHES coupling. More...
 
void cs_syr_coupling_add_zone (const char *syrthes_name, const cs_zone_t *z)
 Associated a zone to a defined SYRTHES coupling. More...
 
void cs_syr_coupling_all_init (void)
 
void cs_syr_coupling_all_finalize (void)
 
int cs_syr_coupling_n_couplings (void)
 
void cs_syr_coupling_set_conservativity (int flag)
 
void cs_syr_coupling_set_explicit_treatment (void)
 
void cs_syr_coupling_log_setup (void)
 Log SYRTHES coupling setup information. More...
 
void cs_syr_coupling_init_meshes (void)
 Create coupled meshes and setup PLE locator for Syrthes couplings. More...
 
int cs_syr_coupling_is_surf (int cpl_id)
 Check if the given SYRTHES coupling number is a surface couplings. More...
 
void cs_syr_coupling_recv_boundary (int nvar, int bc_type[], int icodcl[], cs_real_t rcodcl[])
 Read boundary field/variable values relative to a SYRTHES coupling. More...
 
void cs_syr_coupling_send_boundary (const cs_real_t h_wall[], cs_real_t v_fluid[])
 Send field/variable values relative to a SYRTHES coupling. More...
 
void cs_syr_coupling_exchange_volume (void)
 Exchange volume values relative to a SYRTHES coupling. More...
 
void cs_syr_coupling_volume_source_terms (int field_id, cs_real_t st_exp[], cs_real_t st_imp[])
 Compute the source term (implicit and/or explicit part) for a volume coupling with SYRTHES. More...
 
cs_lnum_t cs_syr_coupling_n_elts (int cpl_id, int mode)
 Get number of coupled elements with SYRTHES. More...
 
void cs_syr_coupling_elt_ids (int cpl_id, int mode, cs_lnum_t elt_ids[])
 Get local ids of elements coupled with SYRTHES. More...
 
void cs_syr_coupling_recv_tsolid (int cpl_id, int mode, cs_real_t t_solid[])
 Receive coupling variables from SYRTHES. More...
 
void cs_syr_coupling_send_tf_hf (int cpl_id, int mode, const cs_lnum_t elt_ids[], cs_real_t t_fluid[], cs_real_t h_fluid[])
 Send coupling variables to SYRTHES. More...
 

Function Documentation

◆ cs_syr_coupling_add_zone()

void cs_syr_coupling_add_zone ( const char *  syrthes_name,
const cs_zone_t z 
)

Associated a zone to a defined SYRTHES coupling.

Parameters
[in]syrthes_namematching SYRTHES application name
[in]zpointer to matching zone (boundary or volume)

◆ cs_syr_coupling_all_finalize()

void cs_syr_coupling_all_finalize ( void  )

◆ cs_syr_coupling_all_init()

void cs_syr_coupling_all_init ( void  )

◆ cs_syr_coupling_define()

void cs_syr_coupling_define ( const char *  syrthes_name,
const char *  boundary_criteria,
const char *  volume_criteria,
char  projection_axis,
bool  allow_nonmatching,
float  tolerance,
int  verbosity,
int  visualization 
)

Define new SYRTHES coupling.

Parameters
[in]syrthes_namematching SYRTHES application name
[in]boundary_criteriasurface selection criteria, or NULL
[in]volume_criteriavolume selection criteria, or NULL
[in]projection_axisx', 'y', or 'y' for 2D projection axis (case independent), or ' ' for standard 3D coupling
[in]allow_nonmatchingallow nearest-neighbor mapping where matching within tolerance is not available (useful when meshes have a different level of detail)
[in]toleranceaddition to local extents of each element extent = base_extent * (1 + tolerance)
[in]verbosityverbosity level
[in]visualizationvisualization output level (0 or 1)

In the case of a single Code_Saturne and single SYRTHES instance, the 'syrthes_name' argument is ignored, as there is only one matching possibility.

In case of multiple couplings, a coupling will be matched with available SYRTHES instances based on the 'syrthes_name' argument.

◆ cs_syr_coupling_elt_ids()

void cs_syr_coupling_elt_ids ( int  cpl_id,
int  mode,
cs_lnum_t  elt_ids[] 
)

Get local ids of elements coupled with SYRTHES.

Parameters
[in]cpl_idcoupling id
[in]mode0 for boundary, 1 for volume
[out]elt_idsids of coupled elements (preallocated)

◆ cs_syr_coupling_exchange_volume()

void cs_syr_coupling_exchange_volume ( void  )

Exchange volume values relative to a SYRTHES coupling.

◆ cs_syr_coupling_init_meshes()

void cs_syr_coupling_init_meshes ( void  )

Create coupled meshes and setup PLE locator for Syrthes couplings.

◆ cs_syr_coupling_is_surf()

int cs_syr_coupling_is_surf ( int  cpl_id)

Check if the given SYRTHES coupling number is a surface couplings.

Parameters
[in]cpl_idmatching SYRTHES coupling id
Returns
1 if the coupling includes the surface, 0 otherwise.

◆ cs_syr_coupling_log_setup()

void cs_syr_coupling_log_setup ( void  )

Log SYRTHES coupling setup information.

◆ cs_syr_coupling_n_couplings()

int cs_syr_coupling_n_couplings ( void  )

◆ cs_syr_coupling_n_elts()

cs_lnum_t cs_syr_coupling_n_elts ( int  cpl_id,
int  mode 
)

Get number of coupled elements with SYRTHES.

Parameters
[in]cpl_idcoupling id
[in]mode0 for boundary, 1 for volume
Returns
number of coupled elements for this coupling

◆ cs_syr_coupling_recv_boundary()

void cs_syr_coupling_recv_boundary ( int  nvar,
int  bc_type[],
int  icodcl[],
cs_real_t  rcodcl[] 
)

Read boundary field/variable values relative to a SYRTHES coupling.

Parameters
[in]nvarnumber of variables
[in]bc_typeboundary condition type
[in,out]icodclboundary condition codes
[in,out]rcodclboundary condition values

◆ cs_syr_coupling_recv_tsolid()

void cs_syr_coupling_recv_tsolid ( int  cpl_id,
int  mode,
cs_real_t  t_solid[] 
)

Receive coupling variables from SYRTHES.

Parameters
[in]cpl_idcoupling id
[in]mode0 for boundary, 1 for volume
[out]t_solidsolid temperature

◆ cs_syr_coupling_send_boundary()

void cs_syr_coupling_send_boundary ( const cs_real_t  h_wall[],
cs_real_t  v_fluid[] 
)

Send field/variable values relative to a SYRTHES coupling.

Parameters
[in]h_wallwall thermal exchange coefficient
[in]v_fluidnear-wall fluid thermal variable

◆ cs_syr_coupling_send_tf_hf()

void cs_syr_coupling_send_tf_hf ( int  cpl_id,
int  mode,
const cs_lnum_t  elt_ids[],
cs_real_t  t_fluid[],
cs_real_t  h_fluid[] 
)

Send coupling variables to SYRTHES.

Parameters
[in]cpl_idcoupling id
[in]mode0 for boundary, 1 for volume
[in]elt_idsids of coupled elements
[in]t_fluidfluid temperature
[in]h_fluidfluid exchange coefficient

◆ cs_syr_coupling_set_conservativity()

void cs_syr_coupling_set_conservativity ( int  flag)

◆ cs_syr_coupling_set_explicit_treatment()

void cs_syr_coupling_set_explicit_treatment ( void  )

◆ cs_syr_coupling_volume_source_terms()

void cs_syr_coupling_volume_source_terms ( int  field_id,
cs_real_t  st_exp[],
cs_real_t  st_imp[] 
)

Compute the source term (implicit and/or explicit part) for a volume coupling with SYRTHES.

Parameters
[in]field_idfield id
[in,out]st_expexplicit source term
[in,out]st_impimplicit source term