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_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_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_uzawa_context (const cs_navsto_param_t *nsp, const void *nsc_input)
 Initialize a cs_cdofb_navsto_t structure storing in the case of a Uzawa-Augmented Lagrangian approach. More...
 
void cs_cdofb_navsto_init_ac_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 approach. 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_uzawa_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 a Uzawa-Lagrangian Augmented approach. More...
 
void cs_cdofb_navsto_ac_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 approach. 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...
 
void cs_cdofb_navsto_update_field (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_extra_op (const char *eqname, const cs_field_t *field, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *data)
 Predefined extra-operations related to this equation. More...
 

Detailed Description

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

Function Documentation

◆ cs_cdofb_navsto_ac_compute()

void cs_cdofb_navsto_ac_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 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_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_extra_op()

void cs_cdofb_navsto_extra_op ( const char *  eqname,
const cs_field_t field,
const cs_equation_param_t eqp,
cs_equation_builder_t eqb,
void *  data 
)

Predefined extra-operations related to this equation.

Parameters
[in]eqnamename of the equation
[in]fieldpointer to a field structure
[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

◆ 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_init_ac_context()

void cs_cdofb_navsto_init_ac_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 approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]nscpointer to a cs_navsto_coupling_uzawa_t structure

◆ 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]nscpointer to a cs_navsto_coupling_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 time step 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_coupling_uzawa_t structure

◆ cs_cdofb_navsto_init_uzawa_context()

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

Initialize a cs_cdofb_navsto_t structure storing in the case of a Uzawa-Augmented Lagrangian approach.

Parameters
[in]nsppointer to a cs_navsto_param_t structure
[in]nsc_inputpointer to a cs_navsto_coupling_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_update_field()

void cs_cdofb_navsto_update_field ( 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

◆ cs_cdofb_navsto_uzawa_compute()

void cs_cdofb_navsto_uzawa_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 a Uzawa-Lagrangian Augmented 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