User functions for input of calculation parameters. More...
#include "cs_defs.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "cs_headers.h"
Functions | |
void | cs_user_boundary_conditions_setup (cs_domain_t *domain) |
Set boundary conditions to be applied. More... | |
void | cs_user_boundary_conditions (int nvar, int bc_type[], int icodcl[], cs_real_t rcodcl[]) |
User definition of boundary conditions. More... | |
User functions for input of calculation parameters.
See Input of calculation parameters (C functions in cs_user_parameters.c) for examples.
void cs_user_boundary_conditions | ( | int | nvar, |
int | bc_type[], | ||
int | icodcl[], | ||
cs_real_t | rcodcl[] | ||
) |
User definition of boundary conditions.
[in] | nvar | total number of variable BC's |
[in] | bc_type | boundary face types |
[in] | icodcl | boundary face code
|
[in] | rcodcl | boundary condition values rcodcl(3) = flux density value (negative for gain) in W/m2 |
The icodcl and rcodcl arrays are pre-initialized based on default and GUI-defined definitions, and may be modified here.
For a given variable id "ivar" and a given face "face_id", these arrays may be used as follows:
For a given field f, the "ivar" variable id may be obtained as follows: int ivar = cs_field_get_key_int(f, cs_field_key_id("variable_id")) - 1;
void cs_user_boundary_conditions_setup | ( | cs_domain_t * | domain | ) |
Set boundary conditions to be applied.
This function is called just before cs_user_finalize_setup, and boundary conditions can be defined in either of those functions, depending on whichever is considered more readable or practical for a given use.
[in,out] | domain | pointer to a cs_domain_t structure |