ogr-slip2d-cli runs OGR Slip2D without its window. It summarises a project, computes it as the project describes and writes the results to HDF5, lists the methods and strength models, and writes the demo slope to a file. compute goes through the same analysis code as Analysis → Compute, so a run without options gives the numbers the window gives. The last section covers the options of the graphical program's launcher.
5.2.1Running it#
The command is installed with the package (Section 1.1); python -m ogr_cli is the same program. Every command accepts --help.
ogr-slip2d-cli.| Command | What it does |
|---|---|
info PROJECT | Shows a summary of a .ogr project. |
compute PROJECT [options] | Runs the analysis the project describes, prints the critical value of each method and saves the results to HDF5. |
methods | Lists the limit-equilibrium methods with the equilibrium each satisfies. |
strength-models | Lists the strength models with their parameters and units. |
new-demo OUTPUT | Writes the demo slope as a .ogr file. |
Besides --help, the command takes the two options of its command-line library, --install-completion and --show-completion, for shell completion.
5.2.2info#
ogr-slip2d-cli info slope.ogrPrints a table with the path, the author and company of the project summary, the number of boundaries, materials, supports, distributed loads and line loads, whether the pseudo-static seismic load is on, and the bounding box (xmin, ymin, xmax, ymax, in m). A second table lists each material with its strength model, its unit weight γ, its saturated unit weight γsat (shown only when the material uses it below the water surface) and its colour. A file that does not exist ends with exit code 1.
5.2.3compute#
ogr-slip2d-cli compute PROJECT [--method M] [--slices N] [--sarma-slices N] [--nx N]
[--ny N] [--dr N] [--search S] [--samples N] [--output FILE]Every option defaults to the value stored in the project; an option given overrides only that setting, and only for this run. The overrides are applied to the copy loaded in memory, so a calculation does not modify the .ogr file.
compute and the project setting each one overrides.| Option | Value | Overrides | Notes |
|---|---|---|---|
--method | text | methods.enabled_methods | One method id or alias (Table 5.2.3). Without it, the methods enabled in the project, or Bishop simplified if none is enabled. An unknown name ends with exit code 2. |
--slices | integer | methods.num_slices | Number of slices per surface. It does not reach Sarma's method, which has its own setting. |
--sarma-slices | integer | sarma.num_slices | Number of wedges asked of Sarma's method (since v0.1.464; 25 in a new project). The wedge boundaries are the vertices of the surface, its crossings with the water table, the material contacts it crosses (unless that setting is off) and uniform divisions up to this number. A division whose face would cross a neighbour or not reach the ground is dropped, so a run can end with fewer wedges than asked. Sarma's tolerance and number of iterations are its own settings too, and no option overrides them. |
--nx | integer | search.grid_nx | Grid of centres: number of intervals along x (centres = nx + 1). |
--ny | integer | search.grid_ny | The same along y. |
--dr | number | search.radius_increment | Radius increment as a number of intervals (radii per centre = dr + 1); the grid search rounds it to a whole number. |
--search | text | search.search_method | grid, slope, auto_refine, block, path, simulated_annealing or particle_swarm. |
--samples | integer | search.num_surfaces, search.block_num_surfaces, search.path_num_surfaces | Number of surfaces of the Slope, Block and Path searches. |
--output | path | — | HDF5 results file; by default the project path with the extension .h5 (see Output files). |
The help text of --search lists six values; particle_swarm, the seventh search, is accepted too. A value that is not one of the seven is not rejected: the engine runs a Grid Search for any id it does not know, and no note says so. Spell the search exactly, or set it in the project.
--method. Case is ignored, and hyphens and spaces count as underscores.| Method id | Also accepted |
|---|---|
bishop_simplified | bishop |
janbu_simplified | janbu |
janbu_corrected | — |
ordinary_fellenius | ordinary, fellenius |
spencer | — |
gle_morgenstern_price | gle, morgenstern_price |
lowe_karafiath | lowe |
corps_engineers_1 | corps1, coe1, modified_swedish |
corps_engineers_2 | corps2, coe2 |
sarma | — |
What compute does#
- Loads the project and applies the overrides in memory.
- Checks that the project can be analysed as configured. If it cannot, it prints every reason after
Cannot compute:and ends with exit code 3, instead of reporting a number computed from settings it would have to drop. Examples: materials that take their pore pressure from a finite-element field that has not been computed (the run would report everywhere, which looks like a dry slope), a rapid-drawdown setup that cannot apply, a Block Search without the objects it needs, seismic coefficients out of range, a strength model with invalid parameters, or a setting name that has been retired. - Runs the analysis through the same analysis runner as the window: the design-standard partial factors applied to a copy, rapid drawdown, the project's search with its filters, slope limits and focus objects, the convergence settings, the random seed and the admissibility checks (Section 5.3).
- Prints the notes of the run (lines starting
Note:), then one table row per method: the critical value, the numbers of valid, invalid and attempted surfaces, the surfaces removed by focus objects (a column shown only when a focus object removed some) and whether the critical surface converged. - Writes the results to HDF5 (see Output files).
compute holds.| Column heading | When | Value |
|---|---|---|
Critical FoS | no design standard, no seismic Ky mode | factor of safety of the critical surface |
Over-design factor | a design standard is active, no seismic Ky mode | the factor obtained with factored inputs; it must exceed 1. A line Design standard applied: … says so and lists the notes of the standard. |
Critical Ky | Compute Ky on | the lowest critical seismic coefficient of the surfaces searched; with a design standard, computed with the partial factors applied, as the line Design standard applied: … says |
Newmark disp. (cm) | Newmark analysis on | permanent displacement of the critical surface, in centimetres; with a design standard, computed with the partial factors applied, as the line Design standard applied: … says |
Since v0.1.430 the heading follows the value printed, by the same rule as the window and the operations layer: a seismic coefficient or a displacement is not reported as an over-design factor.
A run on the demo slope (Section 5.2.6), whose project enables Bishop simplified and Janbu simplified:
ogr-slip2d-cli new-demo demo
ogr-slip2d-cli compute demo.ogr
grid — 2 method(s)
┌───────────────────┬──────────────┬───────┬─────────┬───────────┬───────────┐
│ Method │ Critical FoS │ Valid │ Invalid │ Attempted │ Converged │
├───────────────────┼──────────────┼───────┼─────────┼───────────┼───────────┤
│ bishop_simplified │ 1.0914 │ 1366 │ 493 │ 1859 │ True │
│ janbu_simplified │ 1.0434 │ 1379 │ 480 │ 1859 │ True │
└───────────────────┴──────────────┴───────┴─────────┴───────────┴───────────┘
Results saved: demo_bishop_simplified.h5
Results saved: demo_janbu_simplified.h5The grid of the demo has 12 × 12 intervals and a radius increment of 10, so 13 × 13 × 11 = 1859 circles are attempted per method. The run prints no note: since v0.1.329 the demo is saved with the failure direction of its geometry (left to right), with the same factors of safety as before.
The same grid computed with Sarma's method alone, on ten wedges per surface:
ogr-slip2d-cli compute demo.ogr --method sarma --sarma-slices 10
Note: sarma: uses its own number of wedges (10), tolerance and iterations
(Sarma group of the Methods page): the global ones do not reach it.
Note: Accelerate convergence (Steffensen) is on, and not one of the methods
this run uses has an iteration it can accelerate, so the setting reached
nothing and the results are the same as they would be with it off. The methods
that ran are sarma. Aitken extrapolation speeds up a fixed point on the factor
of safety, and only Bishop simplified (on circular surfaces) and both Janbu
solve one. Spencer and GLE/Morgenstern-Price solve for the factor and the
inter-slice force together, and extrapolating the factor alone leaves the force
behind. Lowe-Karafiath and Corps of Engineers #1 and #2 iterate on the factor
but are not wired to it. Ordinary/Fellenius has no iteration at all.
Note: sarma: The critical centre lies on the edge of the search grid (x = 40;
grid x 10 to 40, y 25 to 45). A minimum on the boundary is the best of what was
searched, not necessarily the lowest one: widen the grid on that side and
re-run before quoting it.
grid — 1 method(s)
┌────────┬──────────────┬───────┬─────────┬───────────┬───────────┐
│ Method │ Critical FoS │ Valid │ Invalid │ Attempted │ Converged │
├────────┼──────────────┼───────┼─────────┼───────────┼───────────┤
│ sarma │ 1.1346 │ 1362 │ 497 │ 1859 │ True │
└────────┴──────────────┴───────┴─────────┴───────────┴───────────┘
Results saved: demo.h5The first note says that Sarma's method takes its own number of wedges, tolerance and iterations. The second comes from the demo project, which has Accelerate convergence switched on, a setting that reaches none of the iterations of Sarma's method. The third warns that the critical centre of this run lies on the edge of the grid. With the 25 wedges of the project setting the same run gives 1.1334.
Output files#
- One method: the file given with
--output, or the project path with the extension.h5(slope.ogr→slope.h5). - Several methods: one file per method, named after the base file with the method id appended:
slope_bishop_simplified.h5,slope_spencer.h5… With--output results/run.h5the names areresults/run_<method_id>.h5. - A missing folder is created and an existing file of the same name is overwritten.
Each file holds one search: every surface analysed with its slices, and summary arrays. The layout is described in Section 5.4.5. When the window computes a project that has a file (opened or saved), it writes the first method's result to the same <project>.h5 name.
Exit codes#
ogr-slip2d-cli.| Code | Meaning |
|---|---|
| 0 | Success. A method that found no valid surface is reported as no valid surface in its row and still exits with 0. |
| 1 | The project file does not exist (info, compute). |
| 2 | Unknown method name in --method; also any usage error reported by the command-line library (a missing argument, an unknown option). |
| 3 | The project cannot be analysed as configured; the reasons are printed. |
| 4 | The run produced no result for any method. |
5.2.4methods#
Lists the ten registered methods with their id, display name and whether they satisfy force and moment equilibrium; the ids are those accepted by --method and by the operations layer (Section 3.2).
ogr-slip2d-cli methods
Registered LEM methods
┌───────────────────────┬─────────────────────────┬───────────┬────────────┐
│ ID │ Display Name │ Force eq. │ Moment eq. │
├───────────────────────┼─────────────────────────┼───────────┼────────────┤
│ bishop_simplified │ Bishop Simplified │ — │ ✓ │
│ gle_morgenstern_price │ GLE / Morgenstern-Price │ ✓ │ ✓ │
│ janbu_simplified │ Janbu Simplified │ ✓ │ — │
│ janbu_corrected │ Janbu Corrected │ ✓ │ — │
│ corps_engineers_1 │ Corps of Engineers #1 │ ✓ │ — │
│ corps_engineers_2 │ Corps of Engineers #2 │ ✓ │ — │
│ lowe_karafiath │ Lowe-Karafiath │ ✓ │ — │
│ ordinary_fellenius │ Ordinary / Fellenius │ — │ ✓ │
│ spencer │ Spencer │ ✓ │ ✓ │
│ sarma │ Sarma (non-vertical) │ ✓ │ — │
└───────────────────────┴─────────────────────────┴───────────┴────────────┘5.2.5strength-models#
Lists the 23 registered strength models with their id, display name and parameters with units, for example mohr_coulomb (cohesion in kPa, friction angle in degrees), hoek_brown (sigci in kPa, mb, s, a) or barton_bandis (phi_r, JRC, JCS, max_total_friction). Models defined by a table or by other materials, such as shear_normal_function or generalized_anisotropic, show no parameters. The models are described in Section 3.5.
ogr-slip2d-cli strength-models5.2.6new-demo#
ogr-slip2d-cli new-demo demo # writes demo.ogrWrites the demo slope, the same model as File → Load Demo Slope in the window and project_new(template="demo") for an agent: a homogeneous slope 10 m high at 1V:1H, external boundary (0, 0)–(50, 0)–(50, 15)–(35, 15)–(25, 25)–(0, 25), one Mohr–Coulomb material "Silty clay" ( kPa, , kN/m³) and a horizontal water table at y = 8 m assigned to it. The extension .ogr is added when the name does not end with it, replacing any other extension.
5.2.7The graphical launcher#
The desktop program starts with ogr-slip2d or, equivalently, python -m ogr_gui. The launcher has one option of its own:
| Option | Meaning |
|---|---|
--no-agent-bridge | Start without the agent bridge, so that no MCP server can work on this window (Section 5.1.6). It can still be switched on later in Tools → Agent bridge (MCP). |
ogr-slip2d
python -m ogr_gui --no-agent-bridgeAny other argument is handed to the Qt application object. The launcher does not open a project given on the command line: the window starts with an empty project, and a file is opened with File → Open Project….
The command line, the window and the operations layer call one analysis runner, which is the single place where methods and searches are built from a project. It exists because, before v0.1.77, the command line read nothing from the project's settings and silently skipped rapid drawdown, the partial factors and most searches.
Source: ogr_cli/__main__.py · ogr_slip2d/analysis_runner.py · ogr_gui/__main__.py