In M07, the model already builds, solves, and validates against theory. That still does not make it a tool: it remains a monolithic script. In M08, we will refactor it into a reusable driver with arguments, submacros, and debugging evidence, preparing the M09 parametric sweep.
Your mission
You will separate inputs, construction, solution, and results; invoke the same macro for two heights with mesh_h as an argument; and generate a CSV that can pass or fail each case without touching the GUI.
Guiding question: can you reproduce the same result from a clean directory?
Objectives
After completing M08, you will be able to:
- Separate an FEA workflow into callable phases using
/INPUT. - Pass and validate an argument contract with
*USEandARGx. - Write reproducible evidence with
*CFOPENand*VWRITE. - Diagnose faults with
/STATUS, the.outfile, and counts. - Run two verifiable cases without rewriting the M07 physics.
- Document a symptom → check → cause → solution table.
Prerequisites and downloads
- M07: the base case passes deflection, interior stress, and equilibrium.
- M02: components must not depend on residual selections.
- M01: analytical references travel with the input parameters.
08_start.mac— starting point.08_macro_debug.mac— audited driver.08_build.mac— construction.08_solve.mac— solution.08_extract.mac— validation and CSV.08_bug_hunt.mac— five reuse faults.08_challenge.mac— two-case challenge.08_expected_results.csv— self-check contract.macro-call-tree.svg— driver architecture.debug-flow.svg— debugging flow.
How to use this lesson
| Path | Duration | Coverage |
|---|---|---|
| First win | 25–30 min | Prediction, driver invocation, and first run with CSV. |
| Complete | 60–65 min | Also: submacros, debugging, and the two-clean-directory challenge. |
Recommendation: define the ARG contract before writing code. A macro without early validation turns an input error into an hour of later debugging.
Session map
- Mission: objectives, downloads, and prediction for two heights.
- Mental model: contract before code.
- Demonstration: invocation, submacros, and CSV evidence.
- Bug hunt: paths, arguments, and incorrectly propagated KEYOPT.
- Challenge: reproducibility between two clean directories.
- Mastery: final test before the M09 automated project.