! ----------------------------------------------------------------------
! M10 - English course download: 10_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                        ! Complete the TODOs to activate NLGEOM and plasticity.
/FILNAME,m10_start,1
/TITLE,M10 - Nonlinear starting point
/UNITS,SI

beam_l=0.5
beam_h=0.04
beam_b=0.05
mesh_h=0.02
young=210E9
nu=0.30
tip_force=-10000
n_substeps=10
yield_stress=250E6
select_tol=MIN(beam_h,beam_b)*1E-5

/PREP7
ET,1,SOLID185
KEYOPT,1,2,3
MP,EX,1,young
MP,PRXY,1,nu
TYPE,1                              ! TBDATA: yield stress (1st datum) and hardening slope (2nd datum).
MAT,1
BLOCK,0,beam_l,0,beam_h,0,beam_b

div_x=beam_l/mesh_h
div_y=beam_h/mesh_h
div_z=beam_b/mesh_h
MSHAPE,0,3D
MSHKEY,1
LSEL,S,LENGTH,,beam_l
LESIZE,ALL,,,div_x,,1
LSEL,S,LENGTH,,beam_h
LESIZE,ALL,,,div_y,,1
LSEL,S,LENGTH,,beam_b
LESIZE,ALL,,,div_z,,1
ALLSEL,ALL
VMESH,ALL

SELTOL,select_tol
NSEL,S,LOC,X,0
CM,fixed_nodes,NODE
NSEL,S,LOC,X,beam_l
CM,tip_nodes,NODE
*GET,n_tip,NODE,0,COUNT
ALLSEL,ALL
SELTOL,

FINISH
/SOLU
CMSEL,S,fixed_nodes
D,ALL,ALL,0
ALLSEL,ALL
CMSEL,S,tip_nodes
F,ALL,FY,tip_force/n_tip
ALLSEL,ALL

ANTYPE,STATIC
NLGEOM,OFF                          ! NLGEOM: turns geometric nonlinearity (large displacement) on or off.
! TODO 3: use a progressive ramp with KBC,0 and NSUBST=n_substeps.
KBC,1
NSUBST,1                            ! NSUBST: number of substeps to apply the load progressively.
OUTRES,ALL,LAST                     ! OUTRES: selects which results of each substep are stored in the .rst.
SOLVE
FINISH

/COM,Complete the TODOs and compare with 10_static_nonlinear.mac
FINISH
