diff --git a/crates/engine/src/cmd/forms.rs b/crates/engine/src/cmd/forms.rs index 0295208..c8301e7 100644 --- a/crates/engine/src/cmd/forms.rs +++ b/crates/engine/src/cmd/forms.rs @@ -439,8 +439,18 @@ const PROCEDURE: Field = variants( ), flag("line_search", "Line search").def("false"), json("load_path", "Load path").hint("[[fraction, factor], …]; a ramp when empty"), + group( + "imperfection", + "Imperfection", + &[ + reference("step", "Buckling step", C::Step).req(), + int("mode", "Mode", 1, 100_000).req().def("1"), + num("scale", "Largest component", D::Length).req(), + ], + ), ], ), + variant("buckle", "Buckling", &[int("modes", "Modes", 1, 100_000).req().def("4"), num("shift", "Shift", D::None)]), variant( "frequency", "Frequency", @@ -803,6 +813,7 @@ pub const SOLVE_FREQUENCY: &[Field] = &[ int("max_iterations", "Max Lanczos vectors", 1, 3000).hint("3000"), THREADS, ]; +pub const SOLVE_BUCKLE: &[Field] = &[STEP, MAX_DOFS, MAX_FACTOR, int("max_iterations", "Max Lanczos vectors", 1, 3000).hint("3000"), THREADS]; pub const SOLVE_EXPLICIT: &[Field] = &[ STEP, MAX_DOFS, diff --git a/crates/engine/src/cmd/solve.rs b/crates/engine/src/cmd/solve.rs index 3ada6dc..2b424d2 100644 --- a/crates/engine/src/cmd/solve.rs +++ b/crates/engine/src/cmd/solve.rs @@ -64,6 +64,7 @@ pub const BUCKLE: CommandSpec = CommandSpec { id: "solve.buckle", label: "Solve Buckling Step", params: r#"{"step": "Buckle", "max_dofs": 6000000, "max_factor_entries": 400000000, "max_iterations": 3000, "threads": 8} — linear buckling of a buckling step (the only one when `step` is left out): the step's loads as a linear preload, then the lowest load factors λ with (K + λ K_σ) φ = 0 and their mode shapes (largest component 1), or those above the step's shift (whose LDLᵀ factor counts the load factors below it); negative load factors found are reported; the result stays in the session and its modes display like frequency modes; `threads` as for solve.static"#, + form: Some(super::forms::SOLVE_BUCKLE), kind: CommandKind::Model, run: run_buckle, };