For boundary faces of zone "1" assign an inlet and assign a cathode for "electric" variables.
{
rcodcl1_vel[n_b_faces*0 + face_id] = 0;
rcodcl1_vel[n_b_faces*1 + face_id] = 0;
rcodcl1_vel[n_b_faces*2 + face_id] = 0;
uref2,
dhy,
rhomoy,
viscl0);
potva->bc_coeffs->rcodcl3[face_id] = 0;
potva->bc_coeffs->rcodcl3[n_b_faces + face_id] = 0;
potva->bc_coeffs->rcodcl3[n_b_faces*2 + face_id] = 0;
}
}
}
cs_real_t * rcodcl1
Definition: cs_field.h:112
int * icodcl
Definition: cs_field.h:111
Field descriptor.
Definition: cs_field.h:275
cs_field_bc_coeffs_t * bc_coeffs
Definition: cs_field.h:309
const cs_zone_t * cs_boundary_zone_by_name(const char *name)
Return a pointer to a boundary zone based on its name if present.
Definition: cs_boundary_zone.cpp:708
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
@ potva
Definition: cs_field_pointer.h:135
@ vel
Definition: cs_field_pointer.h:66
@ rho_b
Definition: cs_field_pointer.h:97
#define CS_F_(e)
Macro used to return a field pointer by its enumerated value.
Definition: cs_field_pointer.h:47
CS_F_HOST_DEVICE cs_real_t cs_math_pow2(cs_real_t x)
Compute the square of a real value.
Definition: cs_math.h:902
@ CS_BC_NEUMANN
Definition: cs_param_types.h:511
@ CS_BC_DIRICHLET
Definition: cs_param_types.h:506
@ CS_INLET
Definition: cs_parameters.h:83
const cs_fluid_properties_t * cs_glob_fluid_properties
Definition: cs_physical_constants.cpp:462
cs_field_t * cs_thermal_model_field(void)
Definition: cs_thermal_model.cpp:180
void cs_turbulence_bc_inlet_hyd_diam(cs_lnum_t face_id, double uref2, double dh, double rho, double mu)
Set inlet boundary condition values for turbulence variables based on a diameter and the reference v...
Definition: cs_turbulence_bc.cpp:745
const cs_turb_model_t * cs_glob_turb_model
@ CS_TURB_SPALART_ALLMARAS
Definition: cs_turbulence_model.h:68
@ CS_TURB_V2F_PHI
Definition: cs_turbulence_model.h:65
@ CS_TURB_K_OMEGA
Definition: cs_turbulence_model.h:67
CS_F_HOST_DEVICE T max(const T a, const T b)
Definition: cs_defs.h:735
double viscl0
Definition: cs_physical_constants.h:75
DISABLE_WARNING_POP int model
Definition: cs_turbulence_model.h:143
int itytur
Definition: cs_turbulence_model.h:169
const cs_lnum_t * elt_ids
Definition: cs_zone.h:61
cs_lnum_t n_elts
Definition: cs_zone.h:60
For boundary faces of zone "2" assign an free outlet and example of electrode for Joule Effect by direct conduction.
{
if (ielcor == 1) {
potr->bc_coeffs->rcodcl1[face_id] = 500*coejou;
}
else {
potr->bc_coeffs->rcodcl1[face_id] = 500.;
}
}
if (ielcor == 1) {
poti->bc_coeffs->rcodcl1[face_id] = sqrt(3)*500*coejou;
}
else {
poti->bc_coeffs->rcodcl1[face_id] = sqrt(3)*500.;
}
}
}
const cs_elec_option_t * cs_glob_elec_option
@ poti
Definition: cs_field_pointer.h:134
@ potr
Definition: cs_field_pointer.h:133
@ CS_OUTLET
Definition: cs_parameters.h:84
int cs_glob_physical_model_flag[CS_N_PHYSICAL_MODEL_TYPES]
Definition: cs_physical_model.cpp:104
@ CS_JOULE_EFFECT
Definition: cs_physical_model.h:59
cs_real_t coejou
Definition: cs_elec_model.h:113
For boundary faces of zone "2" assign a free outlet and example of anode for electric arc.
For boundary faces of zone "2" assign a wall and example of potential vector Dirichlet condition
{
if ( (
cdgfbo[face_id][0] <= 249e-2)
|| (
cdgfbo[face_id][0] >= 249e-2)
|| (
cdgfbo[face_id][2] <= 249e-2)
|| (
cdgfbo[face_id][2] >= 249e-2)) {
const cs_lnum_t c_id = b_face_cells[face_id];
potva->bc_coeffs->rcodcl1[face_id] = cvara_potva(c_id, 0);
potva->bc_coeffs->rcodcl1[n_b_faces + face_id] = cvara_potva(c_id, 1);
potva->bc_coeffs->rcodcl1[n_b_faces*2 + face_id]
= cvara_potva(c_id, 2);
}
}
}
Define a templated mdspan class (non owner of data)
Definition: cs_mdspan.h:68
cs_span_2d< cs_real_t > get_val_v(const int time_id=0) const
Return a 2D span view of field values. If the field is not a vector a fatal error is provoked.
Definition: cs_field.cpp:5103
cs_field_t * cs_field(int id)
Return a pointer to a field based on its id. This function requires that a field of the given id is d...
Definition: cs_field.cpp:4295
@ CS_SMOOTHWALL
Definition: cs_parameters.h:87
double precision, dimension(:,:), pointer cdgfbo
coordinates of the centers of the boundary faces
Definition: mesh.f90:65
For boundary faces of zone "51" assign a wall and restriking model for electric arc (anode boundaray condition).
{
th_f_val_ext[face_id] = 2.e4;
th_f_h_ext[face_id] = 1.e5;
if (z1 <= 0.0)
z1 = 0.0;
if (z2 >= 2e-2)
z2 = 2e-2;
if ((
cdgfbo[face_id][2] >= z1) && (
cdgfbo[face_id][2] <= z2)) {
}
else {
}
}
}
potva->bc_coeffs->rcodcl3[n_b_faces*0 + face_id] = 0;
potva->bc_coeffs->rcodcl3[n_b_faces*1 + face_id] = 0;
potva->bc_coeffs->rcodcl3[n_b_faces*2 + face_id] = 0;
}
}
cs_real_t * rcodcl3
Definition: cs_field.h:115
cs_span< cs_real_t > get_h_ext() const
Return a 1D span view of boundary condition external exchange coefficient.
Definition: cs_field.cpp:5931
cs_span< cs_real_t > get_val_ext() const
Return a 1D span view of boundary condition external values.
Definition: cs_field.cpp:5826
int nt_cur
Definition: cs_time_step.h:72
const cs_time_step_t * cs_glob_time_step
int irestrike
Definition: cs_elec_model.h:98
cs_real_t restrike_point[3]
Definition: cs_elec_model.h:99
int ntdcla
Definition: cs_elec_model.h:97
For boundary faces of zone "4" assign a symmetry.