Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a field. More...
#include "cs_defs.h"#include <assert.h>#include <errno.h>#include <stdio.h>#include <stdarg.h>#include <string.h>#include <math.h>#include <float.h>#include "bft_error.h"#include "bft_mem.h"#include "bft_printf.h"#include "cs_blas.h"#include "cs_halo.h"#include "cs_halo_perio.h"#include "cs_log.h"#include "cs_math.h"#include "cs_mesh.h"#include "cs_convection_diffusion.h"#include "cs_field.h"#include "cs_field_operator.h"#include "cs_field_pointer.h"#include "cs_gradient.h"#include "cs_ext_neighborhood.h"#include "cs_mesh_quantities.h"#include "cs_parall.h"#include "cs_parameters.h"#include "cs_prototypes.h"#include "cs_timer.h"#include "cs_timer_stats.h"#include "cs_velocity_pressure.h"#include "cs_balance.h"Functions | |
| void | cs_balance_initialize (void) |
| Initialize balance timers. | |
| void | cs_balance_scalar (int idtvar, int f_id, int imucpp, int imasac, int inc, cs_equation_param_t *eqp, cs_real_t pvar[], const cs_real_t pvara[], const 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 viscel[], const cs_real_t xcpp[], const cs_real_2_t weighf[], const cs_real_t weighb[], int icvflb, const int icvfli[], cs_real_t smbrp[]) |
| Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a scalar field | |
| void | cs_balance_vector (int idtvar, int f_id, int imasac, int inc, int ivisep, cs_equation_param_t *eqp, cs_real_3_t pvar[], const cs_real_3_t pvara[], const cs_field_bc_coeffs_t *bc_coeffs_v, 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 secvif[], const cs_real_t secvib[], cs_real_6_t viscel[], const cs_real_2_t weighf[], const cs_real_t weighb[], int icvflb, const int icvfli[], cs_real_3_t i_pvar[], cs_real_3_t b_pvar[], cs_real_3_t smbr[]) |
| Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a vector field | |
| void | cs_balance_tensor (int idtvar, int f_id, int imasac, int inc, cs_equation_param_t *eqp, cs_real_6_t pvar[], const cs_real_6_t pvara[], const cs_field_bc_coeffs_t *bc_coeffs_ts, 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 viscel[], const cs_real_2_t weighf[], const cs_real_t weighb[], int icvflb, const int icvfli[], cs_real_6_t smbrp[]) |
| Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a tensor field | |
Variables | |
| static int | _balance_stat_id = -1 |
Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a field.
| void cs_balance_initialize | ( | void | ) |
Initialize balance timers.
| void cs_balance_scalar | ( | int | idtvar, |
| int | f_id, | ||
| int | imucpp, | ||
| int | imasac, | ||
| int | inc, | ||
| cs_equation_param_t * | eqp, | ||
| cs_real_t | pvar[], | ||
| const cs_real_t | pvara[], | ||
| const 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 | viscel[], | ||
| const cs_real_t | xcpp[], | ||
| const cs_real_2_t | weighf[], | ||
| const cs_real_t | weighb[], | ||
| int | icvflb, | ||
| const int | icvfli[], | ||
| cs_real_t | smbrp[] ) |
Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a scalar field 
More precisely, the right hand side 
![\[Rhs = Rhs - \sum_{\fij \in \Facei{\celli}} \left(
\dot{m}_\ij \left( \varia_\fij - \varia_\celli \right)
- \mu_\fij \gradv_\fij \varia \cdot \vect{S}_\ij \right)
\]](form_2.png)
Warning:

Options for the convective scheme:


| [in] | idtvar | indicator of the temporal scheme |
| [in] | f_id | field id (or -1) |
| [in] | imucpp | indicator
|
| [in] | imasac | take mass accumulation into account? |
| [in] | inc | indicator
|
| [in] | eqp | pointer to a cs_equation_param_t structure which contains variable calculation options |
| [in] | pvar | solved variable (current time step) may be nullptr if pvara != nullptr |
| [in] | pvara | solved variable (previous time step) may be nullptr if pvar != nullptr |
| [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] | viscel | symmetric cell tensor |
| [in] | xcpp | array of specific heat (Cp) |
| [in] | weighf | internal face weight between cells i j in case of tensor diffusion |
| [in] | weighb | boundary face weight for cells i in case of tensor diffusion |
| [in] | icvflb | global indicator of boundary convection flux
|
| [in] | icvfli | boundary face indicator array of convection flux
|
| [in,out] | smbrp | right hand side |
| void cs_balance_tensor | ( | int | idtvar, |
| int | f_id, | ||
| int | imasac, | ||
| int | inc, | ||
| cs_equation_param_t * | eqp, | ||
| cs_real_6_t | pvar[], | ||
| const cs_real_6_t | pvara[], | ||
| const cs_field_bc_coeffs_t * | bc_coeffs_ts, | ||
| 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 | viscel[], | ||
| const cs_real_2_t | weighf[], | ||
| const cs_real_t | weighb[], | ||
| int | icvflb, | ||
| const int | icvfli[], | ||
| cs_real_6_t | smbrp[] ) |
Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a tensor field 
More precisely, the right hand side 
![\[\tens{Rhs} = \tens{Rhs} - \sum_{\fij \in \Facei{\celli}} \left(
\dot{m}_\ij \left( \tens{\varia}_\fij - \tens{\varia}_\celli \right)
- \mu_\fij \gradt_\fij \tens{\varia} \cdot \tens{S}_\ij \right)
\]](form_15.png)
Warning:

Options for the convective scheme:
| [in] | idtvar | indicator of the temporal scheme |
| [in] | f_id | field id (or -1) |
| [in] | imasac | take mass accumulation into account? |
| [in] | inc | indicator |
| [in] | eqp | pointer to a cs_equation_param_t structure which contains variable calculation options |
| [in] | pvar | solved velocity (current time step) |
| [in] | pvara | solved velocity (previous time step) |
| [in] | bc_coeffs_ts | 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] | viscel | symmetric cell tensor |
| [in] | weighf | internal face weight between cells i j in case of tensor diffusion |
| [in] | weighb | boundary face weight for cells i in case of tensor diffusion |
| [in] | icvflb | global indicator of boundary convection flux
|
| [in] | icvfli | boundary face indicator array of convection flux
|
| [in,out] | smbrp | right hand side |
| void cs_balance_vector | ( | int | idtvar, |
| int | f_id, | ||
| int | imasac, | ||
| int | inc, | ||
| int | ivisep, | ||
| cs_equation_param_t * | eqp, | ||
| cs_real_3_t | pvar[], | ||
| const cs_real_3_t | pvara[], | ||
| const cs_field_bc_coeffs_t * | bc_coeffs_v, | ||
| 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 | secvif[], | ||
| const cs_real_t | secvib[], | ||
| cs_real_6_t | viscel[], | ||
| const cs_real_2_t | weighf[], | ||
| const cs_real_t | weighb[], | ||
| int | icvflb, | ||
| const int | icvfli[], | ||
| cs_real_3_t | i_pvar[], | ||
| cs_real_3_t | b_pvar[], | ||
| cs_real_3_t | smbr[] ) |
Wrapper to the function which adds the explicit part of the convection/diffusion terms of a transport equation of a vector field 
More precisely, the right hand side 
![\[\vect{Rhs} = \vect{Rhs} - \sum_{\fij \in \Facei{\celli}} \left(
\dot{m}_\ij \left( \vect{\varia}_\fij - \vect{\varia}_\celli \right)
- \mu_\fij \gradt_\fij \vect{\varia} \cdot \vect{S}_\ij \right)
\]](form_9.png)
Remark: if ivisep = 1, then we also take 


Warning:

Options for the convective scheme:
| [in] | idtvar | indicator of the temporal scheme |
| [in] | f_id | field id (or -1) |
| [in] | imasac | take mass accumulation into account? |
| [in] | inc | indicator
|
| [in] | ivisep | indicator to take
|
| [in] | eqp | pointer to a cs_equation_param_t structure which contains variable calculation options |
| [in] | pvar | solved velocity (current time step) |
| [in] | pvara | solved velocity (previous time step) |
| [in] | bc_coeffs_v | 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] | secvif | secondary viscosity at interior faces |
| [in] | secvib | secondary viscosity at boundary faces |
| [in] | viscel | symmetric cell tensor |
| [in] | weighf | internal face weight between cells i j in case of tensor diffusion |
| [in] | weighb | boundary face weight for cells i in case of tensor diffusion |
| [in] | icvflb | global indicator of boundary convection flux
|
| [in] | icvfli | boundary face indicator array of convection flux
|
| [in,out] | smbr | right hand side |
|
static |