Overview
Once you’ve defined your model geometry, materials, sections, loads, and boundary conditions, you can solve the structural analysis using milcapy’s linear static solver. The solver uses the Direct Stiffness Method and Finite Element Method to compute displacements, reactions, and internal forces.Basic Solve Command
The simplest way to solve your model is to call thesolve() method:
Solving Specific Load Patterns
You can solve for specific load patterns by passing their names as a list:If
load_pattern_name is None (default), all active load patterns will be solved.What Happens During Solve?
When you callsolve(), milcapy performs the following steps:
- Assembly - Constructs the global stiffness matrix (K) and load vector (F)
- Boundary Conditions - Applies restraints, elastic supports, and prescribed displacements
- Solution - Solves the system K·u = F using
numpy.linalg.solve() - Post-Processing - Computes reactions, internal forces, and member diagrams
Load Pattern States
Only load patterns withstate=StateType.ACTIVE will be analyzed:
Analysis Methods
Milcapy uses theLinearStaticAnalysis class internally, which implements:
- Direct Stiffness Method for frame and truss elements
- Finite Element Method for membrane elements (CST, Q4, Q6, Q6I, Q8)
- Closed-form solutions for 1D elements (beams and trusses)
Solution Output
During the solve process, you’ll see timing information printed to the console:Complete Example
Advanced Options
Post-Processing Resolution
Control the number of points used for member force diagrams:Accessing Global Matrices
After solving, you can access the assembled global matrices:Troubleshooting
Common Issues
- No restraints defined - Model needs at least one support
- Unstable mechanism - Check for missing restraints or releases
- Inactive load patterns - Verify patterns are set to
ACTIVE
Next Steps
Results Extraction
Learn how to extract and interpret analysis results
Visualization
Visualize your model and results interactively
