! ----------------------------------------------------------------------
! M09 - English course download: 09_start.mac
! Follow the matching English lesson for explanations and task details.
! Commands, parameter names, file names, CSV keys, and result tokens are preserved.
! ----------------------------------------------------------------------

/CLEAR,START                        ! Parametric sweep with automatic design selection.
/FILNAME,m09_start,1
/UNITS,SI

beam_l=1.0                          ! /INPUT,09_parametric_study,mac
beam_b=0.05
young=210E9
nu=0.30
tip_force=-1000
uy_limit=0.00025
stress_limit=150E6
n_cases=3

! TODO 1: define height arrays and mesh_h = h/2 for each case.
!         *DIM reserves arrays indexed by case_id for the sweep.
! TODO 2: implement a *DO that invokes 09_build, 09_solve, and 09_extract.
!         *DO automates each iteration of the parametric study.
! TODO 3: rebuild the model on each iteration (no residual state).
! TODO 4: distinguish validation_pass (M07-M08) from feasible (design limits).
! TODO 5: check the trend: |uy| decreases as h increases.
! TODO 6: select min(beam_h) with feasible=1.
! TODO 7: write m09_results.csv once from the driver.
!         *CFOPEN opens the CSV; *VWRITE writes rows from the sweep arrays.
!
! Base sweep cases:
! case_id=1 -> h=0.08, mesh_h=0.04, 156 nodes, 50 elements
! case_id=2 -> h=0.10, mesh_h=0.05, 126 nodes, 40 elements
! case_id=3 -> h=0.12, mesh_h=0.06, 108 nodes, 34 elements
!
! Analytical references:
! uy_ref_1=-7.44047619E-4 m ; sigma_ref_1=1.50000E7 Pa ; feasible=0
! uy_ref_2=-3.80952381E-4 m ; sigma_ref_2=9.60000E6 Pa ; feasible=0
! uy_ref_3=-2.20458598E-4 m ; sigma_ref_3=6.86275E6 Pa (x aligned to mesh) ; feasible=1
!
! Expected selection: case_id=3, beam_h=0.12 m

FINISH
