Creating text files for rotations about the x-direction
-
Kate_Rhoades
- Posts: 29
- Joined: Mon Mar 06, 2023 4:04 pm
Creating text files for rotations about the x-direction
Hello STKO team,
I have been working on extracting rotation results throughout my columns within a building. I have used the following custom recorder script to obtain rotation results about the x-direction. Can you confirm that this is an acceptable way to obtain a csv file for the column rotations throughout the ground motions?
Here is my tcl script:
recorder Drift -file "$param_id Story 1 Rotation.csv" -precision 3 \
-iNode 291 295 293 289 277 283 281 279 271 269 267 265 257 259 253 255 247 243 245 241 233 234 232 235 226 227 224 225 213 211 215 222 205 207 209 220 \
-jNode 286 285 284 287 274 273 272 275 262 261 260 263 250 249 248 251 238 237 236 239 230 229 228 231 218 217 216 223 212 210 214 221 204 206 208 219 \
-dof 4 -perpDirn 3
I have been working on extracting rotation results throughout my columns within a building. I have used the following custom recorder script to obtain rotation results about the x-direction. Can you confirm that this is an acceptable way to obtain a csv file for the column rotations throughout the ground motions?
Here is my tcl script:
recorder Drift -file "$param_id Story 1 Rotation.csv" -precision 3 \
-iNode 291 295 293 289 277 283 281 279 271 269 267 265 257 259 253 255 247 243 245 241 233 234 232 235 226 227 224 225 213 211 215 222 205 207 209 220 \
-jNode 286 285 284 287 274 273 272 275 262 261 260 263 250 249 248 251 238 237 236 239 230 229 228 231 218 217 216 223 212 210 214 221 204 206 208 219 \
-dof 4 -perpDirn 3
-
Kate_Rhoades
- Posts: 29
- Joined: Mon Mar 06, 2023 4:04 pm
Re: Creating text files for rotations about the x-direction
To provide a bit more clarification, the j nodes are the top of the column, and the i nodes are the base of the column and the columns are on the first story.
Thank you so much for your help!
Thank you so much for your help!
-
kesavapraba
- Posts: 468
- Joined: Sat Mar 28, 2020 2:25 pm
Re: Creating text files for rotations about the x-direction
Hi, Yes. This is fine. Please ensure param_id is set up before calling the script and also check the format inwhich the CSV file is written. All the data will be placed on a single column in the CSV file. You might consider *.out or *.txt file formats and import it into spreadsheet.
:: With best wishes ::
Prabakaran Kesavan
Prabakaran Kesavan
-
Kate_Rhoades
- Posts: 29
- Joined: Mon Mar 06, 2023 4:04 pm
Re: Creating text files for rotations about the x-direction
Wonderful! Thank you kesavapraba. And to be a bit more specific, I spoke with my advisor, and I actually need the plastic hinge rotations for my lumped plasticity model, not the column rotations. Is there a way to set up a similar tcl file? Is there an example in a webinar that you can think of?
Thank you,
Kate
Thank you,
Kate
-
kesavapraba
- Posts: 468
- Joined: Sat Mar 28, 2020 2:25 pm
Re: Creating text files for rotations about the x-direction
Hi, Yes. If you are thinking of lumped plasticity, you can employ zero length elements for plastic hinges. For any zero length element, it is possible to record the force and deformation details (see valid queries in the 1st link below). A webinar on different modeling strategies for plastic hinge in beam-column elements is presented in the 2nd link below.
https://opensees.berkeley.edu/wiki/inde ... th_Element
https://www.youtube.com/watch?v=dMZHH5W ... 14&t=1027s
https://opensees.berkeley.edu/wiki/inde ... th_Element
https://www.youtube.com/watch?v=dMZHH5W ... 14&t=1027s
:: With best wishes ::
Prabakaran Kesavan
Prabakaran Kesavan
-
Kate_Rhoades
- Posts: 29
- Joined: Mon Mar 06, 2023 4:04 pm
Re: Creating text files for rotations about the x-direction
Thank you for providing these references, I will take a look! The current model I am working with is indeed employing the zero-length elements for the plastic hinges. Do you have any recommendations on how to record the plastic hinge rotations into text or csv files, similar to the tcl file I wrote for the column rotations? I would like to be able to track the rotations throughout the duration of the ground motions.
Thank you,
Kate
Thank you,
Kate
-
kesavapraba
- Posts: 468
- Joined: Sat Mar 28, 2020 2:25 pm
Re: Creating text files for rotations about the x-direction
Hi, Yes. Please use the following TCL custom commands before the analysis.
For example, consider recording the force and displacement for the material ID 2 (i.e., DOF) for zero length element with integer tag 100. You can use the following TCL to record the force in Force.out and displacement in Displacement.out files.
recorder Element -file Force.out -time -ele 100 material 2 stress
recorder Element -file Displacement.out -time -ele 100 material 2 strain
Additionally, the following link might be useful to understand how recorder object is defined in OpenSees:
https://opensees.berkeley.edu/OpenSees/ ... al/259.htm
For example, consider recording the force and displacement for the material ID 2 (i.e., DOF) for zero length element with integer tag 100. You can use the following TCL to record the force in Force.out and displacement in Displacement.out files.
recorder Element -file Force.out -time -ele 100 material 2 stress
recorder Element -file Displacement.out -time -ele 100 material 2 strain
Additionally, the following link might be useful to understand how recorder object is defined in OpenSees:
https://opensees.berkeley.edu/OpenSees/ ... al/259.htm
Last edited by kesavapraba on Tue Jan 23, 2024 7:23 am, edited 1 time in total.
:: With best wishes ::
Prabakaran Kesavan
Prabakaran Kesavan
-
Kate_Rhoades
- Posts: 29
- Joined: Mon Mar 06, 2023 4:04 pm
Re: Creating text files for rotations about the x-direction
Thank you for providing a sample tcl script and additional resources. I am understanding generally how the script is working, but I think I may need more of an explanation on the numbering to apply this to my own model. I have tried several different combinations and nothing I have tried has worked. Can you elaborate on what you mean by "material ID for zero length element" and "integer tag". I apologize if this is obvious, but I am very new at writing my own tcl scripts and they do not make much sense to me yet.
For example, I have the following model. And I would like to analyze the plastic hinge rotations at each end of the column C2A. The mesh has labeled the column as element 616 connected to nodes 284 and 293. My drawings refer to this column as C2A, so everything in the model corresponds to labeling "C2A" I have all of the following properties corresponding to C2A listed here with their tag, the name I gave them, and the detailed property name:
For the physical properties:
Tag 5: C2A: Sections.Elastic
Tag 130: Hinge_Spring_C2A: ModIMKPeakOriented
Tag 151: Hinge_C2A: Special_purpose.zeroLengthMaterial
Tag 172: special_purpose.HingedBeamPP
For the element properties:
Tag 47: Joint 15: RC Beam Column Joint model
Tag 61: zero-length-hinge: zero_length_elements.zeroLength
I have had my model reviewed and I am sure that it is good and that the model itself does not need further revision, I would just like assistance with the script if you are able. Or, if my model is too large, do you have any smaller examples with a plastic hinge recorder you would be willing to share?
Many thanks for your time in helping me to understand plastic hinge recorders,
Kate
For example, I have the following model. And I would like to analyze the plastic hinge rotations at each end of the column C2A. The mesh has labeled the column as element 616 connected to nodes 284 and 293. My drawings refer to this column as C2A, so everything in the model corresponds to labeling "C2A" I have all of the following properties corresponding to C2A listed here with their tag, the name I gave them, and the detailed property name:
For the physical properties:
Tag 5: C2A: Sections.Elastic
Tag 130: Hinge_Spring_C2A: ModIMKPeakOriented
Tag 151: Hinge_C2A: Special_purpose.zeroLengthMaterial
Tag 172: special_purpose.HingedBeamPP
For the element properties:
Tag 47: Joint 15: RC Beam Column Joint model
Tag 61: zero-length-hinge: zero_length_elements.zeroLength
I have had my model reviewed and I am sure that it is good and that the model itself does not need further revision, I would just like assistance with the script if you are able. Or, if my model is too large, do you have any smaller examples with a plastic hinge recorder you would be willing to share?
Many thanks for your time in helping me to understand plastic hinge recorders,
Kate
- Attachments
-
- 1976_72yr_Return_Period.zip
- (17.59 MiB) Downloaded 284 times
-
- Plastic Hinge Recorder.PNG (54.43 KiB) Viewed 5202 times
-
kesavapraba
- Posts: 468
- Joined: Sat Mar 28, 2020 2:25 pm
Re: Creating text files for rotations about the x-direction
Hi, Thank you writing to us.
To identify the zeroLength element tag, you need to look at "Element.tcl" file after STKO writes all input files (can be found at the same location of SCD file). For example, C2A column that you mentioned is assigned with zeroLength elements at its ends by STKO (creating extra nodes). Please see the figure attached below. The hingedBeam has elastic core (assigned with elasticBeamColumn element, ID=616) and two zeroLength elements (ID=2148, 2149) at ends.
In the recorder script shared previously, material means the DOFs along which the uniaxial material is assigned, hence you can use the following script for zeroLength element 2148 to record force (or moment) and displacement (or rotation):
recorder Element -file Force.out -time -ele 2148 material 4 stress
recorder Element -file Displacement.out -time -ele 2148 material 4 strain
The script above considers recording the response of zeroLength element 2148: After running analysis with this script , if you open Force.out file, you can find the pesudo-time in the first column and the force along 4 DOF in the second column. In the same way, you can see the deformation in Displacement.out file. Please note "4" denotes the DOF along which the uniaxial material is assgined. Similar to this, if you want to record force and deformation along 5 DOF, replace 4 with 5 in the script above.
I would also suggest a different script given below for recording the force and displacement response along all DOFs. Now, consider recording the response of zeroLength element 2148: After running analysis with this script , if you open Force.out file, you can find the pesudo-time in the first column and the forces along 1, 2, 3, 4, 5, 6 DOFS in the remaining columns. In the same way, you can see the deformation in Displacement.out file. I think you are interested in recording ModifiedIMK model along 4, 5, 6 DOFS, so refer to columns 5, 6, and 7 in those files.
recorder Element -file Force.out -time -ele 2148 force
recorder Element -file Displacement.out -time -ele 2148 deformation
To identify the zeroLength element tag, you need to look at "Element.tcl" file after STKO writes all input files (can be found at the same location of SCD file). For example, C2A column that you mentioned is assigned with zeroLength elements at its ends by STKO (creating extra nodes). Please see the figure attached below. The hingedBeam has elastic core (assigned with elasticBeamColumn element, ID=616) and two zeroLength elements (ID=2148, 2149) at ends.
In the recorder script shared previously, material means the DOFs along which the uniaxial material is assigned, hence you can use the following script for zeroLength element 2148 to record force (or moment) and displacement (or rotation):
recorder Element -file Force.out -time -ele 2148 material 4 stress
recorder Element -file Displacement.out -time -ele 2148 material 4 strain
The script above considers recording the response of zeroLength element 2148: After running analysis with this script , if you open Force.out file, you can find the pesudo-time in the first column and the force along 4 DOF in the second column. In the same way, you can see the deformation in Displacement.out file. Please note "4" denotes the DOF along which the uniaxial material is assgined. Similar to this, if you want to record force and deformation along 5 DOF, replace 4 with 5 in the script above.
I would also suggest a different script given below for recording the force and displacement response along all DOFs. Now, consider recording the response of zeroLength element 2148: After running analysis with this script , if you open Force.out file, you can find the pesudo-time in the first column and the forces along 1, 2, 3, 4, 5, 6 DOFS in the remaining columns. In the same way, you can see the deformation in Displacement.out file. I think you are interested in recording ModifiedIMK model along 4, 5, 6 DOFS, so refer to columns 5, 6, and 7 in those files.
recorder Element -file Force.out -time -ele 2148 force
recorder Element -file Displacement.out -time -ele 2148 deformation
- Attachments
-
- elementIdentify.png (46.35 KiB) Viewed 5176 times
:: With best wishes ::
Prabakaran Kesavan
Prabakaran Kesavan
-
Kate_Rhoades
- Posts: 29
- Joined: Mon Mar 06, 2023 4:04 pm
Re: Creating text files for rotations about the x-direction
Thank you so much for explaining this process to me. Your explanation made tons of sense, both in understanding this particular scenario, and for locating elements in future analyses. I am understanding much more about using recorders
Many thanks for your time and help,
Kate
Many thanks for your time and help,
Kate