My Project
programmer's documentation
|
Shared routines among all face-based schemes for building and solving Stokes and Navier-Stokes problem. More...
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_blas.h"
#include "cs_cdo_bc.h"
#include "cs_equation_bc.h"
#include "cs_equation_priv.h"
#include "cs_evaluate.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_navsto_coupling.h"
#include "cs_navsto_param.h"
#include "cs_parall.h"
#include "cs_post.h"
#include "cs_sdm.h"
#include "cs_timer.h"
#include "cs_cdofb_navsto.h"
Functions | |
void | cs_cdofb_navsto_define_builder (cs_real_t t_eval, const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cell_sys_t *csys, const cs_cdo_bc_face_t *pr_bc, const cs_boundary_type_t *bf_type, cs_cdofb_navsto_builder_t *nsb) |
Set the members of the cs_cdofb_navsto_builder_t structure. More... | |
cs_real_t | cs_cdofb_navsto_cell_divergence (const cs_lnum_t c_id, const cs_cdo_quantities_t *quant, const cs_adjacency_t *c2f, const cs_real_t *f_vals) |
Compute the divergence of a cell using the cs_cdo_quantities_t structure. More... | |
void | cs_cdofb_navsto_add_grad_div (short int n_fc, const cs_real_t zeta, const cs_real_t div[], cs_sdm_t *mat) |
Add the grad-div part to the local matrix (i.e. for the current cell) More... | |
void | cs_cdofb_navsto_init_pressure (const cs_navsto_param_t *nsp, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, cs_field_t *pr) |
Initialize the pressure values. More... | |
void | cs_cdofb_navsto_init_face_pressure (const cs_navsto_param_t *nsp, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, cs_real_t *pr_f) |
Initialize the pressure values when the pressure is defined at faces. More... | |
void | cs_cdofb_navsto_set_zero_mean_pressure (const cs_cdo_quantities_t *quant, cs_real_t values[]) |
Update the pressure field in order to get a field with a zero-mean average. More... | |
void | cs_cdofb_navsto_extra_op (const cs_navsto_param_t *nsp, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_adv_field_t *adv_field) |
Perform extra-operation related to Fb schemes when solving Navier-Stokes. More... | |
void | cs_cdofb_block_dirichlet_alge (short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of an algebraic technique. More... | |
void | cs_cdofb_block_dirichlet_pena (short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of a penalization technique (with a large coefficient). One assumes that static condensation has been performed and that the velocity-block has size 3*n_fc. More... | |
void | cs_cdofb_block_dirichlet_weak (short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of a weak penalization technique (Nitsche). One assumes that static condensation has not been performed yet and that the velocity-block has size 3*(n_fc + 1) More... | |
void | cs_cdofb_block_dirichlet_wsym (short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of a weak penalization technique (symmetrized Nitsche). One assumes that static condensation has not been performed yet and that the velocity-block has size 3*(n_fc + 1) More... | |
void | cs_cdofb_symmetry (short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account a symmetric boundary (treated as a sliding BCs on the three velocity components. A weak penalization technique (symmetrized Nitsche) is used. One assumes that static condensation has not been performed yet and that the velocity-block has (n_fc + 1) blocks of size 3x3. More... | |
void | cs_cdofb_fixed_wall (short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys) |
Take into account a wall BCs by a weak enforcement using Nitsche technique plus a symmetric treatment. Case of vector-valued CDO Face-based schemes. More... | |
Shared routines among all face-based schemes for building and solving Stokes and Navier-Stokes problem.
void cs_cdofb_block_dirichlet_alge | ( | short int | f, |
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of an algebraic technique.
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of an algebraic technique. One assumes that static condensation has been performed and that the velocity-block has size 3*n_fc.
[in] | f | face id in the cell mesh numbering |
[in] | eqp | pointer to a cs_equation_param_t struct. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |
void cs_cdofb_block_dirichlet_pena | ( | short int | f, |
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of a penalization technique (with a large coefficient). One assumes that static condensation has been performed and that the velocity-block has size 3*n_fc.
[in] | f | face id in the cell mesh numbering |
[in] | eqp | pointer to a cs_equation_param_t struct. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |
void cs_cdofb_block_dirichlet_weak | ( | short int | f, |
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of a weak penalization technique (Nitsche). One assumes that static condensation has not been performed yet and that the velocity-block has size 3*(n_fc + 1)
[in] | f | face id in the cell mesh numbering |
[in] | eqp | pointer to a cs_equation_param_t struct. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |
void cs_cdofb_block_dirichlet_wsym | ( | short int | f, |
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account a Dirichlet BCs on the three velocity components. For instance for a velocity inlet boundary or a wall Handle the velocity-block in the global algebraic system in case of a weak penalization technique (symmetrized Nitsche). One assumes that static condensation has not been performed yet and that the velocity-block has size 3*(n_fc + 1)
[in] | f | face id in the cell mesh numbering |
[in] | eqp | pointer to a cs_equation_param_t struct. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |
void cs_cdofb_fixed_wall | ( | short int | f, |
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account a wall BCs by a weak enforcement using Nitsche technique plus a symmetric treatment. Case of vector-valued CDO Face-based schemes.
[in] | f | face id in the cell mesh numbering |
[in] | eqp | pointer to a cs_equation_param_t struct. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |
void cs_cdofb_navsto_add_grad_div | ( | short int | n_fc, |
const cs_real_t | zeta, | ||
const cs_real_t | div[], | ||
cs_sdm_t * | mat | ||
) |
Add the grad-div part to the local matrix (i.e. for the current cell)
[in] | n_fc | local number of faces for the current cell |
[in] | zeta | scalar coefficient for the grad-div operator |
[in] | div | divergence |
[in,out] | mat | local system matrix to update |
cs_real_t cs_cdofb_navsto_cell_divergence | ( | const cs_lnum_t | c_id, |
const cs_cdo_quantities_t * | quant, | ||
const cs_adjacency_t * | c2f, | ||
const cs_real_t * | f_vals | ||
) |
Compute the divergence of a cell using the cs_cdo_quantities_t structure.
[in] | c_id | cell id |
[in] | quant | pointer to a cs_cdo_quantities_t |
[in] | c2f | pointer to cell-to-face cs_adjacency_t |
[in] | f_vals | values of the face DoFs |
void cs_cdofb_navsto_define_builder | ( | cs_real_t | t_eval, |
const cs_navsto_param_t * | nsp, | ||
const cs_cell_mesh_t * | cm, | ||
const cs_cell_sys_t * | csys, | ||
const cs_cdo_bc_face_t * | pr_bc, | ||
const cs_boundary_type_t * | bf_type, | ||
cs_cdofb_navsto_builder_t * | nsb | ||
) |
Set the members of the cs_cdofb_navsto_builder_t structure.
[in] | t_eval | time at which one evaluates the pressure BC |
[in] | nsp | set of parameters to define the NavSto system |
[in] | cm | cellwise view of the mesh |
[in] | csys | cellwise view of the algebraic system |
[in] | pr_bc | set of definitions for the presuure BCs |
[in] | bf_type | type of boundaries for all boundary faces |
[in,out] | nsb | builder to update |
void cs_cdofb_navsto_extra_op | ( | const cs_navsto_param_t * | nsp, |
const cs_cdo_quantities_t * | quant, | ||
const cs_cdo_connect_t * | connect, | ||
const cs_adv_field_t * | adv_field | ||
) |
Perform extra-operation related to Fb schemes when solving Navier-Stokes.
[in] | nsp | pointer to a cs_navsto_param_t struct. |
[in] | quant | pointer to a cs_cdo_quantities_t struct. |
[in] | connect | pointer to a cs_cdo_connect_t struct. |
[in] | adv_field | pointer to a cs_adv_field_t struct. |
void cs_cdofb_navsto_init_face_pressure | ( | const cs_navsto_param_t * | nsp, |
const cs_cdo_quantities_t * | quant, | ||
const cs_time_step_t * | ts, | ||
cs_real_t * | pr_f | ||
) |
Initialize the pressure values when the pressure is defined at faces.
[in] | nsp | pointer to a cs_navsto_param_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | ts | pointer to a cs_time_step_t structure |
[in,out] | pr_f | pointer to the pressure values at faces |
void cs_cdofb_navsto_init_pressure | ( | const cs_navsto_param_t * | nsp, |
const cs_cdo_quantities_t * | quant, | ||
const cs_time_step_t * | ts, | ||
cs_field_t * | pr | ||
) |
Initialize the pressure values.
[in] | nsp | pointer to a cs_navsto_param_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | ts | pointer to a cs_time_step_t structure |
[in,out] | pr | pointer to the pressure cs_field_t structure |
void cs_cdofb_navsto_set_zero_mean_pressure | ( | const cs_cdo_quantities_t * | quant, |
cs_real_t | values[] | ||
) |
Update the pressure field in order to get a field with a zero-mean average.
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in,out] | values | pressure field values |
void cs_cdofb_symmetry | ( | short int | f, |
const cs_equation_param_t * | eqp, | ||
const cs_cell_mesh_t * | cm, | ||
cs_cell_builder_t * | cb, | ||
cs_cell_sys_t * | csys | ||
) |
Take into account a symmetric boundary (treated as a sliding BCs on the three velocity components. A weak penalization technique (symmetrized Nitsche) is used. One assumes that static condensation has not been performed yet and that the velocity-block has (n_fc + 1) blocks of size 3x3.
[in] | f | face id in the cell mesh numbering |
[in] | eqp | pointer to a cs_equation_param_t struct. |
[in] | cm | pointer to a cs_cell_mesh_t structure |
[in,out] | cb | pointer to a cs_cell_builder_t structure |
[in,out] | csys | structure storing the cellwise system |