Mapping relative to ALE
const cs_lnum_t n_b_faces = domain->mesh->n_b_faces;
const cs_lnum_t *b_face_cells = domain->mesh->b_face_cells;
const int nt_cur = domain->time_step->nt_cur;
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_lnum_t c_id = b_face_cells[face_id];
}
Example 2
Example: For boundary face of color 5 assign a fixed displacement on nodes
for (
cs_lnum_t ii = ipnfbr[face_id]; ii < ipnfbr[face_id+1]; ii++) {
disale[inod][0] = 0;
disale[inod][1] = 0;
}
}
}
Example 3
Example : For boundary faces of color 6 assign a sliding boundary
Example 4
Example : Prescribe elsewhere a fixed boundary