#include "base/cs_defs.h"#include <cmath>#include <chrono>#include <assert.h>#include <errno.h>#include <stdio.h>#include <stdarg.h>#include <string.h>#include <math.h>#include <float.h>#include <mpi.h>#include "bft/bft_error.h"#include "bft/bft_printf.h"#include "base/cs_algorithm.h"#include "base/cs_array.h"#include "base/cs_boundary_conditions.h"#include "base/cs_boundary_conditions_set_coeffs.h"#include "base/cs_dispatch.h"#include "cdo/cs_equation_param.h"#include "base/cs_halo.h"#include "base/cs_log.h"#include "base/cs_internal_coupling.h"#include "base/cs_math.h"#include "base/cs_mem.h"#include "mesh/cs_mesh.h"#include "base/cs_field.h"#include "base/cs_field_default.h"#include "base/cs_field_operator.h"#include "base/cs_field_pointer.h"#include "base/cs_parall.h"#include "base/cs_parameters.h"#include "base/cs_porous_model.h"#include "base/cs_profiling.h"#include "base/cs_reducers.h"#include "base/cs_timer.h"#include "base/cs_velocity_pressure.h"#include "alge/cs_blas.h"#include "alge/cs_gradient.h"#include "alge/cs_gradient_boundary.h"#include "mesh/cs_mesh_quantities.h"#include "alge/cs_convection_diffusion.h"#include "alge/cs_convection_diffusion_priv.h"
Include dependency graph for cs_convection_diffusion_v9.cpp:Functions | |
| bool | cs_convection_diffusion_scalar_v9 (const cs_field_t *f, const cs_equation_param_t eqp, int icvflb, int inc, int imasac, const cs_real_t *restrict pvar, const int icvfli[], cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t *c_weight, cs_real_t *rhs, cs_real_2_t i_flux[], cs_real_t b_flux[]) |
| Add the explicit part of the convection/diffusion terms of a standard transport equation of a scalar field | |
| bool | cs_convection_diffusion_thermal_v9 (const cs_field_t *f, const cs_equation_param_t eqp, int inc, int imasac, const cs_real_t *pvar, cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t *c_weight, const cs_real_t xcpp[], cs_real_t *restrict rhs) |
| Add the explicit part of the convection/diffusion terms of a transport equation of a scalar field | |
| bool | cs_convection_diffusion_vector_v9 (int idtvar, int f_id, const cs_equation_param_t eqp, int icvflb, int inc, int ivisep, int imasac, cs_real_3_t *restrict pvar, const cs_real_3_t *restrict pvara, const int icvfli[], cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t i_secvis[], const cs_real_t b_secvis[], cs_real_3_t *restrict i_pvar, cs_real_3_t *restrict b_pvar, cs_real_3_t *restrict rhs) |
| Add the explicit part of the convection/diffusion terms of a transport equation of a vector field | |
| bool | cs_convection_diffusion_tensor_v9 (int idtvar, int f_id, const cs_equation_param_t eqp, int icvflb, int inc, int imasac, cs_real_6_t *restrict pvar, const cs_real_6_t *restrict pvara, cs_field_bc_coeffs_t *bc_coeffs, const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], cs_real_6_t *restrict rhs) |
| Add the explicit part of the convection/diffusion terms of a transport equation of a tensor field | |
| bool cs_convection_diffusion_scalar_v9 | ( | const cs_field_t * | f, |
| const cs_equation_param_t | eqp, | ||
| int | icvflb, | ||
| int | inc, | ||
| int | imasac, | ||
| const cs_real_t *restrict | pvar, | ||
| const int | icvfli[], | ||
| cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const cs_real_t | i_massflux[], | ||
| const cs_real_t | b_massflux[], | ||
| const cs_real_t | i_visc[], | ||
| const cs_real_t | b_visc[], | ||
| const cs_real_t * | c_weight, | ||
| cs_real_t * | rhs, | ||
| cs_real_2_t | i_flux[], | ||
| cs_real_t | b_flux[] | ||
| ) |
Add the explicit part of the convection/diffusion terms of a standard transport equation of a scalar field
.
More precisely, the right hand side
is updated as follows:
Warning:
Please refer to the bilsc2 section of the theory guide for more information.
| [in] | f | pointer to field, or null |
| [in] | eqp | equation parameters |
| [in] | icvflb | global indicator of boundary convection flux
|
| [in] | inc | indicator
|
| [in] | imasac | take mass accumulation into account? |
| [in] | pvar | solved variable |
| [in] | icvfli | boundary face indicator array of convection flux
|
| [in] | bc_coeffs | boundary condition structure for the variable |
| [in] | i_massflux | mass flux at interior faces |
| [in] | b_massflux | mass flux at boundary faces |
| [in] | i_visc | |
| [in] | b_visc | |
| [in] | c_weight | diffusion gradient weighting |
| [in,out] | rhs | right hand side |
| [in,out] | i_flux | interior flux (or nullptr) |
| [in,out] | b_flux | boundary flux (or nullptr) |
| bool cs_convection_diffusion_tensor_v9 | ( | int | idtvar, |
| int | f_id, | ||
| const cs_equation_param_t | eqp, | ||
| int | icvflb, | ||
| int | inc, | ||
| int | imasac, | ||
| cs_real_6_t *restrict | pvar, | ||
| const cs_real_6_t *restrict | pvara, | ||
| cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const cs_real_t | i_massflux[], | ||
| const cs_real_t | b_massflux[], | ||
| const cs_real_t | i_visc[], | ||
| const cs_real_t | b_visc[], | ||
| cs_real_6_t *restrict | rhs | ||
| ) |
Add the explicit part of the convection/diffusion terms of a transport equation of a tensor field
.
More precisely, the right hand side
is updated as follows:
Warning:
| [in] | idtvar | indicator of the temporal scheme |
| [in] | f_id | index of the current variable |
| [in] | eqp | equation parameters |
| [in] | icvflb | global indicator of boundary convection flux
|
| [in] | inc | indicator
|
| [in] | imasac | take mass accumulation into account? |
| [in] | pvar | solved velocity (current time step) |
| [in] | pvara | solved velocity (previous time step) |
| [in] | bc_coeffs | boundary condition structure for the variable |
| [in] | i_massflux | mass flux at interior faces |
| [in] | b_massflux | mass flux at boundary faces |
| [in] | i_visc | |
| [in] | b_visc | |
| [in,out] | rhs | right hand side |
| bool cs_convection_diffusion_thermal_v9 | ( | const cs_field_t * | f, |
| const cs_equation_param_t | eqp, | ||
| int | inc, | ||
| int | imasac, | ||
| const cs_real_t * | pvar, | ||
| cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const cs_real_t | i_massflux[], | ||
| const cs_real_t | b_massflux[], | ||
| const cs_real_t | i_visc[], | ||
| const cs_real_t | b_visc[], | ||
| const cs_real_t * | c_weight, | ||
| const cs_real_t | xcpp[], | ||
| cs_real_t *restrict | rhs | ||
| ) |
Add the explicit part of the convection/diffusion terms of a transport equation of a scalar field
such as the temperature.
More precisely, the right hand side
is updated as follows:
| [in] | f | pointer to field, or null |
| [in] | eqp | equation parameters) |
| [in] | inc | indicator
|
| [in] | imasac | take mass accumulation into account? |
| [in] | pvar | solved variable |
| [in] | bc_coeffs | boundary condition structure for the variable |
| [in] | i_massflux | mass flux at interior faces |
| [in] | b_massflux | mass flux at boundary faces |
| [in] | i_visc | |
| [in] | b_visc | |
| [in] | w_stride | stride for weighting coefficient |
| [in] | c_weight | diffusion gradient weighting |
| [in] | xcpp | array of specific heat ( |
| [in,out] | rhs | right hand side |
| bool cs_convection_diffusion_vector_v9 | ( | int | idtvar, |
| int | f_id, | ||
| const cs_equation_param_t | eqp, | ||
| int | icvflb, | ||
| int | inc, | ||
| int | ivisep, | ||
| int | imasac, | ||
| cs_real_3_t *restrict | pvar, | ||
| const cs_real_3_t *restrict | pvara, | ||
| const int | icvfli[], | ||
| cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const cs_real_t | i_massflux[], | ||
| const cs_real_t | b_massflux[], | ||
| const cs_real_t | i_visc[], | ||
| const cs_real_t | b_visc[], | ||
| const cs_real_t | i_secvis[], | ||
| const cs_real_t | b_secvis[], | ||
| cs_real_3_t *restrict | i_pvar, | ||
| cs_real_3_t *restrict | b_pvar, | ||
| cs_real_3_t *restrict | rhs | ||
| ) |
Add the explicit part of the convection/diffusion terms of a transport equation of a vector field
.
More precisely, the right hand side
is updated as follows:
Remark: if ivisep = 1, then we also take
, where
is the secondary viscosity, i.e. usually
.
Warning:
| [in] | idtvar | indicator of the temporal scheme |
| [in] | f_id | index of the current variable |
| [in] | eqp | equation parameters |
| [in] | icvflb | global indicator of boundary convection flux
|
| [in] | inc | indicator
|
| [in] | ivisep | indicator to take
|
| [in] | imasac | take mass accumulation into account? |
| [in] | pvar | solved velocity (current time step) |
| [in] | pvara | solved velocity (previous time step) |
| [in] | icvfli | boundary face indicator array of convection flux
|
| [in] | bc_coeffs | boundary conditions structure for the variable |
| [in] | i_massflux | mass flux at interior faces |
| [in] | b_massflux | mass flux at boundary faces |
| [in] | i_visc | |
| [in] | b_visc | |
| [in] | i_secvis | secondary viscosity at interior faces |
| [in] | b_secvis | secondary viscosity at boundary faces |
| [in] | i_pvar | velocity at interior faces |
| [in] | b_pvar | velocity at boundary faces |
| [in,out] | rhs | right hand side |