1 #ifndef __CS_CDOFB_NAVSTO_H__
2 #define __CS_CDOFB_NAVSTO_H__
213 for (
short int f = 0; f < cm->
n_fc; f++) {
219 _div_f[0] = i_f * pfq.
unitv[0];
220 _div_f[1] = i_f * pfq.
unitv[1];
221 _div_f[2] = i_f * pfq.
unitv[2];
int cs_boundary_type_t
Definition: cs_boundary.h:69
void cs_cdofb_navsto_gravity_term(const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cdofb_navsto_builder_t *nsb, cs_cell_sys_t *csys)
Take into account the gravity effects. Compute and add the source term to the local RHS....
Definition: cs_cdofb_navsto.c:2039
void cs_cdofb_block_dirichlet_pena(short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, 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...
Definition: cs_cdofb_navsto.c:1505
void cs_cdofb_navsto_extra_op(const cs_navsto_param_t *nsp, const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *ts, cs_time_plot_t *time_plotter, const cs_adv_field_t *adv_field, const cs_real_t *mass_flux, const cs_real_t *p_cell, const cs_real_t *u_cell, const cs_real_t *u_face)
Perform extra-operation related to Fb schemes when solving Navier-Stokes. Computation of the followin...
Definition: cs_cdofb_navsto.c:954
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)
Definition: cs_cdofb_navsto.c:574
void cs_cdofb_navsto_boussinesq_at_face(const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cdofb_navsto_builder_t *nsb, cs_cell_sys_t *csys)
Take into account the buoyancy force with the Boussinesq approx. Compute and add the source term to t...
Definition: cs_cdofb_navsto.c:2140
void cs_cdofb_navsto_compute_face_pressure(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, const cs_navsto_param_t *nsp, const cs_real_t *p_cell, cs_real_t *p_face)
Compute an estimation of the pressure at faces.
Definition: cs_cdofb_navsto.c:502
void cs_cdofb_block_dirichlet_wsym(short int fb, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, 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...
Definition: cs_cdofb_navsto.c:1660
void cs_cdofb_symmetry(short int fb, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Take into account a boundary defined as 'symmetry' (treated as a sliding BCs on the three velocity co...
Definition: cs_cdofb_navsto.c:1768
cs_sles_convergence_state_t cs_cdofb_navsto_nl_algo_cvg(cs_param_nl_algo_t nl_algo_type, const cs_real_t *pre_iterate, cs_real_t *cur_iterate, cs_iter_algo_t *algo)
Test if one has to do one more non-linear iteration. Test if performed on the relative norm on the in...
Definition: cs_cdofb_navsto.c:1925
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.
Definition: cs_cdofb_navsto.c:648
void cs_cdofb_block_dirichlet_alge(short int f, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, 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...
Definition: cs_cdofb_navsto.c:1400
void cs_cdofb_fixed_wall(short int fb, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, 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...
Definition: cs_cdofb_navsto.c:1881
cs_cdofb_navsto_boussinesq_type_t
Type of algorithm to compute the Boussinesq approximation.
Definition: cs_cdofb_navsto.h:71
@ CS_CDOFB_NAVSTO_BOUSSINESQ_CELL_DOF
Boussinesq approximation relyong on a cell contribution.
Definition: cs_cdofb_navsto.h:82
@ CS_CDOFB_NAVSTO_BOUSSINESQ_FACE_DOF
Boussinesq approximation relyong on face contributions.
Definition: cs_cdofb_navsto.h:93
void cs_cdofb_navsto_rescale_pressure_to_ref(const cs_navsto_param_t *nsp, const cs_cdo_quantities_t *quant, cs_real_t values[])
Update the pressure field in order to get a field with a mean-value equal to the reference value.
Definition: cs_cdofb_navsto.c:851
void cs_cdofb_navsto_free_builder(cs_cdofb_navsto_builder_t *nsb)
Destroy the given cs_cdofb_navsto_builder_t structure.
Definition: cs_cdofb_navsto.c:245
double 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 in a cell of a vector-valued array defined at faces (values are defined both a...
Definition: cs_cdofb_navsto.c:463
void cs_cdofb_navsto_set_boussinesq_algo(cs_cdofb_navsto_boussinesq_type_t type)
Set the way to compute the Boussinesq approximation.
Definition: cs_cdofb_navsto.c:198
void cs_cdofb_navsto_boussinesq_at_cell(const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cdofb_navsto_builder_t *nsb, cs_cell_sys_t *csys)
Take into account the buoyancy force with the Boussinesq approx. Compute and add the source term to t...
Definition: cs_cdofb_navsto.c:2080
void cs_cdofb_navsto_stream_source_term(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, void *input, cs_real_t *retval)
Get the source term for computing the stream function. This relies on the prototype associated to the...
Definition: cs_cdofb_navsto.c:2196
void cs_cdofb_navsto_init_face_pressure(const cs_navsto_param_t *nsp, const cs_cdo_connect_t *connect, const cs_time_step_t *ts, cs_real_t *pr_f)
Initialize the pressure values when the pressure is defined at faces.
Definition: cs_cdofb_navsto.c:746
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.
Definition: cs_cdofb_navsto.c:269
void cs_cdofb_navsto_set_gravity_func(const cs_navsto_param_t *nsp, cs_cdofb_navsto_source_t **p_func)
Set the function pointer computing the source term in the momentum equation related to the gravity ef...
Definition: cs_cdofb_navsto.c:1995
cs_cdofb_navsto_builder_t cs_cdofb_navsto_create_builder(const cs_navsto_param_t *nsp, const cs_cdo_connect_t *connect)
Create and allocate a local NavSto builder when Fb schemes are used.
Definition: cs_cdofb_navsto.c:215
static void cs_cdofb_navsto_divergence_vect(const cs_cell_mesh_t *cm, cs_real_t div[])
Compute the divergence vector associated to the current cell. WARNING: mind that, differently form th...
Definition: cs_cdofb_navsto.h:205
void cs_cdofb_block_dirichlet_weak(short int fb, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *pty, 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...
Definition: cs_cdofb_navsto.c:1573
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.
Definition: cs_cdofb_navsto.c:889
void() cs_cdofb_navsto_source_t(const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cdofb_navsto_builder_t *nsb, cs_cell_sys_t *csys)
Compute and add a source term to the local RHS. This is a special treatment to enable source involvin...
Definition: cs_cdofb_navsto.h:184
void cs_cdofb_navsto_mass_flux(const cs_navsto_param_t *nsp, const cs_cdo_quantities_t *quant, const cs_real_t *face_vel, cs_real_t *mass_flux)
Compute the mass flux playing the role of the advection field in the Navier-Stokes equations One cons...
Definition: cs_cdofb_navsto.c:421
void cs_cdofb_navsto_boussinesq_by_part(const cs_navsto_param_t *nsp, const cs_cell_mesh_t *cm, const cs_cdofb_navsto_builder_t *nsb, cs_cell_sys_t *csys)
Take into account the buoyancy force with the Boussinesq approx. Compute and add the source term to t...
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:552
cs_sles_convergence_state_t
Definition: cs_sles.h:56
struct _cs_time_plot_t cs_time_plot_t
Definition: cs_time_plot.h:48
double precision, dimension(ncharm), save zeta
Definition: cpincl.f90:96
Definition: cs_mesh_adjacencies.h:68
Definition: cs_advection_field.h:150
Definition: cs_cdo_bc.h:109
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Structure storing additional arrays related to the building of the Navier-Stokes system.
Definition: cs_cdofb_navsto.h:107
cs_real_t mass_rhs
Definition: cs_cdofb_navsto.h:139
cs_real_t * div_op
Definition: cs_cdofb_navsto.h:128
cs_real_t rho_c
Definition: cs_cdofb_navsto.h:115
cs_boundary_type_t * bf_type
Definition: cs_cdofb_navsto.h:159
cs_real_t * pressure_bc_val
Definition: cs_cdofb_navsto.h:160
Set of local and temporary buffers.
Definition: cs_cdo_local.h:60
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
short int n_fc
Definition: cs_cdo_local.h:238
short int * f_sgn
Definition: cs_cdo_local.h:241
cs_quant_t * face
Definition: cs_cdo_local.h:244
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition: cs_cdo_local.h:147
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Field descriptor.
Definition: cs_field.h:131
Structure to handle the convergence of an iterative algorithm.
Definition: cs_iter_algo.h:289
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition: cs_navsto_param.h:611
Structure storing the evaluation of a property and its related data.
Definition: cs_property.h:223
Definition: cs_cdo_quantities.h:129
double meas
Definition: cs_cdo_quantities.h:131
double unitv[3]
Definition: cs_cdo_quantities.h:132
time step descriptor
Definition: cs_time_step.h:64