[
  {"command": "model.units", "params": {"system": "mm-t-s-N-MPa"}},
  {"command": "mesh.node.add", "params": {"label": 1, "xyz": [0, 0, 0]}},
  {"command": "mesh.node.add", "params": {"label": 2, "xyz": [10, 0, 0]}},
  {"command": "mesh.node.add", "params": {"label": 3, "xyz": [10, 10, 0]}},
  {"command": "mesh.node.add", "params": {"label": 4, "xyz": [0, 10, 0]}},
  {"command": "mesh.node.add", "params": {"label": 5, "xyz": [0, 0, 10]}},
  {"command": "mesh.node.add", "params": {"label": 6, "xyz": [10, 0, 10]}},
  {"command": "mesh.node.add", "params": {"label": 7, "xyz": [10, 10, 10]}},
  {"command": "mesh.node.add", "params": {"label": 8, "xyz": [0, 10, 10]}},
  {"command": "mesh.element.add", "params": {"label": 1, "kind": "hex8", "nodes": [1, 2, 3, 4, 5, 6, 7, 8]}},
  {"command": "mesh.node.add", "params": {"label": 9, "xyz": [0, 0, 10]}},
  {"command": "mesh.node.add", "params": {"label": 10, "xyz": [10, 0, 10]}},
  {"command": "mesh.node.add", "params": {"label": 11, "xyz": [10, 10, 10]}},
  {"command": "mesh.node.add", "params": {"label": 12, "xyz": [0, 10, 10]}},
  {"command": "mesh.node.add", "params": {"label": 13, "xyz": [0, 0, 20]}},
  {"command": "mesh.node.add", "params": {"label": 14, "xyz": [10, 0, 20]}},
  {"command": "mesh.node.add", "params": {"label": 15, "xyz": [10, 10, 20]}},
  {"command": "mesh.node.add", "params": {"label": 16, "xyz": [0, 10, 20]}},
  {"command": "mesh.element.add", "params": {"label": 2, "kind": "hex8", "nodes": [9, 10, 11, 12, 13, 14, 15, 16]}},
  {"command": "model.set.create", "params": {"name": "all", "elements": [1, 2]}},
  {"command": "model.set.create", "params": {"name": "base", "nodes": [1, 2, 3, 4, 5, 6, 7, 8]}},
  {"command": "model.set.create", "params": {"name": "upper", "nodes": [9, 10, 11, 12, 13, 14, 15, 16]}},
  {"command": "model.set.create", "params": {"name": "top", "nodes": [13, 14, 15, 16]}},
  {"command": "model.set.create", "params": {"name": "main", "faces": [{"element": 1, "face": 2}]}},
  {"command": "model.set.create", "params": {"name": "secondary", "faces": [{"element": 2, "face": 1}]}},
  {"command": "model.material.create", "params": {"name": "Elastic", "elastic": {"type": "isotropic", "young": 1000, "poisson": 0}}},
  {"command": "model.section.create", "params": {"name": "Solid", "set": "all", "material": "Elastic", "kind": {"type": "solid"}}},
  {"command": "interaction.contact.pair", "params": {"name": "Interface", "main": "main", "secondary": "secondary"}},
  {"command": "model.boundary_condition.create", "params": {"name": "base", "type": "displacement", "target": {"set": "base"}, "values": [0, 0, 0, null, null, null]}},
  {"command": "model.boundary_condition.create", "params": {"name": "upper", "type": "displacement", "target": {"set": "upper"}, "values": [0, 0, null, null, null, null]}},
  {"command": "model.boundary_condition.create", "params": {"name": "top", "type": "displacement", "target": {"set": "top"}, "values": [null, null, -0.1, null, null, null]}},
  {"command": "model.step.create", "params": {"name": "Press", "procedure": {"type": "nonlinear_static", "nonlinear_geometry": false, "initial_increment": 0.5, "max_increment": 0.5}, "boundary_conditions": ["base", "upper", "top"], "loads": []}},
  {"command": "model.step.create", "params": {"name": "Cycle", "procedure": {"type": "nonlinear_static", "nonlinear_geometry": false, "initial_increment": 0.5, "max_increment": 0.5, "load_path": [[0, 0], [0.5, 0.5], [1, -0.05]]}, "boundary_conditions": ["base", "upper", "top"], "loads": []}},
  {"command": "solve.nonlinear", "params": {"step": "Press"}},
  {"command": "solve.probe", "params": {"step": "Press", "nodes": [9]}},
  {"command": "solve.nonlinear", "params": {"step": "Cycle"}},
  {"command": "solve.history", "params": {"step": "Cycle", "sets": ["top"]}},
  {"command": "solve.probe", "params": {"step": "Cycle", "nodes": [9, 13]}},
  {"command": "results.contour", "params": {"step": "Cycle", "field": "contact_gap"}},
  {"command": "results.deformed", "params": {"step": "Cycle", "show": true, "scale": 1000}}
]
