! ============================================================
! M02 - Reto verificable
! La geometria y la malla han cambiado.
! Completa los TODO sin introducir IDs de nodos o elementos.
! ============================================================

/CLEAR,START
/FILNAME,m02_challenge,1
/TITLE,M02 - Reto de selecciones robustas
/UNITS,SI

case_id=1
beam_l=1.2
beam_h=0.10
beam_b=0.05
young=210E9
nu=0.30
mesh_h=0.020
select_tol=MIN(beam_h,beam_b)*1E-5

/PREP7
ET,1,SOLID185
MP,EX,1,young
MP,PRXY,1,nu
TYPE,1
MAT,1
BLOCK,0,beam_l,0,beam_h,0,beam_b
ESIZE,mesh_h
VMESH,ALL

ALLSEL,ALL
*GET,n_nodes,NODE,0,COUNT
*GET,n_elements,ELEM,0,COUNT
SELTOL,select_tol

! TODO 1: crea fixed_nodes en X=0.
! TODO 2: crea el sistema local 11 en la nueva punta.
! TODO 3: crea tip_nodes usando LOC,X,0 en el sistema 11.
! TODO 4: vuelve a CSYS,0 y crea top_nodes.
! TODO 5: crea mid_elems entre 0.4*beam_l y 0.6*beam_l.
! TODO 6: crea tip_top_nodes como interseccion.
! TODO 7: calcula n_overlap entre fixed_nodes y tip_nodes.
! TODO 8: recupera todo, calcula n_restored y genera
!         m02_selection_audit.csv con el mismo esquema
!         que la solucion completa.

SELTOL,
/COM,M02 CHALLENGE READY - no entity IDs are required
FINISH

