Analysis
Understanding the Analysis Component
The Analysis
component is a core part of the Femora library that manages the configuration and execution of OpenSees analyses. It implements a comprehensive system for defining and controlling various types of structural analyses, including static, transient, and variable transient analyses.
The Analysis component combines several key subcomponents to define how an analysis is performed: - Constraint Handler: Manages how constraints are handled in the analysis - Numberer: Determines the equation numbering scheme - System: Defines the system of equations to be solved - Algorithm: Specifies the solution algorithm - Test: Defines the convergence criteria - Integrator: Controls the time integration scheme
Accessing the Analysis Component
There are two ways to access the Analysis component in your code:
Direct Access: Import and use the AnalysisManager class directly
from femora.components.Analysis.analysis import AnalysisManager # Get the singleton instance analysis_manager = AnalysisManager() # Use the analysis manager directly analysis_manager.create_analysis(...)
Through Femora (Recommended): Access via the Femora class’s .analysis property
import femora as fm # Create a Femora instance # Access the AnalysisManager through the .analysis property fm.analysis.create_analysis(...)
The second approach is recommended as it provides a unified interface to all of Femora’s components and ensures proper initialization of all dependencies.
How Analysis Works
The Analysis component provides several key capabilities:
Analysis Creation: Creates analysis objects of various types with appropriate parameters
Analysis Tracking: Keeps track of all analyses by both tag and name
Analysis Management: Provides methods to retrieve, update, and delete analyses
TCL Generation: Converts analysis configurations to OpenSees TCL commands
When an analysis is created, the Analysis component:
Validates that all required components are present and compatible
Assigns a unique numeric tag automatically
Registers it with the user-provided name (which must be unique)
Validates that all required parameters are present and valid for the analysis type
Note
Each analysis must have a unique name. The Analysis component uses this name as a key to retrieve analyses later. If you try to create an analysis with a name that already exists, the Analysis component will raise an error.
Analysis Types
The Analysis component supports three main types of analyses:
Static Analysis - Used for static loading conditions - Requires number of steps parameter - Uses static integrators
Transient Analysis - Used for dynamic loading conditions - Requires time step (dt) parameter - Can use either number of steps or final time - Uses transient integrators
Variable Transient Analysis - Used for dynamic loading with adaptive time stepping - Requires time step parameters (dt, dt_min, dt_max) - Requires desired iterations per step (jd) - Uses transient integrators
Analysis Components
Each analysis requires six key components:
Constraint Handler - Manages how constraints are handled in the analysis - Available types: Plain, Lagrange, Penalty, Transformation
Numberer - Determines the equation numbering scheme - Available types: Plain, RCM, AMD
System - Defines the system of equations to be solved - Available types: BandGeneral, BandSPD, ProfileSPD, SparseGeneral, SparseSPD
Algorithm - Specifies the solution algorithm - Available types: Newton, ModifiedNewton, KrylovNewton, BFGS, Broyden
Test - Defines the convergence criteria - Available types: NormDispIncr, NormUnbalance, EnergyIncr
Integrator - Controls the time integration scheme - Static types: LoadControl, DisplacementControl - Transient types: Newmark, HHT, CentralDifference
AnalysisManager API Reference
Analysis Creation
Creating analyses is one of the primary functions of the AnalysisManager. There are two main approaches:
Default Analysis Creation - Creates a pre-configured analysis with default components - Useful for quick setup of common analysis types
Custom Analysis Creation - Allows full control over all analysis components and parameters - Required for specialized or complex analyses
Example of creating a custom analysis:
from femora.components.Analysis.analysis import AnalysisManager
from femora.components.Analysis.constraint_handlers import PlainHandler
from femora.components.Analysis.numberers import PlainNumberer
from femora.components.Analysis.systems import BandGeneral
from femora.components.Analysis.algorithms import Newton
from femora.components.Analysis.convergenceTests import NormDispIncr
from femora.components.Analysis.integrators import LoadControl
# Get the analysis manager
analysis_manager = AnalysisManager()
# Create components
constraint_handler = PlainHandler()
numberer = PlainNumberer()
system = BandGeneral()
algorithm = Newton()
test = NormDispIncr(1.0e-6, 10)
integrator = LoadControl(1.0)
# Create the analysis
analysis = analysis_manager.create_analysis(
name="my_static_analysis",
analysis_type="Static",
constraint_handler=constraint_handler,
numberer=numberer,
system=system,
algorithm=algorithm,
test=test,
integrator=integrator,
num_steps=10
)
Available Analysis Components
- Constraint Handlers
- Equation Numberers
- System Solvers
- Solution Algorithms
- Convergence Tests
- Norm Disp Incr Convergence Test
- Norm Unbalance Convergence Test
- Energy Incr Convergence Test
- Relative Norm Disp Incr Convergence Test
- Relative Norm Unbalance Convergence Test
- Relative Energy Incr Convergence Test
- Relative Total Norm Disp Incr Convergence Test
- Relative Total Norm Unbalance Convergence Test
- Relative Total Energy Incr Convergence Test
- Fixed Num Iter Convergence Test
- NormDispAndUnbalance Convergence Test
- Norm Disp Or Unbalance Convergence Test
Each analysis component type has its own documentation page with detailed parameter descriptions and usage examples.