Functions to handle structures used as a context when solving the Navier-Stokes equations. Structures are cast on-the-fly according to the type of coupling. More...
#include "cs_defs.h"#include <assert.h>#include <stdlib.h>#include <string.h>#include <bft_mem.h>#include "cs_array.h"#include "cs_navsto_coupling.h"Macros | |
| #define | CS_NAVSTO_COUPLING_DBG 0 |
Functions | |
| cs_equation_param_t * | cs_navsto_coupling_get_momentum_eqp (const cs_navsto_param_t *nsp, void *context) |
| Retrieve the cs_equation_param_t structure related to the momentum equation according to the type of coupling. | |
| void * | cs_navsto_ac_create_context (cs_param_bc_type_t bc, cs_navsto_param_t *nsp) |
| Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artificial Compressibility approach. | |
| void * | cs_navsto_ac_free_context (void *context) |
| Free the context structure related to an Artificial Compressibility approach. | |
| void | cs_navsto_ac_init_setup (const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, void *context) |
| Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. No mesh information is available at this stage. | |
| void | cs_navsto_ac_last_setup (const cs_navsto_param_t *nsp, void *context) |
| Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. | |
| cs_equation_t * | cs_navsto_ac_get_momentum_eq (void *context) |
| Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artificial compressibility coupling. | |
| void * | cs_navsto_monolithic_create_context (cs_param_bc_type_t bc, cs_navsto_param_t *nsp) |
| Allocate and initialize a context structure when the Navier-Stokes system is coupled using a monolithic approach. | |
| void * | cs_navsto_monolithic_free_context (void *context) |
| Free the context structure related to a monolithic approach. | |
| void | cs_navsto_monolithic_init_setup (const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, void *context) |
| Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. No mesh information is available at this stage. | |
| void | cs_navsto_monolithic_last_setup (const cs_navsto_param_t *nsp, void *context) |
| Finalize the setup for the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. | |
| cs_equation_t * | cs_navsto_monolithic_get_momentum_eq (void *context) |
| Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a monolithic coupling. | |
| void * | cs_navsto_projection_create_context (cs_param_bc_type_t bc, cs_navsto_param_t *nsp) |
| Allocate and initialize a context structure when the Navier-Stokes system is coupled using an incremental Projection approach in the the rotational form (see Minev & Guermond, 2006, JCP) | |
| void * | cs_navsto_projection_free_context (void *context) |
| Free the context structure related to a Projection approach. | |
| void | cs_navsto_projection_init_setup (const cs_navsto_param_t *nsp, cs_adv_field_t *adv_field, int loc_id, bool has_previous, void *context) |
| Start setting-up the Navier-Stokes equations when a projection algorithm is used to coupled the system. No mesh information is available at this stage. | |
| void | cs_navsto_projection_last_setup (const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context) |
| Finalize the setup for the Navier-Stokes equations when a projection algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage. | |
| cs_equation_t * | cs_navsto_projection_get_momentum_eq (void *context) |
| Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a projection coupling. | |
Functions to handle structures used as a context when solving the Navier-Stokes equations. Structures are cast on-the-fly according to the type of coupling.
Functions to handle the settings of coupling algorithms are dedicated to one of the following algorithm
| #define CS_NAVSTO_COUPLING_DBG 0 |
| void * cs_navsto_ac_create_context | ( | cs_param_bc_type_t | bc, |
| cs_navsto_param_t * | nsp ) |
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artificial Compressibility approach.
| [in] | bc | default cs_param_bc_type_t for the equation |
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| void * cs_navsto_ac_free_context | ( | void * | context | ) |
Free the context structure related to an Artificial Compressibility approach.
| [in,out] | context | pointer to a context structure cast on-the-fly |
| cs_equation_t * cs_navsto_ac_get_momentum_eq | ( | void * | context | ) |
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of artificial compressibility coupling.
| [in] | context | pointer to a context structure cast on-the-fly |
| void cs_navsto_ac_init_setup | ( | const cs_navsto_param_t * | nsp, |
| cs_adv_field_t * | adv_field, | ||
| void * | context ) |
Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system. No mesh information is available at this stage.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | adv_field | pointer to a cs_adv_field_t structure |
| [in,out] | context | pointer to a context structure cast on-the-fly |
| void cs_navsto_ac_last_setup | ( | const cs_navsto_param_t * | nsp, |
| void * | context ) |
Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is used to coupled the system.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in,out] | context | pointer to a context structure cast on-the-fly |
| cs_equation_param_t * cs_navsto_coupling_get_momentum_eqp | ( | const cs_navsto_param_t * | nsp, |
| void * | context ) |
Retrieve the cs_equation_param_t structure related to the momentum equation according to the type of coupling.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | context | pointer to a coupling context structure |
| void * cs_navsto_monolithic_create_context | ( | cs_param_bc_type_t | bc, |
| cs_navsto_param_t * | nsp ) |
Allocate and initialize a context structure when the Navier-Stokes system is coupled using a monolithic approach.
| [in] | bc | default cs_param_bc_type_t for the equation |
| [in,out] | nsp | pointer to a cs_navsto_param_t structure |
| void * cs_navsto_monolithic_free_context | ( | void * | context | ) |
Free the context structure related to a monolithic approach.
| [in,out] | context | pointer to a context structure cast on-the-fly |
| cs_equation_t * cs_navsto_monolithic_get_momentum_eq | ( | void * | context | ) |
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a monolithic coupling.
| [in] | context | pointer to a context structure cast on-the-fly |
| void cs_navsto_monolithic_init_setup | ( | const cs_navsto_param_t * | nsp, |
| cs_adv_field_t * | adv_field, | ||
| void * | context ) |
Start setting-up the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. No mesh information is available at this stage.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | adv_field | pointer to a cs_adv_field_t structure |
| [in,out] | context | pointer to a context structure cast on-the-fly |
| void cs_navsto_monolithic_last_setup | ( | const cs_navsto_param_t * | nsp, |
| void * | context ) |
Finalize the setup for the Navier-Stokes equations when a monolithic algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.
Finalize the setup for the Navier-Stokes equations when a monolithic algorithm is used to coupled the system.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in,out] | context | pointer to a context structure cast on-the-fly |
| void * cs_navsto_projection_create_context | ( | cs_param_bc_type_t | bc, |
| cs_navsto_param_t * | nsp ) |
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an incremental Projection approach in the the rotational form (see Minev & Guermond, 2006, JCP)
| [in] | bc | default cs_param_bc_type_t for the equation |
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| void * cs_navsto_projection_free_context | ( | void * | context | ) |
Free the context structure related to a Projection approach.
| [in,out] | context | pointer to a context structure cast on-the-fly |
| cs_equation_t * cs_navsto_projection_get_momentum_eq | ( | void * | context | ) |
Retrieve the pointer to the cs_equation_t structure related to the momentum equation in case of a projection coupling.
| [in] | context | pointer to a context structure cast on-the-fly |
| void cs_navsto_projection_init_setup | ( | const cs_navsto_param_t * | nsp, |
| cs_adv_field_t * | adv_field, | ||
| int | loc_id, | ||
| bool | has_previous, | ||
| void * | context ) |
Start setting-up the Navier-Stokes equations when a projection algorithm is used to coupled the system. No mesh information is available at this stage.
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in] | adv_field | pointer to a cs_adv_field_t structure |
| [in] | loc_id | id related to a mesh location |
| [in] | has_previous | values at different time steps (true/false) |
| [in,out] | context | pointer to a context structure cast on-the-fly |
| void cs_navsto_projection_last_setup | ( | const cs_cdo_quantities_t * | quant, |
| const cs_navsto_param_t * | nsp, | ||
| void * | context ) |
Finalize the setup for the Navier-Stokes equations when a projection algorithm is used to coupled the system. Connectivity and geometric quantities are available at this stage.
| [in] | quant | pointer to a cs_cdo_quantities_t structure |
| [in] | nsp | pointer to a cs_navsto_param_t structure |
| [in,out] | context | pointer to a context structure cast on-the-fly |