programmer's documentation
Functions
cs_cdofb_navsto.c File Reference

Routines for building and solving Stokes and Navier-Stokes problem with CDO face-based schemes. 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_cdofb_priv.h"
#include "cs_cdofb_scaleq.h"
#include "cs_cdofb_vecteq.h"
#include "cs_equation_bc.h"
#include "cs_equation_common.h"
#include "cs_equation_priv.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_navsto_coupling.h"
#include "cs_navsto_param.h"
#include "cs_post.h"
#include "cs_source_term.h"
#include "cs_static_condensation.h"
#include "cs_timer.h"
#include "cs_cdofb_navsto.h"
Include dependency graph for cs_cdofb_navsto.c:

Functions

void cs_cdofb_navsto_init_common (const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_matrix_structure_t *sms, const cs_matrix_structure_t *vms)
 Set shared pointers from the main domain members for CDO face-based schemes. More...
 
void cs_cdofb_navsto_init_ac_vpp_context (const cs_navsto_param_t *nsp, const void *nsc_input)
 Initialize a cs_cdofb_navsto_t structure storing in the case of an Artificial Compressibility - VPP approach. More...
 
void cs_cdofb_navsto_init_proj_context (const cs_navsto_param_t *nsp, const void *nsc_input)
 Initialize a cs_cdofb_navsto_t structure storing in the case of an incremental Projection approach. More...
 
void cs_cdofb_navsto_free_context (const cs_navsto_param_t *nsp)
 Destroy a cs_cdofb_navsto_t structure. More...
 
void cs_cdofb_navsto_ac_vpp_compute (const cs_mesh_t *mesh, double dt_cur, const cs_navsto_param_t *nsp, void *nsc_input)
 Solve the Navier-Stokes system with a CDO face-based scheme using an Artificial Compressibility - VPP approach. More...
 
void cs_cdofb_navsto_proj_compute (const cs_mesh_t *mesh, double dt_cur, const cs_navsto_param_t *nsp, void *nsc_input)
 Solve the Navier-Stokes system with a CDO face-based scheme using an incremental correction-projection approach. More...
 
cs_real_tcs_cdofb_navsto_get_face_velocity (void)
 Retrieve the values of the velocity on the faces. More...
 
cs_real_tcs_cdofb_navsto_get_face_pressure (void)
 Retrieve the values of the pressure on the faces. More...
 
void cs_cdofb_navsto_update_fields (const cs_real_t *solu, const cs_real_t *rhs, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data, cs_real_t *field_val)
 Store solution(s) of the linear system into a field structure Update extra-field values if required (for hybrid discretization) More...
 
void cs_cdofb_navsto_set_zero_mean_pressure (cs_real_t values[])
 Update the pressure field in order to get a field with a zero-mean average. More...
 

Detailed Description

Routines for building and solving Stokes and Navier-Stokes problem with CDO face-based schemes.

Function Documentation

◆ cs_cdofb_navsto_ac_vpp_compute()

void cs_cdofb_navsto_ac_vpp_compute ( const cs_mesh_t mesh,
double  dt_cur,
const cs_navsto_param_t nsp,
void *  nsc_input 
)

Solve the Navier-Stokes system with a CDO face-based scheme using an Artificial Compressibility - VPP approach.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]dt_curcurrent value of the time step
[in]nsppointer to a cs_navsto_param_t structure
[in,out]nsc_inputNavier-Stokes coupling context: pointer to a structure cast on-the-fly

◆ cs_cdofb_navsto_free_context()

void cs_cdofb_navsto_free_context ( const cs_navsto_param_t nsp)

Destroy a cs_cdofb_navsto_t structure.

Parameters
[in]nsppointer to a cs_navsto_param_t structure

◆ cs_cdofb_navsto_get_face_pressure()

cs_real_t* cs_cdofb_navsto_get_face_pressure ( void  )

Retrieve the values of the pressure on the faces.

Returns
a pointer to an array of cs_real_t. (warning: may be NULL)

◆ cs_cdofb_navsto_get_face_velocity()

cs_real_t* cs_cdofb_navsto_get_face_velocity ( void  )

Retrieve the values of the velocity on the faces.

Returns
a pointer to an array of cs_real_t

◆ cs_cdofb_navsto_init_ac_vpp_context()

void cs_cdofb_navsto_init_ac_vpp_context ( const cs_navsto_param_t nsp,
const void *  nsc_input 
)

Initialize a cs_cdofb_navsto_t structure storing in the case of an Artificial Compressibility - VPP approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]nsc_inputpointer to a cs_navsto_uzawa_t structure

◆ cs_cdofb_navsto_init_common()

void cs_cdofb_navsto_init_common ( const cs_cdo_quantities_t quant,
const cs_cdo_connect_t connect,
const cs_time_step_t time_step,
const cs_matrix_structure_t sms,
const cs_matrix_structure_t vms 
)

Set shared pointers from the main domain members for CDO face-based schemes.

Parameters
[in]quantadditional mesh quantities struct.
[in]connectpointer to a cs_cdo_connect_t struct.
[in]time_steppointer to a cs_time_step_t structure
[in]smspointer to a cs_matrix_structure_t structure (scalar)
[in]vmspointer to a cs_matrix_structure_t structure (vector)

◆ cs_cdofb_navsto_init_proj_context()

void cs_cdofb_navsto_init_proj_context ( const cs_navsto_param_t nsp,
const void *  nsc_input 
)

Initialize a cs_cdofb_navsto_t structure storing in the case of an incremental Projection approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]nsc_inputpointer to a cs_navsto_uzawa_t structure

◆ cs_cdofb_navsto_proj_compute()

void cs_cdofb_navsto_proj_compute ( const cs_mesh_t mesh,
double  dt_cur,
const cs_navsto_param_t nsp,
void *  nsc_input 
)

Solve the Navier-Stokes system with a CDO face-based scheme using an incremental correction-projection approach.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]dt_curcurrent value of the time step
[in]nsppointer to a cs_navsto_param_t structure
[in,out]nsc_inputNavier-Stokes coupling context: pointer to a structure cast on-the-fly

◆ cs_cdofb_navsto_set_zero_mean_pressure()

void cs_cdofb_navsto_set_zero_mean_pressure ( cs_real_t  values[])

Update the pressure field in order to get a field with a zero-mean average.

Parameters
[in,out]valuespressure field values

◆ cs_cdofb_navsto_update_fields()

void cs_cdofb_navsto_update_fields ( const cs_real_t solu,
const cs_real_t rhs,
const cs_equation_param_t eqp,
cs_equation_builder_t eqb,
void *  data,
cs_real_t field_val 
)

Store solution(s) of the linear system into a field structure Update extra-field values if required (for hybrid discretization)

Parameters
[in]solusolution array
[in]rhsrhs associated to this solution array
[in]eqppointer to a cs_equation_param_t structure
[in,out]eqbpointer to a cs_equation_builder_t structure
[in,out]datapointer to cs_cdofb_navsto_t structure
[in,out]field_valpointer to the current value of the field