Initialization and finalization
Initialization and finalization is similar to that of the base examples
Example 1
For boundary faces of zone "open_11", assign an inlet boundary condition prescribed from the meteo profile with automatic choice between inlet/ outlet according to the meteo profile.
{
iautom[face_id] = 1;
}
}
Example 3
For boundary faces of zone "inlet_3", assign an inlet boundary condition. Here, all other variables prescribed from the meteo profile are assumed to be managed by the GUI, except for dynamic variables which are prescribed with a rough log law.
{
const cs_real_t zent = b_face_cog[face_id][2];
CS_F_(
k)->bc_coeffs->rcodcl1[face_id] = xkent;
CS_F_(
eps)->bc_coeffs->rcodcl1[face_id] = xeent;
}
for (int ii = 0; ii< 3; ii++)
CS_F_(
rij)->bc_coeffs->rcodcl1[n_b_faces*ii + face_id] = d2o3*xkent;
for (int ii = 3; ii< 6; ii++)
CS_F_(
rij)->bc_coeffs->rcodcl1[n_b_faces*ii + face_id] = 0;
CS_F_(
eps)->bc_coeffs->rcodcl1[face_id] = xeent;
}
CS_F_(
k)->bc_coeffs->rcodcl1[face_id] = xkent;
CS_F_(
eps)->bc_coeffs->rcodcl1[face_id] = xeent;
CS_F_(
phi)->bc_coeffs->rcodcl1[face_id] = d2o3;
}
CS_F_(
k)->bc_coeffs->rcodcl1[face_id] = xkent;
}
}
}
}
Example 4
Define a rough wall at boundary faces of zone 'b_5'.
{
if (bpro_roughness != nullptr)
bpro_roughness[face_id] = rugd;
if (bpro_roughness_t != nullptr)
bpro_roughness_t[face_id] = 0.01;
}
}