#include "cs_defs.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <mpi.h>
#include <ple_defs.h>
#include <ple_coupling.h>
#include <ple_locator.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "bft_printf.h"
#include "fvm_nodal.h"
#include "fvm_nodal_extract.h"
#include "fvm_nodal_project.h"
#include "cs_coupling.h"
#include "cs_cf_thermo.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_ht_convert.h"
#include "cs_log.h"
#include "cs_mesh.h"
#include "cs_mesh_connect.h"
#include "cs_parall.h"
#include "cs_post.h"
#include "cs_parameters.h"
#include "cs_prototypes.h"
#include "cs_physical_model.h"
#include "cs_thermal_model.h"
#include "cs_timer_stats.h"
#include "cs_syr_coupling.h"
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... | |
void cs_syr_coupling_add_zone | ( | const char * | syrthes_name, |
const cs_zone_t * | z | ||
) |
Associated a zone to a defined SYRTHES coupling.
[in] | syrthes_name | matching SYRTHES application name |
[in] | z | pointer to matching zone (boundary or volume) |
void cs_syr_coupling_all_finalize | ( | void | ) |
void cs_syr_coupling_all_init | ( | void | ) |
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.
[in] | syrthes_name | matching SYRTHES application name |
[in] | boundary_criteria | surface selection criteria, or NULL |
[in] | volume_criteria | volume selection criteria, or NULL |
[in] | projection_axis | x', 'y', or 'y' for 2D projection axis (case independent), or ' ' for standard 3D coupling |
[in] | allow_nonmatching | allow nearest-neighbor mapping where matching within tolerance is not available (useful when meshes have a different level of detail) |
[in] | tolerance | addition to local extents of each element extent = base_extent * (1 + tolerance) |
[in] | verbosity | verbosity level |
[in] | visualization | visualization 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.
void cs_syr_coupling_elt_ids | ( | int | cpl_id, |
int | mode, | ||
cs_lnum_t | elt_ids[] | ||
) |
Get local ids of elements coupled with SYRTHES.
[in] | cpl_id | coupling id |
[in] | mode | 0 for boundary, 1 for volume |
[out] | elt_ids | ids of coupled elements (preallocated) |
void cs_syr_coupling_exchange_volume | ( | void | ) |
Exchange volume values relative to a SYRTHES coupling.
void cs_syr_coupling_init_meshes | ( | void | ) |
Create coupled meshes and setup PLE locator for Syrthes couplings.
int cs_syr_coupling_is_surf | ( | int | cpl_id | ) |
Check if the given SYRTHES coupling number is a surface couplings.
[in] | cpl_id | matching SYRTHES coupling id |
void cs_syr_coupling_log_setup | ( | void | ) |
Log SYRTHES coupling setup information.
int cs_syr_coupling_n_couplings | ( | void | ) |
cs_lnum_t cs_syr_coupling_n_elts | ( | int | cpl_id, |
int | mode | ||
) |
Get number of coupled elements with SYRTHES.
[in] | cpl_id | coupling id |
[in] | mode | 0 for boundary, 1 for volume |
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.
[in] | nvar | number of variables |
[in] | bc_type | boundary condition type |
[in,out] | icodcl | boundary condition codes |
[in,out] | rcodcl | boundary condition values |
void cs_syr_coupling_recv_tsolid | ( | int | cpl_id, |
int | mode, | ||
cs_real_t | t_solid[] | ||
) |
Receive coupling variables from SYRTHES.
[in] | cpl_id | coupling id |
[in] | mode | 0 for boundary, 1 for volume |
[out] | t_solid | solid temperature |
Send field/variable values relative to a SYRTHES coupling.
[in] | h_wall | wall thermal exchange coefficient |
[in] | v_fluid | near-wall fluid thermal variable |
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.
[in] | cpl_id | coupling id |
[in] | mode | 0 for boundary, 1 for volume |
[in] | elt_ids | ids of coupled elements |
[in] | t_fluid | fluid temperature |
[in] | h_fluid | fluid exchange coefficient |
void cs_syr_coupling_set_conservativity | ( | int | flag | ) |
void cs_syr_coupling_set_explicit_treatment | ( | void | ) |