Configure the analysis
set_analysisConfigure HOW a model is solved, and switch on the analyses the engine supports beyond plain statics. Writes analysis.options (first- vs second-order, P-Delta, self-weight, gravity, tolerances) and the three optional blocks: analysis.modal (natural frequencies), analysis.buckling (linear eigenvalue alpha_cr) and analysis.seismic (EN 1998-1 response spectrum / lateral force). Pass only what you want to change — each sub-object is merged into the existing block, so load cases, combinations and unity checks are preserved. Returns the updated model for solve_model. KEY FACTS: models from create_beam, create_frame and build_model are LINEAR (the engine itself has no default and requires order; the Python SDK defaults to NONLINEAR), so set order:"NONLINEAR" for second-order/P-Delta. Buckling needs exactly one reference form (reference / references / all_combinations) and reports alpha_cr as results.buckling.modes[].critical_load_factor. Seismic directions are GLOBAL AXES and these models are Y-up, so the two horizontal directions are usually X and Z. Unknown field names are REJECTED here on purpose: the solver would accept them, ignore them, and silently give you a default. Call get_schema("BucklingAnalysisSettings") etc. for the exact fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Optional JSON array of blocks to delete first, e.g. ["modal","buckling"]. | |
| modal | No | ModalAnalysisSettings, e.g. {"num_modes":6,"mass_formulation":"CONSISTENT"}. Pass "null" to remove the block. | |
| model | No | Stringified FERS model JSON to update | |
| options | No | AnalysisOptions fields to merge, as a JSON object. e.g. {"order":"NONLINEAR","nonlinear_method":"P_DELTA","enable_self_weight":true}. See get_schema("AnalysisOptions"). | |
| seismic | No | SeismicAnalysisSettings, e.g. {"method":"MODAL_RESPONSE_SPECTRUM","num_modes":30,"directions":["X","Z"],"spectrum_x":{"EurocodeParametric":{"ag":2.45,"ground_type":"C","spectrum_type":"TYPE1","q":3.0,"beta":0.2}},"mass_sources":[{"load_case_id":1,"psi":1.0}]}. Pass "null" to remove. | |
| buckling | No | BucklingAnalysisSettings, e.g. {"num_modes":3,"reference":{"LoadCombination":1},"member_effective_lengths":true}. Needs exactly one of reference / references / all_combinations. Pass "null" to remove. | |
| model_ref | No | Handle from stash_model, used INSTEAD of `model`. Avoids sending the whole document on every step; the tool returns the same handle back. |