cs_user_boundary_conditions.c in case of rough surface and Spalart-Allmaras
Posted: Fri Jun 07, 2019 6:32 pm
Bonjour,
I am trying to run Spalart-Allmaras model with rough surface and prescribe BC by user-function in this way:
And this approach does work perfectly in case of smooth surfaces. But in case rough surface and SA model it does not work, and this function generate some unrealistic values for boundary condition (all values is about 10e+33).
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
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