Mapping relative to ALE
Assign boundary conditions to boundary faces
One may use selection criteria to filter boundary case subsets.
Loop on faces from a subset.
Set the boundary condition for each face.
Calculation of displacement at current time step
Example 1
Example : For boundary faces of color 4 assign a fixed velocity
const cs_real_t deltaa = sin(3.141596*(nt_cur-1)/50);
const cs_real_t delta = sin(3.141596*nt_cur/50.);
const cs_lnum_t c_id = b_face_cells[face_id];
mesh_u->bc_coeffs->rcodcl1[n_b_faces*0 + face_id] = 0;
mesh_u->bc_coeffs->rcodcl1[n_b_faces*1 + face_id] = 0;
mesh_u->bc_coeffs->rcodcl1[n_b_faces*2 + face_id] = (delta-deltaa)/
dt[c_id];
}
Example 2
Example: For boundary face of color 5 assign a fixed displacement on nodes
ii < b_face_vtx_idx[face_id+1];
ii++) {
if (impale[vtx_id] == 0) {
disale[vtx_id][0] = 0;
disale[vtx_id][1] = 0;
disale[vtx_id][2] = delta;
impale[vtx_id] = 1;
}
}
}
Example 3
Example : For boundary faces of color 6 assign a sliding boundary
Example 4
Example : Prescribe elsewhere a fixed boundary