Skip to content

Recipes

Short recipes for writing a model in code, in the order a model is built: each page is a task, divided by what it handles, and each of those by what you do with it: add, edit, remove. They use the shortcut calls (create_*, see Scripting with the engine) of a model, and every example on them is run by the test suite. The Assistant reads them too, when it builds a model.

  1. Materials and sections: concrete, steel and timber materials; bar and area sections; another section or material for what exists.
  2. Nodes and bars: nodes, bars, hinges at a bar end, ids.
  3. Slabs and walls: regions with create_polygon; their edges; their loads.
  4. Supports: pin, roller and fixed supports, on nodes and on edges.
  5. Springs: node springs, one-sided springs, plate springs.
  6. Loads: load cases; loads on nodes, bars and regions; self weight; temperature; settlement of a support.
  7. Analysis cases and combinations: linear, non-linear, mass, modal, spectrum; combinations and their types.

Two rules for every recipe. Read the id of what already exists (geometry tool) and write it as text: 'N2', 'B1'; do not guess an id. And a call that edits something that is not there raises an error and changes nothing.