#include "base/cs_defs.h"#include "base/cs_profiling.h"#include "bft/bft_error.h"#include "base/cs_field.h"#include "base/cs_math.h"#include "cdo/cs_equation_param.h"#include "base/cs_dispatch.h"
Include dependency graph for cs_boundary_conditions_set_coeffs.h:Go to the source code of this file.
Functions | |
| void | cs_boundary_conditions_set_coeffs (int nvar, int iterns, int isvhb, int italim, int itrfin, int ineefl, int itrfup, int isostd[], cs_real_t *visvdr, cs_real_t hbord[], cs_real_t theipb[], int nftcdt) |
| Translation of the boundary conditions given by the user in a form that fits to the solver. More... | |
| void | cs_boundary_conditions_set_coeffs_init (void) |
| Initialization of boundary condition arrays. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_neumann_vector (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t qimpv[3], cs_real_t hint) |
| Set Neumann BC for a scalar for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_neumann_vector_aniso (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t qimpv[3], const cs_real_t hint[6]) |
| Set neumann BC for an anisotropic vector for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_neumann_tensor (cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t qimpts[6], cs_real_t hint) |
| Set Neumann boundary conditions for a tensor for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_vector (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], cs_real_t hint, const cs_real_t hextv[3]) |
| Set Dirichlet BC for a vector for a given face. More... | |
| CS_F_HOST_DEVICE void | cs_boundary_conditions_set_convective_outlet_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pimp, cs_real_t cfl, cs_real_t hint) |
| Set convective oulet boundary condition for a scalar. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_vector_aniso (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t hintt[6], const cs_real_t hextv[3]) |
| Set Dirichlet BC for a vector for a given face with left anisotropic diffusion. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_tensor (cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpts[6], cs_real_t hint, const cs_real_t hextts[6]) |
| Set Dirichlet BC for a tensor for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_generalized_sym_vector (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], cs_real_t hint, const cs_nreal_t normal[3]) |
| Set generalized BC for a symmetric vector for a given face. More... | |
| CS_F_HOST_DEVICE void | cs_boundary_conditions_set_generalized_sym_vector_aniso (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], const cs_real_t hint[6], const cs_nreal_t normal[3]) |
| Set generalized BC for an anisotropic symmetric vector for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_generalized_dirichlet_vector (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], cs_real_t hint, const cs_nreal_t normal[3]) |
| Set generalized Dirichlet BC for a vector for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_generalized_dirichlet_sym_tensor (cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpv[6], const cs_real_t qimpv[6], cs_real_t hint, const cs_nreal_t normal[3]) |
| Set generalized Dirichlet BC for a symmetric tensor for a given face. More... | |
| CS_F_HOST_DEVICE void | cs_boundary_conditions_set_generalized_dirichlet_vector_aniso (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3], const cs_real_t hint[6], const cs_nreal_t normal[3]) |
| Set generalized Dirichlet BC for an anisotropic vector for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_convective_outlet_vector (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t cflv[3], cs_real_t hint) |
| Set convective outlet BC for a vector for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_convective_outlet_tensor (cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpts[6], const cs_real_t cflts[6], cs_real_t hint) |
| Set convective outlet BC for a tensor for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_convective_outlet_vector_aniso (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t cflv[3], const cs_real_t hintt[6]) |
| Set convective outlet BC for an anisotropic vector for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_conv_neumann_diff_vector (cs_real_t a[3], cs_real_t af[3], cs_real_t b[3][3], cs_real_t bf[3][3], const cs_real_t pimpv[3], const cs_real_t qimpv[3]) |
| Imposed value for the convection operator, imposed flux for diffusion, for a vector. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_conv_neumann_diff_tensor (cs_real_t a[6], cs_real_t af[6], cs_real_t b[6][6], cs_real_t bf[6][6], const cs_real_t pimpts[6], const cs_real_t qimpts[6]) |
| Imposed value for the convection operator, imposed flux for diffusion, for a tensor. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_neumann_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t qimp, cs_real_t hint) |
| Set Neumann BC for a scalar for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_neumann_scalar_hmg (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf) |
| Set homogeneous Neumann BC for a scalar for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pimp, cs_real_t hint, cs_real_t hext) |
| Set Dirichlet BC for a scalar for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_neumann_conv_h_neumann_diff_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t dimp, cs_real_t hint) |
| Set Neumann BC for the convection operator, zero flux for diffusion. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_affine_function_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pinf, cs_real_t ratio, cs_real_t hint) |
| Set BC for an affine scalar function for a given face. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_affine_function_conv_neumann_diff_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pinf, cs_real_t ratio, cs_real_t dimp) |
| Set Neumann BC for the convection operator, imposed flux for diffusion. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_total_flux (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t hext, cs_real_t dimp) |
| Set total flux as a Robin condition. More... | |
| static CS_F_HOST_DEVICE void | cs_boundary_conditions_set_dirichlet_conv_neumann_diff_scalar (cs_real_t &a, cs_real_t &af, cs_real_t &b, cs_real_t &bf, cs_real_t pimp, cs_real_t dimp) |
| Imposed value for the convection operator, imposed flux for diffusion, for a scalar. More... | |
| void | cs_boundary_conditions_update_bc_coeff_face_values (cs_dispatch_context &ctx, const cs_field_t *f, const cs_field_bc_coeffs_t *bc_coeffs, const int inc, const cs_equation_param_t *eqp, const bool need_compute_bc_grad, const bool need_compute_bc_flux, int hyd_p_flag, cs_real_t f_ext[][3], cs_real_t visel[], cs_real_t viscel[][6], const cs_real_t weighb[], const cs_real_t pvar[], cs_real_t val_f[], cs_real_t flux[]) |
| Update face value for gradient and diffusion when solving in increment. More... | |
| void | cs_boundary_conditions_update_bc_coeff_face_values (cs_dispatch_context &ctx, cs_field_t *f, const cs_equation_param_t *eqp, const bool need_compute_bc_grad, const bool need_compute_bc_flux, int hyd_p_flag, cs_real_t f_ext[][3], cs_real_t viscel[][6], const cs_real_t weighb[], const cs_real_t pvar[]) |
| Update boundary coefficient face values for gradient and diffusion when solving for a given field. More... | |
| template<cs_lnum_t stride> | |
| void | cs_boundary_conditions_update_bc_coeff_face_values_strided (cs_dispatch_context &ctx, cs_field_t *f, const cs_field_bc_coeffs_t *bc_coeffs, const int inc, const cs_equation_param_t *eqp, const cs_real_t pvar[][stride], cs_real_t val_ip[][stride], cs_real_t val_f[][stride], cs_real_t flux[][stride], cs_real_t flux_lim[][stride]) |
| Update face value for gradient and diffusion when solving in increments. More... | |
| template<cs_lnum_t stride> | |
| void | cs_boundary_conditions_update_bc_coeff_face_values_strided (cs_dispatch_context &ctx, cs_field_t *f, const cs_real_t pvar[][stride]) |
| void | cs_boundary_conditions_ensure_bc_coeff_face_values_allocated (cs_field_bc_coeffs_t *bc_coeffs, cs_lnum_t n_b_faces, cs_lnum_t dim, cs_alloc_mode_t amode, bool limiter) |
| Allocate BC coefficients face values if needed. More... | |
| void | cs_init_bc_coeffs_solve (cs_bc_coeffs_solve_t &c, cs_lnum_t n_b_faces, cs_lnum_t stride, cs_alloc_mode_t amode, bool limiter) |
| Initialize boundary condition coefficients solve arrays. More... | |
| void | cs_clear_bc_coeffs_solve (cs_bc_coeffs_solve_t &c) |
| Free boundary condition coefficients solve arrays. More... | |
| void cs_boundary_conditions_ensure_bc_coeff_face_values_allocated | ( | cs_field_bc_coeffs_t * | bc_coeffs, |
| cs_lnum_t | n_b_faces, | ||
| cs_lnum_t | dim, | ||
| cs_alloc_mode_t | amode, | ||
| bool | limiter | ||
| ) |
Allocate BC coefficients face values if needed.
| [in,out] | bc_coeffs | pointer to boundary conditions coefficients. |
| [in] | n_b_faces | number of boundary faces |
| [in] | dim | associated field dimension |
| [in] | amode | allocation mode |
| [in] | limiter | is a limiter active ? |
|
inlinestatic |
Set Neumann BC for the convection operator, imposed flux for diffusion.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pinf | affine part |
| [in] | ratio | linear part |
| [in] | dimp | flux value to impose |
|
inlinestatic |
Set BC for an affine scalar function for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pinf | affine part |
| [in] | ratio | linear part |
| [in] | hint | internal exchange coefficient |
| void cs_boundary_conditions_set_coeffs | ( | int | nvar, |
| int | iterns, | ||
| int | isvhb, | ||
| int | italim, | ||
| int | itrfin, | ||
| int | ineefl, | ||
| int | itrfup, | ||
| int | isostd[], | ||
| cs_real_t * | visvdr, | ||
| cs_real_t | hbord[], | ||
| cs_real_t | theipb[], | ||
| int | nftcdt | ||
| ) |
Translation of the boundary conditions given by the user in a form that fits to the solver.
The values at a boundary face
stored in the face center
of the variable
and its diffusive flux
are written as:
and
where
is the value of the variable
at the neighboring cell.
Please refer to the boundary conditions section of the theory guide for more informations, as well as the condli section.
| [in] | nvar | total number of variables |
| [in] | iterns | iteration number on Navier-Stokes equations |
| [in] | isvhb | id of field whose exchange coeffient should be saved at the walls, or -1. |
| [in] | italim | for ALE |
| [in] | itrfin | Last velocity-pressure sub-iteration indicator |
| [in] | ineefl | for ALE |
| [in] | itrfup | Update after velocity-pressure sub-iterations |
| [in,out] | isostd | indicator for standard outlet and reference face index |
| [in] | dt | time step (per cell) |
| [in,out] | visvdr | dynamic viscosity after V. Driest damping in boundary cells |
| [out] | hbord | exchange coefficient at boundary |
| [out] | theipb | value of thermal scalar at |
| [in] | nftcdt | Global indicator of condensation source terms (ie. sum on the processors of nfbpcd) cells associated to the face with condensation phenomenon |
| void cs_boundary_conditions_set_coeffs_init | ( | void | ) |
Initialization of boundary condition arrays.
| CS_F_HOST_DEVICE void cs_boundary_conditions_set_convective_outlet_scalar | ( | cs_real_t & | a, |
| cs_real_t & | af, | ||
| cs_real_t & | b, | ||
| cs_real_t & | bf, | ||
| cs_real_t | pimp, | ||
| cs_real_t | cfl, | ||
| cs_real_t | hint | ||
| ) |
Set convective oulet boundary condition for a scalar.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimp | flux value to impose |
| [in] | cfl | local Courant number used to convect |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set convective outlet BC for a tensor for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpts | Dirichlet value to impose |
| [in] | cflts | local Courant number used to convect |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set convective outlet BC for a vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose |
| [in] | cflv | local Courant number used to convect |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set convective outlet BC for an anisotropic vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose |
| [in] | cflv | local Courant number used to convect |
| [in] | hintt | internal exchange coefficient |
|
inlinestatic |
Imposed value for the convection operator, imposed flux for diffusion, for a scalar.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimp | Dirichlet value to impose |
| [in] | dimp | flux value to impose |
|
inlinestatic |
Imposed value for the convection operator, imposed flux for diffusion, for a tensor.
| [out] | coefa | explicit BC coefficient for gradients |
| [out] | cofaf | explicit BC coefficient for diffusive flux |
| [out] | coefb | implicit BC coefficient for gradients |
| [out] | cofbf | implicit BC coefficient for diffusive flux |
| [in] | pimpts | Dirichlet value to impose |
| [in] | qimpts | flux value to impose |
|
inlinestatic |
Imposed value for the convection operator, imposed flux for diffusion, for a vector.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose |
| [in] | qimpv | flux value to impose |
|
inlinestatic |
Set Dirichlet BC for a scalar for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimp | Dirichlet value to impose |
| [in] | hint | internal exchange coefficient |
| [in] | hext | external exchange coefficient (assumed infinite/ignored if < 0) |
|
inlinestatic |
Set Dirichlet BC for a tensor for a given face.
| [out] | coefa | explicit BC coefficient for gradients |
| [out] | cofaf | explicit BC coefficient for diffusive flux |
| [out] | coefb | implicit BC coefficient for gradients |
| [out] | cofbf | implicit BC coefficient for diffusive flux |
| [in] | pimpts | Dirichlet value to impose |
| [in] | hint | internal exchange coefficient |
| [in] | hextts | external exchange coefficient (10^30 by default) |
|
inlinestatic |
Set Dirichlet BC for a vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | fb | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose |
| [in] | hint | internal exchange coefficient |
| [in] | hextv | external exchange coefficient (assumed infinite/ignored if < 0) |
|
inlinestatic |
Set Dirichlet BC for a vector for a given face with left anisotropic diffusion.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose |
| [in] | hintt | internal exchange coefficient |
| [in] | hextv | external exchange coefficient (assumed infinite/ignored if < 0) |
|
inlinestatic |
Set generalized Dirichlet BC for a symmetric tensor for a given face.
That is Dirichlet on shear, Neumann on "normal components"
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose on the tangential components |
| [in] | qimpv | flux value to impose on the normal component |
| [in] | hint | internal exchange coefficient |
| [in] | normal | unit normal |
|
inlinestatic |
Set generalized Dirichlet BC for a vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose on the tangential components |
| [in] | qimpv | flux value to impose on the normal component |
| [in] | hint | internal exchange coefficient |
| [in] | normal | unit normal |
| CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_dirichlet_vector_aniso | ( | cs_real_t | a[3], |
| cs_real_t | af[3], | ||
| cs_real_t | b[3][3], | ||
| cs_real_t | bf[3][3], | ||
| const cs_real_t | pimpv[3], | ||
| const cs_real_t | qimpv[3], | ||
| const cs_real_t | hint[6], | ||
| const cs_nreal_t | normal[3] | ||
| ) |
Set generalized Dirichlet BC for an anisotropic vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose on the tangential components |
| [in] | qimpv | flux value to impose on the normal component |
| [in] | hint | internal exchange coefficient |
| [in] | normal | unit normal |
|
inlinestatic |
Set generalized BC for a symmetric vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose on the normal component |
| [in] | qimpv | flux value to impose on the tangential components |
| [in] | hint | internal exchange coefficient |
| [in] | normal | unit normal |
| CS_F_HOST_DEVICE void cs_boundary_conditions_set_generalized_sym_vector_aniso | ( | cs_real_t | a[3], |
| cs_real_t | af[3], | ||
| cs_real_t | b[3][3], | ||
| cs_real_t | bf[3][3], | ||
| const cs_real_t | pimpv[3], | ||
| const cs_real_t | qimpv[3], | ||
| const cs_real_t | hint[6], | ||
| const cs_nreal_t | normal[3] | ||
| ) |
Set generalized BC for an anisotropic symmetric vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | pimpv | Dirichlet value to impose on the normal component |
| [in] | qimpv | flux value to impose on the tangential components |
| [in] | hint | internal exchange coefficient |
| [in] | normal | unit normal |
|
inlinestatic |
Set Neumann BC for the convection operator, zero flux for diffusion.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | dimp | flux value to impose |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set Neumann BC for a scalar for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | qimp | flux value to impose |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set homogeneous Neumann BC for a scalar for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
|
inlinestatic |
Set Neumann boundary conditions for a tensor for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | fb | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | qimpts | flux value to impose |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set Neumann BC for a scalar for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | qimpv | flux value to impose |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set neumann BC for an anisotropic vector for a given face.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | qimpv | flux value to impose |
| [in] | hint | internal exchange coefficient |
|
inlinestatic |
Set total flux as a Robin condition.
| [out] | a | explicit BC coefficient for gradients |
| [out] | af | explicit BC coefficient for diffusive flux |
| [out] | b | implicit BC coefficient for gradients |
| [out] | bf | implicit BC coefficient for diffusive flux |
| [in] | hext | convective flux to be imposed |
| [in] | dimp | flux value to impose |
| void cs_boundary_conditions_update_bc_coeff_face_values | ( | cs_dispatch_context & | ctx, |
| const cs_field_t * | f, | ||
| const cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const int | inc, | ||
| const cs_equation_param_t * | eqp, | ||
| const bool | need_compute_bc_grad, | ||
| const bool | need_compute_bc_flux, | ||
| int | hyd_p_flag, | ||
| cs_real_t | f_ext[][3], | ||
| cs_real_t | visel[], | ||
| cs_real_t | viscel[][6], | ||
| const cs_real_t | weighb[], | ||
| const cs_real_t | pvar[], | ||
| cs_real_t | val_f[], | ||
| cs_real_t | flux[] | ||
| ) |
Update face value for gradient and diffusion when solving in increment.
| [in] | ctx | reference to dispatch context |
| [in] | f | pointer to field |
| [in] | bc_coeffs | boundary condition structure |
| [in] | inc | 0 if an increment, 1 otherwise |
| [in] | eqp | equation parameters |
| [in] | need_compute_bc_grad | val_f must be computed |
| [in] | need_compute_bc_flux | flux must be computed |
| [in] | hyd_p_flag | hydrostatic pressure indicator |
| [in] | f_ext | exterior force generating pressure |
| [in] | visel | viscosity by cell, or nullptr |
| [in] | viscel | symmetric cell tensor |
| [in] | weighb | boundary face weight for cells i in case of tensor diffusion, or nullptr |
| [in] | var | variable values at cell centers |
| [in,out] | var_f | face values for the gradient computation |
| [in,out] | flux | face values for the diffusion computation |
| void cs_boundary_conditions_update_bc_coeff_face_values | ( | cs_dispatch_context & | ctx, |
| cs_field_t * | f, | ||
| const cs_equation_param_t * | eqp, | ||
| const bool | need_compute_bc_grad, | ||
| const bool | need_compute_bc_flux, | ||
| int | hyd_p_flag, | ||
| cs_real_t | f_ext[][3], | ||
| cs_real_t | viscel[][6], | ||
| const cs_real_t | weighb[], | ||
| const cs_real_t | pvar[] | ||
| ) |
Update boundary coefficient face values for gradient and diffusion when solving for a given field.
| [in] | ctx | reference to dispatch context |
| [in,out] | f | pointer to field |
| [in] | eqp | equation parameters |
| [in] | need_compute_bc_grad | val_f must be computed |
| [in] | need_compute_bc_flux | flux must be computed |
| [in] | hyd_p_flag | flag for hydrostatic pressure |
| [in] | f_ext | exterior force generating pressure |
| [in] | viscel | symmetric cell tensor |
| [in] | weighb | boundary face weight for cells i in case of tensor diffusion, or nullptr |
| [in] | pvar | variable values at cell centers |
| void cs_boundary_conditions_update_bc_coeff_face_values_strided | ( | cs_dispatch_context & | ctx, |
| cs_field_t * | f, | ||
| const cs_field_bc_coeffs_t * | bc_coeffs, | ||
| const int | inc, | ||
| const cs_equation_param_t * | eqp, | ||
| const cs_real_t | pvar[][stride], | ||
| cs_real_t | val_ip[][stride], | ||
| cs_real_t | val_f[][stride], | ||
| cs_real_t | flux[][stride], | ||
| cs_real_t | flux_lim[][stride] | ||
| ) |
Update face value for gradient and diffusion when solving in increments.
| [in] | ctx | reference to dispatch context |
| [in] | f | pointer to field |
| [in] | bc_coeffs | boundary condition structure for the variable |
| [in] | inc | 0 if an increment, 1 otherwise |
| [in] | eqp | equation parameters |
| [in] | pvar | variable values at cell centers |
| [in,out] | var_ip | boundary variable values at I' position |
| [in,out] | var_f | face values for the gradient computation |
| [in,out] | var_f_d | face values for the diffusion computation |
| [in,out] | var_f_d_lim | face values for the diffusion computation (with limiter) |
| void cs_boundary_conditions_update_bc_coeff_face_values_strided | ( | cs_dispatch_context & | ctx, |
| cs_field_t * | f, | ||
| const cs_real_t | pvar[][stride] | ||
| ) |
| void cs_clear_bc_coeffs_solve | ( | cs_bc_coeffs_solve_t & | c | ) |
Free boundary condition coefficients solve arrays.
| [in,out] | c | reference to structure to initialize. |
| void cs_init_bc_coeffs_solve | ( | cs_bc_coeffs_solve_t & | c, |
| cs_lnum_t | n_b_faces, | ||
| cs_lnum_t | stride, | ||
| cs_alloc_mode_t | amode, | ||
| bool | limiter | ||
| ) |
Initialize boundary condition coefficients solve arrays.
| [in,out] | c | reference to structure to initialize. |
| [in] | n_b_faces | number of boundary faces |
| [in] | stride | variable dimension |
| [in] | amode | allocation mode |
| [in] | limiter | is a limiter active ? |