Functions to handle the cs_navsto_system_t structure which is the high-level structure to manage the Navier-Stokes system of equations. More...
#include "cs_defs.h"#include <assert.h>#include <stdlib.h>#include <string.h>#include <bft_mem.h>#include "cs_array.h"#include "cs_cdofb_ac.h"#include "cs_cdofb_monolithic.h"#include "cs_cdofb_monolithic_sles.h"#include "cs_cdofb_navsto.h"#include "cs_cdofb_predco.h"#include "cs_hho_stokes.h"#include "cs_evaluate.h"#include "cs_flag.h"#include "cs_log.h"#include "cs_navsto_coupling.h"#include "cs_post.h"#include "cs_volume_zone.h"#include "cs_navsto_system.h" Include dependency graph for cs_navsto_system.c:
 Include dependency graph for cs_navsto_system.c:| Macros | |
| #define | CS_NAVSTO_SYSTEM_DBG 0 | 
| Functions | |
| bool | cs_navsto_system_is_activated (void) | 
| Check if the resolution of the Navier-Stokes system has been activated.  More... | |
| void | cs_navsto_system_update_model (bool with_thermal) | 
| Update the flag associated to the modelling options.  More... | |
| cs_navsto_system_t * | cs_navsto_system_activate (const cs_boundary_t *boundaries, cs_navsto_param_model_t model, cs_navsto_param_model_flag_t model_flag, cs_navsto_param_coupling_t algo_coupling, cs_navsto_param_post_flag_t post_flag) | 
| Allocate and initialize the Navier-Stokes (NS) system.  More... | |
| void | cs_navsto_system_destroy (void) | 
| Free the main structure related to the Navier-Stokes system.  More... | |
| cs_navsto_param_t * | cs_navsto_system_get_param (void) | 
| Retrieve the structure storing the parameters for the Navier–Stokes system.  More... | |
| cs_equation_t * | cs_navsto_system_get_momentum_eq (void) | 
| Retrieve a pointer to the equation related to the momentum equation.  More... | |
| cs_adv_field_t * | cs_navsto_get_adv_field (void) | 
| Retrieve the advection field structure (the mass flux) related to the Navier-Stokes system.  More... | |
| cs_real_t * | cs_navsto_get_mass_flux (bool previous) | 
| Retrieve the mass flux array related to the Navier-Stokes system.  More... | |
| void | cs_navsto_system_init_setup (void) | 
| Start setting-up the Navier-Stokes system At this stage, numerical settings should be completely determined but connectivity and geometrical information is not yet available.  More... | |
| void | cs_navsto_system_finalize_setup (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) | 
| Last step of the setup of the Navier-Stokes system.  More... | |
| void | cs_navsto_system_define_context (const cs_mesh_t *mesh) | 
| Initialize the scheme context structure used to build the algebraic system. This is done after the setup step.  More... | |
| void | cs_navsto_system_init_values (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) | 
| Set an initial value for the velocity and pressure fields as well as mass fluxes and tubulent quantities if needed.  More... | |
| void | cs_navsto_system_set_solid_cells (cs_lnum_t n_solid_cells, cs_lnum_t solid_cell_ids[]) | 
| Set a solid zone related to the Navier-Stokes equations.  More... | |
| void | cs_navsto_system_update (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) | 
| Update variables and related quantities when a new state of the Navier-Stokes system has been computed.  More... | |
| void | cs_navsto_system_compute_steady_state (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) | 
| Build, solve and update the Navier-Stokes system in case of a steady-state approach.  More... | |
| void | cs_navsto_system_compute (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) | 
| Build, solve and update the Navier-Stokes system.  More... | |
| void | cs_navsto_system_extra_op (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step) | 
| Predefined extra-operations for the Navier-Stokes system.  More... | |
| void | cs_navsto_system_extra_post (void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step) | 
| Predefined post-processing output for the Navier-Stokes system. The prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)  More... | |
| void | cs_navsto_system_log_setup (void) | 
| Summary of the main cs_navsto_system_t structure.  More... | |
Functions to handle the cs_navsto_system_t structure which is the high-level structure to manage the Navier-Stokes system of equations.
| #define CS_NAVSTO_SYSTEM_DBG 0 | 
| cs_adv_field_t* cs_navsto_get_adv_field | ( | void | ) | 
Retrieve the advection field structure (the mass flux) related to the Navier-Stokes system.
| cs_real_t* cs_navsto_get_mass_flux | ( | bool | previous | ) | 
Retrieve the mass flux array related to the Navier-Stokes system.
| [in] | previous | if true return the previous state otherwise the current state. | 
| cs_navsto_system_t* cs_navsto_system_activate | ( | const cs_boundary_t * | boundaries, | 
| cs_navsto_param_model_t | model, | ||
| cs_navsto_param_model_flag_t | model_flag, | ||
| cs_navsto_param_coupling_t | algo_coupling, | ||
| cs_navsto_param_post_flag_t | post_flag | ||
| ) | 
Allocate and initialize the Navier-Stokes (NS) system.
| [in] | boundaries | pointer to the domain boundaries | 
| [in] | model | type of model related to the NS system | 
| [in] | model_flag | additional high-level model options | 
| [in] | algo_coupling | algorithm used for solving the NS system | 
| [in] | post_flag | predefined post-processings options | 
| void cs_navsto_system_compute | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Build, solve and update the Navier-Stokes system.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | time_step | structure managing the time stepping | 
| void cs_navsto_system_compute_steady_state | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Build, solve and update the Navier-Stokes system in case of a steady-state approach.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | time_step | structure managing the time stepping | 
| void cs_navsto_system_define_context | ( | const cs_mesh_t * | mesh | ) | 
Initialize the scheme context structure used to build the algebraic system. This is done after the setup step.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| void cs_navsto_system_destroy | ( | void | ) | 
Free the main structure related to the Navier-Stokes system.
| void cs_navsto_system_extra_op | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Predefined extra-operations for the Navier-Stokes system.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | time_step | pointer to a cs_time_step_t structure | 
| void cs_navsto_system_extra_post | ( | void * | input, | 
| int | mesh_id, | ||
| int | cat_id, | ||
| int | ent_flag[5], | ||
| cs_lnum_t | n_cells, | ||
| cs_lnum_t | n_i_faces, | ||
| cs_lnum_t | n_b_faces, | ||
| const cs_lnum_t | cell_ids[], | ||
| const cs_lnum_t | i_face_ids[], | ||
| const cs_lnum_t | b_face_ids[], | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Predefined post-processing output for the Navier-Stokes system. The prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)
| [in,out] | input | pointer to a optional structure (here a cs_navsto_system_t structure) | 
| [in] | mesh_id | id of the output mesh for the current call | 
| [in] | cat_id | category id of the output mesh for this call | 
| [in] | ent_flag | indicate global presence of cells (ent_flag[0]), interior faces (ent_flag[1]), boundary faces (ent_flag[2]), particles (ent_flag[3]) or probes (ent_flag[4]) | 
| [in] | n_cells | local number of cells of post_mesh | 
| [in] | n_i_faces | local number of interior faces of post_mesh | 
| [in] | n_b_faces | local number of boundary faces of post_mesh | 
| [in] | cell_ids | list of cells (0 to n-1) | 
| [in] | i_face_ids | list of interior faces (0 to n-1) | 
| [in] | b_face_ids | list of boundary faces (0 to n-1) | 
| [in] | time_step | pointer to a cs_time_step_t struct. | 
| void cs_navsto_system_finalize_setup | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Last step of the setup of the Navier-Stokes system.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | time_step | pointer to a cs_time_step_t structure | 
| cs_equation_t* cs_navsto_system_get_momentum_eq | ( | void | ) | 
Retrieve a pointer to the equation related to the momentum equation.
| cs_navsto_param_t* cs_navsto_system_get_param | ( | void | ) | 
Retrieve the structure storing the parameters for the Navier–Stokes system.
| void cs_navsto_system_init_setup | ( | void | ) | 
Start setting-up the Navier-Stokes system At this stage, numerical settings should be completely determined but connectivity and geometrical information is not yet available.
| void cs_navsto_system_init_values | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Set an initial value for the velocity and pressure fields as well as mass fluxes and tubulent quantities if needed.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | time_step | pointer to a cs_time_step_t structure | 
| bool cs_navsto_system_is_activated | ( | void | ) | 
Check if the resolution of the Navier-Stokes system has been activated.
| void cs_navsto_system_log_setup | ( | void | ) | 
Summary of the main cs_navsto_system_t structure.
Set a solid zone related to the Navier-Stokes equations.
| [in] | n_solid_cells | number of solid cells | 
| [in] | solid_cell_ids | list of cell ids (local numbering) | 
| void cs_navsto_system_update | ( | const cs_mesh_t * | mesh, | 
| const cs_cdo_connect_t * | connect, | ||
| const cs_cdo_quantities_t * | quant, | ||
| const cs_time_step_t * | time_step | ||
| ) | 
Update variables and related quantities when a new state of the Navier-Stokes system has been computed.
| [in] | mesh | pointer to a cs_mesh_t structure | 
| [in] | connect | pointer to a cs_cdo_connect_t structure | 
| [in] | quant | pointer to a cs_cdo_quantities_t structure | 
| [in] | time_step | structure managing the time stepping | 
| void cs_navsto_system_update_model | ( | bool | with_thermal | ) | 
Update the flag associated to the modelling options.
| [in] | with_thermal | true or false |