#include "cs_defs.h"
#include <assert.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "cs_ale.h"
#include "cs_array.h"
#include "cs_atmo.h"
#include "cs_balance.h"
#include "cs_blas.h"
#include "cs_boundary_conditions.h"
#include "cs_cf_thermo.h"
#include "cs_convection_diffusion.h"
#include "cs_divergence.h"
#include "cs_equation_iterative_solve.h"
#include "cs_face_viscosity.h"
#include "cs_field.h"
#include "cs_field_default.h"
#include "cs_field_operator.h"
#include "cs_field_pointer.h"
#include "cs_gradient.h"
#include "cs_halo.h"
#include "cs_lagr.h"
#include "cs_log.h"
#include "cs_matrix_building.h"
#include "cs_mesh_location.h"
#include "cs_parall.h"
#include "cs_parameters.h"
#include "cs_physical_constants.h"
#include "cs_physical_model.h"
#include "cs_porous_model.h"
#include "cs_prototypes.h"
#include "cs_sat_coupling.h"
#include "cs_sles_default.h"
#include "cs_time_step.h"
#include "cs_velocity_pressure.h"
#include "cs_volume_mass_injection.h"
#include "cs_vof.h"
#include "cs_post.h"
#include "cs_cdo_headers.h"
#include "cs_pressure_correction.h"
Macros | |
#define | CS_PRESSURE_CORRECTION_CDO_DBG 0 |
Functions | |
static void | _pressure_correction_fv (int iterns, cs_lnum_t nfbpcd, cs_lnum_t ncmast, cs_lnum_t ifbpcd[nfbpcd], cs_lnum_t ltmast[], int isostd[], cs_real_t vel[restrict][3], cs_real_t da_uu[restrict][6], cs_real_t coefav[restrict][3], cs_real_t coefbv[restrict][3][3], cs_real_t coefa_dp[restrict], cs_real_t coefb_dp[restrict], cs_real_t spcond[restrict], cs_real_t svcond[restrict], cs_real_t frcxt[restrict][3], cs_real_t dfrcxt[restrict][3], cs_real_t i_visc[restrict], cs_real_t b_visc[restrict]) |
Perform the pressure correction step of the Navier-Stokes equations for incompressible or slightly compressible flows. More... | |
static void | _pressure_correction_cdo (cs_real_t vel[restrict][3], cs_real_t coefav[restrict][3], cs_real_t coefbv[restrict][3][3]) |
Perform the pressure correction step of the Navier-Stokes equations for incompressible or slightly compressible flows. More... | |
static cs_pressure_correction_cdo_t * | _pressure_correction_cdo_create (void) |
Create and initialize a cs_pressure_correction_cdo_t structure. More... | |
void | cs_pressure_correction_fv_activate (void) |
Activate the pressure increment solving with Legacy FV. More... | |
void | cs_pressure_correction_cdo_activate (void) |
Activate the pressure increment solving with CDO. More... | |
void | cs_pressure_correction_model_activate (void) |
Activate the pressure increment, either FV or CDO. More... | |
bool | cs_pressure_correction_cdo_is_activated (void) |
Test if pressure solving with CDO is activated. More... | |
void | cs_pressure_correction_cdo_init_setup (void) |
Start setting-up the pressure increment equation At this stage, numerical settings should be completely determined but connectivity and geometrical information is not yet available. More... | |
void | cs_pressure_correction_cdo_finalize_setup (const cs_domain_t *domain) |
Finalize setting-up the pressure increment equation At this stage, numerical settings should be completely determined. More... | |
void | cs_pressure_correction_cdo_destroy_all (void) |
Free the main structure related to the pressure correction. More... | |
void | cs_pressure_correction (int iterns, cs_lnum_t nfbpcd, cs_lnum_t ncmast, cs_lnum_t ifbpcd[nfbpcd], cs_lnum_t ltmast[], int isostd[], cs_real_t vel[restrict][3], cs_real_t da_uu[restrict][6], cs_real_t coefav[restrict][3], cs_real_t coefbv[restrict][3][3], cs_real_t coefa_dp[restrict], cs_real_t coefb_dp[restrict], cs_real_t spcond[restrict], cs_real_t svcond[restrict], cs_real_t frcxt[restrict][3], cs_real_t dfrcxt[restrict][3], cs_real_t i_visc[restrict], cs_real_t b_visc[restrict]) |
Perform the pressure correction step of the Navier-Stokes equations for incompressible or slightly compressible flows. More... | |
Variables | |
static const char | _err_empty_prcdo [] |
static bool | cs_pressure_correction_cdo_active = false |
static cs_pressure_correction_cdo_t * | cs_pressure_correction_cdo = NULL |
Pressure correction step.
#define CS_PRESSURE_CORRECTION_CDO_DBG 0 |
|
static |
Perform the pressure correction step of the Navier-Stokes equations for incompressible or slightly compressible flows.
:
[in] | vel | velocity |
[in] | coefav | boundary condition array for the variable (explicit part) |
[in] | coefbv | boundary condition array for the variable (implicit part) |
|
static |
Create and initialize a cs_pressure_correction_cdo_t structure.
|
static |
Perform the pressure correction step of the Navier-Stokes equations for incompressible or slightly compressible flows.
This function solves the following Poisson equation on the pressure:
The mass flux is then updated as follows:
:
Please refer to the resopv section of the theory guide for more information.
[in] | iterns | Navier-Stokes iteration number |
[in] | nfbpcd | number of faces with condensation source term |
[in] | ncmast | number of cells with condensation source terms |
[in] | ifbpcd | index of faces with condensation source term |
[in] | ltmast | index of cells with condensation source terms |
[in] | isostd | indicator of standard outlet and index of the reference outlet face |
[in] | vel | velocity |
[in,out] | da_uu | velocity matrix |
[in] | coefav | boundary condition array for the variable (explicit part) |
[in] | coefbv | boundary condition array for the variable (implicit part) |
[in] | coefa_dp | boundary conditions for the pressure increment |
[in] | coefb_dp | boundary conditions for the pressure increment |
[in] | spcond | variable value associated to the condensation source term (for ivar=ipr, spcond is the flow rate ![]() |
[in] | svcond | variable value associated to the condensation source term (for ivar=ipr, svcond is the flow rate ![]() |
[in] | frcxt | external forces making hydrostatic pressure |
[in] | dfrcxt | variation of the external forces composing the hydrostatic pressure |
[in] | i_visc | visc*surface/dist aux faces internes |
[in] | b_visc | visc*surface/dist aux faces de bord |
void cs_pressure_correction | ( | int | iterns, |
cs_lnum_t | nfbpcd, | ||
cs_lnum_t | ncmast, | ||
cs_lnum_t | ifbpcd[nfbpcd], | ||
cs_lnum_t | ltmast[], | ||
int | isostd[], | ||
cs_real_t | vel[restrict][3], | ||
cs_real_t | da_uu[restrict][6], | ||
cs_real_t | coefav[restrict][3], | ||
cs_real_t | coefbv[restrict][3][3], | ||
cs_real_t | coefa_dp[restrict], | ||
cs_real_t | coefb_dp[restrict], | ||
cs_real_t | spcond[restrict], | ||
cs_real_t | svcond[restrict], | ||
cs_real_t | frcxt[restrict][3], | ||
cs_real_t | dfrcxt[restrict][3], | ||
cs_real_t | i_visc[restrict], | ||
cs_real_t | b_visc[restrict] | ||
) |
Perform the pressure correction step of the Navier-Stokes equations for incompressible or slightly compressible flows.
This function solves the following Poisson equation on the pressure:
The mass flux is then updated as follows:
:
Please refer to the resopv section of the theory guide for more information.
[in] | iterns | Navier-Stokes iteration number |
[in] | nfbpcd | number of faces with condensation source term |
[in] | ncmast | number of cells with condensation source terms |
[in] | ifbpcd | index of faces with condensation source term |
[in] | ltmast | index of cells with condensation source terms |
[in] | isostd | indicator of standard outlet and index of the reference outlet face |
[in] | vel | velocity |
[in,out] | da_uu | velocity matrix |
[in] | coefav | boundary condition array for the variable (explicit part) |
[in] | coefbv | boundary condition array for the variable (implicit part) |
[in] | coefa_dp | boundary conditions for the pressure increment |
[in] | coefb_dp | boundary conditions for the pressure increment |
[in] | spcond | variable value associated to the condensation source term (for ivar=ipr, spcond is the flow rate ![]() |
[in] | svcond | variable value associated to the condensation source term (for ivar=ipr, svcond is the flow rate ![]() |
[in] | frcxt | external forces making hydrostatic pressure |
[in] | dfrcxt | variation of the external forces composing the hydrostatic pressure |
[in] | i_visc | visc*surface/dist aux faces internes |
[in] | b_visc | visc*surface/dist aux faces de bord |
void cs_pressure_correction_cdo_activate | ( | void | ) |
Activate the pressure increment solving with CDO.
void cs_pressure_correction_cdo_destroy_all | ( | void | ) |
Free the main structure related to the pressure correction.
void cs_pressure_correction_cdo_finalize_setup | ( | const cs_domain_t * | domain | ) |
Finalize setting-up the pressure increment equation At this stage, numerical settings should be completely determined.
[in] | domain | pointer to a cs_domaint_t structure |
void cs_pressure_correction_cdo_init_setup | ( | void | ) |
Start setting-up the pressure increment equation At this stage, numerical settings should be completely determined but connectivity and geometrical information is not yet available.
bool cs_pressure_correction_cdo_is_activated | ( | void | ) |
Test if pressure solving with CDO is activated.
void cs_pressure_correction_fv_activate | ( | void | ) |
Activate the pressure increment solving with Legacy FV.
void cs_pressure_correction_model_activate | ( | void | ) |
Activate the pressure increment, either FV or CDO.
|
static |
|
static |
|
static |