# opseestools
This is a library to be used with OpenSeesPy.
It includes a collection of analysis functions that are useful if you are analyzing frames or wall buildings both in two and three dimensions, storing the results in Python variables.
It also includes another useful tools for processing results and creating scripts
## Installation
pip install opseestools
## Description and use
ops tools comprises a set of functions in four categories:
1) 2D Analysis functions. This library is called analysis. You can import it as:
import opstools.analisis as an
2) 3D Analysis functions. This library is called analysis. You can import it as:
import opstools.analisis3D as an3D (or any name you want)
3) A set of utilities to support model building. You can import it as:
import opstools.utilidades as ut (or any other name)
4) A library to calculate and plot fragility functions. You can import it as:
import opstools.Lib_frag as lf (or any other name)
The full documentation is available on the GitHub website: https://github.com/odarroyo/opseestools
Tutorials of how to use the functions are available in the examples folder in: https://github.com/odarroyo/opseestools
## 2D Analysis functions
Here's a brief description of some of the functions:
### gravedad()
To perform gravity analysis of a model you created. In a more general sense, it runs a static analysis, but returns no output. The idea of this script is to perform the gravity analysis before a pushover or other nonlinear analysis.
### pushover2(Dmax,Dincr,IDctrlNode,IDctrlDOF)
This function performs a pushover analysis.
Dmax = maximum displacement
Dincr = increment of displacement
IDctrlNode = control node for the pushover
IDctrlDOF = DOF for pushover
The function returns two variables as numpy arrays: roof displacement and base shear. In that order. An example call of this function is:
roof,shear = an.pushover2(1.5,0.01,9,1), which performs a pushover analysis using node 9 as a control node in the DOF = 1 until a displacement of 1.5 in 0.01 increments
### dinamicoIDA4P(recordName,dtrec,nPts,dtan,fact,damp,IDctrlNode,IDctrlDOF,elements,nodes_control,modes = [0,2],Kswitch = 1,Tol=1e-4)
This is a function to be used with any 2D model where each element has six degrees of freedom, e.g., any 2D frame (steel or concrete), with or without infills (as long as they're modeled as 6DOF elements) should work.
Inputs are:
- recordName: name of the txt file with the values of acceleration. e.g., 'GM01.txt'. Only one value per line
- dtrec: dt of the record, i.e, time interval in seconds
- nPts: number of points of the file
- dtan: dt to be used by OpenSeesPy in the analysis
- fact: scale factor to be applied to the record
- damp: damping ratio to be applied to the model
- IDctrlNode = control node for the pushover
- IDctrlDOF = DOF for pushover
- elements = list with elements to record forces. e.g, [3,5,6] records forces for elements 3, 5 and 6
- nodes_control = nodes to record displacement in the DOF direction. This is meant to calculate interstory drifts, thereforce you should input one node per building floor
- modes = list to include the number of modes for computing the damping in a Rayleight scheme. Default is [0,2], which uses the first and third mode. Adjust according to your needs.
- Kswitch = 1 to use initial stiffness, 2 for current stiffness. Default is 1
- Tol = tolerance for equilibrium. The algorithm uses the NormUnbalance test, which is appropriate for most circumstances and a 1e-4 value. Adjust the tolerance according to your problem size.
Outputs are:
- time: time of the analysis
- roof: roof displacement
- element_forces: numpy 3D array with the element forces. Think of this as a stack of 2D matrices, where each 2D matrix contains the response of one element: in the rows the analysis time time and in the columns the element DOF.
- node_disp: 2D matrix where each row is time and columns have the node displacement in the specified DOF
- node_vel: same as node_disp but for velocity
- node_acel: same as node_disp but for acceleration. Returns the floor relative acceleration.
- drift: same as node_disp but for interstory drifts.
The outputs should all be specified and in that order. Example:
time,roof,element_forces,node_disp,node_vel,node_acel,drift = an.dinamicoIDA4P(....)
Raw data
{
"_id": null,
"home_page": "https://github.com/odarroyo/opseestools",
"name": "opseestools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Orlando Arroyo",
"author_email": "odarroyo@uc.cl",
"download_url": "https://files.pythonhosted.org/packages/18/fd/4dd10827d19d1dc89f4efafbfd00dc14c89922527fe2f766cb21b217e18e/opseestools-0.65.tar.gz",
"platform": null,
"description": "# opseestools\r\n\r\nThis is a library to be used with OpenSeesPy.\r\n\r\nIt includes a collection of analysis functions that are useful if you are analyzing frames or wall buildings both in two and three dimensions, storing the results in Python variables. \r\nIt also includes another useful tools for processing results and creating scripts\r\n\r\n## Installation\r\n\r\npip install opseestools\r\n\r\n## Description and use \r\n\r\nops tools comprises a set of functions in four categories:\r\n\r\n1) 2D Analysis functions. This library is called analysis. You can import it as:\r\n\r\nimport opstools.analisis as an\r\n\r\n2) 3D Analysis functions. This library is called analysis. You can import it as:\r\n\r\nimport opstools.analisis3D as an3D (or any name you want)\r\n\r\n3) A set of utilities to support model building. You can import it as:\r\n\r\nimport opstools.utilidades as ut (or any other name)\r\n\r\n4) A library to calculate and plot fragility functions. You can import it as:\r\n\r\nimport opstools.Lib_frag as lf (or any other name)\r\n\r\nThe full documentation is available on the GitHub website: https://github.com/odarroyo/opseestools \r\nTutorials of how to use the functions are available in the examples folder in: https://github.com/odarroyo/opseestools \r\n\r\n## 2D Analysis functions\r\n\r\nHere's a brief description of some of the functions:\r\n\r\n### gravedad()\r\nTo perform gravity analysis of a model you created. In a more general sense, it runs a static analysis, but returns no output. The idea of this script is to perform the gravity analysis before a pushover or other nonlinear analysis.\r\n\r\n### pushover2(Dmax,Dincr,IDctrlNode,IDctrlDOF)\r\n\r\nThis function performs a pushover analysis.\r\nDmax = maximum displacement\r\nDincr = increment of displacement\r\nIDctrlNode = control node for the pushover\r\nIDctrlDOF = DOF for pushover\r\n\r\nThe function returns two variables as numpy arrays: roof displacement and base shear. In that order. An example call of this function is:\r\n\r\nroof,shear = an.pushover2(1.5,0.01,9,1), which performs a pushover analysis using node 9 as a control node in the DOF = 1 until a displacement of 1.5 in 0.01 increments\r\n\r\n### dinamicoIDA4P(recordName,dtrec,nPts,dtan,fact,damp,IDctrlNode,IDctrlDOF,elements,nodes_control,modes = [0,2],Kswitch = 1,Tol=1e-4)\r\n\r\nThis is a function to be used with any 2D model where each element has six degrees of freedom, e.g., any 2D frame (steel or concrete), with or without infills (as long as they're modeled as 6DOF elements) should work.\r\n\r\nInputs are:\r\n- recordName: name of the txt file with the values of acceleration. e.g., 'GM01.txt'. Only one value per line\r\n- dtrec: dt of the record, i.e, time interval in seconds\r\n- nPts: number of points of the file\r\n- dtan: dt to be used by OpenSeesPy in the analysis\r\n- fact: scale factor to be applied to the record\r\n- damp: damping ratio to be applied to the model\r\n- IDctrlNode = control node for the pushover\r\n- IDctrlDOF = DOF for pushover\r\n- elements = list with elements to record forces. e.g, [3,5,6] records forces for elements 3, 5 and 6\r\n- nodes_control = nodes to record displacement in the DOF direction. This is meant to calculate interstory drifts, thereforce you should input one node per building floor\r\n- modes = list to include the number of modes for computing the damping in a Rayleight scheme. Default is [0,2], which uses the first and third mode. Adjust according to your needs.\r\n- Kswitch = 1 to use initial stiffness, 2 for current stiffness. Default is 1\r\n- Tol = tolerance for equilibrium. The algorithm uses the NormUnbalance test, which is appropriate for most circumstances and a 1e-4 value. Adjust the tolerance according to your problem size.\r\n\r\nOutputs are:\r\n- time: time of the analysis\r\n- roof: roof displacement\r\n- element_forces: numpy 3D array with the element forces. Think of this as a stack of 2D matrices, where each 2D matrix contains the response of one element: in the rows the analysis time time and in the columns the element DOF.\r\n- node_disp: 2D matrix where each row is time and columns have the node displacement in the specified DOF\r\n- node_vel: same as node_disp but for velocity\r\n- node_acel: same as node_disp but for acceleration. Returns the floor relative acceleration.\r\n- drift: same as node_disp but for interstory drifts.\r\n\r\nThe outputs should all be specified and in that order. Example:\r\n\r\ntime,roof,element_forces,node_disp,node_vel,node_acel,drift = an.dinamicoIDA4P(....)\r\n\r\n\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "A collection of OpenSeesPy routines for performing several types of analyses and other tools",
"version": "0.65",
"project_urls": {
"Homepage": "https://github.com/odarroyo/opseestools"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e1ad2d06c1f955fc9da454eeb217ae614bfcc6125bebd722282b89d28743d270",
"md5": "759ffc5172fccb2d9762d863c949e408",
"sha256": "ef91977fcacfe44f8558635b07351243a9e27aa6854f2887782ec95eeeff62da"
},
"downloads": -1,
"filename": "opseestools-0.65-py3-none-any.whl",
"has_sig": false,
"md5_digest": "759ffc5172fccb2d9762d863c949e408",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 38110,
"upload_time": "2024-12-28T22:34:04",
"upload_time_iso_8601": "2024-12-28T22:34:04.529257Z",
"url": "https://files.pythonhosted.org/packages/e1/ad/2d06c1f955fc9da454eeb217ae614bfcc6125bebd722282b89d28743d270/opseestools-0.65-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "18fd4dd10827d19d1dc89f4efafbfd00dc14c89922527fe2f766cb21b217e18e",
"md5": "cc48cd304605ac2c5f2677899c9f61a1",
"sha256": "f0fea8d6ea3a32ac9b15884488e7c635cdefec8ba3bf4b116b27642d45ec16af"
},
"downloads": -1,
"filename": "opseestools-0.65.tar.gz",
"has_sig": false,
"md5_digest": "cc48cd304605ac2c5f2677899c9f61a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 37586,
"upload_time": "2024-12-28T22:34:06",
"upload_time_iso_8601": "2024-12-28T22:34:06.860241Z",
"url": "https://files.pythonhosted.org/packages/18/fd/4dd10827d19d1dc89f4efafbfd00dc14c89922527fe2f766cb21b217e18e/opseestools-0.65.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-28 22:34:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "odarroyo",
"github_project": "opseestools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "opseestools"
}