Two SOLID185 blocks with robust selection of horizontal faces.
Step 1 — Geometry and mesh
BLOCK,0,block_x,0,h_lower,0,block_z
BLOCK,0,block_x,h_lower+initial_gap,h_lower+initial_gap+h_upper,0,block_z
VMESH,ALL
Use SELTOL when selecting faces at Y = h_lower and Y = h_lower + initial_gap.
Figure 2. Side view: initial 0.5 mm gap between the blocks before ESURF.