solve() method performs the structural analysis by assembling the global stiffness matrix, applying loads, and solving for displacements and reactions.
Method Signature
Parameters
List of load pattern names to analyze. If
None, all active load patterns in the model will be analyzed.Examples:None- Analyzes all active load patterns['Dead Load']- Analyzes only the ‘Dead Load’ pattern['Dead Load', 'Live Load']- Analyzes both specified patterns
Returns
Dictionary mapping load pattern names to their corresponding
Results objects. Each Results object contains displacements, reactions, and internal forces for that load pattern.Raises
ValueError- If no load patterns are defined in the model
Analysis Process
When you callsolve(), milcapy performs the following steps:
- Assembly - Constructs the global stiffness matrix from all elements
- Load Application - Applies all loads from the specified load patterns
- Boundary Conditions - Applies restraints and supports
- Solution - Solves the system of equations:
K·u = F - Post-processing - Calculates reactions, internal forces, and detailed member results
Example Usage
Solve All Load Patterns
Solve Specific Load Patterns
Get Results for a Specific Pattern
Working with Results
After solving, you can access results in multiple ways:Performance Tips
- For large models with many load patterns, solve only the patterns you need by specifying them explicitly
- Set unused load patterns to
INACTIVEstate before solving - Use
get_results()to access previously computed results without re-solving
See Also
- Results API - Detailed documentation on accessing and using results
- Load Patterns - Creating and managing load patterns
- Loads - Applying different types of loads
