Python App to control and manipulate SAP2000 Model
Project description
Python app to aid in SAP analysis.
View Demo · Documentation · Report Bug · Request Feature
Table of Contents
- 1. About the Project
- 2. Getting Started
- 3. Usage
- 4. Roadmap
- 5. License
- 6. Contact
- 7. Acknowledgements
1. About the Project
Python wrapper for SAP2000 application
1.1. Features
- Modal Analysis
- Can run modal analysis to capture the required modal participation, per CSA
- Response Spectrum
- Can setup, solve and run response spectrum analysis on SAP
- Template Setup
- Can quickly and consistently deploy Template SAP settings to any open SAP model.
2. Getting Started
2.1. Prerequisites
Requires Python 3.10+
2.2. Dependencies
Create the virutual environment and install dependencies
python -m venv .venv
.venv\Scripts\activate.bat
pip install flit
2.3. Installation
Install sap2000
and dependencies with flit
flit install
3. Usage
Ensure the SAP file you would like to manipulate is already open.
A script to run analysis and save the model to a new location.
import sap2000
sap = sap2000.attach()
sap.analyze(all_cases=True)
sap.save_model(savepath=r"\path\to\save\file.sdb")
3.1. Interact with database tables
List available tables
sap.Table.available
Get Table values
sap.Table.get("Project Information")
Show table information and column descriptions
sap.Table.col_description('Area Loads - Uniform')
3.2. Units
You can use this module to get the current active units in the model or set a specific unit system.
Get Units
Returns a tuple of forallpeople
instance for the force and distance, and a string for the temperature (C
/F
). The force and distance can be directly multiplied with the numerical values to get consistent units and ease of calculation or presentation.
$ sap.Units.get()
(1.000 kN, 1.000 m, 'C')
Set Units
Number | Force | Distance | Temperature |
---|---|---|---|
1 | lbf | in | F |
2 | lbf | ft | F |
3 | kip | in | F |
4 | kip | ft | F |
5 | kN | mm | C |
6 | kN | m | C |
7 | kgf | mm | C |
8 | kgf | m | C |
9 | N | mm | C |
10 | N | m | C |
11 | Ton | mm | C |
12 | Ton | m | C |
13 | kN | cm | C |
14 | kgf | cm | C |
15 | N | cm | C |
16 | Ton | cm | C |
sap.Units.set(5)
4. Roadmap
- Beam Design
- Generate S-Concrete files with correct loadcases for any/all beams in project.
- Get beam/column design summary.
5. License
Distributed under the no License. See LICENSE.txt for more information.
6. Contact
Arun Kishore - @rpakishore
Project Link: https://github.com/rpakishore/sap-analysis
7. Acknowledgements
Use this section to mention useful resources and libraries that you have used in your projects.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sap2000-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a61b9950d0ee230c7dd51bb2f6b0e9f88bf8de9a705363a6a16b167f7a710f3 |
|
MD5 | c040e261107210ab4644b15da9925a28 |
|
BLAKE2b-256 | a15300c9e07df184d048ac1c3a2c92b9dbae0f3d97c60640cd0f9839e81c51e1 |