Skip to content
Marc & Structures
Index

Save your progress

Enter your email and we will send a secure sign-in link. There is no password and the first link creates your account.

Mission ~5 min · ~65 min remaining

Your mission: reusable macros

Split the model into submacros with an explicit contract and diagnose failures through evidence.

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 *USE and ARGx.
  • Write reproducible evidence with *CFOPEN and *VWRITE.
  • Diagnose faults with /STATUS, the .out file, 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.

How to use this lesson

PathDurationCoverage
First win25–30 minPrediction, driver invocation, and first run with CSV.
Complete60–65 minAlso: 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

  1. Mission: objectives, downloads, and prediction for two heights.
  2. Mental model: contract before code.
  3. Demonstration: invocation, submacros, and CSV evidence.
  4. Bug hunt: paths, arguments, and incorrectly propagated KEYOPT.
  5. Challenge: reproducibility between two clean directories.
  6. Mastery: final test before the M09 automated project.