I am trying to run Spalart-Allmaras model with rough surface and prescribe BC by user-function in this way:
Code: Select all
f = CS_F_(nusa);//get turbulence energy field
int ivar_nu = cs_field_get_key_int(f, keyvar) - 1; //ivar for k
cs_selector_get_b_face_list("inlet or outlet", &nelts, lstelt);
for (cs_lnum_t ilelt = 0; ilelt < nelts; ilelt++) {
cs_lnum_t face_id = lstelt[ilelt];
bc_type[face_id] = CS_INLET;
cell_id = b_face_cells[face_id]; // associated boundary cell
y_curr = cell_cen[cell_id][1]; // define height
temp = interpolate_sa(profile, y_curr);
//define Ux
icodcl[(ivar_nu) * n_b_faces + face_id] = 1; //Dirihlet value
rcodcl[(ivar_nu) * n_b_faces + face_id] = temp.u; //Value
....
}
Probably in case of rough surfaces for SA model I need to prescribe BC in some particular way or this is kind of a bug?
Thank you for reply.
Best regards, Konstantin